chore(dependencies): update package-lock.json and package.json for dependency versions
- Updated lodash from version 4.17.21 to 4.17.23 in package-lock.json for improved performance and security. - Downgraded sqlite3 from version 5.1.7 to 5.0.2 in both package.json and package-lock.json to maintain compatibility. - Upgraded @babel/runtime from version 7.28.4 to 7.28.6 in package-lock.json to incorporate the latest features and fixes. - Added new esbuild dependencies for various architectures (aix, android, darwin, freebsd, linux) to enhance cross-platform support. - Updated TypeScript definitions for ms and node modules to align with the latest API changes and improve type safety.
This commit is contained in:
3907
backend/node_modules/.package-lock.json
generated
vendored
3907
backend/node_modules/.package-lock.json
generated
vendored
File diff suppressed because it is too large
Load Diff
53
backend/node_modules/@types/ms/README.md
generated
vendored
53
backend/node_modules/@types/ms/README.md
generated
vendored
@@ -2,7 +2,7 @@
|
||||
> `npm install --save @types/ms`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for ms (https://github.com/zeit/ms).
|
||||
This package contains type definitions for ms (https://github.com/vercel/ms).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ms.
|
||||
@@ -20,17 +20,62 @@ declare function ms(value: number, options?: { long: boolean }): string;
|
||||
/**
|
||||
* Parse the given `value` and return milliseconds.
|
||||
*
|
||||
* @param {String} value
|
||||
* @param {ms.StringValue} value
|
||||
* @return {Number}
|
||||
*/
|
||||
declare function ms(value: string): number;
|
||||
declare function ms(value: ms.StringValue): number;
|
||||
|
||||
declare namespace ms {
|
||||
// Unit, UnitAnyCase, and StringValue are backported from ms@3
|
||||
// https://github.com/vercel/ms/blob/8b5923d1d86c84a9f6aba8022d416dcf2361aa8d/src/index.ts
|
||||
|
||||
type Unit =
|
||||
| "Years"
|
||||
| "Year"
|
||||
| "Yrs"
|
||||
| "Yr"
|
||||
| "Y"
|
||||
| "Weeks"
|
||||
| "Week"
|
||||
| "W"
|
||||
| "Days"
|
||||
| "Day"
|
||||
| "D"
|
||||
| "Hours"
|
||||
| "Hour"
|
||||
| "Hrs"
|
||||
| "Hr"
|
||||
| "H"
|
||||
| "Minutes"
|
||||
| "Minute"
|
||||
| "Mins"
|
||||
| "Min"
|
||||
| "M"
|
||||
| "Seconds"
|
||||
| "Second"
|
||||
| "Secs"
|
||||
| "Sec"
|
||||
| "s"
|
||||
| "Milliseconds"
|
||||
| "Millisecond"
|
||||
| "Msecs"
|
||||
| "Msec"
|
||||
| "Ms";
|
||||
|
||||
type UnitAnyCase = Unit | Uppercase<Unit> | Lowercase<Unit>;
|
||||
|
||||
type StringValue =
|
||||
| `${number}`
|
||||
| `${number}${UnitAnyCase}`
|
||||
| `${number} ${UnitAnyCase}`;
|
||||
}
|
||||
|
||||
export = ms;
|
||||
|
||||
````
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Tue, 07 Nov 2023 09:09:39 GMT
|
||||
* Last updated: Thu, 16 Jan 2025 21:02:45 GMT
|
||||
* Dependencies: none
|
||||
|
||||
# Credits
|
||||
|
||||
49
backend/node_modules/@types/ms/index.d.ts
generated
vendored
49
backend/node_modules/@types/ms/index.d.ts
generated
vendored
@@ -10,9 +10,54 @@ declare function ms(value: number, options?: { long: boolean }): string;
|
||||
/**
|
||||
* Parse the given `value` and return milliseconds.
|
||||
*
|
||||
* @param {String} value
|
||||
* @param {ms.StringValue} value
|
||||
* @return {Number}
|
||||
*/
|
||||
declare function ms(value: string): number;
|
||||
declare function ms(value: ms.StringValue): number;
|
||||
|
||||
declare namespace ms {
|
||||
// Unit, UnitAnyCase, and StringValue are backported from ms@3
|
||||
// https://github.com/vercel/ms/blob/8b5923d1d86c84a9f6aba8022d416dcf2361aa8d/src/index.ts
|
||||
|
||||
type Unit =
|
||||
| "Years"
|
||||
| "Year"
|
||||
| "Yrs"
|
||||
| "Yr"
|
||||
| "Y"
|
||||
| "Weeks"
|
||||
| "Week"
|
||||
| "W"
|
||||
| "Days"
|
||||
| "Day"
|
||||
| "D"
|
||||
| "Hours"
|
||||
| "Hour"
|
||||
| "Hrs"
|
||||
| "Hr"
|
||||
| "H"
|
||||
| "Minutes"
|
||||
| "Minute"
|
||||
| "Mins"
|
||||
| "Min"
|
||||
| "M"
|
||||
| "Seconds"
|
||||
| "Second"
|
||||
| "Secs"
|
||||
| "Sec"
|
||||
| "s"
|
||||
| "Milliseconds"
|
||||
| "Millisecond"
|
||||
| "Msecs"
|
||||
| "Msec"
|
||||
| "Ms";
|
||||
|
||||
type UnitAnyCase = Unit | Uppercase<Unit> | Lowercase<Unit>;
|
||||
|
||||
type StringValue =
|
||||
| `${number}`
|
||||
| `${number}${UnitAnyCase}`
|
||||
| `${number} ${UnitAnyCase}`;
|
||||
}
|
||||
|
||||
export = ms;
|
||||
|
||||
7
backend/node_modules/@types/ms/package.json
generated
vendored
7
backend/node_modules/@types/ms/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@types/ms",
|
||||
"version": "0.7.34",
|
||||
"version": "2.1.0",
|
||||
"description": "TypeScript definitions for ms",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ms",
|
||||
"license": "MIT",
|
||||
@@ -20,6 +20,7 @@
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"typesPublisherContentHash": "4ee80538a62ddf0c1ada0b6ae194e895a89f19de73c78f2afdcba2e91a66480e",
|
||||
"typeScriptVersion": "4.5"
|
||||
"peerDependencies": {},
|
||||
"typesPublisherContentHash": "2c8651ce1714fdc6bcbc0f262c93a790f1d127fb1c2dc8edbb583decef56fd39",
|
||||
"typeScriptVersion": "5.0"
|
||||
}
|
||||
2
backend/node_modules/@types/node/README.md
generated
vendored
2
backend/node_modules/@types/node/README.md
generated
vendored
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Mon, 03 Nov 2025 01:29:59 GMT
|
||||
* Last updated: Sun, 01 Feb 2026 15:38:50 GMT
|
||||
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
||||
|
||||
# Credits
|
||||
|
||||
178
backend/node_modules/@types/node/assert.d.ts
generated
vendored
178
backend/node_modules/@types/node/assert.d.ts
generated
vendored
@@ -1,10 +1,10 @@
|
||||
/**
|
||||
* The `node:assert` module provides a set of assertion functions for verifying
|
||||
* invariants.
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/assert.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/assert.js)
|
||||
*/
|
||||
declare module "assert" {
|
||||
import strict = require("assert/strict");
|
||||
declare module "node:assert" {
|
||||
import strict = require("node:assert/strict");
|
||||
/**
|
||||
* An alias of {@link assert.ok}.
|
||||
* @since v0.5.9
|
||||
@@ -182,154 +182,6 @@ declare module "assert" {
|
||||
*/
|
||||
operator: string;
|
||||
}
|
||||
/**
|
||||
* This feature is deprecated and will be removed in a future version.
|
||||
* Please consider using alternatives such as the `mock` helper function.
|
||||
* @since v14.2.0, v12.19.0
|
||||
* @deprecated Deprecated
|
||||
*/
|
||||
class CallTracker {
|
||||
/**
|
||||
* The wrapper function is expected to be called exactly `exact` times. If the
|
||||
* function has not been called exactly `exact` times when `tracker.verify()` is called, then `tracker.verify()` will throw an
|
||||
* error.
|
||||
*
|
||||
* ```js
|
||||
* import assert from 'node:assert';
|
||||
*
|
||||
* // Creates call tracker.
|
||||
* const tracker = new assert.CallTracker();
|
||||
*
|
||||
* function func() {}
|
||||
*
|
||||
* // Returns a function that wraps func() that must be called exact times
|
||||
* // before tracker.verify().
|
||||
* const callsfunc = tracker.calls(func);
|
||||
* ```
|
||||
* @since v14.2.0, v12.19.0
|
||||
* @param [fn='A no-op function']
|
||||
* @param [exact=1]
|
||||
* @return A function that wraps `fn`.
|
||||
*/
|
||||
calls(exact?: number): () => void;
|
||||
calls(fn: undefined, exact?: number): () => void;
|
||||
calls<Func extends (...args: any[]) => any>(fn: Func, exact?: number): Func;
|
||||
calls<Func extends (...args: any[]) => any>(fn?: Func, exact?: number): Func | (() => void);
|
||||
/**
|
||||
* Example:
|
||||
*
|
||||
* ```js
|
||||
* import assert from 'node:assert';
|
||||
*
|
||||
* const tracker = new assert.CallTracker();
|
||||
*
|
||||
* function func() {}
|
||||
* const callsfunc = tracker.calls(func);
|
||||
* callsfunc(1, 2, 3);
|
||||
*
|
||||
* assert.deepStrictEqual(tracker.getCalls(callsfunc),
|
||||
* [{ thisArg: undefined, arguments: [1, 2, 3] }]);
|
||||
* ```
|
||||
* @since v18.8.0, v16.18.0
|
||||
* @return An array with all the calls to a tracked function.
|
||||
*/
|
||||
getCalls(fn: Function): CallTrackerCall[];
|
||||
/**
|
||||
* The arrays contains information about the expected and actual number of calls of
|
||||
* the functions that have not been called the expected number of times.
|
||||
*
|
||||
* ```js
|
||||
* import assert from 'node:assert';
|
||||
*
|
||||
* // Creates call tracker.
|
||||
* const tracker = new assert.CallTracker();
|
||||
*
|
||||
* function func() {}
|
||||
*
|
||||
* // Returns a function that wraps func() that must be called exact times
|
||||
* // before tracker.verify().
|
||||
* const callsfunc = tracker.calls(func, 2);
|
||||
*
|
||||
* // Returns an array containing information on callsfunc()
|
||||
* console.log(tracker.report());
|
||||
* // [
|
||||
* // {
|
||||
* // message: 'Expected the func function to be executed 2 time(s) but was
|
||||
* // executed 0 time(s).',
|
||||
* // actual: 0,
|
||||
* // expected: 2,
|
||||
* // operator: 'func',
|
||||
* // stack: stack trace
|
||||
* // }
|
||||
* // ]
|
||||
* ```
|
||||
* @since v14.2.0, v12.19.0
|
||||
* @return An array of objects containing information about the wrapper functions returned by {@link tracker.calls()}.
|
||||
*/
|
||||
report(): CallTrackerReportInformation[];
|
||||
/**
|
||||
* Reset calls of the call tracker. If a tracked function is passed as an argument, the calls will be reset for it.
|
||||
* If no arguments are passed, all tracked functions will be reset.
|
||||
*
|
||||
* ```js
|
||||
* import assert from 'node:assert';
|
||||
*
|
||||
* const tracker = new assert.CallTracker();
|
||||
*
|
||||
* function func() {}
|
||||
* const callsfunc = tracker.calls(func);
|
||||
*
|
||||
* callsfunc();
|
||||
* // Tracker was called once
|
||||
* assert.strictEqual(tracker.getCalls(callsfunc).length, 1);
|
||||
*
|
||||
* tracker.reset(callsfunc);
|
||||
* assert.strictEqual(tracker.getCalls(callsfunc).length, 0);
|
||||
* ```
|
||||
* @since v18.8.0, v16.18.0
|
||||
* @param fn a tracked function to reset.
|
||||
*/
|
||||
reset(fn?: Function): void;
|
||||
/**
|
||||
* Iterates through the list of functions passed to {@link tracker.calls()} and will throw an error for functions that
|
||||
* have not been called the expected number of times.
|
||||
*
|
||||
* ```js
|
||||
* import assert from 'node:assert';
|
||||
*
|
||||
* // Creates call tracker.
|
||||
* const tracker = new assert.CallTracker();
|
||||
*
|
||||
* function func() {}
|
||||
*
|
||||
* // Returns a function that wraps func() that must be called exact times
|
||||
* // before tracker.verify().
|
||||
* const callsfunc = tracker.calls(func, 2);
|
||||
*
|
||||
* callsfunc();
|
||||
*
|
||||
* // Will throw an error since callsfunc() was only called once.
|
||||
* tracker.verify();
|
||||
* ```
|
||||
* @since v14.2.0, v12.19.0
|
||||
*/
|
||||
verify(): void;
|
||||
}
|
||||
interface CallTrackerCall {
|
||||
thisArg: object;
|
||||
arguments: unknown[];
|
||||
}
|
||||
interface CallTrackerReportInformation {
|
||||
message: string;
|
||||
/** The actual number of times the function was called. */
|
||||
actual: number;
|
||||
/** The number of times the function was expected to be called. */
|
||||
expected: number;
|
||||
/** The name of the function that is wrapped. */
|
||||
operator: string;
|
||||
/** A stack trace of the function. */
|
||||
stack: object;
|
||||
}
|
||||
type AssertPredicate = RegExp | (new() => object) | ((thrown: unknown) => boolean) | object | Error;
|
||||
/**
|
||||
* Throws an `AssertionError` with the provided error message or a default
|
||||
@@ -348,22 +200,10 @@ declare module "assert" {
|
||||
* assert.fail(new TypeError('need array'));
|
||||
* // TypeError: need array
|
||||
* ```
|
||||
*
|
||||
* Using `assert.fail()` with more than two arguments is possible but deprecated.
|
||||
* See below for further details.
|
||||
* @since v0.1.21
|
||||
* @param [message='Failed']
|
||||
*/
|
||||
function fail(message?: string | Error): never;
|
||||
/** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
|
||||
function fail(
|
||||
actual: unknown,
|
||||
expected: unknown,
|
||||
message?: string | Error,
|
||||
operator?: string,
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
||||
stackStartFn?: Function,
|
||||
): never;
|
||||
/**
|
||||
* Tests if `value` is truthy. It is equivalent to `assert.equal(!!value, true, message)`.
|
||||
*
|
||||
@@ -931,7 +771,7 @@ declare module "assert" {
|
||||
* check that the promise is rejected.
|
||||
*
|
||||
* If `asyncFn` is a function and it throws an error synchronously, `assert.rejects()` will return a rejected `Promise` with that error. If the
|
||||
* function does not return a promise, `assert.rejects()` will return a rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v24.x/api/errors.html#err_invalid_return_value)
|
||||
* function does not return a promise, `assert.rejects()` will return a rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v25.x/api/errors.html#err_invalid_return_value)
|
||||
* error. In both cases the error handler is skipped.
|
||||
*
|
||||
* Besides the async nature to await the completion behaves identically to {@link throws}.
|
||||
@@ -1001,7 +841,7 @@ declare module "assert" {
|
||||
*
|
||||
* If `asyncFn` is a function and it throws an error synchronously, `assert.doesNotReject()` will return a rejected `Promise` with that error. If
|
||||
* the function does not return a promise, `assert.doesNotReject()` will return a
|
||||
* rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v24.x/api/errors.html#err_invalid_return_value) error. In both cases
|
||||
* rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v25.x/api/errors.html#err_invalid_return_value) error. In both cases
|
||||
* the error handler is skipped.
|
||||
*
|
||||
* Using `assert.doesNotReject()` is actually not useful because there is little
|
||||
@@ -1064,7 +904,7 @@ declare module "assert" {
|
||||
* If the values do not match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal
|
||||
* to the value of the `message` parameter. If the `message` parameter is
|
||||
* undefined, a default error message is assigned. If the `message` parameter is an
|
||||
* instance of an [Error](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`.
|
||||
* instance of an [Error](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`.
|
||||
* @since v13.6.0, v12.16.0
|
||||
*/
|
||||
function match(value: string, regExp: RegExp, message?: string | Error): void;
|
||||
@@ -1087,7 +927,7 @@ declare module "assert" {
|
||||
* If the values do match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal
|
||||
* to the value of the `message` parameter. If the `message` parameter is
|
||||
* undefined, a default error message is assigned. If the `message` parameter is an
|
||||
* instance of an [Error](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`.
|
||||
* instance of an [Error](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`.
|
||||
* @since v13.6.0, v12.16.0
|
||||
*/
|
||||
function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
|
||||
@@ -1109,7 +949,7 @@ declare module "assert" {
|
||||
}
|
||||
export = assert;
|
||||
}
|
||||
declare module "node:assert" {
|
||||
import assert = require("assert");
|
||||
declare module "assert" {
|
||||
import assert = require("node:assert");
|
||||
export = assert;
|
||||
}
|
||||
|
||||
16
backend/node_modules/@types/node/assert/strict.d.ts
generated
vendored
16
backend/node_modules/@types/node/assert/strict.d.ts
generated
vendored
@@ -40,11 +40,11 @@
|
||||
* To deactivate the colors, use the `NO_COLOR` or `NODE_DISABLE_COLORS`
|
||||
* environment variables. This will also deactivate the colors in the REPL. For
|
||||
* more on color support in terminal environments, read the tty
|
||||
* [`getColorDepth()`](https://nodejs.org/docs/latest-v24.x/api/tty.html#writestreamgetcolordepthenv) documentation.
|
||||
* [`getColorDepth()`](https://nodejs.org/docs/latest-v25.x/api/tty.html#writestreamgetcolordepthenv) documentation.
|
||||
* @since v15.0.0
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/assert/strict.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/assert/strict.js)
|
||||
*/
|
||||
declare module "assert/strict" {
|
||||
declare module "node:assert/strict" {
|
||||
import {
|
||||
Assert,
|
||||
AssertionError,
|
||||
@@ -52,9 +52,6 @@ declare module "assert/strict" {
|
||||
AssertOptions,
|
||||
AssertPredicate,
|
||||
AssertStrict,
|
||||
CallTracker,
|
||||
CallTrackerCall,
|
||||
CallTrackerReportInformation,
|
||||
deepStrictEqual,
|
||||
doesNotMatch,
|
||||
doesNotReject,
|
||||
@@ -79,9 +76,6 @@ declare module "assert/strict" {
|
||||
AssertOptions,
|
||||
AssertPredicate,
|
||||
AssertStrict,
|
||||
CallTracker,
|
||||
CallTrackerCall,
|
||||
CallTrackerReportInformation,
|
||||
deepStrictEqual,
|
||||
deepStrictEqual as deepEqual,
|
||||
doesNotMatch,
|
||||
@@ -105,7 +99,7 @@ declare module "assert/strict" {
|
||||
}
|
||||
export = strict;
|
||||
}
|
||||
declare module "node:assert/strict" {
|
||||
import strict = require("assert/strict");
|
||||
declare module "assert/strict" {
|
||||
import strict = require("node:assert/strict");
|
||||
export = strict;
|
||||
}
|
||||
|
||||
16
backend/node_modules/@types/node/async_hooks.d.ts
generated
vendored
16
backend/node_modules/@types/node/async_hooks.d.ts
generated
vendored
@@ -2,8 +2,8 @@
|
||||
* We strongly discourage the use of the `async_hooks` API.
|
||||
* Other APIs that can cover most of its use cases include:
|
||||
*
|
||||
* * [`AsyncLocalStorage`](https://nodejs.org/docs/latest-v24.x/api/async_context.html#class-asynclocalstorage) tracks async context
|
||||
* * [`process.getActiveResourcesInfo()`](https://nodejs.org/docs/latest-v24.x/api/process.html#processgetactiveresourcesinfo) tracks active resources
|
||||
* * [`AsyncLocalStorage`](https://nodejs.org/docs/latest-v25.x/api/async_context.html#class-asynclocalstorage) tracks async context
|
||||
* * [`process.getActiveResourcesInfo()`](https://nodejs.org/docs/latest-v25.x/api/process.html#processgetactiveresourcesinfo) tracks active resources
|
||||
*
|
||||
* The `node:async_hooks` module provides an API to track asynchronous resources.
|
||||
* It can be accessed using:
|
||||
@@ -12,9 +12,9 @@
|
||||
* import async_hooks from 'node:async_hooks';
|
||||
* ```
|
||||
* @experimental
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/async_hooks.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/async_hooks.js)
|
||||
*/
|
||||
declare module "async_hooks" {
|
||||
declare module "node:async_hooks" {
|
||||
/**
|
||||
* ```js
|
||||
* import { executionAsyncId } from 'node:async_hooks';
|
||||
@@ -44,7 +44,7 @@ declare module "async_hooks" {
|
||||
* ```
|
||||
*
|
||||
* Promise contexts may not get precise `executionAsyncIds` by default.
|
||||
* See the section on [promise execution tracking](https://nodejs.org/docs/latest-v24.x/api/async_hooks.html#promise-execution-tracking).
|
||||
* See the section on [promise execution tracking](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#promise-execution-tracking).
|
||||
* @since v8.1.0
|
||||
* @return The `asyncId` of the current execution context. Useful to track when something calls.
|
||||
*/
|
||||
@@ -117,7 +117,7 @@ declare module "async_hooks" {
|
||||
* ```
|
||||
*
|
||||
* Promise contexts may not get valid `triggerAsyncId`s by default. See
|
||||
* the section on [promise execution tracking](https://nodejs.org/docs/latest-v24.x/api/async_hooks.html#promise-execution-tracking).
|
||||
* the section on [promise execution tracking](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#promise-execution-tracking).
|
||||
* @return The ID of the resource responsible for calling the callback that is currently being executed.
|
||||
*/
|
||||
function triggerAsyncId(): number;
|
||||
@@ -618,6 +618,6 @@ declare module "async_hooks" {
|
||||
const VERIFYREQUEST: number;
|
||||
}
|
||||
}
|
||||
declare module "node:async_hooks" {
|
||||
export * from "async_hooks";
|
||||
declare module "async_hooks" {
|
||||
export * from "node:async_hooks";
|
||||
}
|
||||
|
||||
212
backend/node_modules/@types/node/buffer.d.ts
generated
vendored
212
backend/node_modules/@types/node/buffer.d.ts
generated
vendored
@@ -1,8 +1,3 @@
|
||||
// If lib.dom.d.ts or lib.webworker.d.ts is loaded, then use the global types.
|
||||
// Otherwise, use the types from node.
|
||||
type _Blob = typeof globalThis extends { onmessage: any; Blob: any } ? {} : import("buffer").Blob;
|
||||
type _File = typeof globalThis extends { onmessage: any; File: any } ? {} : import("buffer").File;
|
||||
|
||||
/**
|
||||
* `Buffer` objects are used to represent a fixed-length sequence of bytes. Many
|
||||
* Node.js APIs support `Buffer`s.
|
||||
@@ -46,11 +41,10 @@ type _File = typeof globalThis extends { onmessage: any; File: any } ? {} : impo
|
||||
* // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74].
|
||||
* const buf7 = Buffer.from('tést', 'latin1');
|
||||
* ```
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/buffer.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/buffer.js)
|
||||
*/
|
||||
declare module "buffer" {
|
||||
import { BinaryLike } from "node:crypto";
|
||||
import { ReadableStream as WebReadableStream } from "node:stream/web";
|
||||
declare module "node:buffer" {
|
||||
import { ReadableStream } from "node:stream/web";
|
||||
/**
|
||||
* This function returns `true` if `input` contains only valid UTF-8-encoded data,
|
||||
* including the case in which `input` is empty.
|
||||
@@ -126,115 +120,11 @@ declare module "buffer" {
|
||||
*/
|
||||
export function resolveObjectURL(id: string): Blob | undefined;
|
||||
export { type AllowSharedBuffer, Buffer, type NonSharedBuffer };
|
||||
/**
|
||||
* @experimental
|
||||
*/
|
||||
export interface BlobOptions {
|
||||
/**
|
||||
* One of either `'transparent'` or `'native'`. When set to `'native'`, line endings in string source parts
|
||||
* will be converted to the platform native line-ending as specified by `import { EOL } from 'node:os'`.
|
||||
*/
|
||||
endings?: "transparent" | "native";
|
||||
/**
|
||||
* The Blob content-type. The intent is for `type` to convey
|
||||
* the MIME media type of the data, however no validation of the type format
|
||||
* is performed.
|
||||
*/
|
||||
type?: string | undefined;
|
||||
}
|
||||
/**
|
||||
* A `Blob` encapsulates immutable, raw data that can be safely shared across
|
||||
* multiple worker threads.
|
||||
* @since v15.7.0, v14.18.0
|
||||
*/
|
||||
export class Blob {
|
||||
/**
|
||||
* The total size of the `Blob` in bytes.
|
||||
* @since v15.7.0, v14.18.0
|
||||
*/
|
||||
readonly size: number;
|
||||
/**
|
||||
* The content-type of the `Blob`.
|
||||
* @since v15.7.0, v14.18.0
|
||||
*/
|
||||
readonly type: string;
|
||||
/**
|
||||
* Creates a new `Blob` object containing a concatenation of the given sources.
|
||||
*
|
||||
* {ArrayBuffer}, {TypedArray}, {DataView}, and {Buffer} sources are copied into
|
||||
* the 'Blob' and can therefore be safely modified after the 'Blob' is created.
|
||||
*
|
||||
* String sources are also copied into the `Blob`.
|
||||
*/
|
||||
constructor(sources: Array<ArrayBuffer | BinaryLike | Blob>, options?: BlobOptions);
|
||||
/**
|
||||
* Returns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of
|
||||
* the `Blob` data.
|
||||
* @since v15.7.0, v14.18.0
|
||||
*/
|
||||
arrayBuffer(): Promise<ArrayBuffer>;
|
||||
/**
|
||||
* The `blob.bytes()` method returns the byte of the `Blob` object as a `Promise<Uint8Array>`.
|
||||
*
|
||||
* ```js
|
||||
* const blob = new Blob(['hello']);
|
||||
* blob.bytes().then((bytes) => {
|
||||
* console.log(bytes); // Outputs: Uint8Array(5) [ 104, 101, 108, 108, 111 ]
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
bytes(): Promise<Uint8Array>;
|
||||
/**
|
||||
* Creates and returns a new `Blob` containing a subset of this `Blob` objects
|
||||
* data. The original `Blob` is not altered.
|
||||
* @since v15.7.0, v14.18.0
|
||||
* @param start The starting index.
|
||||
* @param end The ending index.
|
||||
* @param type The content-type for the new `Blob`
|
||||
*/
|
||||
slice(start?: number, end?: number, type?: string): Blob;
|
||||
/**
|
||||
* Returns a promise that fulfills with the contents of the `Blob` decoded as a
|
||||
* UTF-8 string.
|
||||
* @since v15.7.0, v14.18.0
|
||||
*/
|
||||
text(): Promise<string>;
|
||||
/**
|
||||
* Returns a new `ReadableStream` that allows the content of the `Blob` to be read.
|
||||
* @since v16.7.0
|
||||
*/
|
||||
stream(): WebReadableStream;
|
||||
}
|
||||
export interface FileOptions {
|
||||
/**
|
||||
* One of either `'transparent'` or `'native'`. When set to `'native'`, line endings in string source parts will be
|
||||
* converted to the platform native line-ending as specified by `import { EOL } from 'node:os'`.
|
||||
*/
|
||||
endings?: "native" | "transparent";
|
||||
/** The File content-type. */
|
||||
type?: string;
|
||||
/** The last modified date of the file. `Default`: Date.now(). */
|
||||
lastModified?: number;
|
||||
}
|
||||
/**
|
||||
* A [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) provides information about files.
|
||||
* @since v19.2.0, v18.13.0
|
||||
*/
|
||||
export class File extends Blob {
|
||||
constructor(sources: Array<BinaryLike | Blob>, fileName: string, options?: FileOptions);
|
||||
/**
|
||||
* The name of the `File`.
|
||||
* @since v19.2.0, v18.13.0
|
||||
*/
|
||||
readonly name: string;
|
||||
/**
|
||||
* The last modified date of the `File`.
|
||||
* @since v19.2.0, v18.13.0
|
||||
*/
|
||||
readonly lastModified: number;
|
||||
}
|
||||
export import atob = globalThis.atob;
|
||||
export import btoa = globalThis.btoa;
|
||||
/** @deprecated This alias will be removed in a future version. Use the canonical `BlobPropertyBag` instead. */
|
||||
// TODO: remove in future major
|
||||
export interface BlobOptions extends BlobPropertyBag {}
|
||||
/** @deprecated This alias will be removed in a future version. Use the canonical `FilePropertyBag` instead. */
|
||||
export interface FileOptions extends FilePropertyBag {}
|
||||
export type WithImplicitCoercion<T> =
|
||||
| T
|
||||
| { valueOf(): T }
|
||||
@@ -1879,56 +1769,42 @@ declare module "buffer" {
|
||||
includes(value: string | number | Buffer, encoding: BufferEncoding): boolean;
|
||||
}
|
||||
var Buffer: BufferConstructor;
|
||||
/**
|
||||
* Decodes a string of Base64-encoded data into bytes, and encodes those bytes
|
||||
* into a string using Latin-1 (ISO-8859-1).
|
||||
*
|
||||
* The `data` may be any JavaScript-value that can be coerced into a string.
|
||||
*
|
||||
* **This function is only provided for compatibility with legacy web platform APIs**
|
||||
* **and should never be used in new code, because they use strings to represent**
|
||||
* **binary data and predate the introduction of typed arrays in JavaScript.**
|
||||
* **For code running using Node.js APIs, converting between base64-encoded strings**
|
||||
* **and binary data should be performed using `Buffer.from(str, 'base64')` and `buf.toString('base64')`.**
|
||||
* @since v15.13.0, v14.17.0
|
||||
* @legacy Use `Buffer.from(data, 'base64')` instead.
|
||||
* @param data The Base64-encoded input string.
|
||||
*/
|
||||
function atob(data: string): string;
|
||||
/**
|
||||
* Decodes a string into bytes using Latin-1 (ISO-8859), and encodes those bytes
|
||||
* into a string using Base64.
|
||||
*
|
||||
* The `data` may be any JavaScript-value that can be coerced into a string.
|
||||
*
|
||||
* **This function is only provided for compatibility with legacy web platform APIs**
|
||||
* **and should never be used in new code, because they use strings to represent**
|
||||
* **binary data and predate the introduction of typed arrays in JavaScript.**
|
||||
* **For code running using Node.js APIs, converting between base64-encoded strings**
|
||||
* **and binary data should be performed using `Buffer.from(str, 'base64')` and `buf.toString('base64')`.**
|
||||
* @since v15.13.0, v14.17.0
|
||||
* @legacy Use `buf.toString('base64')` instead.
|
||||
* @param data An ASCII (Latin1) string.
|
||||
*/
|
||||
function btoa(data: string): string;
|
||||
interface Blob extends _Blob {}
|
||||
/**
|
||||
* `Blob` class is a global reference for `import { Blob } from 'node:buffer'`
|
||||
* https://nodejs.org/api/buffer.html#class-blob
|
||||
* @since v18.0.0
|
||||
*/
|
||||
var Blob: typeof globalThis extends { onmessage: any; Blob: infer T } ? T
|
||||
: typeof import("buffer").Blob;
|
||||
interface File extends _File {}
|
||||
/**
|
||||
* `File` class is a global reference for `import { File } from 'node:buffer'`
|
||||
* https://nodejs.org/api/buffer.html#class-file
|
||||
* @since v20.0.0
|
||||
*/
|
||||
var File: typeof globalThis extends { onmessage: any; File: infer T } ? T
|
||||
: typeof import("buffer").File;
|
||||
}
|
||||
// #region web types
|
||||
export type BlobPart = NodeJS.BufferSource | Blob | string;
|
||||
export interface BlobPropertyBag {
|
||||
endings?: "native" | "transparent";
|
||||
type?: string;
|
||||
}
|
||||
export interface FilePropertyBag extends BlobPropertyBag {
|
||||
lastModified?: number;
|
||||
}
|
||||
export interface Blob {
|
||||
readonly size: number;
|
||||
readonly type: string;
|
||||
arrayBuffer(): Promise<ArrayBuffer>;
|
||||
bytes(): Promise<NodeJS.NonSharedUint8Array>;
|
||||
slice(start?: number, end?: number, contentType?: string): Blob;
|
||||
stream(): ReadableStream<NodeJS.NonSharedUint8Array>;
|
||||
text(): Promise<string>;
|
||||
}
|
||||
export var Blob: {
|
||||
prototype: Blob;
|
||||
new(blobParts?: BlobPart[], options?: BlobPropertyBag): Blob;
|
||||
};
|
||||
export interface File extends Blob {
|
||||
readonly lastModified: number;
|
||||
readonly name: string;
|
||||
readonly webkitRelativePath: string;
|
||||
}
|
||||
export var File: {
|
||||
prototype: File;
|
||||
new(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File;
|
||||
};
|
||||
export import atob = globalThis.atob;
|
||||
export import btoa = globalThis.btoa;
|
||||
// #endregion
|
||||
}
|
||||
declare module "node:buffer" {
|
||||
export * from "buffer";
|
||||
declare module "buffer" {
|
||||
export * from "node:buffer";
|
||||
}
|
||||
|
||||
92
backend/node_modules/@types/node/child_process.d.ts
generated
vendored
92
backend/node_modules/@types/node/child_process.d.ts
generated
vendored
@@ -5,6 +5,7 @@
|
||||
*
|
||||
* ```js
|
||||
* import { spawn } from 'node:child_process';
|
||||
* import { once } from 'node:events';
|
||||
* const ls = spawn('ls', ['-lh', '/usr']);
|
||||
*
|
||||
* ls.stdout.on('data', (data) => {
|
||||
@@ -15,9 +16,8 @@
|
||||
* console.error(`stderr: ${data}`);
|
||||
* });
|
||||
*
|
||||
* ls.on('close', (code) => {
|
||||
* console.log(`child process exited with code ${code}`);
|
||||
* });
|
||||
* const [code] = await once(ls, 'close');
|
||||
* console.log(`child process exited with code ${code}`);
|
||||
* ```
|
||||
*
|
||||
* By default, pipes for `stdin`, `stdout`, and `stderr` are established between
|
||||
@@ -63,17 +63,25 @@
|
||||
* For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however,
|
||||
* the synchronous methods can have significant impact on performance due to
|
||||
* stalling the event loop while spawned processes complete.
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/child_process.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/child_process.js)
|
||||
*/
|
||||
declare module "child_process" {
|
||||
declare module "node:child_process" {
|
||||
import { NonSharedBuffer } from "node:buffer";
|
||||
import { Abortable, EventEmitter } from "node:events";
|
||||
import * as dgram from "node:dgram";
|
||||
import { Abortable, EventEmitter, InternalEventEmitter } from "node:events";
|
||||
import * as net from "node:net";
|
||||
import { Readable, Stream, Writable } from "node:stream";
|
||||
import { URL } from "node:url";
|
||||
type Serializable = string | object | number | boolean | bigint;
|
||||
type SendHandle = net.Socket | net.Server | dgram.Socket | undefined;
|
||||
interface ChildProcessEventMap {
|
||||
"close": [code: number | null, signal: NodeJS.Signals | null];
|
||||
"disconnect": [];
|
||||
"error": [err: Error];
|
||||
"exit": [code: number | null, signal: NodeJS.Signals | null];
|
||||
"message": [message: Serializable, sendHandle: SendHandle];
|
||||
"spawn": [];
|
||||
}
|
||||
/**
|
||||
* Instances of the `ChildProcess` represent spawned child processes.
|
||||
*
|
||||
@@ -82,7 +90,7 @@ declare module "child_process" {
|
||||
* instances of `ChildProcess`.
|
||||
* @since v2.2.0
|
||||
*/
|
||||
class ChildProcess extends EventEmitter {
|
||||
class ChildProcess implements EventEmitter {
|
||||
/**
|
||||
* A `Writable Stream` that represents the child process's `stdin`.
|
||||
*
|
||||
@@ -458,7 +466,7 @@ declare module "child_process" {
|
||||
* as the connection may have been closed during the time it takes to send the
|
||||
* connection to the child.
|
||||
* @since v0.5.9
|
||||
* @param sendHandle `undefined`, or a [`net.Socket`](https://nodejs.org/docs/latest-v24.x/api/net.html#class-netsocket), [`net.Server`](https://nodejs.org/docs/latest-v24.x/api/net.html#class-netserver), or [`dgram.Socket`](https://nodejs.org/docs/latest-v24.x/api/dgram.html#class-dgramsocket) object.
|
||||
* @param sendHandle `undefined`, or a [`net.Socket`](https://nodejs.org/docs/latest-v25.x/api/net.html#class-netsocket), [`net.Server`](https://nodejs.org/docs/latest-v25.x/api/net.html#class-netserver), or [`dgram.Socket`](https://nodejs.org/docs/latest-v25.x/api/dgram.html#class-dgramsocket) object.
|
||||
* @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties:
|
||||
*/
|
||||
send(message: Serializable, callback?: (error: Error | null) => void): boolean;
|
||||
@@ -524,64 +532,8 @@ declare module "child_process" {
|
||||
* @since v0.7.10
|
||||
*/
|
||||
ref(): void;
|
||||
/**
|
||||
* events.EventEmitter
|
||||
* 1. close
|
||||
* 2. disconnect
|
||||
* 3. error
|
||||
* 4. exit
|
||||
* 5. message
|
||||
* 6. spawn
|
||||
*/
|
||||
addListener(event: string, listener: (...args: any[]) => void): this;
|
||||
addListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
|
||||
addListener(event: "disconnect", listener: () => void): this;
|
||||
addListener(event: "error", listener: (err: Error) => void): this;
|
||||
addListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
|
||||
addListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
|
||||
addListener(event: "spawn", listener: () => void): this;
|
||||
emit(event: string | symbol, ...args: any[]): boolean;
|
||||
emit(event: "close", code: number | null, signal: NodeJS.Signals | null): boolean;
|
||||
emit(event: "disconnect"): boolean;
|
||||
emit(event: "error", err: Error): boolean;
|
||||
emit(event: "exit", code: number | null, signal: NodeJS.Signals | null): boolean;
|
||||
emit(event: "message", message: Serializable, sendHandle: SendHandle): boolean;
|
||||
emit(event: "spawn", listener: () => void): boolean;
|
||||
on(event: string, listener: (...args: any[]) => void): this;
|
||||
on(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
|
||||
on(event: "disconnect", listener: () => void): this;
|
||||
on(event: "error", listener: (err: Error) => void): this;
|
||||
on(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
|
||||
on(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
|
||||
on(event: "spawn", listener: () => void): this;
|
||||
once(event: string, listener: (...args: any[]) => void): this;
|
||||
once(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
|
||||
once(event: "disconnect", listener: () => void): this;
|
||||
once(event: "error", listener: (err: Error) => void): this;
|
||||
once(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
|
||||
once(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
|
||||
once(event: "spawn", listener: () => void): this;
|
||||
prependListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
|
||||
prependListener(event: "disconnect", listener: () => void): this;
|
||||
prependListener(event: "error", listener: (err: Error) => void): this;
|
||||
prependListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
|
||||
prependListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
|
||||
prependListener(event: "spawn", listener: () => void): this;
|
||||
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener(
|
||||
event: "close",
|
||||
listener: (code: number | null, signal: NodeJS.Signals | null) => void,
|
||||
): this;
|
||||
prependOnceListener(event: "disconnect", listener: () => void): this;
|
||||
prependOnceListener(event: "error", listener: (err: Error) => void): this;
|
||||
prependOnceListener(
|
||||
event: "exit",
|
||||
listener: (code: number | null, signal: NodeJS.Signals | null) => void,
|
||||
): this;
|
||||
prependOnceListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
|
||||
prependOnceListener(event: "spawn", listener: () => void): this;
|
||||
}
|
||||
interface ChildProcess extends InternalEventEmitter<ChildProcessEventMap> {}
|
||||
// return this object when stdio option is undefined or not specified
|
||||
interface ChildProcessWithoutNullStreams extends ChildProcess {
|
||||
stdin: Writable;
|
||||
@@ -719,6 +671,7 @@ declare module "child_process" {
|
||||
*
|
||||
* ```js
|
||||
* import { spawn } from 'node:child_process';
|
||||
* import { once } from 'node:events';
|
||||
* const ls = spawn('ls', ['-lh', '/usr']);
|
||||
*
|
||||
* ls.stdout.on('data', (data) => {
|
||||
@@ -729,9 +682,8 @@ declare module "child_process" {
|
||||
* console.error(`stderr: ${data}`);
|
||||
* });
|
||||
*
|
||||
* ls.on('close', (code) => {
|
||||
* console.log(`child process exited with code ${code}`);
|
||||
* });
|
||||
* const [code] = await once(ls, 'close');
|
||||
* console.log(`child process exited with code ${code}`);
|
||||
* ```
|
||||
*
|
||||
* Example: A very elaborate way to run `ps ax | grep ssh`
|
||||
@@ -1471,6 +1423,6 @@ declare module "child_process" {
|
||||
options?: ExecFileSyncOptions,
|
||||
): string | NonSharedBuffer;
|
||||
}
|
||||
declare module "node:child_process" {
|
||||
export * from "child_process";
|
||||
declare module "child_process" {
|
||||
export * from "node:child_process";
|
||||
}
|
||||
|
||||
572
backend/node_modules/@types/node/cluster.d.ts
generated
vendored
572
backend/node_modules/@types/node/cluster.d.ts
generated
vendored
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Clusters of Node.js processes can be used to run multiple instances of Node.js
|
||||
* that can distribute workloads among their application threads. When process isolation
|
||||
* is not needed, use the [`worker_threads`](https://nodejs.org/docs/latest-v24.x/api/worker_threads.html)
|
||||
* is not needed, use the [`worker_threads`](https://nodejs.org/docs/latest-v25.x/api/worker_threads.html)
|
||||
* module instead, which allows running multiple application threads within a single Node.js instance.
|
||||
*
|
||||
* The cluster module allows easy creation of child processes that all share
|
||||
@@ -50,90 +50,13 @@
|
||||
* ```
|
||||
*
|
||||
* On Windows, it is not yet possible to set up a named pipe server in a worker.
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/cluster.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/cluster.js)
|
||||
*/
|
||||
declare module "cluster" {
|
||||
import * as child from "node:child_process";
|
||||
import EventEmitter = require("node:events");
|
||||
import * as net from "node:net";
|
||||
type SerializationType = "json" | "advanced";
|
||||
export interface ClusterSettings {
|
||||
/**
|
||||
* List of string arguments passed to the Node.js executable.
|
||||
* @default process.execArgv
|
||||
*/
|
||||
execArgv?: string[] | undefined;
|
||||
/**
|
||||
* File path to worker file.
|
||||
* @default process.argv[1]
|
||||
*/
|
||||
exec?: string | undefined;
|
||||
/**
|
||||
* String arguments passed to worker.
|
||||
* @default process.argv.slice(2)
|
||||
*/
|
||||
args?: readonly string[] | undefined;
|
||||
/**
|
||||
* Whether or not to send output to parent's stdio.
|
||||
* @default false
|
||||
*/
|
||||
silent?: boolean | undefined;
|
||||
/**
|
||||
* Configures the stdio of forked processes. Because the cluster module relies on IPC to function, this configuration must
|
||||
* contain an `'ipc'` entry. When this option is provided, it overrides `silent`. See [`child_prcess.spawn()`](https://nodejs.org/docs/latest-v24.x/api/child_process.html#child_processspawncommand-args-options)'s
|
||||
* [`stdio`](https://nodejs.org/docs/latest-v24.x/api/child_process.html#optionsstdio).
|
||||
*/
|
||||
stdio?: any[] | undefined;
|
||||
/**
|
||||
* Sets the user identity of the process. (See [`setuid(2)`](https://man7.org/linux/man-pages/man2/setuid.2.html).)
|
||||
*/
|
||||
uid?: number | undefined;
|
||||
/**
|
||||
* Sets the group identity of the process. (See [`setgid(2)`](https://man7.org/linux/man-pages/man2/setgid.2.html).)
|
||||
*/
|
||||
gid?: number | undefined;
|
||||
/**
|
||||
* Sets inspector port of worker. This can be a number, or a function that takes no arguments and returns a number.
|
||||
* By default each worker gets its own port, incremented from the primary's `process.debugPort`.
|
||||
*/
|
||||
inspectPort?: number | (() => number) | undefined;
|
||||
/**
|
||||
* Specify the kind of serialization used for sending messages between processes. Possible values are `'json'` and `'advanced'`.
|
||||
* See [Advanced serialization for `child_process`](https://nodejs.org/docs/latest-v24.x/api/child_process.html#advanced-serialization) for more details.
|
||||
* @default false
|
||||
*/
|
||||
serialization?: SerializationType | undefined;
|
||||
/**
|
||||
* Current working directory of the worker process.
|
||||
* @default undefined (inherits from parent process)
|
||||
*/
|
||||
cwd?: string | undefined;
|
||||
/**
|
||||
* Hide the forked processes console window that would normally be created on Windows systems.
|
||||
* @default false
|
||||
*/
|
||||
windowsHide?: boolean | undefined;
|
||||
}
|
||||
export interface Address {
|
||||
address: string;
|
||||
port: number;
|
||||
/**
|
||||
* The `addressType` is one of:
|
||||
*
|
||||
* * `4` (TCPv4)
|
||||
* * `6` (TCPv6)
|
||||
* * `-1` (Unix domain socket)
|
||||
* * `'udp4'` or `'udp6'` (UDPv4 or UDPv6)
|
||||
*/
|
||||
addressType: 4 | 6 | -1 | "udp4" | "udp6";
|
||||
}
|
||||
/**
|
||||
* A `Worker` object contains all public information and method about a worker.
|
||||
* In the primary it can be obtained using `cluster.workers`. In a worker
|
||||
* it can be obtained using `cluster.worker`.
|
||||
* @since v0.7.0
|
||||
*/
|
||||
export class Worker extends EventEmitter {
|
||||
declare module "node:cluster" {
|
||||
import * as child_process from "node:child_process";
|
||||
import { EventEmitter, InternalEventEmitter } from "node:events";
|
||||
class Worker implements EventEmitter {
|
||||
constructor(options?: cluster.WorkerOptions);
|
||||
/**
|
||||
* Each new worker is given its own unique id, this id is stored in the `id`.
|
||||
*
|
||||
@@ -142,21 +65,21 @@ declare module "cluster" {
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* All workers are created using [`child_process.fork()`](https://nodejs.org/docs/latest-v24.x/api/child_process.html#child_processforkmodulepath-args-options), the returned object
|
||||
* All workers are created using [`child_process.fork()`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#child_processforkmodulepath-args-options), the returned object
|
||||
* from this function is stored as `.process`. In a worker, the global `process` is stored.
|
||||
*
|
||||
* See: [Child Process module](https://nodejs.org/docs/latest-v24.x/api/child_process.html#child_processforkmodulepath-args-options).
|
||||
* See: [Child Process module](https://nodejs.org/docs/latest-v25.x/api/child_process.html#child_processforkmodulepath-args-options).
|
||||
*
|
||||
* Workers will call `process.exit(0)` if the `'disconnect'` event occurs
|
||||
* on `process` and `.exitedAfterDisconnect` is not `true`. This protects against
|
||||
* accidental disconnection.
|
||||
* @since v0.7.0
|
||||
*/
|
||||
process: child.ChildProcess;
|
||||
process: child_process.ChildProcess;
|
||||
/**
|
||||
* Send a message to a worker or primary, optionally with a handle.
|
||||
*
|
||||
* In the primary, this sends a message to a specific worker. It is identical to [`ChildProcess.send()`](https://nodejs.org/docs/latest-v24.x/api/child_process.html#subprocesssendmessage-sendhandle-options-callback).
|
||||
* In the primary, this sends a message to a specific worker. It is identical to [`ChildProcess.send()`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#subprocesssendmessage-sendhandle-options-callback).
|
||||
*
|
||||
* In a worker, this sends a message to the primary. It is identical to `process.send()`.
|
||||
*
|
||||
@@ -176,16 +99,16 @@ declare module "cluster" {
|
||||
* @since v0.7.0
|
||||
* @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles.
|
||||
*/
|
||||
send(message: child.Serializable, callback?: (error: Error | null) => void): boolean;
|
||||
send(message: child_process.Serializable, callback?: (error: Error | null) => void): boolean;
|
||||
send(
|
||||
message: child.Serializable,
|
||||
sendHandle: child.SendHandle,
|
||||
message: child_process.Serializable,
|
||||
sendHandle: child_process.SendHandle,
|
||||
callback?: (error: Error | null) => void,
|
||||
): boolean;
|
||||
send(
|
||||
message: child.Serializable,
|
||||
sendHandle: child.SendHandle,
|
||||
options?: child.MessageOptions,
|
||||
message: child_process.Serializable,
|
||||
sendHandle: child_process.SendHandle,
|
||||
options?: child_process.MessageOptions,
|
||||
callback?: (error: Error | null) => void,
|
||||
): boolean;
|
||||
/**
|
||||
@@ -198,7 +121,7 @@ declare module "cluster" {
|
||||
* This method is aliased as `worker.destroy()` for backwards compatibility.
|
||||
*
|
||||
* In a worker, `process.kill()` exists, but it is not this function;
|
||||
* it is [`kill()`](https://nodejs.org/docs/latest-v24.x/api/process.html#processkillpid-signal).
|
||||
* it is [`kill()`](https://nodejs.org/docs/latest-v25.x/api/process.html#processkillpid-signal).
|
||||
* @since v0.9.12
|
||||
* @param [signal='SIGTERM'] Name of the kill signal to send to the worker process.
|
||||
*/
|
||||
@@ -335,244 +258,229 @@ declare module "cluster" {
|
||||
* @since v6.0.0
|
||||
*/
|
||||
exitedAfterDisconnect: boolean;
|
||||
/**
|
||||
* events.EventEmitter
|
||||
* 1. disconnect
|
||||
* 2. error
|
||||
* 3. exit
|
||||
* 4. listening
|
||||
* 5. message
|
||||
* 6. online
|
||||
*/
|
||||
addListener(event: string, listener: (...args: any[]) => void): this;
|
||||
addListener(event: "disconnect", listener: () => void): this;
|
||||
addListener(event: "error", listener: (error: Error) => void): this;
|
||||
addListener(event: "exit", listener: (code: number, signal: string) => void): this;
|
||||
addListener(event: "listening", listener: (address: Address) => void): this;
|
||||
addListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
|
||||
addListener(event: "online", listener: () => void): this;
|
||||
emit(event: string | symbol, ...args: any[]): boolean;
|
||||
emit(event: "disconnect"): boolean;
|
||||
emit(event: "error", error: Error): boolean;
|
||||
emit(event: "exit", code: number, signal: string): boolean;
|
||||
emit(event: "listening", address: Address): boolean;
|
||||
emit(event: "message", message: any, handle: net.Socket | net.Server): boolean;
|
||||
emit(event: "online"): boolean;
|
||||
on(event: string, listener: (...args: any[]) => void): this;
|
||||
on(event: "disconnect", listener: () => void): this;
|
||||
on(event: "error", listener: (error: Error) => void): this;
|
||||
on(event: "exit", listener: (code: number, signal: string) => void): this;
|
||||
on(event: "listening", listener: (address: Address) => void): this;
|
||||
on(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
|
||||
on(event: "online", listener: () => void): this;
|
||||
once(event: string, listener: (...args: any[]) => void): this;
|
||||
once(event: "disconnect", listener: () => void): this;
|
||||
once(event: "error", listener: (error: Error) => void): this;
|
||||
once(event: "exit", listener: (code: number, signal: string) => void): this;
|
||||
once(event: "listening", listener: (address: Address) => void): this;
|
||||
once(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
|
||||
once(event: "online", listener: () => void): this;
|
||||
prependListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependListener(event: "disconnect", listener: () => void): this;
|
||||
prependListener(event: "error", listener: (error: Error) => void): this;
|
||||
prependListener(event: "exit", listener: (code: number, signal: string) => void): this;
|
||||
prependListener(event: "listening", listener: (address: Address) => void): this;
|
||||
prependListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
|
||||
prependListener(event: "online", listener: () => void): this;
|
||||
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener(event: "disconnect", listener: () => void): this;
|
||||
prependOnceListener(event: "error", listener: (error: Error) => void): this;
|
||||
prependOnceListener(event: "exit", listener: (code: number, signal: string) => void): this;
|
||||
prependOnceListener(event: "listening", listener: (address: Address) => void): this;
|
||||
prependOnceListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
|
||||
prependOnceListener(event: "online", listener: () => void): this;
|
||||
}
|
||||
export interface Cluster extends EventEmitter {
|
||||
disconnect(callback?: () => void): void;
|
||||
/**
|
||||
* Spawn a new worker process.
|
||||
*
|
||||
* This can only be called from the primary process.
|
||||
* @param env Key/value pairs to add to worker process environment.
|
||||
* @since v0.6.0
|
||||
*/
|
||||
fork(env?: any): Worker;
|
||||
/** @deprecated since v16.0.0 - use isPrimary. */
|
||||
readonly isMaster: boolean;
|
||||
/**
|
||||
* True if the process is a primary. This is determined by the `process.env.NODE_UNIQUE_ID`. If `process.env.NODE_UNIQUE_ID`
|
||||
* is undefined, then `isPrimary` is `true`.
|
||||
* @since v16.0.0
|
||||
*/
|
||||
readonly isPrimary: boolean;
|
||||
/**
|
||||
* True if the process is not a primary (it is the negation of `cluster.isPrimary`).
|
||||
* @since v0.6.0
|
||||
*/
|
||||
readonly isWorker: boolean;
|
||||
/**
|
||||
* The scheduling policy, either `cluster.SCHED_RR` for round-robin or `cluster.SCHED_NONE` to leave it to the operating system. This is a
|
||||
* global setting and effectively frozen once either the first worker is spawned, or [`.setupPrimary()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clustersetupprimarysettings)
|
||||
* is called, whichever comes first.
|
||||
*
|
||||
* `SCHED_RR` is the default on all operating systems except Windows. Windows will change to `SCHED_RR` once libuv is able to effectively distribute
|
||||
* IOCP handles without incurring a large performance hit.
|
||||
*
|
||||
* `cluster.schedulingPolicy` can also be set through the `NODE_CLUSTER_SCHED_POLICY` environment variable. Valid values are `'rr'` and `'none'`.
|
||||
* @since v0.11.2
|
||||
*/
|
||||
schedulingPolicy: number;
|
||||
/**
|
||||
* After calling [`.setupPrimary()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clustersetupprimarysettings)
|
||||
* (or [`.fork()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clusterforkenv)) this settings object will contain
|
||||
* the settings, including the default values.
|
||||
*
|
||||
* This object is not intended to be changed or set manually.
|
||||
* @since v0.7.1
|
||||
*/
|
||||
readonly settings: ClusterSettings;
|
||||
/** @deprecated since v16.0.0 - use [`.setupPrimary()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clustersetupprimarysettings) instead. */
|
||||
setupMaster(settings?: ClusterSettings): void;
|
||||
/**
|
||||
* `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in `cluster.settings`.
|
||||
*
|
||||
* Any settings changes only affect future calls to [`.fork()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clusterforkenv)
|
||||
* and have no effect on workers that are already running.
|
||||
*
|
||||
* The only attribute of a worker that cannot be set via `.setupPrimary()` is the `env` passed to
|
||||
* [`.fork()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clusterforkenv).
|
||||
*
|
||||
* The defaults above apply to the first call only; the defaults for later calls are the current values at the time of
|
||||
* `cluster.setupPrimary()` is called.
|
||||
*
|
||||
* ```js
|
||||
* import cluster from 'node:cluster';
|
||||
*
|
||||
* cluster.setupPrimary({
|
||||
* exec: 'worker.js',
|
||||
* args: ['--use', 'https'],
|
||||
* silent: true,
|
||||
* });
|
||||
* cluster.fork(); // https worker
|
||||
* cluster.setupPrimary({
|
||||
* exec: 'worker.js',
|
||||
* args: ['--use', 'http'],
|
||||
* });
|
||||
* cluster.fork(); // http worker
|
||||
* ```
|
||||
*
|
||||
* This can only be called from the primary process.
|
||||
* @since v16.0.0
|
||||
*/
|
||||
setupPrimary(settings?: ClusterSettings): void;
|
||||
/**
|
||||
* A reference to the current worker object. Not available in the primary process.
|
||||
*
|
||||
* ```js
|
||||
* import cluster from 'node:cluster';
|
||||
*
|
||||
* if (cluster.isPrimary) {
|
||||
* console.log('I am primary');
|
||||
* cluster.fork();
|
||||
* cluster.fork();
|
||||
* } else if (cluster.isWorker) {
|
||||
* console.log(`I am worker #${cluster.worker.id}`);
|
||||
* }
|
||||
* ```
|
||||
* @since v0.7.0
|
||||
*/
|
||||
readonly worker?: Worker;
|
||||
/**
|
||||
* A hash that stores the active worker objects, keyed by `id` field. This makes it easy to loop through all the workers. It is only available in the primary process.
|
||||
*
|
||||
* A worker is removed from `cluster.workers` after the worker has disconnected _and_ exited. The order between these two events cannot be determined in advance. However, it
|
||||
* is guaranteed that the removal from the `cluster.workers` list happens before the last `'disconnect'` or `'exit'` event is emitted.
|
||||
*
|
||||
* ```js
|
||||
* import cluster from 'node:cluster';
|
||||
*
|
||||
* for (const worker of Object.values(cluster.workers)) {
|
||||
* worker.send('big announcement to all workers');
|
||||
* }
|
||||
* ```
|
||||
* @since v0.7.0
|
||||
*/
|
||||
readonly workers?: NodeJS.Dict<Worker>;
|
||||
readonly SCHED_NONE: number;
|
||||
readonly SCHED_RR: number;
|
||||
/**
|
||||
* events.EventEmitter
|
||||
* 1. disconnect
|
||||
* 2. exit
|
||||
* 3. fork
|
||||
* 4. listening
|
||||
* 5. message
|
||||
* 6. online
|
||||
* 7. setup
|
||||
*/
|
||||
addListener(event: string, listener: (...args: any[]) => void): this;
|
||||
addListener(event: "disconnect", listener: (worker: Worker) => void): this;
|
||||
addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
|
||||
addListener(event: "fork", listener: (worker: Worker) => void): this;
|
||||
addListener(event: "listening", listener: (worker: Worker, address: Address) => void): this;
|
||||
addListener(
|
||||
event: "message",
|
||||
listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void,
|
||||
): this; // the handle is a net.Socket or net.Server object, or undefined.
|
||||
addListener(event: "online", listener: (worker: Worker) => void): this;
|
||||
addListener(event: "setup", listener: (settings: ClusterSettings) => void): this;
|
||||
emit(event: string | symbol, ...args: any[]): boolean;
|
||||
emit(event: "disconnect", worker: Worker): boolean;
|
||||
emit(event: "exit", worker: Worker, code: number, signal: string): boolean;
|
||||
emit(event: "fork", worker: Worker): boolean;
|
||||
emit(event: "listening", worker: Worker, address: Address): boolean;
|
||||
emit(event: "message", worker: Worker, message: any, handle: net.Socket | net.Server): boolean;
|
||||
emit(event: "online", worker: Worker): boolean;
|
||||
emit(event: "setup", settings: ClusterSettings): boolean;
|
||||
on(event: string, listener: (...args: any[]) => void): this;
|
||||
on(event: "disconnect", listener: (worker: Worker) => void): this;
|
||||
on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
|
||||
on(event: "fork", listener: (worker: Worker) => void): this;
|
||||
on(event: "listening", listener: (worker: Worker, address: Address) => void): this;
|
||||
on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
|
||||
on(event: "online", listener: (worker: Worker) => void): this;
|
||||
on(event: "setup", listener: (settings: ClusterSettings) => void): this;
|
||||
once(event: string, listener: (...args: any[]) => void): this;
|
||||
once(event: "disconnect", listener: (worker: Worker) => void): this;
|
||||
once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
|
||||
once(event: "fork", listener: (worker: Worker) => void): this;
|
||||
once(event: "listening", listener: (worker: Worker, address: Address) => void): this;
|
||||
once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
|
||||
once(event: "online", listener: (worker: Worker) => void): this;
|
||||
once(event: "setup", listener: (settings: ClusterSettings) => void): this;
|
||||
prependListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependListener(event: "disconnect", listener: (worker: Worker) => void): this;
|
||||
prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
|
||||
prependListener(event: "fork", listener: (worker: Worker) => void): this;
|
||||
prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): this;
|
||||
prependListener(
|
||||
event: "message",
|
||||
listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void,
|
||||
): this;
|
||||
prependListener(event: "online", listener: (worker: Worker) => void): this;
|
||||
prependListener(event: "setup", listener: (settings: ClusterSettings) => void): this;
|
||||
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): this;
|
||||
prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
|
||||
prependOnceListener(event: "fork", listener: (worker: Worker) => void): this;
|
||||
prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): this;
|
||||
// the handle is a net.Socket or net.Server object, or undefined.
|
||||
prependOnceListener(
|
||||
event: "message",
|
||||
listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void,
|
||||
): this;
|
||||
prependOnceListener(event: "online", listener: (worker: Worker) => void): this;
|
||||
prependOnceListener(event: "setup", listener: (settings: ClusterSettings) => void): this;
|
||||
interface Worker extends InternalEventEmitter<cluster.WorkerEventMap> {}
|
||||
type _Worker = Worker;
|
||||
namespace cluster {
|
||||
interface Worker extends _Worker {}
|
||||
interface WorkerOptions {
|
||||
id?: number | undefined;
|
||||
process?: child_process.ChildProcess | undefined;
|
||||
state?: string | undefined;
|
||||
}
|
||||
interface WorkerEventMap {
|
||||
"disconnect": [];
|
||||
"error": [error: Error];
|
||||
"exit": [code: number, signal: string];
|
||||
"listening": [address: Address];
|
||||
"message": [message: any, handle: child_process.SendHandle];
|
||||
"online": [];
|
||||
}
|
||||
interface ClusterSettings {
|
||||
/**
|
||||
* List of string arguments passed to the Node.js executable.
|
||||
* @default process.execArgv
|
||||
*/
|
||||
execArgv?: string[] | undefined;
|
||||
/**
|
||||
* File path to worker file.
|
||||
* @default process.argv[1]
|
||||
*/
|
||||
exec?: string | undefined;
|
||||
/**
|
||||
* String arguments passed to worker.
|
||||
* @default process.argv.slice(2)
|
||||
*/
|
||||
args?: readonly string[] | undefined;
|
||||
/**
|
||||
* Whether or not to send output to parent's stdio.
|
||||
* @default false
|
||||
*/
|
||||
silent?: boolean | undefined;
|
||||
/**
|
||||
* Configures the stdio of forked processes. Because the cluster module relies on IPC to function, this configuration must
|
||||
* contain an `'ipc'` entry. When this option is provided, it overrides `silent`. See [`child_prcess.spawn()`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#child_processspawncommand-args-options)'s
|
||||
* [`stdio`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#optionsstdio).
|
||||
*/
|
||||
stdio?: any[] | undefined;
|
||||
/**
|
||||
* Sets the user identity of the process. (See [`setuid(2)`](https://man7.org/linux/man-pages/man2/setuid.2.html).)
|
||||
*/
|
||||
uid?: number | undefined;
|
||||
/**
|
||||
* Sets the group identity of the process. (See [`setgid(2)`](https://man7.org/linux/man-pages/man2/setgid.2.html).)
|
||||
*/
|
||||
gid?: number | undefined;
|
||||
/**
|
||||
* Sets inspector port of worker. This can be a number, or a function that takes no arguments and returns a number.
|
||||
* By default each worker gets its own port, incremented from the primary's `process.debugPort`.
|
||||
*/
|
||||
inspectPort?: number | (() => number) | undefined;
|
||||
/**
|
||||
* Specify the kind of serialization used for sending messages between processes. Possible values are `'json'` and `'advanced'`.
|
||||
* See [Advanced serialization for `child_process`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#advanced-serialization) for more details.
|
||||
* @default false
|
||||
*/
|
||||
serialization?: "json" | "advanced" | undefined;
|
||||
/**
|
||||
* Current working directory of the worker process.
|
||||
* @default undefined (inherits from parent process)
|
||||
*/
|
||||
cwd?: string | undefined;
|
||||
/**
|
||||
* Hide the forked processes console window that would normally be created on Windows systems.
|
||||
* @default false
|
||||
*/
|
||||
windowsHide?: boolean | undefined;
|
||||
}
|
||||
interface Address {
|
||||
address: string;
|
||||
port: number;
|
||||
/**
|
||||
* The `addressType` is one of:
|
||||
*
|
||||
* * `4` (TCPv4)
|
||||
* * `6` (TCPv6)
|
||||
* * `-1` (Unix domain socket)
|
||||
* * `'udp4'` or `'udp6'` (UDPv4 or UDPv6)
|
||||
*/
|
||||
addressType: 4 | 6 | -1 | "udp4" | "udp6";
|
||||
}
|
||||
interface ClusterEventMap {
|
||||
"disconnect": [worker: Worker];
|
||||
"exit": [worker: Worker, code: number, signal: string];
|
||||
"fork": [worker: Worker];
|
||||
"listening": [worker: Worker, address: Address];
|
||||
"message": [worker: Worker, message: any, handle: child_process.SendHandle];
|
||||
"online": [worker: Worker];
|
||||
"setup": [settings: ClusterSettings];
|
||||
}
|
||||
interface Cluster extends InternalEventEmitter<ClusterEventMap> {
|
||||
/**
|
||||
* A `Worker` object contains all public information and method about a worker.
|
||||
* In the primary it can be obtained using `cluster.workers`. In a worker
|
||||
* it can be obtained using `cluster.worker`.
|
||||
* @since v0.7.0
|
||||
*/
|
||||
Worker: typeof Worker;
|
||||
disconnect(callback?: () => void): void;
|
||||
/**
|
||||
* Spawn a new worker process.
|
||||
*
|
||||
* This can only be called from the primary process.
|
||||
* @param env Key/value pairs to add to worker process environment.
|
||||
* @since v0.6.0
|
||||
*/
|
||||
fork(env?: any): Worker;
|
||||
/** @deprecated since v16.0.0 - use isPrimary. */
|
||||
readonly isMaster: boolean;
|
||||
/**
|
||||
* True if the process is a primary. This is determined by the `process.env.NODE_UNIQUE_ID`. If `process.env.NODE_UNIQUE_ID`
|
||||
* is undefined, then `isPrimary` is `true`.
|
||||
* @since v16.0.0
|
||||
*/
|
||||
readonly isPrimary: boolean;
|
||||
/**
|
||||
* True if the process is not a primary (it is the negation of `cluster.isPrimary`).
|
||||
* @since v0.6.0
|
||||
*/
|
||||
readonly isWorker: boolean;
|
||||
/**
|
||||
* The scheduling policy, either `cluster.SCHED_RR` for round-robin or `cluster.SCHED_NONE` to leave it to the operating system. This is a
|
||||
* global setting and effectively frozen once either the first worker is spawned, or [`.setupPrimary()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clustersetupprimarysettings)
|
||||
* is called, whichever comes first.
|
||||
*
|
||||
* `SCHED_RR` is the default on all operating systems except Windows. Windows will change to `SCHED_RR` once libuv is able to effectively distribute
|
||||
* IOCP handles without incurring a large performance hit.
|
||||
*
|
||||
* `cluster.schedulingPolicy` can also be set through the `NODE_CLUSTER_SCHED_POLICY` environment variable. Valid values are `'rr'` and `'none'`.
|
||||
* @since v0.11.2
|
||||
*/
|
||||
schedulingPolicy: number;
|
||||
/**
|
||||
* After calling [`.setupPrimary()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clustersetupprimarysettings)
|
||||
* (or [`.fork()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clusterforkenv)) this settings object will contain
|
||||
* the settings, including the default values.
|
||||
*
|
||||
* This object is not intended to be changed or set manually.
|
||||
* @since v0.7.1
|
||||
*/
|
||||
readonly settings: ClusterSettings;
|
||||
/** @deprecated since v16.0.0 - use [`.setupPrimary()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clustersetupprimarysettings) instead. */
|
||||
setupMaster(settings?: ClusterSettings): void;
|
||||
/**
|
||||
* `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in `cluster.settings`.
|
||||
*
|
||||
* Any settings changes only affect future calls to [`.fork()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clusterforkenv)
|
||||
* and have no effect on workers that are already running.
|
||||
*
|
||||
* The only attribute of a worker that cannot be set via `.setupPrimary()` is the `env` passed to
|
||||
* [`.fork()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clusterforkenv).
|
||||
*
|
||||
* The defaults above apply to the first call only; the defaults for later calls are the current values at the time of
|
||||
* `cluster.setupPrimary()` is called.
|
||||
*
|
||||
* ```js
|
||||
* import cluster from 'node:cluster';
|
||||
*
|
||||
* cluster.setupPrimary({
|
||||
* exec: 'worker.js',
|
||||
* args: ['--use', 'https'],
|
||||
* silent: true,
|
||||
* });
|
||||
* cluster.fork(); // https worker
|
||||
* cluster.setupPrimary({
|
||||
* exec: 'worker.js',
|
||||
* args: ['--use', 'http'],
|
||||
* });
|
||||
* cluster.fork(); // http worker
|
||||
* ```
|
||||
*
|
||||
* This can only be called from the primary process.
|
||||
* @since v16.0.0
|
||||
*/
|
||||
setupPrimary(settings?: ClusterSettings): void;
|
||||
/**
|
||||
* A reference to the current worker object. Not available in the primary process.
|
||||
*
|
||||
* ```js
|
||||
* import cluster from 'node:cluster';
|
||||
*
|
||||
* if (cluster.isPrimary) {
|
||||
* console.log('I am primary');
|
||||
* cluster.fork();
|
||||
* cluster.fork();
|
||||
* } else if (cluster.isWorker) {
|
||||
* console.log(`I am worker #${cluster.worker.id}`);
|
||||
* }
|
||||
* ```
|
||||
* @since v0.7.0
|
||||
*/
|
||||
readonly worker?: Worker;
|
||||
/**
|
||||
* A hash that stores the active worker objects, keyed by `id` field. This makes it easy to loop through all the workers. It is only available in the primary process.
|
||||
*
|
||||
* A worker is removed from `cluster.workers` after the worker has disconnected _and_ exited. The order between these two events cannot be determined in advance. However, it
|
||||
* is guaranteed that the removal from the `cluster.workers` list happens before the last `'disconnect'` or `'exit'` event is emitted.
|
||||
*
|
||||
* ```js
|
||||
* import cluster from 'node:cluster';
|
||||
*
|
||||
* for (const worker of Object.values(cluster.workers)) {
|
||||
* worker.send('big announcement to all workers');
|
||||
* }
|
||||
* ```
|
||||
* @since v0.7.0
|
||||
*/
|
||||
readonly workers?: NodeJS.Dict<Worker>;
|
||||
readonly SCHED_NONE: number;
|
||||
readonly SCHED_RR: number;
|
||||
}
|
||||
}
|
||||
const cluster: Cluster;
|
||||
export default cluster;
|
||||
var cluster: cluster.Cluster;
|
||||
export = cluster;
|
||||
}
|
||||
declare module "node:cluster" {
|
||||
export * from "cluster";
|
||||
export { default as default } from "cluster";
|
||||
declare module "cluster" {
|
||||
import cluster = require("node:cluster");
|
||||
export = cluster;
|
||||
}
|
||||
|
||||
410
backend/node_modules/@types/node/console.d.ts
generated
vendored
410
backend/node_modules/@types/node/console.d.ts
generated
vendored
@@ -5,12 +5,12 @@
|
||||
* The module exports two specific components:
|
||||
*
|
||||
* * A `Console` class with methods such as `console.log()`, `console.error()`, and `console.warn()` that can be used to write to any Node.js stream.
|
||||
* * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdout) and
|
||||
* [`process.stderr`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module.
|
||||
* * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v25.x/api/process.html#processstdout) and
|
||||
* [`process.stderr`](https://nodejs.org/docs/latest-v25.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module.
|
||||
*
|
||||
* _**Warning**_: The global console object's methods are neither consistently
|
||||
* synchronous like the browser APIs they resemble, nor are they consistently
|
||||
* asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v24.x/api/process.html#a-note-on-process-io) for
|
||||
* asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v25.x/api/process.html#a-note-on-process-io) for
|
||||
* more information.
|
||||
*
|
||||
* Example using the global `console`:
|
||||
@@ -54,276 +54,63 @@
|
||||
* myConsole.warn(`Danger ${name}! Danger!`);
|
||||
* // Prints: Danger Will Robinson! Danger!, to err
|
||||
* ```
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/console.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/console.js)
|
||||
*/
|
||||
declare module "console" {
|
||||
import console = require("node:console");
|
||||
export = console;
|
||||
}
|
||||
declare module "node:console" {
|
||||
import { InspectOptions } from "node:util";
|
||||
global {
|
||||
// This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build
|
||||
namespace console {
|
||||
interface ConsoleOptions {
|
||||
stdout: NodeJS.WritableStream;
|
||||
stderr?: NodeJS.WritableStream | undefined;
|
||||
/**
|
||||
* Ignore errors when writing to the underlying streams.
|
||||
* @default true
|
||||
*/
|
||||
ignoreErrors?: boolean | undefined;
|
||||
/**
|
||||
* Set color support for this `Console` instance. Setting to true enables coloring while inspecting
|
||||
* values. Setting to `false` disables coloring while inspecting values. Setting to `'auto'` makes color
|
||||
* support depend on the value of the `isTTY` property and the value returned by `getColorDepth()` on the
|
||||
* respective stream. This option can not be used, if `inspectOptions.colors` is set as well.
|
||||
* @default 'auto'
|
||||
*/
|
||||
colorMode?: boolean | "auto" | undefined;
|
||||
/**
|
||||
* Specifies options that are passed along to
|
||||
* [`util.inspect()`](https://nodejs.org/docs/latest-v25.x/api/util.html#utilinspectobject-options).
|
||||
*/
|
||||
inspectOptions?: InspectOptions | ReadonlyMap<NodeJS.WritableStream, InspectOptions> | undefined;
|
||||
/**
|
||||
* Set group indentation.
|
||||
* @default 2
|
||||
*/
|
||||
groupIndentation?: number | undefined;
|
||||
}
|
||||
interface Console {
|
||||
Console: console.ConsoleConstructor;
|
||||
/**
|
||||
* `console.assert()` writes a message if `value` is [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) or omitted. It only
|
||||
* writes a message and does not otherwise affect execution. The output always
|
||||
* starts with `"Assertion failed"`. If provided, `message` is formatted using
|
||||
* [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args).
|
||||
*
|
||||
* If `value` is [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy), nothing happens.
|
||||
*
|
||||
* ```js
|
||||
* console.assert(true, 'does nothing');
|
||||
*
|
||||
* console.assert(false, 'Whoops %s work', 'didn\'t');
|
||||
* // Assertion failed: Whoops didn't work
|
||||
*
|
||||
* console.assert();
|
||||
* // Assertion failed
|
||||
* ```
|
||||
* @since v0.1.101
|
||||
* @param value The value tested for being truthy.
|
||||
* @param message All arguments besides `value` are used as error message.
|
||||
*/
|
||||
assert(value: any, message?: string, ...optionalParams: any[]): void;
|
||||
/**
|
||||
* When `stdout` is a TTY, calling `console.clear()` will attempt to clear the
|
||||
* TTY. When `stdout` is not a TTY, this method does nothing.
|
||||
*
|
||||
* The specific operation of `console.clear()` can vary across operating systems
|
||||
* and terminal types. For most Linux operating systems, `console.clear()` operates similarly to the `clear` shell command. On Windows, `console.clear()` will clear only the output in the
|
||||
* current terminal viewport for the Node.js
|
||||
* binary.
|
||||
* @since v8.3.0
|
||||
*/
|
||||
readonly Console: {
|
||||
prototype: Console;
|
||||
new(stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream, ignoreErrors?: boolean): Console;
|
||||
new(options: ConsoleOptions): Console;
|
||||
};
|
||||
assert(condition?: unknown, ...data: any[]): void;
|
||||
clear(): void;
|
||||
/**
|
||||
* Maintains an internal counter specific to `label` and outputs to `stdout` the
|
||||
* number of times `console.count()` has been called with the given `label`.
|
||||
*
|
||||
* ```js
|
||||
* > console.count()
|
||||
* default: 1
|
||||
* undefined
|
||||
* > console.count('default')
|
||||
* default: 2
|
||||
* undefined
|
||||
* > console.count('abc')
|
||||
* abc: 1
|
||||
* undefined
|
||||
* > console.count('xyz')
|
||||
* xyz: 1
|
||||
* undefined
|
||||
* > console.count('abc')
|
||||
* abc: 2
|
||||
* undefined
|
||||
* > console.count()
|
||||
* default: 3
|
||||
* undefined
|
||||
* >
|
||||
* ```
|
||||
* @since v8.3.0
|
||||
* @param [label='default'] The display label for the counter.
|
||||
*/
|
||||
count(label?: string): void;
|
||||
/**
|
||||
* Resets the internal counter specific to `label`.
|
||||
*
|
||||
* ```js
|
||||
* > console.count('abc');
|
||||
* abc: 1
|
||||
* undefined
|
||||
* > console.countReset('abc');
|
||||
* undefined
|
||||
* > console.count('abc');
|
||||
* abc: 1
|
||||
* undefined
|
||||
* >
|
||||
* ```
|
||||
* @since v8.3.0
|
||||
* @param [label='default'] The display label for the counter.
|
||||
*/
|
||||
countReset(label?: string): void;
|
||||
/**
|
||||
* The `console.debug()` function is an alias for {@link log}.
|
||||
* @since v8.0.0
|
||||
*/
|
||||
debug(message?: any, ...optionalParams: any[]): void;
|
||||
/**
|
||||
* Uses [`util.inspect()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilinspectobject-options) on `obj` and prints the resulting string to `stdout`.
|
||||
* This function bypasses any custom `inspect()` function defined on `obj`.
|
||||
* @since v0.1.101
|
||||
*/
|
||||
dir(obj: any, options?: InspectOptions): void;
|
||||
/**
|
||||
* This method calls `console.log()` passing it the arguments received.
|
||||
* This method does not produce any XML formatting.
|
||||
* @since v8.0.0
|
||||
*/
|
||||
debug(...data: any[]): void;
|
||||
dir(item?: any, options?: InspectOptions): void;
|
||||
dirxml(...data: any[]): void;
|
||||
/**
|
||||
* Prints to `stderr` with newline. Multiple arguments can be passed, with the
|
||||
* first used as the primary message and all additional used as substitution
|
||||
* values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html)
|
||||
* (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)).
|
||||
*
|
||||
* ```js
|
||||
* const code = 5;
|
||||
* console.error('error #%d', code);
|
||||
* // Prints: error #5, to stderr
|
||||
* console.error('error', code);
|
||||
* // Prints: error 5, to stderr
|
||||
* ```
|
||||
*
|
||||
* If formatting elements (e.g. `%d`) are not found in the first string then
|
||||
* [`util.inspect()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilinspectobject-options) is called on each argument and the
|
||||
* resulting string values are concatenated. See [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)
|
||||
* for more information.
|
||||
* @since v0.1.100
|
||||
*/
|
||||
error(message?: any, ...optionalParams: any[]): void;
|
||||
/**
|
||||
* Increases indentation of subsequent lines by spaces for `groupIndentation` length.
|
||||
*
|
||||
* If one or more `label`s are provided, those are printed first without the
|
||||
* additional indentation.
|
||||
* @since v8.5.0
|
||||
*/
|
||||
group(...label: any[]): void;
|
||||
/**
|
||||
* An alias for {@link group}.
|
||||
* @since v8.5.0
|
||||
*/
|
||||
groupCollapsed(...label: any[]): void;
|
||||
/**
|
||||
* Decreases indentation of subsequent lines by spaces for `groupIndentation` length.
|
||||
* @since v8.5.0
|
||||
*/
|
||||
error(...data: any[]): void;
|
||||
group(...data: any[]): void;
|
||||
groupCollapsed(...data: any[]): void;
|
||||
groupEnd(): void;
|
||||
/**
|
||||
* The `console.info()` function is an alias for {@link log}.
|
||||
* @since v0.1.100
|
||||
*/
|
||||
info(message?: any, ...optionalParams: any[]): void;
|
||||
/**
|
||||
* Prints to `stdout` with newline. Multiple arguments can be passed, with the
|
||||
* first used as the primary message and all additional used as substitution
|
||||
* values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html)
|
||||
* (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)).
|
||||
*
|
||||
* ```js
|
||||
* const count = 5;
|
||||
* console.log('count: %d', count);
|
||||
* // Prints: count: 5, to stdout
|
||||
* console.log('count:', count);
|
||||
* // Prints: count: 5, to stdout
|
||||
* ```
|
||||
*
|
||||
* See [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args) for more information.
|
||||
* @since v0.1.100
|
||||
*/
|
||||
log(message?: any, ...optionalParams: any[]): void;
|
||||
/**
|
||||
* Try to construct a table with the columns of the properties of `tabularData` (or use `properties`) and rows of `tabularData` and log it. Falls back to just
|
||||
* logging the argument if it can't be parsed as tabular.
|
||||
*
|
||||
* ```js
|
||||
* // These can't be parsed as tabular data
|
||||
* console.table(Symbol());
|
||||
* // Symbol()
|
||||
*
|
||||
* console.table(undefined);
|
||||
* // undefined
|
||||
*
|
||||
* console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }]);
|
||||
* // ┌─────────┬─────┬─────┐
|
||||
* // │ (index) │ a │ b │
|
||||
* // ├─────────┼─────┼─────┤
|
||||
* // │ 0 │ 1 │ 'Y' │
|
||||
* // │ 1 │ 'Z' │ 2 │
|
||||
* // └─────────┴─────┴─────┘
|
||||
*
|
||||
* console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }], ['a']);
|
||||
* // ┌─────────┬─────┐
|
||||
* // │ (index) │ a │
|
||||
* // ├─────────┼─────┤
|
||||
* // │ 0 │ 1 │
|
||||
* // │ 1 │ 'Z' │
|
||||
* // └─────────┴─────┘
|
||||
* ```
|
||||
* @since v10.0.0
|
||||
* @param properties Alternate properties for constructing the table.
|
||||
*/
|
||||
table(tabularData: any, properties?: readonly string[]): void;
|
||||
/**
|
||||
* Starts a timer that can be used to compute the duration of an operation. Timers
|
||||
* are identified by a unique `label`. Use the same `label` when calling {@link timeEnd} to stop the timer and output the elapsed time in
|
||||
* suitable time units to `stdout`. For example, if the elapsed
|
||||
* time is 3869ms, `console.timeEnd()` displays "3.869s".
|
||||
* @since v0.1.104
|
||||
* @param [label='default']
|
||||
*/
|
||||
info(...data: any[]): void;
|
||||
log(...data: any[]): void;
|
||||
table(tabularData?: any, properties?: string[]): void;
|
||||
time(label?: string): void;
|
||||
/**
|
||||
* Stops a timer that was previously started by calling {@link time} and
|
||||
* prints the result to `stdout`:
|
||||
*
|
||||
* ```js
|
||||
* console.time('bunch-of-stuff');
|
||||
* // Do a bunch of stuff.
|
||||
* console.timeEnd('bunch-of-stuff');
|
||||
* // Prints: bunch-of-stuff: 225.438ms
|
||||
* ```
|
||||
* @since v0.1.104
|
||||
* @param [label='default']
|
||||
*/
|
||||
timeEnd(label?: string): void;
|
||||
/**
|
||||
* For a timer that was previously started by calling {@link time}, prints
|
||||
* the elapsed time and other `data` arguments to `stdout`:
|
||||
*
|
||||
* ```js
|
||||
* console.time('process');
|
||||
* const value = expensiveProcess1(); // Returns 42
|
||||
* console.timeLog('process', value);
|
||||
* // Prints "process: 365.227ms 42".
|
||||
* doExpensiveProcess2(value);
|
||||
* console.timeEnd('process');
|
||||
* ```
|
||||
* @since v10.7.0
|
||||
* @param [label='default']
|
||||
*/
|
||||
timeLog(label?: string, ...data: any[]): void;
|
||||
/**
|
||||
* Prints to `stderr` the string `'Trace: '`, followed by the [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)
|
||||
* formatted message and stack trace to the current position in the code.
|
||||
*
|
||||
* ```js
|
||||
* console.trace('Show me');
|
||||
* // Prints: (stack trace will vary based on where trace is called)
|
||||
* // Trace: Show me
|
||||
* // at repl:2:9
|
||||
* // at REPLServer.defaultEval (repl.js:248:27)
|
||||
* // at bound (domain.js:287:14)
|
||||
* // at REPLServer.runBound [as eval] (domain.js:300:12)
|
||||
* // at REPLServer.<anonymous> (repl.js:412:12)
|
||||
* // at emitOne (events.js:82:20)
|
||||
* // at REPLServer.emit (events.js:169:7)
|
||||
* // at REPLServer.Interface._onLine (readline.js:210:10)
|
||||
* // at REPLServer.Interface._line (readline.js:549:8)
|
||||
* // at REPLServer.Interface._ttyWrite (readline.js:826:14)
|
||||
* ```
|
||||
* @since v0.1.104
|
||||
*/
|
||||
trace(message?: any, ...optionalParams: any[]): void;
|
||||
/**
|
||||
* The `console.warn()` function is an alias for {@link error}.
|
||||
* @since v0.1.100
|
||||
*/
|
||||
warn(message?: any, ...optionalParams: any[]): void;
|
||||
// --- Inspector mode only ---
|
||||
trace(...data: any[]): void;
|
||||
warn(...data: any[]): void;
|
||||
/**
|
||||
* This method does not display anything unless used in the inspector. The `console.profile()`
|
||||
* method starts a JavaScript CPU profile with an optional label until {@link profileEnd}
|
||||
@@ -354,100 +141,11 @@ declare module "node:console" {
|
||||
*/
|
||||
timeStamp(label?: string): void;
|
||||
}
|
||||
/**
|
||||
* The `console` module provides a simple debugging console that is similar to the
|
||||
* JavaScript console mechanism provided by web browsers.
|
||||
*
|
||||
* The module exports two specific components:
|
||||
*
|
||||
* * A `Console` class with methods such as `console.log()`, `console.error()` and `console.warn()` that can be used to write to any Node.js stream.
|
||||
* * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdout) and
|
||||
* [`process.stderr`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module.
|
||||
*
|
||||
* _**Warning**_: The global console object's methods are neither consistently
|
||||
* synchronous like the browser APIs they resemble, nor are they consistently
|
||||
* asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v24.x/api/process.html#a-note-on-process-io) for
|
||||
* more information.
|
||||
*
|
||||
* Example using the global `console`:
|
||||
*
|
||||
* ```js
|
||||
* console.log('hello world');
|
||||
* // Prints: hello world, to stdout
|
||||
* console.log('hello %s', 'world');
|
||||
* // Prints: hello world, to stdout
|
||||
* console.error(new Error('Whoops, something bad happened'));
|
||||
* // Prints error message and stack trace to stderr:
|
||||
* // Error: Whoops, something bad happened
|
||||
* // at [eval]:5:15
|
||||
* // at Script.runInThisContext (node:vm:132:18)
|
||||
* // at Object.runInThisContext (node:vm:309:38)
|
||||
* // at node:internal/process/execution:77:19
|
||||
* // at [eval]-wrapper:6:22
|
||||
* // at evalScript (node:internal/process/execution:76:60)
|
||||
* // at node:internal/main/eval_string:23:3
|
||||
*
|
||||
* const name = 'Will Robinson';
|
||||
* console.warn(`Danger ${name}! Danger!`);
|
||||
* // Prints: Danger Will Robinson! Danger!, to stderr
|
||||
* ```
|
||||
*
|
||||
* Example using the `Console` class:
|
||||
*
|
||||
* ```js
|
||||
* const out = getStreamSomehow();
|
||||
* const err = getStreamSomehow();
|
||||
* const myConsole = new console.Console(out, err);
|
||||
*
|
||||
* myConsole.log('hello world');
|
||||
* // Prints: hello world, to out
|
||||
* myConsole.log('hello %s', 'world');
|
||||
* // Prints: hello world, to out
|
||||
* myConsole.error(new Error('Whoops, something bad happened'));
|
||||
* // Prints: [Error: Whoops, something bad happened], to err
|
||||
*
|
||||
* const name = 'Will Robinson';
|
||||
* myConsole.warn(`Danger ${name}! Danger!`);
|
||||
* // Prints: Danger Will Robinson! Danger!, to err
|
||||
* ```
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/console.js)
|
||||
*/
|
||||
namespace console {
|
||||
interface ConsoleConstructorOptions {
|
||||
stdout: NodeJS.WritableStream;
|
||||
stderr?: NodeJS.WritableStream | undefined;
|
||||
/**
|
||||
* Ignore errors when writing to the underlying streams.
|
||||
* @default true
|
||||
*/
|
||||
ignoreErrors?: boolean | undefined;
|
||||
/**
|
||||
* Set color support for this `Console` instance. Setting to true enables coloring while inspecting
|
||||
* values. Setting to `false` disables coloring while inspecting values. Setting to `'auto'` makes color
|
||||
* support depend on the value of the `isTTY` property and the value returned by `getColorDepth()` on the
|
||||
* respective stream. This option can not be used, if `inspectOptions.colors` is set as well.
|
||||
* @default auto
|
||||
*/
|
||||
colorMode?: boolean | "auto" | undefined;
|
||||
/**
|
||||
* Specifies options that are passed along to
|
||||
* `util.inspect()`. Can be an options object or, if different options
|
||||
* for stdout and stderr are desired, a `Map` from stream objects to options.
|
||||
*/
|
||||
inspectOptions?: InspectOptions | ReadonlyMap<NodeJS.WritableStream, InspectOptions> | undefined;
|
||||
/**
|
||||
* Set group indentation.
|
||||
* @default 2
|
||||
*/
|
||||
groupIndentation?: number | undefined;
|
||||
}
|
||||
interface ConsoleConstructor {
|
||||
prototype: Console;
|
||||
new(stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream, ignoreErrors?: boolean): Console;
|
||||
new(options: ConsoleConstructorOptions): Console;
|
||||
}
|
||||
}
|
||||
var console: Console;
|
||||
}
|
||||
export = globalThis.console;
|
||||
var console: console.Console;
|
||||
export = console;
|
||||
}
|
||||
declare module "console" {
|
||||
import console = require("node:console");
|
||||
export = console;
|
||||
}
|
||||
|
||||
7
backend/node_modules/@types/node/constants.d.ts
generated
vendored
7
backend/node_modules/@types/node/constants.d.ts
generated
vendored
@@ -4,7 +4,7 @@
|
||||
* to the `constants` property exposed by the relevant module. For instance,
|
||||
* `require('node:fs').constants` and `require('node:os').constants`.
|
||||
*/
|
||||
declare module "constants" {
|
||||
declare module "node:constants" {
|
||||
const constants:
|
||||
& typeof import("node:os").constants.dlopen
|
||||
& typeof import("node:os").constants.errno
|
||||
@@ -14,8 +14,7 @@ declare module "constants" {
|
||||
& typeof import("node:crypto").constants;
|
||||
export = constants;
|
||||
}
|
||||
|
||||
declare module "node:constants" {
|
||||
import constants = require("constants");
|
||||
declare module "constants" {
|
||||
import constants = require("node:constants");
|
||||
export = constants;
|
||||
}
|
||||
|
||||
1942
backend/node_modules/@types/node/crypto.d.ts
generated
vendored
1942
backend/node_modules/@types/node/crypto.d.ts
generated
vendored
File diff suppressed because it is too large
Load Diff
66
backend/node_modules/@types/node/dgram.d.ts
generated
vendored
66
backend/node_modules/@types/node/dgram.d.ts
generated
vendored
@@ -23,13 +23,13 @@
|
||||
* server.bind(41234);
|
||||
* // Prints: server listening 0.0.0.0:41234
|
||||
* ```
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/dgram.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/dgram.js)
|
||||
*/
|
||||
declare module "dgram" {
|
||||
declare module "node:dgram" {
|
||||
import { NonSharedBuffer } from "node:buffer";
|
||||
import { AddressInfo, BlockList } from "node:net";
|
||||
import * as dns from "node:dns";
|
||||
import { Abortable, EventEmitter } from "node:events";
|
||||
import { Abortable, EventEmitter, InternalEventEmitter } from "node:events";
|
||||
import { AddressInfo, BlockList } from "node:net";
|
||||
interface RemoteInfo {
|
||||
address: string;
|
||||
family: "IPv4" | "IPv6";
|
||||
@@ -88,6 +88,13 @@ declare module "dgram" {
|
||||
*/
|
||||
function createSocket(type: SocketType, callback?: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): Socket;
|
||||
function createSocket(options: SocketOptions, callback?: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): Socket;
|
||||
interface SocketEventMap {
|
||||
"close": [];
|
||||
"connect": [];
|
||||
"error": [err: Error];
|
||||
"listening": [];
|
||||
"message": [msg: NonSharedBuffer, rinfo: RemoteInfo];
|
||||
}
|
||||
/**
|
||||
* Encapsulates the datagram functionality.
|
||||
*
|
||||
@@ -95,7 +102,7 @@ declare module "dgram" {
|
||||
* The `new` keyword is not to be used to create `dgram.Socket` instances.
|
||||
* @since v0.1.99
|
||||
*/
|
||||
class Socket extends EventEmitter {
|
||||
class Socket implements EventEmitter {
|
||||
/**
|
||||
* Tells the kernel to join a multicast group at the given `multicastAddress` and `multicastInterface` using the `IP_ADD_MEMBERSHIP` socket option. If the `multicastInterface` argument is not
|
||||
* specified, the operating system will choose
|
||||
@@ -544,57 +551,14 @@ declare module "dgram" {
|
||||
* @since v13.1.0, v12.16.0
|
||||
*/
|
||||
dropSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void;
|
||||
/**
|
||||
* events.EventEmitter
|
||||
* 1. close
|
||||
* 2. connect
|
||||
* 3. error
|
||||
* 4. listening
|
||||
* 5. message
|
||||
*/
|
||||
addListener(event: string, listener: (...args: any[]) => void): this;
|
||||
addListener(event: "close", listener: () => void): this;
|
||||
addListener(event: "connect", listener: () => void): this;
|
||||
addListener(event: "error", listener: (err: Error) => void): this;
|
||||
addListener(event: "listening", listener: () => void): this;
|
||||
addListener(event: "message", listener: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): this;
|
||||
emit(event: string | symbol, ...args: any[]): boolean;
|
||||
emit(event: "close"): boolean;
|
||||
emit(event: "connect"): boolean;
|
||||
emit(event: "error", err: Error): boolean;
|
||||
emit(event: "listening"): boolean;
|
||||
emit(event: "message", msg: NonSharedBuffer, rinfo: RemoteInfo): boolean;
|
||||
on(event: string, listener: (...args: any[]) => void): this;
|
||||
on(event: "close", listener: () => void): this;
|
||||
on(event: "connect", listener: () => void): this;
|
||||
on(event: "error", listener: (err: Error) => void): this;
|
||||
on(event: "listening", listener: () => void): this;
|
||||
on(event: "message", listener: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): this;
|
||||
once(event: string, listener: (...args: any[]) => void): this;
|
||||
once(event: "close", listener: () => void): this;
|
||||
once(event: "connect", listener: () => void): this;
|
||||
once(event: "error", listener: (err: Error) => void): this;
|
||||
once(event: "listening", listener: () => void): this;
|
||||
once(event: "message", listener: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): this;
|
||||
prependListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependListener(event: "close", listener: () => void): this;
|
||||
prependListener(event: "connect", listener: () => void): this;
|
||||
prependListener(event: "error", listener: (err: Error) => void): this;
|
||||
prependListener(event: "listening", listener: () => void): this;
|
||||
prependListener(event: "message", listener: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): this;
|
||||
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener(event: "close", listener: () => void): this;
|
||||
prependOnceListener(event: "connect", listener: () => void): this;
|
||||
prependOnceListener(event: "error", listener: (err: Error) => void): this;
|
||||
prependOnceListener(event: "listening", listener: () => void): this;
|
||||
prependOnceListener(event: "message", listener: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): this;
|
||||
/**
|
||||
* Calls `socket.close()` and returns a promise that fulfills when the socket has closed.
|
||||
* @since v20.5.0
|
||||
*/
|
||||
[Symbol.asyncDispose](): Promise<void>;
|
||||
}
|
||||
interface Socket extends InternalEventEmitter<SocketEventMap> {}
|
||||
}
|
||||
declare module "node:dgram" {
|
||||
export * from "dgram";
|
||||
declare module "dgram" {
|
||||
export * from "node:dgram";
|
||||
}
|
||||
|
||||
8
backend/node_modules/@types/node/diagnostics_channel.d.ts
generated
vendored
8
backend/node_modules/@types/node/diagnostics_channel.d.ts
generated
vendored
@@ -20,9 +20,9 @@
|
||||
* should generally include the module name to avoid collisions with data from
|
||||
* other modules.
|
||||
* @since v15.1.0, v14.17.0
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/diagnostics_channel.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/diagnostics_channel.js)
|
||||
*/
|
||||
declare module "diagnostics_channel" {
|
||||
declare module "node:diagnostics_channel" {
|
||||
import { AsyncLocalStorage } from "node:async_hooks";
|
||||
/**
|
||||
* Check if there are active subscribers to the named channel. This is helpful if
|
||||
@@ -571,6 +571,6 @@ declare module "diagnostics_channel" {
|
||||
readonly hasSubscribers: boolean;
|
||||
}
|
||||
}
|
||||
declare module "node:diagnostics_channel" {
|
||||
export * from "diagnostics_channel";
|
||||
declare module "diagnostics_channel" {
|
||||
export * from "node:diagnostics_channel";
|
||||
}
|
||||
|
||||
263
backend/node_modules/@types/node/dns.d.ts
generated
vendored
263
backend/node_modules/@types/node/dns.d.ts
generated
vendored
@@ -41,28 +41,27 @@
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* See the [Implementation considerations section](https://nodejs.org/docs/latest-v24.x/api/dns.html#implementation-considerations) for more information.
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/dns.js)
|
||||
* See the [Implementation considerations section](https://nodejs.org/docs/latest-v25.x/api/dns.html#implementation-considerations) for more information.
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/dns.js)
|
||||
*/
|
||||
declare module "dns" {
|
||||
import * as dnsPromises from "node:dns/promises";
|
||||
declare module "node:dns" {
|
||||
// Supported getaddrinfo flags.
|
||||
/**
|
||||
* Limits returned address types to the types of non-loopback addresses configured on the system. For example, IPv4 addresses are
|
||||
* only returned if the current system has at least one IPv4 address configured.
|
||||
*/
|
||||
export const ADDRCONFIG: number;
|
||||
const ADDRCONFIG: number;
|
||||
/**
|
||||
* If the IPv6 family was specified, but no IPv6 addresses were found, then return IPv4 mapped IPv6 addresses. It is not supported
|
||||
* on some operating systems (e.g. FreeBSD 10.1).
|
||||
*/
|
||||
export const V4MAPPED: number;
|
||||
const V4MAPPED: number;
|
||||
/**
|
||||
* If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as
|
||||
* well as IPv4 mapped IPv6 addresses.
|
||||
*/
|
||||
export const ALL: number;
|
||||
export interface LookupOptions {
|
||||
const ALL: number;
|
||||
interface LookupOptions {
|
||||
/**
|
||||
* The record family. Must be `4`, `6`, or `0`. For backward compatibility reasons, `'IPv4'` and `'IPv6'` are interpreted
|
||||
* as `4` and `6` respectively. The value 0 indicates that either an IPv4 or IPv6 address is returned. If the value `0` is used
|
||||
@@ -71,7 +70,7 @@ declare module "dns" {
|
||||
*/
|
||||
family?: number | "IPv4" | "IPv6" | undefined;
|
||||
/**
|
||||
* One or more [supported `getaddrinfo`](https://nodejs.org/docs/latest-v24.x/api/dns.html#supported-getaddrinfo-flags) flags. Multiple flags may be
|
||||
* One or more [supported `getaddrinfo`](https://nodejs.org/docs/latest-v25.x/api/dns.html#supported-getaddrinfo-flags) flags. Multiple flags may be
|
||||
* passed by bitwise `OR`ing their values.
|
||||
*/
|
||||
hints?: number | undefined;
|
||||
@@ -84,7 +83,7 @@ declare module "dns" {
|
||||
* When `verbatim`, the resolved addresses are return unsorted. When `ipv4first`, the resolved addresses are sorted
|
||||
* by placing IPv4 addresses before IPv6 addresses. When `ipv6first`, the resolved addresses are sorted by placing IPv6
|
||||
* addresses before IPv4 addresses. Default value is configurable using
|
||||
* {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v24.x/api/cli.html#--dns-result-orderorder).
|
||||
* {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--dns-result-orderorder).
|
||||
* @default `verbatim` (addresses are not reordered)
|
||||
* @since v22.1.0
|
||||
*/
|
||||
@@ -98,13 +97,13 @@ declare module "dns" {
|
||||
*/
|
||||
verbatim?: boolean | undefined;
|
||||
}
|
||||
export interface LookupOneOptions extends LookupOptions {
|
||||
interface LookupOneOptions extends LookupOptions {
|
||||
all?: false | undefined;
|
||||
}
|
||||
export interface LookupAllOptions extends LookupOptions {
|
||||
interface LookupAllOptions extends LookupOptions {
|
||||
all: true;
|
||||
}
|
||||
export interface LookupAddress {
|
||||
interface LookupAddress {
|
||||
/**
|
||||
* A string representation of an IPv4 or IPv6 address.
|
||||
*/
|
||||
@@ -133,7 +132,7 @@ declare module "dns" {
|
||||
* The implementation uses an operating system facility that can associate names
|
||||
* with addresses and vice versa. This implementation can have subtle but
|
||||
* important consequences on the behavior of any Node.js program. Please take some
|
||||
* time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v24.x/api/dns.html#implementation-considerations)
|
||||
* time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v25.x/api/dns.html#implementation-considerations)
|
||||
* before using `dns.lookup()`.
|
||||
*
|
||||
* Example usage:
|
||||
@@ -155,35 +154,35 @@ declare module "dns" {
|
||||
* // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}]
|
||||
* ```
|
||||
*
|
||||
* If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v24.x/api/util.html#utilpromisifyoriginal) ed
|
||||
* If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v25.x/api/util.html#utilpromisifyoriginal) ed
|
||||
* version, and `all` is not set to `true`, it returns a `Promise` for an `Object` with `address` and `family` properties.
|
||||
* @since v0.1.90
|
||||
*/
|
||||
export function lookup(
|
||||
function lookup(
|
||||
hostname: string,
|
||||
family: number,
|
||||
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
|
||||
): void;
|
||||
export function lookup(
|
||||
function lookup(
|
||||
hostname: string,
|
||||
options: LookupOneOptions,
|
||||
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
|
||||
): void;
|
||||
export function lookup(
|
||||
function lookup(
|
||||
hostname: string,
|
||||
options: LookupAllOptions,
|
||||
callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void,
|
||||
): void;
|
||||
export function lookup(
|
||||
function lookup(
|
||||
hostname: string,
|
||||
options: LookupOptions,
|
||||
callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void,
|
||||
): void;
|
||||
export function lookup(
|
||||
function lookup(
|
||||
hostname: string,
|
||||
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
|
||||
): void;
|
||||
export namespace lookup {
|
||||
namespace lookup {
|
||||
function __promisify__(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
|
||||
function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<LookupAddress>;
|
||||
function __promisify__(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
|
||||
@@ -195,7 +194,7 @@ declare module "dns" {
|
||||
* If `address` is not a valid IP address, a `TypeError` will be thrown.
|
||||
* The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown.
|
||||
*
|
||||
* On an error, `err` is an [`Error`](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-error) object,
|
||||
* On an error, `err` is an [`Error`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) object,
|
||||
* where `err.code` is the error code.
|
||||
*
|
||||
* ```js
|
||||
@@ -206,16 +205,16 @@ declare module "dns" {
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v24.x/api/util.html#utilpromisifyoriginal) ed
|
||||
* If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v25.x/api/util.html#utilpromisifyoriginal) ed
|
||||
* version, it returns a `Promise` for an `Object` with `hostname` and `service` properties.
|
||||
* @since v0.11.14
|
||||
*/
|
||||
export function lookupService(
|
||||
function lookupService(
|
||||
address: string,
|
||||
port: number,
|
||||
callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void,
|
||||
): void;
|
||||
export namespace lookupService {
|
||||
namespace lookupService {
|
||||
function __promisify__(
|
||||
address: string,
|
||||
port: number,
|
||||
@@ -224,25 +223,23 @@ declare module "dns" {
|
||||
service: string;
|
||||
}>;
|
||||
}
|
||||
export interface ResolveOptions {
|
||||
interface ResolveOptions {
|
||||
ttl: boolean;
|
||||
}
|
||||
export interface ResolveWithTtlOptions extends ResolveOptions {
|
||||
interface ResolveWithTtlOptions extends ResolveOptions {
|
||||
ttl: true;
|
||||
}
|
||||
export interface RecordWithTtl {
|
||||
interface RecordWithTtl {
|
||||
address: string;
|
||||
ttl: number;
|
||||
}
|
||||
/** @deprecated Use `AnyARecord` or `AnyAaaaRecord` instead. */
|
||||
export type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord;
|
||||
export interface AnyARecord extends RecordWithTtl {
|
||||
interface AnyARecord extends RecordWithTtl {
|
||||
type: "A";
|
||||
}
|
||||
export interface AnyAaaaRecord extends RecordWithTtl {
|
||||
interface AnyAaaaRecord extends RecordWithTtl {
|
||||
type: "AAAA";
|
||||
}
|
||||
export interface CaaRecord {
|
||||
interface CaaRecord {
|
||||
critical: number;
|
||||
issue?: string | undefined;
|
||||
issuewild?: string | undefined;
|
||||
@@ -250,17 +247,17 @@ declare module "dns" {
|
||||
contactemail?: string | undefined;
|
||||
contactphone?: string | undefined;
|
||||
}
|
||||
export interface AnyCaaRecord extends CaaRecord {
|
||||
interface AnyCaaRecord extends CaaRecord {
|
||||
type: "CAA";
|
||||
}
|
||||
export interface MxRecord {
|
||||
interface MxRecord {
|
||||
priority: number;
|
||||
exchange: string;
|
||||
}
|
||||
export interface AnyMxRecord extends MxRecord {
|
||||
interface AnyMxRecord extends MxRecord {
|
||||
type: "MX";
|
||||
}
|
||||
export interface NaptrRecord {
|
||||
interface NaptrRecord {
|
||||
flags: string;
|
||||
service: string;
|
||||
regexp: string;
|
||||
@@ -268,10 +265,10 @@ declare module "dns" {
|
||||
order: number;
|
||||
preference: number;
|
||||
}
|
||||
export interface AnyNaptrRecord extends NaptrRecord {
|
||||
interface AnyNaptrRecord extends NaptrRecord {
|
||||
type: "NAPTR";
|
||||
}
|
||||
export interface SoaRecord {
|
||||
interface SoaRecord {
|
||||
nsname: string;
|
||||
hostmaster: string;
|
||||
serial: number;
|
||||
@@ -280,44 +277,44 @@ declare module "dns" {
|
||||
expire: number;
|
||||
minttl: number;
|
||||
}
|
||||
export interface AnySoaRecord extends SoaRecord {
|
||||
interface AnySoaRecord extends SoaRecord {
|
||||
type: "SOA";
|
||||
}
|
||||
export interface SrvRecord {
|
||||
interface SrvRecord {
|
||||
priority: number;
|
||||
weight: number;
|
||||
port: number;
|
||||
name: string;
|
||||
}
|
||||
export interface AnySrvRecord extends SrvRecord {
|
||||
interface AnySrvRecord extends SrvRecord {
|
||||
type: "SRV";
|
||||
}
|
||||
export interface TlsaRecord {
|
||||
interface TlsaRecord {
|
||||
certUsage: number;
|
||||
selector: number;
|
||||
match: number;
|
||||
data: ArrayBuffer;
|
||||
}
|
||||
export interface AnyTlsaRecord extends TlsaRecord {
|
||||
interface AnyTlsaRecord extends TlsaRecord {
|
||||
type: "TLSA";
|
||||
}
|
||||
export interface AnyTxtRecord {
|
||||
interface AnyTxtRecord {
|
||||
type: "TXT";
|
||||
entries: string[];
|
||||
}
|
||||
export interface AnyNsRecord {
|
||||
interface AnyNsRecord {
|
||||
type: "NS";
|
||||
value: string;
|
||||
}
|
||||
export interface AnyPtrRecord {
|
||||
interface AnyPtrRecord {
|
||||
type: "PTR";
|
||||
value: string;
|
||||
}
|
||||
export interface AnyCnameRecord {
|
||||
interface AnyCnameRecord {
|
||||
type: "CNAME";
|
||||
value: string;
|
||||
}
|
||||
export type AnyRecord =
|
||||
type AnyRecord =
|
||||
| AnyARecord
|
||||
| AnyAaaaRecord
|
||||
| AnyCaaRecord
|
||||
@@ -337,62 +334,62 @@ declare module "dns" {
|
||||
*
|
||||
* <omitted>
|
||||
*
|
||||
* On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-error) object,
|
||||
* On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) object,
|
||||
* where `err.code` is one of the `DNS error codes`.
|
||||
* @since v0.1.27
|
||||
* @param hostname Host name to resolve.
|
||||
* @param [rrtype='A'] Resource record type.
|
||||
*/
|
||||
export function resolve(
|
||||
function resolve(
|
||||
hostname: string,
|
||||
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
||||
): void;
|
||||
export function resolve(
|
||||
function resolve(
|
||||
hostname: string,
|
||||
rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR",
|
||||
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
||||
): void;
|
||||
export function resolve(
|
||||
function resolve(
|
||||
hostname: string,
|
||||
rrtype: "ANY",
|
||||
callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void,
|
||||
): void;
|
||||
export function resolve(
|
||||
function resolve(
|
||||
hostname: string,
|
||||
rrtype: "CAA",
|
||||
callback: (err: NodeJS.ErrnoException | null, address: CaaRecord[]) => void,
|
||||
): void;
|
||||
export function resolve(
|
||||
function resolve(
|
||||
hostname: string,
|
||||
rrtype: "MX",
|
||||
callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void,
|
||||
): void;
|
||||
export function resolve(
|
||||
function resolve(
|
||||
hostname: string,
|
||||
rrtype: "NAPTR",
|
||||
callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
|
||||
): void;
|
||||
export function resolve(
|
||||
function resolve(
|
||||
hostname: string,
|
||||
rrtype: "SOA",
|
||||
callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void,
|
||||
): void;
|
||||
export function resolve(
|
||||
function resolve(
|
||||
hostname: string,
|
||||
rrtype: "SRV",
|
||||
callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void,
|
||||
): void;
|
||||
export function resolve(
|
||||
function resolve(
|
||||
hostname: string,
|
||||
rrtype: "TLSA",
|
||||
callback: (err: NodeJS.ErrnoException | null, addresses: TlsaRecord[]) => void,
|
||||
): void;
|
||||
export function resolve(
|
||||
function resolve(
|
||||
hostname: string,
|
||||
rrtype: "TXT",
|
||||
callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void,
|
||||
): void;
|
||||
export function resolve(
|
||||
function resolve(
|
||||
hostname: string,
|
||||
rrtype: string,
|
||||
callback: (
|
||||
@@ -409,7 +406,7 @@ declare module "dns" {
|
||||
| AnyRecord[],
|
||||
) => void,
|
||||
): void;
|
||||
export namespace resolve {
|
||||
namespace resolve {
|
||||
function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
|
||||
function __promisify__(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
|
||||
function __promisify__(hostname: string, rrtype: "CAA"): Promise<CaaRecord[]>;
|
||||
@@ -440,21 +437,21 @@ declare module "dns" {
|
||||
* @since v0.1.16
|
||||
* @param hostname Host name to resolve.
|
||||
*/
|
||||
export function resolve4(
|
||||
function resolve4(
|
||||
hostname: string,
|
||||
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
||||
): void;
|
||||
export function resolve4(
|
||||
function resolve4(
|
||||
hostname: string,
|
||||
options: ResolveWithTtlOptions,
|
||||
callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void,
|
||||
): void;
|
||||
export function resolve4(
|
||||
function resolve4(
|
||||
hostname: string,
|
||||
options: ResolveOptions,
|
||||
callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void,
|
||||
): void;
|
||||
export namespace resolve4 {
|
||||
namespace resolve4 {
|
||||
function __promisify__(hostname: string): Promise<string[]>;
|
||||
function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
|
||||
function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
|
||||
@@ -465,21 +462,21 @@ declare module "dns" {
|
||||
* @since v0.1.16
|
||||
* @param hostname Host name to resolve.
|
||||
*/
|
||||
export function resolve6(
|
||||
function resolve6(
|
||||
hostname: string,
|
||||
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
||||
): void;
|
||||
export function resolve6(
|
||||
function resolve6(
|
||||
hostname: string,
|
||||
options: ResolveWithTtlOptions,
|
||||
callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void,
|
||||
): void;
|
||||
export function resolve6(
|
||||
function resolve6(
|
||||
hostname: string,
|
||||
options: ResolveOptions,
|
||||
callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void,
|
||||
): void;
|
||||
export namespace resolve6 {
|
||||
namespace resolve6 {
|
||||
function __promisify__(hostname: string): Promise<string[]>;
|
||||
function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
|
||||
function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
|
||||
@@ -489,11 +486,11 @@ declare module "dns" {
|
||||
* will contain an array of canonical name records available for the `hostname` (e.g. `['bar.example.com']`).
|
||||
* @since v0.3.2
|
||||
*/
|
||||
export function resolveCname(
|
||||
function resolveCname(
|
||||
hostname: string,
|
||||
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
||||
): void;
|
||||
export namespace resolveCname {
|
||||
namespace resolveCname {
|
||||
function __promisify__(hostname: string): Promise<string[]>;
|
||||
}
|
||||
/**
|
||||
@@ -502,11 +499,11 @@ declare module "dns" {
|
||||
* available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`).
|
||||
* @since v15.0.0, v14.17.0
|
||||
*/
|
||||
export function resolveCaa(
|
||||
function resolveCaa(
|
||||
hostname: string,
|
||||
callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void,
|
||||
): void;
|
||||
export namespace resolveCaa {
|
||||
namespace resolveCaa {
|
||||
function __promisify__(hostname: string): Promise<CaaRecord[]>;
|
||||
}
|
||||
/**
|
||||
@@ -514,11 +511,11 @@ declare module "dns" {
|
||||
* contain an array of objects containing both a `priority` and `exchange` property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`).
|
||||
* @since v0.1.27
|
||||
*/
|
||||
export function resolveMx(
|
||||
function resolveMx(
|
||||
hostname: string,
|
||||
callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void,
|
||||
): void;
|
||||
export namespace resolveMx {
|
||||
namespace resolveMx {
|
||||
function __promisify__(hostname: string): Promise<MxRecord[]>;
|
||||
}
|
||||
/**
|
||||
@@ -544,11 +541,11 @@ declare module "dns" {
|
||||
* ```
|
||||
* @since v0.9.12
|
||||
*/
|
||||
export function resolveNaptr(
|
||||
function resolveNaptr(
|
||||
hostname: string,
|
||||
callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
|
||||
): void;
|
||||
export namespace resolveNaptr {
|
||||
namespace resolveNaptr {
|
||||
function __promisify__(hostname: string): Promise<NaptrRecord[]>;
|
||||
}
|
||||
/**
|
||||
@@ -556,11 +553,11 @@ declare module "dns" {
|
||||
* contain an array of name server records available for `hostname` (e.g. `['ns1.example.com', 'ns2.example.com']`).
|
||||
* @since v0.1.90
|
||||
*/
|
||||
export function resolveNs(
|
||||
function resolveNs(
|
||||
hostname: string,
|
||||
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
||||
): void;
|
||||
export namespace resolveNs {
|
||||
namespace resolveNs {
|
||||
function __promisify__(hostname: string): Promise<string[]>;
|
||||
}
|
||||
/**
|
||||
@@ -568,11 +565,11 @@ declare module "dns" {
|
||||
* be an array of strings containing the reply records.
|
||||
* @since v6.0.0
|
||||
*/
|
||||
export function resolvePtr(
|
||||
function resolvePtr(
|
||||
hostname: string,
|
||||
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
||||
): void;
|
||||
export namespace resolvePtr {
|
||||
namespace resolvePtr {
|
||||
function __promisify__(hostname: string): Promise<string[]>;
|
||||
}
|
||||
/**
|
||||
@@ -601,11 +598,11 @@ declare module "dns" {
|
||||
* ```
|
||||
* @since v0.11.10
|
||||
*/
|
||||
export function resolveSoa(
|
||||
function resolveSoa(
|
||||
hostname: string,
|
||||
callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void,
|
||||
): void;
|
||||
export namespace resolveSoa {
|
||||
namespace resolveSoa {
|
||||
function __promisify__(hostname: string): Promise<SoaRecord>;
|
||||
}
|
||||
/**
|
||||
@@ -627,11 +624,11 @@ declare module "dns" {
|
||||
* ```
|
||||
* @since v0.1.27
|
||||
*/
|
||||
export function resolveSrv(
|
||||
function resolveSrv(
|
||||
hostname: string,
|
||||
callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void,
|
||||
): void;
|
||||
export namespace resolveSrv {
|
||||
namespace resolveSrv {
|
||||
function __promisify__(hostname: string): Promise<SrvRecord[]>;
|
||||
}
|
||||
/**
|
||||
@@ -654,11 +651,11 @@ declare module "dns" {
|
||||
* ```
|
||||
* @since v23.9.0, v22.15.0
|
||||
*/
|
||||
export function resolveTlsa(
|
||||
function resolveTlsa(
|
||||
hostname: string,
|
||||
callback: (err: NodeJS.ErrnoException | null, addresses: TlsaRecord[]) => void,
|
||||
): void;
|
||||
export namespace resolveTlsa {
|
||||
namespace resolveTlsa {
|
||||
function __promisify__(hostname: string): Promise<TlsaRecord[]>;
|
||||
}
|
||||
/**
|
||||
@@ -668,11 +665,11 @@ declare module "dns" {
|
||||
* treated separately.
|
||||
* @since v0.1.27
|
||||
*/
|
||||
export function resolveTxt(
|
||||
function resolveTxt(
|
||||
hostname: string,
|
||||
callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void,
|
||||
): void;
|
||||
export namespace resolveTxt {
|
||||
namespace resolveTxt {
|
||||
function __promisify__(hostname: string): Promise<string[][]>;
|
||||
}
|
||||
/**
|
||||
@@ -705,27 +702,27 @@ declare module "dns" {
|
||||
* DNS server operators may choose not to respond to `ANY` queries. It may be better to call individual methods like {@link resolve4}, {@link resolveMx}, and so on. For more details, see
|
||||
* [RFC 8482](https://tools.ietf.org/html/rfc8482).
|
||||
*/
|
||||
export function resolveAny(
|
||||
function resolveAny(
|
||||
hostname: string,
|
||||
callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void,
|
||||
): void;
|
||||
export namespace resolveAny {
|
||||
namespace resolveAny {
|
||||
function __promisify__(hostname: string): Promise<AnyRecord[]>;
|
||||
}
|
||||
/**
|
||||
* Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
|
||||
* array of host names.
|
||||
*
|
||||
* On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-error) object, where `err.code` is
|
||||
* one of the [DNS error codes](https://nodejs.org/docs/latest-v24.x/api/dns.html#error-codes).
|
||||
* On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) object, where `err.code` is
|
||||
* one of the [DNS error codes](https://nodejs.org/docs/latest-v25.x/api/dns.html#error-codes).
|
||||
* @since v0.1.16
|
||||
*/
|
||||
export function reverse(
|
||||
function reverse(
|
||||
ip: string,
|
||||
callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void,
|
||||
): void;
|
||||
/**
|
||||
* Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v24.x/api/dns.html#dnspromiseslookuphostname-options).
|
||||
* Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v25.x/api/dns.html#dnspromiseslookuphostname-options).
|
||||
* The value could be:
|
||||
*
|
||||
* * `ipv4first`: for `order` defaulting to `ipv4first`.
|
||||
@@ -733,7 +730,7 @@ declare module "dns" {
|
||||
* * `verbatim`: for `order` defaulting to `verbatim`.
|
||||
* @since v18.17.0
|
||||
*/
|
||||
export function getDefaultResultOrder(): "ipv4first" | "ipv6first" | "verbatim";
|
||||
function getDefaultResultOrder(): "ipv4first" | "ipv6first" | "verbatim";
|
||||
/**
|
||||
* Sets the IP address and port of servers to be used when performing DNS
|
||||
* resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
|
||||
@@ -762,7 +759,7 @@ declare module "dns" {
|
||||
* @since v0.11.3
|
||||
* @param servers array of [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952#section-6) formatted addresses
|
||||
*/
|
||||
export function setServers(servers: readonly string[]): void;
|
||||
function setServers(servers: readonly string[]): void;
|
||||
/**
|
||||
* Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6),
|
||||
* that are currently configured for DNS resolution. A string will include a port
|
||||
@@ -778,9 +775,9 @@ declare module "dns" {
|
||||
* ```
|
||||
* @since v0.11.3
|
||||
*/
|
||||
export function getServers(): string[];
|
||||
function getServers(): string[];
|
||||
/**
|
||||
* Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v24.x/api/dns.html#dnspromiseslookuphostname-options).
|
||||
* Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v25.x/api/dns.html#dnspromiseslookuphostname-options).
|
||||
* The value could be:
|
||||
*
|
||||
* * `ipv4first`: sets default `order` to `ipv4first`.
|
||||
@@ -788,39 +785,39 @@ declare module "dns" {
|
||||
* * `verbatim`: sets default `order` to `verbatim`.
|
||||
*
|
||||
* The default is `verbatim` and {@link setDefaultResultOrder} have higher
|
||||
* priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v24.x/api/cli.html#--dns-result-orderorder). When using
|
||||
* [worker threads](https://nodejs.org/docs/latest-v24.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main
|
||||
* priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--dns-result-orderorder). When using
|
||||
* [worker threads](https://nodejs.org/docs/latest-v25.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main
|
||||
* thread won't affect the default dns orders in workers.
|
||||
* @since v16.4.0, v14.18.0
|
||||
* @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`.
|
||||
*/
|
||||
export function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void;
|
||||
function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void;
|
||||
// Error codes
|
||||
export const NODATA: "ENODATA";
|
||||
export const FORMERR: "EFORMERR";
|
||||
export const SERVFAIL: "ESERVFAIL";
|
||||
export const NOTFOUND: "ENOTFOUND";
|
||||
export const NOTIMP: "ENOTIMP";
|
||||
export const REFUSED: "EREFUSED";
|
||||
export const BADQUERY: "EBADQUERY";
|
||||
export const BADNAME: "EBADNAME";
|
||||
export const BADFAMILY: "EBADFAMILY";
|
||||
export const BADRESP: "EBADRESP";
|
||||
export const CONNREFUSED: "ECONNREFUSED";
|
||||
export const TIMEOUT: "ETIMEOUT";
|
||||
export const EOF: "EOF";
|
||||
export const FILE: "EFILE";
|
||||
export const NOMEM: "ENOMEM";
|
||||
export const DESTRUCTION: "EDESTRUCTION";
|
||||
export const BADSTR: "EBADSTR";
|
||||
export const BADFLAGS: "EBADFLAGS";
|
||||
export const NONAME: "ENONAME";
|
||||
export const BADHINTS: "EBADHINTS";
|
||||
export const NOTINITIALIZED: "ENOTINITIALIZED";
|
||||
export const LOADIPHLPAPI: "ELOADIPHLPAPI";
|
||||
export const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS";
|
||||
export const CANCELLED: "ECANCELLED";
|
||||
export interface ResolverOptions {
|
||||
const NODATA: "ENODATA";
|
||||
const FORMERR: "EFORMERR";
|
||||
const SERVFAIL: "ESERVFAIL";
|
||||
const NOTFOUND: "ENOTFOUND";
|
||||
const NOTIMP: "ENOTIMP";
|
||||
const REFUSED: "EREFUSED";
|
||||
const BADQUERY: "EBADQUERY";
|
||||
const BADNAME: "EBADNAME";
|
||||
const BADFAMILY: "EBADFAMILY";
|
||||
const BADRESP: "EBADRESP";
|
||||
const CONNREFUSED: "ECONNREFUSED";
|
||||
const TIMEOUT: "ETIMEOUT";
|
||||
const EOF: "EOF";
|
||||
const FILE: "EFILE";
|
||||
const NOMEM: "ENOMEM";
|
||||
const DESTRUCTION: "EDESTRUCTION";
|
||||
const BADSTR: "EBADSTR";
|
||||
const BADFLAGS: "EBADFLAGS";
|
||||
const NONAME: "ENONAME";
|
||||
const BADHINTS: "EBADHINTS";
|
||||
const NOTINITIALIZED: "ENOTINITIALIZED";
|
||||
const LOADIPHLPAPI: "ELOADIPHLPAPI";
|
||||
const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS";
|
||||
const CANCELLED: "ECANCELLED";
|
||||
interface ResolverOptions {
|
||||
/**
|
||||
* Query timeout in milliseconds, or `-1` to use the default timeout.
|
||||
*/
|
||||
@@ -840,7 +837,7 @@ declare module "dns" {
|
||||
* An independent resolver for DNS requests.
|
||||
*
|
||||
* Creating a new resolver uses the default server settings. Setting
|
||||
* the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v24.x/api/dns.html#dnssetserversservers) does not affect
|
||||
* the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v25.x/api/dns.html#dnssetserversservers) does not affect
|
||||
* other resolvers:
|
||||
*
|
||||
* ```js
|
||||
@@ -874,7 +871,7 @@ declare module "dns" {
|
||||
* * `resolver.setServers()`
|
||||
* @since v8.3.0
|
||||
*/
|
||||
export class Resolver {
|
||||
class Resolver {
|
||||
constructor(options?: ResolverOptions);
|
||||
/**
|
||||
* Cancel all outstanding DNS queries made by this resolver. The corresponding
|
||||
@@ -916,8 +913,10 @@ declare module "dns" {
|
||||
setLocalAddress(ipv4?: string, ipv6?: string): void;
|
||||
setServers: typeof setServers;
|
||||
}
|
||||
export { dnsPromises as promises };
|
||||
}
|
||||
declare module "node:dns" {
|
||||
export * from "dns";
|
||||
export * as promises from "node:dns/promises";
|
||||
}
|
||||
declare module "dns" {
|
||||
export * from "node:dns";
|
||||
}
|
||||
|
||||
6
backend/node_modules/@types/node/dns/promises.d.ts
generated
vendored
6
backend/node_modules/@types/node/dns/promises.d.ts
generated
vendored
@@ -4,7 +4,7 @@
|
||||
* via `import { promises as dnsPromises } from 'node:dns'` or `import dnsPromises from 'node:dns/promises'`.
|
||||
* @since v10.6.0
|
||||
*/
|
||||
declare module "dns/promises" {
|
||||
declare module "node:dns/promises" {
|
||||
import {
|
||||
AnyRecord,
|
||||
CaaRecord,
|
||||
@@ -498,6 +498,6 @@ declare module "dns/promises" {
|
||||
setServers: typeof setServers;
|
||||
}
|
||||
}
|
||||
declare module "node:dns/promises" {
|
||||
export * from "dns/promises";
|
||||
declare module "dns/promises" {
|
||||
export * from "node:dns/promises";
|
||||
}
|
||||
|
||||
30
backend/node_modules/@types/node/domain.d.ts
generated
vendored
30
backend/node_modules/@types/node/domain.d.ts
generated
vendored
@@ -12,10 +12,10 @@
|
||||
* will be notified, rather than losing the context of the error in the `process.on('uncaughtException')` handler, or causing the program to
|
||||
* exit immediately with an error code.
|
||||
* @deprecated Since v1.4.2 - Deprecated
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/domain.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/domain.js)
|
||||
*/
|
||||
declare module "domain" {
|
||||
import EventEmitter = require("node:events");
|
||||
declare module "node:domain" {
|
||||
import { EventEmitter } from "node:events";
|
||||
/**
|
||||
* The `Domain` class encapsulates the functionality of routing errors and
|
||||
* uncaught exceptions to the active `Domain` object.
|
||||
@@ -24,10 +24,9 @@ declare module "domain" {
|
||||
*/
|
||||
class Domain extends EventEmitter {
|
||||
/**
|
||||
* An array of timers and event emitters that have been explicitly added
|
||||
* to the domain.
|
||||
* An array of event emitters that have been explicitly added to the domain.
|
||||
*/
|
||||
members: Array<EventEmitter | NodeJS.Timer>;
|
||||
members: EventEmitter[];
|
||||
/**
|
||||
* The `enter()` method is plumbing used by the `run()`, `bind()`, and `intercept()` methods to set the active domain. It sets `domain.active` and `process.domain` to the domain, and implicitly
|
||||
* pushes the domain onto the domain
|
||||
@@ -91,20 +90,17 @@ declare module "domain" {
|
||||
* will be routed to the domain's `'error'` event, just like with implicit
|
||||
* binding.
|
||||
*
|
||||
* This also works with timers that are returned from `setInterval()` and `setTimeout()`. If their callback function throws, it will be caught by
|
||||
* the domain `'error'` handler.
|
||||
*
|
||||
* If the Timer or `EventEmitter` was already bound to a domain, it is removed
|
||||
* from that one, and bound to this one instead.
|
||||
* @param emitter emitter or timer to be added to the domain
|
||||
* If the `EventEmitter` was already bound to a domain, it is removed from that
|
||||
* one, and bound to this one instead.
|
||||
* @param emitter emitter to be added to the domain
|
||||
*/
|
||||
add(emitter: EventEmitter | NodeJS.Timer): void;
|
||||
add(emitter: EventEmitter): void;
|
||||
/**
|
||||
* The opposite of {@link add}. Removes domain handling from the
|
||||
* specified emitter.
|
||||
* @param emitter emitter or timer to be removed from the domain
|
||||
* @param emitter emitter to be removed from the domain
|
||||
*/
|
||||
remove(emitter: EventEmitter | NodeJS.Timer): void;
|
||||
remove(emitter: EventEmitter): void;
|
||||
/**
|
||||
* The returned function will be a wrapper around the supplied callback
|
||||
* function. When the returned function is called, any errors that are
|
||||
@@ -165,6 +161,6 @@ declare module "domain" {
|
||||
}
|
||||
function create(): Domain;
|
||||
}
|
||||
declare module "node:domain" {
|
||||
export * from "domain";
|
||||
declare module "domain" {
|
||||
export * from "node:domain";
|
||||
}
|
||||
|
||||
1440
backend/node_modules/@types/node/events.d.ts
generated
vendored
1440
backend/node_modules/@types/node/events.d.ts
generated
vendored
File diff suppressed because it is too large
Load Diff
876
backend/node_modules/@types/node/fs.d.ts
generated
vendored
876
backend/node_modules/@types/node/fs.d.ts
generated
vendored
File diff suppressed because it is too large
Load Diff
30
backend/node_modules/@types/node/fs/promises.d.ts
generated
vendored
30
backend/node_modules/@types/node/fs/promises.d.ts
generated
vendored
@@ -8,11 +8,10 @@
|
||||
* concurrent modifications on the same file or data corruption may occur.
|
||||
* @since v10.0.0
|
||||
*/
|
||||
declare module "fs/promises" {
|
||||
declare module "node:fs/promises" {
|
||||
import { NonSharedBuffer } from "node:buffer";
|
||||
import { Abortable } from "node:events";
|
||||
import { Stream } from "node:stream";
|
||||
import { ReadableStream } from "node:stream/web";
|
||||
import { Interface as ReadlineInterface } from "node:readline";
|
||||
import {
|
||||
BigIntStats,
|
||||
BigIntStatsFs,
|
||||
@@ -21,7 +20,6 @@ declare module "fs/promises" {
|
||||
CopyOptions,
|
||||
Dir,
|
||||
Dirent,
|
||||
DisposableTempDir,
|
||||
EncodingOption,
|
||||
GlobOptions,
|
||||
GlobOptionsWithFileTypes,
|
||||
@@ -37,7 +35,6 @@ declare module "fs/promises" {
|
||||
ReadPosition,
|
||||
ReadStream,
|
||||
ReadVResult,
|
||||
RmDirOptions,
|
||||
RmOptions,
|
||||
StatFsOptions,
|
||||
StatOptions,
|
||||
@@ -49,7 +46,8 @@ declare module "fs/promises" {
|
||||
WriteStream,
|
||||
WriteVResult,
|
||||
} from "node:fs";
|
||||
import { Interface as ReadlineInterface } from "node:readline";
|
||||
import { Stream } from "node:stream";
|
||||
import { ReadableStream } from "node:stream/web";
|
||||
interface FileChangeInfo<T extends string | Buffer> {
|
||||
eventType: WatchEventType;
|
||||
filename: T | null;
|
||||
@@ -602,7 +600,7 @@ declare module "fs/promises" {
|
||||
* @since v10.0.0
|
||||
* @return Fulfills with `undefined` upon success.
|
||||
*/
|
||||
function rmdir(path: PathLike, options?: RmDirOptions): Promise<void>;
|
||||
function rmdir(path: PathLike): Promise<void>;
|
||||
/**
|
||||
* Removes files and directories (modeled on the standard POSIX `rm` utility).
|
||||
* @since v14.14.0
|
||||
@@ -981,6 +979,20 @@ declare module "fs/promises" {
|
||||
prefix: string,
|
||||
options?: ObjectEncodingOptions | BufferEncoding | null,
|
||||
): Promise<string | NonSharedBuffer>;
|
||||
interface DisposableTempDir extends AsyncDisposable {
|
||||
/**
|
||||
* The path of the created directory.
|
||||
*/
|
||||
path: string;
|
||||
/**
|
||||
* A function which removes the created directory.
|
||||
*/
|
||||
remove(): Promise<void>;
|
||||
/**
|
||||
* The same as `remove`.
|
||||
*/
|
||||
[Symbol.asyncDispose](): Promise<void>;
|
||||
}
|
||||
/**
|
||||
* The resulting Promise holds an async-disposable object whose `path` property
|
||||
* holds the created directory path. When the object is disposed, the directory
|
||||
@@ -1312,6 +1324,6 @@ declare module "fs/promises" {
|
||||
options: GlobOptions,
|
||||
): NodeJS.AsyncIterator<Dirent | string>;
|
||||
}
|
||||
declare module "node:fs/promises" {
|
||||
export * from "fs/promises";
|
||||
declare module "fs/promises" {
|
||||
export * from "node:fs/promises";
|
||||
}
|
||||
|
||||
32
backend/node_modules/@types/node/globals.d.ts
generated
vendored
32
backend/node_modules/@types/node/globals.d.ts
generated
vendored
@@ -1,7 +1,6 @@
|
||||
declare var global: typeof globalThis;
|
||||
|
||||
declare var process: NodeJS.Process;
|
||||
declare var console: Console;
|
||||
|
||||
interface ErrorConstructor {
|
||||
/**
|
||||
@@ -105,31 +104,6 @@ declare namespace NodeJS {
|
||||
syscall?: string | undefined;
|
||||
}
|
||||
|
||||
interface ReadableStream extends EventEmitter {
|
||||
readable: boolean;
|
||||
read(size?: number): string | Buffer;
|
||||
setEncoding(encoding: BufferEncoding): this;
|
||||
pause(): this;
|
||||
resume(): this;
|
||||
isPaused(): boolean;
|
||||
pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined }): T;
|
||||
unpipe(destination?: WritableStream): this;
|
||||
unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void;
|
||||
wrap(oldStream: ReadableStream): this;
|
||||
[Symbol.asyncIterator](): AsyncIterableIterator<string | Buffer>;
|
||||
}
|
||||
|
||||
interface WritableStream extends EventEmitter {
|
||||
writable: boolean;
|
||||
write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
|
||||
write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
|
||||
end(cb?: () => void): this;
|
||||
end(data: string | Uint8Array, cb?: () => void): this;
|
||||
end(str: string, encoding?: BufferEncoding, cb?: () => void): this;
|
||||
}
|
||||
|
||||
interface ReadWriteStream extends ReadableStream, WritableStream {}
|
||||
|
||||
interface RefCounted {
|
||||
ref(): this;
|
||||
unref(): this;
|
||||
@@ -167,4 +141,10 @@ declare namespace NodeJS {
|
||||
interface AsyncIterator<T, TReturn = undefined, TNext = any> extends AsyncIteratorObject<T, TReturn, TNext> {
|
||||
[Symbol.asyncIterator](): NodeJS.AsyncIterator<T, TReturn, TNext>;
|
||||
}
|
||||
|
||||
/** The [`BufferSource`](https://webidl.spec.whatwg.org/#BufferSource) type from the Web IDL specification. */
|
||||
type BufferSource = NonSharedArrayBufferView | ArrayBuffer;
|
||||
|
||||
/** The [`AllowSharedBufferSource`](https://webidl.spec.whatwg.org/#AllowSharedBufferSource) type from the Web IDL specification. */
|
||||
type AllowSharedBufferSource = ArrayBufferView | ArrayBufferLike;
|
||||
}
|
||||
|
||||
561
backend/node_modules/@types/node/http.d.ts
generated
vendored
561
backend/node_modules/@types/node/http.d.ts
generated
vendored
@@ -37,15 +37,15 @@
|
||||
* 'Host', 'example.com',
|
||||
* 'accepT', '*' ]
|
||||
* ```
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/http.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/http.js)
|
||||
*/
|
||||
declare module "http" {
|
||||
declare module "node:http" {
|
||||
import { NonSharedBuffer } from "node:buffer";
|
||||
import * as stream from "node:stream";
|
||||
import { URL } from "node:url";
|
||||
import { LookupOptions } from "node:dns";
|
||||
import { EventEmitter } from "node:events";
|
||||
import { LookupFunction, Server as NetServer, Socket, TcpSocketConnectOpts } from "node:net";
|
||||
import * as net from "node:net";
|
||||
import * as stream from "node:stream";
|
||||
import { URL } from "node:url";
|
||||
// incoming headers will never contain number
|
||||
interface IncomingHttpHeaders extends NodeJS.Dict<string | string[]> {
|
||||
accept?: string | undefined;
|
||||
@@ -219,7 +219,7 @@ declare module "http" {
|
||||
insecureHTTPParser?: boolean | undefined;
|
||||
localAddress?: string | undefined;
|
||||
localPort?: number | undefined;
|
||||
lookup?: LookupFunction | undefined;
|
||||
lookup?: net.LookupFunction | undefined;
|
||||
/**
|
||||
* @default 16384
|
||||
*/
|
||||
@@ -357,18 +357,40 @@ declare module "http" {
|
||||
* @since v18.17.0, v20.2.0
|
||||
*/
|
||||
rejectNonStandardBodyWrites?: boolean | undefined;
|
||||
/**
|
||||
* If set to `true`, requests without `Content-Length`
|
||||
* or `Transfer-Encoding` headers (indicating no body) will be initialized with an
|
||||
* already-ended body stream, so they will never emit any stream events
|
||||
* (like `'data'` or `'end'`). You can use `req.readableEnded` to detect this case.
|
||||
* @since v25.1.0
|
||||
* @default false
|
||||
*/
|
||||
optimizeEmptyRequests?: boolean | undefined;
|
||||
}
|
||||
type RequestListener<
|
||||
Request extends typeof IncomingMessage = typeof IncomingMessage,
|
||||
Response extends typeof ServerResponse<InstanceType<Request>> = typeof ServerResponse,
|
||||
> = (req: InstanceType<Request>, res: InstanceType<Response> & { req: InstanceType<Request> }) => void;
|
||||
> = (request: InstanceType<Request>, response: InstanceType<Response> & { req: InstanceType<Request> }) => void;
|
||||
interface ServerEventMap<
|
||||
Request extends typeof IncomingMessage = typeof IncomingMessage,
|
||||
Response extends typeof ServerResponse<InstanceType<Request>> = typeof ServerResponse,
|
||||
> extends net.ServerEventMap {
|
||||
"checkContinue": Parameters<RequestListener<Request, Response>>;
|
||||
"checkExpectation": Parameters<RequestListener<Request, Response>>;
|
||||
"clientError": [exception: Error, socket: stream.Duplex];
|
||||
"connect": [request: InstanceType<Request>, socket: stream.Duplex, head: NonSharedBuffer];
|
||||
"connection": [socket: net.Socket];
|
||||
"dropRequest": [request: InstanceType<Request>, socket: stream.Duplex];
|
||||
"request": Parameters<RequestListener<Request, Response>>;
|
||||
"upgrade": [req: InstanceType<Request>, socket: stream.Duplex, head: NonSharedBuffer];
|
||||
}
|
||||
/**
|
||||
* @since v0.1.17
|
||||
*/
|
||||
class Server<
|
||||
Request extends typeof IncomingMessage = typeof IncomingMessage,
|
||||
Response extends typeof ServerResponse<InstanceType<Request>> = typeof ServerResponse,
|
||||
> extends NetServer {
|
||||
> extends net.Server {
|
||||
constructor(requestListener?: RequestListener<Request, Response>);
|
||||
constructor(options: ServerOptions<Request, Response>, requestListener?: RequestListener<Request, Response>);
|
||||
/**
|
||||
@@ -385,8 +407,8 @@ declare module "http" {
|
||||
* @since v0.9.12
|
||||
* @param [msecs=0 (no timeout)]
|
||||
*/
|
||||
setTimeout(msecs?: number, callback?: (socket: Socket) => void): this;
|
||||
setTimeout(callback: (socket: Socket) => void): this;
|
||||
setTimeout(msecs?: number, callback?: (socket: net.Socket) => void): this;
|
||||
setTimeout(callback: (socket: net.Socket) => void): this;
|
||||
/**
|
||||
* Limits maximum incoming headers count. If set to 0, no limit will be applied.
|
||||
* @since v0.7.0
|
||||
@@ -486,126 +508,64 @@ declare module "http" {
|
||||
* @since v18.2.0
|
||||
*/
|
||||
closeIdleConnections(): void;
|
||||
addListener(event: string, listener: (...args: any[]) => void): this;
|
||||
addListener(event: "close", listener: () => void): this;
|
||||
addListener(event: "connection", listener: (socket: Socket) => void): this;
|
||||
addListener(event: "error", listener: (err: Error) => void): this;
|
||||
addListener(event: "listening", listener: () => void): this;
|
||||
addListener(event: "checkContinue", listener: RequestListener<Request, Response>): this;
|
||||
addListener(event: "checkExpectation", listener: RequestListener<Request, Response>): this;
|
||||
addListener(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this;
|
||||
addListener(
|
||||
event: "connect",
|
||||
listener: (req: InstanceType<Request>, socket: stream.Duplex, head: NonSharedBuffer) => void,
|
||||
// #region InternalEventEmitter
|
||||
addListener<E extends keyof ServerEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ServerEventMap<Request, Response>[E]) => void,
|
||||
): this;
|
||||
addListener(event: "dropRequest", listener: (req: InstanceType<Request>, socket: stream.Duplex) => void): this;
|
||||
addListener(event: "request", listener: RequestListener<Request, Response>): this;
|
||||
addListener(
|
||||
event: "upgrade",
|
||||
listener: (req: InstanceType<Request>, socket: stream.Duplex, head: NonSharedBuffer) => void,
|
||||
addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
emit<E extends keyof ServerEventMap>(eventName: E, ...args: ServerEventMap<Request, Response>[E]): boolean;
|
||||
emit(eventName: string | symbol, ...args: any[]): boolean;
|
||||
listenerCount<E extends keyof ServerEventMap>(
|
||||
eventName: E,
|
||||
listener?: (...args: ServerEventMap<Request, Response>[E]) => void,
|
||||
): number;
|
||||
listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
|
||||
listeners<E extends keyof ServerEventMap>(
|
||||
eventName: E,
|
||||
): ((...args: ServerEventMap<Request, Response>[E]) => void)[];
|
||||
listeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
||||
off<E extends keyof ServerEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ServerEventMap<Request, Response>[E]) => void,
|
||||
): this;
|
||||
emit(event: string, ...args: any[]): boolean;
|
||||
emit(event: "close"): boolean;
|
||||
emit(event: "connection", socket: Socket): boolean;
|
||||
emit(event: "error", err: Error): boolean;
|
||||
emit(event: "listening"): boolean;
|
||||
emit(
|
||||
event: "checkContinue",
|
||||
req: InstanceType<Request>,
|
||||
res: InstanceType<Response> & { req: InstanceType<Request> },
|
||||
): boolean;
|
||||
emit(
|
||||
event: "checkExpectation",
|
||||
req: InstanceType<Request>,
|
||||
res: InstanceType<Response> & { req: InstanceType<Request> },
|
||||
): boolean;
|
||||
emit(event: "clientError", err: Error, socket: stream.Duplex): boolean;
|
||||
emit(event: "connect", req: InstanceType<Request>, socket: stream.Duplex, head: NonSharedBuffer): boolean;
|
||||
emit(event: "dropRequest", req: InstanceType<Request>, socket: stream.Duplex): boolean;
|
||||
emit(
|
||||
event: "request",
|
||||
req: InstanceType<Request>,
|
||||
res: InstanceType<Response> & { req: InstanceType<Request> },
|
||||
): boolean;
|
||||
emit(event: "upgrade", req: InstanceType<Request>, socket: stream.Duplex, head: NonSharedBuffer): boolean;
|
||||
on(event: string, listener: (...args: any[]) => void): this;
|
||||
on(event: "close", listener: () => void): this;
|
||||
on(event: "connection", listener: (socket: Socket) => void): this;
|
||||
on(event: "error", listener: (err: Error) => void): this;
|
||||
on(event: "listening", listener: () => void): this;
|
||||
on(event: "checkContinue", listener: RequestListener<Request, Response>): this;
|
||||
on(event: "checkExpectation", listener: RequestListener<Request, Response>): this;
|
||||
on(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this;
|
||||
on(
|
||||
event: "connect",
|
||||
listener: (req: InstanceType<Request>, socket: stream.Duplex, head: NonSharedBuffer) => void,
|
||||
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
on<E extends keyof ServerEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ServerEventMap<Request, Response>[E]) => void,
|
||||
): this;
|
||||
on(event: "dropRequest", listener: (req: InstanceType<Request>, socket: stream.Duplex) => void): this;
|
||||
on(event: "request", listener: RequestListener<Request, Response>): this;
|
||||
on(
|
||||
event: "upgrade",
|
||||
listener: (req: InstanceType<Request>, socket: stream.Duplex, head: NonSharedBuffer) => void,
|
||||
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
once<E extends keyof ServerEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ServerEventMap<Request, Response>[E]) => void,
|
||||
): this;
|
||||
once(event: string, listener: (...args: any[]) => void): this;
|
||||
once(event: "close", listener: () => void): this;
|
||||
once(event: "connection", listener: (socket: Socket) => void): this;
|
||||
once(event: "error", listener: (err: Error) => void): this;
|
||||
once(event: "listening", listener: () => void): this;
|
||||
once(event: "checkContinue", listener: RequestListener<Request, Response>): this;
|
||||
once(event: "checkExpectation", listener: RequestListener<Request, Response>): this;
|
||||
once(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this;
|
||||
once(
|
||||
event: "connect",
|
||||
listener: (req: InstanceType<Request>, socket: stream.Duplex, head: NonSharedBuffer) => void,
|
||||
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependListener<E extends keyof ServerEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ServerEventMap<Request, Response>[E]) => void,
|
||||
): this;
|
||||
once(event: "dropRequest", listener: (req: InstanceType<Request>, socket: stream.Duplex) => void): this;
|
||||
once(event: "request", listener: RequestListener<Request, Response>): this;
|
||||
once(
|
||||
event: "upgrade",
|
||||
listener: (req: InstanceType<Request>, socket: stream.Duplex, head: NonSharedBuffer) => void,
|
||||
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener<E extends keyof ServerEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ServerEventMap<Request, Response>[E]) => void,
|
||||
): this;
|
||||
prependListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependListener(event: "close", listener: () => void): this;
|
||||
prependListener(event: "connection", listener: (socket: Socket) => void): this;
|
||||
prependListener(event: "error", listener: (err: Error) => void): this;
|
||||
prependListener(event: "listening", listener: () => void): this;
|
||||
prependListener(event: "checkContinue", listener: RequestListener<Request, Response>): this;
|
||||
prependListener(event: "checkExpectation", listener: RequestListener<Request, Response>): this;
|
||||
prependListener(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this;
|
||||
prependListener(
|
||||
event: "connect",
|
||||
listener: (req: InstanceType<Request>, socket: stream.Duplex, head: NonSharedBuffer) => void,
|
||||
): this;
|
||||
prependListener(
|
||||
event: "dropRequest",
|
||||
listener: (req: InstanceType<Request>, socket: stream.Duplex) => void,
|
||||
): this;
|
||||
prependListener(event: "request", listener: RequestListener<Request, Response>): this;
|
||||
prependListener(
|
||||
event: "upgrade",
|
||||
listener: (req: InstanceType<Request>, socket: stream.Duplex, head: NonSharedBuffer) => void,
|
||||
): this;
|
||||
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener(event: "close", listener: () => void): this;
|
||||
prependOnceListener(event: "connection", listener: (socket: Socket) => void): this;
|
||||
prependOnceListener(event: "error", listener: (err: Error) => void): this;
|
||||
prependOnceListener(event: "listening", listener: () => void): this;
|
||||
prependOnceListener(event: "checkContinue", listener: RequestListener<Request, Response>): this;
|
||||
prependOnceListener(event: "checkExpectation", listener: RequestListener<Request, Response>): this;
|
||||
prependOnceListener(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this;
|
||||
prependOnceListener(
|
||||
event: "connect",
|
||||
listener: (req: InstanceType<Request>, socket: stream.Duplex, head: NonSharedBuffer) => void,
|
||||
): this;
|
||||
prependOnceListener(
|
||||
event: "dropRequest",
|
||||
listener: (req: InstanceType<Request>, socket: stream.Duplex) => void,
|
||||
): this;
|
||||
prependOnceListener(event: "request", listener: RequestListener<Request, Response>): this;
|
||||
prependOnceListener(
|
||||
event: "upgrade",
|
||||
listener: (req: InstanceType<Request>, socket: stream.Duplex, head: NonSharedBuffer) => void,
|
||||
prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
rawListeners<E extends keyof ServerEventMap>(
|
||||
eventName: E,
|
||||
): ((...args: ServerEventMap<Request, Response>[E]) => void)[];
|
||||
rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
||||
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
||||
removeAllListeners<E extends keyof ServerEventMap>(eventName?: E): this;
|
||||
removeAllListeners(eventName?: string | symbol): this;
|
||||
removeListener<E extends keyof ServerEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ServerEventMap<Request, Response>[E]) => void,
|
||||
): this;
|
||||
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
// #endregion
|
||||
}
|
||||
interface OutgoingMessageEventMap extends stream.WritableEventMap {
|
||||
"prefinish": [];
|
||||
}
|
||||
/**
|
||||
* This class serves as the parent class of {@link ClientRequest} and {@link ServerResponse}. It is an abstract outgoing message from
|
||||
@@ -613,6 +573,7 @@ declare module "http" {
|
||||
* @since v0.1.17
|
||||
*/
|
||||
class OutgoingMessage<Request extends IncomingMessage = IncomingMessage> extends stream.Writable {
|
||||
constructor();
|
||||
readonly req: Request;
|
||||
chunkedEncoding: boolean;
|
||||
shouldKeepAlive: boolean;
|
||||
@@ -632,7 +593,7 @@ declare module "http" {
|
||||
* @since v0.3.0
|
||||
* @deprecated Since v15.12.0,v14.17.1 - Use `socket` instead.
|
||||
*/
|
||||
readonly connection: Socket | null;
|
||||
readonly connection: net.Socket | null;
|
||||
/**
|
||||
* Reference to the underlying socket. Usually, users will not want to access
|
||||
* this property.
|
||||
@@ -640,8 +601,7 @@ declare module "http" {
|
||||
* After calling `outgoingMessage.end()`, this property will be nulled.
|
||||
* @since v0.3.0
|
||||
*/
|
||||
readonly socket: Socket | null;
|
||||
constructor();
|
||||
readonly socket: net.Socket | null;
|
||||
/**
|
||||
* Once a socket is associated with the message and is connected, `socket.setTimeout()` will be called with `msecs` as the first parameter.
|
||||
* @since v0.9.12
|
||||
@@ -799,6 +759,61 @@ declare module "http" {
|
||||
* @since v1.6.0
|
||||
*/
|
||||
flushHeaders(): void;
|
||||
// #region InternalEventEmitter
|
||||
addListener<E extends keyof OutgoingMessageEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: OutgoingMessageEventMap[E]) => void,
|
||||
): this;
|
||||
addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
emit<E extends keyof OutgoingMessageEventMap>(eventName: E, ...args: OutgoingMessageEventMap[E]): boolean;
|
||||
emit(eventName: string | symbol, ...args: any[]): boolean;
|
||||
listenerCount<E extends keyof OutgoingMessageEventMap>(
|
||||
eventName: E,
|
||||
listener?: (...args: OutgoingMessageEventMap[E]) => void,
|
||||
): number;
|
||||
listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
|
||||
listeners<E extends keyof OutgoingMessageEventMap>(
|
||||
eventName: E,
|
||||
): ((...args: OutgoingMessageEventMap[E]) => void)[];
|
||||
listeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
||||
off<E extends keyof OutgoingMessageEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: OutgoingMessageEventMap[E]) => void,
|
||||
): this;
|
||||
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
on<E extends keyof OutgoingMessageEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: OutgoingMessageEventMap[E]) => void,
|
||||
): this;
|
||||
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
once<E extends keyof OutgoingMessageEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: OutgoingMessageEventMap[E]) => void,
|
||||
): this;
|
||||
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependListener<E extends keyof OutgoingMessageEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: OutgoingMessageEventMap[E]) => void,
|
||||
): this;
|
||||
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener<E extends keyof OutgoingMessageEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: OutgoingMessageEventMap[E]) => void,
|
||||
): this;
|
||||
prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
rawListeners<E extends keyof OutgoingMessageEventMap>(
|
||||
eventName: E,
|
||||
): ((...args: OutgoingMessageEventMap[E]) => void)[];
|
||||
rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
||||
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
||||
removeAllListeners<E extends keyof OutgoingMessageEventMap>(eventName?: E): this;
|
||||
removeAllListeners(eventName?: string | symbol): this;
|
||||
removeListener<E extends keyof OutgoingMessageEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: OutgoingMessageEventMap[E]) => void,
|
||||
): this;
|
||||
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
// #endregion
|
||||
}
|
||||
/**
|
||||
* This object is created internally by an HTTP server, not by the user. It is
|
||||
@@ -843,8 +858,8 @@ declare module "http" {
|
||||
*/
|
||||
strictContentLength: boolean;
|
||||
constructor(req: Request);
|
||||
assignSocket(socket: Socket): void;
|
||||
detachSocket(socket: Socket): void;
|
||||
assignSocket(socket: net.Socket): void;
|
||||
detachSocket(socket: net.Socket): void;
|
||||
/**
|
||||
* Sends an HTTP/1.1 100 Continue message to the client, indicating that
|
||||
* the request body should be sent. See the `'checkContinue'` event on `Server`.
|
||||
@@ -956,14 +971,25 @@ declare module "http" {
|
||||
writeProcessing(callback?: () => void): void;
|
||||
}
|
||||
interface InformationEvent {
|
||||
statusCode: number;
|
||||
statusMessage: string;
|
||||
httpVersion: string;
|
||||
httpVersionMajor: number;
|
||||
httpVersionMinor: number;
|
||||
statusCode: number;
|
||||
statusMessage: string;
|
||||
headers: IncomingHttpHeaders;
|
||||
rawHeaders: string[];
|
||||
}
|
||||
interface ClientRequestEventMap extends stream.WritableEventMap {
|
||||
/** @deprecated Listen for the `'close'` event instead. */
|
||||
"abort": [];
|
||||
"connect": [response: IncomingMessage, socket: net.Socket, head: NonSharedBuffer];
|
||||
"continue": [];
|
||||
"information": [info: InformationEvent];
|
||||
"response": [response: IncomingMessage];
|
||||
"socket": [socket: net.Socket];
|
||||
"timeout": [];
|
||||
"upgrade": [response: IncomingMessage, socket: net.Socket, head: NonSharedBuffer];
|
||||
}
|
||||
/**
|
||||
* This object is created internally and returned from {@link request}. It
|
||||
* represents an _in-progress_ request whose header has already been queued. The
|
||||
@@ -1020,6 +1046,7 @@ declare module "http" {
|
||||
*
|
||||
* ```js
|
||||
* import http from 'node:http';
|
||||
* const agent = new http.Agent({ keepAlive: true });
|
||||
*
|
||||
* // Server has a 5 seconds keep-alive timeout by default
|
||||
* http
|
||||
@@ -1086,7 +1113,7 @@ declare module "http" {
|
||||
* @deprecated Since v14.1.0,v13.14.0 - Use `destroy` instead.
|
||||
*/
|
||||
abort(): void;
|
||||
onSocket(socket: Socket): void;
|
||||
onSocket(socket: net.Socket): void;
|
||||
/**
|
||||
* Once a socket is assigned to this request and is connected `socket.setTimeout()` will be called.
|
||||
* @since v0.5.9
|
||||
@@ -1118,126 +1145,63 @@ declare module "http" {
|
||||
* @since v15.13.0, v14.17.0
|
||||
*/
|
||||
getRawHeaderNames(): string[];
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
addListener(event: "abort", listener: () => void): this;
|
||||
addListener(
|
||||
event: "connect",
|
||||
listener: (response: IncomingMessage, socket: Socket, head: NonSharedBuffer) => void,
|
||||
// #region InternalEventEmitter
|
||||
addListener<E extends keyof ClientRequestEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ClientRequestEventMap[E]) => void,
|
||||
): this;
|
||||
addListener(event: "continue", listener: () => void): this;
|
||||
addListener(event: "information", listener: (info: InformationEvent) => void): this;
|
||||
addListener(event: "response", listener: (response: IncomingMessage) => void): this;
|
||||
addListener(event: "socket", listener: (socket: Socket) => void): this;
|
||||
addListener(event: "timeout", listener: () => void): this;
|
||||
addListener(
|
||||
event: "upgrade",
|
||||
listener: (response: IncomingMessage, socket: Socket, head: NonSharedBuffer) => void,
|
||||
addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
emit<E extends keyof ClientRequestEventMap>(eventName: E, ...args: ClientRequestEventMap[E]): boolean;
|
||||
emit(eventName: string | symbol, ...args: any[]): boolean;
|
||||
listenerCount<E extends keyof ClientRequestEventMap>(
|
||||
eventName: E,
|
||||
listener?: (...args: ClientRequestEventMap[E]) => void,
|
||||
): number;
|
||||
listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
|
||||
listeners<E extends keyof ClientRequestEventMap>(eventName: E): ((...args: ClientRequestEventMap[E]) => void)[];
|
||||
listeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
||||
off<E extends keyof ClientRequestEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ClientRequestEventMap[E]) => void,
|
||||
): this;
|
||||
addListener(event: "close", listener: () => void): this;
|
||||
addListener(event: "drain", listener: () => void): this;
|
||||
addListener(event: "error", listener: (err: Error) => void): this;
|
||||
addListener(event: "finish", listener: () => void): this;
|
||||
addListener(event: "pipe", listener: (src: stream.Readable) => void): this;
|
||||
addListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
|
||||
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
on(event: "abort", listener: () => void): this;
|
||||
on(
|
||||
event: "connect",
|
||||
listener: (response: IncomingMessage, socket: Socket, head: NonSharedBuffer) => void,
|
||||
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
on<E extends keyof ClientRequestEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ClientRequestEventMap[E]) => void,
|
||||
): this;
|
||||
on(event: "continue", listener: () => void): this;
|
||||
on(event: "information", listener: (info: InformationEvent) => void): this;
|
||||
on(event: "response", listener: (response: IncomingMessage) => void): this;
|
||||
on(event: "socket", listener: (socket: Socket) => void): this;
|
||||
on(event: "timeout", listener: () => void): this;
|
||||
on(
|
||||
event: "upgrade",
|
||||
listener: (response: IncomingMessage, socket: Socket, head: NonSharedBuffer) => void,
|
||||
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
once<E extends keyof ClientRequestEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ClientRequestEventMap[E]) => void,
|
||||
): this;
|
||||
on(event: "close", listener: () => void): this;
|
||||
on(event: "drain", listener: () => void): this;
|
||||
on(event: "error", listener: (err: Error) => void): this;
|
||||
on(event: "finish", listener: () => void): this;
|
||||
on(event: "pipe", listener: (src: stream.Readable) => void): this;
|
||||
on(event: "unpipe", listener: (src: stream.Readable) => void): this;
|
||||
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
once(event: "abort", listener: () => void): this;
|
||||
once(
|
||||
event: "connect",
|
||||
listener: (response: IncomingMessage, socket: Socket, head: NonSharedBuffer) => void,
|
||||
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependListener<E extends keyof ClientRequestEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ClientRequestEventMap[E]) => void,
|
||||
): this;
|
||||
once(event: "continue", listener: () => void): this;
|
||||
once(event: "information", listener: (info: InformationEvent) => void): this;
|
||||
once(event: "response", listener: (response: IncomingMessage) => void): this;
|
||||
once(event: "socket", listener: (socket: Socket) => void): this;
|
||||
once(event: "timeout", listener: () => void): this;
|
||||
once(
|
||||
event: "upgrade",
|
||||
listener: (response: IncomingMessage, socket: Socket, head: NonSharedBuffer) => void,
|
||||
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener<E extends keyof ClientRequestEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ClientRequestEventMap[E]) => void,
|
||||
): this;
|
||||
once(event: "close", listener: () => void): this;
|
||||
once(event: "drain", listener: () => void): this;
|
||||
once(event: "error", listener: (err: Error) => void): this;
|
||||
once(event: "finish", listener: () => void): this;
|
||||
once(event: "pipe", listener: (src: stream.Readable) => void): this;
|
||||
once(event: "unpipe", listener: (src: stream.Readable) => void): this;
|
||||
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
prependListener(event: "abort", listener: () => void): this;
|
||||
prependListener(
|
||||
event: "connect",
|
||||
listener: (response: IncomingMessage, socket: Socket, head: NonSharedBuffer) => void,
|
||||
prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
rawListeners<E extends keyof ClientRequestEventMap>(
|
||||
eventName: E,
|
||||
): ((...args: ClientRequestEventMap[E]) => void)[];
|
||||
rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
||||
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
||||
removeAllListeners<E extends keyof ClientRequestEventMap>(eventName?: E): this;
|
||||
removeAllListeners(eventName?: string | symbol): this;
|
||||
removeListener<E extends keyof ClientRequestEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ClientRequestEventMap[E]) => void,
|
||||
): this;
|
||||
prependListener(event: "continue", listener: () => void): this;
|
||||
prependListener(event: "information", listener: (info: InformationEvent) => void): this;
|
||||
prependListener(event: "response", listener: (response: IncomingMessage) => void): this;
|
||||
prependListener(event: "socket", listener: (socket: Socket) => void): this;
|
||||
prependListener(event: "timeout", listener: () => void): this;
|
||||
prependListener(
|
||||
event: "upgrade",
|
||||
listener: (response: IncomingMessage, socket: Socket, head: NonSharedBuffer) => void,
|
||||
): this;
|
||||
prependListener(event: "close", listener: () => void): this;
|
||||
prependListener(event: "drain", listener: () => void): this;
|
||||
prependListener(event: "error", listener: (err: Error) => void): this;
|
||||
prependListener(event: "finish", listener: () => void): this;
|
||||
prependListener(event: "pipe", listener: (src: stream.Readable) => void): this;
|
||||
prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
|
||||
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
prependOnceListener(event: "abort", listener: () => void): this;
|
||||
prependOnceListener(
|
||||
event: "connect",
|
||||
listener: (response: IncomingMessage, socket: Socket, head: NonSharedBuffer) => void,
|
||||
): this;
|
||||
prependOnceListener(event: "continue", listener: () => void): this;
|
||||
prependOnceListener(event: "information", listener: (info: InformationEvent) => void): this;
|
||||
prependOnceListener(event: "response", listener: (response: IncomingMessage) => void): this;
|
||||
prependOnceListener(event: "socket", listener: (socket: Socket) => void): this;
|
||||
prependOnceListener(event: "timeout", listener: () => void): this;
|
||||
prependOnceListener(
|
||||
event: "upgrade",
|
||||
listener: (response: IncomingMessage, socket: Socket, head: NonSharedBuffer) => void,
|
||||
): this;
|
||||
prependOnceListener(event: "close", listener: () => void): this;
|
||||
prependOnceListener(event: "drain", listener: () => void): this;
|
||||
prependOnceListener(event: "error", listener: (err: Error) => void): this;
|
||||
prependOnceListener(event: "finish", listener: () => void): this;
|
||||
prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this;
|
||||
prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
|
||||
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
// #endregion
|
||||
}
|
||||
interface IncomingMessageEventMap extends stream.ReadableEventMap {
|
||||
/** @deprecated Listen for `'close'` event instead. */
|
||||
"aborted": [];
|
||||
}
|
||||
/**
|
||||
* An `IncomingMessage` object is created by {@link Server} or {@link ClientRequest} and passed as the first argument to the `'request'` and `'response'` event respectively. It may be used to
|
||||
@@ -1250,7 +1214,7 @@ declare module "http" {
|
||||
* @since v0.1.17
|
||||
*/
|
||||
class IncomingMessage extends stream.Readable {
|
||||
constructor(socket: Socket);
|
||||
constructor(socket: net.Socket);
|
||||
/**
|
||||
* The `message.aborted` property will be `true` if the request has
|
||||
* been aborted.
|
||||
@@ -1298,7 +1262,7 @@ declare module "http" {
|
||||
* @since v0.1.90
|
||||
* @deprecated Since v16.0.0 - Use `socket`.
|
||||
*/
|
||||
connection: Socket;
|
||||
connection: net.Socket;
|
||||
/**
|
||||
* The `net.Socket` object associated with the connection.
|
||||
*
|
||||
@@ -1310,7 +1274,7 @@ declare module "http" {
|
||||
* type other than `net.Socket` or internally nulled.
|
||||
* @since v0.3.0
|
||||
*/
|
||||
socket: Socket;
|
||||
socket: net.Socket;
|
||||
/**
|
||||
* The request/response headers object.
|
||||
*
|
||||
@@ -1472,6 +1436,61 @@ declare module "http" {
|
||||
* @since v0.3.0
|
||||
*/
|
||||
destroy(error?: Error): this;
|
||||
// #region InternalEventEmitter
|
||||
addListener<E extends keyof IncomingMessageEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: IncomingMessageEventMap[E]) => void,
|
||||
): this;
|
||||
addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
emit<E extends keyof IncomingMessageEventMap>(eventName: E, ...args: IncomingMessageEventMap[E]): boolean;
|
||||
emit(eventName: string | symbol, ...args: any[]): boolean;
|
||||
listenerCount<E extends keyof IncomingMessageEventMap>(
|
||||
eventName: E,
|
||||
listener?: (...args: IncomingMessageEventMap[E]) => void,
|
||||
): number;
|
||||
listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
|
||||
listeners<E extends keyof IncomingMessageEventMap>(
|
||||
eventName: E,
|
||||
): ((...args: IncomingMessageEventMap[E]) => void)[];
|
||||
listeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
||||
off<E extends keyof IncomingMessageEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: IncomingMessageEventMap[E]) => void,
|
||||
): this;
|
||||
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
on<E extends keyof IncomingMessageEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: IncomingMessageEventMap[E]) => void,
|
||||
): this;
|
||||
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
once<E extends keyof IncomingMessageEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: IncomingMessageEventMap[E]) => void,
|
||||
): this;
|
||||
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependListener<E extends keyof IncomingMessageEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: IncomingMessageEventMap[E]) => void,
|
||||
): this;
|
||||
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener<E extends keyof IncomingMessageEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: IncomingMessageEventMap[E]) => void,
|
||||
): this;
|
||||
prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
rawListeners<E extends keyof IncomingMessageEventMap>(
|
||||
eventName: E,
|
||||
): ((...args: IncomingMessageEventMap[E]) => void)[];
|
||||
rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
||||
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
||||
removeAllListeners<E extends keyof IncomingMessageEventMap>(eventName?: E): this;
|
||||
removeAllListeners(eventName?: string | symbol): this;
|
||||
removeListener<E extends keyof IncomingMessageEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: IncomingMessageEventMap[E]) => void,
|
||||
): this;
|
||||
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
// #endregion
|
||||
}
|
||||
interface ProxyEnv extends NodeJS.ProcessEnv {
|
||||
HTTP_PROXY?: string | undefined;
|
||||
@@ -1481,7 +1500,7 @@ declare module "http" {
|
||||
https_proxy?: string | undefined;
|
||||
no_proxy?: string | undefined;
|
||||
}
|
||||
interface AgentOptions extends NodeJS.PartialOptions<TcpSocketConnectOpts> {
|
||||
interface AgentOptions extends NodeJS.PartialOptions<net.TcpSocketConnectOpts> {
|
||||
/**
|
||||
* Keep sockets around in a pool to be used by other requests in the future. Default = false
|
||||
*/
|
||||
@@ -1524,7 +1543,7 @@ declare module "http" {
|
||||
scheduling?: "fifo" | "lifo" | undefined;
|
||||
/**
|
||||
* Environment variables for proxy configuration. See
|
||||
* [Built-in Proxy Support](https://nodejs.org/docs/latest-v24.x/api/http.html#built-in-proxy-support) for details.
|
||||
* [Built-in Proxy Support](https://nodejs.org/docs/latest-v25.x/api/http.html#built-in-proxy-support) for details.
|
||||
* @since v24.5.0
|
||||
*/
|
||||
proxyEnv?: ProxyEnv | undefined;
|
||||
@@ -1593,7 +1612,7 @@ declare module "http" {
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* `options` in [`socket.connect()`](https://nodejs.org/docs/latest-v24.x/api/net.html#socketconnectoptions-connectlistener) are also supported.
|
||||
* `options` in [`socket.connect()`](https://nodejs.org/docs/latest-v25.x/api/net.html#socketconnectoptions-connectlistener) are also supported.
|
||||
*
|
||||
* To configure any of them, a custom {@link Agent} instance must be created.
|
||||
*
|
||||
@@ -1633,13 +1652,13 @@ declare module "http" {
|
||||
* removed from the array on `'timeout'`.
|
||||
* @since v0.11.4
|
||||
*/
|
||||
readonly freeSockets: NodeJS.ReadOnlyDict<Socket[]>;
|
||||
readonly freeSockets: NodeJS.ReadOnlyDict<net.Socket[]>;
|
||||
/**
|
||||
* An object which contains arrays of sockets currently in use by the
|
||||
* agent. Do not modify.
|
||||
* @since v0.3.6
|
||||
*/
|
||||
readonly sockets: NodeJS.ReadOnlyDict<Socket[]>;
|
||||
readonly sockets: NodeJS.ReadOnlyDict<net.Socket[]>;
|
||||
/**
|
||||
* An object which contains queues of requests that have not yet been assigned to
|
||||
* sockets. Do not modify.
|
||||
@@ -1661,20 +1680,34 @@ declare module "http" {
|
||||
/**
|
||||
* Produces a socket/stream to be used for HTTP requests.
|
||||
*
|
||||
* By default, this function is the same as `net.createConnection()`. However,
|
||||
* custom agents may override this method in case greater flexibility is desired.
|
||||
* By default, this function behaves identically to `net.createConnection()`,
|
||||
* synchronously returning the created socket. The optional `callback` parameter in the
|
||||
* signature is **not** used by this default implementation.
|
||||
*
|
||||
* A socket/stream can be supplied in one of two ways: by returning the
|
||||
* socket/stream from this function, or by passing the socket/stream to `callback`.
|
||||
* However, custom agents may override this method to provide greater flexibility,
|
||||
* for example, to create sockets asynchronously. When overriding `createConnection`:
|
||||
*
|
||||
* This method is guaranteed to return an instance of the `net.Socket` class,
|
||||
* a subclass of `stream.Duplex`, unless the user specifies a socket
|
||||
* type other than `net.Socket`.
|
||||
* 1. **Synchronous socket creation**: The overriding method can return the
|
||||
* socket/stream directly.
|
||||
* 2. **Asynchronous socket creation**: The overriding method can accept the `callback`
|
||||
* and pass the created socket/stream to it (e.g., `callback(null, newSocket)`).
|
||||
* If an error occurs during socket creation, it should be passed as the first
|
||||
* argument to the `callback` (e.g., `callback(err)`).
|
||||
*
|
||||
* `callback` has a signature of `(err, stream)`.
|
||||
* The agent will call the provided `createConnection` function with `options` and
|
||||
* this internal `callback`. The `callback` provided by the agent has a signature
|
||||
* of `(err, stream)`.
|
||||
* @since v0.11.4
|
||||
* @param options Options containing connection details. Check `createConnection` for the format of the options
|
||||
* @param callback Callback function that receives the created socket
|
||||
* @param options Options containing connection details. Check
|
||||
* `net.createConnection` for the format of the options. For custom agents,
|
||||
* this object is passed to the custom `createConnection` function.
|
||||
* @param callback (Optional, primarily for custom agents) A function to be
|
||||
* called by a custom `createConnection` implementation when the socket is
|
||||
* created, especially for asynchronous operations.
|
||||
* @returns The created socket. This is returned by the default
|
||||
* implementation or by a custom synchronous `createConnection` implementation.
|
||||
* If a custom `createConnection` uses the `callback` for asynchronous
|
||||
* operation, this return value might not be the primary way to obtain the socket.
|
||||
*/
|
||||
createConnection(
|
||||
options: ClientRequestArgs,
|
||||
@@ -2129,6 +2162,6 @@ declare module "http" {
|
||||
*/
|
||||
const MessageEvent: typeof import("undici-types").MessageEvent;
|
||||
}
|
||||
declare module "node:http" {
|
||||
export * from "http";
|
||||
declare module "http" {
|
||||
export * from "node:http";
|
||||
}
|
||||
|
||||
1354
backend/node_modules/@types/node/http2.d.ts
generated
vendored
1354
backend/node_modules/@types/node/http2.d.ts
generated
vendored
File diff suppressed because it is too large
Load Diff
304
backend/node_modules/@types/node/https.d.ts
generated
vendored
304
backend/node_modules/@types/node/https.d.ts
generated
vendored
@@ -1,13 +1,12 @@
|
||||
/**
|
||||
* HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
|
||||
* separate module.
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/https.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/https.js)
|
||||
*/
|
||||
declare module "https" {
|
||||
import { NonSharedBuffer } from "node:buffer";
|
||||
declare module "node:https" {
|
||||
import * as http from "node:http";
|
||||
import { Duplex } from "node:stream";
|
||||
import * as tls from "node:tls";
|
||||
import * as http from "node:http";
|
||||
import { URL } from "node:url";
|
||||
interface ServerOptions<
|
||||
Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
|
||||
@@ -25,6 +24,12 @@ declare module "https" {
|
||||
}
|
||||
/**
|
||||
* An `Agent` object for HTTPS similar to `http.Agent`. See {@link request} for more information.
|
||||
*
|
||||
* Like `http.Agent`, the `createConnection(options[, callback])` method can be overridden
|
||||
* to customize how TLS connections are established.
|
||||
*
|
||||
* > See `agent.createConnection()` for details on overriding this method,
|
||||
* > including asynchronous socket creation with a callback.
|
||||
* @since v0.4.5
|
||||
*/
|
||||
class Agent extends http.Agent {
|
||||
@@ -36,10 +41,10 @@ declare module "https" {
|
||||
): Duplex | null | undefined;
|
||||
getName(options?: RequestOptions): string;
|
||||
}
|
||||
interface Server<
|
||||
interface ServerEventMap<
|
||||
Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
|
||||
Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
|
||||
> extends http.Server<Request, Response> {}
|
||||
> extends http.ServerEventMap<Request, Response>, tls.ServerEventMap {}
|
||||
/**
|
||||
* See `http.Server` for more information.
|
||||
* @since v0.3.4
|
||||
@@ -63,245 +68,66 @@ declare module "https" {
|
||||
* @since v18.2.0
|
||||
*/
|
||||
closeIdleConnections(): void;
|
||||
addListener(event: string, listener: (...args: any[]) => void): this;
|
||||
addListener(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: tls.TLSSocket) => void): this;
|
||||
addListener(
|
||||
event: "newSession",
|
||||
listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
|
||||
// #region InternalEventEmitter
|
||||
addListener<E extends keyof ServerEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ServerEventMap<Request, Response>[E]) => void,
|
||||
): this;
|
||||
addListener(
|
||||
event: "OCSPRequest",
|
||||
listener: (
|
||||
certificate: NonSharedBuffer,
|
||||
issuer: NonSharedBuffer,
|
||||
callback: (err: Error | null, resp: Buffer | null) => void,
|
||||
) => void,
|
||||
addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
emit<E extends keyof ServerEventMap>(eventName: E, ...args: ServerEventMap<Request, Response>[E]): boolean;
|
||||
emit(eventName: string | symbol, ...args: any[]): boolean;
|
||||
listenerCount<E extends keyof ServerEventMap>(
|
||||
eventName: E,
|
||||
listener?: (...args: ServerEventMap<Request, Response>[E]) => void,
|
||||
): number;
|
||||
listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
|
||||
listeners<E extends keyof ServerEventMap>(
|
||||
eventName: E,
|
||||
): ((...args: ServerEventMap<Request, Response>[E]) => void)[];
|
||||
listeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
||||
off<E extends keyof ServerEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ServerEventMap<Request, Response>[E]) => void,
|
||||
): this;
|
||||
addListener(
|
||||
event: "resumeSession",
|
||||
listener: (
|
||||
sessionId: NonSharedBuffer,
|
||||
callback: (err: Error | null, sessionData: Buffer | null) => void,
|
||||
) => void,
|
||||
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
on<E extends keyof ServerEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ServerEventMap<Request, Response>[E]) => void,
|
||||
): this;
|
||||
addListener(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
|
||||
addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
|
||||
addListener(event: "close", listener: () => void): this;
|
||||
addListener(event: "connection", listener: (socket: Duplex) => void): this;
|
||||
addListener(event: "error", listener: (err: Error) => void): this;
|
||||
addListener(event: "listening", listener: () => void): this;
|
||||
addListener(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
|
||||
addListener(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
|
||||
addListener(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
|
||||
addListener(
|
||||
event: "connect",
|
||||
listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
|
||||
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
once<E extends keyof ServerEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ServerEventMap<Request, Response>[E]) => void,
|
||||
): this;
|
||||
addListener(event: "request", listener: http.RequestListener<Request, Response>): this;
|
||||
addListener(
|
||||
event: "upgrade",
|
||||
listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
|
||||
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependListener<E extends keyof ServerEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ServerEventMap<Request, Response>[E]) => void,
|
||||
): this;
|
||||
emit(event: string, ...args: any[]): boolean;
|
||||
emit(event: "keylog", line: NonSharedBuffer, tlsSocket: tls.TLSSocket): boolean;
|
||||
emit(
|
||||
event: "newSession",
|
||||
sessionId: NonSharedBuffer,
|
||||
sessionData: NonSharedBuffer,
|
||||
callback: () => void,
|
||||
): boolean;
|
||||
emit(
|
||||
event: "OCSPRequest",
|
||||
certificate: NonSharedBuffer,
|
||||
issuer: NonSharedBuffer,
|
||||
callback: (err: Error | null, resp: Buffer | null) => void,
|
||||
): boolean;
|
||||
emit(
|
||||
event: "resumeSession",
|
||||
sessionId: NonSharedBuffer,
|
||||
callback: (err: Error | null, sessionData: Buffer | null) => void,
|
||||
): boolean;
|
||||
emit(event: "secureConnection", tlsSocket: tls.TLSSocket): boolean;
|
||||
emit(event: "tlsClientError", err: Error, tlsSocket: tls.TLSSocket): boolean;
|
||||
emit(event: "close"): boolean;
|
||||
emit(event: "connection", socket: Duplex): boolean;
|
||||
emit(event: "error", err: Error): boolean;
|
||||
emit(event: "listening"): boolean;
|
||||
emit(
|
||||
event: "checkContinue",
|
||||
req: InstanceType<Request>,
|
||||
res: InstanceType<Response>,
|
||||
): boolean;
|
||||
emit(
|
||||
event: "checkExpectation",
|
||||
req: InstanceType<Request>,
|
||||
res: InstanceType<Response>,
|
||||
): boolean;
|
||||
emit(event: "clientError", err: Error, socket: Duplex): boolean;
|
||||
emit(event: "connect", req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer): boolean;
|
||||
emit(
|
||||
event: "request",
|
||||
req: InstanceType<Request>,
|
||||
res: InstanceType<Response>,
|
||||
): boolean;
|
||||
emit(event: "upgrade", req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer): boolean;
|
||||
on(event: string, listener: (...args: any[]) => void): this;
|
||||
on(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: tls.TLSSocket) => void): this;
|
||||
on(
|
||||
event: "newSession",
|
||||
listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
|
||||
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener<E extends keyof ServerEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ServerEventMap<Request, Response>[E]) => void,
|
||||
): this;
|
||||
on(
|
||||
event: "OCSPRequest",
|
||||
listener: (
|
||||
certificate: NonSharedBuffer,
|
||||
issuer: NonSharedBuffer,
|
||||
callback: (err: Error | null, resp: Buffer | null) => void,
|
||||
) => void,
|
||||
): this;
|
||||
on(
|
||||
event: "resumeSession",
|
||||
listener: (
|
||||
sessionId: NonSharedBuffer,
|
||||
callback: (err: Error | null, sessionData: Buffer | null) => void,
|
||||
) => void,
|
||||
): this;
|
||||
on(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
|
||||
on(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
|
||||
on(event: "close", listener: () => void): this;
|
||||
on(event: "connection", listener: (socket: Duplex) => void): this;
|
||||
on(event: "error", listener: (err: Error) => void): this;
|
||||
on(event: "listening", listener: () => void): this;
|
||||
on(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
|
||||
on(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
|
||||
on(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
|
||||
on(
|
||||
event: "connect",
|
||||
listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
|
||||
): this;
|
||||
on(event: "request", listener: http.RequestListener<Request, Response>): this;
|
||||
on(
|
||||
event: "upgrade",
|
||||
listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
|
||||
): this;
|
||||
once(event: string, listener: (...args: any[]) => void): this;
|
||||
once(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: tls.TLSSocket) => void): this;
|
||||
once(
|
||||
event: "newSession",
|
||||
listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
|
||||
): this;
|
||||
once(
|
||||
event: "OCSPRequest",
|
||||
listener: (
|
||||
certificate: NonSharedBuffer,
|
||||
issuer: NonSharedBuffer,
|
||||
callback: (err: Error | null, resp: Buffer | null) => void,
|
||||
) => void,
|
||||
): this;
|
||||
once(
|
||||
event: "resumeSession",
|
||||
listener: (
|
||||
sessionId: NonSharedBuffer,
|
||||
callback: (err: Error | null, sessionData: Buffer | null) => void,
|
||||
) => void,
|
||||
): this;
|
||||
once(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
|
||||
once(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
|
||||
once(event: "close", listener: () => void): this;
|
||||
once(event: "connection", listener: (socket: Duplex) => void): this;
|
||||
once(event: "error", listener: (err: Error) => void): this;
|
||||
once(event: "listening", listener: () => void): this;
|
||||
once(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
|
||||
once(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
|
||||
once(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
|
||||
once(
|
||||
event: "connect",
|
||||
listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
|
||||
): this;
|
||||
once(event: "request", listener: http.RequestListener<Request, Response>): this;
|
||||
once(
|
||||
event: "upgrade",
|
||||
listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
|
||||
): this;
|
||||
prependListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependListener(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: tls.TLSSocket) => void): this;
|
||||
prependListener(
|
||||
event: "newSession",
|
||||
listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
|
||||
): this;
|
||||
prependListener(
|
||||
event: "OCSPRequest",
|
||||
listener: (
|
||||
certificate: NonSharedBuffer,
|
||||
issuer: NonSharedBuffer,
|
||||
callback: (err: Error | null, resp: Buffer | null) => void,
|
||||
) => void,
|
||||
): this;
|
||||
prependListener(
|
||||
event: "resumeSession",
|
||||
listener: (
|
||||
sessionId: NonSharedBuffer,
|
||||
callback: (err: Error | null, sessionData: Buffer | null) => void,
|
||||
) => void,
|
||||
): this;
|
||||
prependListener(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
|
||||
prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
|
||||
prependListener(event: "close", listener: () => void): this;
|
||||
prependListener(event: "connection", listener: (socket: Duplex) => void): this;
|
||||
prependListener(event: "error", listener: (err: Error) => void): this;
|
||||
prependListener(event: "listening", listener: () => void): this;
|
||||
prependListener(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
|
||||
prependListener(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
|
||||
prependListener(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
|
||||
prependListener(
|
||||
event: "connect",
|
||||
listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
|
||||
): this;
|
||||
prependListener(event: "request", listener: http.RequestListener<Request, Response>): this;
|
||||
prependListener(
|
||||
event: "upgrade",
|
||||
listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
|
||||
): this;
|
||||
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: tls.TLSSocket) => void): this;
|
||||
prependOnceListener(
|
||||
event: "newSession",
|
||||
listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
|
||||
): this;
|
||||
prependOnceListener(
|
||||
event: "OCSPRequest",
|
||||
listener: (
|
||||
certificate: NonSharedBuffer,
|
||||
issuer: NonSharedBuffer,
|
||||
callback: (err: Error | null, resp: Buffer | null) => void,
|
||||
) => void,
|
||||
): this;
|
||||
prependOnceListener(
|
||||
event: "resumeSession",
|
||||
listener: (
|
||||
sessionId: NonSharedBuffer,
|
||||
callback: (err: Error | null, sessionData: Buffer | null) => void,
|
||||
) => void,
|
||||
): this;
|
||||
prependOnceListener(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
|
||||
prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
|
||||
prependOnceListener(event: "close", listener: () => void): this;
|
||||
prependOnceListener(event: "connection", listener: (socket: Duplex) => void): this;
|
||||
prependOnceListener(event: "error", listener: (err: Error) => void): this;
|
||||
prependOnceListener(event: "listening", listener: () => void): this;
|
||||
prependOnceListener(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
|
||||
prependOnceListener(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
|
||||
prependOnceListener(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
|
||||
prependOnceListener(
|
||||
event: "connect",
|
||||
listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
|
||||
): this;
|
||||
prependOnceListener(event: "request", listener: http.RequestListener<Request, Response>): this;
|
||||
prependOnceListener(
|
||||
event: "upgrade",
|
||||
listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
|
||||
prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
rawListeners<E extends keyof ServerEventMap>(
|
||||
eventName: E,
|
||||
): ((...args: ServerEventMap<Request, Response>[E]) => void)[];
|
||||
rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
||||
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
||||
removeAllListeners<E extends keyof ServerEventMap>(eventName?: E): this;
|
||||
removeAllListeners(eventName?: string | symbol): this;
|
||||
removeListener<E extends keyof ServerEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ServerEventMap<Request, Response>[E]) => void,
|
||||
): this;
|
||||
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
// #endregion
|
||||
}
|
||||
interface Server<
|
||||
Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
|
||||
Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
|
||||
> extends http.Server<Request, Response> {}
|
||||
/**
|
||||
* ```js
|
||||
* // curl -k https://localhost:8000/
|
||||
@@ -574,6 +400,6 @@ declare module "https" {
|
||||
): http.ClientRequest;
|
||||
let globalAgent: Agent;
|
||||
}
|
||||
declare module "node:https" {
|
||||
export * from "https";
|
||||
declare module "https" {
|
||||
export * from "node:https";
|
||||
}
|
||||
|
||||
16
backend/node_modules/@types/node/index.d.ts
generated
vendored
16
backend/node_modules/@types/node/index.d.ts
generated
vendored
@@ -39,13 +39,21 @@
|
||||
// Definitions for Node.js modules that are not specific to any version of TypeScript:
|
||||
/// <reference path="globals.d.ts" />
|
||||
/// <reference path="web-globals/abortcontroller.d.ts" />
|
||||
/// <reference path="web-globals/blob.d.ts" />
|
||||
/// <reference path="web-globals/console.d.ts" />
|
||||
/// <reference path="web-globals/crypto.d.ts" />
|
||||
/// <reference path="web-globals/domexception.d.ts" />
|
||||
/// <reference path="web-globals/encoding.d.ts" />
|
||||
/// <reference path="web-globals/events.d.ts" />
|
||||
/// <reference path="web-globals/fetch.d.ts" />
|
||||
/// <reference path="web-globals/importmeta.d.ts" />
|
||||
/// <reference path="web-globals/messaging.d.ts" />
|
||||
/// <reference path="web-globals/navigator.d.ts" />
|
||||
/// <reference path="web-globals/performance.d.ts" />
|
||||
/// <reference path="web-globals/storage.d.ts" />
|
||||
/// <reference path="web-globals/streams.d.ts" />
|
||||
/// <reference path="web-globals/timers.d.ts" />
|
||||
/// <reference path="web-globals/url.d.ts" />
|
||||
/// <reference path="assert.d.ts" />
|
||||
/// <reference path="assert/strict.d.ts" />
|
||||
/// <reference path="async_hooks.d.ts" />
|
||||
@@ -68,25 +76,30 @@
|
||||
/// <reference path="https.d.ts" />
|
||||
/// <reference path="inspector.d.ts" />
|
||||
/// <reference path="inspector.generated.d.ts" />
|
||||
/// <reference path="inspector/promises.d.ts" />
|
||||
/// <reference path="module.d.ts" />
|
||||
/// <reference path="net.d.ts" />
|
||||
/// <reference path="os.d.ts" />
|
||||
/// <reference path="path.d.ts" />
|
||||
/// <reference path="path/posix.d.ts" />
|
||||
/// <reference path="path/win32.d.ts" />
|
||||
/// <reference path="perf_hooks.d.ts" />
|
||||
/// <reference path="process.d.ts" />
|
||||
/// <reference path="punycode.d.ts" />
|
||||
/// <reference path="querystring.d.ts" />
|
||||
/// <reference path="quic.d.ts" />
|
||||
/// <reference path="readline.d.ts" />
|
||||
/// <reference path="readline/promises.d.ts" />
|
||||
/// <reference path="repl.d.ts" />
|
||||
/// <reference path="sea.d.ts" />
|
||||
/// <reference path="sqlite.d.ts" />
|
||||
/// <reference path="stream.d.ts" />
|
||||
/// <reference path="stream/promises.d.ts" />
|
||||
/// <reference path="stream/consumers.d.ts" />
|
||||
/// <reference path="stream/promises.d.ts" />
|
||||
/// <reference path="stream/web.d.ts" />
|
||||
/// <reference path="string_decoder.d.ts" />
|
||||
/// <reference path="test.d.ts" />
|
||||
/// <reference path="test/reporters.d.ts" />
|
||||
/// <reference path="timers.d.ts" />
|
||||
/// <reference path="timers/promises.d.ts" />
|
||||
/// <reference path="tls.d.ts" />
|
||||
@@ -94,6 +107,7 @@
|
||||
/// <reference path="tty.d.ts" />
|
||||
/// <reference path="url.d.ts" />
|
||||
/// <reference path="util.d.ts" />
|
||||
/// <reference path="util/types.d.ts" />
|
||||
/// <reference path="v8.d.ts" />
|
||||
/// <reference path="vm.d.ts" />
|
||||
/// <reference path="wasi.d.ts" />
|
||||
|
||||
65
backend/node_modules/@types/node/inspector.d.ts
generated
vendored
65
backend/node_modules/@types/node/inspector.d.ts
generated
vendored
@@ -1,10 +1,10 @@
|
||||
/**
|
||||
* The `node:inspector` module provides an API for interacting with the V8
|
||||
* inspector.
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/inspector.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/inspector.js)
|
||||
*/
|
||||
declare module "inspector" {
|
||||
import EventEmitter = require("node:events");
|
||||
declare module "node:inspector" {
|
||||
import { EventEmitter } from "node:events";
|
||||
/**
|
||||
* The `inspector.Session` is used for dispatching messages to the V8 inspector
|
||||
* back-end and receiving message responses and notifications.
|
||||
@@ -39,7 +39,7 @@ declare module "inspector" {
|
||||
* If wait is `true`, will block until a client has connected to the inspect port
|
||||
* and flow control has been passed to the debugger client.
|
||||
*
|
||||
* See the [security warning](https://nodejs.org/docs/latest-v24.x/api/cli.html#warning-binding-inspector-to-a-public-ipport-combination-is-insecure)
|
||||
* See the [security warning](https://nodejs.org/docs/latest-v25.x/api/cli.html#warning-binding-inspector-to-a-public-ipport-combination-is-insecure)
|
||||
* regarding the `host` parameter usage.
|
||||
* @param port Port to listen on for inspector connections. Defaults to what was specified on the CLI.
|
||||
* @param host Host to listen on for inspector connections. Defaults to what was specified on the CLI.
|
||||
@@ -219,59 +219,6 @@ declare module "inspector" {
|
||||
function put(url: string, data: string): void;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The `node:inspector` module provides an API for interacting with the V8
|
||||
* inspector.
|
||||
*/
|
||||
declare module "node:inspector" {
|
||||
export * from "inspector";
|
||||
}
|
||||
|
||||
/**
|
||||
* The `node:inspector/promises` module provides an API for interacting with the V8
|
||||
* inspector.
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/inspector/promises.js)
|
||||
* @since v19.0.0
|
||||
*/
|
||||
declare module "inspector/promises" {
|
||||
import EventEmitter = require("node:events");
|
||||
export { close, console, NetworkResources, open, url, waitForDebugger } from "inspector";
|
||||
/**
|
||||
* The `inspector.Session` is used for dispatching messages to the V8 inspector
|
||||
* back-end and receiving message responses and notifications.
|
||||
* @since v19.0.0
|
||||
*/
|
||||
export class Session extends EventEmitter {
|
||||
/**
|
||||
* Create a new instance of the inspector.Session class.
|
||||
* The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend.
|
||||
*/
|
||||
constructor();
|
||||
/**
|
||||
* Connects a session to the inspector back-end.
|
||||
*/
|
||||
connect(): void;
|
||||
/**
|
||||
* Connects a session to the inspector back-end.
|
||||
* An exception will be thrown if this API was not called on a Worker thread.
|
||||
* @since v12.11.0
|
||||
*/
|
||||
connectToMainThread(): void;
|
||||
/**
|
||||
* Immediately close the session. All pending message callbacks will be called with an error.
|
||||
* `session.connect()` will need to be called to be able to send messages again.
|
||||
* Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints.
|
||||
*/
|
||||
disconnect(): void;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The `node:inspector/promises` module provides an API for interacting with the V8
|
||||
* inspector.
|
||||
* @since v19.0.0
|
||||
*/
|
||||
declare module "node:inspector/promises" {
|
||||
export * from "inspector/promises";
|
||||
declare module "inspector" {
|
||||
export * from "node:inspector";
|
||||
}
|
||||
|
||||
169
backend/node_modules/@types/node/module.d.ts
generated
vendored
169
backend/node_modules/@types/node/module.d.ts
generated
vendored
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @since v0.3.7
|
||||
*/
|
||||
declare module "module" {
|
||||
declare module "node:module" {
|
||||
import { URL } from "node:url";
|
||||
class Module {
|
||||
constructor(id: string, parent?: Module);
|
||||
@@ -30,7 +30,7 @@ declare module "module" {
|
||||
/**
|
||||
* The following constants are returned as the `status` field in the object returned by
|
||||
* {@link enableCompileCache} to indicate the result of the attempt to enable the
|
||||
* [module compile cache](https://nodejs.org/docs/latest-v24.x/api/module.html#module-compile-cache).
|
||||
* [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache).
|
||||
* @since v22.8.0
|
||||
*/
|
||||
namespace compileCacheStatus {
|
||||
@@ -62,6 +62,24 @@ declare module "module" {
|
||||
const DISABLED: number;
|
||||
}
|
||||
}
|
||||
interface EnableCompileCacheOptions {
|
||||
/**
|
||||
* Optional. Directory to store the compile cache. If not specified,
|
||||
* the directory specified by the `NODE_COMPILE_CACHE=dir` environment variable
|
||||
* will be used if it's set, or `path.join(os.tmpdir(), 'node-compile-cache')`
|
||||
* otherwise.
|
||||
* @since v25.0.0
|
||||
*/
|
||||
directory?: string | undefined;
|
||||
/**
|
||||
* Optional. If `true`, enables portable compile cache so that
|
||||
* the cache can be reused even if the project directory is moved. This is a best-effort
|
||||
* feature. If not specified, it will depend on whether the environment variable
|
||||
* `NODE_COMPILE_CACHE_PORTABLE=1` is set.
|
||||
* @since v25.0.0
|
||||
*/
|
||||
portable?: boolean | undefined;
|
||||
}
|
||||
interface EnableCompileCacheResult {
|
||||
/**
|
||||
* One of the {@link constants.compileCacheStatus}
|
||||
@@ -81,25 +99,21 @@ declare module "module" {
|
||||
directory?: string;
|
||||
}
|
||||
/**
|
||||
* Enable [module compile cache](https://nodejs.org/docs/latest-v24.x/api/module.html#module-compile-cache)
|
||||
* Enable [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache)
|
||||
* in the current Node.js instance.
|
||||
*
|
||||
* If `cacheDir` is not specified, Node.js will either use the directory specified by the
|
||||
* `NODE_COMPILE_CACHE=dir` environment variable if it's set, or use
|
||||
* `path.join(os.tmpdir(), 'node-compile-cache')` otherwise. For general use cases, it's
|
||||
* recommended to call `module.enableCompileCache()` without specifying the `cacheDir`,
|
||||
* so that the directory can be overridden by the `NODE_COMPILE_CACHE` environment
|
||||
* variable when necessary.
|
||||
* For general use cases, it's recommended to call `module.enableCompileCache()` without
|
||||
* specifying the `options.directory`, so that the directory can be overridden by the
|
||||
* `NODE_COMPILE_CACHE` environment variable when necessary.
|
||||
*
|
||||
* Since compile cache is supposed to be a quiet optimization that is not required for the
|
||||
* application to be functional, this method is designed to not throw any exception when the
|
||||
* compile cache cannot be enabled. Instead, it will return an object containing an error
|
||||
* message in the `message` field to aid debugging.
|
||||
* If compile cache is enabled successfully, the `directory` field in the returned object
|
||||
* contains the path to the directory where the compile cache is stored. The `status`
|
||||
* field in the returned object would be one of the `module.constants.compileCacheStatus`
|
||||
* Since compile cache is supposed to be a optimization that is not mission critical, this
|
||||
* method is designed to not throw any exception when the compile cache cannot be enabled.
|
||||
* Instead, it will return an object containing an error message in the `message` field to
|
||||
* aid debugging. If compile cache is enabled successfully, the `directory` field in the
|
||||
* returned object contains the path to the directory where the compile cache is stored. The
|
||||
* `status` field in the returned object would be one of the `module.constants.compileCacheStatus`
|
||||
* values to indicate the result of the attempt to enable the
|
||||
* [module compile cache](https://nodejs.org/docs/latest-v24.x/api/module.html#module-compile-cache).
|
||||
* [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache).
|
||||
*
|
||||
* This method only affects the current Node.js instance. To enable it in child worker threads,
|
||||
* either call this method in child worker threads too, or set the
|
||||
@@ -107,12 +121,11 @@ declare module "module" {
|
||||
* be inherited into the child workers. The directory can be obtained either from the
|
||||
* `directory` field returned by this method, or with {@link getCompileCacheDir}.
|
||||
* @since v22.8.0
|
||||
* @param cacheDir Optional path to specify the directory where the compile cache
|
||||
* will be stored/retrieved.
|
||||
* @param options Optional. If a string is passed, it is considered to be `options.directory`.
|
||||
*/
|
||||
function enableCompileCache(cacheDir?: string): EnableCompileCacheResult;
|
||||
function enableCompileCache(options?: string | EnableCompileCacheOptions): EnableCompileCacheResult;
|
||||
/**
|
||||
* Flush the [module compile cache](https://nodejs.org/docs/latest-v24.x/api/module.html#module-compile-cache)
|
||||
* Flush the [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache)
|
||||
* accumulated from modules already loaded
|
||||
* in the current Node.js instance to disk. This returns after all the flushing
|
||||
* file system operations come to an end, no matter they succeed or not. If there
|
||||
@@ -123,7 +136,7 @@ declare module "module" {
|
||||
function flushCompileCache(): void;
|
||||
/**
|
||||
* @since v22.8.0
|
||||
* @return Path to the [module compile cache](https://nodejs.org/docs/latest-v24.x/api/module.html#module-compile-cache)
|
||||
* @return Path to the [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache)
|
||||
* directory if it is enabled, or `undefined` otherwise.
|
||||
*/
|
||||
function getCompileCacheDir(): string | undefined;
|
||||
@@ -194,7 +207,7 @@ declare module "module" {
|
||||
*/
|
||||
data?: Data | undefined;
|
||||
/**
|
||||
* [Transferable objects](https://nodejs.org/docs/latest-v24.x/api/worker_threads.html#portpostmessagevalue-transferlist)
|
||||
* [Transferable objects](https://nodejs.org/docs/latest-v25.x/api/worker_threads.html#portpostmessagevalue-transferlist)
|
||||
* to be passed into the `initialize` hook.
|
||||
*/
|
||||
transferList?: any[] | undefined;
|
||||
@@ -203,10 +216,10 @@ declare module "module" {
|
||||
/**
|
||||
* Register a module that exports hooks that customize Node.js module
|
||||
* resolution and loading behavior. See
|
||||
* [Customization hooks](https://nodejs.org/docs/latest-v24.x/api/module.html#customization-hooks).
|
||||
* [Customization hooks](https://nodejs.org/docs/latest-v25.x/api/module.html#customization-hooks).
|
||||
*
|
||||
* This feature requires `--allow-worker` if used with the
|
||||
* [Permission Model](https://nodejs.org/docs/latest-v24.x/api/permissions.html#permission-model).
|
||||
* [Permission Model](https://nodejs.org/docs/latest-v25.x/api/permissions.html#permission-model).
|
||||
* @since v20.6.0, v18.19.0
|
||||
* @param specifier Customization hooks to be registered; this should be
|
||||
* the same string that would be passed to `import()`, except that if it is
|
||||
@@ -222,12 +235,12 @@ declare module "module" {
|
||||
function register<Data = any>(specifier: string | URL, options?: RegisterOptions<Data>): void;
|
||||
interface RegisterHooksOptions {
|
||||
/**
|
||||
* See [load hook](https://nodejs.org/docs/latest-v24.x/api/module.html#loadurl-context-nextload).
|
||||
* See [load hook](https://nodejs.org/docs/latest-v25.x/api/module.html#loadurl-context-nextload).
|
||||
* @default undefined
|
||||
*/
|
||||
load?: LoadHookSync | undefined;
|
||||
/**
|
||||
* See [resolve hook](https://nodejs.org/docs/latest-v24.x/api/module.html#resolvespecifier-context-nextresolve).
|
||||
* See [resolve hook](https://nodejs.org/docs/latest-v25.x/api/module.html#resolvespecifier-context-nextresolve).
|
||||
* @default undefined
|
||||
*/
|
||||
resolve?: ResolveHookSync | undefined;
|
||||
@@ -239,7 +252,7 @@ declare module "module" {
|
||||
deregister(): void;
|
||||
}
|
||||
/**
|
||||
* Register [hooks](https://nodejs.org/docs/latest-v24.x/api/module.html#customization-hooks)
|
||||
* Register [hooks](https://nodejs.org/docs/latest-v25.x/api/module.html#customization-hooks)
|
||||
* that customize Node.js module resolution and loading behavior.
|
||||
* @since v22.15.0
|
||||
* @experimental
|
||||
@@ -270,9 +283,9 @@ declare module "module" {
|
||||
* with `vm.runInContext()` or `vm.compileFunction()`.
|
||||
* By default, it will throw an error if the code contains TypeScript features
|
||||
* that require transformation such as `Enums`,
|
||||
* see [type-stripping](https://nodejs.org/docs/latest-v24.x/api/typescript.md#type-stripping) for more information.
|
||||
* see [type-stripping](https://nodejs.org/docs/latest-v25.x/api/typescript.md#type-stripping) for more information.
|
||||
* When mode is `'transform'`, it also transforms TypeScript features to JavaScript,
|
||||
* see [transform TypeScript features](https://nodejs.org/docs/latest-v24.x/api/typescript.md#typescript-features) for more information.
|
||||
* see [transform TypeScript features](https://nodejs.org/docs/latest-v25.x/api/typescript.md#typescript-features) for more information.
|
||||
* When mode is `'strip'`, source maps are not generated, because locations are preserved.
|
||||
* If `sourceMap` is provided, when mode is `'strip'`, an error will be thrown.
|
||||
*
|
||||
@@ -623,94 +636,6 @@ declare module "module" {
|
||||
function wrap(script: string): string;
|
||||
}
|
||||
global {
|
||||
interface ImportMeta {
|
||||
/**
|
||||
* The directory name of the current module.
|
||||
*
|
||||
* This is the same as the `path.dirname()` of the `import.meta.filename`.
|
||||
*
|
||||
* > **Caveat**: only present on `file:` modules.
|
||||
* @since v21.2.0, v20.11.0
|
||||
*/
|
||||
dirname: string;
|
||||
/**
|
||||
* The full absolute path and filename of the current module, with
|
||||
* symlinks resolved.
|
||||
*
|
||||
* This is the same as the `url.fileURLToPath()` of the `import.meta.url`.
|
||||
*
|
||||
* > **Caveat** only local modules support this property. Modules not using the
|
||||
* > `file:` protocol will not provide it.
|
||||
* @since v21.2.0, v20.11.0
|
||||
*/
|
||||
filename: string;
|
||||
/**
|
||||
* The absolute `file:` URL of the module.
|
||||
*
|
||||
* This is defined exactly the same as it is in browsers providing the URL of the
|
||||
* current module file.
|
||||
*
|
||||
* This enables useful patterns such as relative file loading:
|
||||
*
|
||||
* ```js
|
||||
* import { readFileSync } from 'node:fs';
|
||||
* const buffer = readFileSync(new URL('./data.proto', import.meta.url));
|
||||
* ```
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
* `import.meta.resolve` is a module-relative resolution function scoped to
|
||||
* each module, returning the URL string.
|
||||
*
|
||||
* ```js
|
||||
* const dependencyAsset = import.meta.resolve('component-lib/asset.css');
|
||||
* // file:///app/node_modules/component-lib/asset.css
|
||||
* import.meta.resolve('./dep.js');
|
||||
* // file:///app/dep.js
|
||||
* ```
|
||||
*
|
||||
* All features of the Node.js module resolution are supported. Dependency
|
||||
* resolutions are subject to the permitted exports resolutions within the package.
|
||||
*
|
||||
* **Caveats**:
|
||||
*
|
||||
* * This can result in synchronous file-system operations, which
|
||||
* can impact performance similarly to `require.resolve`.
|
||||
* * This feature is not available within custom loaders (it would
|
||||
* create a deadlock).
|
||||
* @since v13.9.0, v12.16.0
|
||||
* @param specifier The module specifier to resolve relative to the
|
||||
* current module.
|
||||
* @param parent An optional absolute parent module URL to resolve from.
|
||||
* **Default:** `import.meta.url`
|
||||
* @returns The absolute URL string that the specifier would resolve to.
|
||||
*/
|
||||
resolve(specifier: string, parent?: string | URL): string;
|
||||
/**
|
||||
* `true` when the current module is the entry point of the current process; `false` otherwise.
|
||||
*
|
||||
* Equivalent to `require.main === module` in CommonJS.
|
||||
*
|
||||
* Analogous to Python's `__name__ == "__main__"`.
|
||||
*
|
||||
* ```js
|
||||
* export function foo() {
|
||||
* return 'Hello, world';
|
||||
* }
|
||||
*
|
||||
* function main() {
|
||||
* const message = foo();
|
||||
* console.log(message);
|
||||
* }
|
||||
*
|
||||
* if (import.meta.main) main();
|
||||
* // `foo` can be imported from another module without possible side-effects from `main`
|
||||
* ```
|
||||
* @since v24.2.0
|
||||
* @experimental
|
||||
*/
|
||||
main: boolean;
|
||||
}
|
||||
namespace NodeJS {
|
||||
interface Module {
|
||||
/**
|
||||
@@ -784,7 +709,7 @@ declare module "module" {
|
||||
* Modules are cached in this object when they are required. By deleting a key
|
||||
* value from this object, the next `require` will reload the module.
|
||||
* This does not apply to
|
||||
* [native addons](https://nodejs.org/docs/latest-v24.x/api/addons.html),
|
||||
* [native addons](https://nodejs.org/docs/latest-v25.x/api/addons.html),
|
||||
* for which reloading will result in an error.
|
||||
* @since v0.3.0
|
||||
*/
|
||||
@@ -818,7 +743,7 @@ declare module "module" {
|
||||
* Paths to resolve module location from. If present, these
|
||||
* paths are used instead of the default resolution paths, with the exception
|
||||
* of
|
||||
* [GLOBAL\_FOLDERS](https://nodejs.org/docs/latest-v24.x/api/modules.html#loading-from-the-global-folders)
|
||||
* [GLOBAL\_FOLDERS](https://nodejs.org/docs/latest-v25.x/api/modules.html#loading-from-the-global-folders)
|
||||
* like `$HOME/.node_modules`, which are
|
||||
* always included. Each of these paths is used as a starting point for
|
||||
* the module resolution algorithm, meaning that the `node_modules` hierarchy
|
||||
@@ -888,7 +813,7 @@ declare module "module" {
|
||||
}
|
||||
export = Module;
|
||||
}
|
||||
declare module "node:module" {
|
||||
import module = require("module");
|
||||
declare module "module" {
|
||||
import module = require("node:module");
|
||||
export = module;
|
||||
}
|
||||
|
||||
249
backend/node_modules/@types/node/net.d.ts
generated
vendored
249
backend/node_modules/@types/node/net.d.ts
generated
vendored
@@ -10,13 +10,13 @@
|
||||
* ```js
|
||||
* import net from 'node:net';
|
||||
* ```
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/net.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/net.js)
|
||||
*/
|
||||
declare module "net" {
|
||||
declare module "node:net" {
|
||||
import { NonSharedBuffer } from "node:buffer";
|
||||
import * as stream from "node:stream";
|
||||
import { Abortable, EventEmitter } from "node:events";
|
||||
import * as dns from "node:dns";
|
||||
import { Abortable, EventEmitter, InternalEventEmitter } from "node:events";
|
||||
import * as stream from "node:stream";
|
||||
type LookupFunction = (
|
||||
hostname: string,
|
||||
options: dns.LookupOptions,
|
||||
@@ -70,6 +70,17 @@ declare module "net" {
|
||||
}
|
||||
type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts;
|
||||
type SocketReadyState = "opening" | "open" | "readOnly" | "writeOnly" | "closed";
|
||||
interface SocketEventMap extends Omit<stream.DuplexEventMap, "close"> {
|
||||
"close": [hadError: boolean];
|
||||
"connect": [];
|
||||
"connectionAttempt": [ip: string, port: number, family: number];
|
||||
"connectionAttemptFailed": [ip: string, port: number, family: number, error: Error];
|
||||
"connectionAttemptTimeout": [ip: string, port: number, family: number];
|
||||
"data": [data: string | NonSharedBuffer];
|
||||
"lookup": [err: Error | null, address: string, family: number | null, host: string];
|
||||
"ready": [];
|
||||
"timeout": [];
|
||||
}
|
||||
/**
|
||||
* This class is an abstraction of a TCP socket or a streaming `IPC` endpoint
|
||||
* (uses named pipes on Windows, and Unix domain sockets otherwise). It is also
|
||||
@@ -354,141 +365,45 @@ declare module "net" {
|
||||
end(callback?: () => void): this;
|
||||
end(buffer: Uint8Array | string, callback?: () => void): this;
|
||||
end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): this;
|
||||
/**
|
||||
* events.EventEmitter
|
||||
* 1. close
|
||||
* 2. connect
|
||||
* 3. connectionAttempt
|
||||
* 4. connectionAttemptFailed
|
||||
* 5. connectionAttemptTimeout
|
||||
* 6. data
|
||||
* 7. drain
|
||||
* 8. end
|
||||
* 9. error
|
||||
* 10. lookup
|
||||
* 11. ready
|
||||
* 12. timeout
|
||||
*/
|
||||
addListener(event: string, listener: (...args: any[]) => void): this;
|
||||
addListener(event: "close", listener: (hadError: boolean) => void): this;
|
||||
addListener(event: "connect", listener: () => void): this;
|
||||
addListener(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this;
|
||||
addListener(
|
||||
event: "connectionAttemptFailed",
|
||||
listener: (ip: string, port: number, family: number, error: Error) => void,
|
||||
// #region InternalEventEmitter
|
||||
addListener<E extends keyof SocketEventMap>(eventName: E, listener: (...args: SocketEventMap[E]) => void): this;
|
||||
addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
emit<E extends keyof SocketEventMap>(eventName: E, ...args: SocketEventMap[E]): boolean;
|
||||
emit(eventName: string | symbol, ...args: any[]): boolean;
|
||||
listenerCount<E extends keyof SocketEventMap>(
|
||||
eventName: E,
|
||||
listener?: (...args: SocketEventMap[E]) => void,
|
||||
): number;
|
||||
listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
|
||||
listeners<E extends keyof SocketEventMap>(eventName: E): ((...args: SocketEventMap[E]) => void)[];
|
||||
listeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
||||
off<E extends keyof SocketEventMap>(eventName: E, listener: (...args: SocketEventMap[E]) => void): this;
|
||||
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
on<E extends keyof SocketEventMap>(eventName: E, listener: (...args: SocketEventMap[E]) => void): this;
|
||||
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
once<E extends keyof SocketEventMap>(eventName: E, listener: (...args: SocketEventMap[E]) => void): this;
|
||||
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependListener<E extends keyof SocketEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: SocketEventMap[E]) => void,
|
||||
): this;
|
||||
addListener(
|
||||
event: "connectionAttemptTimeout",
|
||||
listener: (ip: string, port: number, family: number) => void,
|
||||
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener<E extends keyof SocketEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: SocketEventMap[E]) => void,
|
||||
): this;
|
||||
addListener(event: "data", listener: (data: NonSharedBuffer) => void): this;
|
||||
addListener(event: "drain", listener: () => void): this;
|
||||
addListener(event: "end", listener: () => void): this;
|
||||
addListener(event: "error", listener: (err: Error) => void): this;
|
||||
addListener(
|
||||
event: "lookup",
|
||||
listener: (err: Error, address: string, family: string | number, host: string) => void,
|
||||
prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
rawListeners<E extends keyof SocketEventMap>(eventName: E): ((...args: SocketEventMap[E]) => void)[];
|
||||
rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
||||
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
||||
removeAllListeners<E extends keyof SocketEventMap>(eventName?: E): this;
|
||||
removeAllListeners(eventName?: string | symbol): this;
|
||||
removeListener<E extends keyof SocketEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: SocketEventMap[E]) => void,
|
||||
): this;
|
||||
addListener(event: "ready", listener: () => void): this;
|
||||
addListener(event: "timeout", listener: () => void): this;
|
||||
emit(event: string | symbol, ...args: any[]): boolean;
|
||||
emit(event: "close", hadError: boolean): boolean;
|
||||
emit(event: "connect"): boolean;
|
||||
emit(event: "connectionAttempt", ip: string, port: number, family: number): boolean;
|
||||
emit(event: "connectionAttemptFailed", ip: string, port: number, family: number, error: Error): boolean;
|
||||
emit(event: "connectionAttemptTimeout", ip: string, port: number, family: number): boolean;
|
||||
emit(event: "data", data: NonSharedBuffer): boolean;
|
||||
emit(event: "drain"): boolean;
|
||||
emit(event: "end"): boolean;
|
||||
emit(event: "error", err: Error): boolean;
|
||||
emit(event: "lookup", err: Error, address: string, family: string | number, host: string): boolean;
|
||||
emit(event: "ready"): boolean;
|
||||
emit(event: "timeout"): boolean;
|
||||
on(event: string, listener: (...args: any[]) => void): this;
|
||||
on(event: "close", listener: (hadError: boolean) => void): this;
|
||||
on(event: "connect", listener: () => void): this;
|
||||
on(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this;
|
||||
on(
|
||||
event: "connectionAttemptFailed",
|
||||
listener: (ip: string, port: number, family: number, error: Error) => void,
|
||||
): this;
|
||||
on(event: "connectionAttemptTimeout", listener: (ip: string, port: number, family: number) => void): this;
|
||||
on(event: "data", listener: (data: NonSharedBuffer) => void): this;
|
||||
on(event: "drain", listener: () => void): this;
|
||||
on(event: "end", listener: () => void): this;
|
||||
on(event: "error", listener: (err: Error) => void): this;
|
||||
on(
|
||||
event: "lookup",
|
||||
listener: (err: Error, address: string, family: string | number, host: string) => void,
|
||||
): this;
|
||||
on(event: "ready", listener: () => void): this;
|
||||
on(event: "timeout", listener: () => void): this;
|
||||
once(event: string, listener: (...args: any[]) => void): this;
|
||||
once(event: "close", listener: (hadError: boolean) => void): this;
|
||||
once(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this;
|
||||
once(
|
||||
event: "connectionAttemptFailed",
|
||||
listener: (ip: string, port: number, family: number, error: Error) => void,
|
||||
): this;
|
||||
once(event: "connectionAttemptTimeout", listener: (ip: string, port: number, family: number) => void): this;
|
||||
once(event: "connect", listener: () => void): this;
|
||||
once(event: "data", listener: (data: NonSharedBuffer) => void): this;
|
||||
once(event: "drain", listener: () => void): this;
|
||||
once(event: "end", listener: () => void): this;
|
||||
once(event: "error", listener: (err: Error) => void): this;
|
||||
once(
|
||||
event: "lookup",
|
||||
listener: (err: Error, address: string, family: string | number, host: string) => void,
|
||||
): this;
|
||||
once(event: "ready", listener: () => void): this;
|
||||
once(event: "timeout", listener: () => void): this;
|
||||
prependListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependListener(event: "close", listener: (hadError: boolean) => void): this;
|
||||
prependListener(event: "connect", listener: () => void): this;
|
||||
prependListener(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this;
|
||||
prependListener(
|
||||
event: "connectionAttemptFailed",
|
||||
listener: (ip: string, port: number, family: number, error: Error) => void,
|
||||
): this;
|
||||
prependListener(
|
||||
event: "connectionAttemptTimeout",
|
||||
listener: (ip: string, port: number, family: number) => void,
|
||||
): this;
|
||||
prependListener(event: "data", listener: (data: NonSharedBuffer) => void): this;
|
||||
prependListener(event: "drain", listener: () => void): this;
|
||||
prependListener(event: "end", listener: () => void): this;
|
||||
prependListener(event: "error", listener: (err: Error) => void): this;
|
||||
prependListener(
|
||||
event: "lookup",
|
||||
listener: (err: Error, address: string, family: string | number, host: string) => void,
|
||||
): this;
|
||||
prependListener(event: "ready", listener: () => void): this;
|
||||
prependListener(event: "timeout", listener: () => void): this;
|
||||
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener(event: "close", listener: (hadError: boolean) => void): this;
|
||||
prependOnceListener(event: "connect", listener: () => void): this;
|
||||
prependOnceListener(
|
||||
event: "connectionAttempt",
|
||||
listener: (ip: string, port: number, family: number) => void,
|
||||
): this;
|
||||
prependOnceListener(
|
||||
event: "connectionAttemptFailed",
|
||||
listener: (ip: string, port: number, family: number, error: Error) => void,
|
||||
): this;
|
||||
prependOnceListener(
|
||||
event: "connectionAttemptTimeout",
|
||||
listener: (ip: string, port: number, family: number) => void,
|
||||
): this;
|
||||
prependOnceListener(event: "data", listener: (data: NonSharedBuffer) => void): this;
|
||||
prependOnceListener(event: "drain", listener: () => void): this;
|
||||
prependOnceListener(event: "end", listener: () => void): this;
|
||||
prependOnceListener(event: "error", listener: (err: Error) => void): this;
|
||||
prependOnceListener(
|
||||
event: "lookup",
|
||||
listener: (err: Error, address: string, family: string | number, host: string) => void,
|
||||
): this;
|
||||
prependOnceListener(event: "ready", listener: () => void): this;
|
||||
prependOnceListener(event: "timeout", listener: () => void): this;
|
||||
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
// #endregion
|
||||
}
|
||||
interface ListenOptions extends Abortable {
|
||||
backlog?: number | undefined;
|
||||
@@ -536,7 +451,7 @@ declare module "net" {
|
||||
keepAliveInitialDelay?: number | undefined;
|
||||
/**
|
||||
* Optionally overrides all `net.Socket`s' `readableHighWaterMark` and `writableHighWaterMark`.
|
||||
* @default See [stream.getDefaultHighWaterMark()](https://nodejs.org/docs/latest-v24.x/api/stream.html#streamgetdefaulthighwatermarkobjectmode).
|
||||
* @default See [stream.getDefaultHighWaterMark()](https://nodejs.org/docs/latest-v25.x/api/stream.html#streamgetdefaulthighwatermarkobjectmode).
|
||||
* @since v18.17.0, v20.1.0
|
||||
*/
|
||||
highWaterMark?: number | undefined;
|
||||
@@ -558,11 +473,18 @@ declare module "net" {
|
||||
remotePort?: number;
|
||||
remoteFamily?: string;
|
||||
}
|
||||
interface ServerEventMap {
|
||||
"close": [];
|
||||
"connection": [socket: Socket];
|
||||
"error": [err: Error];
|
||||
"listening": [];
|
||||
"drop": [data?: DropArgument];
|
||||
}
|
||||
/**
|
||||
* This class is used to create a TCP or `IPC` server.
|
||||
* @since v0.1.90
|
||||
*/
|
||||
class Server extends EventEmitter {
|
||||
class Server implements EventEmitter {
|
||||
constructor(connectionListener?: (socket: Socket) => void);
|
||||
constructor(options?: ServerOpts, connectionListener?: (socket: Socket) => void);
|
||||
/**
|
||||
@@ -688,56 +610,13 @@ declare module "net" {
|
||||
* @since v5.7.0
|
||||
*/
|
||||
readonly listening: boolean;
|
||||
/**
|
||||
* events.EventEmitter
|
||||
* 1. close
|
||||
* 2. connection
|
||||
* 3. error
|
||||
* 4. listening
|
||||
* 5. drop
|
||||
*/
|
||||
addListener(event: string, listener: (...args: any[]) => void): this;
|
||||
addListener(event: "close", listener: () => void): this;
|
||||
addListener(event: "connection", listener: (socket: Socket) => void): this;
|
||||
addListener(event: "error", listener: (err: Error) => void): this;
|
||||
addListener(event: "listening", listener: () => void): this;
|
||||
addListener(event: "drop", listener: (data?: DropArgument) => void): this;
|
||||
emit(event: string | symbol, ...args: any[]): boolean;
|
||||
emit(event: "close"): boolean;
|
||||
emit(event: "connection", socket: Socket): boolean;
|
||||
emit(event: "error", err: Error): boolean;
|
||||
emit(event: "listening"): boolean;
|
||||
emit(event: "drop", data?: DropArgument): boolean;
|
||||
on(event: string, listener: (...args: any[]) => void): this;
|
||||
on(event: "close", listener: () => void): this;
|
||||
on(event: "connection", listener: (socket: Socket) => void): this;
|
||||
on(event: "error", listener: (err: Error) => void): this;
|
||||
on(event: "listening", listener: () => void): this;
|
||||
on(event: "drop", listener: (data?: DropArgument) => void): this;
|
||||
once(event: string, listener: (...args: any[]) => void): this;
|
||||
once(event: "close", listener: () => void): this;
|
||||
once(event: "connection", listener: (socket: Socket) => void): this;
|
||||
once(event: "error", listener: (err: Error) => void): this;
|
||||
once(event: "listening", listener: () => void): this;
|
||||
once(event: "drop", listener: (data?: DropArgument) => void): this;
|
||||
prependListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependListener(event: "close", listener: () => void): this;
|
||||
prependListener(event: "connection", listener: (socket: Socket) => void): this;
|
||||
prependListener(event: "error", listener: (err: Error) => void): this;
|
||||
prependListener(event: "listening", listener: () => void): this;
|
||||
prependListener(event: "drop", listener: (data?: DropArgument) => void): this;
|
||||
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener(event: "close", listener: () => void): this;
|
||||
prependOnceListener(event: "connection", listener: (socket: Socket) => void): this;
|
||||
prependOnceListener(event: "error", listener: (err: Error) => void): this;
|
||||
prependOnceListener(event: "listening", listener: () => void): this;
|
||||
prependOnceListener(event: "drop", listener: (data?: DropArgument) => void): this;
|
||||
/**
|
||||
* Calls {@link Server.close()} and returns a promise that fulfills when the server has closed.
|
||||
* @since v20.5.0
|
||||
*/
|
||||
[Symbol.asyncDispose](): Promise<void>;
|
||||
}
|
||||
interface Server extends InternalEventEmitter<ServerEventMap> {}
|
||||
type IPVersion = "ipv4" | "ipv6";
|
||||
/**
|
||||
* The `BlockList` object can be used with some network APIs to specify rules for
|
||||
@@ -946,7 +825,7 @@ declare module "net" {
|
||||
function setDefaultAutoSelectFamily(value: boolean): void;
|
||||
/**
|
||||
* Gets the current default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`.
|
||||
* The initial default value is `250` or the value specified via the command line option `--network-family-autoselection-attempt-timeout`.
|
||||
* The initial default value is `500` or the value specified via the command line option `--network-family-autoselection-attempt-timeout`.
|
||||
* @returns The current default value of the `autoSelectFamilyAttemptTimeout` option.
|
||||
* @since v19.8.0, v18.8.0
|
||||
*/
|
||||
@@ -1049,6 +928,6 @@ declare module "net" {
|
||||
static parse(input: string): SocketAddress | undefined;
|
||||
}
|
||||
}
|
||||
declare module "node:net" {
|
||||
export * from "net";
|
||||
declare module "net" {
|
||||
export * from "node:net";
|
||||
}
|
||||
|
||||
12
backend/node_modules/@types/node/os.d.ts
generated
vendored
12
backend/node_modules/@types/node/os.d.ts
generated
vendored
@@ -5,9 +5,9 @@
|
||||
* ```js
|
||||
* import os from 'node:os';
|
||||
* ```
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/os.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/os.js)
|
||||
*/
|
||||
declare module "os" {
|
||||
declare module "node:os" {
|
||||
import { NonSharedBuffer } from "buffer";
|
||||
interface CpuInfo {
|
||||
model: string;
|
||||
@@ -251,7 +251,7 @@ declare module "os" {
|
||||
* environment variables for the home directory before falling back to the
|
||||
* operating system response.
|
||||
*
|
||||
* Throws a [`SystemError`](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-systemerror) if a user has no `username` or `homedir`.
|
||||
* Throws a [`SystemError`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-systemerror) if a user has no `username` or `homedir`.
|
||||
* @since v6.0.0
|
||||
*/
|
||||
function userInfo(options?: UserInfoOptionsWithStringEncoding): UserInfo<string>;
|
||||
@@ -431,7 +431,7 @@ declare module "os" {
|
||||
* compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`,
|
||||
* `'mips'`, `'mipsel'`, `'ppc64'`, `'riscv64'`, `'s390x'`, and `'x64'`.
|
||||
*
|
||||
* The return value is equivalent to [process.arch](https://nodejs.org/docs/latest-v24.x/api/process.html#processarch).
|
||||
* The return value is equivalent to [process.arch](https://nodejs.org/docs/latest-v25.x/api/process.html#processarch).
|
||||
* @since v0.5.0
|
||||
*/
|
||||
function arch(): NodeJS.Architecture;
|
||||
@@ -502,6 +502,6 @@ declare module "os" {
|
||||
function setPriority(priority: number): void;
|
||||
function setPriority(pid: number, priority: number): void;
|
||||
}
|
||||
declare module "node:os" {
|
||||
export * from "os";
|
||||
declare module "os" {
|
||||
export * from "node:os";
|
||||
}
|
||||
|
||||
4
backend/node_modules/@types/node/package.json
generated
vendored
4
backend/node_modules/@types/node/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@types/node",
|
||||
"version": "24.10.0",
|
||||
"version": "25.2.0",
|
||||
"description": "TypeScript definitions for node",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
||||
"license": "MIT",
|
||||
@@ -150,6 +150,6 @@
|
||||
"undici-types": "~7.16.0"
|
||||
},
|
||||
"peerDependencies": {},
|
||||
"typesPublisherContentHash": "520eb7d36290a7656940213fbf34026408b9af9ff538455bf669b4ea7a21d5bf",
|
||||
"typesPublisherContentHash": "070141665b6c093c16b6b39451f81eb12361c201bfdd3ed8dc437e63f3088059",
|
||||
"typeScriptVersion": "5.2"
|
||||
}
|
||||
265
backend/node_modules/@types/node/path.d.ts
generated
vendored
265
backend/node_modules/@types/node/path.d.ts
generated
vendored
@@ -1,11 +1,3 @@
|
||||
declare module "path/posix" {
|
||||
import path = require("path");
|
||||
export = path;
|
||||
}
|
||||
declare module "path/win32" {
|
||||
import path = require("path");
|
||||
export = path;
|
||||
}
|
||||
/**
|
||||
* The `node:path` module provides utilities for working with file and directory
|
||||
* paths. It can be accessed using:
|
||||
@@ -13,9 +5,9 @@ declare module "path/win32" {
|
||||
* ```js
|
||||
* import path from 'node:path';
|
||||
* ```
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/path.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/path.js)
|
||||
*/
|
||||
declare module "path" {
|
||||
declare module "node:path" {
|
||||
namespace path {
|
||||
/**
|
||||
* A parsed path object generated by path.parse() or consumed by path.format().
|
||||
@@ -64,137 +56,132 @@ declare module "path" {
|
||||
*/
|
||||
name?: string | undefined;
|
||||
}
|
||||
interface PlatformPath {
|
||||
/**
|
||||
* Normalize a string path, reducing '..' and '.' parts.
|
||||
* When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.
|
||||
*
|
||||
* @param path string path to normalize.
|
||||
* @throws {TypeError} if `path` is not a string.
|
||||
*/
|
||||
normalize(path: string): string;
|
||||
/**
|
||||
* Join all arguments together and normalize the resulting path.
|
||||
*
|
||||
* @param paths paths to join.
|
||||
* @throws {TypeError} if any of the path segments is not a string.
|
||||
*/
|
||||
join(...paths: string[]): string;
|
||||
/**
|
||||
* The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
|
||||
*
|
||||
* Starting from leftmost {from} parameter, resolves {to} to an absolute path.
|
||||
*
|
||||
* If {to} isn't already absolute, {from} arguments are prepended in right to left order,
|
||||
* until an absolute path is found. If after using all {from} paths still no absolute path is found,
|
||||
* the current working directory is used as well. The resulting path is normalized,
|
||||
* and trailing slashes are removed unless the path gets resolved to the root directory.
|
||||
*
|
||||
* @param paths A sequence of paths or path segments.
|
||||
* @throws {TypeError} if any of the arguments is not a string.
|
||||
*/
|
||||
resolve(...paths: string[]): string;
|
||||
/**
|
||||
* The `path.matchesGlob()` method determines if `path` matches the `pattern`.
|
||||
* @param path The path to glob-match against.
|
||||
* @param pattern The glob to check the path against.
|
||||
* @returns Whether or not the `path` matched the `pattern`.
|
||||
* @throws {TypeError} if `path` or `pattern` are not strings.
|
||||
* @since v22.5.0
|
||||
*/
|
||||
matchesGlob(path: string, pattern: string): boolean;
|
||||
/**
|
||||
* Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
|
||||
*
|
||||
* If the given {path} is a zero-length string, `false` will be returned.
|
||||
*
|
||||
* @param path path to test.
|
||||
* @throws {TypeError} if `path` is not a string.
|
||||
*/
|
||||
isAbsolute(path: string): boolean;
|
||||
/**
|
||||
* Solve the relative path from {from} to {to} based on the current working directory.
|
||||
* At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve.
|
||||
*
|
||||
* @throws {TypeError} if either `from` or `to` is not a string.
|
||||
*/
|
||||
relative(from: string, to: string): string;
|
||||
/**
|
||||
* Return the directory name of a path. Similar to the Unix dirname command.
|
||||
*
|
||||
* @param path the path to evaluate.
|
||||
* @throws {TypeError} if `path` is not a string.
|
||||
*/
|
||||
dirname(path: string): string;
|
||||
/**
|
||||
* Return the last portion of a path. Similar to the Unix basename command.
|
||||
* Often used to extract the file name from a fully qualified path.
|
||||
*
|
||||
* @param path the path to evaluate.
|
||||
* @param suffix optionally, an extension to remove from the result.
|
||||
* @throws {TypeError} if `path` is not a string or if `ext` is given and is not a string.
|
||||
*/
|
||||
basename(path: string, suffix?: string): string;
|
||||
/**
|
||||
* Return the extension of the path, from the last '.' to end of string in the last portion of the path.
|
||||
* If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string.
|
||||
*
|
||||
* @param path the path to evaluate.
|
||||
* @throws {TypeError} if `path` is not a string.
|
||||
*/
|
||||
extname(path: string): string;
|
||||
/**
|
||||
* The platform-specific file separator. '\\' or '/'.
|
||||
*/
|
||||
readonly sep: "\\" | "/";
|
||||
/**
|
||||
* The platform-specific file delimiter. ';' or ':'.
|
||||
*/
|
||||
readonly delimiter: ";" | ":";
|
||||
/**
|
||||
* Returns an object from a path string - the opposite of format().
|
||||
*
|
||||
* @param path path to evaluate.
|
||||
* @throws {TypeError} if `path` is not a string.
|
||||
*/
|
||||
parse(path: string): ParsedPath;
|
||||
/**
|
||||
* Returns a path string from an object - the opposite of parse().
|
||||
*
|
||||
* @param pathObject path to evaluate.
|
||||
*/
|
||||
format(pathObject: FormatInputPathObject): string;
|
||||
/**
|
||||
* On Windows systems only, returns an equivalent namespace-prefixed path for the given path.
|
||||
* If path is not a string, path will be returned without modifications.
|
||||
* This method is meaningful only on Windows system.
|
||||
* On POSIX systems, the method is non-operational and always returns path without modifications.
|
||||
*/
|
||||
toNamespacedPath(path: string): string;
|
||||
/**
|
||||
* Posix specific pathing.
|
||||
* Same as parent object on posix.
|
||||
*/
|
||||
readonly posix: PlatformPath;
|
||||
/**
|
||||
* Windows specific pathing.
|
||||
* Same as parent object on windows
|
||||
*/
|
||||
readonly win32: PlatformPath;
|
||||
}
|
||||
/**
|
||||
* Normalize a string path, reducing '..' and '.' parts.
|
||||
* When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. If the path is a zero-length string, '.' is returned, representing the current working directory.
|
||||
*
|
||||
* @param path string path to normalize.
|
||||
* @throws {TypeError} if `path` is not a string.
|
||||
*/
|
||||
function normalize(path: string): string;
|
||||
/**
|
||||
* Join all arguments together and normalize the resulting path.
|
||||
*
|
||||
* @param paths paths to join.
|
||||
* @throws {TypeError} if any of the path segments is not a string.
|
||||
*/
|
||||
function join(...paths: string[]): string;
|
||||
/**
|
||||
* The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
|
||||
*
|
||||
* Starting from leftmost {from} parameter, resolves {to} to an absolute path.
|
||||
*
|
||||
* If {to} isn't already absolute, {from} arguments are prepended in right to left order,
|
||||
* until an absolute path is found. If after using all {from} paths still no absolute path is found,
|
||||
* the current working directory is used as well. The resulting path is normalized,
|
||||
* and trailing slashes are removed unless the path gets resolved to the root directory.
|
||||
*
|
||||
* @param paths A sequence of paths or path segments.
|
||||
* @throws {TypeError} if any of the arguments is not a string.
|
||||
*/
|
||||
function resolve(...paths: string[]): string;
|
||||
/**
|
||||
* The `path.matchesGlob()` method determines if `path` matches the `pattern`.
|
||||
* @param path The path to glob-match against.
|
||||
* @param pattern The glob to check the path against.
|
||||
* @returns Whether or not the `path` matched the `pattern`.
|
||||
* @throws {TypeError} if `path` or `pattern` are not strings.
|
||||
* @since v22.5.0
|
||||
*/
|
||||
function matchesGlob(path: string, pattern: string): boolean;
|
||||
/**
|
||||
* Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
|
||||
*
|
||||
* If the given {path} is a zero-length string, `false` will be returned.
|
||||
*
|
||||
* @param path path to test.
|
||||
* @throws {TypeError} if `path` is not a string.
|
||||
*/
|
||||
function isAbsolute(path: string): boolean;
|
||||
/**
|
||||
* Solve the relative path from {from} to {to} based on the current working directory.
|
||||
* At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve.
|
||||
*
|
||||
* @throws {TypeError} if either `from` or `to` is not a string.
|
||||
*/
|
||||
function relative(from: string, to: string): string;
|
||||
/**
|
||||
* Return the directory name of a path. Similar to the Unix dirname command.
|
||||
*
|
||||
* @param path the path to evaluate.
|
||||
* @throws {TypeError} if `path` is not a string.
|
||||
*/
|
||||
function dirname(path: string): string;
|
||||
/**
|
||||
* Return the last portion of a path. Similar to the Unix basename command.
|
||||
* Often used to extract the file name from a fully qualified path.
|
||||
*
|
||||
* @param path the path to evaluate.
|
||||
* @param suffix optionally, an extension to remove from the result.
|
||||
* @throws {TypeError} if `path` is not a string or if `ext` is given and is not a string.
|
||||
*/
|
||||
function basename(path: string, suffix?: string): string;
|
||||
/**
|
||||
* Return the extension of the path, from the last '.' to end of string in the last portion of the path.
|
||||
* If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string.
|
||||
*
|
||||
* @param path the path to evaluate.
|
||||
* @throws {TypeError} if `path` is not a string.
|
||||
*/
|
||||
function extname(path: string): string;
|
||||
/**
|
||||
* The platform-specific file separator. '\\' or '/'.
|
||||
*/
|
||||
const sep: "\\" | "/";
|
||||
/**
|
||||
* The platform-specific file delimiter. ';' or ':'.
|
||||
*/
|
||||
const delimiter: ";" | ":";
|
||||
/**
|
||||
* Returns an object from a path string - the opposite of format().
|
||||
*
|
||||
* @param path path to evaluate.
|
||||
* @throws {TypeError} if `path` is not a string.
|
||||
*/
|
||||
function parse(path: string): ParsedPath;
|
||||
/**
|
||||
* Returns a path string from an object - the opposite of parse().
|
||||
*
|
||||
* @param pathObject path to evaluate.
|
||||
*/
|
||||
function format(pathObject: FormatInputPathObject): string;
|
||||
/**
|
||||
* On Windows systems only, returns an equivalent namespace-prefixed path for the given path.
|
||||
* If path is not a string, path will be returned without modifications.
|
||||
* This method is meaningful only on Windows system.
|
||||
* On POSIX systems, the method is non-operational and always returns path without modifications.
|
||||
*/
|
||||
function toNamespacedPath(path: string): string;
|
||||
}
|
||||
namespace path {
|
||||
export {
|
||||
/**
|
||||
* The `path.posix` property provides access to POSIX specific implementations of the `path` methods.
|
||||
*
|
||||
* The API is accessible via `require('node:path').posix` or `require('node:path/posix')`.
|
||||
*/
|
||||
path as posix,
|
||||
/**
|
||||
* The `path.win32` property provides access to Windows-specific implementations of the `path` methods.
|
||||
*
|
||||
* The API is accessible via `require('node:path').win32` or `require('node:path/win32')`.
|
||||
*/
|
||||
path as win32,
|
||||
};
|
||||
}
|
||||
const path: path.PlatformPath;
|
||||
export = path;
|
||||
}
|
||||
declare module "node:path" {
|
||||
import path = require("path");
|
||||
export = path;
|
||||
}
|
||||
declare module "node:path/posix" {
|
||||
import path = require("path/posix");
|
||||
export = path;
|
||||
}
|
||||
declare module "node:path/win32" {
|
||||
import path = require("path/win32");
|
||||
declare module "path" {
|
||||
import path = require("node:path");
|
||||
export = path;
|
||||
}
|
||||
|
||||
957
backend/node_modules/@types/node/perf_hooks.d.ts
generated
vendored
957
backend/node_modules/@types/node/perf_hooks.d.ts
generated
vendored
File diff suppressed because it is too large
Load Diff
339
backend/node_modules/@types/node/process.d.ts
generated
vendored
339
backend/node_modules/@types/node/process.d.ts
generated
vendored
@@ -1,9 +1,8 @@
|
||||
declare module "process" {
|
||||
declare module "node:process" {
|
||||
import { Control, MessageOptions, SendHandle } from "node:child_process";
|
||||
import { PathLike } from "node:fs";
|
||||
import * as tty from "node:tty";
|
||||
import { Worker } from "node:worker_threads";
|
||||
|
||||
interface BuiltInModule {
|
||||
"assert": typeof import("assert");
|
||||
"node:assert": typeof import("node:assert");
|
||||
@@ -69,6 +68,7 @@ declare module "process" {
|
||||
"node:punycode": typeof import("node:punycode");
|
||||
"querystring": typeof import("querystring");
|
||||
"node:querystring": typeof import("node:querystring");
|
||||
"node:quic": typeof import("node:quic");
|
||||
"readline": typeof import("readline");
|
||||
"node:readline": typeof import("node:readline");
|
||||
"readline/promises": typeof import("readline/promises");
|
||||
@@ -103,8 +103,6 @@ declare module "process" {
|
||||
"node:url": typeof import("node:url");
|
||||
"util": typeof import("util");
|
||||
"node:util": typeof import("node:util");
|
||||
"sys": typeof import("util");
|
||||
"node:sys": typeof import("node:util");
|
||||
"util/types": typeof import("util/types");
|
||||
"node:util/types": typeof import("node:util/types");
|
||||
"v8": typeof import("v8");
|
||||
@@ -118,8 +116,28 @@ declare module "process" {
|
||||
"zlib": typeof import("zlib");
|
||||
"node:zlib": typeof import("node:zlib");
|
||||
}
|
||||
type SignalsEventMap = { [S in NodeJS.Signals]: [signal: S] };
|
||||
interface ProcessEventMap extends SignalsEventMap {
|
||||
"beforeExit": [code: number];
|
||||
"disconnect": [];
|
||||
"exit": [code: number];
|
||||
"message": [
|
||||
message: object | boolean | number | string | null,
|
||||
sendHandle: SendHandle | undefined,
|
||||
];
|
||||
"rejectionHandled": [promise: Promise<unknown>];
|
||||
"uncaughtException": [error: Error, origin: NodeJS.UncaughtExceptionOrigin];
|
||||
"uncaughtExceptionMonitor": [error: Error, origin: NodeJS.UncaughtExceptionOrigin];
|
||||
"unhandledRejection": [reason: unknown, promise: Promise<unknown>];
|
||||
"warning": [warning: Error];
|
||||
"worker": [worker: Worker];
|
||||
"workerMessage": [value: any, source: number];
|
||||
}
|
||||
global {
|
||||
var process: NodeJS.Process;
|
||||
namespace process {
|
||||
export { ProcessEventMap };
|
||||
}
|
||||
namespace NodeJS {
|
||||
// this namespace merge is here because these are specifically used
|
||||
// as the type for process.stdin, process.stdout, and process.stderr.
|
||||
@@ -196,7 +214,7 @@ declare module "process" {
|
||||
readonly ipv6: boolean;
|
||||
/**
|
||||
* A boolean value that is `true` if the current Node.js build supports
|
||||
* [loading ECMAScript modules using `require()`](https://nodejs.org/docs/latest-v24.x/api/modules.md#loading-ecmascript-modules-using-require).
|
||||
* [loading ECMAScript modules using `require()`](https://nodejs.org/docs/latest-v25.x/api/modules.md#loading-ecmascript-modules-using-require).
|
||||
* @since v22.10.0
|
||||
*/
|
||||
readonly require_module: boolean;
|
||||
@@ -235,7 +253,7 @@ declare module "process" {
|
||||
/**
|
||||
* A value that is `"strip"` by default,
|
||||
* `"transform"` if Node.js is run with `--experimental-transform-types`, and `false` if
|
||||
* Node.js is run with `--no-experimental-strip-types`.
|
||||
* Node.js is run with `--no-strip-types`.
|
||||
* @since v22.10.0
|
||||
*/
|
||||
readonly typescript: "strip" | "transform" | false;
|
||||
@@ -320,26 +338,129 @@ declare module "process" {
|
||||
| "SIGLOST"
|
||||
| "SIGINFO";
|
||||
type UncaughtExceptionOrigin = "uncaughtException" | "unhandledRejection";
|
||||
type MultipleResolveType = "resolve" | "reject";
|
||||
type BeforeExitListener = (code: number) => void;
|
||||
type DisconnectListener = () => void;
|
||||
type ExitListener = (code: number) => void;
|
||||
type RejectionHandledListener = (promise: Promise<unknown>) => void;
|
||||
type UncaughtExceptionListener = (error: Error, origin: UncaughtExceptionOrigin) => void;
|
||||
/**
|
||||
* Most of the time the unhandledRejection will be an Error, but this should not be relied upon
|
||||
* as *anything* can be thrown/rejected, it is therefore unsafe to assume that the value is an Error.
|
||||
* @deprecated Global listener types will be removed in a future version.
|
||||
* Callbacks passed directly to `process`'s EventEmitter methods
|
||||
* have their parameter types inferred automatically.
|
||||
*
|
||||
* `process` event types are also available via `ProcessEventMap`:
|
||||
*
|
||||
* ```ts
|
||||
* import type { ProcessEventMap } from 'node:process';
|
||||
* const listener = (...args: ProcessEventMap['beforeExit']) => { ... };
|
||||
* ```
|
||||
*/
|
||||
type BeforeExitListener = (...args: ProcessEventMap["beforeExit"]) => void;
|
||||
/**
|
||||
* @deprecated Global listener types will be removed in a future version.
|
||||
* Callbacks passed directly to `process`'s EventEmitter methods
|
||||
* have their parameter types inferred automatically.
|
||||
*
|
||||
* `process` event types are also available via `ProcessEventMap`:
|
||||
*
|
||||
* ```ts
|
||||
* import type { ProcessEventMap } from 'node:process';
|
||||
* const listener = (...args: ProcessEventMap['disconnect']) => { ... };
|
||||
* ```
|
||||
*/
|
||||
type DisconnectListener = (...args: ProcessEventMap["disconnect"]) => void;
|
||||
/**
|
||||
* @deprecated Global listener types will be removed in a future version.
|
||||
* Callbacks passed directly to `process`'s EventEmitter methods
|
||||
* have their parameter types inferred automatically.
|
||||
*
|
||||
* `process` event types are also available via `ProcessEventMap`:
|
||||
*
|
||||
* ```ts
|
||||
* import type { ProcessEventMap } from 'node:process';
|
||||
* const listener = (...args: ProcessEventMap['exit']) => { ... };
|
||||
* ```
|
||||
*/
|
||||
type ExitListener = (...args: ProcessEventMap["exit"]) => void;
|
||||
/**
|
||||
* @deprecated Global listener types will be removed in a future version.
|
||||
* Callbacks passed directly to `process`'s EventEmitter methods
|
||||
* have their parameter types inferred automatically.
|
||||
*
|
||||
* `process` event types are also available via `ProcessEventMap`:
|
||||
*
|
||||
* ```ts
|
||||
* import type { ProcessEventMap } from 'node:process';
|
||||
* const listener = (...args: ProcessEventMap['message']) => { ... };
|
||||
* ```
|
||||
*/
|
||||
type MessageListener = (...args: ProcessEventMap["message"]) => void;
|
||||
/**
|
||||
* @deprecated Global listener types will be removed in a future version.
|
||||
* Callbacks passed directly to `process`'s EventEmitter methods
|
||||
* have their parameter types inferred automatically.
|
||||
*
|
||||
* `process` event types are also available via `ProcessEventMap`:
|
||||
*
|
||||
* ```ts
|
||||
* import type { ProcessEventMap } from 'node:process';
|
||||
* const listener = (...args: ProcessEventMap['rejectionHandled']) => { ... };
|
||||
* ```
|
||||
*/
|
||||
type RejectionHandledListener = (...args: ProcessEventMap["rejectionHandled"]) => void;
|
||||
/**
|
||||
* @deprecated Global listener types will be removed in a future version.
|
||||
* Callbacks passed directly to `process`'s EventEmitter methods
|
||||
* have their parameter types inferred automatically.
|
||||
*/
|
||||
type UnhandledRejectionListener = (reason: unknown, promise: Promise<unknown>) => void;
|
||||
type WarningListener = (warning: Error) => void;
|
||||
type MessageListener = (message: unknown, sendHandle: SendHandle) => void;
|
||||
type SignalsListener = (signal: Signals) => void;
|
||||
type MultipleResolveListener = (
|
||||
type: MultipleResolveType,
|
||||
promise: Promise<unknown>,
|
||||
value: unknown,
|
||||
) => void;
|
||||
type WorkerListener = (worker: Worker) => void;
|
||||
/**
|
||||
* @deprecated Global listener types will be removed in a future version.
|
||||
* Callbacks passed directly to `process`'s EventEmitter methods
|
||||
* have their parameter types inferred automatically.
|
||||
*
|
||||
* `process` event types are also available via `ProcessEventMap`:
|
||||
*
|
||||
* ```ts
|
||||
* import type { ProcessEventMap } from 'node:process';
|
||||
* const listener = (...args: ProcessEventMap['uncaughtException']) => { ... };
|
||||
* ```
|
||||
*/
|
||||
type UncaughtExceptionListener = (...args: ProcessEventMap["uncaughtException"]) => void;
|
||||
/**
|
||||
* @deprecated Global listener types will be removed in a future version.
|
||||
* Callbacks passed directly to `process`'s EventEmitter methods
|
||||
* have their parameter types inferred automatically.
|
||||
*
|
||||
* `process` event types are also available via `ProcessEventMap`:
|
||||
*
|
||||
* ```ts
|
||||
* import type { ProcessEventMap } from 'node:process';
|
||||
* const listener = (...args: ProcessEventMap['unhandledRejection']) => { ... };
|
||||
* ```
|
||||
*/
|
||||
type UnhandledRejectionListener = (...args: ProcessEventMap["unhandledRejection"]) => void;
|
||||
/**
|
||||
* @deprecated Global listener types will be removed in a future version.
|
||||
* Callbacks passed directly to `process`'s EventEmitter methods
|
||||
* have their parameter types inferred automatically.
|
||||
*
|
||||
* `process` event types are also available via `ProcessEventMap`:
|
||||
*
|
||||
* ```ts
|
||||
* import type { ProcessEventMap } from 'node:process';
|
||||
* const listener = (...args: ProcessEventMap['warning']) => { ... };
|
||||
* ```
|
||||
*/
|
||||
type WarningListener = (...args: ProcessEventMap["warning"]) => void;
|
||||
/**
|
||||
* @deprecated Global listener types will be removed in a future version.
|
||||
* Callbacks passed directly to `process`'s EventEmitter methods
|
||||
* have their parameter types inferred automatically.
|
||||
*
|
||||
* `process` event types are also available via `ProcessEventMap`:
|
||||
*
|
||||
* ```ts
|
||||
* import type { ProcessEventMap } from 'node:process';
|
||||
* const listener = (...args: ProcessEventMap['worker']) => { ... };
|
||||
* ```
|
||||
*/
|
||||
type WorkerListener = (...args: ProcessEventMap["worker"]) => void;
|
||||
interface Socket extends ReadWriteStream {
|
||||
isTTY?: true | undefined;
|
||||
}
|
||||
@@ -472,6 +593,11 @@ declare module "process" {
|
||||
* @default false
|
||||
*/
|
||||
reportOnUncaughtException: boolean;
|
||||
/**
|
||||
* If true, a diagnostic report is generated without the environment variables.
|
||||
* @default false
|
||||
*/
|
||||
excludeEnv: boolean;
|
||||
/**
|
||||
* The signal used to trigger the creation of a diagnostic report.
|
||||
* @default 'SIGUSR2'
|
||||
@@ -749,7 +875,7 @@ declare module "process" {
|
||||
* should not be used directly, except in special cases. In other words, `require()` should be preferred over `process.dlopen()`
|
||||
* unless there are specific reasons such as custom dlopen flags or loading from ES modules.
|
||||
*
|
||||
* The `flags` argument is an integer that allows to specify dlopen behavior. See the `[os.constants.dlopen](https://nodejs.org/docs/latest-v24.x/api/os.html#dlopen-constants)`
|
||||
* The `flags` argument is an integer that allows to specify dlopen behavior. See the `[os.constants.dlopen](https://nodejs.org/docs/latest-v25.x/api/os.html#dlopen-constants)`
|
||||
* documentation for details.
|
||||
*
|
||||
* An important requirement when calling `process.dlopen()` is that the `module` instance must be passed. Functions exported by the C++ Addon
|
||||
@@ -1584,7 +1710,7 @@ declare module "process" {
|
||||
constrainedMemory(): number;
|
||||
/**
|
||||
* Gets the amount of free memory that is still available to the process (in bytes).
|
||||
* See [`uv_get_available_memory`](https://nodejs.org/docs/latest-v24.x/api/process.html#processavailablememory) for more information.
|
||||
* See [`uv_get_available_memory`](https://nodejs.org/docs/latest-v25.x/api/process.html#processavailablememory) for more information.
|
||||
* @since v20.13.0
|
||||
*/
|
||||
availableMemory(): number;
|
||||
@@ -1704,6 +1830,11 @@ declare module "process" {
|
||||
* @param args Additional arguments to pass when invoking the `callback`
|
||||
*/
|
||||
nextTick(callback: Function, ...args: any[]): void;
|
||||
/**
|
||||
* The process.noDeprecation property indicates whether the --no-deprecation flag is set on the current Node.js process.
|
||||
* See the documentation for the ['warning' event](https://nodejs.org/docs/latest/api/process.html#event-warning) and the [emitWarning()](https://nodejs.org/docs/latest/api/process.html#processemitwarningwarning-type-code-ctor) method for more information about this flag's behavior.
|
||||
*/
|
||||
noDeprecation?: boolean;
|
||||
/**
|
||||
* This API is available through the [--permission](https://nodejs.org/api/cli.html#--permission) flag.
|
||||
*
|
||||
@@ -1780,6 +1911,15 @@ declare module "process" {
|
||||
options?: MessageOptions,
|
||||
callback?: (error: Error | null) => void,
|
||||
): boolean;
|
||||
send?(
|
||||
message: any,
|
||||
sendHandle: SendHandle,
|
||||
callback?: (error: Error | null) => void,
|
||||
): boolean;
|
||||
send?(
|
||||
message: any,
|
||||
callback: (error: Error | null) => void,
|
||||
): boolean;
|
||||
/**
|
||||
* If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.disconnect()` method will close the
|
||||
* IPC channel to the parent process, allowing the child process to exit gracefully
|
||||
@@ -1790,7 +1930,7 @@ declare module "process" {
|
||||
* If the Node.js process was not spawned with an IPC channel, `process.disconnect()` will be `undefined`.
|
||||
* @since v0.7.2
|
||||
*/
|
||||
disconnect(): void;
|
||||
disconnect?(): void;
|
||||
/**
|
||||
* If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.connected` property will return `true` so long as the IPC
|
||||
* channel is connected and will return `false` after `process.disconnect()` is called.
|
||||
@@ -1844,7 +1984,7 @@ declare module "process" {
|
||||
allowedNodeEnvironmentFlags: ReadonlySet<string>;
|
||||
/**
|
||||
* `process.report` is an object whose methods are used to generate diagnostic reports for the current process.
|
||||
* Additional documentation is available in the [report documentation](https://nodejs.org/docs/latest-v24.x/api/report.html).
|
||||
* Additional documentation is available in the [report documentation](https://nodejs.org/docs/latest-v25.x/api/report.html).
|
||||
* @since v11.8.0
|
||||
*/
|
||||
report: ProcessReport;
|
||||
@@ -1959,104 +2099,63 @@ declare module "process" {
|
||||
* **Default:** `process.env`.
|
||||
*/
|
||||
execve?(file: string, args?: readonly string[], env?: ProcessEnv): never;
|
||||
/* EventEmitter */
|
||||
addListener(event: "beforeExit", listener: BeforeExitListener): this;
|
||||
addListener(event: "disconnect", listener: DisconnectListener): this;
|
||||
addListener(event: "exit", listener: ExitListener): this;
|
||||
addListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
|
||||
addListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
|
||||
addListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
|
||||
addListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
|
||||
addListener(event: "warning", listener: WarningListener): this;
|
||||
addListener(event: "message", listener: MessageListener): this;
|
||||
addListener(event: Signals, listener: SignalsListener): this;
|
||||
addListener(event: "multipleResolves", listener: MultipleResolveListener): this;
|
||||
addListener(event: "worker", listener: WorkerListener): this;
|
||||
emit(event: "beforeExit", code: number): boolean;
|
||||
emit(event: "disconnect"): boolean;
|
||||
emit(event: "exit", code: number): boolean;
|
||||
emit(event: "rejectionHandled", promise: Promise<unknown>): boolean;
|
||||
emit(event: "uncaughtException", error: Error): boolean;
|
||||
emit(event: "uncaughtExceptionMonitor", error: Error): boolean;
|
||||
emit(event: "unhandledRejection", reason: unknown, promise: Promise<unknown>): boolean;
|
||||
emit(event: "warning", warning: Error): boolean;
|
||||
emit(event: "message", message: unknown, sendHandle: SendHandle): this;
|
||||
emit(event: Signals, signal?: Signals): boolean;
|
||||
emit(
|
||||
event: "multipleResolves",
|
||||
type: MultipleResolveType,
|
||||
promise: Promise<unknown>,
|
||||
value: unknown,
|
||||
// #region InternalEventEmitter
|
||||
addListener<E extends keyof ProcessEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ProcessEventMap[E]) => void,
|
||||
): this;
|
||||
emit(event: "worker", listener: WorkerListener): this;
|
||||
on(event: "beforeExit", listener: BeforeExitListener): this;
|
||||
on(event: "disconnect", listener: DisconnectListener): this;
|
||||
on(event: "exit", listener: ExitListener): this;
|
||||
on(event: "rejectionHandled", listener: RejectionHandledListener): this;
|
||||
on(event: "uncaughtException", listener: UncaughtExceptionListener): this;
|
||||
on(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
|
||||
on(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
|
||||
on(event: "warning", listener: WarningListener): this;
|
||||
on(event: "message", listener: MessageListener): this;
|
||||
on(event: Signals, listener: SignalsListener): this;
|
||||
on(event: "multipleResolves", listener: MultipleResolveListener): this;
|
||||
on(event: "worker", listener: WorkerListener): this;
|
||||
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
once(event: "beforeExit", listener: BeforeExitListener): this;
|
||||
once(event: "disconnect", listener: DisconnectListener): this;
|
||||
once(event: "exit", listener: ExitListener): this;
|
||||
once(event: "rejectionHandled", listener: RejectionHandledListener): this;
|
||||
once(event: "uncaughtException", listener: UncaughtExceptionListener): this;
|
||||
once(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
|
||||
once(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
|
||||
once(event: "warning", listener: WarningListener): this;
|
||||
once(event: "message", listener: MessageListener): this;
|
||||
once(event: Signals, listener: SignalsListener): this;
|
||||
once(event: "multipleResolves", listener: MultipleResolveListener): this;
|
||||
once(event: "worker", listener: WorkerListener): this;
|
||||
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependListener(event: "beforeExit", listener: BeforeExitListener): this;
|
||||
prependListener(event: "disconnect", listener: DisconnectListener): this;
|
||||
prependListener(event: "exit", listener: ExitListener): this;
|
||||
prependListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
|
||||
prependListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
|
||||
prependListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
|
||||
prependListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
|
||||
prependListener(event: "warning", listener: WarningListener): this;
|
||||
prependListener(event: "message", listener: MessageListener): this;
|
||||
prependListener(event: Signals, listener: SignalsListener): this;
|
||||
prependListener(event: "multipleResolves", listener: MultipleResolveListener): this;
|
||||
prependListener(event: "worker", listener: WorkerListener): this;
|
||||
prependOnceListener(event: "beforeExit", listener: BeforeExitListener): this;
|
||||
prependOnceListener(event: "disconnect", listener: DisconnectListener): this;
|
||||
prependOnceListener(event: "exit", listener: ExitListener): this;
|
||||
prependOnceListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
|
||||
prependOnceListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
|
||||
prependOnceListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
|
||||
prependOnceListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
|
||||
prependOnceListener(event: "warning", listener: WarningListener): this;
|
||||
prependOnceListener(event: "message", listener: MessageListener): this;
|
||||
prependOnceListener(event: Signals, listener: SignalsListener): this;
|
||||
prependOnceListener(event: "multipleResolves", listener: MultipleResolveListener): this;
|
||||
prependOnceListener(event: "worker", listener: WorkerListener): this;
|
||||
listeners(event: "beforeExit"): BeforeExitListener[];
|
||||
listeners(event: "disconnect"): DisconnectListener[];
|
||||
listeners(event: "exit"): ExitListener[];
|
||||
listeners(event: "rejectionHandled"): RejectionHandledListener[];
|
||||
listeners(event: "uncaughtException"): UncaughtExceptionListener[];
|
||||
listeners(event: "uncaughtExceptionMonitor"): UncaughtExceptionListener[];
|
||||
listeners(event: "unhandledRejection"): UnhandledRejectionListener[];
|
||||
listeners(event: "warning"): WarningListener[];
|
||||
listeners(event: "message"): MessageListener[];
|
||||
listeners(event: Signals): SignalsListener[];
|
||||
listeners(event: "multipleResolves"): MultipleResolveListener[];
|
||||
listeners(event: "worker"): WorkerListener[];
|
||||
addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
emit<E extends keyof ProcessEventMap>(eventName: E, ...args: ProcessEventMap[E]): boolean;
|
||||
emit(eventName: string | symbol, ...args: any[]): boolean;
|
||||
listenerCount<E extends keyof ProcessEventMap>(
|
||||
eventName: E,
|
||||
listener?: (...args: ProcessEventMap[E]) => void,
|
||||
): number;
|
||||
listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
|
||||
listeners<E extends keyof ProcessEventMap>(eventName: E): ((...args: ProcessEventMap[E]) => void)[];
|
||||
listeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
||||
off<E extends keyof ProcessEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ProcessEventMap[E]) => void,
|
||||
): this;
|
||||
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
on<E extends keyof ProcessEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ProcessEventMap[E]) => void,
|
||||
): this;
|
||||
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
once<E extends keyof ProcessEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ProcessEventMap[E]) => void,
|
||||
): this;
|
||||
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependListener<E extends keyof ProcessEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ProcessEventMap[E]) => void,
|
||||
): this;
|
||||
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener<E extends keyof ProcessEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ProcessEventMap[E]) => void,
|
||||
): this;
|
||||
prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
rawListeners<E extends keyof ProcessEventMap>(eventName: E): ((...args: ProcessEventMap[E]) => void)[];
|
||||
rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
||||
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
||||
removeAllListeners<E extends keyof ProcessEventMap>(eventName?: E): this;
|
||||
removeAllListeners(eventName?: string | symbol): this;
|
||||
removeListener<E extends keyof ProcessEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ProcessEventMap[E]) => void,
|
||||
): this;
|
||||
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
// #endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
export = process;
|
||||
}
|
||||
declare module "node:process" {
|
||||
import process = require("process");
|
||||
declare module "process" {
|
||||
import process = require("node:process");
|
||||
export = process;
|
||||
}
|
||||
|
||||
10
backend/node_modules/@types/node/punycode.d.ts
generated
vendored
10
backend/node_modules/@types/node/punycode.d.ts
generated
vendored
@@ -23,10 +23,10 @@
|
||||
* The `punycode` module is a third-party dependency used by Node.js and
|
||||
* made available to developers as a convenience. Fixes or other modifications to
|
||||
* the module must be directed to the [Punycode.js](https://github.com/bestiejs/punycode.js) project.
|
||||
* @deprecated Since v7.0.0 - Deprecated
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/punycode.js)
|
||||
* @deprecated
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/punycode.js)
|
||||
*/
|
||||
declare module "punycode" {
|
||||
declare module "node:punycode" {
|
||||
/**
|
||||
* The `punycode.decode()` method converts a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only
|
||||
* characters to the equivalent string of Unicode codepoints.
|
||||
@@ -112,6 +112,6 @@ declare module "punycode" {
|
||||
*/
|
||||
const version: string;
|
||||
}
|
||||
declare module "node:punycode" {
|
||||
export * from "punycode";
|
||||
declare module "punycode" {
|
||||
export * from "node:punycode";
|
||||
}
|
||||
|
||||
8
backend/node_modules/@types/node/querystring.d.ts
generated
vendored
8
backend/node_modules/@types/node/querystring.d.ts
generated
vendored
@@ -9,9 +9,9 @@
|
||||
* `querystring` is more performant than `URLSearchParams` but is not a
|
||||
* standardized API. Use `URLSearchParams` when performance is not critical or
|
||||
* when compatibility with browser code is desirable.
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/querystring.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/querystring.js)
|
||||
*/
|
||||
declare module "querystring" {
|
||||
declare module "node:querystring" {
|
||||
interface StringifyOptions {
|
||||
/**
|
||||
* The function to use when converting URL-unsafe characters to percent-encoding in the query string.
|
||||
@@ -147,6 +147,6 @@ declare module "querystring" {
|
||||
*/
|
||||
function unescape(str: string): string;
|
||||
}
|
||||
declare module "node:querystring" {
|
||||
export * from "querystring";
|
||||
declare module "querystring" {
|
||||
export * from "node:querystring";
|
||||
}
|
||||
|
||||
187
backend/node_modules/@types/node/readline.d.ts
generated
vendored
187
backend/node_modules/@types/node/readline.d.ts
generated
vendored
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* The `node:readline` module provides an interface for reading data from a [Readable](https://nodejs.org/docs/latest-v24.x/api/stream.html#readable-streams) stream
|
||||
* (such as [`process.stdin`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdin)) one line at a time.
|
||||
* The `node:readline` module provides an interface for reading data from a [Readable](https://nodejs.org/docs/latest-v25.x/api/stream.html#readable-streams) stream
|
||||
* (such as [`process.stdin`](https://nodejs.org/docs/latest-v25.x/api/process.html#processstdin)) one line at a time.
|
||||
*
|
||||
* To use the promise-based APIs:
|
||||
*
|
||||
@@ -31,27 +31,58 @@
|
||||
*
|
||||
* Once this code is invoked, the Node.js application will not terminate until the `readline.Interface` is closed because the interface waits for data to be
|
||||
* received on the `input` stream.
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/readline.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/readline.js)
|
||||
*/
|
||||
declare module "readline" {
|
||||
import { Abortable, EventEmitter } from "node:events";
|
||||
import * as promises from "node:readline/promises";
|
||||
export { promises };
|
||||
export interface Key {
|
||||
declare module "node:readline" {
|
||||
import { Abortable, EventEmitter, InternalEventEmitter } from "node:events";
|
||||
interface Key {
|
||||
sequence?: string | undefined;
|
||||
name?: string | undefined;
|
||||
ctrl?: boolean | undefined;
|
||||
meta?: boolean | undefined;
|
||||
shift?: boolean | undefined;
|
||||
}
|
||||
interface InterfaceEventMap {
|
||||
"close": [];
|
||||
"history": [history: string[]];
|
||||
"line": [input: string];
|
||||
"pause": [];
|
||||
"resume": [];
|
||||
"SIGCONT": [];
|
||||
"SIGINT": [];
|
||||
"SIGTSTP": [];
|
||||
}
|
||||
/**
|
||||
* Instances of the `readline.Interface` class are constructed using the `readline.createInterface()` method. Every instance is associated with a
|
||||
* single `input` [Readable](https://nodejs.org/docs/latest-v24.x/api/stream.html#readable-streams) stream and a single `output` [Writable](https://nodejs.org/docs/latest-v24.x/api/stream.html#writable-streams) stream.
|
||||
* single `input` [Readable](https://nodejs.org/docs/latest-v25.x/api/stream.html#readable-streams) stream and a single `output` [Writable](https://nodejs.org/docs/latest-v25.x/api/stream.html#writable-streams) stream.
|
||||
* The `output` stream is used to print prompts for user input that arrives on,
|
||||
* and is read from, the `input` stream.
|
||||
* @since v0.1.104
|
||||
*/
|
||||
export class Interface extends EventEmitter implements Disposable {
|
||||
class Interface implements EventEmitter, Disposable {
|
||||
/**
|
||||
* NOTE: According to the documentation:
|
||||
*
|
||||
* > Instances of the `readline.Interface` class are constructed using the
|
||||
* > `readline.createInterface()` method.
|
||||
*
|
||||
* @see https://nodejs.org/dist/latest-v25.x/docs/api/readline.html#class-interfaceconstructor
|
||||
*/
|
||||
protected constructor(
|
||||
input: NodeJS.ReadableStream,
|
||||
output?: NodeJS.WritableStream,
|
||||
completer?: Completer | AsyncCompleter,
|
||||
terminal?: boolean,
|
||||
);
|
||||
/**
|
||||
* NOTE: According to the documentation:
|
||||
*
|
||||
* > Instances of the `readline.Interface` class are constructed using the
|
||||
* > `readline.createInterface()` method.
|
||||
*
|
||||
* @see https://nodejs.org/dist/latest-v25.x/docs/api/readline.html#class-interfaceconstructor
|
||||
*/
|
||||
protected constructor(options: ReadLineOptions);
|
||||
readonly terminal: boolean;
|
||||
/**
|
||||
* The current input data being processed by node.
|
||||
@@ -94,29 +125,6 @@ declare module "readline" {
|
||||
* @since v0.1.98
|
||||
*/
|
||||
readonly cursor: number;
|
||||
/**
|
||||
* NOTE: According to the documentation:
|
||||
*
|
||||
* > Instances of the `readline.Interface` class are constructed using the
|
||||
* > `readline.createInterface()` method.
|
||||
*
|
||||
* @see https://nodejs.org/dist/latest-v24.x/docs/api/readline.html#class-interfaceconstructor
|
||||
*/
|
||||
protected constructor(
|
||||
input: NodeJS.ReadableStream,
|
||||
output?: NodeJS.WritableStream,
|
||||
completer?: Completer | AsyncCompleter,
|
||||
terminal?: boolean,
|
||||
);
|
||||
/**
|
||||
* NOTE: According to the documentation:
|
||||
*
|
||||
* > Instances of the `readline.Interface` class are constructed using the
|
||||
* > `readline.createInterface()` method.
|
||||
*
|
||||
* @see https://nodejs.org/dist/latest-v24.x/docs/api/readline.html#class-interfaceconstructor
|
||||
*/
|
||||
protected constructor(options: ReadLineOptions);
|
||||
/**
|
||||
* The `rl.getPrompt()` method returns the current prompt used by `rl.prompt()`.
|
||||
* @since v15.3.0, v14.17.0
|
||||
@@ -244,87 +252,23 @@ declare module "readline" {
|
||||
* @since v13.5.0, v12.16.0
|
||||
*/
|
||||
getCursorPos(): CursorPos;
|
||||
/**
|
||||
* events.EventEmitter
|
||||
* 1. close
|
||||
* 2. line
|
||||
* 3. pause
|
||||
* 4. resume
|
||||
* 5. SIGCONT
|
||||
* 6. SIGINT
|
||||
* 7. SIGTSTP
|
||||
* 8. history
|
||||
*/
|
||||
addListener(event: string, listener: (...args: any[]) => void): this;
|
||||
addListener(event: "close", listener: () => void): this;
|
||||
addListener(event: "line", listener: (input: string) => void): this;
|
||||
addListener(event: "pause", listener: () => void): this;
|
||||
addListener(event: "resume", listener: () => void): this;
|
||||
addListener(event: "SIGCONT", listener: () => void): this;
|
||||
addListener(event: "SIGINT", listener: () => void): this;
|
||||
addListener(event: "SIGTSTP", listener: () => void): this;
|
||||
addListener(event: "history", listener: (history: string[]) => void): this;
|
||||
emit(event: string | symbol, ...args: any[]): boolean;
|
||||
emit(event: "close"): boolean;
|
||||
emit(event: "line", input: string): boolean;
|
||||
emit(event: "pause"): boolean;
|
||||
emit(event: "resume"): boolean;
|
||||
emit(event: "SIGCONT"): boolean;
|
||||
emit(event: "SIGINT"): boolean;
|
||||
emit(event: "SIGTSTP"): boolean;
|
||||
emit(event: "history", history: string[]): boolean;
|
||||
on(event: string, listener: (...args: any[]) => void): this;
|
||||
on(event: "close", listener: () => void): this;
|
||||
on(event: "line", listener: (input: string) => void): this;
|
||||
on(event: "pause", listener: () => void): this;
|
||||
on(event: "resume", listener: () => void): this;
|
||||
on(event: "SIGCONT", listener: () => void): this;
|
||||
on(event: "SIGINT", listener: () => void): this;
|
||||
on(event: "SIGTSTP", listener: () => void): this;
|
||||
on(event: "history", listener: (history: string[]) => void): this;
|
||||
once(event: string, listener: (...args: any[]) => void): this;
|
||||
once(event: "close", listener: () => void): this;
|
||||
once(event: "line", listener: (input: string) => void): this;
|
||||
once(event: "pause", listener: () => void): this;
|
||||
once(event: "resume", listener: () => void): this;
|
||||
once(event: "SIGCONT", listener: () => void): this;
|
||||
once(event: "SIGINT", listener: () => void): this;
|
||||
once(event: "SIGTSTP", listener: () => void): this;
|
||||
once(event: "history", listener: (history: string[]) => void): this;
|
||||
prependListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependListener(event: "close", listener: () => void): this;
|
||||
prependListener(event: "line", listener: (input: string) => void): this;
|
||||
prependListener(event: "pause", listener: () => void): this;
|
||||
prependListener(event: "resume", listener: () => void): this;
|
||||
prependListener(event: "SIGCONT", listener: () => void): this;
|
||||
prependListener(event: "SIGINT", listener: () => void): this;
|
||||
prependListener(event: "SIGTSTP", listener: () => void): this;
|
||||
prependListener(event: "history", listener: (history: string[]) => void): this;
|
||||
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener(event: "close", listener: () => void): this;
|
||||
prependOnceListener(event: "line", listener: (input: string) => void): this;
|
||||
prependOnceListener(event: "pause", listener: () => void): this;
|
||||
prependOnceListener(event: "resume", listener: () => void): this;
|
||||
prependOnceListener(event: "SIGCONT", listener: () => void): this;
|
||||
prependOnceListener(event: "SIGINT", listener: () => void): this;
|
||||
prependOnceListener(event: "SIGTSTP", listener: () => void): this;
|
||||
prependOnceListener(event: "history", listener: (history: string[]) => void): this;
|
||||
[Symbol.asyncIterator](): NodeJS.AsyncIterator<string>;
|
||||
}
|
||||
export type ReadLine = Interface; // type forwarded for backwards compatibility
|
||||
export type Completer = (line: string) => CompleterResult;
|
||||
export type AsyncCompleter = (
|
||||
interface Interface extends InternalEventEmitter<InterfaceEventMap> {}
|
||||
type ReadLine = Interface; // type forwarded for backwards compatibility
|
||||
type Completer = (line: string) => CompleterResult;
|
||||
type AsyncCompleter = (
|
||||
line: string,
|
||||
callback: (err?: null | Error, result?: CompleterResult) => void,
|
||||
) => void;
|
||||
export type CompleterResult = [string[], string];
|
||||
export interface ReadLineOptions {
|
||||
type CompleterResult = [string[], string];
|
||||
interface ReadLineOptions {
|
||||
/**
|
||||
* The [`Readable`](https://nodejs.org/docs/latest-v24.x/api/stream.html#readable-streams) stream to listen to
|
||||
* The [`Readable`](https://nodejs.org/docs/latest-v25.x/api/stream.html#readable-streams) stream to listen to
|
||||
*/
|
||||
input: NodeJS.ReadableStream;
|
||||
/**
|
||||
* The [`Writable`](https://nodejs.org/docs/latest-v24.x/api/stream.html#writable-streams) stream to write readline data to.
|
||||
* The [`Writable`](https://nodejs.org/docs/latest-v25.x/api/stream.html#writable-streams) stream to write readline data to.
|
||||
*/
|
||||
output?: NodeJS.WritableStream | undefined;
|
||||
/**
|
||||
@@ -369,7 +313,7 @@ declare module "readline" {
|
||||
* `crlfDelay` will be coerced to a number no less than `100`.
|
||||
* It can be set to `Infinity`, in which case
|
||||
* `\r` followed by `\n` will always be considered a single newline
|
||||
* (which may be reasonable for [reading files](https://nodejs.org/docs/latest-v24.x/api/readline.html#example-read-file-stream-line-by-line) with `\r\n` line delimiter).
|
||||
* (which may be reasonable for [reading files](https://nodejs.org/docs/latest-v25.x/api/readline.html#example-read-file-stream-line-by-line) with `\r\n` line delimiter).
|
||||
* @default 100
|
||||
*/
|
||||
crlfDelay?: number | undefined;
|
||||
@@ -422,13 +366,13 @@ declare module "readline" {
|
||||
* waiting for user input, call `process.stdin.unref()`.
|
||||
* @since v0.1.98
|
||||
*/
|
||||
export function createInterface(
|
||||
function createInterface(
|
||||
input: NodeJS.ReadableStream,
|
||||
output?: NodeJS.WritableStream,
|
||||
completer?: Completer | AsyncCompleter,
|
||||
terminal?: boolean,
|
||||
): Interface;
|
||||
export function createInterface(options: ReadLineOptions): Interface;
|
||||
function createInterface(options: ReadLineOptions): Interface;
|
||||
/**
|
||||
* The `readline.emitKeypressEvents()` method causes the given `Readable` stream to begin emitting `'keypress'` events corresponding to received input.
|
||||
*
|
||||
@@ -550,45 +494,48 @@ declare module "readline" {
|
||||
* ```
|
||||
* @since v0.7.7
|
||||
*/
|
||||
export function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;
|
||||
export type Direction = -1 | 0 | 1;
|
||||
export interface CursorPos {
|
||||
function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;
|
||||
type Direction = -1 | 0 | 1;
|
||||
interface CursorPos {
|
||||
rows: number;
|
||||
cols: number;
|
||||
}
|
||||
/**
|
||||
* The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) stream
|
||||
* The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/latest-v25.x/api/tty.html) stream
|
||||
* in a specified direction identified by `dir`.
|
||||
* @since v0.7.7
|
||||
* @param callback Invoked once the operation completes.
|
||||
* @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
|
||||
*/
|
||||
export function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
|
||||
function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
|
||||
/**
|
||||
* The `readline.clearScreenDown()` method clears the given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) stream from
|
||||
* The `readline.clearScreenDown()` method clears the given [TTY](https://nodejs.org/docs/latest-v25.x/api/tty.html) stream from
|
||||
* the current position of the cursor down.
|
||||
* @since v0.7.7
|
||||
* @param callback Invoked once the operation completes.
|
||||
* @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
|
||||
*/
|
||||
export function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
|
||||
function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
|
||||
/**
|
||||
* The `readline.cursorTo()` method moves cursor to the specified position in a
|
||||
* given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) `stream`.
|
||||
* given [TTY](https://nodejs.org/docs/latest-v25.x/api/tty.html) `stream`.
|
||||
* @since v0.7.7
|
||||
* @param callback Invoked once the operation completes.
|
||||
* @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
|
||||
*/
|
||||
export function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
|
||||
function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
|
||||
/**
|
||||
* The `readline.moveCursor()` method moves the cursor _relative_ to its current
|
||||
* position in a given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) `stream`.
|
||||
* position in a given [TTY](https://nodejs.org/docs/latest-v25.x/api/tty.html) `stream`.
|
||||
* @since v0.7.7
|
||||
* @param callback Invoked once the operation completes.
|
||||
* @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
|
||||
*/
|
||||
export function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean;
|
||||
function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean;
|
||||
}
|
||||
declare module "node:readline" {
|
||||
export * from "readline";
|
||||
export * as promises from "node:readline/promises";
|
||||
}
|
||||
declare module "readline" {
|
||||
export * from "node:readline";
|
||||
}
|
||||
|
||||
6
backend/node_modules/@types/node/readline/promises.d.ts
generated
vendored
6
backend/node_modules/@types/node/readline/promises.d.ts
generated
vendored
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @since v17.0.0
|
||||
*/
|
||||
declare module "readline/promises" {
|
||||
declare module "node:readline/promises" {
|
||||
import { Abortable } from "node:events";
|
||||
import {
|
||||
CompleterResult,
|
||||
@@ -156,6 +156,6 @@ declare module "readline/promises" {
|
||||
): Interface;
|
||||
function createInterface(options: ReadLineOptions): Interface;
|
||||
}
|
||||
declare module "node:readline/promises" {
|
||||
export * from "readline/promises";
|
||||
declare module "readline/promises" {
|
||||
export * from "node:readline/promises";
|
||||
}
|
||||
|
||||
173
backend/node_modules/@types/node/repl.d.ts
generated
vendored
173
backend/node_modules/@types/node/repl.d.ts
generated
vendored
@@ -6,12 +6,12 @@
|
||||
* ```js
|
||||
* import repl from 'node:repl';
|
||||
* ```
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/repl.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/repl.js)
|
||||
*/
|
||||
declare module "repl" {
|
||||
import { AsyncCompleter, Completer, Interface } from "node:readline";
|
||||
import { Context } from "node:vm";
|
||||
declare module "node:repl" {
|
||||
import { AsyncCompleter, Completer, Interface, InterfaceEventMap } from "node:readline";
|
||||
import { InspectOptions } from "node:util";
|
||||
import { Context } from "node:vm";
|
||||
interface ReplOptions {
|
||||
/**
|
||||
* The input prompt to display.
|
||||
@@ -39,7 +39,7 @@ declare module "repl" {
|
||||
* The function to be used when evaluating each given line of input.
|
||||
* **Default:** an async wrapper for the JavaScript `eval()` function. An `eval` function can
|
||||
* error with `repl.Recoverable` to indicate the input was incomplete and prompt for
|
||||
* additional lines. See the [custom evaluation functions](https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#custom-evaluation-functions)
|
||||
* additional lines. See the [custom evaluation functions](https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#custom-evaluation-functions)
|
||||
* section for more details.
|
||||
*/
|
||||
eval?: REPLEval | undefined;
|
||||
@@ -72,13 +72,13 @@ declare module "repl" {
|
||||
* The function to invoke to format the output of each command before writing to `output`.
|
||||
* @default a wrapper for `util.inspect`
|
||||
*
|
||||
* @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_customizing_repl_output
|
||||
* @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_customizing_repl_output
|
||||
*/
|
||||
writer?: REPLWriter | undefined;
|
||||
/**
|
||||
* An optional function used for custom Tab auto completion.
|
||||
*
|
||||
* @see https://nodejs.org/dist/latest-v24.x/docs/api/readline.html#readline_use_of_the_completer_function
|
||||
* @see https://nodejs.org/dist/latest-v25.x/docs/api/readline.html#readline_use_of_the_completer_function
|
||||
*/
|
||||
completer?: Completer | AsyncCompleter | undefined;
|
||||
/**
|
||||
@@ -129,6 +129,10 @@ declare module "repl" {
|
||||
removeHistoryDuplicates?: boolean | undefined;
|
||||
onHistoryFileLoaded?: ((err: Error | null, repl: REPLServer) => void) | undefined;
|
||||
}
|
||||
interface REPLServerEventMap extends InterfaceEventMap {
|
||||
"exit": [];
|
||||
"reset": [context: Context];
|
||||
}
|
||||
/**
|
||||
* Instances of `repl.REPLServer` are created using the {@link start} method
|
||||
* or directly using the JavaScript `new` keyword.
|
||||
@@ -144,6 +148,17 @@ declare module "repl" {
|
||||
* @since v0.1.91
|
||||
*/
|
||||
class REPLServer extends Interface {
|
||||
/**
|
||||
* NOTE: According to the documentation:
|
||||
*
|
||||
* > Instances of `repl.REPLServer` are created using the `repl.start()` method and
|
||||
* > _should not_ be created directly using the JavaScript `new` keyword.
|
||||
*
|
||||
* `REPLServer` cannot be subclassed due to implementation specifics in NodeJS.
|
||||
*
|
||||
* @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_class_replserver
|
||||
*/
|
||||
private constructor();
|
||||
/**
|
||||
* The `vm.Context` provided to the `eval` function to be used for JavaScript
|
||||
* evaluation.
|
||||
@@ -172,33 +187,33 @@ declare module "repl" {
|
||||
/**
|
||||
* A value indicating whether the REPL is currently in "editor mode".
|
||||
*
|
||||
* @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_commands_and_special_keys
|
||||
* @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_commands_and_special_keys
|
||||
*/
|
||||
readonly editorMode: boolean;
|
||||
/**
|
||||
* A value indicating whether the `_` variable has been assigned.
|
||||
*
|
||||
* @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
|
||||
* @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
|
||||
*/
|
||||
readonly underscoreAssigned: boolean;
|
||||
/**
|
||||
* The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL).
|
||||
*
|
||||
* @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
|
||||
* @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
|
||||
*/
|
||||
readonly last: any;
|
||||
/**
|
||||
* A value indicating whether the `_error` variable has been assigned.
|
||||
*
|
||||
* @since v9.8.0
|
||||
* @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
|
||||
* @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
|
||||
*/
|
||||
readonly underscoreErrAssigned: boolean;
|
||||
/**
|
||||
* The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL).
|
||||
*
|
||||
* @since v9.8.0
|
||||
* @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
|
||||
* @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
|
||||
*/
|
||||
readonly lastError: any;
|
||||
/**
|
||||
@@ -242,17 +257,6 @@ declare module "repl" {
|
||||
* prefacing every repl statement with `'use strict'`.
|
||||
*/
|
||||
readonly replMode: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT;
|
||||
/**
|
||||
* NOTE: According to the documentation:
|
||||
*
|
||||
* > Instances of `repl.REPLServer` are created using the `repl.start()` method and
|
||||
* > _should not_ be created directly using the JavaScript `new` keyword.
|
||||
*
|
||||
* `REPLServer` cannot be subclassed due to implementation specifics in NodeJS.
|
||||
*
|
||||
* @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_class_replserver
|
||||
*/
|
||||
private constructor();
|
||||
/**
|
||||
* The `replServer.defineCommand()` method is used to add new `.`\-prefixed commands
|
||||
* to the REPL instance. Such commands are invoked by typing a `.` followed by the `keyword`. The `cmd` is either a `Function` or an `Object` with the following
|
||||
@@ -327,78 +331,51 @@ declare module "repl" {
|
||||
historyConfig?: REPLServerSetupHistoryOptions,
|
||||
callback?: (err: Error | null, repl: this) => void,
|
||||
): void;
|
||||
/**
|
||||
* events.EventEmitter
|
||||
* 1. close - inherited from `readline.Interface`
|
||||
* 2. line - inherited from `readline.Interface`
|
||||
* 3. pause - inherited from `readline.Interface`
|
||||
* 4. resume - inherited from `readline.Interface`
|
||||
* 5. SIGCONT - inherited from `readline.Interface`
|
||||
* 6. SIGINT - inherited from `readline.Interface`
|
||||
* 7. SIGTSTP - inherited from `readline.Interface`
|
||||
* 8. exit
|
||||
* 9. reset
|
||||
*/
|
||||
addListener(event: string, listener: (...args: any[]) => void): this;
|
||||
addListener(event: "close", listener: () => void): this;
|
||||
addListener(event: "line", listener: (input: string) => void): this;
|
||||
addListener(event: "pause", listener: () => void): this;
|
||||
addListener(event: "resume", listener: () => void): this;
|
||||
addListener(event: "SIGCONT", listener: () => void): this;
|
||||
addListener(event: "SIGINT", listener: () => void): this;
|
||||
addListener(event: "SIGTSTP", listener: () => void): this;
|
||||
addListener(event: "exit", listener: () => void): this;
|
||||
addListener(event: "reset", listener: (context: Context) => void): this;
|
||||
emit(event: string | symbol, ...args: any[]): boolean;
|
||||
emit(event: "close"): boolean;
|
||||
emit(event: "line", input: string): boolean;
|
||||
emit(event: "pause"): boolean;
|
||||
emit(event: "resume"): boolean;
|
||||
emit(event: "SIGCONT"): boolean;
|
||||
emit(event: "SIGINT"): boolean;
|
||||
emit(event: "SIGTSTP"): boolean;
|
||||
emit(event: "exit"): boolean;
|
||||
emit(event: "reset", context: Context): boolean;
|
||||
on(event: string, listener: (...args: any[]) => void): this;
|
||||
on(event: "close", listener: () => void): this;
|
||||
on(event: "line", listener: (input: string) => void): this;
|
||||
on(event: "pause", listener: () => void): this;
|
||||
on(event: "resume", listener: () => void): this;
|
||||
on(event: "SIGCONT", listener: () => void): this;
|
||||
on(event: "SIGINT", listener: () => void): this;
|
||||
on(event: "SIGTSTP", listener: () => void): this;
|
||||
on(event: "exit", listener: () => void): this;
|
||||
on(event: "reset", listener: (context: Context) => void): this;
|
||||
once(event: string, listener: (...args: any[]) => void): this;
|
||||
once(event: "close", listener: () => void): this;
|
||||
once(event: "line", listener: (input: string) => void): this;
|
||||
once(event: "pause", listener: () => void): this;
|
||||
once(event: "resume", listener: () => void): this;
|
||||
once(event: "SIGCONT", listener: () => void): this;
|
||||
once(event: "SIGINT", listener: () => void): this;
|
||||
once(event: "SIGTSTP", listener: () => void): this;
|
||||
once(event: "exit", listener: () => void): this;
|
||||
once(event: "reset", listener: (context: Context) => void): this;
|
||||
prependListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependListener(event: "close", listener: () => void): this;
|
||||
prependListener(event: "line", listener: (input: string) => void): this;
|
||||
prependListener(event: "pause", listener: () => void): this;
|
||||
prependListener(event: "resume", listener: () => void): this;
|
||||
prependListener(event: "SIGCONT", listener: () => void): this;
|
||||
prependListener(event: "SIGINT", listener: () => void): this;
|
||||
prependListener(event: "SIGTSTP", listener: () => void): this;
|
||||
prependListener(event: "exit", listener: () => void): this;
|
||||
prependListener(event: "reset", listener: (context: Context) => void): this;
|
||||
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener(event: "close", listener: () => void): this;
|
||||
prependOnceListener(event: "line", listener: (input: string) => void): this;
|
||||
prependOnceListener(event: "pause", listener: () => void): this;
|
||||
prependOnceListener(event: "resume", listener: () => void): this;
|
||||
prependOnceListener(event: "SIGCONT", listener: () => void): this;
|
||||
prependOnceListener(event: "SIGINT", listener: () => void): this;
|
||||
prependOnceListener(event: "SIGTSTP", listener: () => void): this;
|
||||
prependOnceListener(event: "exit", listener: () => void): this;
|
||||
prependOnceListener(event: "reset", listener: (context: Context) => void): this;
|
||||
// #region InternalEventEmitter
|
||||
addListener<E extends keyof REPLServerEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: REPLServerEventMap[E]) => void,
|
||||
): this;
|
||||
addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
emit<E extends keyof REPLServerEventMap>(eventName: E, ...args: REPLServerEventMap[E]): boolean;
|
||||
emit(eventName: string | symbol, ...args: any[]): boolean;
|
||||
listenerCount<E extends keyof REPLServerEventMap>(
|
||||
eventName: E,
|
||||
listener?: (...args: REPLServerEventMap[E]) => void,
|
||||
): number;
|
||||
listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
|
||||
listeners<E extends keyof REPLServerEventMap>(eventName: E): ((...args: REPLServerEventMap[E]) => void)[];
|
||||
listeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
||||
off<E extends keyof REPLServerEventMap>(eventName: E, listener: (...args: REPLServerEventMap[E]) => void): this;
|
||||
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
on<E extends keyof REPLServerEventMap>(eventName: E, listener: (...args: REPLServerEventMap[E]) => void): this;
|
||||
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
once<E extends keyof REPLServerEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: REPLServerEventMap[E]) => void,
|
||||
): this;
|
||||
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependListener<E extends keyof REPLServerEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: REPLServerEventMap[E]) => void,
|
||||
): this;
|
||||
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener<E extends keyof REPLServerEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: REPLServerEventMap[E]) => void,
|
||||
): this;
|
||||
prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
rawListeners<E extends keyof REPLServerEventMap>(eventName: E): ((...args: REPLServerEventMap[E]) => void)[];
|
||||
rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
||||
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
||||
removeAllListeners<E extends keyof REPLServerEventMap>(eventName?: E): this;
|
||||
removeAllListeners(eventName?: string | symbol): this;
|
||||
removeListener<E extends keyof REPLServerEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: REPLServerEventMap[E]) => void,
|
||||
): this;
|
||||
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
// #endregion
|
||||
}
|
||||
/**
|
||||
* A flag passed in the REPL options. Evaluates expressions in sloppy mode.
|
||||
@@ -426,13 +403,13 @@ declare module "repl" {
|
||||
/**
|
||||
* Indicates a recoverable error that a `REPLServer` can use to support multi-line input.
|
||||
*
|
||||
* @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_recoverable_errors
|
||||
* @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_recoverable_errors
|
||||
*/
|
||||
class Recoverable extends SyntaxError {
|
||||
err: Error;
|
||||
constructor(err: Error);
|
||||
}
|
||||
}
|
||||
declare module "node:repl" {
|
||||
export * from "repl";
|
||||
declare module "repl" {
|
||||
export * from "node:repl";
|
||||
}
|
||||
|
||||
2
backend/node_modules/@types/node/sea.d.ts
generated
vendored
2
backend/node_modules/@types/node/sea.d.ts
generated
vendored
@@ -111,7 +111,7 @@
|
||||
* ```
|
||||
* @since v19.7.0, v18.16.0
|
||||
* @experimental
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/src/node_sea.cc)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/src/node_sea.cc)
|
||||
*/
|
||||
declare module "node:sea" {
|
||||
type AssetKey = string;
|
||||
|
||||
1035
backend/node_modules/@types/node/stream.d.ts
generated
vendored
1035
backend/node_modules/@types/node/stream.d.ts
generated
vendored
File diff suppressed because it is too large
Load Diff
20
backend/node_modules/@types/node/stream/consumers.d.ts
generated
vendored
20
backend/node_modules/@types/node/stream/consumers.d.ts
generated
vendored
@@ -3,36 +3,36 @@
|
||||
* streams.
|
||||
* @since v16.7.0
|
||||
*/
|
||||
declare module "stream/consumers" {
|
||||
import { Blob as NodeBlob, NonSharedBuffer } from "node:buffer";
|
||||
import { ReadableStream as WebReadableStream } from "node:stream/web";
|
||||
declare module "node:stream/consumers" {
|
||||
import { Blob, NonSharedBuffer } from "node:buffer";
|
||||
import { ReadableStream } from "node:stream/web";
|
||||
/**
|
||||
* @since v16.7.0
|
||||
* @returns Fulfills with an `ArrayBuffer` containing the full contents of the stream.
|
||||
*/
|
||||
function arrayBuffer(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<ArrayBuffer>;
|
||||
function arrayBuffer(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<ArrayBuffer>;
|
||||
/**
|
||||
* @since v16.7.0
|
||||
* @returns Fulfills with a `Blob` containing the full contents of the stream.
|
||||
*/
|
||||
function blob(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<NodeBlob>;
|
||||
function blob(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<Blob>;
|
||||
/**
|
||||
* @since v16.7.0
|
||||
* @returns Fulfills with a `Buffer` containing the full contents of the stream.
|
||||
*/
|
||||
function buffer(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<NonSharedBuffer>;
|
||||
function buffer(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<NonSharedBuffer>;
|
||||
/**
|
||||
* @since v16.7.0
|
||||
* @returns Fulfills with the contents of the stream parsed as a
|
||||
* UTF-8 encoded string that is then passed through `JSON.parse()`.
|
||||
*/
|
||||
function json(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<unknown>;
|
||||
function json(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<unknown>;
|
||||
/**
|
||||
* @since v16.7.0
|
||||
* @returns Fulfills with the contents of the stream parsed as a UTF-8 encoded string.
|
||||
*/
|
||||
function text(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<string>;
|
||||
function text(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<string>;
|
||||
}
|
||||
declare module "node:stream/consumers" {
|
||||
export * from "stream/consumers";
|
||||
declare module "stream/consumers" {
|
||||
export * from "node:stream/consumers";
|
||||
}
|
||||
|
||||
151
backend/node_modules/@types/node/stream/promises.d.ts
generated
vendored
151
backend/node_modules/@types/node/stream/promises.d.ts
generated
vendored
@@ -1,12 +1,12 @@
|
||||
declare module "stream/promises" {
|
||||
declare module "node:stream/promises" {
|
||||
import { Abortable } from "node:events";
|
||||
import {
|
||||
FinishedOptions as _FinishedOptions,
|
||||
PipelineDestination,
|
||||
PipelineOptions,
|
||||
PipelinePromise,
|
||||
PipelineSource,
|
||||
PipelineTransform,
|
||||
} from "node:stream";
|
||||
import { ReadableStream, WritableStream } from "node:stream/web";
|
||||
interface FinishedOptions extends _FinishedOptions {
|
||||
/**
|
||||
* If true, removes the listeners registered by this function before the promise is fulfilled.
|
||||
@@ -14,15 +14,130 @@ declare module "stream/promises" {
|
||||
*/
|
||||
cleanup?: boolean | undefined;
|
||||
}
|
||||
/**
|
||||
* ```js
|
||||
* import { finished } from 'node:stream/promises';
|
||||
* import { createReadStream } from 'node:fs';
|
||||
*
|
||||
* const rs = createReadStream('archive.tar');
|
||||
*
|
||||
* async function run() {
|
||||
* await finished(rs);
|
||||
* console.log('Stream is done reading.');
|
||||
* }
|
||||
*
|
||||
* run().catch(console.error);
|
||||
* rs.resume(); // Drain the stream.
|
||||
* ```
|
||||
*
|
||||
* The `finished` API also provides a [callback version](https://nodejs.org/docs/latest-v25.x/api/stream.html#streamfinishedstream-options-callback).
|
||||
*
|
||||
* `stream.finished()` leaves dangling event listeners (in particular
|
||||
* `'error'`, `'end'`, `'finish'` and `'close'`) after the returned promise is
|
||||
* resolved or rejected. The reason for this is so that unexpected `'error'`
|
||||
* events (due to incorrect stream implementations) do not cause unexpected
|
||||
* crashes. If this is unwanted behavior then `options.cleanup` should be set to
|
||||
* `true`:
|
||||
*
|
||||
* ```js
|
||||
* await finished(rs, { cleanup: true });
|
||||
* ```
|
||||
* @since v15.0.0
|
||||
* @returns Fulfills when the stream is no longer readable or writable.
|
||||
*/
|
||||
function finished(
|
||||
stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream,
|
||||
stream: NodeJS.ReadableStream | NodeJS.WritableStream | ReadableStream | WritableStream,
|
||||
options?: FinishedOptions,
|
||||
): Promise<void>;
|
||||
interface PipelineOptions extends Abortable {
|
||||
end?: boolean | undefined;
|
||||
}
|
||||
type PipelineResult<S extends PipelineDestination<any, any>> = S extends (...args: any[]) => PromiseLike<infer R>
|
||||
? Promise<R>
|
||||
: Promise<void>;
|
||||
/**
|
||||
* ```js
|
||||
* import { pipeline } from 'node:stream/promises';
|
||||
* import { createReadStream, createWriteStream } from 'node:fs';
|
||||
* import { createGzip } from 'node:zlib';
|
||||
*
|
||||
* await pipeline(
|
||||
* createReadStream('archive.tar'),
|
||||
* createGzip(),
|
||||
* createWriteStream('archive.tar.gz'),
|
||||
* );
|
||||
* console.log('Pipeline succeeded.');
|
||||
* ```
|
||||
*
|
||||
* To use an `AbortSignal`, pass it inside an options object, as the last argument.
|
||||
* When the signal is aborted, `destroy` will be called on the underlying pipeline,
|
||||
* with an `AbortError`.
|
||||
*
|
||||
* ```js
|
||||
* import { pipeline } from 'node:stream/promises';
|
||||
* import { createReadStream, createWriteStream } from 'node:fs';
|
||||
* import { createGzip } from 'node:zlib';
|
||||
*
|
||||
* const ac = new AbortController();
|
||||
* const { signal } = ac;
|
||||
* setImmediate(() => ac.abort());
|
||||
* try {
|
||||
* await pipeline(
|
||||
* createReadStream('archive.tar'),
|
||||
* createGzip(),
|
||||
* createWriteStream('archive.tar.gz'),
|
||||
* { signal },
|
||||
* );
|
||||
* } catch (err) {
|
||||
* console.error(err); // AbortError
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* The `pipeline` API also supports async generators:
|
||||
*
|
||||
* ```js
|
||||
* import { pipeline } from 'node:stream/promises';
|
||||
* import { createReadStream, createWriteStream } from 'node:fs';
|
||||
*
|
||||
* await pipeline(
|
||||
* createReadStream('lowercase.txt'),
|
||||
* async function* (source, { signal }) {
|
||||
* source.setEncoding('utf8'); // Work with strings rather than `Buffer`s.
|
||||
* for await (const chunk of source) {
|
||||
* yield await processChunk(chunk, { signal });
|
||||
* }
|
||||
* },
|
||||
* createWriteStream('uppercase.txt'),
|
||||
* );
|
||||
* console.log('Pipeline succeeded.');
|
||||
* ```
|
||||
*
|
||||
* Remember to handle the `signal` argument passed into the async generator.
|
||||
* Especially in the case where the async generator is the source for the
|
||||
* pipeline (i.e. first argument) or the pipeline will never complete.
|
||||
*
|
||||
* ```js
|
||||
* import { pipeline } from 'node:stream/promises';
|
||||
* import fs from 'node:fs';
|
||||
* await pipeline(
|
||||
* async function* ({ signal }) {
|
||||
* await someLongRunningfn({ signal });
|
||||
* yield 'asd';
|
||||
* },
|
||||
* fs.createWriteStream('uppercase.txt'),
|
||||
* );
|
||||
* console.log('Pipeline succeeded.');
|
||||
* ```
|
||||
*
|
||||
* The `pipeline` API provides [callback version](https://nodejs.org/docs/latest-v25.x/api/stream.html#streampipelinesource-transforms-destination-callback):
|
||||
* @since v15.0.0
|
||||
* @returns Fulfills when the pipeline is complete.
|
||||
*/
|
||||
function pipeline<A extends PipelineSource<any>, B extends PipelineDestination<A, any>>(
|
||||
source: A,
|
||||
destination: B,
|
||||
options?: PipelineOptions,
|
||||
): PipelinePromise<B>;
|
||||
): PipelineResult<B>;
|
||||
function pipeline<
|
||||
A extends PipelineSource<any>,
|
||||
T1 extends PipelineTransform<A, any>,
|
||||
@@ -32,7 +147,7 @@ declare module "stream/promises" {
|
||||
transform1: T1,
|
||||
destination: B,
|
||||
options?: PipelineOptions,
|
||||
): PipelinePromise<B>;
|
||||
): PipelineResult<B>;
|
||||
function pipeline<
|
||||
A extends PipelineSource<any>,
|
||||
T1 extends PipelineTransform<A, any>,
|
||||
@@ -44,7 +159,7 @@ declare module "stream/promises" {
|
||||
transform2: T2,
|
||||
destination: B,
|
||||
options?: PipelineOptions,
|
||||
): PipelinePromise<B>;
|
||||
): PipelineResult<B>;
|
||||
function pipeline<
|
||||
A extends PipelineSource<any>,
|
||||
T1 extends PipelineTransform<A, any>,
|
||||
@@ -58,7 +173,7 @@ declare module "stream/promises" {
|
||||
transform3: T3,
|
||||
destination: B,
|
||||
options?: PipelineOptions,
|
||||
): PipelinePromise<B>;
|
||||
): PipelineResult<B>;
|
||||
function pipeline<
|
||||
A extends PipelineSource<any>,
|
||||
T1 extends PipelineTransform<A, any>,
|
||||
@@ -74,17 +189,23 @@ declare module "stream/promises" {
|
||||
transform4: T4,
|
||||
destination: B,
|
||||
options?: PipelineOptions,
|
||||
): PipelinePromise<B>;
|
||||
): PipelineResult<B>;
|
||||
function pipeline(
|
||||
streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>,
|
||||
streams: readonly [PipelineSource<any>, ...PipelineTransform<any, any>[], PipelineDestination<any, any>],
|
||||
options?: PipelineOptions,
|
||||
): Promise<void>;
|
||||
function pipeline(
|
||||
stream1: NodeJS.ReadableStream,
|
||||
stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
|
||||
...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | PipelineOptions>
|
||||
...streams: [PipelineSource<any>, ...PipelineTransform<any, any>[], PipelineDestination<any, any>]
|
||||
): Promise<void>;
|
||||
function pipeline(
|
||||
...streams: [
|
||||
PipelineSource<any>,
|
||||
...PipelineTransform<any, any>[],
|
||||
PipelineDestination<any, any>,
|
||||
options: PipelineOptions,
|
||||
]
|
||||
): Promise<void>;
|
||||
}
|
||||
declare module "node:stream/promises" {
|
||||
export * from "stream/promises";
|
||||
declare module "stream/promises" {
|
||||
export * from "node:stream/promises";
|
||||
}
|
||||
|
||||
633
backend/node_modules/@types/node/stream/web.d.ts
generated
vendored
633
backend/node_modules/@types/node/stream/web.d.ts
generated
vendored
@@ -1,115 +1,91 @@
|
||||
type _ByteLengthQueuingStrategy = typeof globalThis extends { onmessage: any } ? {}
|
||||
: import("stream/web").ByteLengthQueuingStrategy;
|
||||
type _CountQueuingStrategy = typeof globalThis extends { onmessage: any } ? {}
|
||||
: import("stream/web").CountQueuingStrategy;
|
||||
type _QueuingStrategy<T = any> = typeof globalThis extends { onmessage: any } ? {}
|
||||
: import("stream/web").QueuingStrategy<T>;
|
||||
type _ReadableByteStreamController = typeof globalThis extends { onmessage: any } ? {}
|
||||
: import("stream/web").ReadableByteStreamController;
|
||||
type _ReadableStream<R = any> = typeof globalThis extends { onmessage: any } ? {}
|
||||
: import("stream/web").ReadableStream<R>;
|
||||
type _ReadableStreamBYOBReader = typeof globalThis extends { onmessage: any } ? {}
|
||||
: import("stream/web").ReadableStreamBYOBReader;
|
||||
type _ReadableStreamBYOBRequest = typeof globalThis extends { onmessage: any } ? {}
|
||||
: import("stream/web").ReadableStreamBYOBRequest;
|
||||
type _ReadableStreamDefaultController<R = any> = typeof globalThis extends { onmessage: any } ? {}
|
||||
: import("stream/web").ReadableStreamDefaultController<R>;
|
||||
type _ReadableStreamDefaultReader<R = any> = typeof globalThis extends { onmessage: any } ? {}
|
||||
: import("stream/web").ReadableStreamDefaultReader<R>;
|
||||
type _TextDecoderStream = typeof globalThis extends { onmessage: any } ? {}
|
||||
: import("stream/web").TextDecoderStream;
|
||||
type _TextEncoderStream = typeof globalThis extends { onmessage: any } ? {}
|
||||
: import("stream/web").TextEncoderStream;
|
||||
type _TransformStream<I = any, O = any> = typeof globalThis extends { onmessage: any } ? {}
|
||||
: import("stream/web").TransformStream<I, O>;
|
||||
type _TransformStreamDefaultController<O = any> = typeof globalThis extends { onmessage: any } ? {}
|
||||
: import("stream/web").TransformStreamDefaultController<O>;
|
||||
type _WritableStream<W = any> = typeof globalThis extends { onmessage: any } ? {}
|
||||
: import("stream/web").WritableStream<W>;
|
||||
type _WritableStreamDefaultController = typeof globalThis extends { onmessage: any } ? {}
|
||||
: import("stream/web").WritableStreamDefaultController;
|
||||
type _WritableStreamDefaultWriter<W = any> = typeof globalThis extends { onmessage: any } ? {}
|
||||
: import("stream/web").WritableStreamDefaultWriter<W>;
|
||||
|
||||
declare module "stream/web" {
|
||||
// stub module, pending copy&paste from .d.ts or manual impl
|
||||
// copy from lib.dom.d.ts
|
||||
interface ReadableWritablePair<R = any, W = any> {
|
||||
readable: ReadableStream<R>;
|
||||
/**
|
||||
* Provides a convenient, chainable way of piping this readable stream
|
||||
* through a transform stream (or any other { writable, readable }
|
||||
* pair). It simply pipes the stream into the writable side of the
|
||||
* supplied pair, and returns the readable side for further use.
|
||||
*
|
||||
* Piping a stream will lock it for the duration of the pipe, preventing
|
||||
* any other consumer from acquiring a reader.
|
||||
*/
|
||||
writable: WritableStream<W>;
|
||||
declare module "node:stream/web" {
|
||||
import { TextDecoderCommon, TextDecoderOptions, TextEncoderCommon } from "node:util";
|
||||
type CompressionFormat = "brotli" | "deflate" | "deflate-raw" | "gzip";
|
||||
type ReadableStreamController<T> = ReadableStreamDefaultController<T> | ReadableByteStreamController;
|
||||
type ReadableStreamReader<T> = ReadableStreamDefaultReader<T> | ReadableStreamBYOBReader;
|
||||
type ReadableStreamReaderMode = "byob";
|
||||
type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult<T>;
|
||||
type ReadableStreamType = "bytes";
|
||||
interface GenericTransformStream {
|
||||
readonly readable: ReadableStream;
|
||||
readonly writable: WritableStream;
|
||||
}
|
||||
interface StreamPipeOptions {
|
||||
preventAbort?: boolean;
|
||||
preventCancel?: boolean;
|
||||
/**
|
||||
* Pipes this readable stream to a given writable stream destination.
|
||||
* The way in which the piping process behaves under various error
|
||||
* conditions can be customized with a number of passed options. It
|
||||
* returns a promise that fulfills when the piping process completes
|
||||
* successfully, or rejects if any errors were encountered.
|
||||
*
|
||||
* Piping a stream will lock it for the duration of the pipe, preventing
|
||||
* any other consumer from acquiring a reader.
|
||||
*
|
||||
* Errors and closures of the source and destination streams propagate
|
||||
* as follows:
|
||||
*
|
||||
* An error in this source readable stream will abort destination,
|
||||
* unless preventAbort is truthy. The returned promise will be rejected
|
||||
* with the source's error, or with any error that occurs during
|
||||
* aborting the destination.
|
||||
*
|
||||
* An error in destination will cancel this source readable stream,
|
||||
* unless preventCancel is truthy. The returned promise will be rejected
|
||||
* with the destination's error, or with any error that occurs during
|
||||
* canceling the source.
|
||||
*
|
||||
* When this source readable stream closes, destination will be closed,
|
||||
* unless preventClose is truthy. The returned promise will be fulfilled
|
||||
* once this process completes, unless an error is encountered while
|
||||
* closing the destination, in which case it will be rejected with that
|
||||
* error.
|
||||
*
|
||||
* If destination starts out closed or closing, this source readable
|
||||
* stream will be canceled, unless preventCancel is true. The returned
|
||||
* promise will be rejected with an error indicating piping to a closed
|
||||
* stream failed, or with any error that occurs during canceling the
|
||||
* source.
|
||||
*
|
||||
* The signal option can be set to an AbortSignal to allow aborting an
|
||||
* ongoing pipe operation via the corresponding AbortController. In this
|
||||
* case, this source readable stream will be canceled, and destination
|
||||
* aborted, unless the respective options preventCancel or preventAbort
|
||||
* are set.
|
||||
*/
|
||||
preventClose?: boolean;
|
||||
signal?: AbortSignal;
|
||||
interface QueuingStrategy<T = any> {
|
||||
highWaterMark?: number;
|
||||
size?: QueuingStrategySize<T>;
|
||||
}
|
||||
interface QueuingStrategyInit {
|
||||
highWaterMark: number;
|
||||
}
|
||||
interface QueuingStrategySize<T = any> {
|
||||
(chunk: T): number;
|
||||
}
|
||||
interface ReadableStreamBYOBReaderReadOptions {
|
||||
min?: number;
|
||||
}
|
||||
interface ReadableStreamGenericReader {
|
||||
readonly closed: Promise<void>;
|
||||
cancel(reason?: any): Promise<void>;
|
||||
}
|
||||
type ReadableStreamController<T> = ReadableStreamDefaultController<T>;
|
||||
interface ReadableStreamGetReaderOptions {
|
||||
mode?: ReadableStreamReaderMode;
|
||||
}
|
||||
interface ReadableStreamIteratorOptions {
|
||||
preventCancel?: boolean;
|
||||
}
|
||||
interface ReadableStreamReadDoneResult<T> {
|
||||
done: true;
|
||||
value: T | undefined;
|
||||
}
|
||||
interface ReadableStreamReadValueResult<T> {
|
||||
done: false;
|
||||
value: T;
|
||||
}
|
||||
interface ReadableStreamReadDoneResult<T> {
|
||||
done: true;
|
||||
value?: T;
|
||||
interface ReadableWritablePair<R = any, W = any> {
|
||||
readable: ReadableStream<R>;
|
||||
writable: WritableStream<W>;
|
||||
}
|
||||
type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult<T>;
|
||||
interface ReadableByteStreamControllerCallback {
|
||||
(controller: ReadableByteStreamController): void | PromiseLike<void>;
|
||||
interface StreamPipeOptions {
|
||||
preventAbort?: boolean;
|
||||
preventCancel?: boolean;
|
||||
preventClose?: boolean;
|
||||
signal?: AbortSignal;
|
||||
}
|
||||
interface Transformer<I = any, O = any> {
|
||||
flush?: TransformerFlushCallback<O>;
|
||||
readableType?: undefined;
|
||||
start?: TransformerStartCallback<O>;
|
||||
transform?: TransformerTransformCallback<I, O>;
|
||||
writableType?: undefined;
|
||||
}
|
||||
interface TransformerFlushCallback<O> {
|
||||
(controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
|
||||
}
|
||||
interface TransformerStartCallback<O> {
|
||||
(controller: TransformStreamDefaultController<O>): any;
|
||||
}
|
||||
interface TransformerTransformCallback<I, O> {
|
||||
(chunk: I, controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
|
||||
}
|
||||
interface UnderlyingByteSource {
|
||||
autoAllocateChunkSize?: number;
|
||||
cancel?: UnderlyingSourceCancelCallback;
|
||||
pull?: (controller: ReadableByteStreamController) => void | PromiseLike<void>;
|
||||
start?: (controller: ReadableByteStreamController) => any;
|
||||
type: "bytes";
|
||||
}
|
||||
interface UnderlyingDefaultSource<R = any> {
|
||||
cancel?: UnderlyingSourceCancelCallback;
|
||||
pull?: (controller: ReadableStreamDefaultController<R>) => void | PromiseLike<void>;
|
||||
start?: (controller: ReadableStreamDefaultController<R>) => any;
|
||||
type?: undefined;
|
||||
}
|
||||
interface UnderlyingSink<W = any> {
|
||||
abort?: UnderlyingSinkAbortCallback;
|
||||
close?: UnderlyingSinkCloseCallback;
|
||||
start?: UnderlyingSinkStartCallback;
|
||||
type?: undefined;
|
||||
write?: UnderlyingSinkWriteCallback<W>;
|
||||
}
|
||||
interface UnderlyingSinkAbortCallback {
|
||||
(reason?: any): void | PromiseLike<void>;
|
||||
@@ -123,6 +99,13 @@ declare module "stream/web" {
|
||||
interface UnderlyingSinkWriteCallback<W> {
|
||||
(chunk: W, controller: WritableStreamDefaultController): void | PromiseLike<void>;
|
||||
}
|
||||
interface UnderlyingSource<R = any> {
|
||||
autoAllocateChunkSize?: number;
|
||||
cancel?: UnderlyingSourceCancelCallback;
|
||||
pull?: UnderlyingSourcePullCallback<R>;
|
||||
start?: UnderlyingSourceStartCallback<R>;
|
||||
type?: ReadableStreamType;
|
||||
}
|
||||
interface UnderlyingSourceCancelCallback {
|
||||
(reason?: any): void | PromiseLike<void>;
|
||||
}
|
||||
@@ -132,45 +115,49 @@ declare module "stream/web" {
|
||||
interface UnderlyingSourceStartCallback<R> {
|
||||
(controller: ReadableStreamController<R>): any;
|
||||
}
|
||||
interface TransformerFlushCallback<O> {
|
||||
(controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
|
||||
interface ByteLengthQueuingStrategy extends QueuingStrategy<NodeJS.ArrayBufferView> {
|
||||
readonly highWaterMark: number;
|
||||
readonly size: QueuingStrategySize<NodeJS.ArrayBufferView>;
|
||||
}
|
||||
interface TransformerStartCallback<O> {
|
||||
(controller: TransformStreamDefaultController<O>): any;
|
||||
var ByteLengthQueuingStrategy: {
|
||||
prototype: ByteLengthQueuingStrategy;
|
||||
new(init: QueuingStrategyInit): ByteLengthQueuingStrategy;
|
||||
};
|
||||
interface CompressionStream extends GenericTransformStream {
|
||||
readonly readable: ReadableStream<NodeJS.NonSharedUint8Array>;
|
||||
readonly writable: WritableStream<NodeJS.BufferSource>;
|
||||
}
|
||||
interface TransformerTransformCallback<I, O> {
|
||||
(chunk: I, controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
|
||||
var CompressionStream: {
|
||||
prototype: CompressionStream;
|
||||
new(format: CompressionFormat): CompressionStream;
|
||||
};
|
||||
interface CountQueuingStrategy extends QueuingStrategy {
|
||||
readonly highWaterMark: number;
|
||||
readonly size: QueuingStrategySize;
|
||||
}
|
||||
interface TransformerCancelCallback {
|
||||
(reason: any): void | PromiseLike<void>;
|
||||
var CountQueuingStrategy: {
|
||||
prototype: CountQueuingStrategy;
|
||||
new(init: QueuingStrategyInit): CountQueuingStrategy;
|
||||
};
|
||||
interface DecompressionStream extends GenericTransformStream {
|
||||
readonly readable: ReadableStream<NodeJS.NonSharedUint8Array>;
|
||||
readonly writable: WritableStream<NodeJS.BufferSource>;
|
||||
}
|
||||
interface UnderlyingByteSource {
|
||||
autoAllocateChunkSize?: number;
|
||||
cancel?: ReadableStreamErrorCallback;
|
||||
pull?: ReadableByteStreamControllerCallback;
|
||||
start?: ReadableByteStreamControllerCallback;
|
||||
type: "bytes";
|
||||
var DecompressionStream: {
|
||||
prototype: DecompressionStream;
|
||||
new(format: CompressionFormat): DecompressionStream;
|
||||
};
|
||||
interface ReadableByteStreamController {
|
||||
readonly byobRequest: ReadableStreamBYOBRequest | null;
|
||||
readonly desiredSize: number | null;
|
||||
close(): void;
|
||||
enqueue(chunk: NodeJS.NonSharedArrayBufferView): void;
|
||||
error(e?: any): void;
|
||||
}
|
||||
interface UnderlyingSource<R = any> {
|
||||
cancel?: UnderlyingSourceCancelCallback;
|
||||
pull?: UnderlyingSourcePullCallback<R>;
|
||||
start?: UnderlyingSourceStartCallback<R>;
|
||||
type?: undefined;
|
||||
}
|
||||
interface UnderlyingSink<W = any> {
|
||||
abort?: UnderlyingSinkAbortCallback;
|
||||
close?: UnderlyingSinkCloseCallback;
|
||||
start?: UnderlyingSinkStartCallback;
|
||||
type?: undefined;
|
||||
write?: UnderlyingSinkWriteCallback<W>;
|
||||
}
|
||||
interface ReadableStreamErrorCallback {
|
||||
(reason: any): void | PromiseLike<void>;
|
||||
}
|
||||
interface ReadableStreamAsyncIterator<T> extends NodeJS.AsyncIterator<T, NodeJS.BuiltinIteratorReturn, unknown> {
|
||||
[Symbol.asyncIterator](): ReadableStreamAsyncIterator<T>;
|
||||
}
|
||||
/** This Streams API interface represents a readable stream of byte data. */
|
||||
var ReadableByteStreamController: {
|
||||
prototype: ReadableByteStreamController;
|
||||
new(): ReadableByteStreamController;
|
||||
};
|
||||
interface ReadableStream<R = any> {
|
||||
readonly locked: boolean;
|
||||
cancel(reason?: any): Promise<void>;
|
||||
@@ -180,96 +167,81 @@ declare module "stream/web" {
|
||||
pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
|
||||
pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
|
||||
tee(): [ReadableStream<R>, ReadableStream<R>];
|
||||
values(options?: { preventCancel?: boolean }): ReadableStreamAsyncIterator<R>;
|
||||
[Symbol.asyncIterator](): ReadableStreamAsyncIterator<R>;
|
||||
[Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator<R>;
|
||||
values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator<R>;
|
||||
}
|
||||
const ReadableStream: {
|
||||
var ReadableStream: {
|
||||
prototype: ReadableStream;
|
||||
from<T>(iterable: Iterable<T> | AsyncIterable<T>): ReadableStream<T>;
|
||||
new(underlyingSource: UnderlyingByteSource, strategy?: QueuingStrategy<Uint8Array>): ReadableStream<Uint8Array>;
|
||||
new(
|
||||
underlyingSource: UnderlyingByteSource,
|
||||
strategy?: { highWaterMark?: number },
|
||||
): ReadableStream<NodeJS.NonSharedUint8Array>;
|
||||
new<R = any>(underlyingSource: UnderlyingDefaultSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
|
||||
new<R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
|
||||
from<R = any>(iterable: Iterable<R> | AsyncIterable<R>): ReadableStream<R>;
|
||||
};
|
||||
type ReadableStreamReaderMode = "byob";
|
||||
interface ReadableStreamGetReaderOptions {
|
||||
/**
|
||||
* Creates a ReadableStreamBYOBReader and locks the stream to the new reader.
|
||||
*
|
||||
* This call behaves the same way as the no-argument variant, except that it only works on readable byte streams, i.e. streams which were constructed specifically with the ability to handle "bring your own buffer" reading. The returned BYOB reader provides the ability to directly read individual chunks from the stream via its read() method, into developer-supplied buffers, allowing more precise control over allocation.
|
||||
*/
|
||||
mode?: ReadableStreamReaderMode;
|
||||
interface ReadableStreamAsyncIterator<T> extends NodeJS.AsyncIterator<T, NodeJS.BuiltinIteratorReturn, unknown> {
|
||||
[Symbol.asyncIterator](): ReadableStreamAsyncIterator<T>;
|
||||
}
|
||||
type ReadableStreamReader<T> = ReadableStreamDefaultReader<T> | ReadableStreamBYOBReader;
|
||||
interface ReadableStreamDefaultReader<R = any> extends ReadableStreamGenericReader {
|
||||
read(): Promise<ReadableStreamReadResult<R>>;
|
||||
releaseLock(): void;
|
||||
}
|
||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader) */
|
||||
interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
|
||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read) */
|
||||
read<T extends ArrayBufferView>(
|
||||
read<T extends NodeJS.NonSharedArrayBufferView>(
|
||||
view: T,
|
||||
options?: {
|
||||
min?: number;
|
||||
},
|
||||
options?: ReadableStreamBYOBReaderReadOptions,
|
||||
): Promise<ReadableStreamReadResult<T>>;
|
||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock) */
|
||||
releaseLock(): void;
|
||||
}
|
||||
const ReadableStreamDefaultReader: {
|
||||
prototype: ReadableStreamDefaultReader;
|
||||
new<R = any>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>;
|
||||
};
|
||||
const ReadableStreamBYOBReader: {
|
||||
var ReadableStreamBYOBReader: {
|
||||
prototype: ReadableStreamBYOBReader;
|
||||
new(stream: ReadableStream): ReadableStreamBYOBReader;
|
||||
new(stream: ReadableStream<NodeJS.NonSharedUint8Array>): ReadableStreamBYOBReader;
|
||||
};
|
||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */
|
||||
interface ReadableStreamBYOBRequest {
|
||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view) */
|
||||
readonly view: ArrayBufferView | null;
|
||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) */
|
||||
readonly view: NodeJS.NonSharedArrayBufferView | null;
|
||||
respond(bytesWritten: number): void;
|
||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView) */
|
||||
respondWithNewView(view: ArrayBufferView): void;
|
||||
respondWithNewView(view: NodeJS.NonSharedArrayBufferView): void;
|
||||
}
|
||||
const ReadableStreamBYOBRequest: {
|
||||
var ReadableStreamBYOBRequest: {
|
||||
prototype: ReadableStreamBYOBRequest;
|
||||
new(): ReadableStreamBYOBRequest;
|
||||
};
|
||||
interface ReadableByteStreamController {
|
||||
readonly byobRequest: undefined;
|
||||
readonly desiredSize: number | null;
|
||||
close(): void;
|
||||
enqueue(chunk: ArrayBufferView): void;
|
||||
error(error?: any): void;
|
||||
}
|
||||
const ReadableByteStreamController: {
|
||||
prototype: ReadableByteStreamController;
|
||||
new(): ReadableByteStreamController;
|
||||
};
|
||||
interface ReadableStreamDefaultController<R = any> {
|
||||
readonly desiredSize: number | null;
|
||||
close(): void;
|
||||
enqueue(chunk?: R): void;
|
||||
error(e?: any): void;
|
||||
}
|
||||
const ReadableStreamDefaultController: {
|
||||
var ReadableStreamDefaultController: {
|
||||
prototype: ReadableStreamDefaultController;
|
||||
new(): ReadableStreamDefaultController;
|
||||
};
|
||||
interface Transformer<I = any, O = any> {
|
||||
flush?: TransformerFlushCallback<O>;
|
||||
readableType?: undefined;
|
||||
start?: TransformerStartCallback<O>;
|
||||
transform?: TransformerTransformCallback<I, O>;
|
||||
cancel?: TransformerCancelCallback;
|
||||
writableType?: undefined;
|
||||
interface ReadableStreamDefaultReader<R = any> extends ReadableStreamGenericReader {
|
||||
read(): Promise<ReadableStreamReadResult<R>>;
|
||||
releaseLock(): void;
|
||||
}
|
||||
var ReadableStreamDefaultReader: {
|
||||
prototype: ReadableStreamDefaultReader;
|
||||
new<R = any>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>;
|
||||
};
|
||||
interface TextDecoderStream extends GenericTransformStream, TextDecoderCommon {
|
||||
readonly readable: ReadableStream<string>;
|
||||
readonly writable: WritableStream<NodeJS.BufferSource>;
|
||||
}
|
||||
var TextDecoderStream: {
|
||||
prototype: TextDecoderStream;
|
||||
new(label?: string, options?: TextDecoderOptions): TextDecoderStream;
|
||||
};
|
||||
interface TextEncoderStream extends GenericTransformStream, TextEncoderCommon {
|
||||
readonly readable: ReadableStream<NodeJS.NonSharedUint8Array>;
|
||||
readonly writable: WritableStream<string>;
|
||||
}
|
||||
var TextEncoderStream: {
|
||||
prototype: TextEncoderStream;
|
||||
new(): TextEncoderStream;
|
||||
};
|
||||
interface TransformStream<I = any, O = any> {
|
||||
readonly readable: ReadableStream<O>;
|
||||
readonly writable: WritableStream<I>;
|
||||
}
|
||||
const TransformStream: {
|
||||
var TransformStream: {
|
||||
prototype: TransformStream;
|
||||
new<I = any, O = any>(
|
||||
transformer?: Transformer<I, O>,
|
||||
@@ -283,31 +255,28 @@ declare module "stream/web" {
|
||||
error(reason?: any): void;
|
||||
terminate(): void;
|
||||
}
|
||||
const TransformStreamDefaultController: {
|
||||
var TransformStreamDefaultController: {
|
||||
prototype: TransformStreamDefaultController;
|
||||
new(): TransformStreamDefaultController;
|
||||
};
|
||||
/**
|
||||
* This Streams API interface provides a standard abstraction for writing
|
||||
* streaming data to a destination, known as a sink. This object comes with
|
||||
* built-in back pressure and queuing.
|
||||
*/
|
||||
interface WritableStream<W = any> {
|
||||
readonly locked: boolean;
|
||||
abort(reason?: any): Promise<void>;
|
||||
close(): Promise<void>;
|
||||
getWriter(): WritableStreamDefaultWriter<W>;
|
||||
}
|
||||
const WritableStream: {
|
||||
var WritableStream: {
|
||||
prototype: WritableStream;
|
||||
new<W = any>(underlyingSink?: UnderlyingSink<W>, strategy?: QueuingStrategy<W>): WritableStream<W>;
|
||||
};
|
||||
/**
|
||||
* This Streams API interface is the object returned by
|
||||
* WritableStream.getWriter() and once created locks the < writer to the
|
||||
* WritableStream ensuring that no other streams can write to the underlying
|
||||
* sink.
|
||||
*/
|
||||
interface WritableStreamDefaultController {
|
||||
readonly signal: AbortSignal;
|
||||
error(e?: any): void;
|
||||
}
|
||||
var WritableStreamDefaultController: {
|
||||
prototype: WritableStreamDefaultController;
|
||||
new(): WritableStreamDefaultController;
|
||||
};
|
||||
interface WritableStreamDefaultWriter<W = any> {
|
||||
readonly closed: Promise<void>;
|
||||
readonly desiredSize: number | null;
|
||||
@@ -317,257 +286,11 @@ declare module "stream/web" {
|
||||
releaseLock(): void;
|
||||
write(chunk?: W): Promise<void>;
|
||||
}
|
||||
const WritableStreamDefaultWriter: {
|
||||
var WritableStreamDefaultWriter: {
|
||||
prototype: WritableStreamDefaultWriter;
|
||||
new<W = any>(stream: WritableStream<W>): WritableStreamDefaultWriter<W>;
|
||||
};
|
||||
/**
|
||||
* This Streams API interface represents a controller allowing control of a
|
||||
* WritableStream's state. When constructing a WritableStream, the
|
||||
* underlying sink is given a corresponding WritableStreamDefaultController
|
||||
* instance to manipulate.
|
||||
*/
|
||||
interface WritableStreamDefaultController {
|
||||
error(e?: any): void;
|
||||
}
|
||||
const WritableStreamDefaultController: {
|
||||
prototype: WritableStreamDefaultController;
|
||||
new(): WritableStreamDefaultController;
|
||||
};
|
||||
interface QueuingStrategy<T = any> {
|
||||
highWaterMark?: number;
|
||||
size?: QueuingStrategySize<T>;
|
||||
}
|
||||
interface QueuingStrategySize<T = any> {
|
||||
(chunk?: T): number;
|
||||
}
|
||||
interface QueuingStrategyInit {
|
||||
/**
|
||||
* Creates a new ByteLengthQueuingStrategy with the provided high water
|
||||
* mark.
|
||||
*
|
||||
* Note that the provided high water mark will not be validated ahead of
|
||||
* time. Instead, if it is negative, NaN, or not a number, the resulting
|
||||
* ByteLengthQueuingStrategy will cause the corresponding stream
|
||||
* constructor to throw.
|
||||
*/
|
||||
highWaterMark: number;
|
||||
}
|
||||
/**
|
||||
* This Streams API interface provides a built-in byte length queuing
|
||||
* strategy that can be used when constructing streams.
|
||||
*/
|
||||
interface ByteLengthQueuingStrategy extends QueuingStrategy<ArrayBufferView> {
|
||||
readonly highWaterMark: number;
|
||||
readonly size: QueuingStrategySize<ArrayBufferView>;
|
||||
}
|
||||
const ByteLengthQueuingStrategy: {
|
||||
prototype: ByteLengthQueuingStrategy;
|
||||
new(init: QueuingStrategyInit): ByteLengthQueuingStrategy;
|
||||
};
|
||||
/**
|
||||
* This Streams API interface provides a built-in byte length queuing
|
||||
* strategy that can be used when constructing streams.
|
||||
*/
|
||||
interface CountQueuingStrategy extends QueuingStrategy {
|
||||
readonly highWaterMark: number;
|
||||
readonly size: QueuingStrategySize;
|
||||
}
|
||||
const CountQueuingStrategy: {
|
||||
prototype: CountQueuingStrategy;
|
||||
new(init: QueuingStrategyInit): CountQueuingStrategy;
|
||||
};
|
||||
interface TextEncoderStream {
|
||||
/** Returns "utf-8". */
|
||||
readonly encoding: "utf-8";
|
||||
readonly readable: ReadableStream<Uint8Array>;
|
||||
readonly writable: WritableStream<string>;
|
||||
readonly [Symbol.toStringTag]: string;
|
||||
}
|
||||
const TextEncoderStream: {
|
||||
prototype: TextEncoderStream;
|
||||
new(): TextEncoderStream;
|
||||
};
|
||||
interface TextDecoderOptions {
|
||||
fatal?: boolean;
|
||||
ignoreBOM?: boolean;
|
||||
}
|
||||
type BufferSource = ArrayBufferView | ArrayBuffer;
|
||||
interface TextDecoderStream {
|
||||
/** Returns encoding's name, lower cased. */
|
||||
readonly encoding: string;
|
||||
/** Returns `true` if error mode is "fatal", and `false` otherwise. */
|
||||
readonly fatal: boolean;
|
||||
/** Returns `true` if ignore BOM flag is set, and `false` otherwise. */
|
||||
readonly ignoreBOM: boolean;
|
||||
readonly readable: ReadableStream<string>;
|
||||
readonly writable: WritableStream<BufferSource>;
|
||||
readonly [Symbol.toStringTag]: string;
|
||||
}
|
||||
const TextDecoderStream: {
|
||||
prototype: TextDecoderStream;
|
||||
new(encoding?: string, options?: TextDecoderOptions): TextDecoderStream;
|
||||
};
|
||||
type CompressionFormat = "brotli" | "deflate" | "deflate-raw" | "gzip";
|
||||
class CompressionStream {
|
||||
constructor(format: CompressionFormat);
|
||||
readonly readable: ReadableStream;
|
||||
readonly writable: WritableStream;
|
||||
}
|
||||
class DecompressionStream {
|
||||
constructor(format: CompressionFormat);
|
||||
readonly readable: ReadableStream;
|
||||
readonly writable: WritableStream;
|
||||
}
|
||||
|
||||
global {
|
||||
interface ByteLengthQueuingStrategy extends _ByteLengthQueuingStrategy {}
|
||||
/**
|
||||
* `ByteLengthQueuingStrategy` class is a global reference for `import { ByteLengthQueuingStrategy } from 'node:stream/web'`.
|
||||
* https://nodejs.org/api/globals.html#class-bytelengthqueuingstrategy
|
||||
* @since v18.0.0
|
||||
*/
|
||||
var ByteLengthQueuingStrategy: typeof globalThis extends { onmessage: any; ByteLengthQueuingStrategy: infer T }
|
||||
? T
|
||||
: typeof import("stream/web").ByteLengthQueuingStrategy;
|
||||
|
||||
interface CountQueuingStrategy extends _CountQueuingStrategy {}
|
||||
/**
|
||||
* `CountQueuingStrategy` class is a global reference for `import { CountQueuingStrategy } from 'node:stream/web'`.
|
||||
* https://nodejs.org/api/globals.html#class-countqueuingstrategy
|
||||
* @since v18.0.0
|
||||
*/
|
||||
var CountQueuingStrategy: typeof globalThis extends { onmessage: any; CountQueuingStrategy: infer T } ? T
|
||||
: typeof import("stream/web").CountQueuingStrategy;
|
||||
|
||||
interface QueuingStrategy<T = any> extends _QueuingStrategy<T> {}
|
||||
|
||||
interface ReadableByteStreamController extends _ReadableByteStreamController {}
|
||||
/**
|
||||
* `ReadableByteStreamController` class is a global reference for `import { ReadableByteStreamController } from 'node:stream/web'`.
|
||||
* https://nodejs.org/api/globals.html#class-readablebytestreamcontroller
|
||||
* @since v18.0.0
|
||||
*/
|
||||
var ReadableByteStreamController: typeof globalThis extends
|
||||
{ onmessage: any; ReadableByteStreamController: infer T } ? T
|
||||
: typeof import("stream/web").ReadableByteStreamController;
|
||||
|
||||
interface ReadableStream<R = any> extends _ReadableStream<R> {}
|
||||
/**
|
||||
* `ReadableStream` class is a global reference for `import { ReadableStream } from 'node:stream/web'`.
|
||||
* https://nodejs.org/api/globals.html#class-readablestream
|
||||
* @since v18.0.0
|
||||
*/
|
||||
var ReadableStream: typeof globalThis extends { onmessage: any; ReadableStream: infer T } ? T
|
||||
: typeof import("stream/web").ReadableStream;
|
||||
|
||||
interface ReadableStreamBYOBReader extends _ReadableStreamBYOBReader {}
|
||||
/**
|
||||
* `ReadableStreamBYOBReader` class is a global reference for `import { ReadableStreamBYOBReader } from 'node:stream/web'`.
|
||||
* https://nodejs.org/api/globals.html#class-readablestreambyobreader
|
||||
* @since v18.0.0
|
||||
*/
|
||||
var ReadableStreamBYOBReader: typeof globalThis extends { onmessage: any; ReadableStreamBYOBReader: infer T }
|
||||
? T
|
||||
: typeof import("stream/web").ReadableStreamBYOBReader;
|
||||
|
||||
interface ReadableStreamBYOBRequest extends _ReadableStreamBYOBRequest {}
|
||||
/**
|
||||
* `ReadableStreamBYOBRequest` class is a global reference for `import { ReadableStreamBYOBRequest } from 'node:stream/web'`.
|
||||
* https://nodejs.org/api/globals.html#class-readablestreambyobrequest
|
||||
* @since v18.0.0
|
||||
*/
|
||||
var ReadableStreamBYOBRequest: typeof globalThis extends { onmessage: any; ReadableStreamBYOBRequest: infer T }
|
||||
? T
|
||||
: typeof import("stream/web").ReadableStreamBYOBRequest;
|
||||
|
||||
interface ReadableStreamDefaultController<R = any> extends _ReadableStreamDefaultController<R> {}
|
||||
/**
|
||||
* `ReadableStreamDefaultController` class is a global reference for `import { ReadableStreamDefaultController } from 'node:stream/web'`.
|
||||
* https://nodejs.org/api/globals.html#class-readablestreamdefaultcontroller
|
||||
* @since v18.0.0
|
||||
*/
|
||||
var ReadableStreamDefaultController: typeof globalThis extends
|
||||
{ onmessage: any; ReadableStreamDefaultController: infer T } ? T
|
||||
: typeof import("stream/web").ReadableStreamDefaultController;
|
||||
|
||||
interface ReadableStreamDefaultReader<R = any> extends _ReadableStreamDefaultReader<R> {}
|
||||
/**
|
||||
* `ReadableStreamDefaultReader` class is a global reference for `import { ReadableStreamDefaultReader } from 'node:stream/web'`.
|
||||
* https://nodejs.org/api/globals.html#class-readablestreamdefaultreader
|
||||
* @since v18.0.0
|
||||
*/
|
||||
var ReadableStreamDefaultReader: typeof globalThis extends
|
||||
{ onmessage: any; ReadableStreamDefaultReader: infer T } ? T
|
||||
: typeof import("stream/web").ReadableStreamDefaultReader;
|
||||
|
||||
interface TextDecoderStream extends _TextDecoderStream {}
|
||||
/**
|
||||
* `TextDecoderStream` class is a global reference for `import { TextDecoderStream } from 'node:stream/web'`.
|
||||
* https://nodejs.org/api/globals.html#class-textdecoderstream
|
||||
* @since v18.0.0
|
||||
*/
|
||||
var TextDecoderStream: typeof globalThis extends { onmessage: any; TextDecoderStream: infer T } ? T
|
||||
: typeof import("stream/web").TextDecoderStream;
|
||||
|
||||
interface TextEncoderStream extends _TextEncoderStream {}
|
||||
/**
|
||||
* `TextEncoderStream` class is a global reference for `import { TextEncoderStream } from 'node:stream/web'`.
|
||||
* https://nodejs.org/api/globals.html#class-textencoderstream
|
||||
* @since v18.0.0
|
||||
*/
|
||||
var TextEncoderStream: typeof globalThis extends { onmessage: any; TextEncoderStream: infer T } ? T
|
||||
: typeof import("stream/web").TextEncoderStream;
|
||||
|
||||
interface TransformStream<I = any, O = any> extends _TransformStream<I, O> {}
|
||||
/**
|
||||
* `TransformStream` class is a global reference for `import { TransformStream } from 'node:stream/web'`.
|
||||
* https://nodejs.org/api/globals.html#class-transformstream
|
||||
* @since v18.0.0
|
||||
*/
|
||||
var TransformStream: typeof globalThis extends { onmessage: any; TransformStream: infer T } ? T
|
||||
: typeof import("stream/web").TransformStream;
|
||||
|
||||
interface TransformStreamDefaultController<O = any> extends _TransformStreamDefaultController<O> {}
|
||||
/**
|
||||
* `TransformStreamDefaultController` class is a global reference for `import { TransformStreamDefaultController } from 'node:stream/web'`.
|
||||
* https://nodejs.org/api/globals.html#class-transformstreamdefaultcontroller
|
||||
* @since v18.0.0
|
||||
*/
|
||||
var TransformStreamDefaultController: typeof globalThis extends
|
||||
{ onmessage: any; TransformStreamDefaultController: infer T } ? T
|
||||
: typeof import("stream/web").TransformStreamDefaultController;
|
||||
|
||||
interface WritableStream<W = any> extends _WritableStream<W> {}
|
||||
/**
|
||||
* `WritableStream` class is a global reference for `import { WritableStream } from 'node:stream/web'`.
|
||||
* https://nodejs.org/api/globals.html#class-writablestream
|
||||
* @since v18.0.0
|
||||
*/
|
||||
var WritableStream: typeof globalThis extends { onmessage: any; WritableStream: infer T } ? T
|
||||
: typeof import("stream/web").WritableStream;
|
||||
|
||||
interface WritableStreamDefaultController extends _WritableStreamDefaultController {}
|
||||
/**
|
||||
* `WritableStreamDefaultController` class is a global reference for `import { WritableStreamDefaultController } from 'node:stream/web'`.
|
||||
* https://nodejs.org/api/globals.html#class-writablestreamdefaultcontroller
|
||||
* @since v18.0.0
|
||||
*/
|
||||
var WritableStreamDefaultController: typeof globalThis extends
|
||||
{ onmessage: any; WritableStreamDefaultController: infer T } ? T
|
||||
: typeof import("stream/web").WritableStreamDefaultController;
|
||||
|
||||
interface WritableStreamDefaultWriter<W = any> extends _WritableStreamDefaultWriter<W> {}
|
||||
/**
|
||||
* `WritableStreamDefaultWriter` class is a global reference for `import { WritableStreamDefaultWriter } from 'node:stream/web'`.
|
||||
* https://nodejs.org/api/globals.html#class-writablestreamdefaultwriter
|
||||
* @since v18.0.0
|
||||
*/
|
||||
var WritableStreamDefaultWriter: typeof globalThis extends
|
||||
{ onmessage: any; WritableStreamDefaultWriter: infer T } ? T
|
||||
: typeof import("stream/web").WritableStreamDefaultWriter;
|
||||
}
|
||||
}
|
||||
declare module "node:stream/web" {
|
||||
export * from "stream/web";
|
||||
declare module "stream/web" {
|
||||
export * from "node:stream/web";
|
||||
}
|
||||
|
||||
8
backend/node_modules/@types/node/string_decoder.d.ts
generated
vendored
8
backend/node_modules/@types/node/string_decoder.d.ts
generated
vendored
@@ -36,9 +36,9 @@
|
||||
* decoder.write(Buffer.from([0x82]));
|
||||
* console.log(decoder.end(Buffer.from([0xAC]))); // Prints: €
|
||||
* ```
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/string_decoder.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/string_decoder.js)
|
||||
*/
|
||||
declare module "string_decoder" {
|
||||
declare module "node:string_decoder" {
|
||||
class StringDecoder {
|
||||
constructor(encoding?: BufferEncoding);
|
||||
/**
|
||||
@@ -62,6 +62,6 @@ declare module "string_decoder" {
|
||||
end(buffer?: string | NodeJS.ArrayBufferView): string;
|
||||
}
|
||||
}
|
||||
declare module "node:string_decoder" {
|
||||
export * from "string_decoder";
|
||||
declare module "string_decoder" {
|
||||
export * from "node:string_decoder";
|
||||
}
|
||||
|
||||
260
backend/node_modules/@types/node/test.d.ts
generated
vendored
260
backend/node_modules/@types/node/test.d.ts
generated
vendored
@@ -76,11 +76,12 @@
|
||||
*
|
||||
* If any tests fail, the process exit code is set to `1`.
|
||||
* @since v18.0.0, v16.17.0
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/test.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/test.js)
|
||||
*/
|
||||
declare module "node:test" {
|
||||
import { AssertMethodNames } from "node:assert";
|
||||
import { Readable } from "node:stream";
|
||||
import { Readable, ReadableEventMap } from "node:stream";
|
||||
import { TestEvent } from "node:test/reporters";
|
||||
import TestFn = test.TestFn;
|
||||
import TestOptions = test.TestOptions;
|
||||
/**
|
||||
@@ -243,14 +244,14 @@ declare module "node:test" {
|
||||
/**
|
||||
* Specifies the current working directory to be used by the test runner.
|
||||
* Serves as the base path for resolving files according to the
|
||||
* [test runner execution model](https://nodejs.org/docs/latest-v24.x/api/test.html#test-runner-execution-model).
|
||||
* [test runner execution model](https://nodejs.org/docs/latest-v25.x/api/test.html#test-runner-execution-model).
|
||||
* @since v23.0.0
|
||||
* @default process.cwd()
|
||||
*/
|
||||
cwd?: string | undefined;
|
||||
/**
|
||||
* An array containing the list of files to run. If omitted, files are run according to the
|
||||
* [test runner execution model](https://nodejs.org/docs/latest-v24.x/api/test.html#test-runner-execution-model).
|
||||
* [test runner execution model](https://nodejs.org/docs/latest-v25.x/api/test.html#test-runner-execution-model).
|
||||
*/
|
||||
files?: readonly string[] | undefined;
|
||||
/**
|
||||
@@ -263,7 +264,7 @@ declare module "node:test" {
|
||||
/**
|
||||
* An array containing the list of glob patterns to match test files.
|
||||
* This option cannot be used together with `files`. If omitted, files are run according to the
|
||||
* [test runner execution model](https://nodejs.org/docs/latest-v24.x/api/test.html#test-runner-execution-model).
|
||||
* [test runner execution model](https://nodejs.org/docs/latest-v25.x/api/test.html#test-runner-execution-model).
|
||||
* @since v22.6.0
|
||||
*/
|
||||
globPatterns?: readonly string[] | undefined;
|
||||
@@ -351,7 +352,7 @@ declare module "node:test" {
|
||||
*/
|
||||
rerunFailuresFilePath?: string | undefined;
|
||||
/**
|
||||
* enable [code coverage](https://nodejs.org/docs/latest-v24.x/api/test.html#collecting-code-coverage) collection.
|
||||
* enable [code coverage](https://nodejs.org/docs/latest-v25.x/api/test.html#collecting-code-coverage) collection.
|
||||
* @since v22.10.0
|
||||
* @default false
|
||||
*/
|
||||
@@ -398,6 +399,23 @@ declare module "node:test" {
|
||||
*/
|
||||
functionCoverage?: number | undefined;
|
||||
}
|
||||
interface TestsStreamEventMap extends ReadableEventMap {
|
||||
"data": [data: TestEvent];
|
||||
"test:coverage": [data: EventData.TestCoverage];
|
||||
"test:complete": [data: EventData.TestComplete];
|
||||
"test:dequeue": [data: EventData.TestDequeue];
|
||||
"test:diagnostic": [data: EventData.TestDiagnostic];
|
||||
"test:enqueue": [data: EventData.TestEnqueue];
|
||||
"test:fail": [data: EventData.TestFail];
|
||||
"test:pass": [data: EventData.TestPass];
|
||||
"test:plan": [data: EventData.TestPlan];
|
||||
"test:start": [data: EventData.TestStart];
|
||||
"test:stderr": [data: EventData.TestStderr];
|
||||
"test:stdout": [data: EventData.TestStdout];
|
||||
"test:summary": [data: EventData.TestSummary];
|
||||
"test:watch:drained": [];
|
||||
"test:watch:restarted": [];
|
||||
}
|
||||
/**
|
||||
* A successful call to `run()` will return a new `TestsStream` object, streaming a series of events representing the execution of the tests.
|
||||
*
|
||||
@@ -405,96 +423,59 @@ declare module "node:test" {
|
||||
* @since v18.9.0, v16.19.0
|
||||
*/
|
||||
interface TestsStream extends Readable {
|
||||
addListener(event: "test:coverage", listener: (data: EventData.TestCoverage) => void): this;
|
||||
addListener(event: "test:complete", listener: (data: EventData.TestComplete) => void): this;
|
||||
addListener(event: "test:dequeue", listener: (data: EventData.TestDequeue) => void): this;
|
||||
addListener(event: "test:diagnostic", listener: (data: EventData.TestDiagnostic) => void): this;
|
||||
addListener(event: "test:enqueue", listener: (data: EventData.TestEnqueue) => void): this;
|
||||
addListener(event: "test:fail", listener: (data: EventData.TestFail) => void): this;
|
||||
addListener(event: "test:pass", listener: (data: EventData.TestPass) => void): this;
|
||||
addListener(event: "test:plan", listener: (data: EventData.TestPlan) => void): this;
|
||||
addListener(event: "test:start", listener: (data: EventData.TestStart) => void): this;
|
||||
addListener(event: "test:stderr", listener: (data: EventData.TestStderr) => void): this;
|
||||
addListener(event: "test:stdout", listener: (data: EventData.TestStdout) => void): this;
|
||||
addListener(event: "test:summary", listener: (data: EventData.TestSummary) => void): this;
|
||||
addListener(event: "test:watch:drained", listener: () => void): this;
|
||||
addListener(event: "test:watch:restarted", listener: () => void): this;
|
||||
addListener(event: string, listener: (...args: any[]) => void): this;
|
||||
emit(event: "test:coverage", data: EventData.TestCoverage): boolean;
|
||||
emit(event: "test:complete", data: EventData.TestComplete): boolean;
|
||||
emit(event: "test:dequeue", data: EventData.TestDequeue): boolean;
|
||||
emit(event: "test:diagnostic", data: EventData.TestDiagnostic): boolean;
|
||||
emit(event: "test:enqueue", data: EventData.TestEnqueue): boolean;
|
||||
emit(event: "test:fail", data: EventData.TestFail): boolean;
|
||||
emit(event: "test:pass", data: EventData.TestPass): boolean;
|
||||
emit(event: "test:plan", data: EventData.TestPlan): boolean;
|
||||
emit(event: "test:start", data: EventData.TestStart): boolean;
|
||||
emit(event: "test:stderr", data: EventData.TestStderr): boolean;
|
||||
emit(event: "test:stdout", data: EventData.TestStdout): boolean;
|
||||
emit(event: "test:summary", data: EventData.TestSummary): boolean;
|
||||
emit(event: "test:watch:drained"): boolean;
|
||||
emit(event: "test:watch:restarted"): boolean;
|
||||
emit(event: string | symbol, ...args: any[]): boolean;
|
||||
on(event: "test:coverage", listener: (data: EventData.TestCoverage) => void): this;
|
||||
on(event: "test:complete", listener: (data: EventData.TestComplete) => void): this;
|
||||
on(event: "test:dequeue", listener: (data: EventData.TestDequeue) => void): this;
|
||||
on(event: "test:diagnostic", listener: (data: EventData.TestDiagnostic) => void): this;
|
||||
on(event: "test:enqueue", listener: (data: EventData.TestEnqueue) => void): this;
|
||||
on(event: "test:fail", listener: (data: EventData.TestFail) => void): this;
|
||||
on(event: "test:pass", listener: (data: EventData.TestPass) => void): this;
|
||||
on(event: "test:plan", listener: (data: EventData.TestPlan) => void): this;
|
||||
on(event: "test:start", listener: (data: EventData.TestStart) => void): this;
|
||||
on(event: "test:stderr", listener: (data: EventData.TestStderr) => void): this;
|
||||
on(event: "test:stdout", listener: (data: EventData.TestStdout) => void): this;
|
||||
on(event: "test:summary", listener: (data: EventData.TestSummary) => void): this;
|
||||
on(event: "test:watch:drained", listener: () => void): this;
|
||||
on(event: "test:watch:restarted", listener: () => void): this;
|
||||
on(event: string, listener: (...args: any[]) => void): this;
|
||||
once(event: "test:coverage", listener: (data: EventData.TestCoverage) => void): this;
|
||||
once(event: "test:complete", listener: (data: EventData.TestComplete) => void): this;
|
||||
once(event: "test:dequeue", listener: (data: EventData.TestDequeue) => void): this;
|
||||
once(event: "test:diagnostic", listener: (data: EventData.TestDiagnostic) => void): this;
|
||||
once(event: "test:enqueue", listener: (data: EventData.TestEnqueue) => void): this;
|
||||
once(event: "test:fail", listener: (data: EventData.TestFail) => void): this;
|
||||
once(event: "test:pass", listener: (data: EventData.TestPass) => void): this;
|
||||
once(event: "test:plan", listener: (data: EventData.TestPlan) => void): this;
|
||||
once(event: "test:start", listener: (data: EventData.TestStart) => void): this;
|
||||
once(event: "test:stderr", listener: (data: EventData.TestStderr) => void): this;
|
||||
once(event: "test:stdout", listener: (data: EventData.TestStdout) => void): this;
|
||||
once(event: "test:summary", listener: (data: EventData.TestSummary) => void): this;
|
||||
once(event: "test:watch:drained", listener: () => void): this;
|
||||
once(event: "test:watch:restarted", listener: () => void): this;
|
||||
once(event: string, listener: (...args: any[]) => void): this;
|
||||
prependListener(event: "test:coverage", listener: (data: EventData.TestCoverage) => void): this;
|
||||
prependListener(event: "test:complete", listener: (data: EventData.TestComplete) => void): this;
|
||||
prependListener(event: "test:dequeue", listener: (data: EventData.TestDequeue) => void): this;
|
||||
prependListener(event: "test:diagnostic", listener: (data: EventData.TestDiagnostic) => void): this;
|
||||
prependListener(event: "test:enqueue", listener: (data: EventData.TestEnqueue) => void): this;
|
||||
prependListener(event: "test:fail", listener: (data: EventData.TestFail) => void): this;
|
||||
prependListener(event: "test:pass", listener: (data: EventData.TestPass) => void): this;
|
||||
prependListener(event: "test:plan", listener: (data: EventData.TestPlan) => void): this;
|
||||
prependListener(event: "test:start", listener: (data: EventData.TestStart) => void): this;
|
||||
prependListener(event: "test:stderr", listener: (data: EventData.TestStderr) => void): this;
|
||||
prependListener(event: "test:stdout", listener: (data: EventData.TestStdout) => void): this;
|
||||
prependListener(event: "test:summary", listener: (data: EventData.TestSummary) => void): this;
|
||||
prependListener(event: "test:watch:drained", listener: () => void): this;
|
||||
prependListener(event: "test:watch:restarted", listener: () => void): this;
|
||||
prependListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener(event: "test:coverage", listener: (data: EventData.TestCoverage) => void): this;
|
||||
prependOnceListener(event: "test:complete", listener: (data: EventData.TestComplete) => void): this;
|
||||
prependOnceListener(event: "test:dequeue", listener: (data: EventData.TestDequeue) => void): this;
|
||||
prependOnceListener(event: "test:diagnostic", listener: (data: EventData.TestDiagnostic) => void): this;
|
||||
prependOnceListener(event: "test:enqueue", listener: (data: EventData.TestEnqueue) => void): this;
|
||||
prependOnceListener(event: "test:fail", listener: (data: EventData.TestFail) => void): this;
|
||||
prependOnceListener(event: "test:pass", listener: (data: EventData.TestPass) => void): this;
|
||||
prependOnceListener(event: "test:plan", listener: (data: EventData.TestPlan) => void): this;
|
||||
prependOnceListener(event: "test:start", listener: (data: EventData.TestStart) => void): this;
|
||||
prependOnceListener(event: "test:stderr", listener: (data: EventData.TestStderr) => void): this;
|
||||
prependOnceListener(event: "test:stdout", listener: (data: EventData.TestStdout) => void): this;
|
||||
prependOnceListener(event: "test:summary", listener: (data: EventData.TestSummary) => void): this;
|
||||
prependOnceListener(event: "test:watch:drained", listener: () => void): this;
|
||||
prependOnceListener(event: "test:watch:restarted", listener: () => void): this;
|
||||
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
||||
// #region InternalEventEmitter
|
||||
addListener<E extends keyof TestsStreamEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: TestsStreamEventMap[E]) => void,
|
||||
): this;
|
||||
addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
emit<E extends keyof TestsStreamEventMap>(eventName: E, ...args: TestsStreamEventMap[E]): boolean;
|
||||
emit(eventName: string | symbol, ...args: any[]): boolean;
|
||||
listenerCount<E extends keyof TestsStreamEventMap>(
|
||||
eventName: E,
|
||||
listener?: (...args: TestsStreamEventMap[E]) => void,
|
||||
): number;
|
||||
listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
|
||||
listeners<E extends keyof TestsStreamEventMap>(eventName: E): ((...args: TestsStreamEventMap[E]) => void)[];
|
||||
listeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
||||
off<E extends keyof TestsStreamEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: TestsStreamEventMap[E]) => void,
|
||||
): this;
|
||||
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
on<E extends keyof TestsStreamEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: TestsStreamEventMap[E]) => void,
|
||||
): this;
|
||||
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
once<E extends keyof TestsStreamEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: TestsStreamEventMap[E]) => void,
|
||||
): this;
|
||||
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependListener<E extends keyof TestsStreamEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: TestsStreamEventMap[E]) => void,
|
||||
): this;
|
||||
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener<E extends keyof TestsStreamEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: TestsStreamEventMap[E]) => void,
|
||||
): this;
|
||||
prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
rawListeners<E extends keyof TestsStreamEventMap>(
|
||||
eventName: E,
|
||||
): ((...args: TestsStreamEventMap[E]) => void)[];
|
||||
rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
||||
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
||||
removeAllListeners<E extends keyof TestsStreamEventMap>(eventName?: E): this;
|
||||
removeAllListeners(eventName?: string | symbol): this;
|
||||
removeListener<E extends keyof TestsStreamEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: TestsStreamEventMap[E]) => void,
|
||||
): this;
|
||||
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
// #endregion
|
||||
}
|
||||
namespace EventData {
|
||||
interface Error extends globalThis.Error {
|
||||
@@ -1218,7 +1199,7 @@ declare module "node:test" {
|
||||
* highlighting.
|
||||
* @since v22.14.0
|
||||
* @param value A value to serialize to a string. If Node.js was started with
|
||||
* the [`--test-update-snapshots`](https://nodejs.org/docs/latest-v24.x/api/cli.html#--test-update-snapshots)
|
||||
* the [`--test-update-snapshots`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--test-update-snapshots)
|
||||
* flag, the serialized value is written to
|
||||
* `path`. Otherwise, the serialized value is compared to the contents of the
|
||||
* existing snapshot file.
|
||||
@@ -1241,7 +1222,7 @@ declare module "node:test" {
|
||||
* ```
|
||||
* @since v22.3.0
|
||||
* @param value A value to serialize to a string. If Node.js was started with
|
||||
* the [`--test-update-snapshots`](https://nodejs.org/docs/latest-v24.x/api/cli.html#--test-update-snapshots)
|
||||
* the [`--test-update-snapshots`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--test-update-snapshots)
|
||||
* flag, the serialized value is written to
|
||||
* the snapshot file. Otherwise, the serialized value is compared to the
|
||||
* corresponding value in the existing snapshot file.
|
||||
@@ -1672,7 +1653,7 @@ declare module "node:test" {
|
||||
* This function is used to mock the exports of ECMAScript modules, CommonJS modules, JSON modules, and
|
||||
* Node.js builtin modules. Any references to the original module prior to mocking are not impacted. In
|
||||
* order to enable module mocking, Node.js must be started with the
|
||||
* [`--experimental-test-module-mocks`](https://nodejs.org/docs/latest-v24.x/api/cli.html#--experimental-test-module-mocks)
|
||||
* [`--experimental-test-module-mocks`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--experimental-test-module-mocks)
|
||||
* command-line flag.
|
||||
*
|
||||
* The following example demonstrates how a mock is created for a module.
|
||||
@@ -2256,84 +2237,3 @@ declare module "node:test" {
|
||||
}[keyof T];
|
||||
export = test;
|
||||
}
|
||||
|
||||
/**
|
||||
* The `node:test/reporters` module exposes the builtin-reporters for `node:test`.
|
||||
* To access it:
|
||||
*
|
||||
* ```js
|
||||
* import test from 'node:test/reporters';
|
||||
* ```
|
||||
*
|
||||
* This module is only available under the `node:` scheme. The following will not
|
||||
* work:
|
||||
*
|
||||
* ```js
|
||||
* import test from 'node:test/reporters';
|
||||
* ```
|
||||
* @since v19.9.0
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/test/reporters.js)
|
||||
*/
|
||||
declare module "node:test/reporters" {
|
||||
import { Transform, TransformOptions } from "node:stream";
|
||||
import { EventData } from "node:test";
|
||||
|
||||
type TestEvent =
|
||||
| { type: "test:coverage"; data: EventData.TestCoverage }
|
||||
| { type: "test:complete"; data: EventData.TestComplete }
|
||||
| { type: "test:dequeue"; data: EventData.TestDequeue }
|
||||
| { type: "test:diagnostic"; data: EventData.TestDiagnostic }
|
||||
| { type: "test:enqueue"; data: EventData.TestEnqueue }
|
||||
| { type: "test:fail"; data: EventData.TestFail }
|
||||
| { type: "test:pass"; data: EventData.TestPass }
|
||||
| { type: "test:plan"; data: EventData.TestPlan }
|
||||
| { type: "test:start"; data: EventData.TestStart }
|
||||
| { type: "test:stderr"; data: EventData.TestStderr }
|
||||
| { type: "test:stdout"; data: EventData.TestStdout }
|
||||
| { type: "test:summary"; data: EventData.TestSummary }
|
||||
| { type: "test:watch:drained"; data: undefined }
|
||||
| { type: "test:watch:restarted"; data: undefined };
|
||||
type TestEventGenerator = AsyncGenerator<TestEvent, void>;
|
||||
|
||||
interface ReporterConstructorWrapper<T extends new(...args: any[]) => Transform> {
|
||||
new(...args: ConstructorParameters<T>): InstanceType<T>;
|
||||
(...args: ConstructorParameters<T>): InstanceType<T>;
|
||||
}
|
||||
|
||||
/**
|
||||
* The `dot` reporter outputs the test results in a compact format,
|
||||
* where each passing test is represented by a `.`,
|
||||
* and each failing test is represented by a `X`.
|
||||
* @since v20.0.0
|
||||
*/
|
||||
function dot(source: TestEventGenerator): AsyncGenerator<"\n" | "." | "X", void>;
|
||||
/**
|
||||
* The `tap` reporter outputs the test results in the [TAP](https://testanything.org/) format.
|
||||
* @since v20.0.0
|
||||
*/
|
||||
function tap(source: TestEventGenerator): AsyncGenerator<string, void>;
|
||||
class SpecReporter extends Transform {
|
||||
constructor();
|
||||
}
|
||||
/**
|
||||
* The `spec` reporter outputs the test results in a human-readable format.
|
||||
* @since v20.0.0
|
||||
*/
|
||||
const spec: ReporterConstructorWrapper<typeof SpecReporter>;
|
||||
/**
|
||||
* The `junit` reporter outputs test results in a jUnit XML format.
|
||||
* @since v21.0.0
|
||||
*/
|
||||
function junit(source: TestEventGenerator): AsyncGenerator<string, void>;
|
||||
class LcovReporter extends Transform {
|
||||
constructor(opts?: Omit<TransformOptions, "writableObjectMode">);
|
||||
}
|
||||
/**
|
||||
* The `lcov` reporter outputs test coverage when used with the
|
||||
* [`--experimental-test-coverage`](https://nodejs.org/docs/latest-v24.x/api/cli.html#--experimental-test-coverage) flag.
|
||||
* @since v22.0.0
|
||||
*/
|
||||
const lcov: ReporterConstructorWrapper<typeof LcovReporter>;
|
||||
|
||||
export { dot, junit, lcov, spec, tap, TestEvent };
|
||||
}
|
||||
|
||||
134
backend/node_modules/@types/node/timers.d.ts
generated
vendored
134
backend/node_modules/@types/node/timers.d.ts
generated
vendored
@@ -6,9 +6,9 @@
|
||||
* The timer functions within Node.js implement a similar API as the timers API
|
||||
* provided by Web Browsers but use a different internal implementation that is
|
||||
* built around the Node.js [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout).
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/timers.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/timers.js)
|
||||
*/
|
||||
declare module "timers" {
|
||||
declare module "node:timers" {
|
||||
import { Abortable } from "node:events";
|
||||
import * as promises from "node:timers/promises";
|
||||
export interface TimerOptions extends Abortable {
|
||||
@@ -145,132 +145,6 @@ declare module "timers" {
|
||||
_onTimeout(...args: any[]): void;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Schedules the "immediate" execution of the `callback` after I/O events'
|
||||
* callbacks.
|
||||
*
|
||||
* When multiple calls to `setImmediate()` are made, the `callback` functions are
|
||||
* queued for execution in the order in which they are created. The entire callback
|
||||
* queue is processed every event loop iteration. If an immediate timer is queued
|
||||
* from inside an executing callback, that timer will not be triggered until the
|
||||
* next event loop iteration.
|
||||
*
|
||||
* If `callback` is not a function, a `TypeError` will be thrown.
|
||||
*
|
||||
* This method has a custom variant for promises that is available using
|
||||
* `timersPromises.setImmediate()`.
|
||||
* @since v0.9.1
|
||||
* @param callback The function to call at the end of this turn of
|
||||
* the Node.js [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout)
|
||||
* @param args Optional arguments to pass when the `callback` is called.
|
||||
* @returns for use with `clearImmediate()`
|
||||
*/
|
||||
function setImmediate<TArgs extends any[]>(
|
||||
callback: (...args: TArgs) => void,
|
||||
...args: TArgs
|
||||
): NodeJS.Immediate;
|
||||
// Allow a single void-accepting argument to be optional in arguments lists.
|
||||
// Allows usage such as `new Promise(resolve => setTimeout(resolve, ms))` (#54258)
|
||||
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
||||
function setImmediate(callback: (_: void) => void): NodeJS.Immediate;
|
||||
namespace setImmediate {
|
||||
import __promisify__ = promises.setImmediate;
|
||||
export { __promisify__ };
|
||||
}
|
||||
/**
|
||||
* Schedules repeated execution of `callback` every `delay` milliseconds.
|
||||
*
|
||||
* When `delay` is larger than `2147483647` or less than `1` or `NaN`, the `delay`
|
||||
* will be set to `1`. Non-integer delays are truncated to an integer.
|
||||
*
|
||||
* If `callback` is not a function, a `TypeError` will be thrown.
|
||||
*
|
||||
* This method has a custom variant for promises that is available using
|
||||
* `timersPromises.setInterval()`.
|
||||
* @since v0.0.1
|
||||
* @param callback The function to call when the timer elapses.
|
||||
* @param delay The number of milliseconds to wait before calling the
|
||||
* `callback`. **Default:** `1`.
|
||||
* @param args Optional arguments to pass when the `callback` is called.
|
||||
* @returns for use with `clearInterval()`
|
||||
*/
|
||||
function setInterval<TArgs extends any[]>(
|
||||
callback: (...args: TArgs) => void,
|
||||
delay?: number,
|
||||
...args: TArgs
|
||||
): NodeJS.Timeout;
|
||||
// Allow a single void-accepting argument to be optional in arguments lists.
|
||||
// Allows usage such as `new Promise(resolve => setTimeout(resolve, ms))` (#54258)
|
||||
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
||||
function setInterval(callback: (_: void) => void, delay?: number): NodeJS.Timeout;
|
||||
/**
|
||||
* Schedules execution of a one-time `callback` after `delay` milliseconds.
|
||||
*
|
||||
* The `callback` will likely not be invoked in precisely `delay` milliseconds.
|
||||
* Node.js makes no guarantees about the exact timing of when callbacks will fire,
|
||||
* nor of their ordering. The callback will be called as close as possible to the
|
||||
* time specified.
|
||||
*
|
||||
* When `delay` is larger than `2147483647` or less than `1` or `NaN`, the `delay`
|
||||
* will be set to `1`. Non-integer delays are truncated to an integer.
|
||||
*
|
||||
* If `callback` is not a function, a `TypeError` will be thrown.
|
||||
*
|
||||
* This method has a custom variant for promises that is available using
|
||||
* `timersPromises.setTimeout()`.
|
||||
* @since v0.0.1
|
||||
* @param callback The function to call when the timer elapses.
|
||||
* @param delay The number of milliseconds to wait before calling the
|
||||
* `callback`. **Default:** `1`.
|
||||
* @param args Optional arguments to pass when the `callback` is called.
|
||||
* @returns for use with `clearTimeout()`
|
||||
*/
|
||||
function setTimeout<TArgs extends any[]>(
|
||||
callback: (...args: TArgs) => void,
|
||||
delay?: number,
|
||||
...args: TArgs
|
||||
): NodeJS.Timeout;
|
||||
// Allow a single void-accepting argument to be optional in arguments lists.
|
||||
// Allows usage such as `new Promise(resolve => setTimeout(resolve, ms))` (#54258)
|
||||
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
||||
function setTimeout(callback: (_: void) => void, delay?: number): NodeJS.Timeout;
|
||||
namespace setTimeout {
|
||||
import __promisify__ = promises.setTimeout;
|
||||
export { __promisify__ };
|
||||
}
|
||||
/**
|
||||
* Cancels an `Immediate` object created by `setImmediate()`.
|
||||
* @since v0.9.1
|
||||
* @param immediate An `Immediate` object as returned by `setImmediate()`.
|
||||
*/
|
||||
function clearImmediate(immediate: NodeJS.Immediate | undefined): void;
|
||||
/**
|
||||
* Cancels a `Timeout` object created by `setInterval()`.
|
||||
* @since v0.0.1
|
||||
* @param timeout A `Timeout` object as returned by `setInterval()`
|
||||
* or the primitive of the `Timeout` object as a string or a number.
|
||||
*/
|
||||
function clearInterval(timeout: NodeJS.Timeout | string | number | undefined): void;
|
||||
/**
|
||||
* Cancels a `Timeout` object created by `setTimeout()`.
|
||||
* @since v0.0.1
|
||||
* @param timeout A `Timeout` object as returned by `setTimeout()`
|
||||
* or the primitive of the `Timeout` object as a string or a number.
|
||||
*/
|
||||
function clearTimeout(timeout: NodeJS.Timeout | string | number | undefined): void;
|
||||
/**
|
||||
* The `queueMicrotask()` method queues a microtask to invoke `callback`. If
|
||||
* `callback` throws an exception, the `process` object `'uncaughtException'`
|
||||
* event will be emitted.
|
||||
*
|
||||
* The microtask queue is managed by V8 and may be used in a similar manner to
|
||||
* the `process.nextTick()` queue, which is managed by Node.js. The
|
||||
* `process.nextTick()` queue is always processed before the microtask queue
|
||||
* within each turn of the Node.js event loop.
|
||||
* @since v11.0.0
|
||||
* @param callback Function to be queued.
|
||||
*/
|
||||
function queueMicrotask(callback: () => void): void;
|
||||
}
|
||||
import clearImmediate = globalThis.clearImmediate;
|
||||
import clearInterval = globalThis.clearInterval;
|
||||
@@ -280,6 +154,6 @@ declare module "timers" {
|
||||
import setTimeout = globalThis.setTimeout;
|
||||
export { clearImmediate, clearInterval, clearTimeout, promises, setImmediate, setInterval, setTimeout };
|
||||
}
|
||||
declare module "node:timers" {
|
||||
export * from "timers";
|
||||
declare module "timers" {
|
||||
export * from "node:timers";
|
||||
}
|
||||
|
||||
8
backend/node_modules/@types/node/timers/promises.d.ts
generated
vendored
8
backend/node_modules/@types/node/timers/promises.d.ts
generated
vendored
@@ -11,9 +11,9 @@
|
||||
* } from 'node:timers/promises';
|
||||
* ```
|
||||
* @since v15.0.0
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/timers/promises.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/timers/promises.js)
|
||||
*/
|
||||
declare module "timers/promises" {
|
||||
declare module "node:timers/promises" {
|
||||
import { TimerOptions } from "node:timers";
|
||||
/**
|
||||
* ```js
|
||||
@@ -103,6 +103,6 @@ declare module "timers/promises" {
|
||||
}
|
||||
const scheduler: Scheduler;
|
||||
}
|
||||
declare module "node:timers/promises" {
|
||||
export * from "timers/promises";
|
||||
declare module "timers/promises" {
|
||||
export * from "node:timers/promises";
|
||||
}
|
||||
|
||||
283
backend/node_modules/@types/node/tls.d.ts
generated
vendored
283
backend/node_modules/@types/node/tls.d.ts
generated
vendored
@@ -6,9 +6,9 @@
|
||||
* ```js
|
||||
* import tls from 'node:tls';
|
||||
* ```
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/tls.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/tls.js)
|
||||
*/
|
||||
declare module "tls" {
|
||||
declare module "node:tls" {
|
||||
import { NonSharedBuffer } from "node:buffer";
|
||||
import { X509Certificate } from "node:crypto";
|
||||
import * as net from "node:net";
|
||||
@@ -207,6 +207,12 @@ declare module "tls" {
|
||||
*/
|
||||
requestOCSP?: boolean | undefined;
|
||||
}
|
||||
interface TLSSocketEventMap extends net.SocketEventMap {
|
||||
"keylog": [line: NonSharedBuffer];
|
||||
"OCSPResponse": [response: NonSharedBuffer];
|
||||
"secureConnect": [];
|
||||
"session": [session: NonSharedBuffer];
|
||||
}
|
||||
/**
|
||||
* Performs transparent encryption of written data and all required TLS
|
||||
* negotiation.
|
||||
@@ -245,6 +251,10 @@ declare module "tls" {
|
||||
* When a handshake is completed but not ALPN protocol was selected, tlsSocket.alpnProtocol equals false.
|
||||
*/
|
||||
alpnProtocol: string | false | null;
|
||||
/**
|
||||
* String containing the server name requested via SNI (Server Name Indication) TLS extension.
|
||||
*/
|
||||
servername: string | false | null;
|
||||
/**
|
||||
* Returns an object representing the local certificate. The returned object has
|
||||
* some properties corresponding to the fields of the certificate.
|
||||
@@ -480,36 +490,48 @@ declare module "tls" {
|
||||
* @return requested bytes of the keying material
|
||||
*/
|
||||
exportKeyingMaterial(length: number, label: string, context: Buffer): NonSharedBuffer;
|
||||
addListener(event: string, listener: (...args: any[]) => void): this;
|
||||
addListener(event: "OCSPResponse", listener: (response: NonSharedBuffer) => void): this;
|
||||
addListener(event: "secureConnect", listener: () => void): this;
|
||||
addListener(event: "session", listener: (session: NonSharedBuffer) => void): this;
|
||||
addListener(event: "keylog", listener: (line: NonSharedBuffer) => void): this;
|
||||
emit(event: string | symbol, ...args: any[]): boolean;
|
||||
emit(event: "OCSPResponse", response: NonSharedBuffer): boolean;
|
||||
emit(event: "secureConnect"): boolean;
|
||||
emit(event: "session", session: NonSharedBuffer): boolean;
|
||||
emit(event: "keylog", line: NonSharedBuffer): boolean;
|
||||
on(event: string, listener: (...args: any[]) => void): this;
|
||||
on(event: "OCSPResponse", listener: (response: NonSharedBuffer) => void): this;
|
||||
on(event: "secureConnect", listener: () => void): this;
|
||||
on(event: "session", listener: (session: NonSharedBuffer) => void): this;
|
||||
on(event: "keylog", listener: (line: NonSharedBuffer) => void): this;
|
||||
once(event: string, listener: (...args: any[]) => void): this;
|
||||
once(event: "OCSPResponse", listener: (response: NonSharedBuffer) => void): this;
|
||||
once(event: "secureConnect", listener: () => void): this;
|
||||
once(event: "session", listener: (session: NonSharedBuffer) => void): this;
|
||||
once(event: "keylog", listener: (line: NonSharedBuffer) => void): this;
|
||||
prependListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependListener(event: "OCSPResponse", listener: (response: NonSharedBuffer) => void): this;
|
||||
prependListener(event: "secureConnect", listener: () => void): this;
|
||||
prependListener(event: "session", listener: (session: NonSharedBuffer) => void): this;
|
||||
prependListener(event: "keylog", listener: (line: NonSharedBuffer) => void): this;
|
||||
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener(event: "OCSPResponse", listener: (response: NonSharedBuffer) => void): this;
|
||||
prependOnceListener(event: "secureConnect", listener: () => void): this;
|
||||
prependOnceListener(event: "session", listener: (session: NonSharedBuffer) => void): this;
|
||||
prependOnceListener(event: "keylog", listener: (line: NonSharedBuffer) => void): this;
|
||||
// #region InternalEventEmitter
|
||||
addListener<E extends keyof TLSSocketEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: TLSSocketEventMap[E]) => void,
|
||||
): this;
|
||||
addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
emit<E extends keyof TLSSocketEventMap>(eventName: E, ...args: TLSSocketEventMap[E]): boolean;
|
||||
emit(eventName: string | symbol, ...args: any[]): boolean;
|
||||
listenerCount<E extends keyof TLSSocketEventMap>(
|
||||
eventName: E,
|
||||
listener?: (...args: TLSSocketEventMap[E]) => void,
|
||||
): number;
|
||||
listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
|
||||
listeners<E extends keyof TLSSocketEventMap>(eventName: E): ((...args: TLSSocketEventMap[E]) => void)[];
|
||||
listeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
||||
off<E extends keyof TLSSocketEventMap>(eventName: E, listener: (...args: TLSSocketEventMap[E]) => void): this;
|
||||
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
on<E extends keyof TLSSocketEventMap>(eventName: E, listener: (...args: TLSSocketEventMap[E]) => void): this;
|
||||
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
once<E extends keyof TLSSocketEventMap>(eventName: E, listener: (...args: TLSSocketEventMap[E]) => void): this;
|
||||
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependListener<E extends keyof TLSSocketEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: TLSSocketEventMap[E]) => void,
|
||||
): this;
|
||||
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener<E extends keyof TLSSocketEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: TLSSocketEventMap[E]) => void,
|
||||
): this;
|
||||
prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
rawListeners<E extends keyof TLSSocketEventMap>(eventName: E): ((...args: TLSSocketEventMap[E]) => void)[];
|
||||
rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
||||
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
||||
removeAllListeners<E extends keyof TLSSocketEventMap>(eventName?: E): this;
|
||||
removeAllListeners(eventName?: string | symbol): this;
|
||||
removeListener<E extends keyof TLSSocketEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: TLSSocketEventMap[E]) => void,
|
||||
): this;
|
||||
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
// #endregion
|
||||
}
|
||||
interface CommonConnectionOptions {
|
||||
/**
|
||||
@@ -630,6 +652,19 @@ declare module "tls" {
|
||||
*/
|
||||
pskCallback?: ((hint: string | null) => PSKCallbackNegotation | null) | undefined;
|
||||
}
|
||||
interface ServerEventMap extends net.ServerEventMap {
|
||||
"connection": [socket: net.Socket];
|
||||
"keylog": [line: NonSharedBuffer, tlsSocket: TLSSocket];
|
||||
"newSession": [sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void];
|
||||
"OCSPRequest": [
|
||||
certificate: NonSharedBuffer,
|
||||
issuer: NonSharedBuffer,
|
||||
callback: (err: Error | null, resp: Buffer | null) => void,
|
||||
];
|
||||
"resumeSession": [sessionId: Buffer, callback: (err: Error | null, sessionData?: Buffer) => void];
|
||||
"secureConnection": [tlsSocket: TLSSocket];
|
||||
"tlsClientError": [exception: Error, tlsSocket: TLSSocket];
|
||||
}
|
||||
/**
|
||||
* Accepts encrypted connections using TLS or SSL.
|
||||
* @since v0.3.2
|
||||
@@ -675,151 +710,45 @@ declare module "tls" {
|
||||
* @param keys A 48-byte buffer containing the session ticket keys.
|
||||
*/
|
||||
setTicketKeys(keys: Buffer): void;
|
||||
/**
|
||||
* events.EventEmitter
|
||||
* 1. tlsClientError
|
||||
* 2. newSession
|
||||
* 3. OCSPRequest
|
||||
* 4. resumeSession
|
||||
* 5. secureConnection
|
||||
* 6. keylog
|
||||
*/
|
||||
addListener(event: string, listener: (...args: any[]) => void): this;
|
||||
addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
|
||||
addListener(
|
||||
event: "newSession",
|
||||
listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
|
||||
// #region InternalEventEmitter
|
||||
addListener<E extends keyof ServerEventMap>(eventName: E, listener: (...args: ServerEventMap[E]) => void): this;
|
||||
addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
emit<E extends keyof ServerEventMap>(eventName: E, ...args: ServerEventMap[E]): boolean;
|
||||
emit(eventName: string | symbol, ...args: any[]): boolean;
|
||||
listenerCount<E extends keyof ServerEventMap>(
|
||||
eventName: E,
|
||||
listener?: (...args: ServerEventMap[E]) => void,
|
||||
): number;
|
||||
listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
|
||||
listeners<E extends keyof ServerEventMap>(eventName: E): ((...args: ServerEventMap[E]) => void)[];
|
||||
listeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
||||
off<E extends keyof ServerEventMap>(eventName: E, listener: (...args: ServerEventMap[E]) => void): this;
|
||||
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
on<E extends keyof ServerEventMap>(eventName: E, listener: (...args: ServerEventMap[E]) => void): this;
|
||||
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
once<E extends keyof ServerEventMap>(eventName: E, listener: (...args: ServerEventMap[E]) => void): this;
|
||||
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependListener<E extends keyof ServerEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ServerEventMap[E]) => void,
|
||||
): this;
|
||||
addListener(
|
||||
event: "OCSPRequest",
|
||||
listener: (
|
||||
certificate: NonSharedBuffer,
|
||||
issuer: NonSharedBuffer,
|
||||
callback: (err: Error | null, resp: Buffer | null) => void,
|
||||
) => void,
|
||||
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener<E extends keyof ServerEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ServerEventMap[E]) => void,
|
||||
): this;
|
||||
addListener(
|
||||
event: "resumeSession",
|
||||
listener: (
|
||||
sessionId: NonSharedBuffer,
|
||||
callback: (err: Error | null, sessionData: Buffer | null) => void,
|
||||
) => void,
|
||||
prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
rawListeners<E extends keyof ServerEventMap>(eventName: E): ((...args: ServerEventMap[E]) => void)[];
|
||||
rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
||||
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
||||
removeAllListeners<E extends keyof ServerEventMap>(eventName?: E): this;
|
||||
removeAllListeners(eventName?: string | symbol): this;
|
||||
removeListener<E extends keyof ServerEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: ServerEventMap[E]) => void,
|
||||
): this;
|
||||
addListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
|
||||
addListener(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: TLSSocket) => void): this;
|
||||
emit(event: string | symbol, ...args: any[]): boolean;
|
||||
emit(event: "tlsClientError", err: Error, tlsSocket: TLSSocket): boolean;
|
||||
emit(
|
||||
event: "newSession",
|
||||
sessionId: NonSharedBuffer,
|
||||
sessionData: NonSharedBuffer,
|
||||
callback: () => void,
|
||||
): boolean;
|
||||
emit(
|
||||
event: "OCSPRequest",
|
||||
certificate: NonSharedBuffer,
|
||||
issuer: NonSharedBuffer,
|
||||
callback: (err: Error | null, resp: Buffer | null) => void,
|
||||
): boolean;
|
||||
emit(
|
||||
event: "resumeSession",
|
||||
sessionId: NonSharedBuffer,
|
||||
callback: (err: Error | null, sessionData: Buffer | null) => void,
|
||||
): boolean;
|
||||
emit(event: "secureConnection", tlsSocket: TLSSocket): boolean;
|
||||
emit(event: "keylog", line: NonSharedBuffer, tlsSocket: TLSSocket): boolean;
|
||||
on(event: string, listener: (...args: any[]) => void): this;
|
||||
on(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
|
||||
on(
|
||||
event: "newSession",
|
||||
listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
|
||||
): this;
|
||||
on(
|
||||
event: "OCSPRequest",
|
||||
listener: (
|
||||
certificate: NonSharedBuffer,
|
||||
issuer: NonSharedBuffer,
|
||||
callback: (err: Error | null, resp: Buffer | null) => void,
|
||||
) => void,
|
||||
): this;
|
||||
on(
|
||||
event: "resumeSession",
|
||||
listener: (
|
||||
sessionId: NonSharedBuffer,
|
||||
callback: (err: Error | null, sessionData: Buffer | null) => void,
|
||||
) => void,
|
||||
): this;
|
||||
on(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
|
||||
on(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: TLSSocket) => void): this;
|
||||
once(event: string, listener: (...args: any[]) => void): this;
|
||||
once(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
|
||||
once(
|
||||
event: "newSession",
|
||||
listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
|
||||
): this;
|
||||
once(
|
||||
event: "OCSPRequest",
|
||||
listener: (
|
||||
certificate: NonSharedBuffer,
|
||||
issuer: NonSharedBuffer,
|
||||
callback: (err: Error | null, resp: Buffer | null) => void,
|
||||
) => void,
|
||||
): this;
|
||||
once(
|
||||
event: "resumeSession",
|
||||
listener: (
|
||||
sessionId: NonSharedBuffer,
|
||||
callback: (err: Error | null, sessionData: Buffer | null) => void,
|
||||
) => void,
|
||||
): this;
|
||||
once(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
|
||||
once(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: TLSSocket) => void): this;
|
||||
prependListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
|
||||
prependListener(
|
||||
event: "newSession",
|
||||
listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
|
||||
): this;
|
||||
prependListener(
|
||||
event: "OCSPRequest",
|
||||
listener: (
|
||||
certificate: NonSharedBuffer,
|
||||
issuer: NonSharedBuffer,
|
||||
callback: (err: Error | null, resp: Buffer | null) => void,
|
||||
) => void,
|
||||
): this;
|
||||
prependListener(
|
||||
event: "resumeSession",
|
||||
listener: (
|
||||
sessionId: NonSharedBuffer,
|
||||
callback: (err: Error | null, sessionData: Buffer | null) => void,
|
||||
) => void,
|
||||
): this;
|
||||
prependListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
|
||||
prependListener(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: TLSSocket) => void): this;
|
||||
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
|
||||
prependOnceListener(
|
||||
event: "newSession",
|
||||
listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
|
||||
): this;
|
||||
prependOnceListener(
|
||||
event: "OCSPRequest",
|
||||
listener: (
|
||||
certificate: NonSharedBuffer,
|
||||
issuer: NonSharedBuffer,
|
||||
callback: (err: Error | null, resp: Buffer | null) => void,
|
||||
) => void,
|
||||
): this;
|
||||
prependOnceListener(
|
||||
event: "resumeSession",
|
||||
listener: (
|
||||
sessionId: NonSharedBuffer,
|
||||
callback: (err: Error | null, sessionData: Buffer | null) => void,
|
||||
) => void,
|
||||
): this;
|
||||
prependOnceListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
|
||||
prependOnceListener(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: TLSSocket) => void): this;
|
||||
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
// #endregion
|
||||
}
|
||||
type SecureVersion = "TLSv1.3" | "TLSv1.2" | "TLSv1.1" | "TLSv1";
|
||||
interface SecureContextOptions {
|
||||
@@ -1175,7 +1104,7 @@ declare module "tls" {
|
||||
* the `ciphers` option of `{@link createSecureContext}`.
|
||||
*
|
||||
* Not all supported ciphers are enabled by default. See
|
||||
* [Modifying the default TLS cipher suite](https://nodejs.org/docs/latest-v24.x/api/tls.html#modifying-the-default-tls-cipher-suite).
|
||||
* [Modifying the default TLS cipher suite](https://nodejs.org/docs/latest-v25.x/api/tls.html#modifying-the-default-tls-cipher-suite).
|
||||
*
|
||||
* Cipher names that start with `'tls_'` are for TLSv1.3, all the others are for
|
||||
* TLSv1.2 and below.
|
||||
@@ -1264,6 +1193,6 @@ declare module "tls" {
|
||||
*/
|
||||
const rootCertificates: readonly string[];
|
||||
}
|
||||
declare module "node:tls" {
|
||||
export * from "tls";
|
||||
declare module "tls" {
|
||||
export * from "node:tls";
|
||||
}
|
||||
|
||||
18
backend/node_modules/@types/node/trace_events.d.ts
generated
vendored
18
backend/node_modules/@types/node/trace_events.d.ts
generated
vendored
@@ -9,8 +9,8 @@
|
||||
* The available categories are:
|
||||
*
|
||||
* * `node`: An empty placeholder.
|
||||
* * `node.async_hooks`: Enables capture of detailed [`async_hooks`](https://nodejs.org/docs/latest-v24.x/api/async_hooks.html) trace data.
|
||||
* The [`async_hooks`](https://nodejs.org/docs/latest-v24.x/api/async_hooks.html) events have a unique `asyncId` and a special `triggerId` `triggerAsyncId` property.
|
||||
* * `node.async_hooks`: Enables capture of detailed [`async_hooks`](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html) trace data.
|
||||
* The [`async_hooks`](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html) events have a unique `asyncId` and a special `triggerId` `triggerAsyncId` property.
|
||||
* * `node.bootstrap`: Enables capture of Node.js bootstrap milestones.
|
||||
* * `node.console`: Enables capture of `console.time()` and `console.count()` output.
|
||||
* * `node.threadpoolwork.sync`: Enables capture of trace data for threadpool synchronous operations, such as `blob`, `zlib`, `crypto` and `node_api`.
|
||||
@@ -22,7 +22,7 @@
|
||||
* * `node.fs_dir.sync`: Enables capture of trace data for file system sync directory methods.
|
||||
* * `node.fs.async`: Enables capture of trace data for file system async methods.
|
||||
* * `node.fs_dir.async`: Enables capture of trace data for file system async directory methods.
|
||||
* * `node.perf`: Enables capture of [Performance API](https://nodejs.org/docs/latest-v24.x/api/perf_hooks.html) measurements.
|
||||
* * `node.perf`: Enables capture of [Performance API](https://nodejs.org/docs/latest-v25.x/api/perf_hooks.html) measurements.
|
||||
* * `node.perf.usertiming`: Enables capture of only Performance API User Timing
|
||||
* measures and marks.
|
||||
* * `node.perf.timerify`: Enables capture of only Performance API timerify
|
||||
@@ -30,7 +30,7 @@
|
||||
* * `node.promises.rejections`: Enables capture of trace data tracking the number
|
||||
* of unhandled Promise rejections and handled-after-rejections.
|
||||
* * `node.vm.script`: Enables capture of trace data for the `node:vm` module's `runInNewContext()`, `runInContext()`, and `runInThisContext()` methods.
|
||||
* * `v8`: The [V8](https://nodejs.org/docs/latest-v24.x/api/v8.html) events are GC, compiling, and execution related.
|
||||
* * `v8`: The [V8](https://nodejs.org/docs/latest-v25.x/api/v8.html) events are GC, compiling, and execution related.
|
||||
* * `node.http`: Enables capture of trace data for http request / response.
|
||||
*
|
||||
* By default the `node`, `node.async_hooks`, and `v8` categories are enabled.
|
||||
@@ -88,11 +88,11 @@
|
||||
* However the trace-event timestamps are expressed in microseconds,
|
||||
* unlike `process.hrtime()` which returns nanoseconds.
|
||||
*
|
||||
* The features from this module are not available in [`Worker`](https://nodejs.org/docs/latest-v24.x/api/worker_threads.html#class-worker) threads.
|
||||
* The features from this module are not available in [`Worker`](https://nodejs.org/docs/latest-v25.x/api/worker_threads.html#class-worker) threads.
|
||||
* @experimental
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/trace_events.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/trace_events.js)
|
||||
*/
|
||||
declare module "trace_events" {
|
||||
declare module "node:trace_events" {
|
||||
/**
|
||||
* The `Tracing` object is used to enable or disable tracing for sets of
|
||||
* categories. Instances are created using the
|
||||
@@ -192,6 +192,6 @@ declare module "trace_events" {
|
||||
*/
|
||||
function getEnabledCategories(): string | undefined;
|
||||
}
|
||||
declare module "node:trace_events" {
|
||||
export * from "trace_events";
|
||||
declare module "trace_events" {
|
||||
export * from "node:trace_events";
|
||||
}
|
||||
|
||||
74
backend/node_modules/@types/node/tty.d.ts
generated
vendored
74
backend/node_modules/@types/node/tty.d.ts
generated
vendored
@@ -21,9 +21,9 @@
|
||||
*
|
||||
* In most cases, there should be little to no reason for an application to
|
||||
* manually create instances of the `tty.ReadStream` and `tty.WriteStream` classes.
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/tty.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/tty.js)
|
||||
*/
|
||||
declare module "tty" {
|
||||
declare module "node:tty" {
|
||||
import * as net from "node:net";
|
||||
/**
|
||||
* The `tty.isatty()` method returns `true` if the given `fd` is associated with
|
||||
@@ -75,6 +75,9 @@ declare module "tty" {
|
||||
* 1 - to the right from cursor
|
||||
*/
|
||||
type Direction = -1 | 0 | 1;
|
||||
interface WriteStreamEventMap extends net.SocketEventMap {
|
||||
"resize": [];
|
||||
}
|
||||
/**
|
||||
* Represents the writable side of a TTY. In normal circumstances, `process.stdout` and `process.stderr` will be the only`tty.WriteStream` instances created for a Node.js process and there
|
||||
* should be no reason to create additional instances.
|
||||
@@ -82,18 +85,6 @@ declare module "tty" {
|
||||
*/
|
||||
class WriteStream extends net.Socket {
|
||||
constructor(fd: number);
|
||||
addListener(event: string, listener: (...args: any[]) => void): this;
|
||||
addListener(event: "resize", listener: () => void): this;
|
||||
emit(event: string | symbol, ...args: any[]): boolean;
|
||||
emit(event: "resize"): boolean;
|
||||
on(event: string, listener: (...args: any[]) => void): this;
|
||||
on(event: "resize", listener: () => void): this;
|
||||
once(event: string, listener: (...args: any[]) => void): this;
|
||||
once(event: "resize", listener: () => void): this;
|
||||
prependListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependListener(event: "resize", listener: () => void): this;
|
||||
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener(event: "resize", listener: () => void): this;
|
||||
/**
|
||||
* `writeStream.clearLine()` clears the current line of this `WriteStream` in a
|
||||
* direction identified by `dir`.
|
||||
@@ -201,8 +192,59 @@ declare module "tty" {
|
||||
* @since v0.5.8
|
||||
*/
|
||||
isTTY: boolean;
|
||||
// #region InternalEventEmitter
|
||||
addListener<E extends keyof WriteStreamEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: WriteStreamEventMap[E]) => void,
|
||||
): this;
|
||||
addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
emit<E extends keyof WriteStreamEventMap>(eventName: E, ...args: WriteStreamEventMap[E]): boolean;
|
||||
emit(eventName: string | symbol, ...args: any[]): boolean;
|
||||
listenerCount<E extends keyof WriteStreamEventMap>(
|
||||
eventName: E,
|
||||
listener?: (...args: WriteStreamEventMap[E]) => void,
|
||||
): number;
|
||||
listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
|
||||
listeners<E extends keyof WriteStreamEventMap>(eventName: E): ((...args: WriteStreamEventMap[E]) => void)[];
|
||||
listeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
||||
off<E extends keyof WriteStreamEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: WriteStreamEventMap[E]) => void,
|
||||
): this;
|
||||
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
on<E extends keyof WriteStreamEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: WriteStreamEventMap[E]) => void,
|
||||
): this;
|
||||
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
once<E extends keyof WriteStreamEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: WriteStreamEventMap[E]) => void,
|
||||
): this;
|
||||
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependListener<E extends keyof WriteStreamEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: WriteStreamEventMap[E]) => void,
|
||||
): this;
|
||||
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener<E extends keyof WriteStreamEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: WriteStreamEventMap[E]) => void,
|
||||
): this;
|
||||
prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
rawListeners<E extends keyof WriteStreamEventMap>(eventName: E): ((...args: WriteStreamEventMap[E]) => void)[];
|
||||
rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
||||
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
||||
removeAllListeners<E extends keyof WriteStreamEventMap>(eventName?: E): this;
|
||||
removeAllListeners(eventName?: string | symbol): this;
|
||||
removeListener<E extends keyof WriteStreamEventMap>(
|
||||
eventName: E,
|
||||
listener: (...args: WriteStreamEventMap[E]) => void,
|
||||
): this;
|
||||
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
// #endregion
|
||||
}
|
||||
}
|
||||
declare module "node:tty" {
|
||||
export * from "tty";
|
||||
declare module "tty" {
|
||||
export * from "node:tty";
|
||||
}
|
||||
|
||||
660
backend/node_modules/@types/node/url.d.ts
generated
vendored
660
backend/node_modules/@types/node/url.d.ts
generated
vendored
@@ -5,10 +5,10 @@
|
||||
* ```js
|
||||
* import url from 'node:url';
|
||||
* ```
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/url.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/url.js)
|
||||
*/
|
||||
declare module "url" {
|
||||
import { Blob as NodeBlob, NonSharedBuffer } from "node:buffer";
|
||||
declare module "node:url" {
|
||||
import { Blob, NonSharedBuffer } from "node:buffer";
|
||||
import { ClientRequestArgs } from "node:http";
|
||||
import { ParsedUrlQuery, ParsedUrlQueryInput } from "node:querystring";
|
||||
// Input to `url.format`
|
||||
@@ -74,7 +74,7 @@ declare module "url" {
|
||||
* strings. It is prone to security issues such as [host name spoofing](https://hackerone.com/reports/678487)
|
||||
* and incorrect handling of usernames and passwords. Do not use with untrusted
|
||||
* input. CVEs are not issued for `url.parse()` vulnerabilities. Use the
|
||||
* [WHATWG URL](https://nodejs.org/docs/latest-v24.x/api/url.html#the-whatwg-url-api) API instead, for example:
|
||||
* [WHATWG URL](https://nodejs.org/docs/latest-v25.x/api/url.html#the-whatwg-url-api) API instead, for example:
|
||||
*
|
||||
* ```js
|
||||
* function getURL(req) {
|
||||
@@ -97,7 +97,7 @@ declare module "url" {
|
||||
* @deprecated Use the WHATWG URL API instead.
|
||||
* @param urlString The URL string to parse.
|
||||
* @param parseQueryString If `true`, the `query` property will always
|
||||
* be set to an object returned by the [`querystring`](https://nodejs.org/docs/latest-v24.x/api/querystring.html) module's `parse()`
|
||||
* be set to an object returned by the [`querystring`](https://nodejs.org/docs/latest-v25.x/api/querystring.html) module's `parse()`
|
||||
* method. If `false`, the `query` property on the returned URL object will be an
|
||||
* unparsed, undecoded string. **Default:** `false`.
|
||||
* @param slashesDenoteHost If `true`, the first token after the literal
|
||||
@@ -418,381 +418,8 @@ declare module "url" {
|
||||
*/
|
||||
unicode?: boolean | undefined;
|
||||
}
|
||||
/**
|
||||
* Browser-compatible `URL` class, implemented by following the WHATWG URL
|
||||
* Standard. [Examples of parsed URLs](https://url.spec.whatwg.org/#example-url-parsing) may be found in the Standard itself.
|
||||
* The `URL` class is also available on the global object.
|
||||
*
|
||||
* In accordance with browser conventions, all properties of `URL` objects
|
||||
* are implemented as getters and setters on the class prototype, rather than as
|
||||
* data properties on the object itself. Thus, unlike `legacy urlObject`s,
|
||||
* using the `delete` keyword on any properties of `URL` objects (e.g. `delete myURL.protocol`, `delete myURL.pathname`, etc) has no effect but will still
|
||||
* return `true`.
|
||||
* @since v7.0.0, v6.13.0
|
||||
*/
|
||||
class URL {
|
||||
/**
|
||||
* Creates a `'blob:nodedata:...'` URL string that represents the given `Blob` object and can be used to retrieve the `Blob` later.
|
||||
*
|
||||
* ```js
|
||||
* import {
|
||||
* Blob,
|
||||
* resolveObjectURL,
|
||||
* } from 'node:buffer';
|
||||
*
|
||||
* const blob = new Blob(['hello']);
|
||||
* const id = URL.createObjectURL(blob);
|
||||
*
|
||||
* // later...
|
||||
*
|
||||
* const otherBlob = resolveObjectURL(id);
|
||||
* console.log(otherBlob.size);
|
||||
* ```
|
||||
*
|
||||
* The data stored by the registered `Blob` will be retained in memory until `URL.revokeObjectURL()` is called to remove it.
|
||||
*
|
||||
* `Blob` objects are registered within the current thread. If using Worker
|
||||
* Threads, `Blob` objects registered within one Worker will not be available
|
||||
* to other workers or the main thread.
|
||||
* @since v16.7.0
|
||||
*/
|
||||
static createObjectURL(blob: NodeBlob): string;
|
||||
/**
|
||||
* Removes the stored `Blob` identified by the given ID. Attempting to revoke a
|
||||
* ID that isn't registered will silently fail.
|
||||
* @since v16.7.0
|
||||
* @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.
|
||||
*/
|
||||
static revokeObjectURL(id: string): void;
|
||||
/**
|
||||
* Checks if an `input` relative to the `base` can be parsed to a `URL`.
|
||||
*
|
||||
* ```js
|
||||
* const isValid = URL.canParse('/foo', 'https://example.org/'); // true
|
||||
*
|
||||
* const isNotValid = URL.canParse('/foo'); // false
|
||||
* ```
|
||||
* @since v19.9.0
|
||||
* @param input The absolute or relative input URL to parse. If `input` is relative, then `base` is required. If `input` is absolute, the `base` is ignored. If `input` is not a string, it is
|
||||
* `converted to a string` first.
|
||||
* @param base The base URL to resolve against if the `input` is not absolute. If `base` is not a string, it is `converted to a string` first.
|
||||
*/
|
||||
static canParse(input: string, base?: string): boolean;
|
||||
/**
|
||||
* Parses a string as a URL. If `base` is provided, it will be used as the base
|
||||
* URL for the purpose of resolving non-absolute `input` URLs. Returns `null`
|
||||
* if the parameters can't be resolved to a valid URL.
|
||||
* @since v22.1.0
|
||||
* @param input The absolute or relative input URL to parse. If `input`
|
||||
* is relative, then `base` is required. If `input` is absolute, the `base`
|
||||
* is ignored. If `input` is not a string, it is [converted to a string](https://tc39.es/ecma262/#sec-tostring) first.
|
||||
* @param base The base URL to resolve against if the `input` is not
|
||||
* absolute. If `base` is not a string, it is [converted to a string](https://tc39.es/ecma262/#sec-tostring) first.
|
||||
*/
|
||||
static parse(input: string, base?: string): URL | null;
|
||||
constructor(input: string | { toString: () => string }, base?: string | URL);
|
||||
/**
|
||||
* Gets and sets the fragment portion of the URL.
|
||||
*
|
||||
* ```js
|
||||
* const myURL = new URL('https://example.org/foo#bar');
|
||||
* console.log(myURL.hash);
|
||||
* // Prints #bar
|
||||
*
|
||||
* myURL.hash = 'baz';
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.org/foo#baz
|
||||
* ```
|
||||
*
|
||||
* Invalid URL characters included in the value assigned to the `hash` property
|
||||
* are `percent-encoded`. The selection of which characters to
|
||||
* percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
|
||||
*/
|
||||
hash: string;
|
||||
/**
|
||||
* Gets and sets the host portion of the URL.
|
||||
*
|
||||
* ```js
|
||||
* const myURL = new URL('https://example.org:81/foo');
|
||||
* console.log(myURL.host);
|
||||
* // Prints example.org:81
|
||||
*
|
||||
* myURL.host = 'example.com:82';
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.com:82/foo
|
||||
* ```
|
||||
*
|
||||
* Invalid host values assigned to the `host` property are ignored.
|
||||
*/
|
||||
host: string;
|
||||
/**
|
||||
* Gets and sets the host name portion of the URL. The key difference between`url.host` and `url.hostname` is that `url.hostname` does _not_ include the
|
||||
* port.
|
||||
*
|
||||
* ```js
|
||||
* const myURL = new URL('https://example.org:81/foo');
|
||||
* console.log(myURL.hostname);
|
||||
* // Prints example.org
|
||||
*
|
||||
* // Setting the hostname does not change the port
|
||||
* myURL.hostname = 'example.com';
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.com:81/foo
|
||||
*
|
||||
* // Use myURL.host to change the hostname and port
|
||||
* myURL.host = 'example.org:82';
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.org:82/foo
|
||||
* ```
|
||||
*
|
||||
* Invalid host name values assigned to the `hostname` property are ignored.
|
||||
*/
|
||||
hostname: string;
|
||||
/**
|
||||
* Gets and sets the serialized URL.
|
||||
*
|
||||
* ```js
|
||||
* const myURL = new URL('https://example.org/foo');
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.org/foo
|
||||
*
|
||||
* myURL.href = 'https://example.com/bar';
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.com/bar
|
||||
* ```
|
||||
*
|
||||
* Getting the value of the `href` property is equivalent to calling {@link toString}.
|
||||
*
|
||||
* Setting the value of this property to a new value is equivalent to creating a
|
||||
* new `URL` object using `new URL(value)`. Each of the `URL` object's properties will be modified.
|
||||
*
|
||||
* If the value assigned to the `href` property is not a valid URL, a `TypeError` will be thrown.
|
||||
*/
|
||||
href: string;
|
||||
/**
|
||||
* Gets the read-only serialization of the URL's origin.
|
||||
*
|
||||
* ```js
|
||||
* const myURL = new URL('https://example.org/foo/bar?baz');
|
||||
* console.log(myURL.origin);
|
||||
* // Prints https://example.org
|
||||
* ```
|
||||
*
|
||||
* ```js
|
||||
* const idnURL = new URL('https://測試');
|
||||
* console.log(idnURL.origin);
|
||||
* // Prints https://xn--g6w251d
|
||||
*
|
||||
* console.log(idnURL.hostname);
|
||||
* // Prints xn--g6w251d
|
||||
* ```
|
||||
*/
|
||||
readonly origin: string;
|
||||
/**
|
||||
* Gets and sets the password portion of the URL.
|
||||
*
|
||||
* ```js
|
||||
* const myURL = new URL('https://abc:xyz@example.com');
|
||||
* console.log(myURL.password);
|
||||
* // Prints xyz
|
||||
*
|
||||
* myURL.password = '123';
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://abc:123@example.com/
|
||||
* ```
|
||||
*
|
||||
* Invalid URL characters included in the value assigned to the `password` property
|
||||
* are `percent-encoded`. The selection of which characters to
|
||||
* percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
|
||||
*/
|
||||
password: string;
|
||||
/**
|
||||
* Gets and sets the path portion of the URL.
|
||||
*
|
||||
* ```js
|
||||
* const myURL = new URL('https://example.org/abc/xyz?123');
|
||||
* console.log(myURL.pathname);
|
||||
* // Prints /abc/xyz
|
||||
*
|
||||
* myURL.pathname = '/abcdef';
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.org/abcdef?123
|
||||
* ```
|
||||
*
|
||||
* Invalid URL characters included in the value assigned to the `pathname` property are `percent-encoded`. The selection of which characters
|
||||
* to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
|
||||
*/
|
||||
pathname: string;
|
||||
/**
|
||||
* Gets and sets the port portion of the URL.
|
||||
*
|
||||
* The port value may be a number or a string containing a number in the range `0` to `65535` (inclusive). Setting the value to the default port of the `URL` objects given `protocol` will
|
||||
* result in the `port` value becoming
|
||||
* the empty string (`''`).
|
||||
*
|
||||
* The port value can be an empty string in which case the port depends on
|
||||
* the protocol/scheme:
|
||||
*
|
||||
* <omitted>
|
||||
*
|
||||
* Upon assigning a value to the port, the value will first be converted to a
|
||||
* string using `.toString()`.
|
||||
*
|
||||
* If that string is invalid but it begins with a number, the leading number is
|
||||
* assigned to `port`.
|
||||
* If the number lies outside the range denoted above, it is ignored.
|
||||
*
|
||||
* ```js
|
||||
* const myURL = new URL('https://example.org:8888');
|
||||
* console.log(myURL.port);
|
||||
* // Prints 8888
|
||||
*
|
||||
* // Default ports are automatically transformed to the empty string
|
||||
* // (HTTPS protocol's default port is 443)
|
||||
* myURL.port = '443';
|
||||
* console.log(myURL.port);
|
||||
* // Prints the empty string
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.org/
|
||||
*
|
||||
* myURL.port = 1234;
|
||||
* console.log(myURL.port);
|
||||
* // Prints 1234
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.org:1234/
|
||||
*
|
||||
* // Completely invalid port strings are ignored
|
||||
* myURL.port = 'abcd';
|
||||
* console.log(myURL.port);
|
||||
* // Prints 1234
|
||||
*
|
||||
* // Leading numbers are treated as a port number
|
||||
* myURL.port = '5678abcd';
|
||||
* console.log(myURL.port);
|
||||
* // Prints 5678
|
||||
*
|
||||
* // Non-integers are truncated
|
||||
* myURL.port = 1234.5678;
|
||||
* console.log(myURL.port);
|
||||
* // Prints 1234
|
||||
*
|
||||
* // Out-of-range numbers which are not represented in scientific notation
|
||||
* // will be ignored.
|
||||
* myURL.port = 1e10; // 10000000000, will be range-checked as described below
|
||||
* console.log(myURL.port);
|
||||
* // Prints 1234
|
||||
* ```
|
||||
*
|
||||
* Numbers which contain a decimal point,
|
||||
* such as floating-point numbers or numbers in scientific notation,
|
||||
* are not an exception to this rule.
|
||||
* Leading numbers up to the decimal point will be set as the URL's port,
|
||||
* assuming they are valid:
|
||||
*
|
||||
* ```js
|
||||
* myURL.port = 4.567e21;
|
||||
* console.log(myURL.port);
|
||||
* // Prints 4 (because it is the leading number in the string '4.567e21')
|
||||
* ```
|
||||
*/
|
||||
port: string;
|
||||
/**
|
||||
* Gets and sets the protocol portion of the URL.
|
||||
*
|
||||
* ```js
|
||||
* const myURL = new URL('https://example.org');
|
||||
* console.log(myURL.protocol);
|
||||
* // Prints https:
|
||||
*
|
||||
* myURL.protocol = 'ftp';
|
||||
* console.log(myURL.href);
|
||||
* // Prints ftp://example.org/
|
||||
* ```
|
||||
*
|
||||
* Invalid URL protocol values assigned to the `protocol` property are ignored.
|
||||
*/
|
||||
protocol: string;
|
||||
/**
|
||||
* Gets and sets the serialized query portion of the URL.
|
||||
*
|
||||
* ```js
|
||||
* const myURL = new URL('https://example.org/abc?123');
|
||||
* console.log(myURL.search);
|
||||
* // Prints ?123
|
||||
*
|
||||
* myURL.search = 'abc=xyz';
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.org/abc?abc=xyz
|
||||
* ```
|
||||
*
|
||||
* Any invalid URL characters appearing in the value assigned the `search` property will be `percent-encoded`. The selection of which
|
||||
* characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
|
||||
*/
|
||||
search: string;
|
||||
/**
|
||||
* Gets the `URLSearchParams` object representing the query parameters of the
|
||||
* URL. This property is read-only but the `URLSearchParams` object it provides
|
||||
* can be used to mutate the URL instance; to replace the entirety of query
|
||||
* parameters of the URL, use the {@link search} setter. See `URLSearchParams` documentation for details.
|
||||
*
|
||||
* Use care when using `.searchParams` to modify the `URL` because,
|
||||
* per the WHATWG specification, the `URLSearchParams` object uses
|
||||
* different rules to determine which characters to percent-encode. For
|
||||
* instance, the `URL` object will not percent encode the ASCII tilde (`~`)
|
||||
* character, while `URLSearchParams` will always encode it:
|
||||
*
|
||||
* ```js
|
||||
* const myURL = new URL('https://example.org/abc?foo=~bar');
|
||||
*
|
||||
* console.log(myURL.search); // prints ?foo=~bar
|
||||
*
|
||||
* // Modify the URL via searchParams...
|
||||
* myURL.searchParams.sort();
|
||||
*
|
||||
* console.log(myURL.search); // prints ?foo=%7Ebar
|
||||
* ```
|
||||
*/
|
||||
readonly searchParams: URLSearchParams;
|
||||
/**
|
||||
* Gets and sets the username portion of the URL.
|
||||
*
|
||||
* ```js
|
||||
* const myURL = new URL('https://abc:xyz@example.com');
|
||||
* console.log(myURL.username);
|
||||
* // Prints abc
|
||||
*
|
||||
* myURL.username = '123';
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://123:xyz@example.com/
|
||||
* ```
|
||||
*
|
||||
* Any invalid URL characters appearing in the value assigned the `username` property will be `percent-encoded`. The selection of which
|
||||
* characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
|
||||
*/
|
||||
username: string;
|
||||
/**
|
||||
* The `toString()` method on the `URL` object returns the serialized URL. The
|
||||
* value returned is equivalent to that of {@link href} and {@link toJSON}.
|
||||
*/
|
||||
toString(): string;
|
||||
/**
|
||||
* The `toJSON()` method on the `URL` object returns the serialized URL. The
|
||||
* value returned is equivalent to that of {@link href} and {@link toString}.
|
||||
*
|
||||
* This method is automatically called when an `URL` object is serialized
|
||||
* with [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify).
|
||||
*
|
||||
* ```js
|
||||
* const myURLs = [
|
||||
* new URL('https://www.example.com'),
|
||||
* new URL('https://test.example.org'),
|
||||
* ];
|
||||
* console.log(JSON.stringify(myURLs));
|
||||
* // Prints ["https://www.example.com/","https://test.example.org/"]
|
||||
* ```
|
||||
*/
|
||||
toJSON(): string;
|
||||
}
|
||||
// #region web types
|
||||
type URLPatternInput = string | URLPatternInit;
|
||||
interface URLPatternComponentResult {
|
||||
input: string;
|
||||
groups: Record<string, string | undefined>;
|
||||
@@ -812,7 +439,7 @@ declare module "url" {
|
||||
ignoreCase?: boolean;
|
||||
}
|
||||
interface URLPatternResult {
|
||||
inputs: (string | URLPatternInit)[];
|
||||
inputs: URLPatternInput[];
|
||||
protocol: URLPatternComponentResult;
|
||||
username: URLPatternComponentResult;
|
||||
password: URLPatternComponentResult;
|
||||
@@ -822,14 +449,30 @@ declare module "url" {
|
||||
search: URLPatternComponentResult;
|
||||
hash: URLPatternComponentResult;
|
||||
}
|
||||
/**
|
||||
* @since v23.8.0
|
||||
* @experimental
|
||||
*/
|
||||
class URLPattern {
|
||||
constructor(input: string | URLPatternInit, baseURL: string, options?: URLPatternOptions);
|
||||
constructor(input?: string | URLPatternInit, options?: URLPatternOptions);
|
||||
exec(input?: string | URLPatternInit, baseURL?: string): URLPatternResult | null;
|
||||
interface URL {
|
||||
hash: string;
|
||||
host: string;
|
||||
hostname: string;
|
||||
href: string;
|
||||
readonly origin: string;
|
||||
password: string;
|
||||
pathname: string;
|
||||
port: string;
|
||||
protocol: string;
|
||||
search: string;
|
||||
readonly searchParams: URLSearchParams;
|
||||
username: string;
|
||||
toJSON(): string;
|
||||
}
|
||||
var URL: {
|
||||
prototype: URL;
|
||||
new(url: string | URL, base?: string | URL): URL;
|
||||
canParse(input: string | URL, base?: string | URL): boolean;
|
||||
createObjectURL(blob: Blob): string;
|
||||
parse(input: string | URL, base?: string | URL): URL | null;
|
||||
revokeObjectURL(id: string): void;
|
||||
};
|
||||
interface URLPattern {
|
||||
readonly hasRegExpGroups: boolean;
|
||||
readonly hash: string;
|
||||
readonly hostname: string;
|
||||
@@ -838,220 +481,39 @@ declare module "url" {
|
||||
readonly port: string;
|
||||
readonly protocol: string;
|
||||
readonly search: string;
|
||||
test(input?: string | URLPatternInit, baseURL?: string): boolean;
|
||||
readonly username: string;
|
||||
exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null;
|
||||
test(input?: URLPatternInput, baseURL?: string | URL): boolean;
|
||||
}
|
||||
var URLPattern: {
|
||||
prototype: URLPattern;
|
||||
new(input: URLPatternInput, baseURL: string | URL, options?: URLPatternOptions): URLPattern;
|
||||
new(input?: URLPatternInput, options?: URLPatternOptions): URLPattern;
|
||||
};
|
||||
interface URLSearchParams {
|
||||
readonly size: number;
|
||||
append(name: string, value: string): void;
|
||||
delete(name: string, value?: string): void;
|
||||
get(name: string): string | null;
|
||||
getAll(name: string): string[];
|
||||
has(name: string, value?: string): boolean;
|
||||
set(name: string, value: string): void;
|
||||
sort(): void;
|
||||
forEach(callbackfn: (value: string, key: string, parent: URLSearchParams) => void, thisArg?: any): void;
|
||||
[Symbol.iterator](): URLSearchParamsIterator<[string, string]>;
|
||||
entries(): URLSearchParamsIterator<[string, string]>;
|
||||
keys(): URLSearchParamsIterator<string>;
|
||||
values(): URLSearchParamsIterator<string>;
|
||||
}
|
||||
var URLSearchParams: {
|
||||
prototype: URLSearchParams;
|
||||
new(init?: string[][] | Record<string, string> | string | URLSearchParams): URLSearchParams;
|
||||
};
|
||||
interface URLSearchParamsIterator<T> extends NodeJS.Iterator<T, NodeJS.BuiltinIteratorReturn, unknown> {
|
||||
[Symbol.iterator](): URLSearchParamsIterator<T>;
|
||||
}
|
||||
/**
|
||||
* The `URLSearchParams` API provides read and write access to the query of a `URL`. The `URLSearchParams` class can also be used standalone with one of the
|
||||
* four following constructors.
|
||||
* The `URLSearchParams` class is also available on the global object.
|
||||
*
|
||||
* The WHATWG `URLSearchParams` interface and the `querystring` module have
|
||||
* similar purpose, but the purpose of the `querystring` module is more
|
||||
* general, as it allows the customization of delimiter characters (`&` and `=`).
|
||||
* On the other hand, this API is designed purely for URL query strings.
|
||||
*
|
||||
* ```js
|
||||
* const myURL = new URL('https://example.org/?abc=123');
|
||||
* console.log(myURL.searchParams.get('abc'));
|
||||
* // Prints 123
|
||||
*
|
||||
* myURL.searchParams.append('abc', 'xyz');
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.org/?abc=123&abc=xyz
|
||||
*
|
||||
* myURL.searchParams.delete('abc');
|
||||
* myURL.searchParams.set('a', 'b');
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.org/?a=b
|
||||
*
|
||||
* const newSearchParams = new URLSearchParams(myURL.searchParams);
|
||||
* // The above is equivalent to
|
||||
* // const newSearchParams = new URLSearchParams(myURL.search);
|
||||
*
|
||||
* newSearchParams.append('a', 'c');
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.org/?a=b
|
||||
* console.log(newSearchParams.toString());
|
||||
* // Prints a=b&a=c
|
||||
*
|
||||
* // newSearchParams.toString() is implicitly called
|
||||
* myURL.search = newSearchParams;
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.org/?a=b&a=c
|
||||
* newSearchParams.delete('a');
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.org/?a=b&a=c
|
||||
* ```
|
||||
* @since v7.5.0, v6.13.0
|
||||
*/
|
||||
class URLSearchParams implements Iterable<[string, string]> {
|
||||
constructor(
|
||||
init?:
|
||||
| URLSearchParams
|
||||
| string
|
||||
| Record<string, string | readonly string[]>
|
||||
| Iterable<[string, string]>
|
||||
| ReadonlyArray<[string, string]>,
|
||||
);
|
||||
/**
|
||||
* Append a new name-value pair to the query string.
|
||||
*/
|
||||
append(name: string, value: string): void;
|
||||
/**
|
||||
* If `value` is provided, removes all name-value pairs
|
||||
* where name is `name` and value is `value`.
|
||||
*
|
||||
* If `value` is not provided, removes all name-value pairs whose name is `name`.
|
||||
*/
|
||||
delete(name: string, value?: string): void;
|
||||
/**
|
||||
* Returns an ES6 `Iterator` over each of the name-value pairs in the query.
|
||||
* Each item of the iterator is a JavaScript `Array`. The first item of the `Array` is the `name`, the second item of the `Array` is the `value`.
|
||||
*
|
||||
* Alias for `urlSearchParams[Symbol.iterator]()`.
|
||||
*/
|
||||
entries(): URLSearchParamsIterator<[string, string]>;
|
||||
/**
|
||||
* Iterates over each name-value pair in the query and invokes the given function.
|
||||
*
|
||||
* ```js
|
||||
* const myURL = new URL('https://example.org/?a=b&c=d');
|
||||
* myURL.searchParams.forEach((value, name, searchParams) => {
|
||||
* console.log(name, value, myURL.searchParams === searchParams);
|
||||
* });
|
||||
* // Prints:
|
||||
* // a b true
|
||||
* // c d true
|
||||
* ```
|
||||
* @param fn Invoked for each name-value pair in the query
|
||||
* @param thisArg To be used as `this` value for when `fn` is called
|
||||
*/
|
||||
forEach<TThis = this>(
|
||||
fn: (this: TThis, value: string, name: string, searchParams: URLSearchParams) => void,
|
||||
thisArg?: TThis,
|
||||
): void;
|
||||
/**
|
||||
* Returns the value of the first name-value pair whose name is `name`. If there
|
||||
* are no such pairs, `null` is returned.
|
||||
* @return or `null` if there is no name-value pair with the given `name`.
|
||||
*/
|
||||
get(name: string): string | null;
|
||||
/**
|
||||
* Returns the values of all name-value pairs whose name is `name`. If there are
|
||||
* no such pairs, an empty array is returned.
|
||||
*/
|
||||
getAll(name: string): string[];
|
||||
/**
|
||||
* Checks if the `URLSearchParams` object contains key-value pair(s) based on `name` and an optional `value` argument.
|
||||
*
|
||||
* If `value` is provided, returns `true` when name-value pair with
|
||||
* same `name` and `value` exists.
|
||||
*
|
||||
* If `value` is not provided, returns `true` if there is at least one name-value
|
||||
* pair whose name is `name`.
|
||||
*/
|
||||
has(name: string, value?: string): boolean;
|
||||
/**
|
||||
* Returns an ES6 `Iterator` over the names of each name-value pair.
|
||||
*
|
||||
* ```js
|
||||
* const params = new URLSearchParams('foo=bar&foo=baz');
|
||||
* for (const name of params.keys()) {
|
||||
* console.log(name);
|
||||
* }
|
||||
* // Prints:
|
||||
* // foo
|
||||
* // foo
|
||||
* ```
|
||||
*/
|
||||
keys(): URLSearchParamsIterator<string>;
|
||||
/**
|
||||
* Sets the value in the `URLSearchParams` object associated with `name` to `value`. If there are any pre-existing name-value pairs whose names are `name`,
|
||||
* set the first such pair's value to `value` and remove all others. If not,
|
||||
* append the name-value pair to the query string.
|
||||
*
|
||||
* ```js
|
||||
* const params = new URLSearchParams();
|
||||
* params.append('foo', 'bar');
|
||||
* params.append('foo', 'baz');
|
||||
* params.append('abc', 'def');
|
||||
* console.log(params.toString());
|
||||
* // Prints foo=bar&foo=baz&abc=def
|
||||
*
|
||||
* params.set('foo', 'def');
|
||||
* params.set('xyz', 'opq');
|
||||
* console.log(params.toString());
|
||||
* // Prints foo=def&abc=def&xyz=opq
|
||||
* ```
|
||||
*/
|
||||
set(name: string, value: string): void;
|
||||
/**
|
||||
* The total number of parameter entries.
|
||||
* @since v19.8.0
|
||||
*/
|
||||
readonly size: number;
|
||||
/**
|
||||
* Sort all existing name-value pairs in-place by their names. Sorting is done
|
||||
* with a [stable sorting algorithm](https://en.wikipedia.org/wiki/Sorting_algorithm#Stability), so relative order between name-value pairs
|
||||
* with the same name is preserved.
|
||||
*
|
||||
* This method can be used, in particular, to increase cache hits.
|
||||
*
|
||||
* ```js
|
||||
* const params = new URLSearchParams('query[]=abc&type=search&query[]=123');
|
||||
* params.sort();
|
||||
* console.log(params.toString());
|
||||
* // Prints query%5B%5D=abc&query%5B%5D=123&type=search
|
||||
* ```
|
||||
* @since v7.7.0, v6.13.0
|
||||
*/
|
||||
sort(): void;
|
||||
/**
|
||||
* Returns the search parameters serialized as a string, with characters
|
||||
* percent-encoded where necessary.
|
||||
*/
|
||||
toString(): string;
|
||||
/**
|
||||
* Returns an ES6 `Iterator` over the values of each name-value pair.
|
||||
*/
|
||||
values(): URLSearchParamsIterator<string>;
|
||||
[Symbol.iterator](): URLSearchParamsIterator<[string, string]>;
|
||||
}
|
||||
import {
|
||||
URL as _URL,
|
||||
URLPattern as _URLPattern,
|
||||
URLPatternInit as _URLPatternInit,
|
||||
URLPatternResult as _URLPatternResult,
|
||||
URLSearchParams as _URLSearchParams,
|
||||
} from "url";
|
||||
global {
|
||||
interface URL extends _URL {}
|
||||
var URL: typeof globalThis extends {
|
||||
onmessage: any;
|
||||
URL: infer T;
|
||||
} ? T
|
||||
: typeof _URL;
|
||||
interface URLSearchParams extends _URLSearchParams {}
|
||||
var URLSearchParams: typeof globalThis extends {
|
||||
onmessage: any;
|
||||
URLSearchParams: infer T;
|
||||
} ? T
|
||||
: typeof _URLSearchParams;
|
||||
interface URLPatternInit extends _URLPatternInit {}
|
||||
interface URLPatternResult extends _URLPatternResult {}
|
||||
interface URLPattern extends _URLPattern {}
|
||||
var URLPattern: typeof globalThis extends {
|
||||
onmessage: any;
|
||||
scheduler: any; // Must be a var introduced at the same time as URLPattern.
|
||||
URLPattern: infer T;
|
||||
} ? T
|
||||
: typeof _URLPattern;
|
||||
}
|
||||
// #endregion
|
||||
}
|
||||
declare module "node:url" {
|
||||
export * from "url";
|
||||
declare module "url" {
|
||||
export * from "node:url";
|
||||
}
|
||||
|
||||
925
backend/node_modules/@types/node/util.d.ts
generated
vendored
925
backend/node_modules/@types/node/util.d.ts
generated
vendored
File diff suppressed because it is too large
Load Diff
41
backend/node_modules/@types/node/v8.d.ts
generated
vendored
41
backend/node_modules/@types/node/v8.d.ts
generated
vendored
@@ -4,9 +4,9 @@
|
||||
* ```js
|
||||
* import v8 from 'node:v8';
|
||||
* ```
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/v8.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/v8.js)
|
||||
*/
|
||||
declare module "v8" {
|
||||
declare module "node:v8" {
|
||||
import { NonSharedBuffer } from "node:buffer";
|
||||
import { Readable } from "node:stream";
|
||||
interface HeapSpaceInfo {
|
||||
@@ -33,6 +33,7 @@ declare module "v8" {
|
||||
total_global_handles_size: number;
|
||||
used_global_handles_size: number;
|
||||
external_memory: number;
|
||||
total_allocated_bytes: number;
|
||||
}
|
||||
interface HeapCodeStatistics {
|
||||
code_and_metadata_size: number;
|
||||
@@ -93,6 +94,9 @@ declare module "v8" {
|
||||
* `external_memory` The value of external\_memory is the memory size of array
|
||||
* buffers and external strings.
|
||||
*
|
||||
* `total_allocated_bytes` The value of total allocated bytes since the Isolate
|
||||
* creation
|
||||
*
|
||||
* ```js
|
||||
* {
|
||||
* total_heap_size: 7326976,
|
||||
@@ -401,6 +405,21 @@ declare module "v8" {
|
||||
* @since v12.8.0
|
||||
*/
|
||||
function getHeapCodeStatistics(): HeapCodeStatistics;
|
||||
/**
|
||||
* @since v25.0.0
|
||||
*/
|
||||
interface SyncCPUProfileHandle {
|
||||
/**
|
||||
* Stopping collecting the profile and return the profile data.
|
||||
* @since v25.0.0
|
||||
*/
|
||||
stop(): string;
|
||||
/**
|
||||
* Stopping collecting the profile and the profile will be discarded.
|
||||
* @since v25.0.0
|
||||
*/
|
||||
[Symbol.dispose](): void;
|
||||
}
|
||||
/**
|
||||
* @since v24.8.0
|
||||
*/
|
||||
@@ -433,6 +452,18 @@ declare module "v8" {
|
||||
*/
|
||||
[Symbol.asyncDispose](): Promise<void>;
|
||||
}
|
||||
/**
|
||||
* Starting a CPU profile then return a `SyncCPUProfileHandle` object.
|
||||
* This API supports `using` syntax.
|
||||
*
|
||||
* ```js
|
||||
* const handle = v8.startCpuProfile();
|
||||
* const profile = handle.stop();
|
||||
* console.log(profile);
|
||||
* ```
|
||||
* @since v25.0.0
|
||||
*/
|
||||
function startCPUProfile(): SyncCPUProfileHandle;
|
||||
/**
|
||||
* V8 only supports `Latin-1/ISO-8859-1` and `UTF16` as the underlying representation of a string.
|
||||
* If the `content` uses `Latin-1/ISO-8859-1` as the underlying representation, this function will return true;
|
||||
@@ -613,7 +644,7 @@ declare module "v8" {
|
||||
function stopCoverage(): void;
|
||||
/**
|
||||
* The API is a no-op if `--heapsnapshot-near-heap-limit` is already set from the command line or the API is called more than once.
|
||||
* `limit` must be a positive integer. See [`--heapsnapshot-near-heap-limit`](https://nodejs.org/docs/latest-v24.x/api/cli.html#--heapsnapshot-near-heap-limitmax_count) for more information.
|
||||
* `limit` must be a positive integer. See [`--heapsnapshot-near-heap-limit`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--heapsnapshot-near-heap-limitmax_count) for more information.
|
||||
* @since v18.10.0, v16.18.0
|
||||
*/
|
||||
function setHeapSnapshotNearHeapLimit(limit: number): void;
|
||||
@@ -947,6 +978,6 @@ declare module "v8" {
|
||||
function isBuildingSnapshot(): boolean;
|
||||
}
|
||||
}
|
||||
declare module "node:v8" {
|
||||
export * from "v8";
|
||||
declare module "v8" {
|
||||
export * from "node:v8";
|
||||
}
|
||||
|
||||
76
backend/node_modules/@types/node/vm.d.ts
generated
vendored
76
backend/node_modules/@types/node/vm.d.ts
generated
vendored
@@ -34,9 +34,9 @@
|
||||
*
|
||||
* console.log(x); // 1; y is not defined.
|
||||
* ```
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/vm.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/vm.js)
|
||||
*/
|
||||
declare module "vm" {
|
||||
declare module "node:vm" {
|
||||
import { NonSharedBuffer } from "node:buffer";
|
||||
import { ImportAttributes, ImportPhase } from "node:module";
|
||||
interface Context extends NodeJS.Dict<any> {}
|
||||
@@ -73,7 +73,7 @@ declare module "vm" {
|
||||
/**
|
||||
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
||||
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
||||
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v24.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
||||
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v25.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
||||
* @experimental
|
||||
*/
|
||||
importModuleDynamically?:
|
||||
@@ -119,7 +119,7 @@ declare module "vm" {
|
||||
/**
|
||||
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
||||
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
||||
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v24.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
||||
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v25.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
||||
* @experimental
|
||||
*/
|
||||
importModuleDynamically?:
|
||||
@@ -133,7 +133,7 @@ declare module "vm" {
|
||||
/**
|
||||
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
||||
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
||||
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v24.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
||||
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v25.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
||||
* @experimental
|
||||
*/
|
||||
importModuleDynamically?:
|
||||
@@ -153,7 +153,7 @@ declare module "vm" {
|
||||
/**
|
||||
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
||||
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
||||
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v24.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
||||
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v25.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
||||
* @experimental
|
||||
*/
|
||||
importModuleDynamically?:
|
||||
@@ -197,7 +197,7 @@ declare module "vm" {
|
||||
/**
|
||||
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
||||
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
||||
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v24.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
||||
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v25.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
||||
* @experimental
|
||||
*/
|
||||
importModuleDynamically?:
|
||||
@@ -400,9 +400,9 @@ declare module "vm" {
|
||||
}
|
||||
/**
|
||||
* If the given `contextObject` is an object, the `vm.createContext()` method will
|
||||
* [prepare that object](https://nodejs.org/docs/latest-v24.x/api/vm.html#what-does-it-mean-to-contextify-an-object)
|
||||
* [prepare that object](https://nodejs.org/docs/latest-v25.x/api/vm.html#what-does-it-mean-to-contextify-an-object)
|
||||
* and return a reference to it so that it can be used in calls to {@link runInContext} or
|
||||
* [`script.runInContext()`](https://nodejs.org/docs/latest-v24.x/api/vm.html#scriptrunincontextcontextifiedobject-options).
|
||||
* [`script.runInContext()`](https://nodejs.org/docs/latest-v25.x/api/vm.html#scriptrunincontextcontextifiedobject-options).
|
||||
* Inside such scripts, the global object will be wrapped by the `contextObject`, retaining all of its
|
||||
* existing properties but also having the built-in objects and functions any standard
|
||||
* [global object](https://es5.github.io/#x15.1) has. Outside of scripts run by the vm module, global
|
||||
@@ -749,7 +749,7 @@ declare module "vm" {
|
||||
* // "contextifiedObject" when creating the context.
|
||||
* export default secret;
|
||||
* `, { context: referencingModule.context });
|
||||
* moduleMap.set(specifier, linkedModule);
|
||||
* moduleMap.set(specifier, requestedModule);
|
||||
* // Resolve the dependencies of the new module as well.
|
||||
* resolveAndLinkDependencies(requestedModule);
|
||||
* }
|
||||
@@ -819,19 +819,47 @@ declare module "vm" {
|
||||
*/
|
||||
status: ModuleStatus;
|
||||
/**
|
||||
* Evaluate the module.
|
||||
* Evaluate the module and its depenendencies. Corresponds to the [Evaluate() concrete method](https://tc39.es/ecma262/#sec-moduleevaluation) field of
|
||||
* [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records)s in the ECMAScript specification.
|
||||
*
|
||||
* This must be called after the module has been linked; otherwise it will reject.
|
||||
* It could be called also when the module has already been evaluated, in which
|
||||
* case it will either do nothing if the initial evaluation ended in success
|
||||
* (`module.status` is `'evaluated'`) or it will re-throw the exception that the
|
||||
* initial evaluation resulted in (`module.status` is `'errored'`).
|
||||
* If the module is a `vm.SourceTextModule`, `evaluate()` must be called after the module has been instantiated;
|
||||
* otherwise `evaluate()` will return a rejected promise.
|
||||
*
|
||||
* This method cannot be called while the module is being evaluated
|
||||
* (`module.status` is `'evaluating'`).
|
||||
* For a `vm.SourceTextModule`, the promise returned by `evaluate()` may be fulfilled either
|
||||
* synchronously or asynchronously:
|
||||
*
|
||||
* Corresponds to the [Evaluate() concrete method](https://tc39.es/ecma262/#sec-moduleevaluation) field of [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records) s in the
|
||||
* ECMAScript specification.
|
||||
* 1. If the `vm.SourceTextModule` has no top-level `await` in itself or any of its dependencies, the promise will be
|
||||
* fulfilled _synchronously_ after the module and all its dependencies have been evaluated.
|
||||
* 1. If the evaluation succeeds, the promise will be _synchronously_ resolved to `undefined`.
|
||||
* 2. If the evaluation results in an exception, the promise will be _synchronously_ rejected with the exception
|
||||
* that causes the evaluation to fail, which is the same as `module.error`.
|
||||
* 2. If the `vm.SourceTextModule` has top-level `await` in itself or any of its dependencies, the promise will be
|
||||
* fulfilled _asynchronously_ after the module and all its dependencies have been evaluated.
|
||||
* 1. If the evaluation succeeds, the promise will be _asynchronously_ resolved to `undefined`.
|
||||
* 2. If the evaluation results in an exception, the promise will be _asynchronously_ rejected with the exception
|
||||
* that causes the evaluation to fail.
|
||||
*
|
||||
* If the module is a `vm.SyntheticModule`, `evaluate()` always returns a promise that fulfills synchronously, see
|
||||
* the specification of [Evaluate() of a Synthetic Module Record](https://tc39.es/ecma262/#sec-smr-Evaluate):
|
||||
*
|
||||
* 1. If the `evaluateCallback` passed to its constructor throws an exception synchronously, `evaluate()` returns
|
||||
* a promise that will be synchronously rejected with that exception.
|
||||
* 2. If the `evaluateCallback` does not throw an exception, `evaluate()` returns a promise that will be
|
||||
* synchronously resolved to `undefined`.
|
||||
*
|
||||
* The `evaluateCallback` of a `vm.SyntheticModule` is executed synchronously within the `evaluate()` call, and its
|
||||
* return value is discarded. This means if `evaluateCallback` is an asynchronous function, the promise returned by
|
||||
* `evaluate()` will not reflect its asynchronous behavior, and any rejections from an asynchronous
|
||||
* `evaluateCallback` will be lost.
|
||||
*
|
||||
* `evaluate()` could also be called again after the module has already been evaluated, in which case:
|
||||
*
|
||||
* 1. If the initial evaluation ended in success (`module.status` is `'evaluated'`), it will do nothing
|
||||
* and return a promise that resolves to `undefined`.
|
||||
* 2. If the initial evaluation resulted in an exception (`module.status` is `'errored'`), it will re-reject
|
||||
* the exception that the initial evaluation resulted in.
|
||||
*
|
||||
* This method cannot be called while the module is being evaluated (`module.status` is `'evaluating'`).
|
||||
* @return Fulfills with `undefined` upon success.
|
||||
*/
|
||||
evaluate(options?: ModuleEvaluateOptions): Promise<void>;
|
||||
@@ -887,7 +915,7 @@ declare module "vm" {
|
||||
/**
|
||||
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
||||
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
||||
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v24.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
||||
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v25.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
||||
* @experimental
|
||||
*/
|
||||
importModuleDynamically?: DynamicModuleLoader<SourceTextModule> | undefined;
|
||||
@@ -1156,7 +1184,7 @@ declare module "vm" {
|
||||
* and `vm.compileFunction()` so that Node.js uses the default ESM loader from the main
|
||||
* context to load the requested module.
|
||||
*
|
||||
* For detailed information, see [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v24.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
||||
* For detailed information, see [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v25.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
||||
* @since v21.7.0, v20.12.0
|
||||
*/
|
||||
const USE_MAIN_CONTEXT_DEFAULT_LOADER: number;
|
||||
@@ -1175,6 +1203,6 @@ declare module "vm" {
|
||||
const DONT_CONTEXTIFY: number;
|
||||
}
|
||||
}
|
||||
declare module "node:vm" {
|
||||
export * from "vm";
|
||||
declare module "vm" {
|
||||
export * from "node:vm";
|
||||
}
|
||||
|
||||
8
backend/node_modules/@types/node/wasi.d.ts
generated
vendored
8
backend/node_modules/@types/node/wasi.d.ts
generated
vendored
@@ -67,9 +67,9 @@
|
||||
* wat2wasm demo.wat
|
||||
* ```
|
||||
* @experimental
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/wasi.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/wasi.js)
|
||||
*/
|
||||
declare module "wasi" {
|
||||
declare module "node:wasi" {
|
||||
interface WASIOptions {
|
||||
/**
|
||||
* An array of strings that the WebAssembly application will
|
||||
@@ -197,6 +197,6 @@ declare module "wasi" {
|
||||
readonly wasiImport: NodeJS.Dict<any>; // TODO: Narrow to DOM types
|
||||
}
|
||||
}
|
||||
declare module "node:wasi" {
|
||||
export * from "wasi";
|
||||
declare module "wasi" {
|
||||
export * from "node:wasi";
|
||||
}
|
||||
|
||||
537
backend/node_modules/@types/node/worker_threads.d.ts
generated
vendored
537
backend/node_modules/@types/node/worker_threads.d.ts
generated
vendored
@@ -52,17 +52,22 @@
|
||||
*
|
||||
* Worker threads inherit non-process-specific options by default. Refer to `Worker constructor options` to know how to customize worker thread options,
|
||||
* specifically `argv` and `execArgv` options.
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/worker_threads.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/worker_threads.js)
|
||||
*/
|
||||
declare module "worker_threads" {
|
||||
import { Context } from "node:vm";
|
||||
import { EventEmitter, NodeEventTarget } from "node:events";
|
||||
import { EventLoopUtilityFunction } from "node:perf_hooks";
|
||||
declare module "node:worker_threads" {
|
||||
import {
|
||||
EventEmitter,
|
||||
InternalEventEmitter,
|
||||
InternalEventTargetEventProperties,
|
||||
NodeEventTarget,
|
||||
} from "node:events";
|
||||
import { FileHandle } from "node:fs/promises";
|
||||
import { Performance } from "node:perf_hooks";
|
||||
import { Readable, Writable } from "node:stream";
|
||||
import { ReadableStream, TransformStream, WritableStream } from "node:stream/web";
|
||||
import { URL } from "node:url";
|
||||
import { CPUProfileHandle, HeapInfo, HeapProfileHandle } from "node:v8";
|
||||
import { Context } from "node:vm";
|
||||
import { MessageEvent } from "undici-types";
|
||||
const isInternalThread: boolean;
|
||||
const isMainThread: boolean;
|
||||
@@ -72,186 +77,10 @@ declare module "worker_threads" {
|
||||
const threadId: number;
|
||||
const threadName: string | null;
|
||||
const workerData: any;
|
||||
/**
|
||||
* Instances of the `worker.MessageChannel` class represent an asynchronous,
|
||||
* two-way communications channel.
|
||||
* The `MessageChannel` has no methods of its own. `new MessageChannel()` yields an object with `port1` and `port2` properties, which refer to linked `MessagePort` instances.
|
||||
*
|
||||
* ```js
|
||||
* import { MessageChannel } from 'node:worker_threads';
|
||||
*
|
||||
* const { port1, port2 } = new MessageChannel();
|
||||
* port1.on('message', (message) => console.log('received', message));
|
||||
* port2.postMessage({ foo: 'bar' });
|
||||
* // Prints: received { foo: 'bar' } from the `port1.on('message')` listener
|
||||
* ```
|
||||
* @since v10.5.0
|
||||
*/
|
||||
class MessageChannel {
|
||||
readonly port1: MessagePort;
|
||||
readonly port2: MessagePort;
|
||||
}
|
||||
interface WorkerPerformance {
|
||||
eventLoopUtilization: EventLoopUtilityFunction;
|
||||
}
|
||||
type Transferable =
|
||||
| ArrayBuffer
|
||||
| MessagePort
|
||||
| AbortSignal
|
||||
| FileHandle
|
||||
| ReadableStream
|
||||
| WritableStream
|
||||
| TransformStream;
|
||||
interface WorkerPerformance extends Pick<Performance, "eventLoopUtilization"> {}
|
||||
/** @deprecated Use `import { Transferable } from "node:worker_threads"` instead. */
|
||||
// TODO: remove in a future major @types/node version.
|
||||
type TransferListItem = Transferable;
|
||||
/**
|
||||
* Instances of the `worker.MessagePort` class represent one end of an
|
||||
* asynchronous, two-way communications channel. It can be used to transfer
|
||||
* structured data, memory regions and other `MessagePort`s between different `Worker`s.
|
||||
*
|
||||
* This implementation matches [browser `MessagePort`](https://developer.mozilla.org/en-US/docs/Web/API/MessagePort) s.
|
||||
* @since v10.5.0
|
||||
*/
|
||||
class MessagePort implements EventTarget {
|
||||
/**
|
||||
* Disables further sending of messages on either side of the connection.
|
||||
* This method can be called when no further communication will happen over this `MessagePort`.
|
||||
*
|
||||
* The `'close' event` is emitted on both `MessagePort` instances that
|
||||
* are part of the channel.
|
||||
* @since v10.5.0
|
||||
*/
|
||||
close(): void;
|
||||
/**
|
||||
* Sends a JavaScript value to the receiving side of this channel. `value` is transferred in a way which is compatible with
|
||||
* the [HTML structured clone algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm).
|
||||
*
|
||||
* In particular, the significant differences to `JSON` are:
|
||||
*
|
||||
* * `value` may contain circular references.
|
||||
* * `value` may contain instances of builtin JS types such as `RegExp`s, `BigInt`s, `Map`s, `Set`s, etc.
|
||||
* * `value` may contain typed arrays, both using `ArrayBuffer`s
|
||||
* and `SharedArrayBuffer`s.
|
||||
* * `value` may contain [`WebAssembly.Module`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Module) instances.
|
||||
* * `value` may not contain native (C++-backed) objects other than:
|
||||
*
|
||||
* ```js
|
||||
* import { MessageChannel } from 'node:worker_threads';
|
||||
* const { port1, port2 } = new MessageChannel();
|
||||
*
|
||||
* port1.on('message', (message) => console.log(message));
|
||||
*
|
||||
* const circularData = {};
|
||||
* circularData.foo = circularData;
|
||||
* // Prints: { foo: [Circular] }
|
||||
* port2.postMessage(circularData);
|
||||
* ```
|
||||
*
|
||||
* `transferList` may be a list of [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer), `MessagePort`, and `FileHandle` objects.
|
||||
* After transferring, they are not usable on the sending side of the channel
|
||||
* anymore (even if they are not contained in `value`). Unlike with `child processes`, transferring handles such as network sockets is currently
|
||||
* not supported.
|
||||
*
|
||||
* If `value` contains [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instances, those are accessible
|
||||
* from either thread. They cannot be listed in `transferList`.
|
||||
*
|
||||
* `value` may still contain `ArrayBuffer` instances that are not in `transferList`; in that case, the underlying memory is copied rather than moved.
|
||||
*
|
||||
* ```js
|
||||
* import { MessageChannel } from 'node:worker_threads';
|
||||
* const { port1, port2 } = new MessageChannel();
|
||||
*
|
||||
* port1.on('message', (message) => console.log(message));
|
||||
*
|
||||
* const uint8Array = new Uint8Array([ 1, 2, 3, 4 ]);
|
||||
* // This posts a copy of `uint8Array`:
|
||||
* port2.postMessage(uint8Array);
|
||||
* // This does not copy data, but renders `uint8Array` unusable:
|
||||
* port2.postMessage(uint8Array, [ uint8Array.buffer ]);
|
||||
*
|
||||
* // The memory for the `sharedUint8Array` is accessible from both the
|
||||
* // original and the copy received by `.on('message')`:
|
||||
* const sharedUint8Array = new Uint8Array(new SharedArrayBuffer(4));
|
||||
* port2.postMessage(sharedUint8Array);
|
||||
*
|
||||
* // This transfers a freshly created message port to the receiver.
|
||||
* // This can be used, for example, to create communication channels between
|
||||
* // multiple `Worker` threads that are children of the same parent thread.
|
||||
* const otherChannel = new MessageChannel();
|
||||
* port2.postMessage({ port: otherChannel.port1 }, [ otherChannel.port1 ]);
|
||||
* ```
|
||||
*
|
||||
* The message object is cloned immediately, and can be modified after
|
||||
* posting without having side effects.
|
||||
*
|
||||
* For more information on the serialization and deserialization mechanisms
|
||||
* behind this API, see the `serialization API of the node:v8 module`.
|
||||
* @since v10.5.0
|
||||
*/
|
||||
postMessage(value: any, transferList?: readonly Transferable[]): void;
|
||||
/**
|
||||
* If true, the `MessagePort` object will keep the Node.js event loop active.
|
||||
* @since v18.1.0, v16.17.0
|
||||
*/
|
||||
hasRef(): boolean;
|
||||
/**
|
||||
* Opposite of `unref()`. Calling `ref()` on a previously `unref()`ed port does _not_ let the program exit if it's the only active handle left (the default
|
||||
* behavior). If the port is `ref()`ed, calling `ref()` again has no effect.
|
||||
*
|
||||
* If listeners are attached or removed using `.on('message')`, the port
|
||||
* is `ref()`ed and `unref()`ed automatically depending on whether
|
||||
* listeners for the event exist.
|
||||
* @since v10.5.0
|
||||
*/
|
||||
ref(): void;
|
||||
/**
|
||||
* Calling `unref()` on a port allows the thread to exit if this is the only
|
||||
* active handle in the event system. If the port is already `unref()`ed calling `unref()` again has no effect.
|
||||
*
|
||||
* If listeners are attached or removed using `.on('message')`, the port is `ref()`ed and `unref()`ed automatically depending on whether
|
||||
* listeners for the event exist.
|
||||
* @since v10.5.0
|
||||
*/
|
||||
unref(): void;
|
||||
/**
|
||||
* Starts receiving messages on this `MessagePort`. When using this port
|
||||
* as an event emitter, this is called automatically once `'message'` listeners are attached.
|
||||
*
|
||||
* This method exists for parity with the Web `MessagePort` API. In Node.js,
|
||||
* it is only useful for ignoring messages when no event listener is present.
|
||||
* Node.js also diverges in its handling of `.onmessage`. Setting it
|
||||
* automatically calls `.start()`, but unsetting it lets messages queue up
|
||||
* until a new handler is set or the port is discarded.
|
||||
* @since v10.5.0
|
||||
*/
|
||||
start(): void;
|
||||
addListener(event: "close", listener: (ev: Event) => void): this;
|
||||
addListener(event: "message", listener: (value: any) => void): this;
|
||||
addListener(event: "messageerror", listener: (error: Error) => void): this;
|
||||
addListener(event: string, listener: (arg: any) => void): this;
|
||||
emit(event: "close", ev: Event): boolean;
|
||||
emit(event: "message", value: any): boolean;
|
||||
emit(event: "messageerror", error: Error): boolean;
|
||||
emit(event: string, arg: any): boolean;
|
||||
off(event: "close", listener: (ev: Event) => void, options?: EventListenerOptions): this;
|
||||
off(event: "message", listener: (value: any) => void, options?: EventListenerOptions): this;
|
||||
off(event: "messageerror", listener: (error: Error) => void, options?: EventListenerOptions): this;
|
||||
off(event: string, listener: (arg: any) => void, options?: EventListenerOptions): this;
|
||||
on(event: "close", listener: (ev: Event) => void): this;
|
||||
on(event: "message", listener: (value: any) => void): this;
|
||||
on(event: "messageerror", listener: (error: Error) => void): this;
|
||||
on(event: string, listener: (arg: any) => void): this;
|
||||
once(event: "close", listener: (ev: Event) => void): this;
|
||||
once(event: "message", listener: (value: any) => void): this;
|
||||
once(event: "messageerror", listener: (error: Error) => void): this;
|
||||
once(event: string, listener: (arg: any) => void): this;
|
||||
removeListener(event: "close", listener: (ev: Event) => void, options?: EventListenerOptions): this;
|
||||
removeListener(event: "message", listener: (value: any) => void, options?: EventListenerOptions): this;
|
||||
removeListener(event: "messageerror", listener: (error: Error) => void, options?: EventListenerOptions): this;
|
||||
removeListener(event: string, listener: (arg: any) => void, options?: EventListenerOptions): this;
|
||||
}
|
||||
interface MessagePort extends NodeEventTarget {}
|
||||
interface WorkerOptions {
|
||||
/**
|
||||
* List of arguments which would be stringified and appended to
|
||||
@@ -302,6 +131,13 @@ declare module "worker_threads" {
|
||||
*/
|
||||
stackSizeMb?: number | undefined;
|
||||
}
|
||||
interface WorkerEventMap {
|
||||
"error": [err: unknown];
|
||||
"exit": [exitCode: number];
|
||||
"message": [value: any];
|
||||
"messageerror": [error: Error];
|
||||
"online": [];
|
||||
}
|
||||
/**
|
||||
* The `Worker` class represents an independent JavaScript execution thread.
|
||||
* Most Node.js APIs are available inside of it.
|
||||
@@ -366,7 +202,7 @@ declare module "worker_threads" {
|
||||
* ```
|
||||
* @since v10.5.0
|
||||
*/
|
||||
class Worker extends EventEmitter {
|
||||
class Worker implements EventEmitter {
|
||||
/**
|
||||
* If `stdin: true` was passed to the `Worker` constructor, this is a
|
||||
* writable stream. The data written to this stream will be made available in
|
||||
@@ -556,139 +392,8 @@ declare module "worker_threads" {
|
||||
* @since v24.2.0
|
||||
*/
|
||||
[Symbol.asyncDispose](): Promise<void>;
|
||||
addListener(event: "error", listener: (err: Error) => void): this;
|
||||
addListener(event: "exit", listener: (exitCode: number) => void): this;
|
||||
addListener(event: "message", listener: (value: any) => void): this;
|
||||
addListener(event: "messageerror", listener: (error: Error) => void): this;
|
||||
addListener(event: "online", listener: () => void): this;
|
||||
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
emit(event: "error", err: Error): boolean;
|
||||
emit(event: "exit", exitCode: number): boolean;
|
||||
emit(event: "message", value: any): boolean;
|
||||
emit(event: "messageerror", error: Error): boolean;
|
||||
emit(event: "online"): boolean;
|
||||
emit(event: string | symbol, ...args: any[]): boolean;
|
||||
on(event: "error", listener: (err: Error) => void): this;
|
||||
on(event: "exit", listener: (exitCode: number) => void): this;
|
||||
on(event: "message", listener: (value: any) => void): this;
|
||||
on(event: "messageerror", listener: (error: Error) => void): this;
|
||||
on(event: "online", listener: () => void): this;
|
||||
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
once(event: "error", listener: (err: Error) => void): this;
|
||||
once(event: "exit", listener: (exitCode: number) => void): this;
|
||||
once(event: "message", listener: (value: any) => void): this;
|
||||
once(event: "messageerror", listener: (error: Error) => void): this;
|
||||
once(event: "online", listener: () => void): this;
|
||||
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependListener(event: "error", listener: (err: Error) => void): this;
|
||||
prependListener(event: "exit", listener: (exitCode: number) => void): this;
|
||||
prependListener(event: "message", listener: (value: any) => void): this;
|
||||
prependListener(event: "messageerror", listener: (error: Error) => void): this;
|
||||
prependListener(event: "online", listener: () => void): this;
|
||||
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener(event: "error", listener: (err: Error) => void): this;
|
||||
prependOnceListener(event: "exit", listener: (exitCode: number) => void): this;
|
||||
prependOnceListener(event: "message", listener: (value: any) => void): this;
|
||||
prependOnceListener(event: "messageerror", listener: (error: Error) => void): this;
|
||||
prependOnceListener(event: "online", listener: () => void): this;
|
||||
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
removeListener(event: "error", listener: (err: Error) => void): this;
|
||||
removeListener(event: "exit", listener: (exitCode: number) => void): this;
|
||||
removeListener(event: "message", listener: (value: any) => void): this;
|
||||
removeListener(event: "messageerror", listener: (error: Error) => void): this;
|
||||
removeListener(event: "online", listener: () => void): this;
|
||||
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
off(event: "error", listener: (err: Error) => void): this;
|
||||
off(event: "exit", listener: (exitCode: number) => void): this;
|
||||
off(event: "message", listener: (value: any) => void): this;
|
||||
off(event: "messageerror", listener: (error: Error) => void): this;
|
||||
off(event: "online", listener: () => void): this;
|
||||
off(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
}
|
||||
interface BroadcastChannel extends NodeJS.RefCounted {}
|
||||
/**
|
||||
* Instances of `BroadcastChannel` allow asynchronous one-to-many communication
|
||||
* with all other `BroadcastChannel` instances bound to the same channel name.
|
||||
*
|
||||
* ```js
|
||||
* 'use strict';
|
||||
*
|
||||
* import {
|
||||
* isMainThread,
|
||||
* BroadcastChannel,
|
||||
* Worker,
|
||||
* } from 'node:worker_threads';
|
||||
*
|
||||
* const bc = new BroadcastChannel('hello');
|
||||
*
|
||||
* if (isMainThread) {
|
||||
* let c = 0;
|
||||
* bc.onmessage = (event) => {
|
||||
* console.log(event.data);
|
||||
* if (++c === 10) bc.close();
|
||||
* };
|
||||
* for (let n = 0; n < 10; n++)
|
||||
* new Worker(__filename);
|
||||
* } else {
|
||||
* bc.postMessage('hello from every worker');
|
||||
* bc.close();
|
||||
* }
|
||||
* ```
|
||||
* @since v15.4.0
|
||||
*/
|
||||
class BroadcastChannel extends EventTarget {
|
||||
readonly name: string;
|
||||
/**
|
||||
* Invoked with a single \`MessageEvent\` argument when a message is received.
|
||||
* @since v15.4.0
|
||||
*/
|
||||
onmessage: (message: MessageEvent) => void;
|
||||
/**
|
||||
* Invoked with a received message cannot be deserialized.
|
||||
* @since v15.4.0
|
||||
*/
|
||||
onmessageerror: (message: MessageEvent) => void;
|
||||
constructor(name: string);
|
||||
/**
|
||||
* Closes the `BroadcastChannel` connection.
|
||||
* @since v15.4.0
|
||||
*/
|
||||
close(): void;
|
||||
/**
|
||||
* @since v15.4.0
|
||||
* @param message Any cloneable JavaScript value.
|
||||
*/
|
||||
postMessage(message: unknown): void;
|
||||
}
|
||||
interface Lock {
|
||||
readonly mode: LockMode;
|
||||
readonly name: string;
|
||||
}
|
||||
interface LockGrantedCallback<T> {
|
||||
(lock: Lock | null): T;
|
||||
}
|
||||
interface LockInfo {
|
||||
clientId: string;
|
||||
mode: LockMode;
|
||||
name: string;
|
||||
}
|
||||
interface LockManager {
|
||||
query(): Promise<LockManagerSnapshot>;
|
||||
request<T>(name: string, callback: LockGrantedCallback<T>): Promise<Awaited<T>>;
|
||||
request<T>(name: string, options: LockOptions, callback: LockGrantedCallback<T>): Promise<Awaited<T>>;
|
||||
}
|
||||
interface LockManagerSnapshot {
|
||||
held: LockInfo[];
|
||||
pending: LockInfo[];
|
||||
}
|
||||
type LockMode = "exclusive" | "shared";
|
||||
interface LockOptions {
|
||||
ifAvailable?: boolean;
|
||||
mode?: LockMode;
|
||||
signal?: AbortSignal;
|
||||
steal?: boolean;
|
||||
}
|
||||
var locks: LockManager;
|
||||
interface Worker extends InternalEventEmitter<WorkerEventMap> {}
|
||||
/**
|
||||
* Mark an object as not transferable. If `object` occurs in the transfer list of
|
||||
* a `port.postMessage()` call, it is ignored.
|
||||
@@ -848,49 +553,165 @@ declare module "worker_threads" {
|
||||
transferList: readonly Transferable[],
|
||||
timeout?: number,
|
||||
): Promise<void>;
|
||||
|
||||
import {
|
||||
BroadcastChannel as _BroadcastChannel,
|
||||
MessageChannel as _MessageChannel,
|
||||
MessagePort as _MessagePort,
|
||||
} from "worker_threads";
|
||||
global {
|
||||
function structuredClone<T>(
|
||||
value: T,
|
||||
options?: { transfer?: Transferable[] },
|
||||
): T;
|
||||
/**
|
||||
* `BroadcastChannel` class is a global reference for `import { BroadcastChannel } from 'worker_threads'`
|
||||
* https://nodejs.org/api/globals.html#broadcastchannel
|
||||
* @since v18.0.0
|
||||
*/
|
||||
var BroadcastChannel: typeof globalThis extends {
|
||||
onmessage: any;
|
||||
BroadcastChannel: infer T;
|
||||
} ? T
|
||||
: typeof _BroadcastChannel;
|
||||
/**
|
||||
* `MessageChannel` class is a global reference for `import { MessageChannel } from 'worker_threads'`
|
||||
* https://nodejs.org/api/globals.html#messagechannel
|
||||
* @since v15.0.0
|
||||
*/
|
||||
var MessageChannel: typeof globalThis extends {
|
||||
onmessage: any;
|
||||
MessageChannel: infer T;
|
||||
} ? T
|
||||
: typeof _MessageChannel;
|
||||
/**
|
||||
* `MessagePort` class is a global reference for `import { MessagePort } from 'worker_threads'`
|
||||
* https://nodejs.org/api/globals.html#messageport
|
||||
* @since v15.0.0
|
||||
*/
|
||||
var MessagePort: typeof globalThis extends {
|
||||
onmessage: any;
|
||||
MessagePort: infer T;
|
||||
} ? T
|
||||
: typeof _MessagePort;
|
||||
// #region web types
|
||||
type LockMode = "exclusive" | "shared";
|
||||
type Transferable =
|
||||
| ArrayBuffer
|
||||
| MessagePort
|
||||
| AbortSignal
|
||||
| FileHandle
|
||||
| ReadableStream
|
||||
| WritableStream
|
||||
| TransformStream;
|
||||
interface LockGrantedCallback<T> {
|
||||
(lock: Lock | null): T;
|
||||
}
|
||||
interface LockInfo {
|
||||
clientId: string;
|
||||
mode: LockMode;
|
||||
name: string;
|
||||
}
|
||||
interface LockManagerSnapshot {
|
||||
held: LockInfo[];
|
||||
pending: LockInfo[];
|
||||
}
|
||||
interface LockOptions {
|
||||
ifAvailable?: boolean;
|
||||
mode?: LockMode;
|
||||
signal?: AbortSignal;
|
||||
steal?: boolean;
|
||||
}
|
||||
interface StructuredSerializeOptions {
|
||||
transfer?: Transferable[];
|
||||
}
|
||||
interface BroadcastChannelEventMap {
|
||||
"message": MessageEvent;
|
||||
"messageerror": MessageEvent;
|
||||
}
|
||||
interface BroadcastChannel
|
||||
extends EventTarget, InternalEventTargetEventProperties<BroadcastChannelEventMap>, NodeJS.RefCounted
|
||||
{
|
||||
readonly name: string;
|
||||
close(): void;
|
||||
postMessage(message: any): void;
|
||||
addEventListener<K extends keyof BroadcastChannelEventMap>(
|
||||
type: K,
|
||||
listener: (ev: BroadcastChannelEventMap[K]) => void,
|
||||
options?: AddEventListenerOptions | boolean,
|
||||
): void;
|
||||
addEventListener(
|
||||
type: string,
|
||||
listener: EventListener | EventListenerObject,
|
||||
options?: AddEventListenerOptions | boolean,
|
||||
): void;
|
||||
removeEventListener<K extends keyof BroadcastChannelEventMap>(
|
||||
type: K,
|
||||
listener: (ev: BroadcastChannelEventMap[K]) => void,
|
||||
options?: EventListenerOptions | boolean,
|
||||
): void;
|
||||
removeEventListener(
|
||||
type: string,
|
||||
listener: EventListener | EventListenerObject,
|
||||
options?: EventListenerOptions | boolean,
|
||||
): void;
|
||||
}
|
||||
var BroadcastChannel: {
|
||||
prototype: BroadcastChannel;
|
||||
new(name: string): BroadcastChannel;
|
||||
};
|
||||
interface Lock {
|
||||
readonly mode: LockMode;
|
||||
readonly name: string;
|
||||
}
|
||||
// var Lock: {
|
||||
// prototype: Lock;
|
||||
// new(): Lock;
|
||||
// };
|
||||
interface LockManager {
|
||||
query(): Promise<LockManagerSnapshot>;
|
||||
request<T>(name: string, callback: LockGrantedCallback<T>): Promise<Awaited<T>>;
|
||||
request<T>(name: string, options: LockOptions, callback: LockGrantedCallback<T>): Promise<Awaited<T>>;
|
||||
}
|
||||
// var LockManager: {
|
||||
// prototype: LockManager;
|
||||
// new(): LockManager;
|
||||
// };
|
||||
interface MessageChannel {
|
||||
readonly port1: MessagePort;
|
||||
readonly port2: MessagePort;
|
||||
}
|
||||
var MessageChannel: {
|
||||
prototype: MessageChannel;
|
||||
new(): MessageChannel;
|
||||
};
|
||||
interface MessagePortEventMap {
|
||||
"close": Event;
|
||||
"message": MessageEvent;
|
||||
"messageerror": MessageEvent;
|
||||
}
|
||||
interface MessagePort extends NodeEventTarget, InternalEventTargetEventProperties<MessagePortEventMap> {
|
||||
close(): void;
|
||||
postMessage(message: any, transfer: Transferable[]): void;
|
||||
postMessage(message: any, options?: StructuredSerializeOptions): void;
|
||||
start(): void;
|
||||
hasRef(): boolean;
|
||||
ref(): void;
|
||||
unref(): void;
|
||||
addEventListener<K extends keyof MessagePortEventMap>(
|
||||
type: K,
|
||||
listener: (ev: MessagePortEventMap[K]) => void,
|
||||
options?: AddEventListenerOptions | boolean,
|
||||
): void;
|
||||
addEventListener(
|
||||
type: string,
|
||||
listener: EventListener | EventListenerObject,
|
||||
options?: AddEventListenerOptions | boolean,
|
||||
): void;
|
||||
removeEventListener<K extends keyof MessagePortEventMap>(
|
||||
type: K,
|
||||
listener: (ev: MessagePortEventMap[K]) => void,
|
||||
options?: EventListenerOptions | boolean,
|
||||
): void;
|
||||
removeEventListener(
|
||||
type: string,
|
||||
listener: EventListener | EventListenerObject,
|
||||
options?: EventListenerOptions | boolean,
|
||||
): void;
|
||||
// #region NodeEventTarget
|
||||
addListener(event: "close", listener: (ev: Event) => void): this;
|
||||
addListener(event: "message", listener: (value: any) => void): this;
|
||||
addListener(event: "messageerror", listener: (error: Error) => void): this;
|
||||
addListener(event: string, listener: (arg: any) => void): this;
|
||||
emit(event: "close", ev: Event): boolean;
|
||||
emit(event: "message", value: any): boolean;
|
||||
emit(event: "messageerror", error: Error): boolean;
|
||||
emit(event: string, arg: any): boolean;
|
||||
off(event: "close", listener: (ev: Event) => void, options?: EventListenerOptions): this;
|
||||
off(event: "message", listener: (value: any) => void, options?: EventListenerOptions): this;
|
||||
off(event: "messageerror", listener: (error: Error) => void, options?: EventListenerOptions): this;
|
||||
off(event: string, listener: (arg: any) => void, options?: EventListenerOptions): this;
|
||||
on(event: "close", listener: (ev: Event) => void): this;
|
||||
on(event: "message", listener: (value: any) => void): this;
|
||||
on(event: "messageerror", listener: (error: Error) => void): this;
|
||||
on(event: string, listener: (arg: any) => void): this;
|
||||
once(event: "close", listener: (ev: Event) => void): this;
|
||||
once(event: "message", listener: (value: any) => void): this;
|
||||
once(event: "messageerror", listener: (error: Error) => void): this;
|
||||
once(event: string, listener: (arg: any) => void): this;
|
||||
removeListener(event: "close", listener: (ev: Event) => void, options?: EventListenerOptions): this;
|
||||
removeListener(event: "message", listener: (value: any) => void, options?: EventListenerOptions): this;
|
||||
removeListener(event: "messageerror", listener: (error: Error) => void, options?: EventListenerOptions): this;
|
||||
removeListener(event: string, listener: (arg: any) => void, options?: EventListenerOptions): this;
|
||||
// #endregion
|
||||
}
|
||||
var MessagePort: {
|
||||
prototype: MessagePort;
|
||||
new(): MessagePort;
|
||||
};
|
||||
var locks: LockManager;
|
||||
export import structuredClone = globalThis.structuredClone;
|
||||
// #endregion
|
||||
}
|
||||
declare module "node:worker_threads" {
|
||||
export * from "worker_threads";
|
||||
declare module "worker_threads" {
|
||||
export * from "node:worker_threads";
|
||||
}
|
||||
|
||||
79
backend/node_modules/@types/node/zlib.d.ts
generated
vendored
79
backend/node_modules/@types/node/zlib.d.ts
generated
vendored
@@ -9,7 +9,7 @@
|
||||
* ```
|
||||
*
|
||||
* Compression and decompression are built around the Node.js
|
||||
* [Streams API](https://nodejs.org/docs/latest-v24.x/api/stream.html).
|
||||
* [Streams API](https://nodejs.org/docs/latest-v25.x/api/stream.html).
|
||||
*
|
||||
* Compressing or decompressing a stream (such as a file) can be accomplished by
|
||||
* piping the source stream through a `zlib` `Transform` stream into a destination
|
||||
@@ -89,9 +89,9 @@
|
||||
* });
|
||||
* ```
|
||||
* @since v0.5.8
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/zlib.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/zlib.js)
|
||||
*/
|
||||
declare module "zlib" {
|
||||
declare module "node:zlib" {
|
||||
import { NonSharedBuffer } from "node:buffer";
|
||||
import * as stream from "node:stream";
|
||||
interface ZlibOptions {
|
||||
@@ -144,7 +144,7 @@ declare module "zlib" {
|
||||
}
|
||||
| undefined;
|
||||
/**
|
||||
* Limits output size when using [convenience methods](https://nodejs.org/docs/latest-v24.x/api/zlib.html#convenience-methods).
|
||||
* Limits output size when using [convenience methods](https://nodejs.org/docs/latest-v25.x/api/zlib.html#convenience-methods).
|
||||
* @default buffer.kMaxLength
|
||||
*/
|
||||
maxOutputLength?: number | undefined;
|
||||
@@ -168,12 +168,12 @@ declare module "zlib" {
|
||||
chunkSize?: number | undefined;
|
||||
/**
|
||||
* Key-value object containing indexed
|
||||
* [Zstd parameters](https://nodejs.org/docs/latest-v24.x/api/zlib.html#zstd-constants).
|
||||
* [Zstd parameters](https://nodejs.org/docs/latest-v25.x/api/zlib.html#zstd-constants).
|
||||
*/
|
||||
params?: { [key: number]: number | boolean } | undefined;
|
||||
/**
|
||||
* Limits output size when using
|
||||
* [convenience methods](https://nodejs.org/docs/latest-v24.x/api/zlib.html#convenience-methods).
|
||||
* [convenience methods](https://nodejs.org/docs/latest-v25.x/api/zlib.html#convenience-methods).
|
||||
* @default buffer.kMaxLength
|
||||
*/
|
||||
maxOutputLength?: number | undefined;
|
||||
@@ -612,70 +612,7 @@ declare module "zlib" {
|
||||
const Z_SYNC_FLUSH: number;
|
||||
const Z_VERSION_ERROR: number;
|
||||
}
|
||||
// Allowed flush values.
|
||||
/** @deprecated Use `constants.Z_NO_FLUSH` */
|
||||
const Z_NO_FLUSH: number;
|
||||
/** @deprecated Use `constants.Z_PARTIAL_FLUSH` */
|
||||
const Z_PARTIAL_FLUSH: number;
|
||||
/** @deprecated Use `constants.Z_SYNC_FLUSH` */
|
||||
const Z_SYNC_FLUSH: number;
|
||||
/** @deprecated Use `constants.Z_FULL_FLUSH` */
|
||||
const Z_FULL_FLUSH: number;
|
||||
/** @deprecated Use `constants.Z_FINISH` */
|
||||
const Z_FINISH: number;
|
||||
/** @deprecated Use `constants.Z_BLOCK` */
|
||||
const Z_BLOCK: number;
|
||||
// Return codes for the compression/decompression functions.
|
||||
// Negative values are errors, positive values are used for special but normal events.
|
||||
/** @deprecated Use `constants.Z_OK` */
|
||||
const Z_OK: number;
|
||||
/** @deprecated Use `constants.Z_STREAM_END` */
|
||||
const Z_STREAM_END: number;
|
||||
/** @deprecated Use `constants.Z_NEED_DICT` */
|
||||
const Z_NEED_DICT: number;
|
||||
/** @deprecated Use `constants.Z_ERRNO` */
|
||||
const Z_ERRNO: number;
|
||||
/** @deprecated Use `constants.Z_STREAM_ERROR` */
|
||||
const Z_STREAM_ERROR: number;
|
||||
/** @deprecated Use `constants.Z_DATA_ERROR` */
|
||||
const Z_DATA_ERROR: number;
|
||||
/** @deprecated Use `constants.Z_MEM_ERROR` */
|
||||
const Z_MEM_ERROR: number;
|
||||
/** @deprecated Use `constants.Z_BUF_ERROR` */
|
||||
const Z_BUF_ERROR: number;
|
||||
/** @deprecated Use `constants.Z_VERSION_ERROR` */
|
||||
const Z_VERSION_ERROR: number;
|
||||
// Compression levels.
|
||||
/** @deprecated Use `constants.Z_NO_COMPRESSION` */
|
||||
const Z_NO_COMPRESSION: number;
|
||||
/** @deprecated Use `constants.Z_BEST_SPEED` */
|
||||
const Z_BEST_SPEED: number;
|
||||
/** @deprecated Use `constants.Z_BEST_COMPRESSION` */
|
||||
const Z_BEST_COMPRESSION: number;
|
||||
/** @deprecated Use `constants.Z_DEFAULT_COMPRESSION` */
|
||||
const Z_DEFAULT_COMPRESSION: number;
|
||||
// Compression strategy.
|
||||
/** @deprecated Use `constants.Z_FILTERED` */
|
||||
const Z_FILTERED: number;
|
||||
/** @deprecated Use `constants.Z_HUFFMAN_ONLY` */
|
||||
const Z_HUFFMAN_ONLY: number;
|
||||
/** @deprecated Use `constants.Z_RLE` */
|
||||
const Z_RLE: number;
|
||||
/** @deprecated Use `constants.Z_FIXED` */
|
||||
const Z_FIXED: number;
|
||||
/** @deprecated Use `constants.Z_DEFAULT_STRATEGY` */
|
||||
const Z_DEFAULT_STRATEGY: number;
|
||||
/** @deprecated */
|
||||
const Z_BINARY: number;
|
||||
/** @deprecated */
|
||||
const Z_TEXT: number;
|
||||
/** @deprecated */
|
||||
const Z_ASCII: number;
|
||||
/** @deprecated */
|
||||
const Z_UNKNOWN: number;
|
||||
/** @deprecated */
|
||||
const Z_DEFLATED: number;
|
||||
}
|
||||
declare module "node:zlib" {
|
||||
export * from "zlib";
|
||||
declare module "zlib" {
|
||||
export * from "node:zlib";
|
||||
}
|
||||
|
||||
4
backend/node_modules/@types/validator/README.md
generated
vendored
4
backend/node_modules/@types/validator/README.md
generated
vendored
@@ -8,8 +8,8 @@ This package contains type definitions for validator (https://github.com/validat
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/validator.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Sun, 16 Jun 2024 11:35:49 GMT
|
||||
* Last updated: Mon, 17 Nov 2025 21:33:59 GMT
|
||||
* Dependencies: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [tgfjt](https://github.com/tgfjt), [Ilya Mochalov](https://github.com/chrootsu), [Ayman Nedjmeddine](https://github.com/IOAyman), [Louay Alakkad](https://github.com/louy), [Bonggyun Lee](https://github.com/deptno), [Naoto Yokoyama](https://github.com/builtinnya), [Philipp Katz](https://github.com/qqilihq), [Jace Warren](https://github.com/keatz55), [Munif Tanjim](https://github.com/MunifTanjim), [Vlad Poluch](https://github.com/vlapo), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Matteo Nista](https://github.com/Mattewn99), [Roman Babiak](https://github.com/Almost-Infinity), and [Daniel Freire](https://github.com/dcfreire).
|
||||
These definitions were written by [tgfjt](https://github.com/tgfjt), [Ilya Mochalov](https://github.com/chrootsu), [Ayman Nedjmeddine](https://github.com/IOAyman), [Louay Alakkad](https://github.com/louy), [Bonggyun Lee](https://github.com/deptno), [Naoto Yokoyama](https://github.com/builtinnya), [Philipp Katz](https://github.com/qqilihq), [Jace Warren](https://github.com/keatz55), [Vlad Poluch](https://github.com/vlapo), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Matteo Nista](https://github.com/Mattewn99), [Daniel Freire](https://github.com/dcfreire), and [Rik Smale](https://github.com/WikiRik).
|
||||
|
||||
1
backend/node_modules/@types/validator/es/lib/isAfter.d.ts
generated
vendored
1
backend/node_modules/@types/validator/es/lib/isAfter.d.ts
generated
vendored
@@ -1,2 +1,3 @@
|
||||
import validator from "../../";
|
||||
export type IsAfterOptions = validator.IsAfterOptions;
|
||||
export default validator.isAfter;
|
||||
|
||||
1
backend/node_modules/@types/validator/es/lib/isBase32.d.ts
generated
vendored
1
backend/node_modules/@types/validator/es/lib/isBase32.d.ts
generated
vendored
@@ -1,2 +1,3 @@
|
||||
import validator from "../../";
|
||||
export type IsBase32Options = validator.IsBase32Options;
|
||||
export default validator.isBase32;
|
||||
|
||||
1
backend/node_modules/@types/validator/es/lib/isBefore.d.ts
generated
vendored
1
backend/node_modules/@types/validator/es/lib/isBefore.d.ts
generated
vendored
@@ -1,2 +1,3 @@
|
||||
import validator from "../../";
|
||||
export type IsBeforeOptions = validator.IsBeforeOptions;
|
||||
export default validator.isBefore;
|
||||
|
||||
1
backend/node_modules/@types/validator/es/lib/isDate.d.ts
generated
vendored
1
backend/node_modules/@types/validator/es/lib/isDate.d.ts
generated
vendored
@@ -1,2 +1,3 @@
|
||||
import validator from "../../";
|
||||
export type IsDateOptions = validator.IsDateOptions;
|
||||
export default validator.isDate;
|
||||
|
||||
5
backend/node_modules/@types/validator/es/lib/isIBAN.d.ts
generated
vendored
5
backend/node_modules/@types/validator/es/lib/isIBAN.d.ts
generated
vendored
@@ -1,4 +1,3 @@
|
||||
import isIBAN, { IsIBANOptions as IsIBANValidationOptions, locales } from "../../lib/isIBAN";
|
||||
import isIBAN, { IBANLocale, IsIBANOptions, locales } from "../../lib/isIBAN";
|
||||
export default isIBAN;
|
||||
export { locales };
|
||||
export type IsIBANOptions = IsIBANValidationOptions;
|
||||
export { IBANLocale, IsIBANOptions, locales };
|
||||
|
||||
1
backend/node_modules/@types/validator/es/lib/isIP.d.ts
generated
vendored
1
backend/node_modules/@types/validator/es/lib/isIP.d.ts
generated
vendored
@@ -1,3 +1,4 @@
|
||||
import validator from "../../";
|
||||
export type IPVersion = validator.IPVersion;
|
||||
export type IsIPOptions = validator.IsIPOptions;
|
||||
export default validator.isIP;
|
||||
|
||||
1
backend/node_modules/@types/validator/es/lib/isJSON.d.ts
generated
vendored
1
backend/node_modules/@types/validator/es/lib/isJSON.d.ts
generated
vendored
@@ -1,2 +1,3 @@
|
||||
import validator from "../../";
|
||||
export type IsJSONOptions = validator.IsJSONOptions;
|
||||
export default validator.isJSON;
|
||||
|
||||
1
backend/node_modules/@types/validator/es/lib/isLatLong.d.ts
generated
vendored
1
backend/node_modules/@types/validator/es/lib/isLatLong.d.ts
generated
vendored
@@ -1,2 +1,3 @@
|
||||
import validator from "../../";
|
||||
export type IsLatLongOptions = validator.IsLatLongOptions;
|
||||
export default validator.isLatLong;
|
||||
|
||||
1
backend/node_modules/@types/validator/es/lib/isMobilePhone.d.ts
generated
vendored
1
backend/node_modules/@types/validator/es/lib/isMobilePhone.d.ts
generated
vendored
@@ -1,4 +1,5 @@
|
||||
import validator from "../../";
|
||||
export type MobilePhoneLocale = validator.MobilePhoneLocale;
|
||||
export type IsMobilePhoneOptions = validator.IsMobilePhoneOptions;
|
||||
export const locales: MobilePhoneLocale[];
|
||||
export default validator.isMobilePhone;
|
||||
|
||||
1
backend/node_modules/@types/validator/es/lib/isPostalCode.d.ts
generated
vendored
1
backend/node_modules/@types/validator/es/lib/isPostalCode.d.ts
generated
vendored
@@ -1,3 +1,4 @@
|
||||
import validator from "../../";
|
||||
export type PostalCodeLocale = validator.PostalCodeLocale;
|
||||
export const locales: PostalCodeLocale[];
|
||||
export default validator.isPostalCode;
|
||||
|
||||
1
backend/node_modules/@types/validator/es/lib/isRgbColor.d.ts
generated
vendored
1
backend/node_modules/@types/validator/es/lib/isRgbColor.d.ts
generated
vendored
@@ -1,2 +1,3 @@
|
||||
import validator from "../../";
|
||||
export type IsRgbColorOptions = validator.IsRgbColorOptions;
|
||||
export default validator.isRgbColor;
|
||||
|
||||
1
backend/node_modules/@types/validator/es/lib/isStrongPassword.d.ts
generated
vendored
1
backend/node_modules/@types/validator/es/lib/isStrongPassword.d.ts
generated
vendored
@@ -1,2 +1,3 @@
|
||||
import validator from "../../";
|
||||
export type StrongPasswordOptions = validator.StrongPasswordOptions;
|
||||
export default validator.isStrongPassword;
|
||||
|
||||
1
backend/node_modules/@types/validator/es/lib/isTime.d.ts
generated
vendored
1
backend/node_modules/@types/validator/es/lib/isTime.d.ts
generated
vendored
@@ -1,2 +1,3 @@
|
||||
import validator from "../../";
|
||||
export type IsTimeOptions = validator.IsTimeOptions;
|
||||
export default validator.isTime;
|
||||
|
||||
1
backend/node_modules/@types/validator/es/lib/isVAT.d.ts
generated
vendored
1
backend/node_modules/@types/validator/es/lib/isVAT.d.ts
generated
vendored
@@ -1,2 +1,3 @@
|
||||
import validator from "../../";
|
||||
export type VATCountryCode = validator.VATCountryCode;
|
||||
export default validator.isVAT;
|
||||
|
||||
398
backend/node_modules/@types/validator/index.d.ts
generated
vendored
398
backend/node_modules/@types/validator/index.d.ts
generated
vendored
@@ -40,12 +40,25 @@ declare namespace validator {
|
||||
*/
|
||||
export function equals(str: string, comparison: string): boolean;
|
||||
|
||||
/**
|
||||
* Check if the string is an ABA routing number for US bank account / cheque.
|
||||
*/
|
||||
export function isAbaRouting(str: string): boolean;
|
||||
|
||||
export interface IsAfterOptions {
|
||||
/**
|
||||
* Date to compare to.
|
||||
* @default Date().toString()
|
||||
*/
|
||||
comparisonDate?: string | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the string is a date that's after the specified date.
|
||||
*
|
||||
* @param [date] - Date string (defaults to now)
|
||||
*/
|
||||
export function isAfter(str: string, date?: string): boolean;
|
||||
export function isAfter(str: string, dateStringOrOptions?: string | IsAfterOptions): boolean;
|
||||
|
||||
export type AlphaLocale =
|
||||
| "en-US"
|
||||
@@ -198,10 +211,19 @@ declare namespace validator {
|
||||
*/
|
||||
export function isAscii(str: string): boolean;
|
||||
|
||||
export interface IsBase32Options {
|
||||
/**
|
||||
* If true, it tests the given base32 encoded string using [Crockford's base32 alternative](http://www.crockford.com/base32.html).
|
||||
* @default false
|
||||
*/
|
||||
crockford?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a string is base32 encoded.
|
||||
*/
|
||||
export function isBase32(str: string): boolean;
|
||||
export function isBase32(str: string, options?: IsBase32Options): boolean;
|
||||
|
||||
/**
|
||||
* check if a string is base58 encoded
|
||||
*/
|
||||
@@ -212,6 +234,11 @@ declare namespace validator {
|
||||
* @default false
|
||||
*/
|
||||
urlSafe?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* @default !urlSafe
|
||||
*/
|
||||
padding?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -221,15 +248,25 @@ declare namespace validator {
|
||||
*/
|
||||
export function isBase64(str: string, options?: IsBase64Options): boolean;
|
||||
|
||||
export interface IsBeforeOptions {
|
||||
/**
|
||||
* Date to compare to.
|
||||
* @default Date().toString()
|
||||
*/
|
||||
comparisonDate?: string | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the string is a date that's before the specified date.
|
||||
*
|
||||
* @param [date] - Date string (defaults to now)
|
||||
*/
|
||||
export function isBefore(str: string, date?: string): boolean;
|
||||
export function isBefore(str: string, dateStringOrOptions?: string | IsBeforeOptions): boolean;
|
||||
|
||||
export const isIBAN: typeof _isIBAN.default;
|
||||
export const ibanLocales: typeof _isIBAN.locales;
|
||||
export type IBANLocale = _isIBAN.IBANLocale;
|
||||
export type IsIBANOptions = _isIBAN.IsIBANOptions;
|
||||
|
||||
/**
|
||||
* Check if a string is a BIC (Bank Identification Code) or SWIFT code.
|
||||
@@ -252,9 +289,11 @@ declare namespace validator {
|
||||
/**
|
||||
* Check if the string's length (in UTF-8 bytes) falls in a range.
|
||||
*
|
||||
* @param [options] - Options
|
||||
* @param [optionsOrMin] - Options, or the minimum byte length allowed.
|
||||
* @param [max] - The maximum byte length allowed.
|
||||
*/
|
||||
export function isByteLength(str: string, options?: IsByteLengthOptions): boolean;
|
||||
export function isByteLength(str: string, optionsOrMin?: number | IsByteLengthOptions): boolean;
|
||||
export function isByteLength(str: string, min: number, max: number): boolean;
|
||||
|
||||
export interface IsCreditCardOptions {
|
||||
/**
|
||||
@@ -378,7 +417,8 @@ declare namespace validator {
|
||||
/**
|
||||
* Check if the string is a valid date.
|
||||
*/
|
||||
export function isDate(str: string, options?: IsDateOptions): boolean;
|
||||
export function isDate(input: Date, formatOrOptions: IsDateOptions & { strictMode: true }): false;
|
||||
export function isDate(input: string | Date, formatOrOptions?: string | IsDateOptions): boolean;
|
||||
|
||||
export type DecimalLocale = FloatLocale;
|
||||
|
||||
@@ -576,12 +616,23 @@ declare namespace validator {
|
||||
*/
|
||||
export function isHSL(str: string): boolean;
|
||||
|
||||
export interface IsRgbColorOptions {
|
||||
/**
|
||||
* If you don't want to allow to set rgb or rgba values with percents, like rgb(5%,5%,5%), or rgba(90%,90%,90%,.3), then set it to false. (defaults to true)
|
||||
*/
|
||||
includePercentValues?: boolean | undefined;
|
||||
/**
|
||||
* `allowSpaces` defaults to `true`, which prohibits whitespace. If set to false, whitespace between color values is allowed, such as `rgb(255, 255, 255)` or even `rgba(255, 128, 0, 0.7)`.
|
||||
*/
|
||||
allowSpaces?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the string is a rgb or rgba color.
|
||||
*
|
||||
* @param [includePercentValues=true] - If you don't want to allow to set rgb or rgba values with percents, like rgb(5%,5%,5%), or rgba(90%,90%,90%,.3), then set it to false. (defaults to true)
|
||||
* @param [options] - Options
|
||||
*/
|
||||
export function isRgbColor(str: string, includePercentValues?: boolean): boolean;
|
||||
export function isRgbColor(str: string, includePercentValuesOrOptions?: boolean | IsRgbColorOptions): boolean;
|
||||
|
||||
export type IdentityCardLocale =
|
||||
| "ar-LY"
|
||||
@@ -594,6 +645,7 @@ declare namespace validator {
|
||||
| "IT"
|
||||
| "LK"
|
||||
| "NO"
|
||||
| "PK"
|
||||
| "PL"
|
||||
| "TH"
|
||||
| "zh-CN"
|
||||
@@ -645,11 +697,11 @@ declare namespace validator {
|
||||
*/
|
||||
allow_leading_zeroes?: boolean | undefined;
|
||||
/**
|
||||
* enforce integers being greater than the value provided
|
||||
* enforce integers being less than the value provided
|
||||
*/
|
||||
lt?: number | undefined;
|
||||
/**
|
||||
* enforce integers being less than the value provided
|
||||
* enforce integers being greater than the value provided
|
||||
*/
|
||||
gt?: number | undefined;
|
||||
}
|
||||
@@ -663,12 +715,19 @@ declare namespace validator {
|
||||
|
||||
export type IPVersion = "4" | "6" | 4 | 6;
|
||||
|
||||
export interface IsIPOptions {
|
||||
/**
|
||||
* Defines which IP version to compare to.
|
||||
*/
|
||||
version?: IPVersion | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the string is an IP (version 4 or 6).
|
||||
*
|
||||
* @param [version] - IP Version
|
||||
* @param [version] - Defines which IP version to compare to.
|
||||
*/
|
||||
export function isIP(str: string, version?: IPVersion): boolean;
|
||||
export function isIP(str: string, versionOrOptions?: IPVersion | IsIPOptions): boolean;
|
||||
|
||||
/**
|
||||
* Check if the string is an IP Range (version 4 or 6).
|
||||
@@ -694,6 +753,11 @@ declare namespace validator {
|
||||
*/
|
||||
export function isISIN(str: string): boolean;
|
||||
|
||||
/**
|
||||
* Check if the string is a valid [ISO 15924](https://en.wikipedia.org/wiki/ISO_15924) officially assigned script code.
|
||||
*/
|
||||
export function isISO15924(str: string): boolean;
|
||||
|
||||
export const isISO31661Alpha2: typeof _isISO31661Alpha2.default;
|
||||
|
||||
/**
|
||||
@@ -701,6 +765,11 @@ declare namespace validator {
|
||||
*/
|
||||
export function isISO31661Alpha3(str: string): boolean;
|
||||
|
||||
/**
|
||||
* Check if the string is a valid [ISO 3166-1 numeric](https://en.wikipedia.org/wiki/ISO_3166-1_numeric) officially assigned country code.
|
||||
*/
|
||||
export function isISO31661Numeric(str: string): boolean;
|
||||
|
||||
/**
|
||||
* check if the string is a valid [ISO 6346](https://en.wikipedia.org/wiki/ISO_6346) shipping container identification.
|
||||
* @param str
|
||||
@@ -771,22 +840,36 @@ declare namespace validator {
|
||||
*/
|
||||
export function isRFC3339(str: string): boolean;
|
||||
|
||||
export interface IsJSONOptions {
|
||||
/**
|
||||
* If true, the primitives 'true', 'false' and 'null' are accepted as valid JSON values.
|
||||
* @default false
|
||||
*/
|
||||
allow_primitives?: boolean | undefined;
|
||||
}
|
||||
/**
|
||||
* Check if the string is valid JSON (note: uses `JSON.parse`).
|
||||
*/
|
||||
export function isJSON(str: string): boolean;
|
||||
export function isJSON(str: string, options?: IsJSONOptions): boolean;
|
||||
|
||||
/**
|
||||
* Check if the string is valid JWT token.
|
||||
*/
|
||||
export function isJWT(str: string): boolean;
|
||||
|
||||
export interface IsLatLongOptions {
|
||||
/**
|
||||
* Pass `checkDMS` as true to validate DMS(degrees, minutes, and seconds) latitude-longitude format.
|
||||
* @default false
|
||||
*/
|
||||
checkDMS?: boolean | undefined;
|
||||
}
|
||||
/**
|
||||
* Check if the string is a valid latitude-longitude coordinate in the format:
|
||||
*
|
||||
* `lat,long` or `lat, long`.
|
||||
*/
|
||||
export function isLatLong(str: string): boolean;
|
||||
export function isLatLong(str: string, options?: IsLatLongOptions): boolean;
|
||||
|
||||
export interface IsLengthOptions {
|
||||
/**
|
||||
@@ -797,6 +880,10 @@ declare namespace validator {
|
||||
* @default undefined
|
||||
*/
|
||||
max?: number | undefined;
|
||||
/**
|
||||
* @default undefined
|
||||
*/
|
||||
discreteLengths?: Array<number> | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -806,31 +893,29 @@ declare namespace validator {
|
||||
*
|
||||
* @param [options] - Options
|
||||
*/
|
||||
export function isLength(str: string, options?: IsLengthOptions): boolean;
|
||||
export function isLength(str: string, minOrOptions?: number | IsLengthOptions): boolean;
|
||||
export function isLength(str: string, min: number, max: number): boolean;
|
||||
|
||||
export type LicensePlateLocale =
|
||||
| "cs-CZ"
|
||||
| "de-DE"
|
||||
| "de-LI"
|
||||
| "en-IN"
|
||||
| "en-SG"
|
||||
| "es-AR"
|
||||
| "fi-FI"
|
||||
| "hu-HU"
|
||||
| "pt-BR"
|
||||
| "pt-PT"
|
||||
| "sq-AL"
|
||||
| "sv-SE"
|
||||
| "en-PK";
|
||||
|
||||
/**
|
||||
* Check if the string matches the format of a country's license plate.
|
||||
* Check if the string matches the format of a country's license plate.
|
||||
*/
|
||||
export function isLicensePlate(
|
||||
str: string,
|
||||
locale:
|
||||
| "cs-CZ"
|
||||
| "de-DE"
|
||||
| "de-LI"
|
||||
| "en-IN"
|
||||
| "es-AR"
|
||||
| "hu-HU"
|
||||
| "pt-BR"
|
||||
| "pt-PT"
|
||||
| "sq-AL"
|
||||
| "sv-SE"
|
||||
| "any",
|
||||
): boolean;
|
||||
|
||||
/**
|
||||
* Check if the string passes the [Luhn algorithm check](https://en.m.wikipedia.org/wiki/Luhn_algorithm).
|
||||
*/
|
||||
export function isLuhnNumber(str: string): boolean;
|
||||
export function isLicensePlate(str: string, locale: LicensePlateLocale | "any"): boolean;
|
||||
export function isLicensePlate(str: string, locale: string): unknown;
|
||||
|
||||
/**
|
||||
* Check if the string is a locale.
|
||||
@@ -868,6 +953,11 @@ declare namespace validator {
|
||||
eui?: "48" | "64" | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the string passes the [Luhn algorithm check](https://en.m.wikipedia.org/wiki/Luhn_algorithm).
|
||||
*/
|
||||
export function isLuhnNumber(str: string): boolean;
|
||||
|
||||
/**
|
||||
* Check if the string is a MAC address.
|
||||
*
|
||||
@@ -904,10 +994,13 @@ declare namespace validator {
|
||||
| "ar-LY"
|
||||
| "ar-MA"
|
||||
| "ar-OM"
|
||||
| "ar-PS"
|
||||
| "ar-SA"
|
||||
| "ar-SD"
|
||||
| "ar-SY"
|
||||
| "ar-TN"
|
||||
| "az-AZ"
|
||||
| "ar-QA"
|
||||
| "bs-BA"
|
||||
| "be-BY"
|
||||
| "bg-BG"
|
||||
@@ -919,20 +1012,36 @@ declare namespace validator {
|
||||
| "de-AT"
|
||||
| "de-CH"
|
||||
| "de-LU"
|
||||
| "dv-MV"
|
||||
| "el-GR"
|
||||
| "el-CY"
|
||||
| "en-AI"
|
||||
| "en-AU"
|
||||
| "en-AG"
|
||||
| "en-BM"
|
||||
| "en-BS"
|
||||
| "en-GB"
|
||||
| "en-GG"
|
||||
| "en-GH"
|
||||
| "en-GY"
|
||||
| "en-HK"
|
||||
| "en-MO"
|
||||
| "en-IE"
|
||||
| "en-IN"
|
||||
| "en-JM"
|
||||
| "en-KE"
|
||||
| "fr-CF"
|
||||
| "en-SS"
|
||||
| "en-KI"
|
||||
| "en-KN"
|
||||
| "en-LS"
|
||||
| "en-MT"
|
||||
| "en-MU"
|
||||
| "en-MW"
|
||||
| "en-NA"
|
||||
| "en-NG"
|
||||
| "en-NZ"
|
||||
| "en-PG"
|
||||
| "en-PK"
|
||||
| "en-PH"
|
||||
| "en-RW"
|
||||
@@ -944,19 +1053,24 @@ declare namespace validator {
|
||||
| "en-ZA"
|
||||
| "en-ZM"
|
||||
| "en-ZW"
|
||||
| "en-BW"
|
||||
| "es-AR"
|
||||
| "es-BO"
|
||||
| "es-CO"
|
||||
| "es-CL"
|
||||
| "es-CR"
|
||||
| "es-CU"
|
||||
| "es-DO"
|
||||
| "es-HN"
|
||||
| "es-EC"
|
||||
| "es-ES"
|
||||
| "es-GT"
|
||||
| "es-PE"
|
||||
| "es-MX"
|
||||
| "es-NI"
|
||||
| "es-PA"
|
||||
| "es-PY"
|
||||
| "es-SV"
|
||||
| "es-UY"
|
||||
| "es-VE"
|
||||
| "et-EE"
|
||||
@@ -964,14 +1078,21 @@ declare namespace validator {
|
||||
| "fi-FI"
|
||||
| "fj-FJ"
|
||||
| "fo-FO"
|
||||
| "fr-BF"
|
||||
| "fr-BJ"
|
||||
| "fr-CD"
|
||||
| "fr-CM"
|
||||
| "fr-FR"
|
||||
| "fr-GF"
|
||||
| "fr-GP"
|
||||
| "fr-MQ"
|
||||
| "fr-PF"
|
||||
| "fr-RE"
|
||||
| "fr-WF"
|
||||
| "he-IL"
|
||||
| "hu-HU"
|
||||
| "id-ID"
|
||||
| "ir-IR"
|
||||
| "it-IT"
|
||||
| "it-SM"
|
||||
| "ja-JP"
|
||||
@@ -979,34 +1100,48 @@ declare namespace validator {
|
||||
| "kk-KZ"
|
||||
| "kl-GL"
|
||||
| "ko-KR"
|
||||
| "ky-KG"
|
||||
| "lt-LT"
|
||||
| "lv-LV"
|
||||
| "mg-MG"
|
||||
| "mn-MN"
|
||||
| "my-MM"
|
||||
| "ms-MY"
|
||||
| "mz-MZ"
|
||||
| "nb-NO"
|
||||
| "ne-NP"
|
||||
| "nl-BE"
|
||||
| "nl-NL"
|
||||
| "nl-AW"
|
||||
| "nn-NO"
|
||||
| "pl-PL"
|
||||
| "pt-BR"
|
||||
| "pt-PT"
|
||||
| "pt-AO"
|
||||
| "ro-MD"
|
||||
| "ro-RO"
|
||||
| "ru-RU"
|
||||
| "si-LK"
|
||||
| "sl-SI"
|
||||
| "sk-SK"
|
||||
| "so-SO"
|
||||
| "sq-AL"
|
||||
| "sr-RS"
|
||||
| "sv-SE"
|
||||
| "tg-TJ"
|
||||
| "th-TH"
|
||||
| "tr-TR"
|
||||
| "tk-TM"
|
||||
| "uk-UA"
|
||||
| "uz-UZ"
|
||||
| "vi-VN"
|
||||
| "zh-CN"
|
||||
| "zh-TW";
|
||||
| "zh-TW"
|
||||
| "dz-BT"
|
||||
| "ar-YE"
|
||||
| "ar-EH"
|
||||
| "fa-AF"
|
||||
| "mk-MK";
|
||||
export type PhoneLocaleAlias = "en-CA" | "fr-CA" | "fr-BE" | "zh-HK" | "zh-MO" | "ga-IE" | "fr-CH" | "it-CH";
|
||||
|
||||
export const isMobilePhoneLocales: MobilePhoneLocale[];
|
||||
@@ -1080,15 +1215,21 @@ declare namespace validator {
|
||||
| "AD"
|
||||
| "AT"
|
||||
| "AU"
|
||||
| "AZ"
|
||||
| "BA"
|
||||
| "BD"
|
||||
| "BE"
|
||||
| "BG"
|
||||
| "BR"
|
||||
| "BY"
|
||||
| "CA"
|
||||
| "CH"
|
||||
| "CN"
|
||||
| "CO"
|
||||
| "CZ"
|
||||
| "DE"
|
||||
| "DK"
|
||||
| "DO"
|
||||
| "DZ"
|
||||
| "EE"
|
||||
| "ES"
|
||||
@@ -1097,6 +1238,7 @@ declare namespace validator {
|
||||
| "GB"
|
||||
| "GR"
|
||||
| "HR"
|
||||
| "HT"
|
||||
| "HU"
|
||||
| "ID"
|
||||
| "IE"
|
||||
@@ -1112,11 +1254,16 @@ declare namespace validator {
|
||||
| "LT"
|
||||
| "LU"
|
||||
| "LV"
|
||||
| "LK"
|
||||
| "MG"
|
||||
| "MX"
|
||||
| "MT"
|
||||
| "MY"
|
||||
| "NL"
|
||||
| "NO"
|
||||
| "NP"
|
||||
| "NZ"
|
||||
| "PK"
|
||||
| "PL"
|
||||
| "PR"
|
||||
| "PT"
|
||||
@@ -1124,8 +1271,10 @@ declare namespace validator {
|
||||
| "RU"
|
||||
| "SA"
|
||||
| "SE"
|
||||
| "SG"
|
||||
| "SI"
|
||||
| "SK"
|
||||
| "TH"
|
||||
| "TN"
|
||||
| "TW"
|
||||
| "UA"
|
||||
@@ -1152,17 +1301,53 @@ declare namespace validator {
|
||||
*/
|
||||
|
||||
export interface StrongPasswordOptions {
|
||||
/**
|
||||
* @default 8
|
||||
*/
|
||||
minLength?: number | undefined;
|
||||
/**
|
||||
* @default 1
|
||||
*/
|
||||
minLowercase?: number | undefined;
|
||||
/**
|
||||
* @default 1
|
||||
*/
|
||||
minUppercase?: number | undefined;
|
||||
/**
|
||||
* @default 1
|
||||
*/
|
||||
minNumbers?: number | undefined;
|
||||
/**
|
||||
* @default 1
|
||||
*/
|
||||
minSymbols?: number | undefined;
|
||||
/**
|
||||
* @default false
|
||||
*/
|
||||
returnScore?: boolean | undefined;
|
||||
/**
|
||||
* @default 1
|
||||
*/
|
||||
pointsPerUnique?: number | undefined;
|
||||
/**
|
||||
* @default 0.5
|
||||
*/
|
||||
pointsPerRepeat?: number | undefined;
|
||||
/**
|
||||
* @default 10
|
||||
*/
|
||||
pointsForContainingLower?: number | undefined;
|
||||
/**
|
||||
* @default 10
|
||||
*/
|
||||
pointsForContainingUpper?: number | undefined;
|
||||
/**
|
||||
* @default 10
|
||||
*/
|
||||
pointsForContainingNumber?: number | undefined;
|
||||
/**
|
||||
* @default 10
|
||||
*/
|
||||
pointsForContainingSymbol?: number | undefined;
|
||||
}
|
||||
|
||||
@@ -1170,7 +1355,8 @@ declare namespace validator {
|
||||
str: string,
|
||||
options?: StrongPasswordOptions & { returnScore?: false | undefined },
|
||||
): boolean;
|
||||
export function isStrongPassword(str: string, options: StrongPasswordOptions & { returnScore: true }): number;
|
||||
export function isStrongPassword(str: string, options?: StrongPasswordOptions & { returnScore: true }): number;
|
||||
export function isStrongPassword(str: string, options?: StrongPasswordOptions): boolean | number;
|
||||
|
||||
/**
|
||||
* Check if the string contains any surrogate pairs chars.
|
||||
@@ -1179,16 +1365,19 @@ declare namespace validator {
|
||||
|
||||
export interface IsTimeOptions {
|
||||
/**
|
||||
* 'hour24' will validate hours in 24 format and 'hour12' will validate hours in 12 format.
|
||||
* `'hour24'` will validate hours in 24 format,
|
||||
* `'hour12'` will validate hours in 12 format.
|
||||
* @default 'hour24'
|
||||
*/
|
||||
hourFormat?: "hour12" | "hour24";
|
||||
hourFormat?: "hour12" | "hour24" | undefined;
|
||||
/**
|
||||
* 'default' will validate HH:MM format, 'withSeconds' will validate the HH:MM:SS format
|
||||
* `'default'` will validate `HH:MM` format,
|
||||
* `'withSeconds'` will validate the `HH:MM:SS` format,
|
||||
* `'withOptionalSeconds'` will validate `'HH:MM'` and `'HH:MM:SS'` formats.
|
||||
*
|
||||
* @default 'default'
|
||||
*/
|
||||
mode?: "default" | "withSeconds";
|
||||
mode?: "default" | "withSeconds" | "withOptionalSeconds" | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1206,9 +1395,34 @@ declare namespace validator {
|
||||
*/
|
||||
export function isUppercase(str: string): boolean;
|
||||
|
||||
export type UUIDVersion = "1" | "2" | "3" | "4" | "5" | "7" | "all" | 1 | 2 | 3 | 4 | 5 | 7;
|
||||
/**
|
||||
* Check if the string is a UUID (version 1, 2, 3, 4, 5 or 7).
|
||||
* Check if the string is a [ULID](https://github.com/ulid/spec).
|
||||
*/
|
||||
export function isULID(str: string): boolean;
|
||||
|
||||
export type UUIDVersion =
|
||||
| "1"
|
||||
| "2"
|
||||
| "3"
|
||||
| "4"
|
||||
| "5"
|
||||
| "6"
|
||||
| "7"
|
||||
| "8"
|
||||
| "nil"
|
||||
| "max"
|
||||
| "loose"
|
||||
| "all"
|
||||
| 1
|
||||
| 2
|
||||
| 3
|
||||
| 4
|
||||
| 5
|
||||
| 6
|
||||
| 7
|
||||
| 8;
|
||||
/**
|
||||
* Check if the string is a UUID (version 1-8, nil, max, all).
|
||||
*
|
||||
* @param [version="all"] - UUID version
|
||||
*/
|
||||
@@ -1219,10 +1433,81 @@ declare namespace validator {
|
||||
*/
|
||||
export function isVariableWidth(str: string): boolean;
|
||||
|
||||
export type VATCountryCode =
|
||||
| "AT"
|
||||
| "BE"
|
||||
| "BG"
|
||||
| "HR"
|
||||
| "CY"
|
||||
| "CZ"
|
||||
| "DK"
|
||||
| "EE"
|
||||
| "FI"
|
||||
| "FR"
|
||||
| "DE"
|
||||
| "EL"
|
||||
| "HU"
|
||||
| "IE"
|
||||
| "IT"
|
||||
| "LV"
|
||||
| "LT"
|
||||
| "LU"
|
||||
| "MT"
|
||||
| "NL"
|
||||
| "PL"
|
||||
| "PT"
|
||||
| "RO"
|
||||
| "SK"
|
||||
| "SI"
|
||||
| "ES"
|
||||
| "SE"
|
||||
| "AL"
|
||||
| "MK"
|
||||
| "AU"
|
||||
| "BY"
|
||||
| "CA"
|
||||
| "IS"
|
||||
| "IN"
|
||||
| "ID"
|
||||
| "IL"
|
||||
| "KZ"
|
||||
| "NZ"
|
||||
| "NG"
|
||||
| "NO"
|
||||
| "PH"
|
||||
| "RU"
|
||||
| "SM"
|
||||
| "SA"
|
||||
| "RS"
|
||||
| "CH"
|
||||
| "TR"
|
||||
| "UA"
|
||||
| "GB"
|
||||
| "UZ"
|
||||
| "AR"
|
||||
| "BO"
|
||||
| "BR"
|
||||
| "CL"
|
||||
| "CO"
|
||||
| "CR"
|
||||
| "EC"
|
||||
| "SV"
|
||||
| "GT"
|
||||
| "HN"
|
||||
| "MX"
|
||||
| "NI"
|
||||
| "PA"
|
||||
| "PY"
|
||||
| "PE"
|
||||
| "DO"
|
||||
| "UY"
|
||||
| "VE";
|
||||
|
||||
/**
|
||||
* Checks that the string is a [valid VAT number
|
||||
* check if the string is a [valid VAT number](https://en.wikipedia.org/wiki/VAT_identification_number)
|
||||
* if validation is available for the given country code
|
||||
*/
|
||||
export function isVAT(str: string, countryCode: string): boolean;
|
||||
export function isVAT(str: string, countryCode: VATCountryCode): boolean;
|
||||
|
||||
/**
|
||||
* Checks characters if they appear in the whitelist.
|
||||
@@ -1236,13 +1521,7 @@ declare namespace validator {
|
||||
*
|
||||
* @param pattern - `/foo/i`
|
||||
*/
|
||||
export function matches(str: string, pattern: RegExp): boolean;
|
||||
/**
|
||||
* Check if string matches the pattern.
|
||||
*
|
||||
* @param pattern - `'foo'`
|
||||
* @param [modifiers] - `'i'`
|
||||
*/
|
||||
export function matches(str: string, pattern: RegExp | string): boolean;
|
||||
export function matches(str: string, pattern: string, modifiers?: string): boolean;
|
||||
|
||||
/**
|
||||
@@ -1344,6 +1623,19 @@ declare namespace validator {
|
||||
* @default true
|
||||
*/
|
||||
yahoo_remove_subaddress?: boolean | undefined;
|
||||
/**
|
||||
* Yandex Mail addresses are known to be case-insensitive, so this switch allows lowercasing them even when `all_lowercase` is set to `false`.
|
||||
* Please note that when `all_lowercase` is `true`, Yandex Mail addresses are lowercased regardless of the value of this setting.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
yandex_lowercase?: boolean | undefined;
|
||||
/**
|
||||
* All Yandex domains are equal, this explicitly sets the domain to 'yandex.ru'
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
yandex_convert_yandexru?: boolean | undefined;
|
||||
/**
|
||||
* iCloud addresses (including MobileMe) are known to be case-insensitive, so this switch allows lowercasing them even when `all_lowercase` is set to `false`.
|
||||
* Please note that when `all_lowercase` is `true`, iCloud addresses are lowercased regardless of the value of this setting.
|
||||
|
||||
1
backend/node_modules/@types/validator/lib/isAfter.d.ts
generated
vendored
1
backend/node_modules/@types/validator/lib/isAfter.d.ts
generated
vendored
@@ -1,2 +1,3 @@
|
||||
import validator from "../";
|
||||
export type IsAfterOptions = validator.IsAfterOptions;
|
||||
export default validator.isAfter;
|
||||
|
||||
1
backend/node_modules/@types/validator/lib/isBase32.d.ts
generated
vendored
1
backend/node_modules/@types/validator/lib/isBase32.d.ts
generated
vendored
@@ -1,2 +1,3 @@
|
||||
import validator from "../";
|
||||
export type IsBase32Options = validator.IsBase32Options;
|
||||
export default validator.isBase32;
|
||||
|
||||
1
backend/node_modules/@types/validator/lib/isBefore.d.ts
generated
vendored
1
backend/node_modules/@types/validator/lib/isBefore.d.ts
generated
vendored
@@ -1,2 +1,3 @@
|
||||
import validator from "../";
|
||||
export type IsBeforeOptions = validator.IsBeforeOptions;
|
||||
export default validator.isBefore;
|
||||
|
||||
1
backend/node_modules/@types/validator/lib/isDate.d.ts
generated
vendored
1
backend/node_modules/@types/validator/lib/isDate.d.ts
generated
vendored
@@ -1,2 +1,3 @@
|
||||
import validator from "../";
|
||||
export type IsDateOptions = validator.IsDateOptions;
|
||||
export default validator.isDate;
|
||||
|
||||
10
backend/node_modules/@types/validator/lib/isEmail.d.ts
generated
vendored
10
backend/node_modules/@types/validator/lib/isEmail.d.ts
generated
vendored
@@ -42,18 +42,24 @@ export interface IsEmailOptions {
|
||||
* @default false
|
||||
*/
|
||||
domain_specific_validation?: boolean | undefined;
|
||||
/**
|
||||
* If `allow_underscores` is set to `true`, the validator will allow underscores in an email address.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
allow_underscores?: boolean | undefined;
|
||||
/**
|
||||
* If host_blacklist is set to an array of strings
|
||||
* and the part of the email after the @ symbol matches one of the strings defined in it,
|
||||
* the validation fails.
|
||||
*/
|
||||
host_blacklist?: string[] | undefined;
|
||||
host_blacklist?: Array<string | RegExp> | undefined;
|
||||
/**
|
||||
* If host_whitelist is set to an array of strings
|
||||
* and the part of the email after the @ symbol matches none of the strings defined in it,
|
||||
* the validation fails.
|
||||
*/
|
||||
host_whitelist?: string[] | undefined;
|
||||
host_whitelist?: Array<string | RegExp> | undefined;
|
||||
/**
|
||||
* If blacklisted_chars receives a string, then the validator will reject emails that include
|
||||
* any of the characters in the string, in the name part.
|
||||
|
||||
9
backend/node_modules/@types/validator/lib/isFQDN.d.ts
generated
vendored
9
backend/node_modules/@types/validator/lib/isFQDN.d.ts
generated
vendored
@@ -1,17 +1,21 @@
|
||||
export interface IsFQDNOptions {
|
||||
/**
|
||||
* If `require_tld` is set to false, the validator will not check if the domain includes a TLD.
|
||||
* @default true
|
||||
*/
|
||||
require_tld?: boolean | undefined;
|
||||
/**
|
||||
* If `allow_underscores` is set to true, the validator will allow underscores in the domain.
|
||||
* @default false
|
||||
*/
|
||||
allow_underscores?: boolean | undefined;
|
||||
/**
|
||||
* If `allow_trailing_dot` is set to true, the validator will allow the domain to end with a `.` character.
|
||||
* @default false
|
||||
*/
|
||||
allow_trailing_dot?: boolean | undefined;
|
||||
/**
|
||||
* If `allow_numeric_tld` is set to true, the validator will allow the TLD of the domain to be made up solely of numbers.
|
||||
* @default false
|
||||
*/
|
||||
allow_numeric_tld?: boolean | undefined;
|
||||
@@ -20,6 +24,11 @@ export interface IsFQDNOptions {
|
||||
* @default false
|
||||
*/
|
||||
allow_wildcard?: boolean | undefined;
|
||||
/**
|
||||
* If `ignore_max_length` is set to true, the validator will not check for the standard max length of a domain.
|
||||
* @default false
|
||||
*/
|
||||
ignore_max_length?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
13
backend/node_modules/@types/validator/lib/isIBAN.d.ts
generated
vendored
13
backend/node_modules/@types/validator/lib/isIBAN.d.ts
generated
vendored
@@ -1,4 +1,4 @@
|
||||
export const locales: Array<
|
||||
export type IBANLocale =
|
||||
| "AD"
|
||||
| "AE"
|
||||
| "AL"
|
||||
@@ -17,6 +17,7 @@ export const locales: Array<
|
||||
| "DE"
|
||||
| "DK"
|
||||
| "DO"
|
||||
| "DZ"
|
||||
| "EE"
|
||||
| "EG"
|
||||
| "ES"
|
||||
@@ -46,6 +47,7 @@ export const locales: Array<
|
||||
| "LT"
|
||||
| "LU"
|
||||
| "LV"
|
||||
| "MA"
|
||||
| "MC"
|
||||
| "MD"
|
||||
| "ME"
|
||||
@@ -76,18 +78,19 @@ export const locales: Array<
|
||||
| "UA"
|
||||
| "VA"
|
||||
| "VG"
|
||||
| "XK"
|
||||
>;
|
||||
| "XK";
|
||||
|
||||
export const locales: IBANLocale[];
|
||||
|
||||
export interface IsIBANOptions {
|
||||
/**
|
||||
* @default undefined
|
||||
*/
|
||||
whitelist?: typeof locales | undefined;
|
||||
whitelist?: IBANLocale[] | undefined;
|
||||
/**
|
||||
* @default undefined
|
||||
*/
|
||||
blacklist?: typeof locales | undefined;
|
||||
blacklist?: IBANLocale[] | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
1
backend/node_modules/@types/validator/lib/isIP.d.ts
generated
vendored
1
backend/node_modules/@types/validator/lib/isIP.d.ts
generated
vendored
@@ -1,3 +1,4 @@
|
||||
import validator from "../";
|
||||
export type IPVersion = validator.IPVersion;
|
||||
export type IsIPOptions = validator.IsIPOptions;
|
||||
export default validator.isIP;
|
||||
|
||||
4
backend/node_modules/@types/validator/lib/isISO4217.d.ts
generated
vendored
4
backend/node_modules/@types/validator/lib/isISO4217.d.ts
generated
vendored
@@ -41,7 +41,6 @@ export const CurrencyCodes: Set<
|
||||
| "COP"
|
||||
| "COU"
|
||||
| "CRC"
|
||||
| "CUC"
|
||||
| "CUP"
|
||||
| "CVE"
|
||||
| "CZK"
|
||||
@@ -65,7 +64,6 @@ export const CurrencyCodes: Set<
|
||||
| "GYD"
|
||||
| "HKD"
|
||||
| "HNL"
|
||||
| "HRK"
|
||||
| "HTG"
|
||||
| "HUF"
|
||||
| "IDR"
|
||||
@@ -133,6 +131,7 @@ export const CurrencyCodes: Set<
|
||||
| "SEK"
|
||||
| "SGD"
|
||||
| "SHP"
|
||||
| "SLE"
|
||||
| "SLL"
|
||||
| "SOS"
|
||||
| "SRD"
|
||||
@@ -158,6 +157,7 @@ export const CurrencyCodes: Set<
|
||||
| "UYU"
|
||||
| "UYW"
|
||||
| "UZS"
|
||||
| "VED"
|
||||
| "VES"
|
||||
| "VND"
|
||||
| "VUV"
|
||||
|
||||
1
backend/node_modules/@types/validator/lib/isJSON.d.ts
generated
vendored
1
backend/node_modules/@types/validator/lib/isJSON.d.ts
generated
vendored
@@ -1,2 +1,3 @@
|
||||
import validator from "../";
|
||||
export type IsJSONOptions = validator.IsJSONOptions;
|
||||
export default validator.isJSON;
|
||||
|
||||
1
backend/node_modules/@types/validator/lib/isLatLong.d.ts
generated
vendored
1
backend/node_modules/@types/validator/lib/isLatLong.d.ts
generated
vendored
@@ -1,2 +1,3 @@
|
||||
import validator from "../";
|
||||
export type IsLatLongOptions = validator.IsLatLongOptions;
|
||||
export default validator.isLatLong;
|
||||
|
||||
1
backend/node_modules/@types/validator/lib/isMobilePhone.d.ts
generated
vendored
1
backend/node_modules/@types/validator/lib/isMobilePhone.d.ts
generated
vendored
@@ -1,4 +1,5 @@
|
||||
import validator from "../";
|
||||
export type MobilePhoneLocale = validator.MobilePhoneLocale;
|
||||
export type IsMobilePhoneOptions = validator.IsMobilePhoneOptions;
|
||||
export const locales: MobilePhoneLocale[];
|
||||
export default validator.isMobilePhone;
|
||||
|
||||
1
backend/node_modules/@types/validator/lib/isPostalCode.d.ts
generated
vendored
1
backend/node_modules/@types/validator/lib/isPostalCode.d.ts
generated
vendored
@@ -1,3 +1,4 @@
|
||||
import validator from "../";
|
||||
export type PostalCodeLocale = validator.PostalCodeLocale;
|
||||
export const locales: PostalCodeLocale[];
|
||||
export default validator.isPostalCode;
|
||||
|
||||
1
backend/node_modules/@types/validator/lib/isRgbColor.d.ts
generated
vendored
1
backend/node_modules/@types/validator/lib/isRgbColor.d.ts
generated
vendored
@@ -1,2 +1,3 @@
|
||||
import validator from "../";
|
||||
export type IsRgbColorOptions = validator.IsRgbColorOptions;
|
||||
export default validator.isRgbColor;
|
||||
|
||||
1
backend/node_modules/@types/validator/lib/isStrongPassword.d.ts
generated
vendored
1
backend/node_modules/@types/validator/lib/isStrongPassword.d.ts
generated
vendored
@@ -1,2 +1,3 @@
|
||||
import validator from "../";
|
||||
export type StrongPasswordOptions = validator.StrongPasswordOptions;
|
||||
export default validator.isStrongPassword;
|
||||
|
||||
1
backend/node_modules/@types/validator/lib/isTime.d.ts
generated
vendored
1
backend/node_modules/@types/validator/lib/isTime.d.ts
generated
vendored
@@ -1,2 +1,3 @@
|
||||
import validator from "../";
|
||||
export type IsTimeOptions = validator.IsTimeOptions;
|
||||
export default validator.isTime;
|
||||
|
||||
4
backend/node_modules/@types/validator/lib/isURL.d.ts
generated
vendored
4
backend/node_modules/@types/validator/lib/isURL.d.ts
generated
vendored
@@ -67,4 +67,8 @@ export interface IsURLOptions {
|
||||
* @default true
|
||||
*/
|
||||
validate_length?: boolean | undefined;
|
||||
/**
|
||||
* @default 2084
|
||||
*/
|
||||
max_allowed_length?: number | false | undefined;
|
||||
}
|
||||
|
||||
1
backend/node_modules/@types/validator/lib/isVAT.d.ts
generated
vendored
1
backend/node_modules/@types/validator/lib/isVAT.d.ts
generated
vendored
@@ -1,2 +1,3 @@
|
||||
import validator from "../";
|
||||
export type VATCountryCode = validator.VATCountryCode;
|
||||
export default validator.isVAT;
|
||||
|
||||
22
backend/node_modules/@types/validator/package.json
generated
vendored
22
backend/node_modules/@types/validator/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@types/validator",
|
||||
"version": "13.12.0",
|
||||
"version": "13.15.10",
|
||||
"description": "TypeScript definitions for validator",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/validator",
|
||||
"license": "MIT",
|
||||
@@ -45,11 +45,6 @@
|
||||
"githubUsername": "keatz55",
|
||||
"url": "https://github.com/keatz55"
|
||||
},
|
||||
{
|
||||
"name": "Munif Tanjim",
|
||||
"githubUsername": "MunifTanjim",
|
||||
"url": "https://github.com/MunifTanjim"
|
||||
},
|
||||
{
|
||||
"name": "Vlad Poluch",
|
||||
"githubUsername": "vlapo",
|
||||
@@ -65,15 +60,15 @@
|
||||
"githubUsername": "Mattewn99",
|
||||
"url": "https://github.com/Mattewn99"
|
||||
},
|
||||
{
|
||||
"name": "Roman Babiak",
|
||||
"githubUsername": "Almost-Infinity",
|
||||
"url": "https://github.com/Almost-Infinity"
|
||||
},
|
||||
{
|
||||
"name": "Daniel Freire",
|
||||
"githubUsername": "dcfreire",
|
||||
"url": "https://github.com/dcfreire"
|
||||
},
|
||||
{
|
||||
"name": "Rik Smale",
|
||||
"githubUsername": "WikiRik",
|
||||
"url": "https://github.com/WikiRik"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
@@ -85,6 +80,7 @@
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"typesPublisherContentHash": "7f42e4450fe2158eac91ad1bcc578bf8d353390362895a0b2aa4d0d106ff4dae",
|
||||
"typeScriptVersion": "4.7"
|
||||
"peerDependencies": {},
|
||||
"typesPublisherContentHash": "5f7b50fa2d47d206fa5f2c3d027a72996c5b3919a0774e1b2e9ac453b1a36cd1",
|
||||
"typeScriptVersion": "5.2"
|
||||
}
|
||||
20
backend/node_modules/agent-base/node_modules/debug/LICENSE
generated
vendored
20
backend/node_modules/agent-base/node_modules/debug/LICENSE
generated
vendored
@@ -1,20 +0,0 @@
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
|
||||
Copyright (c) 2018-2021 Josh Junon
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the 'Software'), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial
|
||||
portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
481
backend/node_modules/agent-base/node_modules/debug/README.md
generated
vendored
481
backend/node_modules/agent-base/node_modules/debug/README.md
generated
vendored
@@ -1,481 +0,0 @@
|
||||
# debug
|
||||
[](https://travis-ci.org/debug-js/debug) [](https://coveralls.io/github/debug-js/debug?branch=master) [](https://visionmedia-community-slackin.now.sh/) [](#backers)
|
||||
[](#sponsors)
|
||||
|
||||
<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
|
||||
|
||||
A tiny JavaScript debugging utility modelled after Node.js core's debugging
|
||||
technique. Works in Node.js and web browsers.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
$ npm install debug
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
|
||||
|
||||
Example [_app.js_](./examples/node/app.js):
|
||||
|
||||
```js
|
||||
var debug = require('debug')('http')
|
||||
, http = require('http')
|
||||
, name = 'My App';
|
||||
|
||||
// fake app
|
||||
|
||||
debug('booting %o', name);
|
||||
|
||||
http.createServer(function(req, res){
|
||||
debug(req.method + ' ' + req.url);
|
||||
res.end('hello\n');
|
||||
}).listen(3000, function(){
|
||||
debug('listening');
|
||||
});
|
||||
|
||||
// fake worker of some kind
|
||||
|
||||
require('./worker');
|
||||
```
|
||||
|
||||
Example [_worker.js_](./examples/node/worker.js):
|
||||
|
||||
```js
|
||||
var a = require('debug')('worker:a')
|
||||
, b = require('debug')('worker:b');
|
||||
|
||||
function work() {
|
||||
a('doing lots of uninteresting work');
|
||||
setTimeout(work, Math.random() * 1000);
|
||||
}
|
||||
|
||||
work();
|
||||
|
||||
function workb() {
|
||||
b('doing some work');
|
||||
setTimeout(workb, Math.random() * 2000);
|
||||
}
|
||||
|
||||
workb();
|
||||
```
|
||||
|
||||
The `DEBUG` environment variable is then used to enable these based on space or
|
||||
comma-delimited names.
|
||||
|
||||
Here are some examples:
|
||||
|
||||
<img width="647" alt="screen shot 2017-08-08 at 12 53 04 pm" src="https://user-images.githubusercontent.com/71256/29091703-a6302cdc-7c38-11e7-8304-7c0b3bc600cd.png">
|
||||
<img width="647" alt="screen shot 2017-08-08 at 12 53 38 pm" src="https://user-images.githubusercontent.com/71256/29091700-a62a6888-7c38-11e7-800b-db911291ca2b.png">
|
||||
<img width="647" alt="screen shot 2017-08-08 at 12 53 25 pm" src="https://user-images.githubusercontent.com/71256/29091701-a62ea114-7c38-11e7-826a-2692bedca740.png">
|
||||
|
||||
#### Windows command prompt notes
|
||||
|
||||
##### CMD
|
||||
|
||||
On Windows the environment variable is set using the `set` command.
|
||||
|
||||
```cmd
|
||||
set DEBUG=*,-not_this
|
||||
```
|
||||
|
||||
Example:
|
||||
|
||||
```cmd
|
||||
set DEBUG=* & node app.js
|
||||
```
|
||||
|
||||
##### PowerShell (VS Code default)
|
||||
|
||||
PowerShell uses different syntax to set environment variables.
|
||||
|
||||
```cmd
|
||||
$env:DEBUG = "*,-not_this"
|
||||
```
|
||||
|
||||
Example:
|
||||
|
||||
```cmd
|
||||
$env:DEBUG='app';node app.js
|
||||
```
|
||||
|
||||
Then, run the program to be debugged as usual.
|
||||
|
||||
npm script example:
|
||||
```js
|
||||
"windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js",
|
||||
```
|
||||
|
||||
## Namespace Colors
|
||||
|
||||
Every debug instance has a color generated for it based on its namespace name.
|
||||
This helps when visually parsing the debug output to identify which debug instance
|
||||
a debug line belongs to.
|
||||
|
||||
#### Node.js
|
||||
|
||||
In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
|
||||
the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
|
||||
otherwise debug will only use a small handful of basic colors.
|
||||
|
||||
<img width="521" src="https://user-images.githubusercontent.com/71256/29092181-47f6a9e6-7c3a-11e7-9a14-1928d8a711cd.png">
|
||||
|
||||
#### Web Browser
|
||||
|
||||
Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
|
||||
option. These are WebKit web inspectors, Firefox ([since version
|
||||
31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
|
||||
and the Firebug plugin for Firefox (any version).
|
||||
|
||||
<img width="524" src="https://user-images.githubusercontent.com/71256/29092033-b65f9f2e-7c39-11e7-8e32-f6f0d8e865c1.png">
|
||||
|
||||
|
||||
## Millisecond diff
|
||||
|
||||
When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
|
||||
|
||||
<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
|
||||
|
||||
When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
|
||||
|
||||
<img width="647" src="https://user-images.githubusercontent.com/71256/29091956-6bd78372-7c39-11e7-8c55-c948396d6edd.png">
|
||||
|
||||
|
||||
## Conventions
|
||||
|
||||
If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.
|
||||
|
||||
## Wildcards
|
||||
|
||||
The `*` character may be used as a wildcard. Suppose for example your library has
|
||||
debuggers named "connect:bodyParser", "connect:compress", "connect:session",
|
||||
instead of listing all three with
|
||||
`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
|
||||
`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
|
||||
|
||||
You can also exclude specific debuggers by prefixing them with a "-" character.
|
||||
For example, `DEBUG=*,-connect:*` would include all debuggers except those
|
||||
starting with "connect:".
|
||||
|
||||
## Environment Variables
|
||||
|
||||
When running through Node.js, you can set a few environment variables that will
|
||||
change the behavior of the debug logging:
|
||||
|
||||
| Name | Purpose |
|
||||
|-----------|-------------------------------------------------|
|
||||
| `DEBUG` | Enables/disables specific debugging namespaces. |
|
||||
| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
|
||||
| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
|
||||
| `DEBUG_DEPTH` | Object inspection depth. |
|
||||
| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
|
||||
|
||||
|
||||
__Note:__ The environment variables beginning with `DEBUG_` end up being
|
||||
converted into an Options object that gets used with `%o`/`%O` formatters.
|
||||
See the Node.js documentation for
|
||||
[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
|
||||
for the complete list.
|
||||
|
||||
## Formatters
|
||||
|
||||
Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
|
||||
Below are the officially supported formatters:
|
||||
|
||||
| Formatter | Representation |
|
||||
|-----------|----------------|
|
||||
| `%O` | Pretty-print an Object on multiple lines. |
|
||||
| `%o` | Pretty-print an Object all on a single line. |
|
||||
| `%s` | String. |
|
||||
| `%d` | Number (both integer and float). |
|
||||
| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
|
||||
| `%%` | Single percent sign ('%'). This does not consume an argument. |
|
||||
|
||||
|
||||
### Custom formatters
|
||||
|
||||
You can add custom formatters by extending the `debug.formatters` object.
|
||||
For example, if you wanted to add support for rendering a Buffer as hex with
|
||||
`%h`, you could do something like:
|
||||
|
||||
```js
|
||||
const createDebug = require('debug')
|
||||
createDebug.formatters.h = (v) => {
|
||||
return v.toString('hex')
|
||||
}
|
||||
|
||||
// …elsewhere
|
||||
const debug = createDebug('foo')
|
||||
debug('this is hex: %h', new Buffer('hello world'))
|
||||
// foo this is hex: 68656c6c6f20776f726c6421 +0ms
|
||||
```
|
||||
|
||||
|
||||
## Browser Support
|
||||
|
||||
You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
|
||||
or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
|
||||
if you don't want to build it yourself.
|
||||
|
||||
Debug's enable state is currently persisted by `localStorage`.
|
||||
Consider the situation shown below where you have `worker:a` and `worker:b`,
|
||||
and wish to debug both. You can enable this using `localStorage.debug`:
|
||||
|
||||
```js
|
||||
localStorage.debug = 'worker:*'
|
||||
```
|
||||
|
||||
And then refresh the page.
|
||||
|
||||
```js
|
||||
a = debug('worker:a');
|
||||
b = debug('worker:b');
|
||||
|
||||
setInterval(function(){
|
||||
a('doing some work');
|
||||
}, 1000);
|
||||
|
||||
setInterval(function(){
|
||||
b('doing some work');
|
||||
}, 1200);
|
||||
```
|
||||
|
||||
In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_.
|
||||
|
||||
<img width="647" src="https://user-images.githubusercontent.com/7143133/152083257-29034707-c42c-4959-8add-3cee850e6fcf.png">
|
||||
|
||||
## Output streams
|
||||
|
||||
By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
|
||||
|
||||
Example [_stdout.js_](./examples/node/stdout.js):
|
||||
|
||||
```js
|
||||
var debug = require('debug');
|
||||
var error = debug('app:error');
|
||||
|
||||
// by default stderr is used
|
||||
error('goes to stderr!');
|
||||
|
||||
var log = debug('app:log');
|
||||
// set this namespace to log via console.log
|
||||
log.log = console.log.bind(console); // don't forget to bind to console!
|
||||
log('goes to stdout');
|
||||
error('still goes to stderr!');
|
||||
|
||||
// set all output to go via console.info
|
||||
// overrides all per-namespace log settings
|
||||
debug.log = console.info.bind(console);
|
||||
error('now goes to stdout via console.info');
|
||||
log('still goes to stdout, but via console.info now');
|
||||
```
|
||||
|
||||
## Extend
|
||||
You can simply extend debugger
|
||||
```js
|
||||
const log = require('debug')('auth');
|
||||
|
||||
//creates new debug instance with extended namespace
|
||||
const logSign = log.extend('sign');
|
||||
const logLogin = log.extend('login');
|
||||
|
||||
log('hello'); // auth hello
|
||||
logSign('hello'); //auth:sign hello
|
||||
logLogin('hello'); //auth:login hello
|
||||
```
|
||||
|
||||
## Set dynamically
|
||||
|
||||
You can also enable debug dynamically by calling the `enable()` method :
|
||||
|
||||
```js
|
||||
let debug = require('debug');
|
||||
|
||||
console.log(1, debug.enabled('test'));
|
||||
|
||||
debug.enable('test');
|
||||
console.log(2, debug.enabled('test'));
|
||||
|
||||
debug.disable();
|
||||
console.log(3, debug.enabled('test'));
|
||||
|
||||
```
|
||||
|
||||
print :
|
||||
```
|
||||
1 false
|
||||
2 true
|
||||
3 false
|
||||
```
|
||||
|
||||
Usage :
|
||||
`enable(namespaces)`
|
||||
`namespaces` can include modes separated by a colon and wildcards.
|
||||
|
||||
Note that calling `enable()` completely overrides previously set DEBUG variable :
|
||||
|
||||
```
|
||||
$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))'
|
||||
=> false
|
||||
```
|
||||
|
||||
`disable()`
|
||||
|
||||
Will disable all namespaces. The functions returns the namespaces currently
|
||||
enabled (and skipped). This can be useful if you want to disable debugging
|
||||
temporarily without knowing what was enabled to begin with.
|
||||
|
||||
For example:
|
||||
|
||||
```js
|
||||
let debug = require('debug');
|
||||
debug.enable('foo:*,-foo:bar');
|
||||
let namespaces = debug.disable();
|
||||
debug.enable(namespaces);
|
||||
```
|
||||
|
||||
Note: There is no guarantee that the string will be identical to the initial
|
||||
enable string, but semantically they will be identical.
|
||||
|
||||
## Checking whether a debug target is enabled
|
||||
|
||||
After you've created a debug instance, you can determine whether or not it is
|
||||
enabled by checking the `enabled` property:
|
||||
|
||||
```javascript
|
||||
const debug = require('debug')('http');
|
||||
|
||||
if (debug.enabled) {
|
||||
// do stuff...
|
||||
}
|
||||
```
|
||||
|
||||
You can also manually toggle this property to force the debug instance to be
|
||||
enabled or disabled.
|
||||
|
||||
## Usage in child processes
|
||||
|
||||
Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process.
|
||||
For example:
|
||||
|
||||
```javascript
|
||||
worker = fork(WORKER_WRAP_PATH, [workerPath], {
|
||||
stdio: [
|
||||
/* stdin: */ 0,
|
||||
/* stdout: */ 'pipe',
|
||||
/* stderr: */ 'pipe',
|
||||
'ipc',
|
||||
],
|
||||
env: Object.assign({}, process.env, {
|
||||
DEBUG_COLORS: 1 // without this settings, colors won't be shown
|
||||
}),
|
||||
});
|
||||
|
||||
worker.stderr.pipe(process.stderr, { end: false });
|
||||
```
|
||||
|
||||
|
||||
## Authors
|
||||
|
||||
- TJ Holowaychuk
|
||||
- Nathan Rajlich
|
||||
- Andrew Rhyne
|
||||
- Josh Junon
|
||||
|
||||
## Backers
|
||||
|
||||
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
|
||||
|
||||
<a href="https://opencollective.com/debug/backer/0/website" target="_blank"><img src="https://opencollective.com/debug/backer/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/1/website" target="_blank"><img src="https://opencollective.com/debug/backer/1/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/2/website" target="_blank"><img src="https://opencollective.com/debug/backer/2/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/3/website" target="_blank"><img src="https://opencollective.com/debug/backer/3/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/4/website" target="_blank"><img src="https://opencollective.com/debug/backer/4/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/5/website" target="_blank"><img src="https://opencollective.com/debug/backer/5/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/6/website" target="_blank"><img src="https://opencollective.com/debug/backer/6/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/7/website" target="_blank"><img src="https://opencollective.com/debug/backer/7/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/8/website" target="_blank"><img src="https://opencollective.com/debug/backer/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/9/website" target="_blank"><img src="https://opencollective.com/debug/backer/9/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/10/website" target="_blank"><img src="https://opencollective.com/debug/backer/10/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/11/website" target="_blank"><img src="https://opencollective.com/debug/backer/11/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/12/website" target="_blank"><img src="https://opencollective.com/debug/backer/12/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/13/website" target="_blank"><img src="https://opencollective.com/debug/backer/13/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/14/website" target="_blank"><img src="https://opencollective.com/debug/backer/14/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/15/website" target="_blank"><img src="https://opencollective.com/debug/backer/15/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/16/website" target="_blank"><img src="https://opencollective.com/debug/backer/16/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/17/website" target="_blank"><img src="https://opencollective.com/debug/backer/17/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/18/website" target="_blank"><img src="https://opencollective.com/debug/backer/18/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/19/website" target="_blank"><img src="https://opencollective.com/debug/backer/19/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/20/website" target="_blank"><img src="https://opencollective.com/debug/backer/20/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/21/website" target="_blank"><img src="https://opencollective.com/debug/backer/21/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/22/website" target="_blank"><img src="https://opencollective.com/debug/backer/22/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/23/website" target="_blank"><img src="https://opencollective.com/debug/backer/23/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/24/website" target="_blank"><img src="https://opencollective.com/debug/backer/24/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/25/website" target="_blank"><img src="https://opencollective.com/debug/backer/25/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/26/website" target="_blank"><img src="https://opencollective.com/debug/backer/26/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/27/website" target="_blank"><img src="https://opencollective.com/debug/backer/27/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/28/website" target="_blank"><img src="https://opencollective.com/debug/backer/28/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/29/website" target="_blank"><img src="https://opencollective.com/debug/backer/29/avatar.svg"></a>
|
||||
|
||||
|
||||
## Sponsors
|
||||
|
||||
Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
|
||||
|
||||
<a href="https://opencollective.com/debug/sponsor/0/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/1/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/1/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/2/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/2/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/3/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/3/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/4/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/4/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/5/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/5/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/6/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/6/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/7/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/7/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/8/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/9/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/9/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/10/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/10/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/11/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/11/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/12/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/12/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/13/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/13/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/14/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/14/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/15/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/15/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/16/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/16/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/17/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/17/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/18/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/18/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/19/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/19/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/20/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/20/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/21/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/21/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/22/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/22/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/23/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/23/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/24/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/24/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/25/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/25/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/26/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/26/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/27/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/27/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/28/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/28/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a>
|
||||
|
||||
## License
|
||||
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
|
||||
Copyright (c) 2018-2021 Josh Junon
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
60
backend/node_modules/agent-base/node_modules/debug/package.json
generated
vendored
60
backend/node_modules/agent-base/node_modules/debug/package.json
generated
vendored
@@ -1,60 +0,0 @@
|
||||
{
|
||||
"name": "debug",
|
||||
"version": "4.3.5",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/debug-js/debug.git"
|
||||
},
|
||||
"description": "Lightweight debugging utility for Node.js and the browser",
|
||||
"keywords": [
|
||||
"debug",
|
||||
"log",
|
||||
"debugger"
|
||||
],
|
||||
"files": [
|
||||
"src",
|
||||
"LICENSE",
|
||||
"README.md"
|
||||
],
|
||||
"author": "Josh Junon (https://github.com/qix-)",
|
||||
"contributors": [
|
||||
"TJ Holowaychuk <tj@vision-media.ca>",
|
||||
"Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
|
||||
"Andrew Rhyne <rhyneandrew@gmail.com>"
|
||||
],
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"lint": "xo",
|
||||
"test": "npm run test:node && npm run test:browser && npm run lint",
|
||||
"test:node": "istanbul cover _mocha -- test.js test.node.js",
|
||||
"test:browser": "karma start --single-run",
|
||||
"test:coverage": "cat ./coverage/lcov.info | coveralls"
|
||||
},
|
||||
"dependencies": {
|
||||
"ms": "2.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"brfs": "^2.0.1",
|
||||
"browserify": "^16.2.3",
|
||||
"coveralls": "^3.0.2",
|
||||
"istanbul": "^0.4.5",
|
||||
"karma": "^3.1.4",
|
||||
"karma-browserify": "^6.0.0",
|
||||
"karma-chrome-launcher": "^2.2.0",
|
||||
"karma-mocha": "^1.3.0",
|
||||
"mocha": "^5.2.0",
|
||||
"mocha-lcov-reporter": "^1.2.0",
|
||||
"sinon": "^14.0.0",
|
||||
"xo": "^0.23.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"supports-color": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"main": "./src/index.js",
|
||||
"browser": "./src/browser.js",
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
}
|
||||
}
|
||||
269
backend/node_modules/agent-base/node_modules/debug/src/browser.js
generated
vendored
269
backend/node_modules/agent-base/node_modules/debug/src/browser.js
generated
vendored
@@ -1,269 +0,0 @@
|
||||
/* eslint-env browser */
|
||||
|
||||
/**
|
||||
* This is the web browser implementation of `debug()`.
|
||||
*/
|
||||
|
||||
exports.formatArgs = formatArgs;
|
||||
exports.save = save;
|
||||
exports.load = load;
|
||||
exports.useColors = useColors;
|
||||
exports.storage = localstorage();
|
||||
exports.destroy = (() => {
|
||||
let warned = false;
|
||||
|
||||
return () => {
|
||||
if (!warned) {
|
||||
warned = true;
|
||||
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
/**
|
||||
* Colors.
|
||||
*/
|
||||
|
||||
exports.colors = [
|
||||
'#0000CC',
|
||||
'#0000FF',
|
||||
'#0033CC',
|
||||
'#0033FF',
|
||||
'#0066CC',
|
||||
'#0066FF',
|
||||
'#0099CC',
|
||||
'#0099FF',
|
||||
'#00CC00',
|
||||
'#00CC33',
|
||||
'#00CC66',
|
||||
'#00CC99',
|
||||
'#00CCCC',
|
||||
'#00CCFF',
|
||||
'#3300CC',
|
||||
'#3300FF',
|
||||
'#3333CC',
|
||||
'#3333FF',
|
||||
'#3366CC',
|
||||
'#3366FF',
|
||||
'#3399CC',
|
||||
'#3399FF',
|
||||
'#33CC00',
|
||||
'#33CC33',
|
||||
'#33CC66',
|
||||
'#33CC99',
|
||||
'#33CCCC',
|
||||
'#33CCFF',
|
||||
'#6600CC',
|
||||
'#6600FF',
|
||||
'#6633CC',
|
||||
'#6633FF',
|
||||
'#66CC00',
|
||||
'#66CC33',
|
||||
'#9900CC',
|
||||
'#9900FF',
|
||||
'#9933CC',
|
||||
'#9933FF',
|
||||
'#99CC00',
|
||||
'#99CC33',
|
||||
'#CC0000',
|
||||
'#CC0033',
|
||||
'#CC0066',
|
||||
'#CC0099',
|
||||
'#CC00CC',
|
||||
'#CC00FF',
|
||||
'#CC3300',
|
||||
'#CC3333',
|
||||
'#CC3366',
|
||||
'#CC3399',
|
||||
'#CC33CC',
|
||||
'#CC33FF',
|
||||
'#CC6600',
|
||||
'#CC6633',
|
||||
'#CC9900',
|
||||
'#CC9933',
|
||||
'#CCCC00',
|
||||
'#CCCC33',
|
||||
'#FF0000',
|
||||
'#FF0033',
|
||||
'#FF0066',
|
||||
'#FF0099',
|
||||
'#FF00CC',
|
||||
'#FF00FF',
|
||||
'#FF3300',
|
||||
'#FF3333',
|
||||
'#FF3366',
|
||||
'#FF3399',
|
||||
'#FF33CC',
|
||||
'#FF33FF',
|
||||
'#FF6600',
|
||||
'#FF6633',
|
||||
'#FF9900',
|
||||
'#FF9933',
|
||||
'#FFCC00',
|
||||
'#FFCC33'
|
||||
];
|
||||
|
||||
/**
|
||||
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
||||
* and the Firebug extension (any Firefox version) are known
|
||||
* to support "%c" CSS customizations.
|
||||
*
|
||||
* TODO: add a `localStorage` variable to explicitly enable/disable colors
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line complexity
|
||||
function useColors() {
|
||||
// NB: In an Electron preload script, document will be defined but not fully
|
||||
// initialized. Since we know we're in Chrome, we'll just detect this case
|
||||
// explicitly
|
||||
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Internet Explorer and Edge do not support colors.
|
||||
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Is webkit? http://stackoverflow.com/a/16459606/376773
|
||||
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
||||
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
|
||||
// Is firebug? http://stackoverflow.com/a/398120/376773
|
||||
(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
|
||||
// Is firefox >= v31?
|
||||
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
||||
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
|
||||
// Double check webkit in userAgent just in case we are in a worker
|
||||
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
|
||||
}
|
||||
|
||||
/**
|
||||
* Colorize log arguments if enabled.
|
||||
*
|
||||
* @api public
|
||||
*/
|
||||
|
||||
function formatArgs(args) {
|
||||
args[0] = (this.useColors ? '%c' : '') +
|
||||
this.namespace +
|
||||
(this.useColors ? ' %c' : ' ') +
|
||||
args[0] +
|
||||
(this.useColors ? '%c ' : ' ') +
|
||||
'+' + module.exports.humanize(this.diff);
|
||||
|
||||
if (!this.useColors) {
|
||||
return;
|
||||
}
|
||||
|
||||
const c = 'color: ' + this.color;
|
||||
args.splice(1, 0, c, 'color: inherit');
|
||||
|
||||
// The final "%c" is somewhat tricky, because there could be other
|
||||
// arguments passed either before or after the %c, so we need to
|
||||
// figure out the correct index to insert the CSS into
|
||||
let index = 0;
|
||||
let lastC = 0;
|
||||
args[0].replace(/%[a-zA-Z%]/g, match => {
|
||||
if (match === '%%') {
|
||||
return;
|
||||
}
|
||||
index++;
|
||||
if (match === '%c') {
|
||||
// We only are interested in the *last* %c
|
||||
// (the user may have provided their own)
|
||||
lastC = index;
|
||||
}
|
||||
});
|
||||
|
||||
args.splice(lastC, 0, c);
|
||||
}
|
||||
|
||||
/**
|
||||
* Invokes `console.debug()` when available.
|
||||
* No-op when `console.debug` is not a "function".
|
||||
* If `console.debug` is not available, falls back
|
||||
* to `console.log`.
|
||||
*
|
||||
* @api public
|
||||
*/
|
||||
exports.log = console.debug || console.log || (() => {});
|
||||
|
||||
/**
|
||||
* Save `namespaces`.
|
||||
*
|
||||
* @param {String} namespaces
|
||||
* @api private
|
||||
*/
|
||||
function save(namespaces) {
|
||||
try {
|
||||
if (namespaces) {
|
||||
exports.storage.setItem('debug', namespaces);
|
||||
} else {
|
||||
exports.storage.removeItem('debug');
|
||||
}
|
||||
} catch (error) {
|
||||
// Swallow
|
||||
// XXX (@Qix-) should we be logging these?
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load `namespaces`.
|
||||
*
|
||||
* @return {String} returns the previously persisted debug modes
|
||||
* @api private
|
||||
*/
|
||||
function load() {
|
||||
let r;
|
||||
try {
|
||||
r = exports.storage.getItem('debug');
|
||||
} catch (error) {
|
||||
// Swallow
|
||||
// XXX (@Qix-) should we be logging these?
|
||||
}
|
||||
|
||||
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
||||
if (!r && typeof process !== 'undefined' && 'env' in process) {
|
||||
r = process.env.DEBUG;
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
* Localstorage attempts to return the localstorage.
|
||||
*
|
||||
* This is necessary because safari throws
|
||||
* when a user disables cookies/localstorage
|
||||
* and you attempt to access it.
|
||||
*
|
||||
* @return {LocalStorage}
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function localstorage() {
|
||||
try {
|
||||
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
|
||||
// The Browser also has localStorage in the global context.
|
||||
return localStorage;
|
||||
} catch (error) {
|
||||
// Swallow
|
||||
// XXX (@Qix-) should we be logging these?
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = require('./common')(exports);
|
||||
|
||||
const {formatters} = module.exports;
|
||||
|
||||
/**
|
||||
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
|
||||
*/
|
||||
|
||||
formatters.j = function (v) {
|
||||
try {
|
||||
return JSON.stringify(v);
|
||||
} catch (error) {
|
||||
return '[UnexpectedJSONParseError]: ' + error.message;
|
||||
}
|
||||
};
|
||||
274
backend/node_modules/agent-base/node_modules/debug/src/common.js
generated
vendored
274
backend/node_modules/agent-base/node_modules/debug/src/common.js
generated
vendored
@@ -1,274 +0,0 @@
|
||||
|
||||
/**
|
||||
* This is the common logic for both the Node.js and web browser
|
||||
* implementations of `debug()`.
|
||||
*/
|
||||
|
||||
function setup(env) {
|
||||
createDebug.debug = createDebug;
|
||||
createDebug.default = createDebug;
|
||||
createDebug.coerce = coerce;
|
||||
createDebug.disable = disable;
|
||||
createDebug.enable = enable;
|
||||
createDebug.enabled = enabled;
|
||||
createDebug.humanize = require('ms');
|
||||
createDebug.destroy = destroy;
|
||||
|
||||
Object.keys(env).forEach(key => {
|
||||
createDebug[key] = env[key];
|
||||
});
|
||||
|
||||
/**
|
||||
* The currently active debug mode names, and names to skip.
|
||||
*/
|
||||
|
||||
createDebug.names = [];
|
||||
createDebug.skips = [];
|
||||
|
||||
/**
|
||||
* Map of special "%n" handling functions, for the debug "format" argument.
|
||||
*
|
||||
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
|
||||
*/
|
||||
createDebug.formatters = {};
|
||||
|
||||
/**
|
||||
* Selects a color for a debug namespace
|
||||
* @param {String} namespace The namespace string for the debug instance to be colored
|
||||
* @return {Number|String} An ANSI color code for the given namespace
|
||||
* @api private
|
||||
*/
|
||||
function selectColor(namespace) {
|
||||
let hash = 0;
|
||||
|
||||
for (let i = 0; i < namespace.length; i++) {
|
||||
hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
|
||||
hash |= 0; // Convert to 32bit integer
|
||||
}
|
||||
|
||||
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
||||
}
|
||||
createDebug.selectColor = selectColor;
|
||||
|
||||
/**
|
||||
* Create a debugger with the given `namespace`.
|
||||
*
|
||||
* @param {String} namespace
|
||||
* @return {Function}
|
||||
* @api public
|
||||
*/
|
||||
function createDebug(namespace) {
|
||||
let prevTime;
|
||||
let enableOverride = null;
|
||||
let namespacesCache;
|
||||
let enabledCache;
|
||||
|
||||
function debug(...args) {
|
||||
// Disabled?
|
||||
if (!debug.enabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
const self = debug;
|
||||
|
||||
// Set `diff` timestamp
|
||||
const curr = Number(new Date());
|
||||
const ms = curr - (prevTime || curr);
|
||||
self.diff = ms;
|
||||
self.prev = prevTime;
|
||||
self.curr = curr;
|
||||
prevTime = curr;
|
||||
|
||||
args[0] = createDebug.coerce(args[0]);
|
||||
|
||||
if (typeof args[0] !== 'string') {
|
||||
// Anything else let's inspect with %O
|
||||
args.unshift('%O');
|
||||
}
|
||||
|
||||
// Apply any `formatters` transformations
|
||||
let index = 0;
|
||||
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
|
||||
// If we encounter an escaped % then don't increase the array index
|
||||
if (match === '%%') {
|
||||
return '%';
|
||||
}
|
||||
index++;
|
||||
const formatter = createDebug.formatters[format];
|
||||
if (typeof formatter === 'function') {
|
||||
const val = args[index];
|
||||
match = formatter.call(self, val);
|
||||
|
||||
// Now we need to remove `args[index]` since it's inlined in the `format`
|
||||
args.splice(index, 1);
|
||||
index--;
|
||||
}
|
||||
return match;
|
||||
});
|
||||
|
||||
// Apply env-specific formatting (colors, etc.)
|
||||
createDebug.formatArgs.call(self, args);
|
||||
|
||||
const logFn = self.log || createDebug.log;
|
||||
logFn.apply(self, args);
|
||||
}
|
||||
|
||||
debug.namespace = namespace;
|
||||
debug.useColors = createDebug.useColors();
|
||||
debug.color = createDebug.selectColor(namespace);
|
||||
debug.extend = extend;
|
||||
debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
|
||||
|
||||
Object.defineProperty(debug, 'enabled', {
|
||||
enumerable: true,
|
||||
configurable: false,
|
||||
get: () => {
|
||||
if (enableOverride !== null) {
|
||||
return enableOverride;
|
||||
}
|
||||
if (namespacesCache !== createDebug.namespaces) {
|
||||
namespacesCache = createDebug.namespaces;
|
||||
enabledCache = createDebug.enabled(namespace);
|
||||
}
|
||||
|
||||
return enabledCache;
|
||||
},
|
||||
set: v => {
|
||||
enableOverride = v;
|
||||
}
|
||||
});
|
||||
|
||||
// Env-specific initialization logic for debug instances
|
||||
if (typeof createDebug.init === 'function') {
|
||||
createDebug.init(debug);
|
||||
}
|
||||
|
||||
return debug;
|
||||
}
|
||||
|
||||
function extend(namespace, delimiter) {
|
||||
const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
||||
newDebug.log = this.log;
|
||||
return newDebug;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables a debug mode by namespaces. This can include modes
|
||||
* separated by a colon and wildcards.
|
||||
*
|
||||
* @param {String} namespaces
|
||||
* @api public
|
||||
*/
|
||||
function enable(namespaces) {
|
||||
createDebug.save(namespaces);
|
||||
createDebug.namespaces = namespaces;
|
||||
|
||||
createDebug.names = [];
|
||||
createDebug.skips = [];
|
||||
|
||||
let i;
|
||||
const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
|
||||
const len = split.length;
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
if (!split[i]) {
|
||||
// ignore empty strings
|
||||
continue;
|
||||
}
|
||||
|
||||
namespaces = split[i].replace(/\*/g, '.*?');
|
||||
|
||||
if (namespaces[0] === '-') {
|
||||
createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
|
||||
} else {
|
||||
createDebug.names.push(new RegExp('^' + namespaces + '$'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable debug output.
|
||||
*
|
||||
* @return {String} namespaces
|
||||
* @api public
|
||||
*/
|
||||
function disable() {
|
||||
const namespaces = [
|
||||
...createDebug.names.map(toNamespace),
|
||||
...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
|
||||
].join(',');
|
||||
createDebug.enable('');
|
||||
return namespaces;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the given mode name is enabled, false otherwise.
|
||||
*
|
||||
* @param {String} name
|
||||
* @return {Boolean}
|
||||
* @api public
|
||||
*/
|
||||
function enabled(name) {
|
||||
if (name[name.length - 1] === '*') {
|
||||
return true;
|
||||
}
|
||||
|
||||
let i;
|
||||
let len;
|
||||
|
||||
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
||||
if (createDebug.skips[i].test(name)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0, len = createDebug.names.length; i < len; i++) {
|
||||
if (createDebug.names[i].test(name)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert regexp to namespace
|
||||
*
|
||||
* @param {RegExp} regxep
|
||||
* @return {String} namespace
|
||||
* @api private
|
||||
*/
|
||||
function toNamespace(regexp) {
|
||||
return regexp.toString()
|
||||
.substring(2, regexp.toString().length - 2)
|
||||
.replace(/\.\*\?$/, '*');
|
||||
}
|
||||
|
||||
/**
|
||||
* Coerce `val`.
|
||||
*
|
||||
* @param {Mixed} val
|
||||
* @return {Mixed}
|
||||
* @api private
|
||||
*/
|
||||
function coerce(val) {
|
||||
if (val instanceof Error) {
|
||||
return val.stack || val.message;
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
/**
|
||||
* XXX DO NOT USE. This is a temporary stub function.
|
||||
* XXX It WILL be removed in the next major release.
|
||||
*/
|
||||
function destroy() {
|
||||
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
||||
}
|
||||
|
||||
createDebug.enable(createDebug.load());
|
||||
|
||||
return createDebug;
|
||||
}
|
||||
|
||||
module.exports = setup;
|
||||
10
backend/node_modules/agent-base/node_modules/debug/src/index.js
generated
vendored
10
backend/node_modules/agent-base/node_modules/debug/src/index.js
generated
vendored
@@ -1,10 +0,0 @@
|
||||
/**
|
||||
* Detect Electron renderer / nwjs process, which is node, but we should
|
||||
* treat as a browser.
|
||||
*/
|
||||
|
||||
if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
|
||||
module.exports = require('./browser.js');
|
||||
} else {
|
||||
module.exports = require('./node.js');
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user