initial commit
This commit is contained in:
117
node_modules/unenv/runtime/node/buffer/_base64.cjs
generated
vendored
Normal file
117
node_modules/unenv/runtime/node/buffer/_base64.cjs
generated
vendored
Normal file
@@ -0,0 +1,117 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.byteLength = byteLength;
|
||||
exports.fromByteArray = fromByteArray;
|
||||
exports.toByteArray = toByteArray;
|
||||
const lookup = [];
|
||||
const revLookup = [];
|
||||
const Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
|
||||
const code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
|
||||
for (let i = 0, len = code.length; i < len; ++i) {
|
||||
lookup[i] = code[i];
|
||||
revLookup[code.charCodeAt(i)] = i;
|
||||
}
|
||||
|
||||
revLookup["-".charCodeAt(0)] = 62;
|
||||
revLookup["_".charCodeAt(0)] = 63;
|
||||
|
||||
function getLens(b64) {
|
||||
const len = b64.length;
|
||||
|
||||
if (len % 4 > 0) {
|
||||
throw new Error("Invalid string. Length must be a multiple of 4");
|
||||
}
|
||||
|
||||
let validLen = b64.indexOf("=");
|
||||
|
||||
if (validLen === -1) {
|
||||
validLen = len;
|
||||
}
|
||||
|
||||
const placeHoldersLen = validLen === len ? 0 : 4 - validLen % 4;
|
||||
return [validLen, placeHoldersLen];
|
||||
}
|
||||
|
||||
function byteLength(b64) {
|
||||
const lens = getLens(b64);
|
||||
const validLen = lens[0];
|
||||
const placeHoldersLen = lens[1];
|
||||
return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
|
||||
}
|
||||
|
||||
function _byteLength(b64, validLen, placeHoldersLen) {
|
||||
return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
|
||||
}
|
||||
|
||||
function toByteArray(b64) {
|
||||
let tmp;
|
||||
const lens = getLens(b64);
|
||||
const validLen = lens[0];
|
||||
const placeHoldersLen = lens[1];
|
||||
const arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));
|
||||
let curByte = 0;
|
||||
const len = placeHoldersLen > 0 ? validLen - 4 : validLen;
|
||||
let i;
|
||||
|
||||
for (i = 0; i < len; i += 4) {
|
||||
tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)];
|
||||
arr[curByte++] = tmp >> 16 & 255;
|
||||
arr[curByte++] = tmp >> 8 & 255;
|
||||
arr[curByte++] = tmp & 255;
|
||||
}
|
||||
|
||||
if (placeHoldersLen === 2) {
|
||||
tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4;
|
||||
arr[curByte++] = tmp & 255;
|
||||
}
|
||||
|
||||
if (placeHoldersLen === 1) {
|
||||
tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2;
|
||||
arr[curByte++] = tmp >> 8 & 255;
|
||||
arr[curByte++] = tmp & 255;
|
||||
}
|
||||
|
||||
return arr;
|
||||
}
|
||||
|
||||
function tripletToBase64(num) {
|
||||
return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];
|
||||
}
|
||||
|
||||
function encodeChunk(uint8, start, end) {
|
||||
let tmp;
|
||||
const output = [];
|
||||
|
||||
for (let i = start; i < end; i += 3) {
|
||||
tmp = (uint8[i] << 16 & 16711680) + (uint8[i + 1] << 8 & 65280) + (uint8[i + 2] & 255);
|
||||
output.push(tripletToBase64(tmp));
|
||||
}
|
||||
|
||||
return output.join("");
|
||||
}
|
||||
|
||||
function fromByteArray(uint8) {
|
||||
let tmp;
|
||||
const len = uint8.length;
|
||||
const extraBytes = len % 3;
|
||||
const parts = [];
|
||||
const maxChunkLength = 16383;
|
||||
|
||||
for (let i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
|
||||
parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));
|
||||
}
|
||||
|
||||
if (extraBytes === 1) {
|
||||
tmp = uint8[len - 1];
|
||||
parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 63] + "==");
|
||||
} else if (extraBytes === 2) {
|
||||
tmp = (uint8[len - 2] << 8) + uint8[len - 1];
|
||||
parts.push(lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + "=");
|
||||
}
|
||||
|
||||
return parts.join("");
|
||||
}
|
||||
3
node_modules/unenv/runtime/node/buffer/_base64.d.ts
generated
vendored
Normal file
3
node_modules/unenv/runtime/node/buffer/_base64.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export declare function byteLength(b64: any): number;
|
||||
export declare function toByteArray(b64: any): any[] | Uint8Array;
|
||||
export declare function fromByteArray(uint8: any): string;
|
||||
91
node_modules/unenv/runtime/node/buffer/_base64.mjs
generated
vendored
Normal file
91
node_modules/unenv/runtime/node/buffer/_base64.mjs
generated
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
const lookup = [];
|
||||
const revLookup = [];
|
||||
const Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
|
||||
const code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
for (let i = 0, len = code.length; i < len; ++i) {
|
||||
lookup[i] = code[i];
|
||||
revLookup[code.charCodeAt(i)] = i;
|
||||
}
|
||||
revLookup["-".charCodeAt(0)] = 62;
|
||||
revLookup["_".charCodeAt(0)] = 63;
|
||||
function getLens(b64) {
|
||||
const len = b64.length;
|
||||
if (len % 4 > 0) {
|
||||
throw new Error("Invalid string. Length must be a multiple of 4");
|
||||
}
|
||||
let validLen = b64.indexOf("=");
|
||||
if (validLen === -1) {
|
||||
validLen = len;
|
||||
}
|
||||
const placeHoldersLen = validLen === len ? 0 : 4 - validLen % 4;
|
||||
return [validLen, placeHoldersLen];
|
||||
}
|
||||
export function byteLength(b64) {
|
||||
const lens = getLens(b64);
|
||||
const validLen = lens[0];
|
||||
const placeHoldersLen = lens[1];
|
||||
return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
|
||||
}
|
||||
function _byteLength(b64, validLen, placeHoldersLen) {
|
||||
return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
|
||||
}
|
||||
export function toByteArray(b64) {
|
||||
let tmp;
|
||||
const lens = getLens(b64);
|
||||
const validLen = lens[0];
|
||||
const placeHoldersLen = lens[1];
|
||||
const arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));
|
||||
let curByte = 0;
|
||||
const len = placeHoldersLen > 0 ? validLen - 4 : validLen;
|
||||
let i;
|
||||
for (i = 0; i < len; i += 4) {
|
||||
tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)];
|
||||
arr[curByte++] = tmp >> 16 & 255;
|
||||
arr[curByte++] = tmp >> 8 & 255;
|
||||
arr[curByte++] = tmp & 255;
|
||||
}
|
||||
if (placeHoldersLen === 2) {
|
||||
tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4;
|
||||
arr[curByte++] = tmp & 255;
|
||||
}
|
||||
if (placeHoldersLen === 1) {
|
||||
tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2;
|
||||
arr[curByte++] = tmp >> 8 & 255;
|
||||
arr[curByte++] = tmp & 255;
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
function tripletToBase64(num) {
|
||||
return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];
|
||||
}
|
||||
function encodeChunk(uint8, start, end) {
|
||||
let tmp;
|
||||
const output = [];
|
||||
for (let i = start; i < end; i += 3) {
|
||||
tmp = (uint8[i] << 16 & 16711680) + (uint8[i + 1] << 8 & 65280) + (uint8[i + 2] & 255);
|
||||
output.push(tripletToBase64(tmp));
|
||||
}
|
||||
return output.join("");
|
||||
}
|
||||
export function fromByteArray(uint8) {
|
||||
let tmp;
|
||||
const len = uint8.length;
|
||||
const extraBytes = len % 3;
|
||||
const parts = [];
|
||||
const maxChunkLength = 16383;
|
||||
for (let i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
|
||||
parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));
|
||||
}
|
||||
if (extraBytes === 1) {
|
||||
tmp = uint8[len - 1];
|
||||
parts.push(
|
||||
lookup[tmp >> 2] + lookup[tmp << 4 & 63] + "=="
|
||||
);
|
||||
} else if (extraBytes === 2) {
|
||||
tmp = (uint8[len - 2] << 8) + uint8[len - 1];
|
||||
parts.push(
|
||||
lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + "="
|
||||
);
|
||||
}
|
||||
return parts.join("");
|
||||
}
|
||||
2249
node_modules/unenv/runtime/node/buffer/_buffer.cjs
generated
vendored
Normal file
2249
node_modules/unenv/runtime/node/buffer/_buffer.cjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
26
node_modules/unenv/runtime/node/buffer/_buffer.d.ts
generated
vendored
Normal file
26
node_modules/unenv/runtime/node/buffer/_buffer.d.ts
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
export declare const INSPECT_MAX_BYTES = 50;
|
||||
export declare const kMaxLength = 2147483647;
|
||||
/**
|
||||
* The Buffer constructor returns instances of `Uint8Array` that have their
|
||||
* prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
|
||||
* `Uint8Array`, so the returned instances will have all the node `Buffer` methods
|
||||
* and the `Uint8Array` methods. Square bracket notation works as expected -- it
|
||||
* returns a single octet.
|
||||
*
|
||||
* The `Uint8Array` prototype remains unmodified.
|
||||
*/
|
||||
export declare function Buffer(arg: any, encodingOrOffset: any, length: any): any;
|
||||
export declare namespace Buffer {
|
||||
var TYPED_ARRAY_SUPPORT: boolean;
|
||||
var poolSize: number;
|
||||
var from: (value: any, encodingOrOffset: any, length: any) => any;
|
||||
var alloc: (size: any, fill: any, encoding: any) => Uint8Array;
|
||||
var allocUnsafe: (size: any) => Uint8Array;
|
||||
var allocUnsafeSlow: (size: any) => Uint8Array;
|
||||
var isBuffer: (b: any) => boolean;
|
||||
var compare: (a: any, b: any) => 0 | 1 | -1;
|
||||
var isEncoding: (encoding: any) => boolean;
|
||||
var concat: (list: any, length: any) => Uint8Array;
|
||||
var byteLength: (string: any, encoding: any) => any;
|
||||
}
|
||||
export declare function SlowBuffer(length: any): Uint8Array;
|
||||
1773
node_modules/unenv/runtime/node/buffer/_buffer.mjs
generated
vendored
Normal file
1773
node_modules/unenv/runtime/node/buffer/_buffer.mjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
111
node_modules/unenv/runtime/node/buffer/_ieee754.cjs
generated
vendored
Normal file
111
node_modules/unenv/runtime/node/buffer/_ieee754.cjs
generated
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.read = read;
|
||||
exports.write = write;
|
||||
|
||||
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||||
function read(buffer, offset, isLE, mLen, nBytes) {
|
||||
let e, m;
|
||||
const eLen = nBytes * 8 - mLen - 1;
|
||||
const eMax = (1 << eLen) - 1;
|
||||
const eBias = eMax >> 1;
|
||||
let nBits = -7;
|
||||
let i = isLE ? nBytes - 1 : 0;
|
||||
const d = isLE ? -1 : 1;
|
||||
let s = buffer[offset + i];
|
||||
i += d;
|
||||
e = s & (1 << -nBits) - 1;
|
||||
s >>= -nBits;
|
||||
nBits += eLen;
|
||||
|
||||
while (nBits > 0) {
|
||||
e = e * 256 + buffer[offset + i];
|
||||
i += d;
|
||||
nBits -= 8;
|
||||
}
|
||||
|
||||
m = e & (1 << -nBits) - 1;
|
||||
e >>= -nBits;
|
||||
nBits += mLen;
|
||||
|
||||
while (nBits > 0) {
|
||||
m = m * 256 + buffer[offset + i];
|
||||
i += d;
|
||||
nBits -= 8;
|
||||
}
|
||||
|
||||
if (e === 0) {
|
||||
e = 1 - eBias;
|
||||
} else if (e === eMax) {
|
||||
return m ? Number.NaN : (s ? -1 : 1) * Number.POSITIVE_INFINITY;
|
||||
} else {
|
||||
m = m + Math.pow(2, mLen);
|
||||
e = e - eBias;
|
||||
}
|
||||
|
||||
return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
|
||||
}
|
||||
|
||||
function write(buffer, value, offset, isLE, mLen, nBytes) {
|
||||
let e, m, c;
|
||||
let eLen = nBytes * 8 - mLen - 1;
|
||||
const eMax = (1 << eLen) - 1;
|
||||
const eBias = eMax >> 1;
|
||||
const rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
|
||||
let i = isLE ? 0 : nBytes - 1;
|
||||
const d = isLE ? 1 : -1;
|
||||
const s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
|
||||
value = Math.abs(value);
|
||||
|
||||
if (Number.isNaN(value) || value === Number.POSITIVE_INFINITY) {
|
||||
m = Number.isNaN(value) ? 1 : 0;
|
||||
e = eMax;
|
||||
} else {
|
||||
e = Math.floor(Math.log2(value));
|
||||
|
||||
if (value * (c = Math.pow(2, -e)) < 1) {
|
||||
e--;
|
||||
c *= 2;
|
||||
}
|
||||
|
||||
value += e + eBias >= 1 ? rt / c : rt * Math.pow(2, 1 - eBias);
|
||||
|
||||
if (value * c >= 2) {
|
||||
e++;
|
||||
c /= 2;
|
||||
}
|
||||
|
||||
if (e + eBias >= eMax) {
|
||||
m = 0;
|
||||
e = eMax;
|
||||
} else if (e + eBias >= 1) {
|
||||
m = (value * c - 1) * Math.pow(2, mLen);
|
||||
e = e + eBias;
|
||||
} else {
|
||||
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
|
||||
e = 0;
|
||||
}
|
||||
}
|
||||
|
||||
while (mLen >= 8) {
|
||||
buffer[offset + i] = m & 255;
|
||||
i += d;
|
||||
m /= 256;
|
||||
mLen -= 8;
|
||||
}
|
||||
|
||||
e = e << mLen | m;
|
||||
eLen += mLen;
|
||||
|
||||
while (eLen > 0) {
|
||||
buffer[offset + i] = e & 255;
|
||||
i += d;
|
||||
e /= 256;
|
||||
eLen -= 8;
|
||||
}
|
||||
|
||||
buffer[offset + i - d] |= s * 128;
|
||||
}
|
||||
3
node_modules/unenv/runtime/node/buffer/_ieee754.d.ts
generated
vendored
Normal file
3
node_modules/unenv/runtime/node/buffer/_ieee754.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||||
export declare function read(buffer: Uint8Array, offset: number, isLE: boolean, mLen: number, nBytes: number): number;
|
||||
export declare function write(buffer: Uint8Array, value: number, offset: number, isLE: boolean, mLen: number, nBytes: number): void;
|
||||
88
node_modules/unenv/runtime/node/buffer/_ieee754.mjs
generated
vendored
Normal file
88
node_modules/unenv/runtime/node/buffer/_ieee754.mjs
generated
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||||
export function read(buffer, offset, isLE, mLen, nBytes) {
|
||||
let e, m;
|
||||
const eLen = nBytes * 8 - mLen - 1;
|
||||
const eMax = (1 << eLen) - 1;
|
||||
const eBias = eMax >> 1;
|
||||
let nBits = -7;
|
||||
let i = isLE ? nBytes - 1 : 0;
|
||||
const d = isLE ? -1 : 1;
|
||||
let s = buffer[offset + i];
|
||||
i += d;
|
||||
e = s & (1 << -nBits) - 1;
|
||||
s >>= -nBits;
|
||||
nBits += eLen;
|
||||
while (nBits > 0) {
|
||||
e = e * 256 + buffer[offset + i];
|
||||
i += d;
|
||||
nBits -= 8;
|
||||
}
|
||||
m = e & (1 << -nBits) - 1;
|
||||
e >>= -nBits;
|
||||
nBits += mLen;
|
||||
while (nBits > 0) {
|
||||
m = m * 256 + buffer[offset + i];
|
||||
i += d;
|
||||
nBits -= 8;
|
||||
}
|
||||
if (e === 0) {
|
||||
e = 1 - eBias;
|
||||
} else if (e === eMax) {
|
||||
return m ? Number.NaN : (s ? -1 : 1) * Number.POSITIVE_INFINITY;
|
||||
} else {
|
||||
m = m + Math.pow(2, mLen);
|
||||
e = e - eBias;
|
||||
}
|
||||
return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
|
||||
}
|
||||
export function write(buffer, value, offset, isLE, mLen, nBytes) {
|
||||
let e, m, c;
|
||||
let eLen = nBytes * 8 - mLen - 1;
|
||||
const eMax = (1 << eLen) - 1;
|
||||
const eBias = eMax >> 1;
|
||||
const rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
|
||||
let i = isLE ? 0 : nBytes - 1;
|
||||
const d = isLE ? 1 : -1;
|
||||
const s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
|
||||
value = Math.abs(value);
|
||||
if (Number.isNaN(value) || value === Number.POSITIVE_INFINITY) {
|
||||
m = Number.isNaN(value) ? 1 : 0;
|
||||
e = eMax;
|
||||
} else {
|
||||
e = Math.floor(Math.log2(value));
|
||||
if (value * (c = Math.pow(2, -e)) < 1) {
|
||||
e--;
|
||||
c *= 2;
|
||||
}
|
||||
value += e + eBias >= 1 ? rt / c : rt * Math.pow(2, 1 - eBias);
|
||||
if (value * c >= 2) {
|
||||
e++;
|
||||
c /= 2;
|
||||
}
|
||||
if (e + eBias >= eMax) {
|
||||
m = 0;
|
||||
e = eMax;
|
||||
} else if (e + eBias >= 1) {
|
||||
m = (value * c - 1) * Math.pow(2, mLen);
|
||||
e = e + eBias;
|
||||
} else {
|
||||
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
|
||||
e = 0;
|
||||
}
|
||||
}
|
||||
while (mLen >= 8) {
|
||||
buffer[offset + i] = m & 255;
|
||||
i += d;
|
||||
m /= 256;
|
||||
mLen -= 8;
|
||||
}
|
||||
e = e << mLen | m;
|
||||
eLen += mLen;
|
||||
while (eLen > 0) {
|
||||
buffer[offset + i] = e & 255;
|
||||
i += d;
|
||||
e /= 256;
|
||||
eLen -= 8;
|
||||
}
|
||||
buffer[offset + i - d] |= s * 128;
|
||||
}
|
||||
68
node_modules/unenv/runtime/node/buffer/index.cjs
generated
vendored
Normal file
68
node_modules/unenv/runtime/node/buffer/index.cjs
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.Blob = void 0;
|
||||
Object.defineProperty(exports, "Buffer", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _buffer.Buffer;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "INSPECT_MAX_BYTES", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _buffer.INSPECT_MAX_BYTES;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "SlowBuffer", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _buffer.SlowBuffer;
|
||||
}
|
||||
});
|
||||
module.exports = exports.constants = exports.btoa = exports.atob = void 0;
|
||||
Object.defineProperty(exports, "kMaxLength", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _buffer.kMaxLength;
|
||||
}
|
||||
});
|
||||
exports.transcode = exports.resolveObjectURL = exports.kStringMaxLength = void 0;
|
||||
|
||||
var _utils = require("../../_internal/utils.cjs");
|
||||
|
||||
var _buffer = require("./_buffer.cjs");
|
||||
|
||||
const Blob = globalThis.Blob;
|
||||
exports.Blob = Blob;
|
||||
const resolveObjectURL = (0, _utils.notImplemented)("buffer.resolveObjectURL");
|
||||
exports.resolveObjectURL = resolveObjectURL;
|
||||
const transcode = (0, _utils.notImplemented)("buffer.transcode");
|
||||
exports.transcode = transcode;
|
||||
const btoa = global.btoa;
|
||||
exports.btoa = btoa;
|
||||
const atob = globalThis.atob;
|
||||
exports.atob = atob;
|
||||
const kStringMaxLength = 0;
|
||||
exports.kStringMaxLength = kStringMaxLength;
|
||||
const constants = {
|
||||
MAX_LENGTH: _buffer.kMaxLength,
|
||||
MAX_STRING_LENGTH: kStringMaxLength
|
||||
};
|
||||
exports.constants = constants;
|
||||
var _default = {
|
||||
Buffer: _buffer.Buffer,
|
||||
SlowBuffer: _buffer.SlowBuffer,
|
||||
kMaxLength: _buffer.kMaxLength,
|
||||
INSPECT_MAX_BYTES: _buffer.INSPECT_MAX_BYTES,
|
||||
Blob,
|
||||
resolveObjectURL,
|
||||
transcode,
|
||||
btoa,
|
||||
atob,
|
||||
kStringMaxLength,
|
||||
constants
|
||||
};
|
||||
module.exports = _default;
|
||||
16
node_modules/unenv/runtime/node/buffer/index.d.ts
generated
vendored
Normal file
16
node_modules/unenv/runtime/node/buffer/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
export { Buffer, kMaxLength, INSPECT_MAX_BYTES, SlowBuffer } from "./_buffer";
|
||||
export declare const Blob: {
|
||||
new (blobParts?: BlobPart[], options?: BlobPropertyBag): Blob;
|
||||
prototype: Blob;
|
||||
};
|
||||
export declare const resolveObjectURL: () => any;
|
||||
export declare const transcode: () => any;
|
||||
export declare const btoa: typeof globalThis.btoa;
|
||||
export declare const atob: typeof globalThis.atob;
|
||||
export declare const kStringMaxLength = 0;
|
||||
export declare const constants: {
|
||||
MAX_LENGTH: number;
|
||||
MAX_STRING_LENGTH: number;
|
||||
};
|
||||
declare const _default: any;
|
||||
export default _default;
|
||||
23
node_modules/unenv/runtime/node/buffer/index.mjs
generated
vendored
Normal file
23
node_modules/unenv/runtime/node/buffer/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import { notImplemented } from "../../_internal/utils.mjs";
|
||||
import { Buffer, kMaxLength, INSPECT_MAX_BYTES, SlowBuffer } from "./_buffer.mjs";
|
||||
export { Buffer, kMaxLength, INSPECT_MAX_BYTES, SlowBuffer } from "./_buffer.mjs";
|
||||
export const Blob = globalThis.Blob;
|
||||
export const resolveObjectURL = notImplemented("buffer.resolveObjectURL");
|
||||
export const transcode = notImplemented("buffer.transcode");
|
||||
export const btoa = global.btoa;
|
||||
export const atob = globalThis.atob;
|
||||
export const kStringMaxLength = 0;
|
||||
export const constants = { MAX_LENGTH: kMaxLength, MAX_STRING_LENGTH: kStringMaxLength };
|
||||
export default {
|
||||
Buffer,
|
||||
SlowBuffer,
|
||||
kMaxLength,
|
||||
INSPECT_MAX_BYTES,
|
||||
Blob,
|
||||
resolveObjectURL,
|
||||
transcode,
|
||||
btoa,
|
||||
atob,
|
||||
kStringMaxLength,
|
||||
constants
|
||||
};
|
||||
496
node_modules/unenv/runtime/node/events/_events.cjs
generated
vendored
Normal file
496
node_modules/unenv/runtime/node/events/_events.cjs
generated
vendored
Normal file
@@ -0,0 +1,496 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.EventEmitter = EventEmitter;
|
||||
exports.once = once;
|
||||
const R = typeof Reflect === "object" ? Reflect : null;
|
||||
const ReflectApply = R && typeof R.apply === "function" ? R.apply : function ReflectApply2(target, receiver, args) {
|
||||
return Function.prototype.apply.call(target, receiver, args);
|
||||
};
|
||||
let ReflectOwnKeys;
|
||||
|
||||
if (R && typeof R.ownKeys === "function") {
|
||||
ReflectOwnKeys = R.ownKeys;
|
||||
} else if (Object.getOwnPropertySymbols) {
|
||||
ReflectOwnKeys = function ReflectOwnKeys2(target) {
|
||||
return [...Object.getOwnPropertyNames(target), ...Object.getOwnPropertySymbols(target)];
|
||||
};
|
||||
} else {
|
||||
ReflectOwnKeys = function ReflectOwnKeys2(target) {
|
||||
return Object.getOwnPropertyNames(target);
|
||||
};
|
||||
}
|
||||
|
||||
function ProcessEmitWarning(warning) {
|
||||
if (console && console.warn) {
|
||||
console.warn(warning);
|
||||
}
|
||||
}
|
||||
|
||||
const NumberIsNaN = Number.isNaN || function NumberIsNaN2(value) {
|
||||
return value !== value;
|
||||
};
|
||||
|
||||
function EventEmitter() {
|
||||
EventEmitter.init.call(this);
|
||||
}
|
||||
|
||||
EventEmitter.EventEmitter = EventEmitter;
|
||||
EventEmitter.prototype._events = void 0;
|
||||
EventEmitter.prototype._eventsCount = 0;
|
||||
EventEmitter.prototype._maxListeners = void 0;
|
||||
let defaultMaxListeners = 10;
|
||||
|
||||
function checkListener(listener) {
|
||||
if (typeof listener !== "function") {
|
||||
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
|
||||
}
|
||||
}
|
||||
|
||||
Object.defineProperty(EventEmitter, "defaultMaxListeners", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return defaultMaxListeners;
|
||||
},
|
||||
set: function (arg) {
|
||||
if (typeof arg !== "number" || arg < 0 || NumberIsNaN(arg)) {
|
||||
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + ".");
|
||||
}
|
||||
|
||||
defaultMaxListeners = arg;
|
||||
}
|
||||
});
|
||||
|
||||
EventEmitter.init = function () {
|
||||
if (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) {
|
||||
this._events = /* @__PURE__ */Object.create(null);
|
||||
this._eventsCount = 0;
|
||||
}
|
||||
|
||||
this._maxListeners = this._maxListeners || void 0;
|
||||
};
|
||||
|
||||
EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
|
||||
if (typeof n !== "number" || n < 0 || NumberIsNaN(n)) {
|
||||
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + ".");
|
||||
}
|
||||
|
||||
this._maxListeners = n;
|
||||
return this;
|
||||
};
|
||||
|
||||
function _getMaxListeners(that) {
|
||||
if (that._maxListeners === void 0) {
|
||||
return EventEmitter.defaultMaxListeners;
|
||||
}
|
||||
|
||||
return that._maxListeners;
|
||||
}
|
||||
|
||||
EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
|
||||
return _getMaxListeners(this);
|
||||
};
|
||||
|
||||
EventEmitter.prototype.emit = function emit(type) {
|
||||
const args = [];
|
||||
|
||||
for (let i = 1; i < arguments.length; i++) {
|
||||
args.push(arguments[i]);
|
||||
}
|
||||
|
||||
let doError = type === "error";
|
||||
const events = this._events;
|
||||
|
||||
if (events !== void 0) {
|
||||
doError = doError && events.error === void 0;
|
||||
} else if (!doError) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (doError) {
|
||||
let er;
|
||||
|
||||
if (args.length > 0) {
|
||||
er = args[0];
|
||||
}
|
||||
|
||||
if (er instanceof Error) {
|
||||
throw er;
|
||||
}
|
||||
|
||||
const err = new Error("Unhandled error." + (er ? " (" + er.message + ")" : ""));
|
||||
err.context = er;
|
||||
throw err;
|
||||
}
|
||||
|
||||
const handler = events[type];
|
||||
|
||||
if (handler === void 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (typeof handler === "function") {
|
||||
ReflectApply(handler, this, args);
|
||||
} else {
|
||||
const len = handler.length;
|
||||
const listeners2 = arrayClone(handler, len);
|
||||
|
||||
for (let i = 0; i < len; ++i) {
|
||||
ReflectApply(listeners2[i], this, args);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
function _addListener(target, type, listener, prepend) {
|
||||
let m;
|
||||
let events;
|
||||
let existing;
|
||||
checkListener(listener);
|
||||
events = target._events;
|
||||
|
||||
if (events === void 0) {
|
||||
events = target._events = /* @__PURE__ */Object.create(null);
|
||||
target._eventsCount = 0;
|
||||
} else {
|
||||
if (events.newListener !== void 0) {
|
||||
target.emit("newListener", type, listener.listener ? listener.listener : listener);
|
||||
events = target._events;
|
||||
}
|
||||
|
||||
existing = events[type];
|
||||
}
|
||||
|
||||
if (existing === void 0) {
|
||||
existing = events[type] = listener;
|
||||
++target._eventsCount;
|
||||
} else {
|
||||
if (typeof existing === "function") {
|
||||
existing = events[type] = prepend ? [listener, existing] : [existing, listener];
|
||||
} else if (prepend) {
|
||||
existing.unshift(listener);
|
||||
} else {
|
||||
existing.push(listener);
|
||||
}
|
||||
|
||||
m = _getMaxListeners(target);
|
||||
|
||||
if (m > 0 && existing.length > m && !existing.warned) {
|
||||
existing.warned = true;
|
||||
const w = new Error("Possible EventEmitter memory leak detected. " + existing.length + " " + String(type) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
||||
w.name = "MaxListenersExceededWarning";
|
||||
w.emitter = target;
|
||||
w.type = type;
|
||||
w.count = existing.length;
|
||||
ProcessEmitWarning(w);
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
EventEmitter.prototype.addListener = function addListener(type, listener) {
|
||||
return _addListener(this, type, listener, false);
|
||||
};
|
||||
|
||||
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
|
||||
|
||||
EventEmitter.prototype.prependListener = function prependListener(type, listener) {
|
||||
return _addListener(this, type, listener, true);
|
||||
};
|
||||
|
||||
function onceWrapper() {
|
||||
if (!this.fired) {
|
||||
this.target.removeListener(this.type, this.wrapFn);
|
||||
this.fired = true;
|
||||
|
||||
if (arguments.length === 0) {
|
||||
return this.listener.call(this.target);
|
||||
}
|
||||
|
||||
return this.listener.apply(this.target, arguments);
|
||||
}
|
||||
}
|
||||
|
||||
function _onceWrap(target, type, listener) {
|
||||
const state = {
|
||||
fired: false,
|
||||
wrapFn: void 0,
|
||||
target,
|
||||
type,
|
||||
listener
|
||||
};
|
||||
const wrapped = onceWrapper.bind(state);
|
||||
wrapped.listener = listener;
|
||||
state.wrapFn = wrapped;
|
||||
return wrapped;
|
||||
}
|
||||
|
||||
EventEmitter.prototype.once = function once2(type, listener) {
|
||||
checkListener(listener);
|
||||
this.on(type, _onceWrap(this, type, listener));
|
||||
return this;
|
||||
};
|
||||
|
||||
EventEmitter.prototype.prependOnceListener = function prependOnceListener(type, listener) {
|
||||
checkListener(listener);
|
||||
this.prependListener(type, _onceWrap(this, type, listener));
|
||||
return this;
|
||||
};
|
||||
|
||||
EventEmitter.prototype.removeListener = function removeListener(type, listener) {
|
||||
let position, i, originalListener;
|
||||
checkListener(listener);
|
||||
const events = this._events;
|
||||
|
||||
if (events === void 0) {
|
||||
return this;
|
||||
}
|
||||
|
||||
const list = events[type];
|
||||
|
||||
if (list === void 0) {
|
||||
return this;
|
||||
}
|
||||
|
||||
if (list === listener || list.listener === listener) {
|
||||
if (--this._eventsCount === 0) {
|
||||
this._events = /* @__PURE__ */Object.create(null);
|
||||
} else {
|
||||
delete events[type];
|
||||
|
||||
if (events.removeListener) {
|
||||
this.emit("removeListener", type, list.listener || listener);
|
||||
}
|
||||
}
|
||||
} else if (typeof list !== "function") {
|
||||
position = -1;
|
||||
|
||||
for (i = list.length - 1; i >= 0; i--) {
|
||||
if (list[i] === listener || list[i].listener === listener) {
|
||||
originalListener = list[i].listener;
|
||||
position = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (position < 0) {
|
||||
return this;
|
||||
}
|
||||
|
||||
if (position === 0) {
|
||||
list.shift();
|
||||
} else {
|
||||
spliceOne(list, position);
|
||||
}
|
||||
|
||||
if (list.length === 1) {
|
||||
events[type] = list[0];
|
||||
}
|
||||
|
||||
if (events.removeListener !== void 0) {
|
||||
this.emit("removeListener", type, originalListener || listener);
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
|
||||
|
||||
EventEmitter.prototype.removeAllListeners = function removeAllListeners(type) {
|
||||
let i;
|
||||
const events = this._events;
|
||||
|
||||
if (events === void 0) {
|
||||
return this;
|
||||
}
|
||||
|
||||
if (events.removeListener === void 0) {
|
||||
if (arguments.length === 0) {
|
||||
this._events = /* @__PURE__ */Object.create(null);
|
||||
this._eventsCount = 0;
|
||||
} else if (events[type] !== void 0) {
|
||||
if (--this._eventsCount === 0) {
|
||||
this._events = /* @__PURE__ */Object.create(null);
|
||||
} else {
|
||||
delete events[type];
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
if (arguments.length === 0) {
|
||||
const keys = Object.keys(events);
|
||||
let key;
|
||||
|
||||
for (i = 0; i < keys.length; ++i) {
|
||||
key = keys[i];
|
||||
|
||||
if (key === "removeListener") {
|
||||
continue;
|
||||
}
|
||||
|
||||
this.removeAllListeners(key);
|
||||
}
|
||||
|
||||
this.removeAllListeners("removeListener");
|
||||
this._events = /* @__PURE__ */Object.create(null);
|
||||
this._eventsCount = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
const listeners2 = events[type];
|
||||
|
||||
if (typeof listeners2 === "function") {
|
||||
this.removeListener(type, listeners2);
|
||||
} else if (listeners2 !== void 0) {
|
||||
for (i = listeners2.length - 1; i >= 0; i--) {
|
||||
this.removeListener(type, listeners2[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
function _listeners(target, type, unwrap) {
|
||||
const events = target._events;
|
||||
|
||||
if (events === void 0) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const evlistener = events[type];
|
||||
|
||||
if (evlistener === void 0) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (typeof evlistener === "function") {
|
||||
return unwrap ? [evlistener.listener || evlistener] : [evlistener];
|
||||
}
|
||||
|
||||
return unwrap ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
|
||||
}
|
||||
|
||||
EventEmitter.prototype.listeners = function listeners(type) {
|
||||
return _listeners(this, type, true);
|
||||
};
|
||||
|
||||
EventEmitter.prototype.rawListeners = function rawListeners(type) {
|
||||
return _listeners(this, type, false);
|
||||
};
|
||||
|
||||
EventEmitter.listenerCount = function (emitter, type) {
|
||||
return typeof emitter.listenerCount === "function" ? emitter.listenerCount(type) : listenerCount.call(emitter, type);
|
||||
};
|
||||
|
||||
EventEmitter.prototype.listenerCount = listenerCount;
|
||||
|
||||
function listenerCount(type) {
|
||||
const events = this._events;
|
||||
|
||||
if (events !== void 0) {
|
||||
const evlistener = events[type];
|
||||
|
||||
if (typeof evlistener === "function") {
|
||||
return 1;
|
||||
} else if (evlistener !== void 0) {
|
||||
return evlistener.length;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
EventEmitter.prototype.eventNames = function eventNames() {
|
||||
return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
|
||||
};
|
||||
|
||||
function arrayClone(arr, n) {
|
||||
const copy = new Array(n);
|
||||
|
||||
for (let i = 0; i < n; ++i) {
|
||||
copy[i] = arr[i];
|
||||
}
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
||||
function spliceOne(list, index) {
|
||||
for (; index + 1 < list.length; index++) {
|
||||
list[index] = list[index + 1];
|
||||
}
|
||||
|
||||
list.pop();
|
||||
}
|
||||
|
||||
function unwrapListeners(arr) {
|
||||
const ret = Array.from({
|
||||
length: arr.length
|
||||
});
|
||||
|
||||
for (let i = 0; i < ret.length; ++i) {
|
||||
ret[i] = arr[i].listener || arr[i];
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
function once(emitter, name) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
function errorListener(err) {
|
||||
emitter.removeListener(name, resolver);
|
||||
reject(err);
|
||||
}
|
||||
|
||||
function resolver() {
|
||||
if (typeof emitter.removeListener === "function") {
|
||||
emitter.removeListener("error", errorListener);
|
||||
}
|
||||
|
||||
resolve(Array.prototype.slice.call(arguments));
|
||||
}
|
||||
|
||||
;
|
||||
eventTargetAgnosticAddListener(emitter, name, resolver, {
|
||||
once: true
|
||||
});
|
||||
|
||||
if (name !== "error") {
|
||||
addErrorHandlerIfEventEmitter(emitter, errorListener, {
|
||||
once: true
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
|
||||
if (typeof emitter.on === "function") {
|
||||
eventTargetAgnosticAddListener(emitter, "error", handler, flags);
|
||||
}
|
||||
}
|
||||
|
||||
function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
|
||||
if (typeof emitter.on === "function") {
|
||||
if (flags.once) {
|
||||
emitter.once(name, listener);
|
||||
} else {
|
||||
emitter.on(name, listener);
|
||||
}
|
||||
} else if (typeof emitter.addEventListener === "function") {
|
||||
emitter.addEventListener(name, function wrapListener(arg) {
|
||||
if (flags.once) {
|
||||
emitter.removeEventListener(name, wrapListener);
|
||||
}
|
||||
|
||||
listener(arg);
|
||||
});
|
||||
} else {
|
||||
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
|
||||
}
|
||||
}
|
||||
7
node_modules/unenv/runtime/node/events/_events.d.ts
generated
vendored
Normal file
7
node_modules/unenv/runtime/node/events/_events.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
export declare function EventEmitter(): void;
|
||||
export declare namespace EventEmitter {
|
||||
var EventEmitter: typeof import("./_events").EventEmitter;
|
||||
var init: () => void;
|
||||
var listenerCount: (emitter: any, type: any) => any;
|
||||
}
|
||||
export declare function once(emitter: any, name: any): Promise<unknown>;
|
||||
380
node_modules/unenv/runtime/node/events/_events.mjs
generated
vendored
Normal file
380
node_modules/unenv/runtime/node/events/_events.mjs
generated
vendored
Normal file
@@ -0,0 +1,380 @@
|
||||
const R = typeof Reflect === "object" ? Reflect : null;
|
||||
const ReflectApply = R && typeof R.apply === "function" ? R.apply : function ReflectApply2(target, receiver, args) {
|
||||
return Function.prototype.apply.call(target, receiver, args);
|
||||
};
|
||||
let ReflectOwnKeys;
|
||||
if (R && typeof R.ownKeys === "function") {
|
||||
ReflectOwnKeys = R.ownKeys;
|
||||
} else if (Object.getOwnPropertySymbols) {
|
||||
ReflectOwnKeys = function ReflectOwnKeys2(target) {
|
||||
return [
|
||||
...Object.getOwnPropertyNames(target),
|
||||
...Object.getOwnPropertySymbols(target)
|
||||
];
|
||||
};
|
||||
} else {
|
||||
ReflectOwnKeys = function ReflectOwnKeys2(target) {
|
||||
return Object.getOwnPropertyNames(target);
|
||||
};
|
||||
}
|
||||
function ProcessEmitWarning(warning) {
|
||||
if (console && console.warn) {
|
||||
console.warn(warning);
|
||||
}
|
||||
}
|
||||
const NumberIsNaN = Number.isNaN || function NumberIsNaN2(value) {
|
||||
return value !== value;
|
||||
};
|
||||
export function EventEmitter() {
|
||||
EventEmitter.init.call(this);
|
||||
}
|
||||
EventEmitter.EventEmitter = EventEmitter;
|
||||
EventEmitter.prototype._events = void 0;
|
||||
EventEmitter.prototype._eventsCount = 0;
|
||||
EventEmitter.prototype._maxListeners = void 0;
|
||||
let defaultMaxListeners = 10;
|
||||
function checkListener(listener) {
|
||||
if (typeof listener !== "function") {
|
||||
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
|
||||
}
|
||||
}
|
||||
Object.defineProperty(EventEmitter, "defaultMaxListeners", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return defaultMaxListeners;
|
||||
},
|
||||
set: function(arg) {
|
||||
if (typeof arg !== "number" || arg < 0 || NumberIsNaN(arg)) {
|
||||
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + ".");
|
||||
}
|
||||
defaultMaxListeners = arg;
|
||||
}
|
||||
});
|
||||
EventEmitter.init = function() {
|
||||
if (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) {
|
||||
this._events = /* @__PURE__ */ Object.create(null);
|
||||
this._eventsCount = 0;
|
||||
}
|
||||
this._maxListeners = this._maxListeners || void 0;
|
||||
};
|
||||
EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
|
||||
if (typeof n !== "number" || n < 0 || NumberIsNaN(n)) {
|
||||
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + ".");
|
||||
}
|
||||
this._maxListeners = n;
|
||||
return this;
|
||||
};
|
||||
function _getMaxListeners(that) {
|
||||
if (that._maxListeners === void 0) {
|
||||
return EventEmitter.defaultMaxListeners;
|
||||
}
|
||||
return that._maxListeners;
|
||||
}
|
||||
EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
|
||||
return _getMaxListeners(this);
|
||||
};
|
||||
EventEmitter.prototype.emit = function emit(type) {
|
||||
const args = [];
|
||||
for (let i = 1; i < arguments.length; i++) {
|
||||
args.push(arguments[i]);
|
||||
}
|
||||
let doError = type === "error";
|
||||
const events = this._events;
|
||||
if (events !== void 0) {
|
||||
doError = doError && events.error === void 0;
|
||||
} else if (!doError) {
|
||||
return false;
|
||||
}
|
||||
if (doError) {
|
||||
let er;
|
||||
if (args.length > 0) {
|
||||
er = args[0];
|
||||
}
|
||||
if (er instanceof Error) {
|
||||
throw er;
|
||||
}
|
||||
const err = new Error("Unhandled error." + (er ? " (" + er.message + ")" : ""));
|
||||
err.context = er;
|
||||
throw err;
|
||||
}
|
||||
const handler = events[type];
|
||||
if (handler === void 0) {
|
||||
return false;
|
||||
}
|
||||
if (typeof handler === "function") {
|
||||
ReflectApply(handler, this, args);
|
||||
} else {
|
||||
const len = handler.length;
|
||||
const listeners2 = arrayClone(handler, len);
|
||||
for (let i = 0; i < len; ++i) {
|
||||
ReflectApply(listeners2[i], this, args);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
function _addListener(target, type, listener, prepend) {
|
||||
let m;
|
||||
let events;
|
||||
let existing;
|
||||
checkListener(listener);
|
||||
events = target._events;
|
||||
if (events === void 0) {
|
||||
events = target._events = /* @__PURE__ */ Object.create(null);
|
||||
target._eventsCount = 0;
|
||||
} else {
|
||||
if (events.newListener !== void 0) {
|
||||
target.emit("newListener", type, listener.listener ? listener.listener : listener);
|
||||
events = target._events;
|
||||
}
|
||||
existing = events[type];
|
||||
}
|
||||
if (existing === void 0) {
|
||||
existing = events[type] = listener;
|
||||
++target._eventsCount;
|
||||
} else {
|
||||
if (typeof existing === "function") {
|
||||
existing = events[type] = prepend ? [listener, existing] : [existing, listener];
|
||||
} else if (prepend) {
|
||||
existing.unshift(listener);
|
||||
} else {
|
||||
existing.push(listener);
|
||||
}
|
||||
m = _getMaxListeners(target);
|
||||
if (m > 0 && existing.length > m && !existing.warned) {
|
||||
existing.warned = true;
|
||||
const w = new Error("Possible EventEmitter memory leak detected. " + existing.length + " " + String(type) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
||||
w.name = "MaxListenersExceededWarning";
|
||||
w.emitter = target;
|
||||
w.type = type;
|
||||
w.count = existing.length;
|
||||
ProcessEmitWarning(w);
|
||||
}
|
||||
}
|
||||
return target;
|
||||
}
|
||||
EventEmitter.prototype.addListener = function addListener(type, listener) {
|
||||
return _addListener(this, type, listener, false);
|
||||
};
|
||||
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
|
||||
EventEmitter.prototype.prependListener = function prependListener(type, listener) {
|
||||
return _addListener(this, type, listener, true);
|
||||
};
|
||||
function onceWrapper() {
|
||||
if (!this.fired) {
|
||||
this.target.removeListener(this.type, this.wrapFn);
|
||||
this.fired = true;
|
||||
if (arguments.length === 0) {
|
||||
return this.listener.call(this.target);
|
||||
}
|
||||
return this.listener.apply(this.target, arguments);
|
||||
}
|
||||
}
|
||||
function _onceWrap(target, type, listener) {
|
||||
const state = { fired: false, wrapFn: void 0, target, type, listener };
|
||||
const wrapped = onceWrapper.bind(state);
|
||||
wrapped.listener = listener;
|
||||
state.wrapFn = wrapped;
|
||||
return wrapped;
|
||||
}
|
||||
EventEmitter.prototype.once = function once2(type, listener) {
|
||||
checkListener(listener);
|
||||
this.on(type, _onceWrap(this, type, listener));
|
||||
return this;
|
||||
};
|
||||
EventEmitter.prototype.prependOnceListener = function prependOnceListener(type, listener) {
|
||||
checkListener(listener);
|
||||
this.prependListener(type, _onceWrap(this, type, listener));
|
||||
return this;
|
||||
};
|
||||
EventEmitter.prototype.removeListener = function removeListener(type, listener) {
|
||||
let position, i, originalListener;
|
||||
checkListener(listener);
|
||||
const events = this._events;
|
||||
if (events === void 0) {
|
||||
return this;
|
||||
}
|
||||
const list = events[type];
|
||||
if (list === void 0) {
|
||||
return this;
|
||||
}
|
||||
if (list === listener || list.listener === listener) {
|
||||
if (--this._eventsCount === 0) {
|
||||
this._events = /* @__PURE__ */ Object.create(null);
|
||||
} else {
|
||||
delete events[type];
|
||||
if (events.removeListener) {
|
||||
this.emit("removeListener", type, list.listener || listener);
|
||||
}
|
||||
}
|
||||
} else if (typeof list !== "function") {
|
||||
position = -1;
|
||||
for (i = list.length - 1; i >= 0; i--) {
|
||||
if (list[i] === listener || list[i].listener === listener) {
|
||||
originalListener = list[i].listener;
|
||||
position = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (position < 0) {
|
||||
return this;
|
||||
}
|
||||
if (position === 0) {
|
||||
list.shift();
|
||||
} else {
|
||||
spliceOne(list, position);
|
||||
}
|
||||
if (list.length === 1) {
|
||||
events[type] = list[0];
|
||||
}
|
||||
if (events.removeListener !== void 0) {
|
||||
this.emit("removeListener", type, originalListener || listener);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
};
|
||||
EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
|
||||
EventEmitter.prototype.removeAllListeners = function removeAllListeners(type) {
|
||||
let i;
|
||||
const events = this._events;
|
||||
if (events === void 0) {
|
||||
return this;
|
||||
}
|
||||
if (events.removeListener === void 0) {
|
||||
if (arguments.length === 0) {
|
||||
this._events = /* @__PURE__ */ Object.create(null);
|
||||
this._eventsCount = 0;
|
||||
} else if (events[type] !== void 0) {
|
||||
if (--this._eventsCount === 0) {
|
||||
this._events = /* @__PURE__ */ Object.create(null);
|
||||
} else {
|
||||
delete events[type];
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
if (arguments.length === 0) {
|
||||
const keys = Object.keys(events);
|
||||
let key;
|
||||
for (i = 0; i < keys.length; ++i) {
|
||||
key = keys[i];
|
||||
if (key === "removeListener") {
|
||||
continue;
|
||||
}
|
||||
this.removeAllListeners(key);
|
||||
}
|
||||
this.removeAllListeners("removeListener");
|
||||
this._events = /* @__PURE__ */ Object.create(null);
|
||||
this._eventsCount = 0;
|
||||
return this;
|
||||
}
|
||||
const listeners2 = events[type];
|
||||
if (typeof listeners2 === "function") {
|
||||
this.removeListener(type, listeners2);
|
||||
} else if (listeners2 !== void 0) {
|
||||
for (i = listeners2.length - 1; i >= 0; i--) {
|
||||
this.removeListener(type, listeners2[i]);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
};
|
||||
function _listeners(target, type, unwrap) {
|
||||
const events = target._events;
|
||||
if (events === void 0) {
|
||||
return [];
|
||||
}
|
||||
const evlistener = events[type];
|
||||
if (evlistener === void 0) {
|
||||
return [];
|
||||
}
|
||||
if (typeof evlistener === "function") {
|
||||
return unwrap ? [evlistener.listener || evlistener] : [evlistener];
|
||||
}
|
||||
return unwrap ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
|
||||
}
|
||||
EventEmitter.prototype.listeners = function listeners(type) {
|
||||
return _listeners(this, type, true);
|
||||
};
|
||||
EventEmitter.prototype.rawListeners = function rawListeners(type) {
|
||||
return _listeners(this, type, false);
|
||||
};
|
||||
EventEmitter.listenerCount = function(emitter, type) {
|
||||
return typeof emitter.listenerCount === "function" ? emitter.listenerCount(type) : listenerCount.call(emitter, type);
|
||||
};
|
||||
EventEmitter.prototype.listenerCount = listenerCount;
|
||||
function listenerCount(type) {
|
||||
const events = this._events;
|
||||
if (events !== void 0) {
|
||||
const evlistener = events[type];
|
||||
if (typeof evlistener === "function") {
|
||||
return 1;
|
||||
} else if (evlistener !== void 0) {
|
||||
return evlistener.length;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
EventEmitter.prototype.eventNames = function eventNames() {
|
||||
return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
|
||||
};
|
||||
function arrayClone(arr, n) {
|
||||
const copy = new Array(n);
|
||||
for (let i = 0; i < n; ++i) {
|
||||
copy[i] = arr[i];
|
||||
}
|
||||
return copy;
|
||||
}
|
||||
function spliceOne(list, index) {
|
||||
for (; index + 1 < list.length; index++) {
|
||||
list[index] = list[index + 1];
|
||||
}
|
||||
list.pop();
|
||||
}
|
||||
function unwrapListeners(arr) {
|
||||
const ret = Array.from({ length: arr.length });
|
||||
for (let i = 0; i < ret.length; ++i) {
|
||||
ret[i] = arr[i].listener || arr[i];
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
export function once(emitter, name) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
function errorListener(err) {
|
||||
emitter.removeListener(name, resolver);
|
||||
reject(err);
|
||||
}
|
||||
function resolver() {
|
||||
if (typeof emitter.removeListener === "function") {
|
||||
emitter.removeListener("error", errorListener);
|
||||
}
|
||||
resolve(Array.prototype.slice.call(arguments));
|
||||
}
|
||||
;
|
||||
eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });
|
||||
if (name !== "error") {
|
||||
addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
|
||||
if (typeof emitter.on === "function") {
|
||||
eventTargetAgnosticAddListener(emitter, "error", handler, flags);
|
||||
}
|
||||
}
|
||||
function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
|
||||
if (typeof emitter.on === "function") {
|
||||
if (flags.once) {
|
||||
emitter.once(name, listener);
|
||||
} else {
|
||||
emitter.on(name, listener);
|
||||
}
|
||||
} else if (typeof emitter.addEventListener === "function") {
|
||||
emitter.addEventListener(name, function wrapListener(arg) {
|
||||
if (flags.once) {
|
||||
emitter.removeEventListener(name, wrapListener);
|
||||
}
|
||||
listener(arg);
|
||||
});
|
||||
} else {
|
||||
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
|
||||
}
|
||||
}
|
||||
15
node_modules/unenv/runtime/node/events/index.cjs
generated
vendored
Normal file
15
node_modules/unenv/runtime/node/events/index.cjs
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
module.exports = exports.EventEmitter = void 0;
|
||||
|
||||
var _events = require("./_events.cjs");
|
||||
|
||||
const EventEmitter = _events.EventEmitter;
|
||||
exports.EventEmitter = EventEmitter;
|
||||
var _default = {
|
||||
EventEmitter
|
||||
};
|
||||
module.exports = _default;
|
||||
3
node_modules/unenv/runtime/node/events/index.d.ts
generated
vendored
Normal file
3
node_modules/unenv/runtime/node/events/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export declare const EventEmitter: any;
|
||||
declare const _default: any;
|
||||
export default _default;
|
||||
5
node_modules/unenv/runtime/node/events/index.mjs
generated
vendored
Normal file
5
node_modules/unenv/runtime/node/events/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { EventEmitter as _EventEmitter } from "./_events.mjs";
|
||||
export const EventEmitter = _EventEmitter;
|
||||
export default {
|
||||
EventEmitter
|
||||
};
|
||||
38
node_modules/unenv/runtime/node/fs/_classes.cjs
generated
vendored
Normal file
38
node_modules/unenv/runtime/node/fs/_classes.cjs
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.WriteStream = exports.Stats = exports.ReadStream = exports.FileWriteStream = exports.FileReadStream = exports.Dirent = exports.Dir = void 0;
|
||||
|
||||
var _proxy = _interopRequireDefault(require("../../mock/proxy.cjs"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
const Dir = _proxy.default.__createMock__("fs.Dir");
|
||||
|
||||
exports.Dir = Dir;
|
||||
|
||||
const Dirent = _proxy.default.__createMock__("fs.Dirent");
|
||||
|
||||
exports.Dirent = Dirent;
|
||||
|
||||
const Stats = _proxy.default.__createMock__("fs.Stats");
|
||||
|
||||
exports.Stats = Stats;
|
||||
|
||||
const ReadStream = _proxy.default.__createMock__("fs.ReadStream");
|
||||
|
||||
exports.ReadStream = ReadStream;
|
||||
|
||||
const WriteStream = _proxy.default.__createMock__("fs.WriteStream");
|
||||
|
||||
exports.WriteStream = WriteStream;
|
||||
|
||||
const FileReadStream = _proxy.default.__createMock__("fs.FileReadStream");
|
||||
|
||||
exports.FileReadStream = FileReadStream;
|
||||
|
||||
const FileWriteStream = _proxy.default.__createMock__("fs.FileWriteStream");
|
||||
|
||||
exports.FileWriteStream = FileWriteStream;
|
||||
8
node_modules/unenv/runtime/node/fs/_classes.d.ts
generated
vendored
Normal file
8
node_modules/unenv/runtime/node/fs/_classes.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import type fs from "node:fs";
|
||||
export declare const Dir: typeof fs.Dir;
|
||||
export declare const Dirent: typeof fs.Dirent;
|
||||
export declare const Stats: typeof fs.Stats;
|
||||
export declare const ReadStream: typeof fs.ReadStream;
|
||||
export declare const WriteStream: typeof fs.WriteStream;
|
||||
export declare const FileReadStream: any;
|
||||
export declare const FileWriteStream: any;
|
||||
8
node_modules/unenv/runtime/node/fs/_classes.mjs
generated
vendored
Normal file
8
node_modules/unenv/runtime/node/fs/_classes.mjs
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import mock from "../../mock/proxy.mjs";
|
||||
export const Dir = mock.__createMock__("fs.Dir");
|
||||
export const Dirent = mock.__createMock__("fs.Dirent");
|
||||
export const Stats = mock.__createMock__("fs.Stats");
|
||||
export const ReadStream = mock.__createMock__("fs.ReadStream");
|
||||
export const WriteStream = mock.__createMock__("fs.WriteStream");
|
||||
export const FileReadStream = mock.__createMock__("fs.FileReadStream");
|
||||
export const FileWriteStream = mock.__createMock__("fs.FileWriteStream");
|
||||
73
node_modules/unenv/runtime/node/fs/_constants.cjs
generated
vendored
Normal file
73
node_modules/unenv/runtime/node/fs/_constants.cjs
generated
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.constants = exports.X_OK = exports.W_OK = exports.R_OK = exports.F_OK = void 0;
|
||||
const F_OK = 0;
|
||||
exports.F_OK = F_OK;
|
||||
const R_OK = 4;
|
||||
exports.R_OK = R_OK;
|
||||
const W_OK = 2;
|
||||
exports.W_OK = W_OK;
|
||||
const X_OK = 1;
|
||||
exports.X_OK = X_OK;
|
||||
const constants = /* @__PURE__ */Object.create({
|
||||
UV_FS_SYMLINK_DIR: 1,
|
||||
UV_FS_SYMLINK_JUNCTION: 2,
|
||||
O_RDONLY: 0,
|
||||
O_WRONLY: 1,
|
||||
O_RDWR: 2,
|
||||
UV_DIRENT_UNKNOWN: 0,
|
||||
UV_DIRENT_FILE: 1,
|
||||
UV_DIRENT_DIR: 2,
|
||||
UV_DIRENT_LINK: 3,
|
||||
UV_DIRENT_FIFO: 4,
|
||||
UV_DIRENT_SOCKET: 5,
|
||||
UV_DIRENT_CHAR: 6,
|
||||
UV_DIRENT_BLOCK: 7,
|
||||
S_IFMT: 61440,
|
||||
S_IFREG: 32768,
|
||||
S_IFDIR: 16384,
|
||||
S_IFCHR: 8192,
|
||||
S_IFBLK: 24576,
|
||||
S_IFIFO: 4096,
|
||||
S_IFLNK: 40960,
|
||||
S_IFSOCK: 49152,
|
||||
O_CREAT: 64,
|
||||
O_EXCL: 128,
|
||||
UV_FS_O_FILEMAP: 0,
|
||||
O_NOCTTY: 256,
|
||||
O_TRUNC: 512,
|
||||
O_APPEND: 1024,
|
||||
O_DIRECTORY: 65536,
|
||||
O_NOATIME: 262144,
|
||||
O_NOFOLLOW: 131072,
|
||||
O_SYNC: 1052672,
|
||||
O_DSYNC: 4096,
|
||||
O_DIRECT: 16384,
|
||||
O_NONBLOCK: 2048,
|
||||
S_IRWXU: 448,
|
||||
S_IRUSR: 256,
|
||||
S_IWUSR: 128,
|
||||
S_IXUSR: 64,
|
||||
S_IRWXG: 56,
|
||||
S_IRGRP: 32,
|
||||
S_IWGRP: 16,
|
||||
S_IXGRP: 8,
|
||||
S_IRWXO: 7,
|
||||
S_IROTH: 4,
|
||||
S_IWOTH: 2,
|
||||
S_IXOTH: 1,
|
||||
F_OK: 0,
|
||||
R_OK: 4,
|
||||
W_OK: 2,
|
||||
X_OK: 1,
|
||||
UV_FS_COPYFILE_EXCL: 1,
|
||||
COPYFILE_EXCL: 1,
|
||||
UV_FS_COPYFILE_FICLONE: 2,
|
||||
COPYFILE_FICLONE: 2,
|
||||
UV_FS_COPYFILE_FICLONE_FORCE: 4,
|
||||
COPYFILE_FICLONE_FORCE: 4
|
||||
});
|
||||
exports.constants = constants;
|
||||
6
node_modules/unenv/runtime/node/fs/_constants.d.ts
generated
vendored
Normal file
6
node_modules/unenv/runtime/node/fs/_constants.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import type fs from "node:fs";
|
||||
export declare const F_OK = 0;
|
||||
export declare const R_OK = 4;
|
||||
export declare const W_OK = 2;
|
||||
export declare const X_OK = 1;
|
||||
export declare const constants: typeof fs.constants;
|
||||
62
node_modules/unenv/runtime/node/fs/_constants.mjs
generated
vendored
Normal file
62
node_modules/unenv/runtime/node/fs/_constants.mjs
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
export const F_OK = 0;
|
||||
export const R_OK = 4;
|
||||
export const W_OK = 2;
|
||||
export const X_OK = 1;
|
||||
export const constants = /* @__PURE__ */ Object.create({
|
||||
UV_FS_SYMLINK_DIR: 1,
|
||||
UV_FS_SYMLINK_JUNCTION: 2,
|
||||
O_RDONLY: 0,
|
||||
O_WRONLY: 1,
|
||||
O_RDWR: 2,
|
||||
UV_DIRENT_UNKNOWN: 0,
|
||||
UV_DIRENT_FILE: 1,
|
||||
UV_DIRENT_DIR: 2,
|
||||
UV_DIRENT_LINK: 3,
|
||||
UV_DIRENT_FIFO: 4,
|
||||
UV_DIRENT_SOCKET: 5,
|
||||
UV_DIRENT_CHAR: 6,
|
||||
UV_DIRENT_BLOCK: 7,
|
||||
S_IFMT: 61440,
|
||||
S_IFREG: 32768,
|
||||
S_IFDIR: 16384,
|
||||
S_IFCHR: 8192,
|
||||
S_IFBLK: 24576,
|
||||
S_IFIFO: 4096,
|
||||
S_IFLNK: 40960,
|
||||
S_IFSOCK: 49152,
|
||||
O_CREAT: 64,
|
||||
O_EXCL: 128,
|
||||
UV_FS_O_FILEMAP: 0,
|
||||
O_NOCTTY: 256,
|
||||
O_TRUNC: 512,
|
||||
O_APPEND: 1024,
|
||||
O_DIRECTORY: 65536,
|
||||
O_NOATIME: 262144,
|
||||
O_NOFOLLOW: 131072,
|
||||
O_SYNC: 1052672,
|
||||
O_DSYNC: 4096,
|
||||
O_DIRECT: 16384,
|
||||
O_NONBLOCK: 2048,
|
||||
S_IRWXU: 448,
|
||||
S_IRUSR: 256,
|
||||
S_IWUSR: 128,
|
||||
S_IXUSR: 64,
|
||||
S_IRWXG: 56,
|
||||
S_IRGRP: 32,
|
||||
S_IWGRP: 16,
|
||||
S_IXGRP: 8,
|
||||
S_IRWXO: 7,
|
||||
S_IROTH: 4,
|
||||
S_IWOTH: 2,
|
||||
S_IXOTH: 1,
|
||||
F_OK: 0,
|
||||
R_OK: 4,
|
||||
W_OK: 2,
|
||||
X_OK: 1,
|
||||
UV_FS_COPYFILE_EXCL: 1,
|
||||
COPYFILE_EXCL: 1,
|
||||
UV_FS_COPYFILE_FICLONE: 2,
|
||||
COPYFILE_FICLONE: 2,
|
||||
UV_FS_COPYFILE_FICLONE_FORCE: 4,
|
||||
COPYFILE_FICLONE_FORCE: 4
|
||||
});
|
||||
215
node_modules/unenv/runtime/node/fs/_fs.cjs
generated
vendored
Normal file
215
node_modules/unenv/runtime/node/fs/_fs.cjs
generated
vendored
Normal file
@@ -0,0 +1,215 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.writevSync = exports.writev = exports.writeSync = exports.writeFileSync = exports.writeFile = exports.write = exports.watchFile = exports.watch = exports.utimesSync = exports.utimes = exports.unwatchFile = exports.unlinkSync = exports.unlink = exports.truncateSync = exports.truncate = exports.symlinkSync = exports.symlink = exports.statSync = exports.stat = exports.rmdirSync = exports.rmdir = exports.rmSync = exports.rm = exports.renameSync = exports.rename = exports.realpathSync = exports.realpath = exports.readvSync = exports.readv = exports.readlinkSync = exports.readlink = exports.readdirSync = exports.readdir = exports.readSync = exports.readFileSync = exports.readFile = exports.read = exports.opendirSync = exports.opendir = exports.openSync = exports.open = exports.mkdtempSync = exports.mkdtemp = exports.mkdirSync = exports.mkdir = exports.lutimesSync = exports.lutimes = exports.lstatSync = exports.lstat = exports.linkSync = exports.link = exports.lchownSync = exports.lchown = exports.lchmodSync = exports.lchmod = exports.futimesSync = exports.futimes = exports.ftruncateSync = exports.ftruncate = exports.fsyncSync = exports.fsync = exports.fstatSync = exports.fstat = exports.fdatasyncSync = exports.fdatasync = exports.fchownSync = exports.fchown = exports.fchmodSync = exports.fchmod = exports.existsSync = exports.exists = exports.createWriteStream = exports.createReadStream = exports.cpSync = exports.cp = exports.copyFileSync = exports.copyFile = exports.closeSync = exports.close = exports.chownSync = exports.chown = exports.chmodSync = exports.chmod = exports.appendFileSync = exports.appendFile = exports.accessSync = exports.access = exports._toUnixTimestamp = void 0;
|
||||
|
||||
var _utils = require("../../_internal/utils.cjs");
|
||||
|
||||
var fsp = _interopRequireWildcard(require("./promises/index.cjs"));
|
||||
|
||||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
||||
|
||||
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||
|
||||
function notImplementedAsync(name) {
|
||||
const fn = (0, _utils.notImplemented)(name);
|
||||
|
||||
fn.__promisify__ = () => (0, _utils.notImplemented)(name + ".__promisify__");
|
||||
|
||||
fn.native = fn;
|
||||
return fn;
|
||||
}
|
||||
|
||||
function callbackify(fn) {
|
||||
const fnc = function (...args) {
|
||||
const cb = args.pop();
|
||||
fn().catch(error => cb(error)).then(val => cb(void 0, val));
|
||||
};
|
||||
|
||||
fnc.__promisify__ = fn;
|
||||
fnc.native = fnc;
|
||||
return fnc;
|
||||
}
|
||||
|
||||
const access = callbackify(fsp.access);
|
||||
exports.access = access;
|
||||
const appendFile = callbackify(fsp.appendFile);
|
||||
exports.appendFile = appendFile;
|
||||
const chown = callbackify(fsp.chown);
|
||||
exports.chown = chown;
|
||||
const chmod = callbackify(fsp.chmod);
|
||||
exports.chmod = chmod;
|
||||
const copyFile = callbackify(fsp.copyFile);
|
||||
exports.copyFile = copyFile;
|
||||
const cp = callbackify(fsp.cp);
|
||||
exports.cp = cp;
|
||||
const lchown = callbackify(fsp.lchown);
|
||||
exports.lchown = lchown;
|
||||
const lchmod = callbackify(fsp.lchmod);
|
||||
exports.lchmod = lchmod;
|
||||
const link = callbackify(fsp.link);
|
||||
exports.link = link;
|
||||
const lstat = callbackify(fsp.lstat);
|
||||
exports.lstat = lstat;
|
||||
const lutimes = callbackify(fsp.lutimes);
|
||||
exports.lutimes = lutimes;
|
||||
const mkdir = callbackify(fsp.mkdir);
|
||||
exports.mkdir = mkdir;
|
||||
const mkdtemp = callbackify(fsp.mkdtemp);
|
||||
exports.mkdtemp = mkdtemp;
|
||||
const realpath = callbackify(fsp.realpath);
|
||||
exports.realpath = realpath;
|
||||
const open = callbackify(fsp.open);
|
||||
exports.open = open;
|
||||
const opendir = callbackify(fsp.opendir);
|
||||
exports.opendir = opendir;
|
||||
const readdir = callbackify(fsp.readdir);
|
||||
exports.readdir = readdir;
|
||||
const readFile = callbackify(fsp.readFile);
|
||||
exports.readFile = readFile;
|
||||
const readlink = callbackify(fsp.readlink);
|
||||
exports.readlink = readlink;
|
||||
const rename = callbackify(fsp.rename);
|
||||
exports.rename = rename;
|
||||
const rm = callbackify(fsp.rm);
|
||||
exports.rm = rm;
|
||||
const rmdir = callbackify(fsp.rmdir);
|
||||
exports.rmdir = rmdir;
|
||||
const stat = callbackify(fsp.stat);
|
||||
exports.stat = stat;
|
||||
const symlink = callbackify(fsp.symlink);
|
||||
exports.symlink = symlink;
|
||||
const truncate = callbackify(fsp.truncate);
|
||||
exports.truncate = truncate;
|
||||
const unlink = callbackify(fsp.unlink);
|
||||
exports.unlink = unlink;
|
||||
const utimes = callbackify(fsp.utimes);
|
||||
exports.utimes = utimes;
|
||||
const writeFile = callbackify(fsp.writeFile);
|
||||
exports.writeFile = writeFile;
|
||||
const close = notImplementedAsync("fs.close");
|
||||
exports.close = close;
|
||||
const createReadStream = notImplementedAsync("fs.createReadStream");
|
||||
exports.createReadStream = createReadStream;
|
||||
const createWriteStream = notImplementedAsync("fs.createWriteStream");
|
||||
exports.createWriteStream = createWriteStream;
|
||||
const exists = notImplementedAsync("fs.exists");
|
||||
exports.exists = exists;
|
||||
const fchown = notImplementedAsync("fs.fchown");
|
||||
exports.fchown = fchown;
|
||||
const fchmod = notImplementedAsync("fs.fchmod");
|
||||
exports.fchmod = fchmod;
|
||||
const fdatasync = notImplementedAsync("fs.fdatasync");
|
||||
exports.fdatasync = fdatasync;
|
||||
const fstat = notImplementedAsync("fs.fstat");
|
||||
exports.fstat = fstat;
|
||||
const fsync = notImplementedAsync("fs.fsync");
|
||||
exports.fsync = fsync;
|
||||
const ftruncate = notImplementedAsync("fs.ftruncate");
|
||||
exports.ftruncate = ftruncate;
|
||||
const futimes = notImplementedAsync("fs.futimes");
|
||||
exports.futimes = futimes;
|
||||
const lstatSync = notImplementedAsync("fs.lstatSync");
|
||||
exports.lstatSync = lstatSync;
|
||||
const read = notImplementedAsync("fs.read");
|
||||
exports.read = read;
|
||||
const readv = notImplementedAsync("fs.readv");
|
||||
exports.readv = readv;
|
||||
const realpathSync = notImplementedAsync("fs.realpathSync");
|
||||
exports.realpathSync = realpathSync;
|
||||
const statSync = notImplementedAsync("fs.statSync");
|
||||
exports.statSync = statSync;
|
||||
const unwatchFile = notImplementedAsync("fs.unwatchFile");
|
||||
exports.unwatchFile = unwatchFile;
|
||||
const watch = notImplementedAsync("fs.watch");
|
||||
exports.watch = watch;
|
||||
const watchFile = notImplementedAsync("fs.watchFile");
|
||||
exports.watchFile = watchFile;
|
||||
const write = notImplementedAsync("fs.write");
|
||||
exports.write = write;
|
||||
const writev = notImplementedAsync("fs.writev");
|
||||
exports.writev = writev;
|
||||
|
||||
const _toUnixTimestamp = notImplementedAsync("fs._toUnixTimestamp");
|
||||
|
||||
exports._toUnixTimestamp = _toUnixTimestamp;
|
||||
const appendFileSync = (0, _utils.notImplemented)("fs.appendFileSync");
|
||||
exports.appendFileSync = appendFileSync;
|
||||
const accessSync = (0, _utils.notImplemented)("fs.accessSync");
|
||||
exports.accessSync = accessSync;
|
||||
const chownSync = (0, _utils.notImplemented)("fs.chownSync");
|
||||
exports.chownSync = chownSync;
|
||||
const chmodSync = (0, _utils.notImplemented)("fs.chmodSync");
|
||||
exports.chmodSync = chmodSync;
|
||||
const closeSync = (0, _utils.notImplemented)("fs.closeSync");
|
||||
exports.closeSync = closeSync;
|
||||
const copyFileSync = (0, _utils.notImplemented)("fs.copyFileSync");
|
||||
exports.copyFileSync = copyFileSync;
|
||||
const cpSync = (0, _utils.notImplemented)("fs.cpSync");
|
||||
exports.cpSync = cpSync;
|
||||
|
||||
const existsSync = () => false;
|
||||
|
||||
exports.existsSync = existsSync;
|
||||
const fchownSync = (0, _utils.notImplemented)("fs.fchownSync");
|
||||
exports.fchownSync = fchownSync;
|
||||
const fchmodSync = (0, _utils.notImplemented)("fs.fchmodSync");
|
||||
exports.fchmodSync = fchmodSync;
|
||||
const fdatasyncSync = (0, _utils.notImplemented)("fs.fdatasyncSync");
|
||||
exports.fdatasyncSync = fdatasyncSync;
|
||||
const fstatSync = (0, _utils.notImplemented)("fs.fstatSync");
|
||||
exports.fstatSync = fstatSync;
|
||||
const fsyncSync = (0, _utils.notImplemented)("fs.fsyncSync");
|
||||
exports.fsyncSync = fsyncSync;
|
||||
const ftruncateSync = (0, _utils.notImplemented)("fs.ftruncateSync");
|
||||
exports.ftruncateSync = ftruncateSync;
|
||||
const futimesSync = (0, _utils.notImplemented)("fs.futimesSync");
|
||||
exports.futimesSync = futimesSync;
|
||||
const lchownSync = (0, _utils.notImplemented)("fs.lchownSync");
|
||||
exports.lchownSync = lchownSync;
|
||||
const lchmodSync = (0, _utils.notImplemented)("fs.lchmodSync");
|
||||
exports.lchmodSync = lchmodSync;
|
||||
const linkSync = (0, _utils.notImplemented)("fs.linkSync");
|
||||
exports.linkSync = linkSync;
|
||||
const lutimesSync = (0, _utils.notImplemented)("fs.lutimesSync");
|
||||
exports.lutimesSync = lutimesSync;
|
||||
const mkdirSync = (0, _utils.notImplemented)("fs.mkdirSync");
|
||||
exports.mkdirSync = mkdirSync;
|
||||
const mkdtempSync = (0, _utils.notImplemented)("fs.mkdtempSync");
|
||||
exports.mkdtempSync = mkdtempSync;
|
||||
const openSync = (0, _utils.notImplemented)("fs.openSync");
|
||||
exports.openSync = openSync;
|
||||
const opendirSync = (0, _utils.notImplemented)("fs.opendirSync");
|
||||
exports.opendirSync = opendirSync;
|
||||
const readdirSync = (0, _utils.notImplemented)("fs.readdirSync");
|
||||
exports.readdirSync = readdirSync;
|
||||
const readSync = (0, _utils.notImplemented)("fs.readSync");
|
||||
exports.readSync = readSync;
|
||||
const readvSync = (0, _utils.notImplemented)("fs.readvSync");
|
||||
exports.readvSync = readvSync;
|
||||
const readFileSync = (0, _utils.notImplemented)("fs.readFileSync");
|
||||
exports.readFileSync = readFileSync;
|
||||
const readlinkSync = (0, _utils.notImplemented)("fs.readlinkSync");
|
||||
exports.readlinkSync = readlinkSync;
|
||||
const renameSync = (0, _utils.notImplemented)("fs.renameSync");
|
||||
exports.renameSync = renameSync;
|
||||
const rmSync = (0, _utils.notImplemented)("fs.rmSync");
|
||||
exports.rmSync = rmSync;
|
||||
const rmdirSync = (0, _utils.notImplemented)("fs.rmdirSync");
|
||||
exports.rmdirSync = rmdirSync;
|
||||
const symlinkSync = (0, _utils.notImplemented)("fs.symlinkSync");
|
||||
exports.symlinkSync = symlinkSync;
|
||||
const truncateSync = (0, _utils.notImplemented)("fs.truncateSync");
|
||||
exports.truncateSync = truncateSync;
|
||||
const unlinkSync = (0, _utils.notImplemented)("fs.unlinkSync");
|
||||
exports.unlinkSync = unlinkSync;
|
||||
const utimesSync = (0, _utils.notImplemented)("fs.utimesSync");
|
||||
exports.utimesSync = utimesSync;
|
||||
const writeFileSync = (0, _utils.notImplemented)("fs.writeFileSync");
|
||||
exports.writeFileSync = writeFileSync;
|
||||
const writeSync = (0, _utils.notImplemented)("fs.writeSync");
|
||||
exports.writeSync = writeSync;
|
||||
const writevSync = (0, _utils.notImplemented)("fs.writevSync");
|
||||
exports.writevSync = writevSync;
|
||||
95
node_modules/unenv/runtime/node/fs/_fs.d.ts
generated
vendored
Normal file
95
node_modules/unenv/runtime/node/fs/_fs.d.ts
generated
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
import type fs from "node:fs";
|
||||
interface Promisifiable {
|
||||
(): any;
|
||||
native: Promisifiable;
|
||||
__promisify__: () => Promise<any>;
|
||||
}
|
||||
export declare const access: typeof fs.access;
|
||||
export declare const appendFile: typeof fs.appendFile;
|
||||
export declare const chown: typeof fs.chown;
|
||||
export declare const chmod: typeof fs.chmod;
|
||||
export declare const copyFile: typeof fs.copyFile;
|
||||
export declare const cp: typeof fs.cp;
|
||||
export declare const lchown: typeof fs.lchown;
|
||||
export declare const lchmod: typeof fs.lchmod;
|
||||
export declare const link: typeof fs.link;
|
||||
export declare const lstat: typeof fs.lstat;
|
||||
export declare const lutimes: typeof fs.lutimes;
|
||||
export declare const mkdir: typeof fs.mkdir;
|
||||
export declare const mkdtemp: typeof fs.mkdtemp;
|
||||
export declare const realpath: typeof fs.realpath;
|
||||
export declare const open: typeof fs.open;
|
||||
export declare const opendir: typeof fs.opendir;
|
||||
export declare const readdir: typeof fs.readdir;
|
||||
export declare const readFile: typeof fs.readFile;
|
||||
export declare const readlink: typeof fs.readlink;
|
||||
export declare const rename: typeof fs.rename;
|
||||
export declare const rm: typeof fs.rm;
|
||||
export declare const rmdir: typeof fs.rmdir;
|
||||
export declare const stat: typeof fs.stat;
|
||||
export declare const symlink: typeof fs.symlink;
|
||||
export declare const truncate: typeof fs.truncate;
|
||||
export declare const unlink: typeof fs.unlink;
|
||||
export declare const utimes: typeof fs.utimes;
|
||||
export declare const writeFile: typeof fs.writeFile;
|
||||
export declare const close: typeof fs.close;
|
||||
export declare const createReadStream: typeof fs.createReadStream;
|
||||
export declare const createWriteStream: typeof fs.createWriteStream;
|
||||
export declare const exists: typeof fs.exists;
|
||||
export declare const fchown: typeof fs.fchown;
|
||||
export declare const fchmod: typeof fs.fchmod;
|
||||
export declare const fdatasync: typeof fs.fdatasync;
|
||||
export declare const fstat: typeof fs.fstat;
|
||||
export declare const fsync: typeof fs.fsync;
|
||||
export declare const ftruncate: typeof fs.ftruncate;
|
||||
export declare const futimes: typeof fs.futimes;
|
||||
export declare const lstatSync: typeof fs.lstatSync;
|
||||
export declare const read: typeof fs.read;
|
||||
export declare const readv: typeof fs.readv;
|
||||
export declare const realpathSync: typeof fs.realpathSync;
|
||||
export declare const statSync: typeof fs.statSync;
|
||||
export declare const unwatchFile: typeof fs.unwatchFile;
|
||||
export declare const watch: typeof fs.watch;
|
||||
export declare const watchFile: typeof fs.watchFile;
|
||||
export declare const write: typeof fs.write;
|
||||
export declare const writev: typeof fs.writev;
|
||||
export declare const _toUnixTimestamp: Promisifiable;
|
||||
export declare const appendFileSync: typeof fs.appendFileSync;
|
||||
export declare const accessSync: typeof fs.accessSync;
|
||||
export declare const chownSync: typeof fs.chownSync;
|
||||
export declare const chmodSync: typeof fs.chmodSync;
|
||||
export declare const closeSync: typeof fs.closeSync;
|
||||
export declare const copyFileSync: typeof fs.copyFileSync;
|
||||
export declare const cpSync: typeof fs.cpSync;
|
||||
export declare const existsSync: typeof fs.existsSync;
|
||||
export declare const fchownSync: typeof fs.fchownSync;
|
||||
export declare const fchmodSync: typeof fs.fchmodSync;
|
||||
export declare const fdatasyncSync: typeof fs.fdatasyncSync;
|
||||
export declare const fstatSync: typeof fs.fstatSync;
|
||||
export declare const fsyncSync: typeof fs.fsyncSync;
|
||||
export declare const ftruncateSync: typeof fs.ftruncateSync;
|
||||
export declare const futimesSync: typeof fs.futimesSync;
|
||||
export declare const lchownSync: typeof fs.lchownSync;
|
||||
export declare const lchmodSync: typeof fs.lchmodSync;
|
||||
export declare const linkSync: typeof fs.linkSync;
|
||||
export declare const lutimesSync: typeof fs.lutimesSync;
|
||||
export declare const mkdirSync: typeof fs.mkdirSync;
|
||||
export declare const mkdtempSync: typeof fs.mkdtempSync;
|
||||
export declare const openSync: typeof fs.openSync;
|
||||
export declare const opendirSync: typeof fs.opendirSync;
|
||||
export declare const readdirSync: typeof fs.readdirSync;
|
||||
export declare const readSync: typeof fs.readSync;
|
||||
export declare const readvSync: typeof fs.readvSync;
|
||||
export declare const readFileSync: typeof fs.readFileSync;
|
||||
export declare const readlinkSync: typeof fs.readlinkSync;
|
||||
export declare const renameSync: typeof fs.renameSync;
|
||||
export declare const rmSync: typeof fs.rmSync;
|
||||
export declare const rmdirSync: typeof fs.rmdirSync;
|
||||
export declare const symlinkSync: typeof fs.symlinkSync;
|
||||
export declare const truncateSync: typeof fs.truncateSync;
|
||||
export declare const unlinkSync: typeof fs.unlinkSync;
|
||||
export declare const utimesSync: typeof fs.utimesSync;
|
||||
export declare const writeFileSync: typeof fs.writeFileSync;
|
||||
export declare const writeSync: typeof fs.writeSync;
|
||||
export declare const writevSync: typeof fs.writevSync;
|
||||
export {};
|
||||
105
node_modules/unenv/runtime/node/fs/_fs.mjs
generated
vendored
Normal file
105
node_modules/unenv/runtime/node/fs/_fs.mjs
generated
vendored
Normal file
@@ -0,0 +1,105 @@
|
||||
import { notImplemented } from "../../_internal/utils.mjs";
|
||||
import * as fsp from "./promises/index.mjs";
|
||||
function notImplementedAsync(name) {
|
||||
const fn = notImplemented(name);
|
||||
fn.__promisify__ = () => notImplemented(name + ".__promisify__");
|
||||
fn.native = fn;
|
||||
return fn;
|
||||
}
|
||||
function callbackify(fn) {
|
||||
const fnc = function(...args) {
|
||||
const cb = args.pop();
|
||||
fn().catch((error) => cb(error)).then((val) => cb(void 0, val));
|
||||
};
|
||||
fnc.__promisify__ = fn;
|
||||
fnc.native = fnc;
|
||||
return fnc;
|
||||
}
|
||||
export const access = callbackify(fsp.access);
|
||||
export const appendFile = callbackify(fsp.appendFile);
|
||||
export const chown = callbackify(fsp.chown);
|
||||
export const chmod = callbackify(fsp.chmod);
|
||||
export const copyFile = callbackify(fsp.copyFile);
|
||||
export const cp = callbackify(fsp.cp);
|
||||
export const lchown = callbackify(fsp.lchown);
|
||||
export const lchmod = callbackify(fsp.lchmod);
|
||||
export const link = callbackify(fsp.link);
|
||||
export const lstat = callbackify(fsp.lstat);
|
||||
export const lutimes = callbackify(fsp.lutimes);
|
||||
export const mkdir = callbackify(fsp.mkdir);
|
||||
export const mkdtemp = callbackify(fsp.mkdtemp);
|
||||
export const realpath = callbackify(fsp.realpath);
|
||||
export const open = callbackify(fsp.open);
|
||||
export const opendir = callbackify(fsp.opendir);
|
||||
export const readdir = callbackify(fsp.readdir);
|
||||
export const readFile = callbackify(fsp.readFile);
|
||||
export const readlink = callbackify(fsp.readlink);
|
||||
export const rename = callbackify(fsp.rename);
|
||||
export const rm = callbackify(fsp.rm);
|
||||
export const rmdir = callbackify(fsp.rmdir);
|
||||
export const stat = callbackify(fsp.stat);
|
||||
export const symlink = callbackify(fsp.symlink);
|
||||
export const truncate = callbackify(fsp.truncate);
|
||||
export const unlink = callbackify(fsp.unlink);
|
||||
export const utimes = callbackify(fsp.utimes);
|
||||
export const writeFile = callbackify(fsp.writeFile);
|
||||
export const close = notImplementedAsync("fs.close");
|
||||
export const createReadStream = notImplementedAsync("fs.createReadStream");
|
||||
export const createWriteStream = notImplementedAsync("fs.createWriteStream");
|
||||
export const exists = notImplementedAsync("fs.exists");
|
||||
export const fchown = notImplementedAsync("fs.fchown");
|
||||
export const fchmod = notImplementedAsync("fs.fchmod");
|
||||
export const fdatasync = notImplementedAsync("fs.fdatasync");
|
||||
export const fstat = notImplementedAsync("fs.fstat");
|
||||
export const fsync = notImplementedAsync("fs.fsync");
|
||||
export const ftruncate = notImplementedAsync("fs.ftruncate");
|
||||
export const futimes = notImplementedAsync("fs.futimes");
|
||||
export const lstatSync = notImplementedAsync("fs.lstatSync");
|
||||
export const read = notImplementedAsync("fs.read");
|
||||
export const readv = notImplementedAsync("fs.readv");
|
||||
export const realpathSync = notImplementedAsync("fs.realpathSync");
|
||||
export const statSync = notImplementedAsync("fs.statSync");
|
||||
export const unwatchFile = notImplementedAsync("fs.unwatchFile");
|
||||
export const watch = notImplementedAsync("fs.watch");
|
||||
export const watchFile = notImplementedAsync("fs.watchFile");
|
||||
export const write = notImplementedAsync("fs.write");
|
||||
export const writev = notImplementedAsync("fs.writev");
|
||||
export const _toUnixTimestamp = notImplementedAsync("fs._toUnixTimestamp");
|
||||
export const appendFileSync = notImplemented("fs.appendFileSync");
|
||||
export const accessSync = notImplemented("fs.accessSync");
|
||||
export const chownSync = notImplemented("fs.chownSync");
|
||||
export const chmodSync = notImplemented("fs.chmodSync");
|
||||
export const closeSync = notImplemented("fs.closeSync");
|
||||
export const copyFileSync = notImplemented("fs.copyFileSync");
|
||||
export const cpSync = notImplemented("fs.cpSync");
|
||||
export const existsSync = () => false;
|
||||
export const fchownSync = notImplemented("fs.fchownSync");
|
||||
export const fchmodSync = notImplemented("fs.fchmodSync");
|
||||
export const fdatasyncSync = notImplemented("fs.fdatasyncSync");
|
||||
export const fstatSync = notImplemented("fs.fstatSync");
|
||||
export const fsyncSync = notImplemented("fs.fsyncSync");
|
||||
export const ftruncateSync = notImplemented("fs.ftruncateSync");
|
||||
export const futimesSync = notImplemented("fs.futimesSync");
|
||||
export const lchownSync = notImplemented("fs.lchownSync");
|
||||
export const lchmodSync = notImplemented("fs.lchmodSync");
|
||||
export const linkSync = notImplemented("fs.linkSync");
|
||||
export const lutimesSync = notImplemented("fs.lutimesSync");
|
||||
export const mkdirSync = notImplemented("fs.mkdirSync");
|
||||
export const mkdtempSync = notImplemented("fs.mkdtempSync");
|
||||
export const openSync = notImplemented("fs.openSync");
|
||||
export const opendirSync = notImplemented("fs.opendirSync");
|
||||
export const readdirSync = notImplemented("fs.readdirSync");
|
||||
export const readSync = notImplemented("fs.readSync");
|
||||
export const readvSync = notImplemented("fs.readvSync");
|
||||
export const readFileSync = notImplemented("fs.readFileSync");
|
||||
export const readlinkSync = notImplemented("fs.readlinkSync");
|
||||
export const renameSync = notImplemented("fs.renameSync");
|
||||
export const rmSync = notImplemented("fs.rmSync");
|
||||
export const rmdirSync = notImplemented("fs.rmdirSync");
|
||||
export const symlinkSync = notImplemented("fs.symlinkSync");
|
||||
export const truncateSync = notImplemented("fs.truncateSync");
|
||||
export const unlinkSync = notImplemented("fs.unlinkSync");
|
||||
export const utimesSync = notImplemented("fs.utimesSync");
|
||||
export const writeFileSync = notImplemented("fs.writeFileSync");
|
||||
export const writeSync = notImplemented("fs.writeSync");
|
||||
export const writevSync = notImplemented("fs.writevSync");
|
||||
66
node_modules/unenv/runtime/node/fs/index.cjs
generated
vendored
Normal file
66
node_modules/unenv/runtime/node/fs/index.cjs
generated
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _exportNames = {
|
||||
promises: true
|
||||
};
|
||||
exports.promises = exports.default = void 0;
|
||||
|
||||
var _classes = _interopRequireWildcard(require("./_classes.cjs"));
|
||||
|
||||
Object.keys(_classes).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === _classes[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _classes[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var _constants = _interopRequireWildcard(require("./_constants.cjs"));
|
||||
|
||||
Object.keys(_constants).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === _constants[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _constants[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var _fs = _interopRequireWildcard(require("./_fs.cjs"));
|
||||
|
||||
Object.keys(_fs).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === _fs[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _fs[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var _promises = _interopRequireWildcard(require("./promises/index.cjs"));
|
||||
|
||||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
||||
|
||||
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||
|
||||
const promises = _promises;
|
||||
exports.promises = promises;
|
||||
var _default = { ..._classes,
|
||||
..._constants,
|
||||
..._fs,
|
||||
promises
|
||||
};
|
||||
module.exports = _default;
|
||||
7
node_modules/unenv/runtime/node/fs/index.d.ts
generated
vendored
Normal file
7
node_modules/unenv/runtime/node/fs/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import * as _promises from "./promises/index";
|
||||
export * from "./_classes";
|
||||
export * from "./_constants";
|
||||
export * from "./_fs";
|
||||
export declare const promises: typeof _promises;
|
||||
declare const _default: any;
|
||||
export default _default;
|
||||
14
node_modules/unenv/runtime/node/fs/index.mjs
generated
vendored
Normal file
14
node_modules/unenv/runtime/node/fs/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import * as _classes from "./_classes.mjs";
|
||||
import * as _constants from "./_constants.mjs";
|
||||
import * as _fs from "./_fs.mjs";
|
||||
import * as _promises from "./promises/index.mjs";
|
||||
export * from "./_classes.mjs";
|
||||
export * from "./_constants.mjs";
|
||||
export * from "./_fs.mjs";
|
||||
export const promises = _promises;
|
||||
export default {
|
||||
..._classes,
|
||||
..._constants,
|
||||
..._fs,
|
||||
promises
|
||||
};
|
||||
67
node_modules/unenv/runtime/node/fs/promises/index.cjs
generated
vendored
Normal file
67
node_modules/unenv/runtime/node/fs/promises/index.cjs
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.writeFile = exports.watch = exports.utimes = exports.unlink = exports.truncate = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.realpath = exports.readlink = exports.readdir = exports.readFile = exports.opendir = exports.open = exports.mkdtemp = exports.mkdir = exports.lutimes = exports.lstat = exports.link = exports.lchown = exports.lchmod = exports.cp = exports.copyFile = exports.chown = exports.chmod = exports.appendFile = exports.access = void 0;
|
||||
|
||||
var _utils = require("../../../_internal/utils.cjs");
|
||||
|
||||
const access = (0, _utils.notImplemented)("fs.access");
|
||||
exports.access = access;
|
||||
const copyFile = (0, _utils.notImplemented)("fs.copyFile");
|
||||
exports.copyFile = copyFile;
|
||||
const cp = (0, _utils.notImplemented)("fs.cp");
|
||||
exports.cp = cp;
|
||||
const open = (0, _utils.notImplemented)("fs.open");
|
||||
exports.open = open;
|
||||
const opendir = (0, _utils.notImplemented)("fs.opendir");
|
||||
exports.opendir = opendir;
|
||||
const rename = (0, _utils.notImplemented)("fs.rename");
|
||||
exports.rename = rename;
|
||||
const truncate = (0, _utils.notImplemented)("fs.truncate");
|
||||
exports.truncate = truncate;
|
||||
const rm = (0, _utils.notImplemented)("fs.rm");
|
||||
exports.rm = rm;
|
||||
const rmdir = (0, _utils.notImplemented)("fs.rmdir");
|
||||
exports.rmdir = rmdir;
|
||||
const mkdir = (0, _utils.notImplemented)("fs.mkdir");
|
||||
exports.mkdir = mkdir;
|
||||
const readdir = (0, _utils.notImplemented)("fs.readdir");
|
||||
exports.readdir = readdir;
|
||||
const readlink = (0, _utils.notImplemented)("fs.readlink");
|
||||
exports.readlink = readlink;
|
||||
const symlink = (0, _utils.notImplemented)("fs.symlink");
|
||||
exports.symlink = symlink;
|
||||
const lstat = (0, _utils.notImplemented)("fs.lstat");
|
||||
exports.lstat = lstat;
|
||||
const stat = (0, _utils.notImplemented)("fs.stat");
|
||||
exports.stat = stat;
|
||||
const link = (0, _utils.notImplemented)("fs.link");
|
||||
exports.link = link;
|
||||
const unlink = (0, _utils.notImplemented)("fs.unlink");
|
||||
exports.unlink = unlink;
|
||||
const chmod = (0, _utils.notImplemented)("fs.chmod");
|
||||
exports.chmod = chmod;
|
||||
const lchmod = (0, _utils.notImplemented)("fs.lchmod");
|
||||
exports.lchmod = lchmod;
|
||||
const lchown = (0, _utils.notImplemented)("fs.lchown");
|
||||
exports.lchown = lchown;
|
||||
const chown = (0, _utils.notImplemented)("fs.chown");
|
||||
exports.chown = chown;
|
||||
const utimes = (0, _utils.notImplemented)("fs.utimes");
|
||||
exports.utimes = utimes;
|
||||
const lutimes = (0, _utils.notImplemented)("fs.lutimes");
|
||||
exports.lutimes = lutimes;
|
||||
const realpath = (0, _utils.notImplemented)("fs.realpath");
|
||||
exports.realpath = realpath;
|
||||
const mkdtemp = (0, _utils.notImplemented)("fs.mkdtemp");
|
||||
exports.mkdtemp = mkdtemp;
|
||||
const writeFile = (0, _utils.notImplemented)("fs.writeFile");
|
||||
exports.writeFile = writeFile;
|
||||
const appendFile = (0, _utils.notImplemented)("fs.appendFile");
|
||||
exports.appendFile = appendFile;
|
||||
const readFile = (0, _utils.notImplemented)("fs.readFile");
|
||||
exports.readFile = readFile;
|
||||
const watch = (0, _utils.notImplemented)("fs.watch");
|
||||
exports.watch = watch;
|
||||
30
node_modules/unenv/runtime/node/fs/promises/index.d.ts
generated
vendored
Normal file
30
node_modules/unenv/runtime/node/fs/promises/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
import type fsp from "node:fs/promises";
|
||||
export declare const access: typeof fsp.access;
|
||||
export declare const copyFile: typeof fsp.copyFile;
|
||||
export declare const cp: typeof fsp.cp;
|
||||
export declare const open: typeof fsp.open;
|
||||
export declare const opendir: typeof fsp.opendir;
|
||||
export declare const rename: typeof fsp.rename;
|
||||
export declare const truncate: typeof fsp.truncate;
|
||||
export declare const rm: typeof fsp.rm;
|
||||
export declare const rmdir: typeof fsp.rmdir;
|
||||
export declare const mkdir: typeof fsp.mkdir;
|
||||
export declare const readdir: typeof fsp.readdir;
|
||||
export declare const readlink: typeof fsp.readlink;
|
||||
export declare const symlink: typeof fsp.symlink;
|
||||
export declare const lstat: typeof fsp.lstat;
|
||||
export declare const stat: typeof fsp.stat;
|
||||
export declare const link: typeof fsp.link;
|
||||
export declare const unlink: typeof fsp.unlink;
|
||||
export declare const chmod: typeof fsp.chmod;
|
||||
export declare const lchmod: typeof fsp.lchmod;
|
||||
export declare const lchown: typeof fsp.lchown;
|
||||
export declare const chown: typeof fsp.chown;
|
||||
export declare const utimes: typeof fsp.utimes;
|
||||
export declare const lutimes: typeof fsp.lutimes;
|
||||
export declare const realpath: typeof fsp.realpath;
|
||||
export declare const mkdtemp: typeof fsp.mkdtemp;
|
||||
export declare const writeFile: typeof fsp.writeFile;
|
||||
export declare const appendFile: typeof fsp.appendFile;
|
||||
export declare const readFile: typeof fsp.readFile;
|
||||
export declare const watch: typeof fsp.watch;
|
||||
30
node_modules/unenv/runtime/node/fs/promises/index.mjs
generated
vendored
Normal file
30
node_modules/unenv/runtime/node/fs/promises/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
import { notImplemented } from "../../../_internal/utils.mjs";
|
||||
export const access = notImplemented("fs.access");
|
||||
export const copyFile = notImplemented("fs.copyFile");
|
||||
export const cp = notImplemented("fs.cp");
|
||||
export const open = notImplemented("fs.open");
|
||||
export const opendir = notImplemented("fs.opendir");
|
||||
export const rename = notImplemented("fs.rename");
|
||||
export const truncate = notImplemented("fs.truncate");
|
||||
export const rm = notImplemented("fs.rm");
|
||||
export const rmdir = notImplemented("fs.rmdir");
|
||||
export const mkdir = notImplemented("fs.mkdir");
|
||||
export const readdir = notImplemented("fs.readdir");
|
||||
export const readlink = notImplemented("fs.readlink");
|
||||
export const symlink = notImplemented("fs.symlink");
|
||||
export const lstat = notImplemented("fs.lstat");
|
||||
export const stat = notImplemented("fs.stat");
|
||||
export const link = notImplemented("fs.link");
|
||||
export const unlink = notImplemented("fs.unlink");
|
||||
export const chmod = notImplemented("fs.chmod");
|
||||
export const lchmod = notImplemented("fs.lchmod");
|
||||
export const lchown = notImplemented("fs.lchown");
|
||||
export const chown = notImplemented("fs.chown");
|
||||
export const utimes = notImplemented("fs.utimes");
|
||||
export const lutimes = notImplemented("fs.lutimes");
|
||||
export const realpath = notImplemented("fs.realpath");
|
||||
export const mkdtemp = notImplemented("fs.mkdtemp");
|
||||
export const writeFile = notImplemented("fs.writeFile");
|
||||
export const appendFile = notImplemented("fs.appendFile");
|
||||
export const readFile = notImplemented("fs.readFile");
|
||||
export const watch = notImplemented("fs.watch");
|
||||
76
node_modules/unenv/runtime/node/http/_consts.cjs
generated
vendored
Normal file
76
node_modules/unenv/runtime/node/http/_consts.cjs
generated
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.maxHeaderSize = exports.STATUS_CODES = exports.METHODS = void 0;
|
||||
const METHODS = ["ACL", "BIND", "CHECKOUT", "CONNECT", "COPY", "DELETE", "GET", "HEAD", "LINK", "LOCK", "M-SEARCH", "MERGE", "MKACTIVITY", "MKCALENDAR", "MKCOL", "MOVE", "NOTIFY", "OPTIONS", "PATCH", "POST", "PRI", "PROPFIND", "PROPPATCH", "PURGE", "PUT", "REBIND", "REPORT", "SEARCH", "SOURCE", "SUBSCRIBE", "TRACE", "UNBIND", "UNLINK", "UNLOCK", "UNSUBSCRIBE"];
|
||||
exports.METHODS = METHODS;
|
||||
const STATUS_CODES = {
|
||||
100: "Continue",
|
||||
101: "Switching Protocols",
|
||||
102: "Processing",
|
||||
103: "Early Hints",
|
||||
200: "OK",
|
||||
201: "Created",
|
||||
202: "Accepted",
|
||||
203: "Non-Authoritative Information",
|
||||
204: "No Content",
|
||||
205: "Reset Content",
|
||||
206: "Partial Content",
|
||||
207: "Multi-Status",
|
||||
208: "Already Reported",
|
||||
226: "IM Used",
|
||||
300: "Multiple Choices",
|
||||
301: "Moved Permanently",
|
||||
302: "Found",
|
||||
303: "See Other",
|
||||
304: "Not Modified",
|
||||
305: "Use Proxy",
|
||||
307: "Temporary Redirect",
|
||||
308: "Permanent Redirect",
|
||||
400: "Bad Request",
|
||||
401: "Unauthorized",
|
||||
402: "Payment Required",
|
||||
403: "Forbidden",
|
||||
404: "Not Found",
|
||||
405: "Method Not Allowed",
|
||||
406: "Not Acceptable",
|
||||
407: "Proxy Authentication Required",
|
||||
408: "Request Timeout",
|
||||
409: "Conflict",
|
||||
410: "Gone",
|
||||
411: "Length Required",
|
||||
412: "Precondition Failed",
|
||||
413: "Payload Too Large",
|
||||
414: "URI Too Long",
|
||||
415: "Unsupported Media Type",
|
||||
416: "Range Not Satisfiable",
|
||||
417: "Expectation Failed",
|
||||
418: "I'm a Teapot",
|
||||
421: "Misdirected Request",
|
||||
422: "Unprocessable Entity",
|
||||
423: "Locked",
|
||||
424: "Failed Dependency",
|
||||
425: "Too Early",
|
||||
426: "Upgrade Required",
|
||||
428: "Precondition Required",
|
||||
429: "Too Many Requests",
|
||||
431: "Request Header Fields Too Large",
|
||||
451: "Unavailable For Legal Reasons",
|
||||
500: "Internal Server Error",
|
||||
501: "Not Implemented",
|
||||
502: "Bad Gateway",
|
||||
503: "Service Unavailable",
|
||||
504: "Gateway Timeout",
|
||||
505: "HTTP Version Not Supported",
|
||||
506: "Variant Also Negotiates",
|
||||
507: "Insufficient Storage",
|
||||
508: "Loop Detected",
|
||||
509: "Bandwidth Limit Exceeded",
|
||||
510: "Not Extended",
|
||||
511: "Network Authentication Required"
|
||||
};
|
||||
exports.STATUS_CODES = STATUS_CODES;
|
||||
const maxHeaderSize = 16384;
|
||||
exports.maxHeaderSize = maxHeaderSize;
|
||||
67
node_modules/unenv/runtime/node/http/_consts.d.ts
generated
vendored
Normal file
67
node_modules/unenv/runtime/node/http/_consts.d.ts
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
export declare const METHODS: string[];
|
||||
export declare const STATUS_CODES: {
|
||||
100: string;
|
||||
101: string;
|
||||
102: string;
|
||||
103: string;
|
||||
200: string;
|
||||
201: string;
|
||||
202: string;
|
||||
203: string;
|
||||
204: string;
|
||||
205: string;
|
||||
206: string;
|
||||
207: string;
|
||||
208: string;
|
||||
226: string;
|
||||
300: string;
|
||||
301: string;
|
||||
302: string;
|
||||
303: string;
|
||||
304: string;
|
||||
305: string;
|
||||
307: string;
|
||||
308: string;
|
||||
400: string;
|
||||
401: string;
|
||||
402: string;
|
||||
403: string;
|
||||
404: string;
|
||||
405: string;
|
||||
406: string;
|
||||
407: string;
|
||||
408: string;
|
||||
409: string;
|
||||
410: string;
|
||||
411: string;
|
||||
412: string;
|
||||
413: string;
|
||||
414: string;
|
||||
415: string;
|
||||
416: string;
|
||||
417: string;
|
||||
418: string;
|
||||
421: string;
|
||||
422: string;
|
||||
423: string;
|
||||
424: string;
|
||||
425: string;
|
||||
426: string;
|
||||
428: string;
|
||||
429: string;
|
||||
431: string;
|
||||
451: string;
|
||||
500: string;
|
||||
501: string;
|
||||
502: string;
|
||||
503: string;
|
||||
504: string;
|
||||
505: string;
|
||||
506: string;
|
||||
507: string;
|
||||
508: string;
|
||||
509: string;
|
||||
510: string;
|
||||
511: string;
|
||||
};
|
||||
export declare const maxHeaderSize = 16384;
|
||||
103
node_modules/unenv/runtime/node/http/_consts.mjs
generated
vendored
Normal file
103
node_modules/unenv/runtime/node/http/_consts.mjs
generated
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
export const METHODS = [
|
||||
"ACL",
|
||||
"BIND",
|
||||
"CHECKOUT",
|
||||
"CONNECT",
|
||||
"COPY",
|
||||
"DELETE",
|
||||
"GET",
|
||||
"HEAD",
|
||||
"LINK",
|
||||
"LOCK",
|
||||
"M-SEARCH",
|
||||
"MERGE",
|
||||
"MKACTIVITY",
|
||||
"MKCALENDAR",
|
||||
"MKCOL",
|
||||
"MOVE",
|
||||
"NOTIFY",
|
||||
"OPTIONS",
|
||||
"PATCH",
|
||||
"POST",
|
||||
"PRI",
|
||||
"PROPFIND",
|
||||
"PROPPATCH",
|
||||
"PURGE",
|
||||
"PUT",
|
||||
"REBIND",
|
||||
"REPORT",
|
||||
"SEARCH",
|
||||
"SOURCE",
|
||||
"SUBSCRIBE",
|
||||
"TRACE",
|
||||
"UNBIND",
|
||||
"UNLINK",
|
||||
"UNLOCK",
|
||||
"UNSUBSCRIBE"
|
||||
];
|
||||
export const STATUS_CODES = {
|
||||
100: "Continue",
|
||||
101: "Switching Protocols",
|
||||
102: "Processing",
|
||||
103: "Early Hints",
|
||||
200: "OK",
|
||||
201: "Created",
|
||||
202: "Accepted",
|
||||
203: "Non-Authoritative Information",
|
||||
204: "No Content",
|
||||
205: "Reset Content",
|
||||
206: "Partial Content",
|
||||
207: "Multi-Status",
|
||||
208: "Already Reported",
|
||||
226: "IM Used",
|
||||
300: "Multiple Choices",
|
||||
301: "Moved Permanently",
|
||||
302: "Found",
|
||||
303: "See Other",
|
||||
304: "Not Modified",
|
||||
305: "Use Proxy",
|
||||
307: "Temporary Redirect",
|
||||
308: "Permanent Redirect",
|
||||
400: "Bad Request",
|
||||
401: "Unauthorized",
|
||||
402: "Payment Required",
|
||||
403: "Forbidden",
|
||||
404: "Not Found",
|
||||
405: "Method Not Allowed",
|
||||
406: "Not Acceptable",
|
||||
407: "Proxy Authentication Required",
|
||||
408: "Request Timeout",
|
||||
409: "Conflict",
|
||||
410: "Gone",
|
||||
411: "Length Required",
|
||||
412: "Precondition Failed",
|
||||
413: "Payload Too Large",
|
||||
414: "URI Too Long",
|
||||
415: "Unsupported Media Type",
|
||||
416: "Range Not Satisfiable",
|
||||
417: "Expectation Failed",
|
||||
418: "I'm a Teapot",
|
||||
421: "Misdirected Request",
|
||||
422: "Unprocessable Entity",
|
||||
423: "Locked",
|
||||
424: "Failed Dependency",
|
||||
425: "Too Early",
|
||||
426: "Upgrade Required",
|
||||
428: "Precondition Required",
|
||||
429: "Too Many Requests",
|
||||
431: "Request Header Fields Too Large",
|
||||
451: "Unavailable For Legal Reasons",
|
||||
500: "Internal Server Error",
|
||||
501: "Not Implemented",
|
||||
502: "Bad Gateway",
|
||||
503: "Service Unavailable",
|
||||
504: "Gateway Timeout",
|
||||
505: "HTTP Version Not Supported",
|
||||
506: "Variant Also Negotiates",
|
||||
507: "Insufficient Storage",
|
||||
508: "Loop Detected",
|
||||
509: "Bandwidth Limit Exceeded",
|
||||
510: "Not Extended",
|
||||
511: "Network Authentication Required"
|
||||
};
|
||||
export const maxHeaderSize = 16384;
|
||||
46
node_modules/unenv/runtime/node/http/_request.cjs
generated
vendored
Normal file
46
node_modules/unenv/runtime/node/http/_request.cjs
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.IncomingMessage = void 0;
|
||||
|
||||
var _socket = require("../net/socket.cjs");
|
||||
|
||||
var _readable = require("../stream/readable.cjs");
|
||||
|
||||
var _utils = require("../../_internal/utils.cjs");
|
||||
|
||||
class IncomingMessage extends _readable.Readable {
|
||||
constructor(socket) {
|
||||
super();
|
||||
this.aborted = false;
|
||||
this.httpVersion = "1.1";
|
||||
this.httpVersionMajor = 1;
|
||||
this.httpVersionMinor = 1;
|
||||
this.complete = true;
|
||||
this.headers = {};
|
||||
this.trailers = {};
|
||||
this.method = "GET";
|
||||
this.url = "/";
|
||||
this.statusCode = 200;
|
||||
this.statusMessage = "";
|
||||
this.readable = false;
|
||||
this.socket = this.connection = socket || new _socket.Socket();
|
||||
}
|
||||
|
||||
get rawHeaders() {
|
||||
return (0, _utils.rawHeaders)(this.headers);
|
||||
}
|
||||
|
||||
get rawTrailers() {
|
||||
return [];
|
||||
}
|
||||
|
||||
setTimeout(_msecs, _callback) {
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
exports.IncomingMessage = IncomingMessage;
|
||||
23
node_modules/unenv/runtime/node/http/_request.d.ts
generated
vendored
Normal file
23
node_modules/unenv/runtime/node/http/_request.d.ts
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import type http from "node:http";
|
||||
import { Socket } from "../net/socket";
|
||||
import { Readable } from "../stream/readable";
|
||||
export declare class IncomingMessage extends Readable implements http.IncomingMessage {
|
||||
aborted: boolean;
|
||||
httpVersion: string;
|
||||
httpVersionMajor: number;
|
||||
httpVersionMinor: number;
|
||||
complete: boolean;
|
||||
connection: Socket;
|
||||
socket: Socket;
|
||||
headers: http.IncomingHttpHeaders;
|
||||
trailers: {};
|
||||
method: string;
|
||||
url: string;
|
||||
statusCode: number;
|
||||
statusMessage: string;
|
||||
readable: boolean;
|
||||
constructor(socket?: Socket);
|
||||
get rawHeaders(): any[];
|
||||
get rawTrailers(): any[];
|
||||
setTimeout(_msecs: number, _callback?: () => void): this;
|
||||
}
|
||||
30
node_modules/unenv/runtime/node/http/_request.mjs
generated
vendored
Normal file
30
node_modules/unenv/runtime/node/http/_request.mjs
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
import { Socket } from "../net/socket.mjs";
|
||||
import { Readable } from "../stream/readable.mjs";
|
||||
import { rawHeaders } from "../../_internal/utils.mjs";
|
||||
export class IncomingMessage extends Readable {
|
||||
constructor(socket) {
|
||||
super();
|
||||
this.aborted = false;
|
||||
this.httpVersion = "1.1";
|
||||
this.httpVersionMajor = 1;
|
||||
this.httpVersionMinor = 1;
|
||||
this.complete = true;
|
||||
this.headers = {};
|
||||
this.trailers = {};
|
||||
this.method = "GET";
|
||||
this.url = "/";
|
||||
this.statusCode = 200;
|
||||
this.statusMessage = "";
|
||||
this.readable = false;
|
||||
this.socket = this.connection = socket || new Socket();
|
||||
}
|
||||
get rawHeaders() {
|
||||
return rawHeaders(this.headers);
|
||||
}
|
||||
get rawTrailers() {
|
||||
return [];
|
||||
}
|
||||
setTimeout(_msecs, _callback) {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
106
node_modules/unenv/runtime/node/http/_response.cjs
generated
vendored
Normal file
106
node_modules/unenv/runtime/node/http/_response.cjs
generated
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.ServerResponse = void 0;
|
||||
|
||||
var _writable = require("../stream/writable.cjs");
|
||||
|
||||
class ServerResponse extends _writable.Writable {
|
||||
constructor(req) {
|
||||
super();
|
||||
this.statusCode = 200;
|
||||
this.statusMessage = "";
|
||||
this.upgrading = false;
|
||||
this.chunkedEncoding = false;
|
||||
this.shouldKeepAlive = false;
|
||||
this.useChunkedEncodingByDefault = false;
|
||||
this.sendDate = false;
|
||||
this.finished = false;
|
||||
this.headersSent = false;
|
||||
this.connection = null;
|
||||
this.socket = null;
|
||||
this._headers = {};
|
||||
this.req = req;
|
||||
}
|
||||
|
||||
assignSocket(socket) {
|
||||
socket._httpMessage = this;
|
||||
this.socket = socket;
|
||||
this.connection = socket;
|
||||
this.emit("socket", socket);
|
||||
|
||||
this._flush();
|
||||
}
|
||||
|
||||
_flush() {
|
||||
this.flushHeaders();
|
||||
}
|
||||
|
||||
detachSocket(_socket) {}
|
||||
|
||||
writeContinue(_callback) {}
|
||||
|
||||
writeHead(statusCode, arg1, arg2) {
|
||||
if (statusCode) {
|
||||
this.statusCode = statusCode;
|
||||
}
|
||||
|
||||
if (typeof arg1 === "string") {
|
||||
this.statusMessage = arg1;
|
||||
arg1 = void 0;
|
||||
}
|
||||
|
||||
const headers = arg2 || arg1;
|
||||
|
||||
if (headers) {
|
||||
if (Array.isArray(headers)) {} else {
|
||||
for (const key in headers) {
|
||||
this.setHeader(key, headers[key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.headersSent = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
writeProcessing() {}
|
||||
|
||||
setTimeout(_msecs, _callback) {
|
||||
return this;
|
||||
}
|
||||
|
||||
setHeader(name, value) {
|
||||
this._headers[name.toLowerCase()] = value + "";
|
||||
return this;
|
||||
}
|
||||
|
||||
getHeader(name) {
|
||||
return this._headers[name.toLowerCase()];
|
||||
}
|
||||
|
||||
getHeaders() {
|
||||
return this._headers;
|
||||
}
|
||||
|
||||
getHeaderNames() {
|
||||
return Object.keys(this._headers);
|
||||
}
|
||||
|
||||
hasHeader(name) {
|
||||
return name.toLowerCase() in this._headers;
|
||||
}
|
||||
|
||||
removeHeader(name) {
|
||||
delete this._headers[name.toLowerCase()];
|
||||
}
|
||||
|
||||
addTrailers(_headers) {}
|
||||
|
||||
flushHeaders() {}
|
||||
|
||||
}
|
||||
|
||||
exports.ServerResponse = ServerResponse;
|
||||
36
node_modules/unenv/runtime/node/http/_response.d.ts
generated
vendored
Normal file
36
node_modules/unenv/runtime/node/http/_response.d.ts
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
/// <reference types="node" />
|
||||
import type http from "node:http";
|
||||
import type { Socket } from "node:net";
|
||||
import { Callback, HeadersObject } from "../../_internal/types";
|
||||
import { Writable } from "../stream/writable";
|
||||
export declare class ServerResponse extends Writable implements http.ServerResponse {
|
||||
statusCode: number;
|
||||
statusMessage: string;
|
||||
upgrading: boolean;
|
||||
chunkedEncoding: boolean;
|
||||
shouldKeepAlive: boolean;
|
||||
useChunkedEncodingByDefault: boolean;
|
||||
sendDate: boolean;
|
||||
finished: boolean;
|
||||
headersSent: boolean;
|
||||
connection: Socket | null;
|
||||
socket: Socket | null;
|
||||
req: http.IncomingMessage;
|
||||
_headers: HeadersObject;
|
||||
constructor(req: http.IncomingMessage);
|
||||
assignSocket(socket: Socket): void;
|
||||
_flush(): void;
|
||||
detachSocket(_socket: Socket): void;
|
||||
writeContinue(_callback?: Callback): void;
|
||||
writeHead(statusCode: number, arg1?: string | http.OutgoingHttpHeaders | http.OutgoingHttpHeader[], arg2?: http.OutgoingHttpHeaders | http.OutgoingHttpHeader[]): this;
|
||||
writeProcessing(): void;
|
||||
setTimeout(_msecs: number, _callback?: Callback): this;
|
||||
setHeader(name: string, value: number | string | ReadonlyArray<string>): this;
|
||||
getHeader(name: string): number | string | string[] | undefined;
|
||||
getHeaders(): http.OutgoingHttpHeaders;
|
||||
getHeaderNames(): string[];
|
||||
hasHeader(name: string): boolean;
|
||||
removeHeader(name: string): void;
|
||||
addTrailers(_headers: http.OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void;
|
||||
flushHeaders(): void;
|
||||
}
|
||||
81
node_modules/unenv/runtime/node/http/_response.mjs
generated
vendored
Normal file
81
node_modules/unenv/runtime/node/http/_response.mjs
generated
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
import { Writable } from "../stream/writable.mjs";
|
||||
export class ServerResponse extends Writable {
|
||||
constructor(req) {
|
||||
super();
|
||||
this.statusCode = 200;
|
||||
this.statusMessage = "";
|
||||
this.upgrading = false;
|
||||
this.chunkedEncoding = false;
|
||||
this.shouldKeepAlive = false;
|
||||
this.useChunkedEncodingByDefault = false;
|
||||
this.sendDate = false;
|
||||
this.finished = false;
|
||||
this.headersSent = false;
|
||||
this.connection = null;
|
||||
this.socket = null;
|
||||
this._headers = {};
|
||||
this.req = req;
|
||||
}
|
||||
assignSocket(socket) {
|
||||
socket._httpMessage = this;
|
||||
this.socket = socket;
|
||||
this.connection = socket;
|
||||
this.emit("socket", socket);
|
||||
this._flush();
|
||||
}
|
||||
_flush() {
|
||||
this.flushHeaders();
|
||||
}
|
||||
detachSocket(_socket) {
|
||||
}
|
||||
writeContinue(_callback) {
|
||||
}
|
||||
writeHead(statusCode, arg1, arg2) {
|
||||
if (statusCode) {
|
||||
this.statusCode = statusCode;
|
||||
}
|
||||
if (typeof arg1 === "string") {
|
||||
this.statusMessage = arg1;
|
||||
arg1 = void 0;
|
||||
}
|
||||
const headers = arg2 || arg1;
|
||||
if (headers) {
|
||||
if (Array.isArray(headers)) {
|
||||
} else {
|
||||
for (const key in headers) {
|
||||
this.setHeader(key, headers[key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.headersSent = true;
|
||||
return this;
|
||||
}
|
||||
writeProcessing() {
|
||||
}
|
||||
setTimeout(_msecs, _callback) {
|
||||
return this;
|
||||
}
|
||||
setHeader(name, value) {
|
||||
this._headers[name.toLowerCase()] = value + "";
|
||||
return this;
|
||||
}
|
||||
getHeader(name) {
|
||||
return this._headers[name.toLowerCase()];
|
||||
}
|
||||
getHeaders() {
|
||||
return this._headers;
|
||||
}
|
||||
getHeaderNames() {
|
||||
return Object.keys(this._headers);
|
||||
}
|
||||
hasHeader(name) {
|
||||
return name.toLowerCase() in this._headers;
|
||||
}
|
||||
removeHeader(name) {
|
||||
delete this._headers[name.toLowerCase()];
|
||||
}
|
||||
addTrailers(_headers) {
|
||||
}
|
||||
flushHeaders() {
|
||||
}
|
||||
}
|
||||
106
node_modules/unenv/runtime/node/http/index.cjs
generated
vendored
Normal file
106
node_modules/unenv/runtime/node/http/index.cjs
generated
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _exportNames = {
|
||||
createServer: true,
|
||||
request: true,
|
||||
get: true,
|
||||
Server: true,
|
||||
OutgoingMessage: true,
|
||||
ClientRequest: true,
|
||||
Agent: true,
|
||||
globalAgent: true
|
||||
};
|
||||
exports.request = exports.globalAgent = exports.get = exports.default = exports.createServer = exports.Server = exports.OutgoingMessage = exports.ClientRequest = exports.Agent = void 0;
|
||||
|
||||
var _utils = require("../../_internal/utils.cjs");
|
||||
|
||||
var _proxy = _interopRequireDefault(require("../../mock/proxy.cjs"));
|
||||
|
||||
var consts = _interopRequireWildcard(require("./_consts.cjs"));
|
||||
|
||||
Object.keys(consts).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === consts[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return consts[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var _request = require("./_request.cjs");
|
||||
|
||||
Object.keys(_request).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === _request[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _request[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var _response = require("./_response.cjs");
|
||||
|
||||
Object.keys(_response).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === _response[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _response[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
||||
|
||||
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
const createServer = (0, _utils.notImplemented)("http.createServer");
|
||||
exports.createServer = createServer;
|
||||
const request = (0, _utils.notImplemented)("http.request");
|
||||
exports.request = request;
|
||||
const get = (0, _utils.notImplemented)("http.get");
|
||||
exports.get = get;
|
||||
|
||||
const Server = _proxy.default.__createMock__("http.Server");
|
||||
|
||||
exports.Server = Server;
|
||||
|
||||
const OutgoingMessage = _proxy.default.__createMock__("http.OutgoingMessage");
|
||||
|
||||
exports.OutgoingMessage = OutgoingMessage;
|
||||
|
||||
const ClientRequest = _proxy.default.__createMock__("http.ClientRequest");
|
||||
|
||||
exports.ClientRequest = ClientRequest;
|
||||
|
||||
const Agent = _proxy.default.__createMock__("http.Agent");
|
||||
|
||||
exports.Agent = Agent;
|
||||
const globalAgent = new Agent();
|
||||
exports.globalAgent = globalAgent;
|
||||
var _default = { ...consts,
|
||||
IncomingMessage: _request.IncomingMessage,
|
||||
ServerResponse: _response.ServerResponse,
|
||||
createServer,
|
||||
request,
|
||||
get,
|
||||
Server,
|
||||
OutgoingMessage,
|
||||
ClientRequest,
|
||||
Agent,
|
||||
globalAgent
|
||||
};
|
||||
module.exports = _default;
|
||||
14
node_modules/unenv/runtime/node/http/index.d.ts
generated
vendored
Normal file
14
node_modules/unenv/runtime/node/http/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import http from "node:http";
|
||||
export * from "./_consts";
|
||||
export * from "./_request";
|
||||
export * from "./_response";
|
||||
export declare const createServer: typeof http.createServer;
|
||||
export declare const request: typeof http.request;
|
||||
export declare const get: typeof http.get;
|
||||
export declare const Server: typeof http.Server;
|
||||
export declare const OutgoingMessage: typeof http.OutgoingMessage;
|
||||
export declare const ClientRequest: typeof http.ClientRequest;
|
||||
export declare const Agent: typeof http.Agent;
|
||||
export declare const globalAgent: typeof http.globalAgent;
|
||||
declare const _default: any;
|
||||
export default _default;
|
||||
29
node_modules/unenv/runtime/node/http/index.mjs
generated
vendored
Normal file
29
node_modules/unenv/runtime/node/http/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
import { notImplemented } from "../../_internal/utils.mjs";
|
||||
import mock from "../../mock/proxy.mjs";
|
||||
import * as consts from "./_consts.mjs";
|
||||
import { IncomingMessage } from "./_request.mjs";
|
||||
import { ServerResponse } from "./_response.mjs";
|
||||
export * from "./_consts.mjs";
|
||||
export * from "./_request.mjs";
|
||||
export * from "./_response.mjs";
|
||||
export const createServer = notImplemented("http.createServer");
|
||||
export const request = notImplemented("http.request");
|
||||
export const get = notImplemented("http.get");
|
||||
export const Server = mock.__createMock__("http.Server");
|
||||
export const OutgoingMessage = mock.__createMock__("http.OutgoingMessage");
|
||||
export const ClientRequest = mock.__createMock__("http.ClientRequest");
|
||||
export const Agent = mock.__createMock__("http.Agent");
|
||||
export const globalAgent = new Agent();
|
||||
export default {
|
||||
...consts,
|
||||
IncomingMessage,
|
||||
ServerResponse,
|
||||
createServer,
|
||||
request,
|
||||
get,
|
||||
Server,
|
||||
OutgoingMessage,
|
||||
ClientRequest,
|
||||
Agent,
|
||||
globalAgent
|
||||
};
|
||||
29
node_modules/unenv/runtime/node/net/index.cjs
generated
vendored
Normal file
29
node_modules/unenv/runtime/node/net/index.cjs
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _exportNames = {};
|
||||
module.exports = void 0;
|
||||
|
||||
var socket = _interopRequireWildcard(require("./socket.cjs"));
|
||||
|
||||
Object.keys(socket).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === socket[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return socket[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
||||
|
||||
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||
|
||||
var _default = { ...socket
|
||||
};
|
||||
module.exports = _default;
|
||||
3
node_modules/unenv/runtime/node/net/index.d.ts
generated
vendored
Normal file
3
node_modules/unenv/runtime/node/net/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export * from "./socket";
|
||||
declare const _default: any;
|
||||
export default _default;
|
||||
5
node_modules/unenv/runtime/node/net/index.mjs
generated
vendored
Normal file
5
node_modules/unenv/runtime/node/net/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import * as socket from "./socket.mjs";
|
||||
export * from "./socket.mjs";
|
||||
export default {
|
||||
...socket
|
||||
};
|
||||
76
node_modules/unenv/runtime/node/net/socket.cjs
generated
vendored
Normal file
76
node_modules/unenv/runtime/node/net/socket.cjs
generated
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.Socket = void 0;
|
||||
|
||||
var _duplex = require("../stream/duplex.cjs");
|
||||
|
||||
class Socket extends _duplex.Duplex {
|
||||
constructor(_options) {
|
||||
super();
|
||||
this.bufferSize = 0;
|
||||
this.bytesRead = 0;
|
||||
this.bytesWritten = 0;
|
||||
this.connecting = false;
|
||||
this.destroyed = false;
|
||||
this.localAddress = "";
|
||||
this.localPort = 0;
|
||||
this.remoteAddress = "";
|
||||
this.remoteFamily = "";
|
||||
this.remotePort = 0;
|
||||
this.readyState = "readOnly";
|
||||
}
|
||||
|
||||
write(_buffer, _arg1, _arg2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
connect(_arg1, _arg2, _arg3) {
|
||||
return this;
|
||||
}
|
||||
|
||||
end(_arg1, _arg2, _arg3) {
|
||||
return this;
|
||||
}
|
||||
|
||||
setEncoding(_encoding) {
|
||||
return this;
|
||||
}
|
||||
|
||||
pause() {
|
||||
return this;
|
||||
}
|
||||
|
||||
resume() {
|
||||
return this;
|
||||
}
|
||||
|
||||
setTimeout(_timeout, _callback) {
|
||||
return this;
|
||||
}
|
||||
|
||||
setNoDelay(_noDelay) {
|
||||
return this;
|
||||
}
|
||||
|
||||
setKeepAlive(_enable, _initialDelay) {
|
||||
return this;
|
||||
}
|
||||
|
||||
address() {
|
||||
return {};
|
||||
}
|
||||
|
||||
unref() {
|
||||
return this;
|
||||
}
|
||||
|
||||
ref() {
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
exports.Socket = Socket;
|
||||
30
node_modules/unenv/runtime/node/net/socket.d.ts
generated
vendored
Normal file
30
node_modules/unenv/runtime/node/net/socket.d.ts
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
/// <reference types="node" />
|
||||
import type * as net from "node:net";
|
||||
import { Callback, BufferEncoding } from "../../_internal/types";
|
||||
import { Duplex } from "../stream/duplex";
|
||||
export declare class Socket extends Duplex implements net.Socket {
|
||||
readonly bufferSize: number;
|
||||
readonly bytesRead: number;
|
||||
readonly bytesWritten: number;
|
||||
readonly connecting: boolean;
|
||||
readonly destroyed: boolean;
|
||||
readonly localAddress: string;
|
||||
readonly localPort: number;
|
||||
readonly remoteAddress?: string;
|
||||
readonly remoteFamily?: string;
|
||||
readonly remotePort?: number;
|
||||
readonly readyState: net.SocketReadyState;
|
||||
constructor(_options?: net.SocketConstructorOpts);
|
||||
write(_buffer: Uint8Array | string, _arg1?: BufferEncoding | Callback<Error | undefined>, _arg2?: Callback<Error | undefined>): boolean;
|
||||
connect(_arg1: number | string | net.SocketConnectOpts, _arg2?: string | Callback, _arg3?: Callback): this;
|
||||
end(_arg1?: Callback | Uint8Array | string, _arg2?: BufferEncoding | Callback, _arg3?: Callback): this;
|
||||
setEncoding(_encoding?: BufferEncoding): this;
|
||||
pause(): this;
|
||||
resume(): this;
|
||||
setTimeout(_timeout: number, _callback?: Callback): this;
|
||||
setNoDelay(_noDelay?: boolean): this;
|
||||
setKeepAlive(_enable?: boolean, _initialDelay?: number): this;
|
||||
address(): {};
|
||||
unref(): this;
|
||||
ref(): this;
|
||||
}
|
||||
53
node_modules/unenv/runtime/node/net/socket.mjs
generated
vendored
Normal file
53
node_modules/unenv/runtime/node/net/socket.mjs
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
import { Duplex } from "../stream/duplex.mjs";
|
||||
export class Socket extends Duplex {
|
||||
constructor(_options) {
|
||||
super();
|
||||
this.bufferSize = 0;
|
||||
this.bytesRead = 0;
|
||||
this.bytesWritten = 0;
|
||||
this.connecting = false;
|
||||
this.destroyed = false;
|
||||
this.localAddress = "";
|
||||
this.localPort = 0;
|
||||
this.remoteAddress = "";
|
||||
this.remoteFamily = "";
|
||||
this.remotePort = 0;
|
||||
this.readyState = "readOnly";
|
||||
}
|
||||
write(_buffer, _arg1, _arg2) {
|
||||
return false;
|
||||
}
|
||||
connect(_arg1, _arg2, _arg3) {
|
||||
return this;
|
||||
}
|
||||
end(_arg1, _arg2, _arg3) {
|
||||
return this;
|
||||
}
|
||||
setEncoding(_encoding) {
|
||||
return this;
|
||||
}
|
||||
pause() {
|
||||
return this;
|
||||
}
|
||||
resume() {
|
||||
return this;
|
||||
}
|
||||
setTimeout(_timeout, _callback) {
|
||||
return this;
|
||||
}
|
||||
setNoDelay(_noDelay) {
|
||||
return this;
|
||||
}
|
||||
setKeepAlive(_enable, _initialDelay) {
|
||||
return this;
|
||||
}
|
||||
address() {
|
||||
return {};
|
||||
}
|
||||
unref() {
|
||||
return this;
|
||||
}
|
||||
ref() {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
45
node_modules/unenv/runtime/node/path/index.cjs
generated
vendored
Normal file
45
node_modules/unenv/runtime/node/path/index.cjs
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _exportNames = {
|
||||
posix: true,
|
||||
win32: true,
|
||||
platform: true
|
||||
};
|
||||
exports.win32 = exports.posix = exports.platform = exports.default = void 0;
|
||||
|
||||
var _path = _interopRequireWildcard(require("pathe"));
|
||||
|
||||
Object.keys(_path).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === _path[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _path[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
||||
|
||||
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||
|
||||
const _pathModule = { ..._path,
|
||||
platform: "posix",
|
||||
posix: void 0,
|
||||
win32: void 0
|
||||
};
|
||||
_pathModule.posix = _pathModule;
|
||||
_pathModule.win32 = _pathModule;
|
||||
const posix = _pathModule;
|
||||
exports.posix = posix;
|
||||
const win32 = _pathModule;
|
||||
exports.win32 = win32;
|
||||
const platform = "posix";
|
||||
exports.platform = platform;
|
||||
var _default = _pathModule;
|
||||
module.exports = _default;
|
||||
7
node_modules/unenv/runtime/node/path/index.d.ts
generated
vendored
Normal file
7
node_modules/unenv/runtime/node/path/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import type path from "node:path";
|
||||
export * from "pathe";
|
||||
export declare const posix: typeof path.posix;
|
||||
export declare const win32: typeof path.posix;
|
||||
export declare const platform = "posix";
|
||||
declare const _default: any;
|
||||
export default _default;
|
||||
14
node_modules/unenv/runtime/node/path/index.mjs
generated
vendored
Normal file
14
node_modules/unenv/runtime/node/path/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import * as _path from "pathe";
|
||||
export * from "pathe";
|
||||
const _pathModule = {
|
||||
..._path,
|
||||
platform: "posix",
|
||||
posix: void 0,
|
||||
win32: void 0
|
||||
};
|
||||
_pathModule.posix = _pathModule;
|
||||
_pathModule.win32 = _pathModule;
|
||||
export const posix = _pathModule;
|
||||
export const win32 = _pathModule;
|
||||
export const platform = "posix";
|
||||
export default _pathModule;
|
||||
194
node_modules/unenv/runtime/node/process/_process.cjs
generated
vendored
Normal file
194
node_modules/unenv/runtime/node/process/_process.cjs
generated
vendored
Normal file
@@ -0,0 +1,194 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.process = void 0;
|
||||
const process = {};
|
||||
exports.process = process;
|
||||
let cachedSetTimeout;
|
||||
let cachedClearTimeout;
|
||||
|
||||
function defaultSetTimeout() {
|
||||
throw new Error("setTimeout has not been defined");
|
||||
}
|
||||
|
||||
function defaultClearTimeout() {
|
||||
throw new Error("clearTimeout has not been defined");
|
||||
}
|
||||
|
||||
(function () {
|
||||
try {
|
||||
cachedSetTimeout = typeof setTimeout === "function" ? setTimeout : defaultSetTimeout;
|
||||
} catch {
|
||||
cachedSetTimeout = defaultSetTimeout;
|
||||
}
|
||||
|
||||
try {
|
||||
cachedClearTimeout = typeof clearTimeout === "function" ? clearTimeout : defaultClearTimeout;
|
||||
} catch {
|
||||
cachedClearTimeout = defaultClearTimeout;
|
||||
}
|
||||
})();
|
||||
|
||||
function runTimeout(fun) {
|
||||
if (cachedSetTimeout === setTimeout) {
|
||||
return setTimeout(fun, 0);
|
||||
}
|
||||
|
||||
if ((cachedSetTimeout === defaultSetTimeout || !cachedSetTimeout) && setTimeout) {
|
||||
cachedSetTimeout = setTimeout;
|
||||
return setTimeout(fun, 0);
|
||||
}
|
||||
|
||||
try {
|
||||
return cachedSetTimeout(fun, 0);
|
||||
} catch {
|
||||
try {
|
||||
return cachedSetTimeout.call(null, fun, 0);
|
||||
} catch {
|
||||
return cachedSetTimeout.call(this, fun, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function runClearTimeout(marker) {
|
||||
if (cachedClearTimeout === clearTimeout) {
|
||||
return clearTimeout(marker);
|
||||
}
|
||||
|
||||
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
||||
cachedClearTimeout = clearTimeout;
|
||||
return clearTimeout(marker);
|
||||
}
|
||||
|
||||
try {
|
||||
return cachedClearTimeout(marker);
|
||||
} catch {
|
||||
try {
|
||||
return cachedClearTimeout.call(null, marker);
|
||||
} catch {
|
||||
return cachedClearTimeout.call(this, marker);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let queue = [];
|
||||
let draining = false;
|
||||
let currentQueue;
|
||||
let queueIndex = -1;
|
||||
|
||||
function cleanUpNextTick() {
|
||||
if (!draining || !currentQueue) {
|
||||
return;
|
||||
}
|
||||
|
||||
draining = false;
|
||||
|
||||
if (currentQueue.length > 0) {
|
||||
queue = [...currentQueue, ...queue];
|
||||
} else {
|
||||
queueIndex = -1;
|
||||
}
|
||||
|
||||
if (queue.length > 0) {
|
||||
drainQueue();
|
||||
}
|
||||
}
|
||||
|
||||
function drainQueue() {
|
||||
if (draining) {
|
||||
return;
|
||||
}
|
||||
|
||||
const timeout = runTimeout(cleanUpNextTick);
|
||||
draining = true;
|
||||
let len = queue.length;
|
||||
|
||||
while (len) {
|
||||
currentQueue = queue;
|
||||
queue = [];
|
||||
|
||||
while (++queueIndex < len) {
|
||||
if (currentQueue) {
|
||||
currentQueue[queueIndex].run();
|
||||
}
|
||||
}
|
||||
|
||||
queueIndex = -1;
|
||||
len = queue.length;
|
||||
}
|
||||
|
||||
currentQueue = null;
|
||||
draining = false;
|
||||
runClearTimeout(timeout);
|
||||
}
|
||||
|
||||
process.nextTick = function (fun) {
|
||||
const args = Array.from({
|
||||
length: arguments.length - 1
|
||||
});
|
||||
|
||||
if (arguments.length > 1) {
|
||||
for (let i = 1; i < arguments.length; i++) {
|
||||
args[i - 1] = arguments[i];
|
||||
}
|
||||
}
|
||||
|
||||
queue.push(new Item(fun, args));
|
||||
|
||||
if (queue.length === 1 && !draining) {
|
||||
runTimeout(drainQueue);
|
||||
}
|
||||
};
|
||||
|
||||
function Item(fun, array) {
|
||||
this.fun = fun;
|
||||
this.array = array;
|
||||
}
|
||||
|
||||
Item.prototype.run = function () {
|
||||
this.fun.apply(null, this.array);
|
||||
};
|
||||
|
||||
process.title = "unenv";
|
||||
process.env = {};
|
||||
process.argv = [];
|
||||
process.version = "";
|
||||
process.versions = {};
|
||||
|
||||
function noop() {
|
||||
return process;
|
||||
}
|
||||
|
||||
process.on = noop;
|
||||
process.addListener = noop;
|
||||
process.once = noop;
|
||||
process.off = noop;
|
||||
process.removeListener = noop;
|
||||
process.removeAllListeners = noop;
|
||||
process.emit = noop;
|
||||
process.prependListener = noop;
|
||||
process.prependOnceListener = noop;
|
||||
|
||||
process.listeners = function (name) {
|
||||
return [];
|
||||
};
|
||||
|
||||
process.binding = function (name) {
|
||||
throw new Error("[unenv] process.binding is not supported");
|
||||
};
|
||||
|
||||
let cwd = "/";
|
||||
|
||||
process.cwd = function () {
|
||||
return cwd;
|
||||
};
|
||||
|
||||
process.chdir = function (dir) {
|
||||
cwd = dir;
|
||||
};
|
||||
|
||||
process.umask = function () {
|
||||
return 0;
|
||||
};
|
||||
2
node_modules/unenv/runtime/node/process/_process.d.ts
generated
vendored
Normal file
2
node_modules/unenv/runtime/node/process/_process.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/// <reference types="node" />
|
||||
export declare const process: NodeJS.Process;
|
||||
149
node_modules/unenv/runtime/node/process/_process.mjs
generated
vendored
Normal file
149
node_modules/unenv/runtime/node/process/_process.mjs
generated
vendored
Normal file
@@ -0,0 +1,149 @@
|
||||
export const process = {};
|
||||
let cachedSetTimeout;
|
||||
let cachedClearTimeout;
|
||||
function defaultSetTimeout() {
|
||||
throw new Error("setTimeout has not been defined");
|
||||
}
|
||||
function defaultClearTimeout() {
|
||||
throw new Error("clearTimeout has not been defined");
|
||||
}
|
||||
(function() {
|
||||
try {
|
||||
cachedSetTimeout = typeof setTimeout === "function" ? setTimeout : defaultSetTimeout;
|
||||
} catch {
|
||||
cachedSetTimeout = defaultSetTimeout;
|
||||
}
|
||||
try {
|
||||
cachedClearTimeout = typeof clearTimeout === "function" ? clearTimeout : defaultClearTimeout;
|
||||
} catch {
|
||||
cachedClearTimeout = defaultClearTimeout;
|
||||
}
|
||||
})();
|
||||
function runTimeout(fun) {
|
||||
if (cachedSetTimeout === setTimeout) {
|
||||
return setTimeout(fun, 0);
|
||||
}
|
||||
if ((cachedSetTimeout === defaultSetTimeout || !cachedSetTimeout) && setTimeout) {
|
||||
cachedSetTimeout = setTimeout;
|
||||
return setTimeout(fun, 0);
|
||||
}
|
||||
try {
|
||||
return cachedSetTimeout(fun, 0);
|
||||
} catch {
|
||||
try {
|
||||
return cachedSetTimeout.call(null, fun, 0);
|
||||
} catch {
|
||||
return cachedSetTimeout.call(this, fun, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
function runClearTimeout(marker) {
|
||||
if (cachedClearTimeout === clearTimeout) {
|
||||
return clearTimeout(marker);
|
||||
}
|
||||
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
||||
cachedClearTimeout = clearTimeout;
|
||||
return clearTimeout(marker);
|
||||
}
|
||||
try {
|
||||
return cachedClearTimeout(marker);
|
||||
} catch {
|
||||
try {
|
||||
return cachedClearTimeout.call(null, marker);
|
||||
} catch {
|
||||
return cachedClearTimeout.call(this, marker);
|
||||
}
|
||||
}
|
||||
}
|
||||
let queue = [];
|
||||
let draining = false;
|
||||
let currentQueue;
|
||||
let queueIndex = -1;
|
||||
function cleanUpNextTick() {
|
||||
if (!draining || !currentQueue) {
|
||||
return;
|
||||
}
|
||||
draining = false;
|
||||
if (currentQueue.length > 0) {
|
||||
queue = [...currentQueue, ...queue];
|
||||
} else {
|
||||
queueIndex = -1;
|
||||
}
|
||||
if (queue.length > 0) {
|
||||
drainQueue();
|
||||
}
|
||||
}
|
||||
function drainQueue() {
|
||||
if (draining) {
|
||||
return;
|
||||
}
|
||||
const timeout = runTimeout(cleanUpNextTick);
|
||||
draining = true;
|
||||
let len = queue.length;
|
||||
while (len) {
|
||||
currentQueue = queue;
|
||||
queue = [];
|
||||
while (++queueIndex < len) {
|
||||
if (currentQueue) {
|
||||
currentQueue[queueIndex].run();
|
||||
}
|
||||
}
|
||||
queueIndex = -1;
|
||||
len = queue.length;
|
||||
}
|
||||
currentQueue = null;
|
||||
draining = false;
|
||||
runClearTimeout(timeout);
|
||||
}
|
||||
process.nextTick = function(fun) {
|
||||
const args = Array.from({ length: arguments.length - 1 });
|
||||
if (arguments.length > 1) {
|
||||
for (let i = 1; i < arguments.length; i++) {
|
||||
args[i - 1] = arguments[i];
|
||||
}
|
||||
}
|
||||
queue.push(new Item(fun, args));
|
||||
if (queue.length === 1 && !draining) {
|
||||
runTimeout(drainQueue);
|
||||
}
|
||||
};
|
||||
function Item(fun, array) {
|
||||
this.fun = fun;
|
||||
this.array = array;
|
||||
}
|
||||
Item.prototype.run = function() {
|
||||
this.fun.apply(null, this.array);
|
||||
};
|
||||
process.title = "unenv";
|
||||
process.env = {};
|
||||
process.argv = [];
|
||||
process.version = "";
|
||||
process.versions = {};
|
||||
function noop() {
|
||||
return process;
|
||||
}
|
||||
process.on = noop;
|
||||
process.addListener = noop;
|
||||
process.once = noop;
|
||||
process.off = noop;
|
||||
process.removeListener = noop;
|
||||
process.removeAllListeners = noop;
|
||||
process.emit = noop;
|
||||
process.prependListener = noop;
|
||||
process.prependOnceListener = noop;
|
||||
process.listeners = function(name) {
|
||||
return [];
|
||||
};
|
||||
process.binding = function(name) {
|
||||
throw new Error("[unenv] process.binding is not supported");
|
||||
};
|
||||
let cwd = "/";
|
||||
process.cwd = function() {
|
||||
return cwd;
|
||||
};
|
||||
process.chdir = function(dir) {
|
||||
cwd = dir;
|
||||
};
|
||||
process.umask = function() {
|
||||
return 0;
|
||||
};
|
||||
11
node_modules/unenv/runtime/node/process/index.cjs
generated
vendored
Normal file
11
node_modules/unenv/runtime/node/process/index.cjs
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
module.exports = void 0;
|
||||
|
||||
var _process2 = require("./_process.cjs");
|
||||
|
||||
var _default = _process2.process;
|
||||
module.exports = _default;
|
||||
2
node_modules/unenv/runtime/node/process/index.d.ts
generated
vendored
Normal file
2
node_modules/unenv/runtime/node/process/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
declare const _default: any;
|
||||
export default _default;
|
||||
2
node_modules/unenv/runtime/node/process/index.mjs
generated
vendored
Normal file
2
node_modules/unenv/runtime/node/process/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { process as _process } from "./_process.mjs";
|
||||
export default _process;
|
||||
27
node_modules/unenv/runtime/node/stream/consumers/index.cjs
generated
vendored
Normal file
27
node_modules/unenv/runtime/node/stream/consumers/index.cjs
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.text = exports.json = exports.default = exports.buffer = exports.blob = exports.arrayBuffer = void 0;
|
||||
|
||||
var _utils = require("../../../_internal/utils.cjs");
|
||||
|
||||
const arrayBuffer = (0, _utils.notImplemented)("stream.consumers.arrayBuffer");
|
||||
exports.arrayBuffer = arrayBuffer;
|
||||
const blob = (0, _utils.notImplemented)("stream.consumers.blob");
|
||||
exports.blob = blob;
|
||||
const buffer = (0, _utils.notImplemented)("stream.consumers.buffer");
|
||||
exports.buffer = buffer;
|
||||
const text = (0, _utils.notImplemented)("stream.consumers.text");
|
||||
exports.text = text;
|
||||
const json = (0, _utils.notImplemented)("stream.consumers.json");
|
||||
exports.json = json;
|
||||
var _default = {
|
||||
arrayBuffer,
|
||||
blob,
|
||||
buffer,
|
||||
text,
|
||||
json
|
||||
};
|
||||
module.exports = _default;
|
||||
9
node_modules/unenv/runtime/node/stream/consumers/index.d.ts
generated
vendored
Normal file
9
node_modules/unenv/runtime/node/stream/consumers/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
/// <reference types="node" />
|
||||
import type * as stramConsumers from "node:stream/consumers";
|
||||
export declare const arrayBuffer: () => any;
|
||||
export declare const blob: () => any;
|
||||
export declare const buffer: () => any;
|
||||
export declare const text: () => any;
|
||||
export declare const json: () => any;
|
||||
declare const _default: typeof stramConsumers;
|
||||
export default _default;
|
||||
13
node_modules/unenv/runtime/node/stream/consumers/index.mjs
generated
vendored
Normal file
13
node_modules/unenv/runtime/node/stream/consumers/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import { notImplemented } from "../../../_internal/utils.mjs";
|
||||
export const arrayBuffer = notImplemented("stream.consumers.arrayBuffer");
|
||||
export const blob = notImplemented("stream.consumers.blob");
|
||||
export const buffer = notImplemented("stream.consumers.buffer");
|
||||
export const text = notImplemented("stream.consumers.text");
|
||||
export const json = notImplemented("stream.consumers.json");
|
||||
export default {
|
||||
arrayBuffer,
|
||||
blob,
|
||||
buffer,
|
||||
text,
|
||||
json
|
||||
};
|
||||
25
node_modules/unenv/runtime/node/stream/duplex.cjs
generated
vendored
Normal file
25
node_modules/unenv/runtime/node/stream/duplex.cjs
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.Duplex = void 0;
|
||||
|
||||
var _utils = require("../../_internal/utils.cjs");
|
||||
|
||||
var _readable = require("./readable.cjs");
|
||||
|
||||
var _writable = require("./writable.cjs");
|
||||
|
||||
const Duplex = class {
|
||||
constructor(readable = new _readable.Readable(), writable = new _writable.Writable()) {
|
||||
this.allowHalfOpen = true;
|
||||
Object.assign(this, readable);
|
||||
Object.assign(this, writable);
|
||||
this._destroy = (0, _utils.mergeFns)(readable._destroy, writable._destroy);
|
||||
}
|
||||
|
||||
};
|
||||
exports.Duplex = Duplex;
|
||||
Object.assign(Duplex.prototype, _readable.Readable.prototype);
|
||||
Object.assign(Duplex.prototype, _writable.Writable.prototype);
|
||||
5
node_modules/unenv/runtime/node/stream/duplex.d.ts
generated
vendored
Normal file
5
node_modules/unenv/runtime/node/stream/duplex.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
/// <reference types="node" />
|
||||
import type * as stream from "node:stream";
|
||||
declare type DuplexClass = new () => stream.Duplex;
|
||||
export declare const Duplex: DuplexClass;
|
||||
export {};
|
||||
13
node_modules/unenv/runtime/node/stream/duplex.mjs
generated
vendored
Normal file
13
node_modules/unenv/runtime/node/stream/duplex.mjs
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import { mergeFns } from "../../_internal/utils.mjs";
|
||||
import { Readable } from "./readable.mjs";
|
||||
import { Writable } from "./writable.mjs";
|
||||
export const Duplex = class {
|
||||
constructor(readable = new Readable(), writable = new Writable()) {
|
||||
this.allowHalfOpen = true;
|
||||
Object.assign(this, readable);
|
||||
Object.assign(this, writable);
|
||||
this._destroy = mergeFns(readable._destroy, writable._destroy);
|
||||
}
|
||||
};
|
||||
Object.assign(Duplex.prototype, Readable.prototype);
|
||||
Object.assign(Duplex.prototype, Writable.prototype);
|
||||
100
node_modules/unenv/runtime/node/stream/index.cjs
generated
vendored
Normal file
100
node_modules/unenv/runtime/node/stream/index.cjs
generated
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "Duplex", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _duplex.Duplex;
|
||||
}
|
||||
});
|
||||
exports.PassThrough = void 0;
|
||||
Object.defineProperty(exports, "Readable", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _readable.Readable;
|
||||
}
|
||||
});
|
||||
exports.Stream = void 0;
|
||||
Object.defineProperty(exports, "Transform", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _transform.Transform;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "Writable", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _writable.Writable;
|
||||
}
|
||||
});
|
||||
exports.pipeline = exports.isReadable = exports.isErrored = exports.isDisturbed = exports.finished = exports.destroy = exports.default = exports.compose = exports.addAbortSignal = exports._uint8ArrayToBuffer = exports._isUint8Array = void 0;
|
||||
|
||||
var _proxy = _interopRequireDefault(require("../../mock/proxy.cjs"));
|
||||
|
||||
var _utils = require("../../_internal/utils.cjs");
|
||||
|
||||
var _readable = require("./readable.cjs");
|
||||
|
||||
var _writable = require("./writable.cjs");
|
||||
|
||||
var _duplex = require("./duplex.cjs");
|
||||
|
||||
var _transform = require("./transform.cjs");
|
||||
|
||||
var _index = _interopRequireDefault(require("./promises/index.cjs"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
const Stream = _proxy.default.__createMock__("Stream");
|
||||
|
||||
exports.Stream = Stream;
|
||||
|
||||
const PassThrough = _proxy.default.__createMock__("PassThrough");
|
||||
|
||||
exports.PassThrough = PassThrough;
|
||||
const pipeline = (0, _utils.notImplemented)("stream.pipeline");
|
||||
exports.pipeline = pipeline;
|
||||
const finished = (0, _utils.notImplemented)("stream.finished");
|
||||
exports.finished = finished;
|
||||
const addAbortSignal = (0, _utils.notImplemented)("stream.addAbortSignal");
|
||||
exports.addAbortSignal = addAbortSignal;
|
||||
const isDisturbed = (0, _utils.notImplemented)("stream.isDisturbed");
|
||||
exports.isDisturbed = isDisturbed;
|
||||
const isReadable = (0, _utils.notImplemented)("stream.isReadable");
|
||||
exports.isReadable = isReadable;
|
||||
const compose = (0, _utils.notImplemented)("stream.compose");
|
||||
exports.compose = compose;
|
||||
const isErrored = (0, _utils.notImplemented)("stream.isErrored");
|
||||
exports.isErrored = isErrored;
|
||||
const destroy = (0, _utils.notImplemented)("stream.destroy");
|
||||
exports.destroy = destroy;
|
||||
|
||||
const _isUint8Array = (0, _utils.notImplemented)("stream._isUint8Array");
|
||||
|
||||
exports._isUint8Array = _isUint8Array;
|
||||
|
||||
const _uint8ArrayToBuffer = (0, _utils.notImplemented)("stream._uint8ArrayToBuffer");
|
||||
|
||||
exports._uint8ArrayToBuffer = _uint8ArrayToBuffer;
|
||||
var _default = {
|
||||
Readable: _readable.Readable,
|
||||
Writable: _writable.Writable,
|
||||
Duplex: _duplex.Duplex,
|
||||
Transform: _transform.Transform,
|
||||
Stream,
|
||||
PassThrough,
|
||||
pipeline,
|
||||
finished,
|
||||
addAbortSignal,
|
||||
promises: _index.default,
|
||||
isDisturbed,
|
||||
isReadable,
|
||||
compose,
|
||||
_uint8ArrayToBuffer,
|
||||
isErrored,
|
||||
destroy,
|
||||
_isUint8Array
|
||||
};
|
||||
module.exports = _default;
|
||||
19
node_modules/unenv/runtime/node/stream/index.d.ts
generated
vendored
Normal file
19
node_modules/unenv/runtime/node/stream/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import stream from "node:stream";
|
||||
export { Readable } from "./readable";
|
||||
export { Writable } from "./writable";
|
||||
export { Duplex } from "./duplex";
|
||||
export { Transform } from "./transform";
|
||||
export declare const Stream: stream.Stream;
|
||||
export declare const PassThrough: stream.PassThrough;
|
||||
export declare const pipeline: typeof stream.pipeline;
|
||||
export declare const finished: typeof stream.finished;
|
||||
export declare const addAbortSignal: typeof stream.addAbortSignal;
|
||||
export declare const isDisturbed: () => any;
|
||||
export declare const isReadable: () => any;
|
||||
export declare const compose: () => any;
|
||||
export declare const isErrored: () => any;
|
||||
export declare const destroy: () => any;
|
||||
export declare const _isUint8Array: () => any;
|
||||
export declare const _uint8ArrayToBuffer: () => any;
|
||||
declare const _default: any;
|
||||
export default _default;
|
||||
42
node_modules/unenv/runtime/node/stream/index.mjs
generated
vendored
Normal file
42
node_modules/unenv/runtime/node/stream/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
import mock from "../../mock/proxy.mjs";
|
||||
import { notImplemented } from "../../_internal/utils.mjs";
|
||||
import { Readable } from "./readable.mjs";
|
||||
import { Writable } from "./writable.mjs";
|
||||
import { Duplex } from "./duplex.mjs";
|
||||
import { Transform } from "./transform.mjs";
|
||||
import promises from "./promises/index.mjs";
|
||||
export { Readable } from "./readable.mjs";
|
||||
export { Writable } from "./writable.mjs";
|
||||
export { Duplex } from "./duplex.mjs";
|
||||
export { Transform } from "./transform.mjs";
|
||||
export const Stream = mock.__createMock__("Stream");
|
||||
export const PassThrough = mock.__createMock__("PassThrough");
|
||||
export const pipeline = notImplemented("stream.pipeline");
|
||||
export const finished = notImplemented("stream.finished");
|
||||
export const addAbortSignal = notImplemented("stream.addAbortSignal");
|
||||
export const isDisturbed = notImplemented("stream.isDisturbed");
|
||||
export const isReadable = notImplemented("stream.isReadable");
|
||||
export const compose = notImplemented("stream.compose");
|
||||
export const isErrored = notImplemented("stream.isErrored");
|
||||
export const destroy = notImplemented("stream.destroy");
|
||||
export const _isUint8Array = notImplemented("stream._isUint8Array");
|
||||
export const _uint8ArrayToBuffer = notImplemented("stream._uint8ArrayToBuffer");
|
||||
export default {
|
||||
Readable,
|
||||
Writable,
|
||||
Duplex,
|
||||
Transform,
|
||||
Stream,
|
||||
PassThrough,
|
||||
pipeline,
|
||||
finished,
|
||||
addAbortSignal,
|
||||
promises,
|
||||
isDisturbed,
|
||||
isReadable,
|
||||
compose,
|
||||
_uint8ArrayToBuffer,
|
||||
isErrored,
|
||||
destroy,
|
||||
_isUint8Array
|
||||
};
|
||||
18
node_modules/unenv/runtime/node/stream/promises/index.cjs
generated
vendored
Normal file
18
node_modules/unenv/runtime/node/stream/promises/index.cjs
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.pipeline = exports.finished = exports.default = void 0;
|
||||
|
||||
var _utils = require("../../../_internal/utils.cjs");
|
||||
|
||||
const finished = (0, _utils.notImplemented)("stream.promises.finished");
|
||||
exports.finished = finished;
|
||||
const pipeline = (0, _utils.notImplemented)("stream.promises.pipeline");
|
||||
exports.pipeline = pipeline;
|
||||
var _default = {
|
||||
finished,
|
||||
pipeline
|
||||
};
|
||||
module.exports = _default;
|
||||
6
node_modules/unenv/runtime/node/stream/promises/index.d.ts
generated
vendored
Normal file
6
node_modules/unenv/runtime/node/stream/promises/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/// <reference types="node" />
|
||||
import type * as stramPromises from "node:stream/promises";
|
||||
export declare const finished: () => any;
|
||||
export declare const pipeline: () => any;
|
||||
declare const _default: typeof stramPromises;
|
||||
export default _default;
|
||||
7
node_modules/unenv/runtime/node/stream/promises/index.mjs
generated
vendored
Normal file
7
node_modules/unenv/runtime/node/stream/promises/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { notImplemented } from "../../../_internal/utils.mjs";
|
||||
export const finished = notImplemented("stream.promises.finished");
|
||||
export const pipeline = notImplemented("stream.promises.pipeline");
|
||||
export default {
|
||||
finished,
|
||||
pipeline
|
||||
};
|
||||
83
node_modules/unenv/runtime/node/stream/readable.cjs
generated
vendored
Normal file
83
node_modules/unenv/runtime/node/stream/readable.cjs
generated
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.Readable = void 0;
|
||||
|
||||
var _nodeEvents = require("node:events");
|
||||
|
||||
class Readable extends _nodeEvents.EventEmitter {
|
||||
constructor(_opts) {
|
||||
super();
|
||||
this.readableEncoding = null;
|
||||
this.readableEnded = true;
|
||||
this.readableFlowing = false;
|
||||
this.readableHighWaterMark = 0;
|
||||
this.readableLength = 0;
|
||||
this.readableObjectMode = false;
|
||||
this.readableAborted = false;
|
||||
this.readableDidRead = false;
|
||||
this.readable = false;
|
||||
this.destroyed = false;
|
||||
}
|
||||
|
||||
static from(_iterable, options) {
|
||||
return new Readable(options);
|
||||
}
|
||||
|
||||
_read(_size) {}
|
||||
|
||||
read(_size) {}
|
||||
|
||||
setEncoding(_encoding) {
|
||||
return this;
|
||||
}
|
||||
|
||||
pause() {
|
||||
return this;
|
||||
}
|
||||
|
||||
resume() {
|
||||
return this;
|
||||
}
|
||||
|
||||
isPaused() {
|
||||
return true;
|
||||
}
|
||||
|
||||
unpipe(_destination) {
|
||||
return this;
|
||||
}
|
||||
|
||||
unshift(_chunk, _encoding) {}
|
||||
|
||||
wrap(_oldStream) {
|
||||
return this;
|
||||
}
|
||||
|
||||
push(_chunk, _encoding) {
|
||||
return false;
|
||||
}
|
||||
|
||||
_destroy(_error, _callback) {
|
||||
this.removeAllListeners();
|
||||
}
|
||||
|
||||
destroy(error) {
|
||||
this.destroyed = true;
|
||||
|
||||
this._destroy(error);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
pipe(_destenition, _options) {
|
||||
return {};
|
||||
}
|
||||
|
||||
async *[Symbol.asyncIterator]() {}
|
||||
|
||||
}
|
||||
|
||||
exports.Readable = Readable;
|
||||
35
node_modules/unenv/runtime/node/stream/readable.d.ts
generated
vendored
Normal file
35
node_modules/unenv/runtime/node/stream/readable.d.ts
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
import { EventEmitter } from "node:events";
|
||||
import type * as stream from "node:stream";
|
||||
import type { BufferEncoding, Callback } from "../../_internal/types";
|
||||
export declare class Readable extends EventEmitter implements stream.Readable {
|
||||
readonly readableEncoding: BufferEncoding | null;
|
||||
readonly readableEnded: boolean;
|
||||
readonly readableFlowing: boolean | null;
|
||||
readonly readableHighWaterMark: number;
|
||||
readonly readableLength: number;
|
||||
readonly readableObjectMode: boolean;
|
||||
readonly readableAborted: boolean;
|
||||
readonly readableDidRead: boolean;
|
||||
readable: boolean;
|
||||
destroyed: boolean;
|
||||
static from(_iterable: Iterable<any> | AsyncIterable<any>, options?: stream.ReadableOptions): Readable;
|
||||
constructor(_opts?: stream.ReadableOptions);
|
||||
_read(_size: number): void;
|
||||
read(_size?: number): void;
|
||||
setEncoding(_encoding: BufferEncoding): this;
|
||||
pause(): this;
|
||||
resume(): this;
|
||||
isPaused(): boolean;
|
||||
unpipe(_destination?: any): this;
|
||||
unshift(_chunk: any, _encoding?: BufferEncoding): void;
|
||||
wrap(_oldStream: any): this;
|
||||
push(_chunk: any, _encoding?: BufferEncoding): boolean;
|
||||
_destroy(_error?: any, _callback?: Callback<any>): void;
|
||||
destroy(error?: Error): this;
|
||||
pipe<T>(_destenition: T, _options?: {
|
||||
end?: boolean;
|
||||
}): T;
|
||||
[Symbol.asyncIterator](): AsyncIterableIterator<any>;
|
||||
}
|
||||
59
node_modules/unenv/runtime/node/stream/readable.mjs
generated
vendored
Normal file
59
node_modules/unenv/runtime/node/stream/readable.mjs
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
import { EventEmitter } from "node:events";
|
||||
export class Readable extends EventEmitter {
|
||||
constructor(_opts) {
|
||||
super();
|
||||
this.readableEncoding = null;
|
||||
this.readableEnded = true;
|
||||
this.readableFlowing = false;
|
||||
this.readableHighWaterMark = 0;
|
||||
this.readableLength = 0;
|
||||
this.readableObjectMode = false;
|
||||
this.readableAborted = false;
|
||||
this.readableDidRead = false;
|
||||
this.readable = false;
|
||||
this.destroyed = false;
|
||||
}
|
||||
static from(_iterable, options) {
|
||||
return new Readable(options);
|
||||
}
|
||||
_read(_size) {
|
||||
}
|
||||
read(_size) {
|
||||
}
|
||||
setEncoding(_encoding) {
|
||||
return this;
|
||||
}
|
||||
pause() {
|
||||
return this;
|
||||
}
|
||||
resume() {
|
||||
return this;
|
||||
}
|
||||
isPaused() {
|
||||
return true;
|
||||
}
|
||||
unpipe(_destination) {
|
||||
return this;
|
||||
}
|
||||
unshift(_chunk, _encoding) {
|
||||
}
|
||||
wrap(_oldStream) {
|
||||
return this;
|
||||
}
|
||||
push(_chunk, _encoding) {
|
||||
return false;
|
||||
}
|
||||
_destroy(_error, _callback) {
|
||||
this.removeAllListeners();
|
||||
}
|
||||
destroy(error) {
|
||||
this.destroyed = true;
|
||||
this._destroy(error);
|
||||
return this;
|
||||
}
|
||||
pipe(_destenition, _options) {
|
||||
return {};
|
||||
}
|
||||
async *[Symbol.asyncIterator]() {
|
||||
}
|
||||
}
|
||||
17
node_modules/unenv/runtime/node/stream/transform.cjs
generated
vendored
Normal file
17
node_modules/unenv/runtime/node/stream/transform.cjs
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.Transform = void 0;
|
||||
|
||||
var _duplex = require("./duplex.cjs");
|
||||
|
||||
class Transform extends _duplex.Duplex {
|
||||
_transform(chunk, encoding, callback) {}
|
||||
|
||||
_flush(callback) {}
|
||||
|
||||
}
|
||||
|
||||
exports.Transform = Transform;
|
||||
8
node_modules/unenv/runtime/node/stream/transform.d.ts
generated
vendored
Normal file
8
node_modules/unenv/runtime/node/stream/transform.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
import type * as stream from "node:stream";
|
||||
import { Duplex } from "./duplex";
|
||||
export declare class Transform extends Duplex implements stream.Transform {
|
||||
_transform(chunk: any, encoding: globalThis.BufferEncoding, callback: stream.TransformCallback): void;
|
||||
_flush(callback: stream.TransformCallback): void;
|
||||
}
|
||||
7
node_modules/unenv/runtime/node/stream/transform.mjs
generated
vendored
Normal file
7
node_modules/unenv/runtime/node/stream/transform.mjs
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { Duplex } from "./duplex.mjs";
|
||||
export class Transform extends Duplex {
|
||||
_transform(chunk, encoding, callback) {
|
||||
}
|
||||
_flush(callback) {
|
||||
}
|
||||
}
|
||||
57
node_modules/unenv/runtime/node/stream/web/index.cjs
generated
vendored
Normal file
57
node_modules/unenv/runtime/node/stream/web/index.cjs
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
module.exports = exports.WritableStreamDefaultWriter = exports.WritableStreamDefaultController = exports.WritableStream = exports.TransformStreamDefaultController = exports.TransformStream = exports.TextEncoderStream = exports.TextDecoderStream = exports.ReadableStreamDefaultReader = exports.ReadableStreamDefaultController = exports.ReadableStreamBYOBRequest = exports.ReadableStreamBYOBReader = exports.ReadableStream = exports.ReadableByteStreamController = exports.CountQueuingStrategy = exports.ByteLengthQueuingStrategy = void 0;
|
||||
|
||||
var _utils = require("../../../_internal/utils.cjs");
|
||||
|
||||
const ReadableStream = globalThis.ReadableStream || (0, _utils.notImplemented)("stream.web.ReadableStream");
|
||||
exports.ReadableStream = ReadableStream;
|
||||
const ReadableStreamDefaultReader = globalThis.ReadableStreamDefaultReader || (0, _utils.notImplemented)("stream.web.ReadableStreamDefaultReader");
|
||||
exports.ReadableStreamDefaultReader = ReadableStreamDefaultReader;
|
||||
const ReadableStreamBYOBReader = globalThis.ReadableStreamBYOBReader || (0, _utils.notImplemented)("stream.web.ReadableStreamBYOBReader");
|
||||
exports.ReadableStreamBYOBReader = ReadableStreamBYOBReader;
|
||||
const ReadableStreamBYOBRequest = globalThis.ReadableStreamBYOBRequest || (0, _utils.notImplemented)("stream.web.ReadableStreamBYOBRequest");
|
||||
exports.ReadableStreamBYOBRequest = ReadableStreamBYOBRequest;
|
||||
const ReadableByteStreamController = globalThis.ReadableByteStreamController || (0, _utils.notImplemented)("stream.web.ReadableByteStreamController");
|
||||
exports.ReadableByteStreamController = ReadableByteStreamController;
|
||||
const ReadableStreamDefaultController = globalThis.ReadableStreamDefaultController || (0, _utils.notImplemented)("stream.web.ReadableStreamDefaultController");
|
||||
exports.ReadableStreamDefaultController = ReadableStreamDefaultController;
|
||||
const TransformStream = globalThis.TransformStream || (0, _utils.notImplemented)("stream.web.TransformStream");
|
||||
exports.TransformStream = TransformStream;
|
||||
const TransformStreamDefaultController = globalThis.TransformStreamDefaultController || (0, _utils.notImplemented)("stream.web.TransformStreamDefaultController");
|
||||
exports.TransformStreamDefaultController = TransformStreamDefaultController;
|
||||
const WritableStream = globalThis.WritableStream || (0, _utils.notImplemented)("stream.web.WritableStream");
|
||||
exports.WritableStream = WritableStream;
|
||||
const WritableStreamDefaultWriter = globalThis.WritableStreamDefaultWriter || (0, _utils.notImplemented)("stream.web.WritableStreamDefaultWriter");
|
||||
exports.WritableStreamDefaultWriter = WritableStreamDefaultWriter;
|
||||
const WritableStreamDefaultController = globalThis.WritableStreamDefaultController || (0, _utils.notImplemented)("stream.web.WritableStreamDefaultController");
|
||||
exports.WritableStreamDefaultController = WritableStreamDefaultController;
|
||||
const ByteLengthQueuingStrategy = globalThis.ByteLengthQueuingStrategy || (0, _utils.notImplemented)("stream.web.ByteLengthQueuingStrategy");
|
||||
exports.ByteLengthQueuingStrategy = ByteLengthQueuingStrategy;
|
||||
const CountQueuingStrategy = globalThis.CountQueuingStrategy || (0, _utils.notImplemented)("stream.web.CountQueuingStrategy");
|
||||
exports.CountQueuingStrategy = CountQueuingStrategy;
|
||||
const TextEncoderStream = globalThis.TextEncoderStream || (0, _utils.notImplemented)("stream.web.TextEncoderStream");
|
||||
exports.TextEncoderStream = TextEncoderStream;
|
||||
const TextDecoderStream = globalThis.TextDecoderStream || (0, _utils.notImplemented)("stream.web.TextDecoderStream");
|
||||
exports.TextDecoderStream = TextDecoderStream;
|
||||
var _default = {
|
||||
ReadableStream,
|
||||
ReadableStreamDefaultReader,
|
||||
ReadableStreamBYOBReader,
|
||||
ReadableStreamBYOBRequest,
|
||||
ReadableByteStreamController,
|
||||
ReadableStreamDefaultController,
|
||||
TransformStream,
|
||||
TransformStreamDefaultController,
|
||||
WritableStream,
|
||||
WritableStreamDefaultWriter,
|
||||
WritableStreamDefaultController,
|
||||
ByteLengthQueuingStrategy,
|
||||
CountQueuingStrategy,
|
||||
TextEncoderStream,
|
||||
TextDecoderStream
|
||||
};
|
||||
module.exports = _default;
|
||||
64
node_modules/unenv/runtime/node/stream/web/index.d.ts
generated
vendored
Normal file
64
node_modules/unenv/runtime/node/stream/web/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
/// <reference types="node" />
|
||||
import type * as stramWeb from "node:stream/web";
|
||||
export declare const ReadableStream: (() => any) | {
|
||||
new <R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
|
||||
prototype: ReadableStream<any>;
|
||||
};
|
||||
export declare const ReadableStreamDefaultReader: (() => any) | {
|
||||
new <R = any>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>;
|
||||
prototype: ReadableStreamDefaultReader<any>;
|
||||
};
|
||||
export declare const ReadableStreamBYOBReader: (() => any) | {
|
||||
new (stream: ReadableStream<any>): ReadableStreamBYOBReader;
|
||||
prototype: ReadableStreamBYOBReader;
|
||||
};
|
||||
export declare const ReadableStreamBYOBRequest: (() => any) | {
|
||||
new (): ReadableStreamBYOBRequest;
|
||||
prototype: ReadableStreamBYOBRequest;
|
||||
};
|
||||
export declare const ReadableByteStreamController: (() => any) | {
|
||||
new (): ReadableByteStreamController;
|
||||
prototype: ReadableByteStreamController;
|
||||
};
|
||||
export declare const ReadableStreamDefaultController: (() => any) | {
|
||||
new (): ReadableStreamDefaultController<any>;
|
||||
prototype: ReadableStreamDefaultController<any>;
|
||||
};
|
||||
export declare const TransformStream: (() => any) | {
|
||||
new <I = any, O = any>(transformer?: Transformer<I, O>, writableStrategy?: QueuingStrategy<I>, readableStrategy?: QueuingStrategy<O>): TransformStream<I, O>;
|
||||
prototype: TransformStream<any, any>;
|
||||
};
|
||||
export declare const TransformStreamDefaultController: (() => any) | {
|
||||
new (): TransformStreamDefaultController<any>;
|
||||
prototype: TransformStreamDefaultController<any>;
|
||||
};
|
||||
export declare const WritableStream: (() => any) | {
|
||||
new <W = any>(underlyingSink?: UnderlyingSink<W>, strategy?: QueuingStrategy<W>): WritableStream<W>;
|
||||
prototype: WritableStream<any>;
|
||||
};
|
||||
export declare const WritableStreamDefaultWriter: (() => any) | {
|
||||
new <W = any>(stream: WritableStream<W>): WritableStreamDefaultWriter<W>;
|
||||
prototype: WritableStreamDefaultWriter<any>;
|
||||
};
|
||||
export declare const WritableStreamDefaultController: (() => any) | {
|
||||
new (): WritableStreamDefaultController;
|
||||
prototype: WritableStreamDefaultController;
|
||||
};
|
||||
export declare const ByteLengthQueuingStrategy: (() => any) | {
|
||||
new (init: QueuingStrategyInit): ByteLengthQueuingStrategy;
|
||||
prototype: ByteLengthQueuingStrategy;
|
||||
};
|
||||
export declare const CountQueuingStrategy: (() => any) | {
|
||||
new (init: QueuingStrategyInit): CountQueuingStrategy;
|
||||
prototype: CountQueuingStrategy;
|
||||
};
|
||||
export declare const TextEncoderStream: (() => any) | {
|
||||
new (): TextEncoderStream;
|
||||
prototype: TextEncoderStream;
|
||||
};
|
||||
export declare const TextDecoderStream: (() => any) | {
|
||||
new (label?: string, options?: TextDecoderOptions): TextDecoderStream;
|
||||
prototype: TextDecoderStream;
|
||||
};
|
||||
declare const _default: typeof stramWeb;
|
||||
export default _default;
|
||||
33
node_modules/unenv/runtime/node/stream/web/index.mjs
generated
vendored
Normal file
33
node_modules/unenv/runtime/node/stream/web/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
import { notImplemented } from "../../../_internal/utils.mjs";
|
||||
export const ReadableStream = globalThis.ReadableStream || notImplemented("stream.web.ReadableStream");
|
||||
export const ReadableStreamDefaultReader = globalThis.ReadableStreamDefaultReader || notImplemented("stream.web.ReadableStreamDefaultReader");
|
||||
export const ReadableStreamBYOBReader = globalThis.ReadableStreamBYOBReader || notImplemented("stream.web.ReadableStreamBYOBReader");
|
||||
export const ReadableStreamBYOBRequest = globalThis.ReadableStreamBYOBRequest || notImplemented("stream.web.ReadableStreamBYOBRequest");
|
||||
export const ReadableByteStreamController = globalThis.ReadableByteStreamController || notImplemented("stream.web.ReadableByteStreamController");
|
||||
export const ReadableStreamDefaultController = globalThis.ReadableStreamDefaultController || notImplemented("stream.web.ReadableStreamDefaultController");
|
||||
export const TransformStream = globalThis.TransformStream || notImplemented("stream.web.TransformStream");
|
||||
export const TransformStreamDefaultController = globalThis.TransformStreamDefaultController || notImplemented("stream.web.TransformStreamDefaultController");
|
||||
export const WritableStream = globalThis.WritableStream || notImplemented("stream.web.WritableStream");
|
||||
export const WritableStreamDefaultWriter = globalThis.WritableStreamDefaultWriter || notImplemented("stream.web.WritableStreamDefaultWriter");
|
||||
export const WritableStreamDefaultController = globalThis.WritableStreamDefaultController || notImplemented("stream.web.WritableStreamDefaultController");
|
||||
export const ByteLengthQueuingStrategy = globalThis.ByteLengthQueuingStrategy || notImplemented("stream.web.ByteLengthQueuingStrategy");
|
||||
export const CountQueuingStrategy = globalThis.CountQueuingStrategy || notImplemented("stream.web.CountQueuingStrategy");
|
||||
export const TextEncoderStream = globalThis.TextEncoderStream || notImplemented("stream.web.TextEncoderStream");
|
||||
export const TextDecoderStream = globalThis.TextDecoderStream || notImplemented("stream.web.TextDecoderStream");
|
||||
export default {
|
||||
ReadableStream,
|
||||
ReadableStreamDefaultReader,
|
||||
ReadableStreamBYOBReader,
|
||||
ReadableStreamBYOBRequest,
|
||||
ReadableByteStreamController,
|
||||
ReadableStreamDefaultController,
|
||||
TransformStream,
|
||||
TransformStreamDefaultController,
|
||||
WritableStream,
|
||||
WritableStreamDefaultWriter,
|
||||
WritableStreamDefaultController,
|
||||
ByteLengthQueuingStrategy,
|
||||
CountQueuingStrategy,
|
||||
TextEncoderStream,
|
||||
TextDecoderStream
|
||||
};
|
||||
85
node_modules/unenv/runtime/node/stream/writable.cjs
generated
vendored
Normal file
85
node_modules/unenv/runtime/node/stream/writable.cjs
generated
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.Writable = void 0;
|
||||
|
||||
var _nodeEvents = require("node:events");
|
||||
|
||||
class Writable extends _nodeEvents.EventEmitter {
|
||||
constructor(_opts) {
|
||||
super();
|
||||
this.writable = true;
|
||||
this.writableEnded = false;
|
||||
this.writableFinished = false;
|
||||
this.writableHighWaterMark = 0;
|
||||
this.writableLength = 0;
|
||||
this.writableObjectMode = false;
|
||||
this.writableCorked = 0;
|
||||
this.destroyed = false;
|
||||
this._encoding = "utf-8";
|
||||
}
|
||||
|
||||
pipe(_destenition, _options) {
|
||||
return {};
|
||||
}
|
||||
|
||||
_write(chunk, encoding, callback) {
|
||||
this._data = chunk;
|
||||
this._encoding = encoding;
|
||||
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
|
||||
_writev(_chunks, _callback) {}
|
||||
|
||||
_destroy(_error, _callback) {}
|
||||
|
||||
_final(_callback) {}
|
||||
|
||||
write(chunk, arg2, arg3) {
|
||||
const encoding = typeof arg2 === "string" ? this._encoding : "utf-8";
|
||||
const cb = typeof arg2 === "function" ? arg2 : typeof arg3 === "function" ? arg3 : void 0;
|
||||
|
||||
this._write(chunk, encoding, cb);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
setDefaultEncoding(_encoding) {
|
||||
return this;
|
||||
}
|
||||
|
||||
end(arg1, arg2, arg3) {
|
||||
const cb = typeof arg1 === "function" ? arg1 : typeof arg2 === "function" ? arg2 : typeof arg3 === "function" ? arg3 : void 0;
|
||||
const data = arg1 !== cb ? arg1 : void 0;
|
||||
|
||||
if (data) {
|
||||
const encoding = arg2 !== cb ? arg2 : void 0;
|
||||
this.write(data, encoding, cb);
|
||||
}
|
||||
|
||||
this.writableEnded = true;
|
||||
this.writableFinished = true;
|
||||
this.emit("close");
|
||||
this.emit("finish");
|
||||
return this;
|
||||
}
|
||||
|
||||
cork() {}
|
||||
|
||||
uncork() {}
|
||||
|
||||
destroy(_error) {
|
||||
this.destroyed = true;
|
||||
delete this._data;
|
||||
this.removeAllListeners();
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
exports.Writable = Writable;
|
||||
34
node_modules/unenv/runtime/node/stream/writable.d.ts
generated
vendored
Normal file
34
node_modules/unenv/runtime/node/stream/writable.d.ts
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
import { EventEmitter } from "node:events";
|
||||
import type * as stream from "node:stream";
|
||||
import type { BufferEncoding, Callback } from "../../_internal/types";
|
||||
export declare class Writable extends EventEmitter implements stream.Writable {
|
||||
readonly writable: boolean;
|
||||
writableEnded: boolean;
|
||||
writableFinished: boolean;
|
||||
readonly writableHighWaterMark: number;
|
||||
readonly writableLength: number;
|
||||
readonly writableObjectMode: boolean;
|
||||
readonly writableCorked: number;
|
||||
destroyed: boolean;
|
||||
_data: unknown;
|
||||
_encoding: BufferEncoding;
|
||||
constructor(_opts?: stream.WritableOptions);
|
||||
pipe<T>(_destenition: T, _options?: {
|
||||
end?: boolean;
|
||||
}): T;
|
||||
_write(chunk: any, encoding: BufferEncoding, callback?: Callback): void;
|
||||
_writev?(_chunks: Array<{
|
||||
chunk: any;
|
||||
encoding: BufferEncoding;
|
||||
}>, _callback: (error?: Error | null) => void): void;
|
||||
_destroy(_error: any, _callback: Callback<any>): void;
|
||||
_final(_callback: Callback): void;
|
||||
write(chunk: any, arg2?: BufferEncoding | Callback, arg3?: Callback): boolean;
|
||||
setDefaultEncoding(_encoding: BufferEncoding): this;
|
||||
end(arg1: Callback | any, arg2?: Callback | BufferEncoding, arg3?: Callback): this;
|
||||
cork(): void;
|
||||
uncork(): void;
|
||||
destroy(_error?: Error): this;
|
||||
}
|
||||
63
node_modules/unenv/runtime/node/stream/writable.mjs
generated
vendored
Normal file
63
node_modules/unenv/runtime/node/stream/writable.mjs
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
import { EventEmitter } from "node:events";
|
||||
export class Writable extends EventEmitter {
|
||||
constructor(_opts) {
|
||||
super();
|
||||
this.writable = true;
|
||||
this.writableEnded = false;
|
||||
this.writableFinished = false;
|
||||
this.writableHighWaterMark = 0;
|
||||
this.writableLength = 0;
|
||||
this.writableObjectMode = false;
|
||||
this.writableCorked = 0;
|
||||
this.destroyed = false;
|
||||
this._encoding = "utf-8";
|
||||
}
|
||||
pipe(_destenition, _options) {
|
||||
return {};
|
||||
}
|
||||
_write(chunk, encoding, callback) {
|
||||
this._data = chunk;
|
||||
this._encoding = encoding;
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
_writev(_chunks, _callback) {
|
||||
}
|
||||
_destroy(_error, _callback) {
|
||||
}
|
||||
_final(_callback) {
|
||||
}
|
||||
write(chunk, arg2, arg3) {
|
||||
const encoding = typeof arg2 === "string" ? this._encoding : "utf-8";
|
||||
const cb = typeof arg2 === "function" ? arg2 : typeof arg3 === "function" ? arg3 : void 0;
|
||||
this._write(chunk, encoding, cb);
|
||||
return true;
|
||||
}
|
||||
setDefaultEncoding(_encoding) {
|
||||
return this;
|
||||
}
|
||||
end(arg1, arg2, arg3) {
|
||||
const cb = typeof arg1 === "function" ? arg1 : typeof arg2 === "function" ? arg2 : typeof arg3 === "function" ? arg3 : void 0;
|
||||
const data = arg1 !== cb ? arg1 : void 0;
|
||||
if (data) {
|
||||
const encoding = arg2 !== cb ? arg2 : void 0;
|
||||
this.write(data, encoding, cb);
|
||||
}
|
||||
this.writableEnded = true;
|
||||
this.writableFinished = true;
|
||||
this.emit("close");
|
||||
this.emit("finish");
|
||||
return this;
|
||||
}
|
||||
cork() {
|
||||
}
|
||||
uncork() {
|
||||
}
|
||||
destroy(_error) {
|
||||
this.destroyed = true;
|
||||
delete this._data;
|
||||
this.removeAllListeners();
|
||||
return this;
|
||||
}
|
||||
}
|
||||
127
node_modules/unenv/runtime/node/url/index.cjs
generated
vendored
Normal file
127
node_modules/unenv/runtime/node/url/index.cjs
generated
vendored
Normal file
@@ -0,0 +1,127 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.urlToHttpOptions = exports.resolve = exports.pathToFileURL = exports.parse = exports.format = exports.fileURLToPath = exports.domainToUnicode = exports.domainToASCII = exports.default = exports.URLSearchParams = exports.URL = void 0;
|
||||
const URL = globalThis.URL;
|
||||
exports.URL = URL;
|
||||
const URLSearchParams = globalThis.URLSearchParams;
|
||||
exports.URLSearchParams = URLSearchParams;
|
||||
|
||||
const parse = function (urlString, parseQueryString, slashesDenoteHost) {
|
||||
const url = new URL(urlString);
|
||||
|
||||
if (!parseQueryString && !slashesDenoteHost) {
|
||||
return url;
|
||||
}
|
||||
|
||||
throw new Error("parseQueryString and slashesDenoteHost are unsupported");
|
||||
};
|
||||
|
||||
exports.parse = parse;
|
||||
|
||||
const resolve = function (from, to) {
|
||||
const resolvedUrl = new URL(to, new URL(from, "resolve://"));
|
||||
|
||||
if (resolvedUrl.protocol === "resolve:") {
|
||||
const {
|
||||
pathname,
|
||||
search,
|
||||
hash
|
||||
} = resolvedUrl;
|
||||
return pathname + search + hash;
|
||||
}
|
||||
|
||||
return resolvedUrl.toString();
|
||||
};
|
||||
|
||||
exports.resolve = resolve;
|
||||
|
||||
const urlToHttpOptions = function (url) {
|
||||
return {
|
||||
protocol: url.protocol,
|
||||
hostname: url.hostname,
|
||||
hash: url.hash,
|
||||
search: url.search,
|
||||
pathname: url.pathname,
|
||||
path: url.pathname + url.search || "",
|
||||
href: url.href,
|
||||
port: url.port,
|
||||
auth: url.username ? url.username + url.password ? ":" + url.password : "" : ""
|
||||
};
|
||||
};
|
||||
|
||||
exports.urlToHttpOptions = urlToHttpOptions;
|
||||
|
||||
const format = function (urlInput, options) {
|
||||
let url;
|
||||
|
||||
if (typeof urlInput === "string") {
|
||||
url = new URL(urlInput);
|
||||
} else if (!(urlInput instanceof URL)) {
|
||||
throw new TypeError("format urlObject is not supported");
|
||||
} else {
|
||||
url = urlInput;
|
||||
}
|
||||
|
||||
if (options) {
|
||||
if (options.auth === false) {
|
||||
url.username = "";
|
||||
url.password = "";
|
||||
}
|
||||
|
||||
if (options.fragment === false) {
|
||||
url.hash = "";
|
||||
}
|
||||
|
||||
if (options.search === false) {
|
||||
url.search = "";
|
||||
}
|
||||
}
|
||||
|
||||
return url.toString();
|
||||
};
|
||||
|
||||
exports.format = format;
|
||||
|
||||
const domainToASCII = function (domain) {
|
||||
return domain;
|
||||
};
|
||||
|
||||
exports.domainToASCII = domainToASCII;
|
||||
|
||||
const domainToUnicode = function (domain) {
|
||||
return domain;
|
||||
};
|
||||
|
||||
exports.domainToUnicode = domainToUnicode;
|
||||
|
||||
const pathToFileURL = function (path) {
|
||||
return new URL(path);
|
||||
};
|
||||
|
||||
exports.pathToFileURL = pathToFileURL;
|
||||
|
||||
const fileURLToPath = function (url) {
|
||||
if (typeof url === "string") {
|
||||
url = new URL(url);
|
||||
}
|
||||
|
||||
return url.pathname;
|
||||
};
|
||||
|
||||
exports.fileURLToPath = fileURLToPath;
|
||||
var _default = {
|
||||
URL,
|
||||
URLSearchParams,
|
||||
domainToASCII,
|
||||
domainToUnicode,
|
||||
fileURLToPath,
|
||||
format,
|
||||
parse,
|
||||
pathToFileURL,
|
||||
resolve,
|
||||
urlToHttpOptions
|
||||
};
|
||||
module.exports = _default;
|
||||
21
node_modules/unenv/runtime/node/url/index.d.ts
generated
vendored
Normal file
21
node_modules/unenv/runtime/node/url/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
export declare const URL: {
|
||||
new (url: string | URL, base?: string | URL): URL;
|
||||
prototype: URL;
|
||||
createObjectURL(obj: Blob | MediaSource): string;
|
||||
revokeObjectURL(url: string): void;
|
||||
};
|
||||
export declare const URLSearchParams: {
|
||||
new (init?: string | URLSearchParams | Record<string, string> | string[][]): URLSearchParams;
|
||||
prototype: URLSearchParams;
|
||||
toString(): string;
|
||||
};
|
||||
export declare const parse: any;
|
||||
export declare const resolve: any;
|
||||
export declare const urlToHttpOptions: any;
|
||||
export declare const format: any;
|
||||
export declare const domainToASCII: any;
|
||||
export declare const domainToUnicode: any;
|
||||
export declare const pathToFileURL: any;
|
||||
export declare const fileURLToPath: any;
|
||||
declare const _default: any;
|
||||
export default _default;
|
||||
80
node_modules/unenv/runtime/node/url/index.mjs
generated
vendored
Normal file
80
node_modules/unenv/runtime/node/url/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
export const URL = globalThis.URL;
|
||||
export const URLSearchParams = globalThis.URLSearchParams;
|
||||
export const parse = function(urlString, parseQueryString, slashesDenoteHost) {
|
||||
const url = new URL(urlString);
|
||||
if (!parseQueryString && !slashesDenoteHost) {
|
||||
return url;
|
||||
}
|
||||
throw new Error("parseQueryString and slashesDenoteHost are unsupported");
|
||||
};
|
||||
export const resolve = function(from, to) {
|
||||
const resolvedUrl = new URL(to, new URL(from, "resolve://"));
|
||||
if (resolvedUrl.protocol === "resolve:") {
|
||||
const { pathname, search, hash } = resolvedUrl;
|
||||
return pathname + search + hash;
|
||||
}
|
||||
return resolvedUrl.toString();
|
||||
};
|
||||
export const urlToHttpOptions = function(url) {
|
||||
return {
|
||||
protocol: url.protocol,
|
||||
hostname: url.hostname,
|
||||
hash: url.hash,
|
||||
search: url.search,
|
||||
pathname: url.pathname,
|
||||
path: url.pathname + url.search || "",
|
||||
href: url.href,
|
||||
port: url.port,
|
||||
auth: url.username ? url.username + url.password ? ":" + url.password : "" : ""
|
||||
};
|
||||
};
|
||||
export const format = function(urlInput, options) {
|
||||
let url;
|
||||
if (typeof urlInput === "string") {
|
||||
url = new URL(urlInput);
|
||||
} else if (!(urlInput instanceof URL)) {
|
||||
throw new TypeError("format urlObject is not supported");
|
||||
} else {
|
||||
url = urlInput;
|
||||
}
|
||||
if (options) {
|
||||
if (options.auth === false) {
|
||||
url.username = "";
|
||||
url.password = "";
|
||||
}
|
||||
if (options.fragment === false) {
|
||||
url.hash = "";
|
||||
}
|
||||
if (options.search === false) {
|
||||
url.search = "";
|
||||
}
|
||||
}
|
||||
return url.toString();
|
||||
};
|
||||
export const domainToASCII = function(domain) {
|
||||
return domain;
|
||||
};
|
||||
export const domainToUnicode = function(domain) {
|
||||
return domain;
|
||||
};
|
||||
export const pathToFileURL = function(path) {
|
||||
return new URL(path);
|
||||
};
|
||||
export const fileURLToPath = function(url) {
|
||||
if (typeof url === "string") {
|
||||
url = new URL(url);
|
||||
}
|
||||
return url.pathname;
|
||||
};
|
||||
export default {
|
||||
URL,
|
||||
URLSearchParams,
|
||||
domainToASCII,
|
||||
domainToUnicode,
|
||||
fileURLToPath,
|
||||
format,
|
||||
parse,
|
||||
pathToFileURL,
|
||||
resolve,
|
||||
urlToHttpOptions
|
||||
};
|
||||
78
node_modules/unenv/runtime/node/util/_legacyTypes.cjs
generated
vendored
Normal file
78
node_modules/unenv/runtime/node/util/_legacyTypes.cjs
generated
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.isUndefined = exports.isSymbol = exports.isString = exports.isRegExp = exports.isPrimitive = exports.isObject = exports.isNumber = exports.isNullOrUndefined = exports.isNull = exports.isFunction = exports.isError = exports.isDeepStrictEqual = exports.isDate = exports.isBuffer = exports.isBoolean = exports.isArray = void 0;
|
||||
|
||||
const isRegExp = val => val instanceof RegExp;
|
||||
|
||||
exports.isRegExp = isRegExp;
|
||||
|
||||
const isDate = val => val instanceof Date;
|
||||
|
||||
exports.isDate = isDate;
|
||||
|
||||
const isArray = val => Array.isArray(val);
|
||||
|
||||
exports.isArray = isArray;
|
||||
|
||||
const isBoolean = val => typeof val === "boolean";
|
||||
|
||||
exports.isBoolean = isBoolean;
|
||||
|
||||
const isNull = val => val === null;
|
||||
|
||||
exports.isNull = isNull;
|
||||
|
||||
const isNullOrUndefined = val => val === null || val === void 0;
|
||||
|
||||
exports.isNullOrUndefined = isNullOrUndefined;
|
||||
|
||||
const isNumber = val => typeof val === "number";
|
||||
|
||||
exports.isNumber = isNumber;
|
||||
|
||||
const isString = val => typeof val === "string";
|
||||
|
||||
exports.isString = isString;
|
||||
|
||||
const isSymbol = val => typeof val === "symbol";
|
||||
|
||||
exports.isSymbol = isSymbol;
|
||||
|
||||
const isUndefined = val => typeof val === "undefined";
|
||||
|
||||
exports.isUndefined = isUndefined;
|
||||
|
||||
const isFunction = val => typeof val === "function";
|
||||
|
||||
exports.isFunction = isFunction;
|
||||
|
||||
const isBuffer = val => {
|
||||
return val && typeof val === "object" && typeof val.copy === "function" && typeof val.fill === "function" && typeof val.readUInt8 === "function";
|
||||
};
|
||||
|
||||
exports.isBuffer = isBuffer;
|
||||
|
||||
const isDeepStrictEqual = (a, b) => JSON.stringify(a) === JSON.stringify(b);
|
||||
|
||||
exports.isDeepStrictEqual = isDeepStrictEqual;
|
||||
|
||||
const isObject = val => val !== null && typeof val === "object" && Object.getPrototypeOf(val).isPrototypeOf(Object);
|
||||
|
||||
exports.isObject = isObject;
|
||||
|
||||
const isError = val => val instanceof Error;
|
||||
|
||||
exports.isError = isError;
|
||||
|
||||
const isPrimitive = val => {
|
||||
if (typeof val === "object") {
|
||||
return val === null;
|
||||
}
|
||||
|
||||
return typeof val !== "function";
|
||||
};
|
||||
|
||||
exports.isPrimitive = isPrimitive;
|
||||
17
node_modules/unenv/runtime/node/util/_legacyTypes.d.ts
generated
vendored
Normal file
17
node_modules/unenv/runtime/node/util/_legacyTypes.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import type util from "node:util";
|
||||
export declare const isRegExp: typeof util.isRegExp;
|
||||
export declare const isDate: typeof util.isDate;
|
||||
export declare const isArray: typeof util.isArray;
|
||||
export declare const isBoolean: typeof util.isBoolean;
|
||||
export declare const isNull: typeof util.isNull;
|
||||
export declare const isNullOrUndefined: typeof util.isNullOrUndefined;
|
||||
export declare const isNumber: typeof util.isNumber;
|
||||
export declare const isString: typeof util.isString;
|
||||
export declare const isSymbol: typeof util.isSymbol;
|
||||
export declare const isUndefined: typeof util.isUndefined;
|
||||
export declare const isFunction: typeof util.isFunction;
|
||||
export declare const isBuffer: typeof util.isBuffer;
|
||||
export declare const isDeepStrictEqual: typeof util.isDeepStrictEqual;
|
||||
export declare const isObject: typeof util.isObject;
|
||||
export declare const isError: typeof util.isError;
|
||||
export declare const isPrimitive: typeof util.isPrimitive;
|
||||
23
node_modules/unenv/runtime/node/util/_legacyTypes.mjs
generated
vendored
Normal file
23
node_modules/unenv/runtime/node/util/_legacyTypes.mjs
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
export const isRegExp = (val) => val instanceof RegExp;
|
||||
export const isDate = (val) => val instanceof Date;
|
||||
export const isArray = (val) => Array.isArray(val);
|
||||
export const isBoolean = (val) => typeof val === "boolean";
|
||||
export const isNull = (val) => val === null;
|
||||
export const isNullOrUndefined = (val) => val === null || val === void 0;
|
||||
export const isNumber = (val) => typeof val === "number";
|
||||
export const isString = (val) => typeof val === "string";
|
||||
export const isSymbol = (val) => typeof val === "symbol";
|
||||
export const isUndefined = (val) => typeof val === "undefined";
|
||||
export const isFunction = (val) => typeof val === "function";
|
||||
export const isBuffer = (val) => {
|
||||
return val && typeof val === "object" && typeof val.copy === "function" && typeof val.fill === "function" && typeof val.readUInt8 === "function";
|
||||
};
|
||||
export const isDeepStrictEqual = (a, b) => JSON.stringify(a) === JSON.stringify(b);
|
||||
export const isObject = (val) => val !== null && typeof val === "object" && Object.getPrototypeOf(val).isPrototypeOf(Object);
|
||||
export const isError = (val) => val instanceof Error;
|
||||
export const isPrimitive = (val) => {
|
||||
if (typeof val === "object") {
|
||||
return val === null;
|
||||
}
|
||||
return typeof val !== "function";
|
||||
};
|
||||
85
node_modules/unenv/runtime/node/util/_log.cjs
generated
vendored
Normal file
85
node_modules/unenv/runtime/node/util/_log.cjs
generated
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.log = exports.inspect = exports.formatWithOptions = exports.format = exports.debuglog = exports.debug = void 0;
|
||||
|
||||
const log = (...args) => {
|
||||
console.log(...args);
|
||||
};
|
||||
|
||||
exports.log = log;
|
||||
|
||||
const debuglog = (section, _cb) => {
|
||||
const fn = (msg, ...params) => {
|
||||
if (fn.enabled) {
|
||||
console.debug(`[${section}] ${msg}`, ...params);
|
||||
}
|
||||
};
|
||||
|
||||
fn.enabled = true;
|
||||
return fn;
|
||||
};
|
||||
|
||||
exports.debuglog = debuglog;
|
||||
const debug = debuglog;
|
||||
exports.debug = debug;
|
||||
|
||||
const inspect = object => JSON.stringify(object, null, 2);
|
||||
|
||||
exports.inspect = inspect;
|
||||
|
||||
const format = (...args) => _format(...args);
|
||||
|
||||
exports.format = format;
|
||||
|
||||
const formatWithOptions = (_options, ...args) => _format(...args);
|
||||
|
||||
exports.formatWithOptions = formatWithOptions;
|
||||
|
||||
function _format(fmt, ...args) {
|
||||
const re = /(%?)(%([djos]))/g;
|
||||
|
||||
if (args.length > 0) {
|
||||
fmt = fmt.replace(re, (match, escaped, ptn, flag) => {
|
||||
let arg = args.shift();
|
||||
|
||||
switch (flag) {
|
||||
case "o":
|
||||
if (Array.isArray(arg)) {
|
||||
arg = JSON.stringify(arg);
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case "s":
|
||||
arg = "" + arg;
|
||||
break;
|
||||
|
||||
case "d":
|
||||
arg = Number(arg);
|
||||
break;
|
||||
|
||||
case "j":
|
||||
arg = JSON.stringify(arg);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!escaped) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
args.unshift(arg);
|
||||
return match;
|
||||
});
|
||||
}
|
||||
|
||||
if (args.length > 0) {
|
||||
fmt += " " + args.join(" ");
|
||||
}
|
||||
|
||||
fmt = fmt.replace(/%{2}/g, "%");
|
||||
return "" + fmt;
|
||||
}
|
||||
7
node_modules/unenv/runtime/node/util/_log.d.ts
generated
vendored
Normal file
7
node_modules/unenv/runtime/node/util/_log.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import type util from "node:util";
|
||||
export declare const log: (...args: any[]) => void;
|
||||
export declare const debuglog: typeof util.debuglog;
|
||||
export declare const debug: typeof util.debug;
|
||||
export declare const inspect: typeof util.inspect;
|
||||
export declare const format: typeof util.format;
|
||||
export declare const formatWithOptions: typeof util.formatWithOptions;
|
||||
51
node_modules/unenv/runtime/node/util/_log.mjs
generated
vendored
Normal file
51
node_modules/unenv/runtime/node/util/_log.mjs
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
export const log = (...args) => {
|
||||
console.log(...args);
|
||||
};
|
||||
export const debuglog = (section, _cb) => {
|
||||
const fn = (msg, ...params) => {
|
||||
if (fn.enabled) {
|
||||
console.debug(`[${section}] ${msg}`, ...params);
|
||||
}
|
||||
};
|
||||
fn.enabled = true;
|
||||
return fn;
|
||||
};
|
||||
export const debug = debuglog;
|
||||
export const inspect = (object) => JSON.stringify(object, null, 2);
|
||||
export const format = (...args) => _format(...args);
|
||||
export const formatWithOptions = (_options, ...args) => _format(...args);
|
||||
function _format(fmt, ...args) {
|
||||
const re = /(%?)(%([djos]))/g;
|
||||
if (args.length > 0) {
|
||||
fmt = fmt.replace(re, (match, escaped, ptn, flag) => {
|
||||
let arg = args.shift();
|
||||
switch (flag) {
|
||||
case "o":
|
||||
if (Array.isArray(arg)) {
|
||||
arg = JSON.stringify(arg);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case "s":
|
||||
arg = "" + arg;
|
||||
break;
|
||||
case "d":
|
||||
arg = Number(arg);
|
||||
break;
|
||||
case "j":
|
||||
arg = JSON.stringify(arg);
|
||||
break;
|
||||
}
|
||||
if (!escaped) {
|
||||
return arg;
|
||||
}
|
||||
args.unshift(arg);
|
||||
return match;
|
||||
});
|
||||
}
|
||||
if (args.length > 0) {
|
||||
fmt += " " + args.join(" ");
|
||||
}
|
||||
fmt = fmt.replace(/%{2}/g, "%");
|
||||
return "" + fmt;
|
||||
}
|
||||
33
node_modules/unenv/runtime/node/util/_promisify.cjs
generated
vendored
Normal file
33
node_modules/unenv/runtime/node/util/_promisify.cjs
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.promisify = void 0;
|
||||
const customSymbol = Symbol("customPromisify");
|
||||
|
||||
function _promisify(fn) {
|
||||
if (fn[customSymbol]) {
|
||||
return fn[customSymbol];
|
||||
}
|
||||
|
||||
return function (...args) {
|
||||
return new Promise((resolve, reject) => {
|
||||
try {
|
||||
fn.call(this, ...args, (err, val) => {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
|
||||
resolve(val);
|
||||
});
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
_promisify.custom = customSymbol;
|
||||
const promisify = _promisify;
|
||||
exports.promisify = promisify;
|
||||
2
node_modules/unenv/runtime/node/util/_promisify.d.ts
generated
vendored
Normal file
2
node_modules/unenv/runtime/node/util/_promisify.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type util from "node:util";
|
||||
export declare const promisify: typeof util.promisify;
|
||||
22
node_modules/unenv/runtime/node/util/_promisify.mjs
generated
vendored
Normal file
22
node_modules/unenv/runtime/node/util/_promisify.mjs
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
const customSymbol = Symbol("customPromisify");
|
||||
function _promisify(fn) {
|
||||
if (fn[customSymbol]) {
|
||||
return fn[customSymbol];
|
||||
}
|
||||
return function(...args) {
|
||||
return new Promise((resolve, reject) => {
|
||||
try {
|
||||
fn.call(this, ...args, (err, val) => {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
resolve(val);
|
||||
});
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
_promisify.custom = customSymbol;
|
||||
export const promisify = _promisify;
|
||||
126
node_modules/unenv/runtime/node/util/index.cjs
generated
vendored
Normal file
126
node_modules/unenv/runtime/node/util/index.cjs
generated
vendored
Normal file
@@ -0,0 +1,126 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _exportNames = {
|
||||
TextDecoder: true,
|
||||
TextEncoder: true,
|
||||
deprecate: true,
|
||||
_errnoException: true,
|
||||
_exceptionWithHostPort: true,
|
||||
_extend: true,
|
||||
callbackify: true,
|
||||
getSystemErrorMap: true,
|
||||
getSystemErrorName: true,
|
||||
toUSVString: true,
|
||||
stripVTControlCharacters: true,
|
||||
inherits: true,
|
||||
promisify: true
|
||||
};
|
||||
exports.getSystemErrorName = exports.getSystemErrorMap = exports.deprecate = exports.default = exports.callbackify = exports._extend = exports._exceptionWithHostPort = exports._errnoException = exports.TextEncoder = exports.TextDecoder = void 0;
|
||||
Object.defineProperty(exports, "inherits", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _inherits.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "promisify", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _promisify.promisify;
|
||||
}
|
||||
});
|
||||
exports.toUSVString = exports.stripVTControlCharacters = void 0;
|
||||
|
||||
var _utils = require("../../_internal/utils.cjs");
|
||||
|
||||
var _inherits = _interopRequireDefault(require("../../npm/inherits.cjs"));
|
||||
|
||||
var legacyTypes = _interopRequireWildcard(require("./_legacyTypes.cjs"));
|
||||
|
||||
Object.keys(legacyTypes).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === legacyTypes[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return legacyTypes[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var logUtils = _interopRequireWildcard(require("./_log.cjs"));
|
||||
|
||||
Object.keys(logUtils).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === logUtils[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return logUtils[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var _types = _interopRequireDefault(require("./types/index.cjs"));
|
||||
|
||||
var _promisify = require("./_promisify.cjs");
|
||||
|
||||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
||||
|
||||
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
const TextDecoder = globalThis.TextDecoder;
|
||||
exports.TextDecoder = TextDecoder;
|
||||
const TextEncoder = globalThis.TextEncoder;
|
||||
exports.TextEncoder = TextEncoder;
|
||||
|
||||
const deprecate = fn => fn;
|
||||
|
||||
exports.deprecate = deprecate;
|
||||
|
||||
const _errnoException = (0, _utils.notImplemented)("util._errnoException");
|
||||
|
||||
exports._errnoException = _errnoException;
|
||||
|
||||
const _exceptionWithHostPort = (0, _utils.notImplemented)("util._exceptionWithHostPort");
|
||||
|
||||
exports._exceptionWithHostPort = _exceptionWithHostPort;
|
||||
|
||||
const _extend = (0, _utils.notImplemented)("util._extend");
|
||||
|
||||
exports._extend = _extend;
|
||||
const callbackify = (0, _utils.notImplemented)("util.callbackify");
|
||||
exports.callbackify = callbackify;
|
||||
const getSystemErrorMap = (0, _utils.notImplemented)("util.getSystemErrorMap");
|
||||
exports.getSystemErrorMap = getSystemErrorMap;
|
||||
const getSystemErrorName = (0, _utils.notImplemented)("util.getSystemErrorName");
|
||||
exports.getSystemErrorName = getSystemErrorName;
|
||||
const toUSVString = (0, _utils.notImplemented)("util.toUSVString");
|
||||
exports.toUSVString = toUSVString;
|
||||
const stripVTControlCharacters = (0, _utils.notImplemented)("util.stripVTControlCharacters");
|
||||
exports.stripVTControlCharacters = stripVTControlCharacters;
|
||||
var _default = {
|
||||
_errnoException,
|
||||
_exceptionWithHostPort,
|
||||
_extend,
|
||||
callbackify,
|
||||
deprecate,
|
||||
getSystemErrorMap,
|
||||
getSystemErrorName,
|
||||
inherits: _inherits.default,
|
||||
promisify: _promisify.promisify,
|
||||
stripVTControlCharacters,
|
||||
toUSVString,
|
||||
TextDecoder,
|
||||
TextEncoder,
|
||||
types: _types.default,
|
||||
...logUtils,
|
||||
...legacyTypes
|
||||
};
|
||||
module.exports = _default;
|
||||
18
node_modules/unenv/runtime/node/util/index.d.ts
generated
vendored
Normal file
18
node_modules/unenv/runtime/node/util/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import type util from "node:util";
|
||||
export * from "./_legacyTypes";
|
||||
export * from "./_log";
|
||||
export { default as inherits } from "../../npm/inherits";
|
||||
export { promisify } from "./_promisify";
|
||||
export declare const TextDecoder: typeof util.TextDecoder;
|
||||
export declare const TextEncoder: typeof util.TextEncoder;
|
||||
export declare const deprecate: typeof util.deprecate;
|
||||
export declare const _errnoException: () => any;
|
||||
export declare const _exceptionWithHostPort: () => any;
|
||||
export declare const _extend: () => any;
|
||||
export declare const callbackify: typeof util.callbackify;
|
||||
export declare const getSystemErrorMap: typeof util.getSystemErrorMap;
|
||||
export declare const getSystemErrorName: typeof util.getSystemErrorName;
|
||||
export declare const toUSVString: typeof util.toUSVString;
|
||||
export declare const stripVTControlCharacters: typeof util.stripVTControlCharacters;
|
||||
declare const _default: any;
|
||||
export default _default;
|
||||
39
node_modules/unenv/runtime/node/util/index.mjs
generated
vendored
Normal file
39
node_modules/unenv/runtime/node/util/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
import { notImplemented } from "../../_internal/utils.mjs";
|
||||
import inherits from "../../npm/inherits.mjs";
|
||||
import * as legacyTypes from "./_legacyTypes.mjs";
|
||||
import * as logUtils from "./_log.mjs";
|
||||
import types from "./types/index.mjs";
|
||||
import { promisify } from "./_promisify.mjs";
|
||||
export * from "./_legacyTypes.mjs";
|
||||
export * from "./_log.mjs";
|
||||
export { default as inherits } from "../../npm/inherits.mjs";
|
||||
export { promisify } from "./_promisify.mjs";
|
||||
export const TextDecoder = globalThis.TextDecoder;
|
||||
export const TextEncoder = globalThis.TextEncoder;
|
||||
export const deprecate = (fn) => fn;
|
||||
export const _errnoException = notImplemented("util._errnoException");
|
||||
export const _exceptionWithHostPort = notImplemented("util._exceptionWithHostPort");
|
||||
export const _extend = notImplemented("util._extend");
|
||||
export const callbackify = notImplemented("util.callbackify");
|
||||
export const getSystemErrorMap = notImplemented("util.getSystemErrorMap");
|
||||
export const getSystemErrorName = notImplemented("util.getSystemErrorName");
|
||||
export const toUSVString = notImplemented("util.toUSVString");
|
||||
export const stripVTControlCharacters = notImplemented("util.stripVTControlCharacters");
|
||||
export default {
|
||||
_errnoException,
|
||||
_exceptionWithHostPort,
|
||||
_extend,
|
||||
callbackify,
|
||||
deprecate,
|
||||
getSystemErrorMap,
|
||||
getSystemErrorName,
|
||||
inherits,
|
||||
promisify,
|
||||
stripVTControlCharacters,
|
||||
toUSVString,
|
||||
TextDecoder,
|
||||
TextEncoder,
|
||||
types,
|
||||
...logUtils,
|
||||
...legacyTypes
|
||||
};
|
||||
123
node_modules/unenv/runtime/node/util/types/_types.cjs
generated
vendored
Normal file
123
node_modules/unenv/runtime/node/util/types/_types.cjs
generated
vendored
Normal file
@@ -0,0 +1,123 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.isWeakSet = exports.isWeakMap = exports.isUint8ClampedArray = exports.isUint8Array = exports.isUint32Array = exports.isUint16Array = exports.isTypedArray = exports.isSymbolObject = exports.isStringObject = exports.isSharedArrayBuffer = exports.isSetIterator = exports.isSet = exports.isRegExp = exports.isProxy = exports.isPromise = exports.isNumberObject = exports.isNativeError = exports.isModuleNamespaceObject = exports.isMapIterator = exports.isMap = exports.isKeyObject = exports.isInt8Array = exports.isInt32Array = exports.isInt16Array = exports.isGeneratorObject = exports.isGeneratorFunction = exports.isFloat64Array = exports.isFloat32Array = exports.isExternal = exports.isDate = exports.isDataView = exports.isCryptoKey = exports.isBoxedPrimitive = exports.isBooleanObject = exports.isBigUint64Array = exports.isBigIntObject = exports.isBigInt64Array = exports.isAsyncFunction = exports.isArrayBufferView = exports.isArrayBuffer = exports.isArgumentsObject = exports.isAnyArrayBuffer = void 0;
|
||||
|
||||
var _utils = require("../../../_internal/utils.cjs");
|
||||
|
||||
const isExternal = (0, _utils.notImplemented)("util.types.isExternal");
|
||||
exports.isExternal = isExternal;
|
||||
|
||||
const isDate = val => val instanceof Date;
|
||||
|
||||
exports.isDate = isDate;
|
||||
const isArgumentsObject = (0, _utils.notImplemented)("util.types.isArgumentsObject");
|
||||
exports.isArgumentsObject = isArgumentsObject;
|
||||
|
||||
const isBigIntObject = val => val instanceof BigInt;
|
||||
|
||||
exports.isBigIntObject = isBigIntObject;
|
||||
|
||||
const isBooleanObject = val => val instanceof Boolean;
|
||||
|
||||
exports.isBooleanObject = isBooleanObject;
|
||||
|
||||
const isNumberObject = val => val instanceof Number;
|
||||
|
||||
exports.isNumberObject = isNumberObject;
|
||||
|
||||
const isStringObject = val => val instanceof String;
|
||||
|
||||
exports.isStringObject = isStringObject;
|
||||
|
||||
const isSymbolObject = val => val instanceof Symbol;
|
||||
|
||||
exports.isSymbolObject = isSymbolObject;
|
||||
const isNativeError = (0, _utils.notImplemented)("util.types.isNativeError");
|
||||
exports.isNativeError = isNativeError;
|
||||
|
||||
const isRegExp = val => val instanceof RegExp;
|
||||
|
||||
exports.isRegExp = isRegExp;
|
||||
const isAsyncFunction = (0, _utils.notImplemented)("util.types.isAsyncFunction");
|
||||
exports.isAsyncFunction = isAsyncFunction;
|
||||
const isGeneratorFunction = (0, _utils.notImplemented)("util.types.isGeneratorFunction");
|
||||
exports.isGeneratorFunction = isGeneratorFunction;
|
||||
const isGeneratorObject = (0, _utils.notImplemented)("util.types.isGeneratorObject");
|
||||
exports.isGeneratorObject = isGeneratorObject;
|
||||
|
||||
const isPromise = val => val instanceof Promise;
|
||||
|
||||
exports.isPromise = isPromise;
|
||||
|
||||
const isMap = val => val instanceof Map;
|
||||
|
||||
exports.isMap = isMap;
|
||||
|
||||
const isSet = val => val instanceof Set;
|
||||
|
||||
exports.isSet = isSet;
|
||||
const isMapIterator = (0, _utils.notImplemented)("util.types.isMapIterator");
|
||||
exports.isMapIterator = isMapIterator;
|
||||
const isSetIterator = (0, _utils.notImplemented)("util.types.isSetIterator");
|
||||
exports.isSetIterator = isSetIterator;
|
||||
|
||||
const isWeakMap = val => val instanceof WeakMap;
|
||||
|
||||
exports.isWeakMap = isWeakMap;
|
||||
|
||||
const isWeakSet = val => val instanceof WeakSet;
|
||||
|
||||
exports.isWeakSet = isWeakSet;
|
||||
|
||||
const isArrayBuffer = val => val instanceof ArrayBuffer;
|
||||
|
||||
exports.isArrayBuffer = isArrayBuffer;
|
||||
|
||||
const isDataView = val => val instanceof DataView;
|
||||
|
||||
exports.isDataView = isDataView;
|
||||
|
||||
const isSharedArrayBuffer = val => val instanceof SharedArrayBuffer;
|
||||
|
||||
exports.isSharedArrayBuffer = isSharedArrayBuffer;
|
||||
const isProxy = (0, _utils.notImplemented)("util.types.isProxy");
|
||||
exports.isProxy = isProxy;
|
||||
const isModuleNamespaceObject = (0, _utils.notImplemented)("util.types.isModuleNamespaceObject");
|
||||
exports.isModuleNamespaceObject = isModuleNamespaceObject;
|
||||
const isAnyArrayBuffer = (0, _utils.notImplemented)("util.types.isAnyArrayBuffer");
|
||||
exports.isAnyArrayBuffer = isAnyArrayBuffer;
|
||||
const isBoxedPrimitive = (0, _utils.notImplemented)("util.types.isBoxedPrimitive");
|
||||
exports.isBoxedPrimitive = isBoxedPrimitive;
|
||||
const isArrayBufferView = (0, _utils.notImplemented)("util.types.isArrayBufferView");
|
||||
exports.isArrayBufferView = isArrayBufferView;
|
||||
const isTypedArray = (0, _utils.notImplemented)("util.types.isTypedArray");
|
||||
exports.isTypedArray = isTypedArray;
|
||||
const isUint8Array = (0, _utils.notImplemented)("util.types.isUint8Array");
|
||||
exports.isUint8Array = isUint8Array;
|
||||
const isUint8ClampedArray = (0, _utils.notImplemented)("util.types.isUint8ClampedArray");
|
||||
exports.isUint8ClampedArray = isUint8ClampedArray;
|
||||
const isUint16Array = (0, _utils.notImplemented)("util.types.isUint16Array");
|
||||
exports.isUint16Array = isUint16Array;
|
||||
const isUint32Array = (0, _utils.notImplemented)("util.types.isUint32Array");
|
||||
exports.isUint32Array = isUint32Array;
|
||||
const isInt8Array = (0, _utils.notImplemented)("util.types.isInt8Array");
|
||||
exports.isInt8Array = isInt8Array;
|
||||
const isInt16Array = (0, _utils.notImplemented)("util.types.isInt16Array");
|
||||
exports.isInt16Array = isInt16Array;
|
||||
const isInt32Array = (0, _utils.notImplemented)("util.types.isInt32Array");
|
||||
exports.isInt32Array = isInt32Array;
|
||||
const isFloat32Array = (0, _utils.notImplemented)("util.types.isFloat32Array");
|
||||
exports.isFloat32Array = isFloat32Array;
|
||||
const isFloat64Array = (0, _utils.notImplemented)("util.types.isFloat64Array");
|
||||
exports.isFloat64Array = isFloat64Array;
|
||||
const isBigInt64Array = (0, _utils.notImplemented)("util.types.isBigInt64Array");
|
||||
exports.isBigInt64Array = isBigInt64Array;
|
||||
const isBigUint64Array = (0, _utils.notImplemented)("util.types.isBigUint64Array");
|
||||
exports.isBigUint64Array = isBigUint64Array;
|
||||
const isKeyObject = (0, _utils.notImplemented)("util.types.isKeyObject");
|
||||
exports.isKeyObject = isKeyObject;
|
||||
const isCryptoKey = (0, _utils.notImplemented)("util.types.isCryptoKey");
|
||||
exports.isCryptoKey = isCryptoKey;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user