diff --git a/action/deps.js b/action/deps.js index dc293442..6168e026 100644 --- a/action/deps.js +++ b/action/deps.js @@ -1,34 +1,63 @@ // deno-fmt-ignore-file // deno-lint-ignore-file -// This code was bundled using `deno bundle` and it's not recommended to edit it manually +// This code was bundled using `deno task build-action` and it's not recommended to edit it manually -const osType = (()=>{ - const { Deno: Deno1 } = globalThis; - if (typeof Deno1?.build?.os === "string") { - return Deno1.build.os; - } - const { navigator } = globalThis; - if (navigator?.appVersion?.includes?.("Win")) { - return "windows"; - } - return "linux"; -})(); -const isWindows = osType === "windows"; -const CHAR_FORWARD_SLASH = 47; function assertPath(path) { if (typeof path !== "string") { throw new TypeError(`Path must be a string. Received ${JSON.stringify(path)}`); } } -function isPosixPathSeparator(code) { - return code === 47; -} +const CHAR_FORWARD_SLASH = 47; function isPathSeparator(code) { - return isPosixPathSeparator(code) || code === 92; + return code === 47 || code === 92; } function isWindowsDeviceRoot(code) { return code >= 97 && code <= 122 || code >= 65 && code <= 90; } +function assertArg(url) { + url = url instanceof URL ? url : new URL(url); + if (url.protocol !== "file:") { + throw new TypeError("Must be a file URL."); + } + return url; +} +function fromFileUrl(url) { + url = assertArg(url); + let path = decodeURIComponent(url.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25")).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\"); + if (url.hostname !== "") { + path = `\\\\${url.hostname}${path}`; + } + return path; +} +function isAbsolute(path) { + assertPath(path); + const len = path.length; + if (len === 0) return false; + const code = path.charCodeAt(0); + if (isPathSeparator(code)) { + return true; + } else if (isWindowsDeviceRoot(code)) { + if (len > 2 && path.charCodeAt(1) === 58) { + if (isPathSeparator(path.charCodeAt(2))) return true; + } + } + return false; +} +class AssertionError extends Error { + constructor(message){ + super(message); + this.name = "AssertionError"; + } +} +function assert(expr, msg = "") { + if (!expr) { + throw new AssertionError(msg); + } +} +function assertArg1(path) { + assertPath(path); + if (path.length === 0) return "."; +} function normalizeString(path, allowAboveRoot, separator, isPathSeparator) { let res = ""; let lastSegmentLength = 0; @@ -82,136 +111,9 @@ function normalizeString(path, allowAboveRoot, separator, isPathSeparator) { } return res; } -function _format(sep, pathObject) { - const dir = pathObject.dir || pathObject.root; - const base = pathObject.base || (pathObject.name || "") + (pathObject.ext || ""); - if (!dir) return base; - if (dir === pathObject.root) return dir + base; - return dir + sep + base; -} -const WHITESPACE_ENCODINGS = { - "\u0009": "%09", - "\u000A": "%0A", - "\u000B": "%0B", - "\u000C": "%0C", - "\u000D": "%0D", - "\u0020": "%20" -}; -function encodeWhitespace(string) { - return string.replaceAll(/[\s]/g, (c)=>{ - return WHITESPACE_ENCODINGS[c] ?? c; - }); -} -class DenoStdInternalError extends Error { - constructor(message){ - super(message); - this.name = "DenoStdInternalError"; - } -} -function assert(expr, msg = "") { - if (!expr) { - throw new DenoStdInternalError(msg); - } -} -const sep = "\\"; -const delimiter = ";"; -function resolve(...pathSegments) { - let resolvedDevice = ""; - let resolvedTail = ""; - let resolvedAbsolute = false; - for(let i = pathSegments.length - 1; i >= -1; i--){ - let path; - const { Deno: Deno1 } = globalThis; - if (i >= 0) { - path = pathSegments[i]; - } else if (!resolvedDevice) { - if (typeof Deno1?.cwd !== "function") { - throw new TypeError("Resolved a drive-letter-less path without a CWD."); - } - path = Deno1.cwd(); - } else { - if (typeof Deno1?.env?.get !== "function" || typeof Deno1?.cwd !== "function") { - throw new TypeError("Resolved a relative path without a CWD."); - } - path = Deno1.cwd(); - if (path === undefined || path.slice(0, 3).toLowerCase() !== `${resolvedDevice.toLowerCase()}\\`) { - path = `${resolvedDevice}\\`; - } - } - assertPath(path); - const len = path.length; - if (len === 0) continue; - let rootEnd = 0; - let device = ""; - let isAbsolute = false; - const code = path.charCodeAt(0); - if (len > 1) { - if (isPathSeparator(code)) { - isAbsolute = true; - if (isPathSeparator(path.charCodeAt(1))) { - let j = 2; - let last = j; - for(; j < len; ++j){ - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - const firstPart = path.slice(last, j); - last = j; - for(; j < len; ++j){ - if (!isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - last = j; - for(; j < len; ++j){ - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j === len) { - device = `\\\\${firstPart}\\${path.slice(last)}`; - rootEnd = j; - } else if (j !== last) { - device = `\\\\${firstPart}\\${path.slice(last, j)}`; - rootEnd = j; - } - } - } - } else { - rootEnd = 1; - } - } else if (isWindowsDeviceRoot(code)) { - if (path.charCodeAt(1) === 58) { - device = path.slice(0, 2); - rootEnd = 2; - if (len > 2) { - if (isPathSeparator(path.charCodeAt(2))) { - isAbsolute = true; - rootEnd = 3; - } - } - } - } - } else if (isPathSeparator(code)) { - rootEnd = 1; - isAbsolute = true; - } - if (device.length > 0 && resolvedDevice.length > 0 && device.toLowerCase() !== resolvedDevice.toLowerCase()) { - continue; - } - if (resolvedDevice.length === 0 && device.length > 0) { - resolvedDevice = device; - } - if (!resolvedAbsolute) { - resolvedTail = `${path.slice(rootEnd)}\\${resolvedTail}`; - resolvedAbsolute = isAbsolute; - } - if (resolvedAbsolute && resolvedDevice.length > 0) break; - } - resolvedTail = normalizeString(resolvedTail, !resolvedAbsolute, "\\", isPathSeparator); - return resolvedDevice + (resolvedAbsolute ? "\\" : "") + resolvedTail || "."; -} function normalize(path) { - assertPath(path); + assertArg1(path); const len = path.length; - if (len === 0) return "."; let rootEnd = 0; let device; let isAbsolute = false; @@ -290,26 +192,11 @@ function normalize(path) { return device; } } -function isAbsolute(path) { - assertPath(path); - const len = path.length; - if (len === 0) return false; - const code = path.charCodeAt(0); - if (isPathSeparator(code)) { - return true; - } else if (isWindowsDeviceRoot(code)) { - if (len > 2 && path.charCodeAt(1) === 58) { - if (isPathSeparator(path.charCodeAt(2))) return true; - } - } - return false; -} function join(...paths) { - const pathsCount = paths.length; - if (pathsCount === 0) return "."; + if (paths.length === 0) return "."; let joined; let firstPart = null; - for(let i = 0; i < pathsCount; ++i){ + for(let i = 0; i < paths.length; ++i){ const path = paths[i]; assertPath(path); if (path.length > 0) { @@ -320,7 +207,7 @@ function join(...paths) { if (joined === undefined) return "."; let needsReplace = true; let slashCount = 0; - assert(firstPart != null); + assert(firstPart !== null); if (isPathSeparator(firstPart.charCodeAt(0))) { ++slashCount; const firstLen = firstPart.length; @@ -344,379 +231,111 @@ function join(...paths) { } return normalize(joined); } -function relative(from, to) { - assertPath(from); - assertPath(to); - if (from === to) return ""; - const fromOrig = resolve(from); - const toOrig = resolve(to); - if (fromOrig === toOrig) return ""; - from = fromOrig.toLowerCase(); - to = toOrig.toLowerCase(); - if (from === to) return ""; - let fromStart = 0; - let fromEnd = from.length; - for(; fromStart < fromEnd; ++fromStart){ - if (from.charCodeAt(fromStart) !== 92) break; - } - for(; fromEnd - 1 > fromStart; --fromEnd){ - if (from.charCodeAt(fromEnd - 1) !== 92) break; - } - const fromLen = fromEnd - fromStart; - let toStart = 0; - let toEnd = to.length; - for(; toStart < toEnd; ++toStart){ - if (to.charCodeAt(toStart) !== 92) break; - } - for(; toEnd - 1 > toStart; --toEnd){ - if (to.charCodeAt(toEnd - 1) !== 92) break; - } - const toLen = toEnd - toStart; - const length = fromLen < toLen ? fromLen : toLen; - let lastCommonSep = -1; - let i = 0; - for(; i <= length; ++i){ - if (i === length) { - if (toLen > length) { - if (to.charCodeAt(toStart + i) === 92) { - return toOrig.slice(toStart + i + 1); - } else if (i === 2) { - return toOrig.slice(toStart + i); - } - } - if (fromLen > length) { - if (from.charCodeAt(fromStart + i) === 92) { - lastCommonSep = i; - } else if (i === 2) { - lastCommonSep = 3; - } - } - break; - } - const fromCode = from.charCodeAt(fromStart + i); - const toCode = to.charCodeAt(toStart + i); - if (fromCode !== toCode) break; - else if (fromCode === 92) lastCommonSep = i; - } - if (i !== length && lastCommonSep === -1) { - return toOrig; - } - let out = ""; - if (lastCommonSep === -1) lastCommonSep = 0; - for(i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i){ - if (i === fromEnd || from.charCodeAt(i) === 92) { - if (out.length === 0) out += ".."; - else out += "\\.."; - } - } - if (out.length > 0) { - return out + toOrig.slice(toStart + lastCommonSep, toEnd); - } else { - toStart += lastCommonSep; - if (toOrig.charCodeAt(toStart) === 92) ++toStart; - return toOrig.slice(toStart, toEnd); - } -} -function toNamespacedPath(path) { - if (typeof path !== "string") return path; - if (path.length === 0) return ""; - const resolvedPath = resolve(path); - if (resolvedPath.length >= 3) { - if (resolvedPath.charCodeAt(0) === 92) { - if (resolvedPath.charCodeAt(1) === 92) { - const code = resolvedPath.charCodeAt(2); - if (code !== 63 && code !== 46) { - return `\\\\?\\UNC\\${resolvedPath.slice(2)}`; - } - } - } else if (isWindowsDeviceRoot(resolvedPath.charCodeAt(0))) { - if (resolvedPath.charCodeAt(1) === 58 && resolvedPath.charCodeAt(2) === 92) { - return `\\\\?\\${resolvedPath}`; - } - } - } - return path; -} -function dirname(path) { - assertPath(path); - const len = path.length; - if (len === 0) return "."; - let rootEnd = -1; - let end = -1; - let matchedSlash = true; - let offset = 0; - const code = path.charCodeAt(0); - if (len > 1) { - if (isPathSeparator(code)) { - rootEnd = offset = 1; - if (isPathSeparator(path.charCodeAt(1))) { - let j = 2; - let last = j; - for(; j < len; ++j){ - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - last = j; - for(; j < len; ++j){ - if (!isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - last = j; - for(; j < len; ++j){ - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j === len) { - return path; - } - if (j !== last) { - rootEnd = offset = j + 1; - } - } - } - } - } else if (isWindowsDeviceRoot(code)) { - if (path.charCodeAt(1) === 58) { - rootEnd = offset = 2; - if (len > 2) { - if (isPathSeparator(path.charCodeAt(2))) rootEnd = offset = 3; - } - } - } - } else if (isPathSeparator(code)) { - return path; - } - for(let i = len - 1; i >= offset; --i){ - if (isPathSeparator(path.charCodeAt(i))) { - if (!matchedSlash) { - end = i; - break; +function resolve(...pathSegments) { + let resolvedDevice = ""; + let resolvedTail = ""; + let resolvedAbsolute = false; + for(let i = pathSegments.length - 1; i >= -1; i--){ + let path; + const { Deno: Deno1 } = globalThis; + if (i >= 0) { + path = pathSegments[i]; + } else if (!resolvedDevice) { + if (typeof Deno1?.cwd !== "function") { + throw new TypeError("Resolved a drive-letter-less path without a CWD."); } + path = Deno1.cwd(); } else { - matchedSlash = false; - } - } - if (end === -1) { - if (rootEnd === -1) return "."; - else end = rootEnd; - } - return path.slice(0, end); -} -function basename(path, ext = "") { - if (ext !== undefined && typeof ext !== "string") { - throw new TypeError('"ext" argument must be a string'); - } - assertPath(path); - let start = 0; - let end = -1; - let matchedSlash = true; - let i; - if (path.length >= 2) { - const drive = path.charCodeAt(0); - if (isWindowsDeviceRoot(drive)) { - if (path.charCodeAt(1) === 58) start = 2; - } - } - if (ext !== undefined && ext.length > 0 && ext.length <= path.length) { - if (ext.length === path.length && ext === path) return ""; - let extIdx = ext.length - 1; - let firstNonSlashEnd = -1; - for(i = path.length - 1; i >= start; --i){ - const code = path.charCodeAt(i); - if (isPathSeparator(code)) { - if (!matchedSlash) { - start = i + 1; - break; - } - } else { - if (firstNonSlashEnd === -1) { - matchedSlash = false; - firstNonSlashEnd = i + 1; - } - if (extIdx >= 0) { - if (code === ext.charCodeAt(extIdx)) { - if (--extIdx === -1) { - end = i; - } - } else { - extIdx = -1; - end = firstNonSlashEnd; - } - } - } - } - if (start === end) end = firstNonSlashEnd; - else if (end === -1) end = path.length; - return path.slice(start, end); - } else { - for(i = path.length - 1; i >= start; --i){ - if (isPathSeparator(path.charCodeAt(i))) { - if (!matchedSlash) { - start = i + 1; - break; - } - } else if (end === -1) { - matchedSlash = false; - end = i + 1; + if (typeof Deno1?.env?.get !== "function" || typeof Deno1?.cwd !== "function") { + throw new TypeError("Resolved a relative path without a CWD."); } - } - if (end === -1) return ""; - return path.slice(start, end); - } -} -function extname(path) { - assertPath(path); - let start = 0; - let startDot = -1; - let startPart = 0; - let end = -1; - let matchedSlash = true; - let preDotState = 0; - if (path.length >= 2 && path.charCodeAt(1) === 58 && isWindowsDeviceRoot(path.charCodeAt(0))) { - start = startPart = 2; - } - for(let i = path.length - 1; i >= start; --i){ - const code = path.charCodeAt(i); - if (isPathSeparator(code)) { - if (!matchedSlash) { - startPart = i + 1; - break; + path = Deno1.cwd(); + if (path === undefined || path.slice(0, 3).toLowerCase() !== `${resolvedDevice.toLowerCase()}\\`) { + path = `${resolvedDevice}\\`; } - continue; - } - if (end === -1) { - matchedSlash = false; - end = i + 1; - } - if (code === 46) { - if (startDot === -1) startDot = i; - else if (preDotState !== 1) preDotState = 1; - } else if (startDot !== -1) { - preDotState = -1; } - } - if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { - return ""; - } - return path.slice(startDot, end); -} -function format(pathObject) { - if (pathObject === null || typeof pathObject !== "object") { - throw new TypeError(`The "pathObject" argument must be of type Object. Received type ${typeof pathObject}`); - } - return _format("\\", pathObject); -} -function parse(path) { - assertPath(path); - const ret = { - root: "", - dir: "", - base: "", - ext: "", - name: "" - }; - const len = path.length; - if (len === 0) return ret; - let rootEnd = 0; - let code = path.charCodeAt(0); - if (len > 1) { - if (isPathSeparator(code)) { - rootEnd = 1; - if (isPathSeparator(path.charCodeAt(1))) { - let j = 2; - let last = j; - for(; j < len; ++j){ - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - last = j; + assertPath(path); + const len = path.length; + if (len === 0) continue; + let rootEnd = 0; + let device = ""; + let isAbsolute = false; + const code = path.charCodeAt(0); + if (len > 1) { + if (isPathSeparator(code)) { + isAbsolute = true; + if (isPathSeparator(path.charCodeAt(1))) { + let j = 2; + let last = j; for(; j < len; ++j){ - if (!isPathSeparator(path.charCodeAt(j))) break; + if (isPathSeparator(path.charCodeAt(j))) break; } if (j < len && j !== last) { + const firstPart = path.slice(last, j); last = j; for(; j < len; ++j){ - if (isPathSeparator(path.charCodeAt(j))) break; + if (!isPathSeparator(path.charCodeAt(j))) break; } - if (j === len) { - rootEnd = j; - } else if (j !== last) { - rootEnd = j + 1; + if (j < len && j !== last) { + last = j; + for(; j < len; ++j){ + if (isPathSeparator(path.charCodeAt(j))) break; + } + if (j === len) { + device = `\\\\${firstPart}\\${path.slice(last)}`; + rootEnd = j; + } else if (j !== last) { + device = `\\\\${firstPart}\\${path.slice(last, j)}`; + rootEnd = j; + } } } + } else { + rootEnd = 1; } - } - } else if (isWindowsDeviceRoot(code)) { - if (path.charCodeAt(1) === 58) { - rootEnd = 2; - if (len > 2) { - if (isPathSeparator(path.charCodeAt(2))) { - if (len === 3) { - ret.root = ret.dir = path; - return ret; + } else if (isWindowsDeviceRoot(code)) { + if (path.charCodeAt(1) === 58) { + device = path.slice(0, 2); + rootEnd = 2; + if (len > 2) { + if (isPathSeparator(path.charCodeAt(2))) { + isAbsolute = true; + rootEnd = 3; } - rootEnd = 3; } - } else { - ret.root = ret.dir = path; - return ret; } } + } else if (isPathSeparator(code)) { + rootEnd = 1; + isAbsolute = true; } - } else if (isPathSeparator(code)) { - ret.root = ret.dir = path; - return ret; - } - if (rootEnd > 0) ret.root = path.slice(0, rootEnd); - let startDot = -1; - let startPart = rootEnd; - let end = -1; - let matchedSlash = true; - let i = path.length - 1; - let preDotState = 0; - for(; i >= rootEnd; --i){ - code = path.charCodeAt(i); - if (isPathSeparator(code)) { - if (!matchedSlash) { - startPart = i + 1; - break; - } + if (device.length > 0 && resolvedDevice.length > 0 && device.toLowerCase() !== resolvedDevice.toLowerCase()) { continue; } - if (end === -1) { - matchedSlash = false; - end = i + 1; - } - if (code === 46) { - if (startDot === -1) startDot = i; - else if (preDotState !== 1) preDotState = 1; - } else if (startDot !== -1) { - preDotState = -1; + if (resolvedDevice.length === 0 && device.length > 0) { + resolvedDevice = device; } - } - if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { - if (end !== -1) { - ret.base = ret.name = path.slice(startPart, end); + if (!resolvedAbsolute) { + resolvedTail = `${path.slice(rootEnd)}\\${resolvedTail}`; + resolvedAbsolute = isAbsolute; } - } else { - ret.name = path.slice(startPart, startDot); - ret.base = path.slice(startPart, end); - ret.ext = path.slice(startDot, end); + if (resolvedAbsolute && resolvedDevice.length > 0) break; } - if (startPart > 0 && startPart !== rootEnd) { - ret.dir = path.slice(0, startPart - 1); - } else ret.dir = ret.root; - return ret; + resolvedTail = normalizeString(resolvedTail, !resolvedAbsolute, "\\", isPathSeparator); + return resolvedDevice + (resolvedAbsolute ? "\\" : "") + resolvedTail || "."; } -function fromFileUrl(url) { - url = url instanceof URL ? url : new URL(url); - if (url.protocol != "file:") { - throw new TypeError("Must be a file URL."); - } - let path = decodeURIComponent(url.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25")).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\"); - if (url.hostname != "") { - path = `\\\\${url.hostname}${path}`; - } - return path; +const WHITESPACE_ENCODINGS = { + "\u0009": "%09", + "\u000A": "%0A", + "\u000B": "%0B", + "\u000C": "%0C", + "\u000D": "%0D", + "\u0020": "%20" +}; +function encodeWhitespace(string) { + return string.replaceAll(/[\s]/g, (c)=>{ + return WHITESPACE_ENCODINGS[c] ?? c; + }); } function toFileUrl(path) { if (!isAbsolute(path)) { @@ -725,7 +344,7 @@ function toFileUrl(path) { const [, hostname, pathname] = path.match(/^(?:[/\\]{2}([^/\\]+)(?=[/\\](?:[^/\\]|$)))?(.*)/); const url = new URL("file:///"); url.pathname = encodeWhitespace(pathname.replace(/%/g, "%25")); - if (hostname != null && hostname != "localhost") { + if (hostname !== undefined && hostname !== "localhost") { url.hostname = hostname; if (!url.hostname) { throw new TypeError("Invalid hostname."); @@ -733,25 +352,41 @@ function toFileUrl(path) { } return url; } -const mod = { - sep: sep, - delimiter: delimiter, - resolve: resolve, - normalize: normalize, - isAbsolute: isAbsolute, - join: join, - relative: relative, - toNamespacedPath: toNamespacedPath, - dirname: dirname, - basename: basename, - extname: extname, - format: format, - parse: parse, - fromFileUrl: fromFileUrl, - toFileUrl: toFileUrl -}; -const sep1 = "/"; -const delimiter1 = ":"; +function isPosixPathSeparator(code) { + return code === 47; +} +function fromFileUrl1(url) { + url = assertArg(url); + return decodeURIComponent(url.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, "%25")); +} +function isAbsolute1(path) { + assertPath(path); + return path.length > 0 && isPosixPathSeparator(path.charCodeAt(0)); +} +function normalize1(path) { + assertArg1(path); + const isAbsolute = isPosixPathSeparator(path.charCodeAt(0)); + const trailingSeparator = isPosixPathSeparator(path.charCodeAt(path.length - 1)); + path = normalizeString(path, !isAbsolute, "/", isPosixPathSeparator); + if (path.length === 0 && !isAbsolute) path = "."; + if (path.length > 0 && trailingSeparator) path += "/"; + if (isAbsolute) return `/${path}`; + return path; +} +function join1(...paths) { + if (paths.length === 0) return "."; + let joined; + for(let i = 0, len = paths.length; i < len; ++i){ + const path = paths[i]; + assertPath(path); + if (path.length > 0) { + if (!joined) joined = path; + else joined += `/${path}`; + } + } + if (!joined) return "."; + return normalize1(joined); +} function resolve1(...pathSegments) { let resolvedPath = ""; let resolvedAbsolute = false; @@ -759,7 +394,7 @@ function resolve1(...pathSegments) { let path; if (i >= 0) path = pathSegments[i]; else { - const { Deno: Deno1 } = globalThis; + const { Deno: Deno1 } = globalThis; if (typeof Deno1?.cwd !== "function") { throw new TypeError("Resolved a relative path without a CWD."); } @@ -770,7 +405,7 @@ function resolve1(...pathSegments) { continue; } resolvedPath = `${path}/${resolvedPath}`; - resolvedAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH; + resolvedAbsolute = isPosixPathSeparator(path.charCodeAt(0)); } resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute, "/", isPosixPathSeparator); if (resolvedAbsolute) { @@ -779,404 +414,546 @@ function resolve1(...pathSegments) { } else if (resolvedPath.length > 0) return resolvedPath; else return "."; } -function normalize1(path) { - assertPath(path); - if (path.length === 0) return "."; - const isAbsolute = path.charCodeAt(0) === 47; - const trailingSeparator = path.charCodeAt(path.length - 1) === 47; - path = normalizeString(path, !isAbsolute, "/", isPosixPathSeparator); - if (path.length === 0 && !isAbsolute) path = "."; - if (path.length > 0 && trailingSeparator) path += "/"; - if (isAbsolute) return `/${path}`; - return path; -} -function isAbsolute1(path) { - assertPath(path); - return path.length > 0 && path.charCodeAt(0) === 47; -} -function join1(...paths) { - if (paths.length === 0) return "."; - let joined; - for(let i = 0, len = paths.length; i < len; ++i){ - const path = paths[i]; - assertPath(path); - if (path.length > 0) { - if (!joined) joined = path; - else joined += `/${path}`; - } +function toFileUrl1(path) { + if (!isAbsolute1(path)) { + throw new TypeError("Must be an absolute path."); } - if (!joined) return "."; - return normalize1(joined); + const url = new URL("file:///"); + url.pathname = encodeWhitespace(path.replace(/%/g, "%25").replace(/\\/g, "%5C")); + return url; } -function relative1(from, to) { - assertPath(from); - assertPath(to); - if (from === to) return ""; - from = resolve1(from); - to = resolve1(to); - if (from === to) return ""; - let fromStart = 1; - const fromEnd = from.length; - for(; fromStart < fromEnd; ++fromStart){ - if (from.charCodeAt(fromStart) !== 47) break; - } - const fromLen = fromEnd - fromStart; - let toStart = 1; - const toEnd = to.length; - for(; toStart < toEnd; ++toStart){ - if (to.charCodeAt(toStart) !== 47) break; - } - const toLen = toEnd - toStart; - const length = fromLen < toLen ? fromLen : toLen; - let lastCommonSep = -1; - let i = 0; - for(; i <= length; ++i){ - if (i === length) { - if (toLen > length) { - if (to.charCodeAt(toStart + i) === 47) { - return to.slice(toStart + i + 1); - } else if (i === 0) { - return to.slice(toStart + i); - } - } else if (fromLen > length) { - if (from.charCodeAt(fromStart + i) === 47) { - lastCommonSep = i; - } else if (i === 0) { - lastCommonSep = 0; - } - } - break; - } - const fromCode = from.charCodeAt(fromStart + i); - const toCode = to.charCodeAt(toStart + i); - if (fromCode !== toCode) break; - else if (fromCode === 47) lastCommonSep = i; - } - let out = ""; - for(i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i){ - if (i === fromEnd || from.charCodeAt(i) === 47) { - if (out.length === 0) out += ".."; - else out += "/.."; - } +const osType = (()=>{ + const { Deno: Deno1 } = globalThis; + if (typeof Deno1?.build?.os === "string") { + return Deno1.build.os; } - if (out.length > 0) return out + to.slice(toStart + lastCommonSep); - else { - toStart += lastCommonSep; - if (to.charCodeAt(toStart) === 47) ++toStart; - return to.slice(toStart); + const { navigator } = globalThis; + if (navigator?.appVersion?.includes?.("Win")) { + return "windows"; } + return "linux"; +})(); +const isWindows = osType === "windows"; +function fromFileUrl2(url) { + return isWindows ? fromFileUrl(url) : fromFileUrl1(url); } -function toNamespacedPath1(path) { - return path; +function join2(...paths) { + return isWindows ? join(...paths) : join1(...paths); } -function dirname1(path) { - assertPath(path); - if (path.length === 0) return "."; - const hasRoot = path.charCodeAt(0) === 47; - let end = -1; - let matchedSlash = true; - for(let i = path.length - 1; i >= 1; --i){ - if (path.charCodeAt(i) === 47) { - if (!matchedSlash) { - end = i; - break; +function normalize2(path) { + return isWindows ? normalize(path) : normalize1(path); +} +function resolve2(...pathSegments) { + return isWindows ? resolve(...pathSegments) : resolve1(...pathSegments); +} +function toFileUrl2(path) { + return isWindows ? toFileUrl(path) : toFileUrl1(path); +} +const { Deno: Deno1 } = globalThis; +typeof Deno1?.noColor === "boolean" ? Deno1.noColor : false; +new RegExp([ + "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", + "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TXZcf-nq-uy=><~]))" +].join("|"), "g"); +const { hasOwn } = Object; +class TextLineStream extends TransformStream { + #currentLine = ""; + constructor(options = { + allowCR: false + }){ + super({ + transform: (chars, controller)=>{ + chars = this.#currentLine + chars; + while(true){ + const lfIndex = chars.indexOf("\n"); + const crIndex = options.allowCR ? chars.indexOf("\r") : -1; + if (crIndex !== -1 && crIndex !== chars.length - 1 && (lfIndex === -1 || lfIndex - 1 > crIndex)) { + controller.enqueue(chars.slice(0, crIndex)); + chars = chars.slice(crIndex + 1); + continue; + } + if (lfIndex === -1) break; + const endIndex = chars[lfIndex - 1] === "\r" ? lfIndex - 1 : lfIndex; + controller.enqueue(chars.slice(0, endIndex)); + chars = chars.slice(lfIndex + 1); + } + this.#currentLine = chars; + }, + flush: (controller)=>{ + if (this.#currentLine === "") return; + const currentLine = options.allowCR && this.#currentLine.endsWith("\r") ? this.#currentLine.slice(0, -1) : this.#currentLine; + controller.enqueue(currentLine); } - } else { - matchedSlash = false; - } + }); } - if (end === -1) return hasRoot ? "/" : "."; - if (hasRoot && end === 1) return "//"; - return path.slice(0, end); } -function basename1(path, ext = "") { - if (ext !== undefined && typeof ext !== "string") { - throw new TypeError('"ext" argument must be a string'); +const originalJSONParse = globalThis.JSON.parse; +class JSONCParser { + #whitespace = new Set(" \t\r\n"); + #numberEndToken = new Set([ + ..."[]{}:,/", + ...this.#whitespace + ]); + #text; + #length; + #tokenized; + #options; + constructor(text, options){ + this.#text = `${text}`; + this.#length = this.#text.length; + this.#tokenized = this.#tokenize(); + this.#options = options; } - assertPath(path); - let start = 0; - let end = -1; - let matchedSlash = true; - let i; - if (ext !== undefined && ext.length > 0 && ext.length <= path.length) { - if (ext.length === path.length && ext === path) return ""; - let extIdx = ext.length - 1; - let firstNonSlashEnd = -1; - for(i = path.length - 1; i >= 0; --i){ - const code = path.charCodeAt(i); - if (code === 47) { - if (!matchedSlash) { - start = i + 1; - break; + parse() { + const token = this.#getNext(); + const res = this.#parseJsonValue(token); + const { done, value } = this.#tokenized.next(); + if (!done) { + throw new SyntaxError(buildErrorMessage(value)); + } + return res; + } + #getNext() { + const { done, value } = this.#tokenized.next(); + if (done) { + throw new SyntaxError("Unexpected end of JSONC input"); + } + return value; + } + *#tokenize() { + for(let i = 0; i < this.#length; i++){ + if (this.#whitespace.has(this.#text[i])) { + continue; + } + if (this.#text[i] === "/" && this.#text[i + 1] === "*") { + i += 2; + let hasEndOfComment = false; + for(; i < this.#length; i++){ + if (this.#text[i] === "*" && this.#text[i + 1] === "/") { + hasEndOfComment = true; + break; + } } - } else { - if (firstNonSlashEnd === -1) { - matchedSlash = false; - firstNonSlashEnd = i + 1; + if (!hasEndOfComment) { + throw new SyntaxError("Unexpected end of JSONC input"); } - if (extIdx >= 0) { - if (code === ext.charCodeAt(extIdx)) { - if (--extIdx === -1) { - end = i; - } - } else { - extIdx = -1; - end = firstNonSlashEnd; + i++; + continue; + } + if (this.#text[i] === "/" && this.#text[i + 1] === "/") { + i += 2; + for(; i < this.#length; i++){ + if (this.#text[i] === "\n" || this.#text[i] === "\r") { + break; } } + continue; } - } - if (start === end) end = firstNonSlashEnd; - else if (end === -1) end = path.length; - return path.slice(start, end); - } else { - for(i = path.length - 1; i >= 0; --i){ - if (path.charCodeAt(i) === 47) { - if (!matchedSlash) { - start = i + 1; + switch(this.#text[i]){ + case "{": + yield { + type: "BeginObject", + position: i + }; break; - } - } else if (end === -1) { - matchedSlash = false; - end = i + 1; + case "}": + yield { + type: "EndObject", + position: i + }; + break; + case "[": + yield { + type: "BeginArray", + position: i + }; + break; + case "]": + yield { + type: "EndArray", + position: i + }; + break; + case ":": + yield { + type: "NameSeparator", + position: i + }; + break; + case ",": + yield { + type: "ValueSeparator", + position: i + }; + break; + case '"': + { + const startIndex = i; + let shouldEscapeNext = false; + i++; + for(; i < this.#length; i++){ + if (this.#text[i] === '"' && !shouldEscapeNext) { + break; + } + shouldEscapeNext = this.#text[i] === "\\" && !shouldEscapeNext; + } + yield { + type: "String", + sourceText: this.#text.substring(startIndex, i + 1), + position: startIndex + }; + break; + } + default: + { + const startIndex = i; + for(; i < this.#length; i++){ + if (this.#numberEndToken.has(this.#text[i])) { + break; + } + } + i--; + yield { + type: "NullOrTrueOrFalseOrNumber", + sourceText: this.#text.substring(startIndex, i + 1), + position: startIndex + }; + } } } - if (end === -1) return ""; - return path.slice(start, end); } -} -function extname1(path) { - assertPath(path); - let startDot = -1; - let startPart = 0; - let end = -1; - let matchedSlash = true; - let preDotState = 0; - for(let i = path.length - 1; i >= 0; --i){ - const code = path.charCodeAt(i); - if (code === 47) { - if (!matchedSlash) { - startPart = i + 1; - break; + #parseJsonValue(value) { + switch(value.type){ + case "BeginObject": + return this.#parseObject(); + case "BeginArray": + return this.#parseArray(); + case "NullOrTrueOrFalseOrNumber": + return this.#parseNullOrTrueOrFalseOrNumber(value); + case "String": + return this.#parseString(value); + default: + throw new SyntaxError(buildErrorMessage(value)); + } + } + #parseObject() { + const target = {}; + for(let isFirst = true;; isFirst = false){ + const token1 = this.#getNext(); + if ((isFirst || this.#options.allowTrailingComma) && token1.type === "EndObject") { + return target; + } + if (token1.type !== "String") { + throw new SyntaxError(buildErrorMessage(token1)); + } + const key = this.#parseString(token1); + const token2 = this.#getNext(); + if (token2.type !== "NameSeparator") { + throw new SyntaxError(buildErrorMessage(token2)); + } + const token3 = this.#getNext(); + Object.defineProperty(target, key, { + value: this.#parseJsonValue(token3), + writable: true, + enumerable: true, + configurable: true + }); + const token4 = this.#getNext(); + if (token4.type === "EndObject") { + return target; + } + if (token4.type !== "ValueSeparator") { + throw new SyntaxError(buildErrorMessage(token4)); } - continue; } - if (end === -1) { - matchedSlash = false; - end = i + 1; + } + #parseArray() { + const target = []; + for(let isFirst = true;; isFirst = false){ + const token1 = this.#getNext(); + if ((isFirst || this.#options.allowTrailingComma) && token1.type === "EndArray") { + return target; + } + target.push(this.#parseJsonValue(token1)); + const token2 = this.#getNext(); + if (token2.type === "EndArray") { + return target; + } + if (token2.type !== "ValueSeparator") { + throw new SyntaxError(buildErrorMessage(token2)); + } } - if (code === 46) { - if (startDot === -1) startDot = i; - else if (preDotState !== 1) preDotState = 1; - } else if (startDot !== -1) { - preDotState = -1; + } + #parseString(value) { + let parsed; + try { + parsed = originalJSONParse(value.sourceText); + } catch { + throw new SyntaxError(buildErrorMessage(value)); } + assert(typeof parsed === "string"); + return parsed; } - if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { - return ""; + #parseNullOrTrueOrFalseOrNumber(value) { + if (value.sourceText === "null") { + return null; + } + if (value.sourceText === "true") { + return true; + } + if (value.sourceText === "false") { + return false; + } + let parsed; + try { + parsed = originalJSONParse(value.sourceText); + } catch { + throw new SyntaxError(buildErrorMessage(value)); + } + assert(typeof parsed === "number"); + return parsed; } - return path.slice(startDot, end); } -function format1(pathObject) { - if (pathObject === null || typeof pathObject !== "object") { - throw new TypeError(`The "pathObject" argument must be of type Object. Received type ${typeof pathObject}`); +function buildErrorMessage({ type, sourceText, position }) { + let token = ""; + switch(type){ + case "BeginObject": + token = "{"; + break; + case "EndObject": + token = "}"; + break; + case "BeginArray": + token = "["; + break; + case "EndArray": + token = "]"; + break; + case "NameSeparator": + token = ":"; + break; + case "ValueSeparator": + token = ","; + break; + case "NullOrTrueOrFalseOrNumber": + case "String": + token = 30 < sourceText.length ? `${sourceText.slice(0, 30)}...` : sourceText; + break; + default: + throw new Error("unreachable"); } - return _format("/", pathObject); -} -function parse1(path) { - assertPath(path); - const ret = { - root: "", - dir: "", - base: "", - ext: "", - name: "" - }; - if (path.length === 0) return ret; - const isAbsolute = path.charCodeAt(0) === 47; - let start; - if (isAbsolute) { - ret.root = "/"; - start = 1; - } else { - start = 0; - } - let startDot = -1; - let startPart = 0; - let end = -1; - let matchedSlash = true; - let i = path.length - 1; - let preDotState = 0; - for(; i >= start; --i){ - const code = path.charCodeAt(i); - if (code === 47) { - if (!matchedSlash) { - startPart = i + 1; - break; + return `Unexpected token ${token} in JSONC at position ${position}`; +} +new TextEncoder(); +new TextEncoder().encode("0123456789abcdef"); +new TextEncoder(); +new TextDecoder(); +function delay(ms, options = {}) { + const { signal, persistent } = options; + if (signal?.aborted) return Promise.reject(signal.reason); + return new Promise((resolve, reject)=>{ + const abort = ()=>{ + clearTimeout(i); + reject(signal?.reason); + }; + const done = ()=>{ + signal?.removeEventListener("abort", abort); + resolve(); + }; + const i = setTimeout(done, ms); + signal?.addEventListener("abort", abort, { + once: true + }); + if (persistent === false) { + try { + Deno.unrefTimer(i); + } catch (error) { + if (!(error instanceof ReferenceError)) { + throw error; + } + console.error("`persistent` option is only available in Deno"); } - continue; - } - if (end === -1) { - matchedSlash = false; - end = i + 1; - } - if (code === 46) { - if (startDot === -1) startDot = i; - else if (preDotState !== 1) preDotState = 1; - } else if (startDot !== -1) { - preDotState = -1; } + }); +} +var _computedKey; +_computedKey = Symbol.asyncIterator; +class MuxAsyncIterator { + #iteratorCount = 0; + #yields = []; + #throws = []; + #signal = Promise.withResolvers(); + add(iterable) { + ++this.#iteratorCount; + this.#callIteratorNext(iterable[Symbol.asyncIterator]()); } - if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { - if (end !== -1) { - if (startPart === 0 && isAbsolute) { - ret.base = ret.name = path.slice(1, end); + async #callIteratorNext(iterator) { + try { + const { value, done } = await iterator.next(); + if (done) { + --this.#iteratorCount; } else { - ret.base = ret.name = path.slice(startPart, end); + this.#yields.push({ + iterator, + value + }); } + } catch (e) { + this.#throws.push(e); } - } else { - if (startPart === 0 && isAbsolute) { - ret.name = path.slice(1, startDot); - ret.base = path.slice(1, end); - } else { - ret.name = path.slice(startPart, startDot); - ret.base = path.slice(startPart, end); + this.#signal.resolve(); + } + async *iterate() { + while(this.#iteratorCount > 0){ + await this.#signal.promise; + for (const { iterator, value } of this.#yields){ + yield value; + this.#callIteratorNext(iterator); + } + if (this.#throws.length) { + for (const e of this.#throws){ + throw e; + } + this.#throws.length = 0; + } + this.#yields.length = 0; + this.#signal = Promise.withResolvers(); } - ret.ext = path.slice(startDot, end); } - if (startPart > 0) ret.dir = path.slice(0, startPart - 1); - else if (isAbsolute) ret.dir = "/"; - return ret; -} -function fromFileUrl1(url) { - url = url instanceof URL ? url : new URL(url); - if (url.protocol != "file:") { - throw new TypeError("Must be a file URL."); + [_computedKey]() { + return this.iterate(); } - return decodeURIComponent(url.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, "%25")); } -function toFileUrl1(path) { - if (!isAbsolute1(path)) { - throw new TypeError("Must be an absolute path."); +function compareNumber(a, b) { + if (isNaN(a) || isNaN(b)) throw new Error("Comparison against non-numbers"); + return a === b ? 0 : a < b ? -1 : 1; +} +function checkIdentifier(v1 = [], v2 = []) { + if (v1.length && !v2.length) return -1; + if (!v1.length && v2.length) return 1; + return 0; +} +function compareIdentifier(v1 = [], v2 = []) { + const length = Math.max(v1.length, v2.length); + for(let i = 0; i < length; i++){ + const a = v1[i]; + const b = v2[i]; + if (a === undefined && b === undefined) return 0; + if (b === undefined) return 1; + if (a === undefined) return -1; + if (typeof a === "string" && typeof b === "number") return 1; + if (typeof a === "number" && typeof b === "string") return -1; + if (a < b) return -1; + if (a > b) return 1; } - const url = new URL("file:///"); - url.pathname = encodeWhitespace(path.replace(/%/g, "%25").replace(/\\/g, "%5C")); - return url; + return 0; +} +const NUMERIC_IDENTIFIER = "0|[1-9]\\d*"; +const NON_NUMERIC_IDENTIFIER = "\\d*[a-zA-Z-][a-zA-Z0-9-]*"; +const VERSION_CORE = `(?${NUMERIC_IDENTIFIER})\\.(?${NUMERIC_IDENTIFIER})\\.(?${NUMERIC_IDENTIFIER})`; +const PRERELEASE_IDENTIFIER = `(?:${NUMERIC_IDENTIFIER}|${NON_NUMERIC_IDENTIFIER})`; +const PRERELEASE = `(?:-(?${PRERELEASE_IDENTIFIER}(?:\\.${PRERELEASE_IDENTIFIER})*))`; +const BUILD_IDENTIFIER = "[0-9A-Za-z-]+"; +const BUILD = `(?:\\+(?${BUILD_IDENTIFIER}(?:\\.${BUILD_IDENTIFIER})*))`; +const FULL_VERSION = `v?${VERSION_CORE}${PRERELEASE}?${BUILD}?`; +const FULL_REGEXP = new RegExp(`^${FULL_VERSION}$`); +const COMPARATOR = "(?:<|>)?=?"; +const WILDCARD_IDENTIFIER = `x|X|\\*`; +const XRANGE_IDENTIFIER = `${NUMERIC_IDENTIFIER}|${WILDCARD_IDENTIFIER}`; +const XRANGE = `[v=\\s]*(?${XRANGE_IDENTIFIER})(?:\\.(?${XRANGE_IDENTIFIER})(?:\\.(?${XRANGE_IDENTIFIER})${PRERELEASE}?${BUILD}?)?)?`; +new RegExp(`^(?~>?|\\^|${COMPARATOR})\\s*${XRANGE}$`); +new RegExp(`^(?${COMPARATOR})\\s*(${FULL_VERSION})$|^$`); +function isValidNumber(value) { + return typeof value === "number" && !Number.isNaN(value) && (!Number.isFinite(value) || 0 <= value && value <= Number.MAX_SAFE_INTEGER); +} +const NUMERIC_IDENTIFIER_REGEXP = new RegExp(`^${NUMERIC_IDENTIFIER}$`); +function parsePrerelease(prerelease) { + return prerelease.split(".").filter(Boolean).map((id)=>{ + if (NUMERIC_IDENTIFIER_REGEXP.test(id)) { + const number = Number(id); + if (isValidNumber(number)) return number; + } + return id; + }); } -const mod1 = { - sep: sep1, - delimiter: delimiter1, - resolve: resolve1, - normalize: normalize1, - isAbsolute: isAbsolute1, - join: join1, - relative: relative1, - toNamespacedPath: toNamespacedPath1, - dirname: dirname1, - basename: basename1, - extname: extname1, - format: format1, - parse: parse1, - fromFileUrl: fromFileUrl1, - toFileUrl: toFileUrl1 +function parseBuild(buildmetadata) { + return buildmetadata.split(".").filter(Boolean); +} +function parseNumber(input, errorMessage) { + const number = Number(input); + if (!isValidNumber(number)) throw new TypeError(errorMessage); + return number; +} +function compare(s0, s1) { + if (s0 === s1) return 0; + return compareNumber(s0.major, s1.major) || compareNumber(s0.minor, s1.minor) || compareNumber(s0.patch, s1.patch) || checkIdentifier(s0.prerelease, s1.prerelease) || compareIdentifier(s0.prerelease, s1.prerelease); +} +({ + major: Number.POSITIVE_INFINITY, + minor: Number.POSITIVE_INFINITY, + patch: Number.POSITIVE_INFINITY, + prerelease: [], + build: [] +}); +const MIN = { + major: 0, + minor: 0, + patch: 0, + prerelease: [], + build: [] }; -const path = isWindows ? mod : mod1; -const { join: join2 , normalize: normalize2 } = path; -const path1 = isWindows ? mod : mod1; -const { basename: basename2 , delimiter: delimiter2 , dirname: dirname2 , extname: extname2 , format: format2 , fromFileUrl: fromFileUrl2 , isAbsolute: isAbsolute2 , join: join3 , normalize: normalize3 , parse: parse2 , relative: relative2 , resolve: resolve2 , sep: sep2 , toFileUrl: toFileUrl2 , toNamespacedPath: toNamespacedPath2 } = path1; -const { Deno: Deno1 } = globalThis; -typeof Deno1?.noColor === "boolean" ? Deno1.noColor : true; -new RegExp([ - "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", - "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))" -].join("|"), "g"); -const { hasOwn } = Object; -class TextLineStream extends TransformStream { - #allowCR; - #buf = ""; - constructor(options){ - super({ - transform: (chunk, controller)=>this.#handle(chunk, controller), - flush: (controller)=>this.#handle("\r\n", controller) - }); - this.#allowCR = options?.allowCR ?? false; - } - #handle(chunk, controller) { - chunk = this.#buf + chunk; - for(;;){ - const lfIndex = chunk.indexOf("\n"); - if (this.#allowCR) { - const crIndex = chunk.indexOf("\r"); - if (crIndex !== -1 && crIndex !== chunk.length - 1 && (lfIndex === -1 || lfIndex - 1 > crIndex)) { - controller.enqueue(chunk.slice(0, crIndex)); - chunk = chunk.slice(crIndex + 1); - continue; - } - } - if (lfIndex !== -1) { - let crOrLfIndex = lfIndex; - if (chunk[lfIndex - 1] === "\r") { - crOrLfIndex--; - } - controller.enqueue(chunk.slice(0, crOrLfIndex)); - chunk = chunk.slice(lfIndex + 1); - continue; - } - break; - } - this.#buf = chunk; - } -} -const re = []; -const src = []; -let R = 0; -const NUMERICIDENTIFIER = R++; -src[NUMERICIDENTIFIER] = "0|[1-9]\\d*"; -const NONNUMERICIDENTIFIER = R++; -src[NONNUMERICIDENTIFIER] = "\\d*[a-zA-Z-][a-zA-Z0-9-]*"; -const MAINVERSION = R++; -const nid = src[NUMERICIDENTIFIER]; -src[MAINVERSION] = `(${nid})\\.(${nid})\\.(${nid})`; -const PRERELEASEIDENTIFIER = R++; -src[PRERELEASEIDENTIFIER] = "(?:" + src[NUMERICIDENTIFIER] + "|" + src[NONNUMERICIDENTIFIER] + ")"; -const PRERELEASE = R++; -src[PRERELEASE] = "(?:-(" + src[PRERELEASEIDENTIFIER] + "(?:\\." + src[PRERELEASEIDENTIFIER] + ")*))"; -const BUILDIDENTIFIER = R++; -src[BUILDIDENTIFIER] = "[0-9A-Za-z-]+"; -const BUILD = R++; -src[BUILD] = "(?:\\+(" + src[BUILDIDENTIFIER] + "(?:\\." + src[BUILDIDENTIFIER] + ")*))"; -const FULL = R++; -const FULLPLAIN = "v?" + src[MAINVERSION] + src[PRERELEASE] + "?" + src[BUILD] + "?"; -src[FULL] = "^" + FULLPLAIN + "$"; -const GTLT = R++; -src[GTLT] = "((?:<|>)?=?)"; -const XRANGEIDENTIFIER = R++; -src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + "|x|X|\\*"; -const XRANGEPLAIN = R++; -src[XRANGEPLAIN] = "[v=\\s]*(" + src[XRANGEIDENTIFIER] + ")" + "(?:\\.(" + src[XRANGEIDENTIFIER] + ")" + "(?:\\.(" + src[XRANGEIDENTIFIER] + ")" + "(?:" + src[PRERELEASE] + ")?" + src[BUILD] + "?" + ")?)?"; -const XRANGE = R++; -src[XRANGE] = "^" + src[GTLT] + "\\s*" + src[XRANGEPLAIN] + "$"; -const LONETILDE = R++; -src[LONETILDE] = "(?:~>?)"; -const TILDE = R++; -src[TILDE] = "^" + src[LONETILDE] + src[XRANGEPLAIN] + "$"; -const LONECARET = R++; -src[LONECARET] = "(?:\\^)"; -const CARET = R++; -src[CARET] = "^" + src[LONECARET] + src[XRANGEPLAIN] + "$"; -const COMPARATOR = R++; -src[COMPARATOR] = "^" + src[GTLT] + "\\s*(" + FULLPLAIN + ")$|^$"; -const HYPHENRANGE = R++; -src[HYPHENRANGE] = "^\\s*(" + src[XRANGEPLAIN] + ")" + "\\s+-\\s+" + "(" + src[XRANGEPLAIN] + ")" + "\\s*$"; -const STAR = R++; -src[STAR] = "(<|>)?=?\\s*\\*"; -for(let i = 0; i < R; i++){ - if (!re[i]) { - re[i] = new RegExp(src[i]); - } -} -const noColor = globalThis.Deno?.noColor ?? true; +({ + major: Number.NEGATIVE_INFINITY, + minor: Number.POSITIVE_INFINITY, + patch: Number.POSITIVE_INFINITY, + prerelease: [], + build: [] +}); +const ANY = { + major: Number.NaN, + minor: Number.NaN, + patch: Number.NaN, + prerelease: [], + build: [] +}; +({ + operator: "", + ...ANY, + semver: ANY +}); +({ + operator: "<", + ...MIN, + semver: MIN +}); +function parse(version) { + if (typeof version !== "string") { + throw new TypeError(`version must be a string`); + } + if (version.length > 256) { + throw new TypeError(`version is longer than ${256} characters`); + } + version = version.trim(); + const groups = version.match(FULL_REGEXP)?.groups; + if (!groups) throw new TypeError(`Invalid Version: ${version}`); + const major = parseNumber(groups.major, "Invalid major version"); + const minor = parseNumber(groups.minor, "Invalid minor version"); + const patch = parseNumber(groups.patch, "Invalid patch version"); + const prerelease = groups.prerelease ? parsePrerelease(groups.prerelease) : []; + const build = groups.buildmetadata ? parseBuild(groups.buildmetadata) : []; + return { + major, + minor, + patch, + prerelease, + build + }; +} +function greaterOrEqual(s0, s1) { + return compare(s0, s1) >= 0; +} +const { Deno: Deno2 } = globalThis; +const noColor = typeof Deno2?.noColor === "boolean" ? Deno2.noColor : true; let enabled = !noColor; function setColorEnabled(value) { if (noColor) { @@ -1454,13 +1231,13 @@ function bgRgb24(str, color) { ], 49)); } const ANSI_PATTERN = new RegExp([ - "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", - "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))" + "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", + "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))" ].join("|"), "g"); function stripColor(string) { return string.replace(ANSI_PATTERN, ""); } -const mod2 = { +const mod = { setColorEnabled: setColorEnabled, getColorEnabled: getColorEnabled, reset: reset, @@ -2084,7 +1861,7 @@ const __default = [ 0xe01ef ] ]; -function wcswidth(str, { nul =0 , control =0 } = {}) { +function wcswidth(str, { nul = 0, control = 0 } = {}) { const opts = { nul, control @@ -2098,7 +1875,7 @@ function wcswidth(str, { nul =0 , control =0 } = {}) { } return s; } -function wcwidth(ucs, { nul =0 , control =0 } = {}) { +function wcwidth(ucs, { nul = 0, control = 0 } = {}) { if (ucs === 0) return nul; if (ucs < 32 || ucs >= 0x7f && ucs < 0xa0) return control; if (bisearch(ucs)) return 0; @@ -2117,7 +1894,7 @@ function bisearch(ucs) { } return false; } -function ansiRegex({ onlyFirst =false } = {}) { +function ansiRegex({ onlyFirst = false } = {}) { const pattern = [ "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))" @@ -2296,7 +2073,7 @@ function goRightSync(x = 1, writer = Deno.stdout) { function goToSync(x, y, writer = Deno.stdout) { writeSync(ESC + y + ";" + x + HOME, writer); } -const mod3 = await async function() { +const mod1 = await async function() { return { ESC: ESC, SAVE: SAVE, @@ -3661,30 +3438,50 @@ if ((await Deno.permissions.query({ supported = supported && (!!Deno.env.get("CI") || Deno.env.get("TERM") === "xterm-256color"); } const main = { - info: mod2.blue("ℹ"), - success: mod2.green("✔"), - warning: mod2.yellow("⚠"), - error: mod2.red("✖") + info: mod.blue("ℹ"), + success: mod.green("✔"), + warning: mod.yellow("⚠"), + error: mod.red("✖") }; const fallbacks = { - info: mod2.blue("i"), - success: mod2.green("√"), - warning: mod2.yellow("‼"), - error: mod2.red("×") + info: mod.blue("i"), + success: mod.green("√"), + warning: mod.yellow("‼"), + error: mod.red("×") }; const symbols = supported ? main : fallbacks; const encoder1 = new TextEncoder(); const colormap = { - black: mod2.black, - red: mod2.red, - green: mod2.green, - yellow: mod2.yellow, - blue: mod2.blue, - magenta: mod2.magenta, - cyan: mod2.cyan, - white: mod2.white, - gray: mod2.gray + black: mod.black, + red: mod.red, + green: mod.green, + yellow: mod.yellow, + blue: mod.blue, + magenta: mod.magenta, + cyan: mod.cyan, + white: mod.white, + gray: mod.gray }; +function wait(opts) { + if (typeof opts === "string") { + opts = { + text: opts + }; + } + return new Spinner({ + text: opts.text, + prefix: opts.prefix ?? "", + color: opts.color ?? mod.cyan, + spinner: opts.spinner ?? "dots", + hideCursor: opts.hideCursor ?? true, + indent: opts.indent ?? 0, + interval: opts.interval ?? 100, + stream: opts.stream ?? Deno.stdout, + enabled: true, + discardStdin: true, + interceptConsole: opts.interceptConsole ?? true + }); +} class Spinner { #opts; isSpinning; @@ -3709,17 +3506,52 @@ class Spinner { this.#frameIndex = 0; this.#linesToClear = 0; this.#linesCount = 1; - this.#enabled = typeof opts.enabled === "boolean" ? opts.enabled : mod3.isInteractive(this.#stream); + this.#enabled = typeof opts.enabled === "boolean" ? opts.enabled : mod1.isInteractive(this.#stream); if (opts.hideCursor) { addEventListener("unload", ()=>{ - mod3.showCursorSync(this.#stream); + mod1.showCursorSync(this.#stream); }); } + if (opts.interceptConsole) { + this.#interceptConsole(); + } } #spinner = __default1.dots; - #color = mod2.cyan; + #color = mod.cyan; #text = ""; #prefix = ""; + #interceptConsole() { + const methods = [ + "log", + "warn", + "error", + "info", + "debug", + "time", + "timeEnd", + "trace", + "dir", + "assert", + "count", + "countReset", + "table", + "dirxml", + "timeLog" + ]; + for (const method of methods){ + const original = console[method]; + console[method] = (...args)=>{ + if (this.isSpinning) { + this.stop(); + this.clear(); + original(...args); + this.start(); + } else { + original(...args); + } + }; + } + } set spinner(spin) { this.#frameIndex = 0; if (typeof spin === "string") this.#spinner = __default1[spin]; @@ -3761,8 +3593,9 @@ class Spinner { } if (this.isSpinning) return this; if (this.#opts.hideCursor) { - mod3.hideCursorSync(this.#stream); + mod1.hideCursorSync(this.#stream); } + this.isSpinning = true; this.render(); this.#id = setInterval(this.render.bind(this), this.interval); return this; @@ -3774,7 +3607,7 @@ class Spinner { this.#linesToClear = this.#linesCount; } frame() { - const { frames } = this.#spinner; + const { frames } = this.#spinner; let frame = frames[this.#frameIndex]; frame = this.#color(frame); this.#frameIndex = ++this.#frameIndex % frames.length; @@ -3785,20 +3618,20 @@ class Spinner { clear() { if (!this.#enabled) return; for(let i = 0; i < this.#linesToClear; i++){ - mod3.goUpSync(1, this.#stream); - mod3.clearLineSync(this.#stream); - mod3.goRightSync(this.indent - 1, this.#stream); + mod1.goUpSync(1, this.#stream); + mod1.clearLineSync(this.#stream); + mod1.goRightSync(this.indent - 1, this.#stream); } this.#linesToClear = 0; } updateLines() { let columns = 80; try { - columns = Deno.consoleSize(this.#stream.rid)?.columns ?? columns; + columns = Deno.consoleSize().columns ?? columns; } catch {} const fullPrefixText = typeof this.prefix === "string" ? this.prefix + "-" : ""; - this.#linesCount = mod3.stripAnsi(fullPrefixText + "--" + this.text).split("\n").reduce((count, line)=>{ - return count + Math.max(1, Math.ceil(mod3.wcswidth(line) / columns)); + this.#linesCount = mod1.stripAnsi(fullPrefixText + "--" + this.text).split("\n").reduce((count, line)=>{ + return count + Math.max(1, Math.ceil(mod1.wcswidth(line) / columns)); }, 0); } stop() { @@ -3807,8 +3640,9 @@ class Spinner { this.#id = -1; this.#frameIndex = 0; this.clear(); + this.isSpinning = false; if (this.#opts.hideCursor) { - mod3.showCursorSync(this.#stream); + mod1.showCursorSync(this.#stream); } } stopAndPersist(options = {}) { @@ -3817,7 +3651,7 @@ class Spinner { const text = options.text || this.text; const fullText = typeof text === "string" ? " " + text : ""; this.stop(); - console.log(`${fullPrefix}${options.symbol || " "}${fullText}`); + this.write(`${fullPrefix}${options.symbol || " "}${fullText}\n`); } succeed(text) { return this.stopAndPersist({ @@ -3847,7 +3681,7 @@ class Spinner { async function parseEntrypoint(entrypoint, root, diagnosticName = "entrypoint") { let entrypointSpecifier; try { - if (entrypoint.startsWith("https://") || entrypoint.startsWith("http://") || entrypoint.startsWith("file://")) { + if (isURL(entrypoint)) { entrypointSpecifier = new URL(entrypoint); } else { entrypointSpecifier = toFileUrl2(resolve2(root ?? Deno.cwd(), entrypoint)); @@ -3858,12 +3692,47 @@ async function parseEntrypoint(entrypoint, root, diagnosticName = "entrypoint") if (entrypointSpecifier.protocol == "file:") { try { await Deno.lstat(entrypointSpecifier); - } catch (err1) { - throw `Failed to open ${diagnosticName} file at '${entrypointSpecifier}': ${err1.message}`; + } catch (err) { + throw `Failed to open ${diagnosticName} file at '${entrypointSpecifier}': ${err.message}`; } } return entrypointSpecifier; } +function isURL(entrypoint) { + return entrypoint.startsWith("https://") || entrypoint.startsWith("http://") || entrypoint.startsWith("file://"); +} +const VERSION = "1.12.0"; +let current = null; +function wait1(param) { + if (typeof param === "string") { + param = { + text: param + }; + } + param.interceptConsole = false; + current = wait({ + stream: Deno.stderr, + ...param + }); + return current; +} +function interruptSpinner() { + current?.stop(); + const interrupt = new Interrupt(current); + current = null; + return interrupt; +} +class Interrupt { + #spinner; + constructor(spinner){ + this.#spinner = spinner; + } + resume() { + current = this.#spinner; + this.#spinner?.start(); + } +} +const USER_AGENT = `DeployCTL/${VERSION} (${Deno.build.os} ${Deno.osRelease()}; ${Deno.build.arch})`; class APIError extends Error { code; xDenoRay; @@ -3882,6 +3751,9 @@ class APIError extends Error { return error; } } +function endpoint() { + return Deno.env.get("DEPLOY_API_ENDPOINT") ?? "https://dash.deno.com"; +} class API { #endpoint; #authorization; @@ -3890,28 +3762,45 @@ class API { this.#endpoint = endpoint; } static fromToken(token) { - const endpoint = Deno.env.get("DEPLOY_API_ENDPOINT") ?? "https://dash.deno.com"; - return new API(`Bearer ${token}`, endpoint); + return new API(`Bearer ${token}`, endpoint()); } - async #request(path2, opts = {}) { - const url = `${this.#endpoint}/api${path2}`; + static withTokenProvisioner(provisioner) { + return new API(provisioner, endpoint()); + } + async request(path, opts = {}) { + const url = `${this.#endpoint}/api${path}`; const method = opts.method ?? "GET"; - const body = opts.body !== undefined ? opts.body instanceof FormData ? opts.body : JSON.stringify(opts.body) : undefined; + const body = typeof opts.body === "string" || opts.body instanceof FormData ? opts.body : JSON.stringify(opts.body); + const authorization = typeof this.#authorization === "string" ? this.#authorization : `Bearer ${await this.#authorization.get() ?? await this.#authorization.provision()}`; + const sudo = Deno.env.get("SUDO"); const headers = { - "Accept": "application/json", - "Authorization": this.#authorization, + "User-Agent": USER_AGENT, + "Accept": opts.accept ?? "application/json", + "Authorization": authorization, ...opts.body !== undefined ? opts.body instanceof FormData ? {} : { "Content-Type": "application/json" + } : {}, + ...sudo ? { + ["x-deploy-sudo"]: sudo } : {} }; - return await fetch(url, { + let res = await fetch(url, { method, headers, body }); + if (res.status === 401 && typeof this.#authorization === "object") { + headers.Authorization = `Bearer ${await this.#authorization.provision()}`; + res = await fetch(url, { + method, + headers, + body + }); + } + return res; } - async #requestJson(path11, opts1) { - const res = await this.#request(path11, opts1); + async #requestJson(path, opts) { + const res = await this.request(path, opts); if (res.headers.get("Content-Type") !== "application/json") { const text = await res.text(); throw new Error(`Expected JSON, got '${text}'`); @@ -3923,22 +3812,55 @@ class API { } return json; } - async *#requestStream(path21, opts2) { - const res1 = await this.#request(path21, opts2); - if (res1.status !== 200) { - const json1 = await res1.json(); - const xDenoRay1 = res1.headers.get("x-deno-ray"); - throw new APIError(json1.code, json1.message, xDenoRay1); + async #requestStream(path, opts) { + const res = await this.request(path, opts); + if (res.status !== 200) { + const json = await res.json(); + const xDenoRay = res.headers.get("x-deno-ray"); + throw new APIError(json.code, json.message, xDenoRay); } - if (res1.body === null) { + if (res.body === null) { throw new Error("Stream ended unexpectedly"); } - const lines = res1.body.pipeThrough(new TextDecoderStream()).pipeThrough(new TextLineStream()); - for await (const line of lines){ - if (line === "") return; - yield JSON.parse(line); + const lines = res.body.pipeThrough(new TextDecoderStream()).pipeThrough(new TextLineStream()); + return async function*() { + for await (const line of lines){ + if (line === "") return; + yield line; + } + }(); + } + async #requestJsonStream(path, opts) { + const stream = await this.#requestStream(path, opts); + return async function*() { + for await (const line of stream){ + yield JSON.parse(line); + } + }(); + } + async getOrganizationByName(name) { + const organizations = await this.#requestJson(`/organizations`); + for (const org of organizations){ + if (org.name === name) { + return org; + } } } + async getOrganizationById(id) { + return await this.#requestJson(`/organizations/${id}`); + } + async createOrganization(name) { + const body = { + name + }; + return await this.#requestJson(`/organizations`, { + method: "POST", + body + }); + } + async listOrganizations() { + return await this.#requestJson(`/organizations`); + } async getProject(id) { try { return await this.#requestJson(`/projects/${id}`); @@ -3949,9 +3871,60 @@ class API { throw err; } } - async getDeployments(projectId) { + async createProject(name, organizationId, envs) { + const body = { + name, + organizationId, + envs + }; + return await this.#requestJson(`/projects/`, { + method: "POST", + body + }); + } + async renameProject(id, newName) { + const body = { + name: newName + }; + await this.#requestJson(`/projects/${id}`, { + method: "PATCH", + body + }); + } + async deleteProject(id) { + try { + await this.#requestJson(`/projects/${id}`, { + method: "DELETE" + }); + return true; + } catch (err) { + if (err instanceof APIError && err.code === "projectNotFound") { + return false; + } + throw err; + } + } + async listProjects(orgId) { + const org = await this.#requestJson(`/organizations/${orgId}`); + return org.projects; + } + async getDomains(projectId) { + return await this.#requestJson(`/projects/${projectId}/domains`); + } + async listDeployments(projectId, page, limit) { + const query = new URLSearchParams(); + if (page !== undefined) { + query.set("page", page.toString()); + } + if (limit !== undefined) { + query.set("limit", limit.toString()); + } try { - return await this.#requestJson(`/projects/${projectId}/deployments/`); + const [list, paging] = await this.#requestJson(`/projects/${projectId}/deployments?${query}`); + return { + list, + paging + }; } catch (err) { if (err instanceof APIError && err.code === "projectNotFound") { return null; @@ -3959,8 +3932,64 @@ class API { throw err; } } + async *listAllDeployments(projectId) { + let totalPages = 1; + let page = 0; + while(totalPages > page){ + const [deployments, paging] = await this.#requestJson(`/projects/${projectId}/deployments/?limit=50&page=${page}`); + for (const deployment of deployments){ + yield deployment; + } + totalPages = paging.totalPages; + page = paging.page + 1; + } + } + async getDeployment(deploymentId) { + try { + return await this.#requestJson(`/deployments/${deploymentId}`); + } catch (err) { + if (err instanceof APIError && err.code === "deploymentNotFound") { + return null; + } + throw err; + } + } + async deleteDeployment(deploymentId) { + try { + await this.#requestJson(`/v1/deployments/${deploymentId}`, { + method: "DELETE" + }); + return true; + } catch (err) { + if (err instanceof APIError && err.code === "deploymentNotFound") { + return false; + } + throw err; + } + } + async redeployDeployment(deploymentId, redeployParams) { + try { + return await this.#requestJson(`/v1/deployments/${deploymentId}/redeploy?internal=true`, { + method: "POST", + body: redeployParams + }); + } catch (err) { + if (err instanceof APIError && err.code === "deploymentNotFound") { + return null; + } + throw err; + } + } getLogs(projectId, deploymentId) { - return this.#requestStream(`/projects/${projectId}/deployments/${deploymentId}/logs/`); + return this.#requestJsonStream(`/projects/${projectId}/deployments/${deploymentId}/logs/`, { + accept: "application/x-ndjson" + }); + } + async queryLogs(projectId, deploymentId, params) { + const searchParams = new URLSearchParams({ + params: JSON.stringify(params) + }); + return await this.#requestJson(`/projects/${projectId}/deployments/${deploymentId}/query_logs?${searchParams.toString()}`); } async projectNegotiateAssets(id, manifest) { return await this.#requestJson(`/projects/${id}/assets/negotiate`, { @@ -3976,7 +4005,7 @@ class API { bytes ])); } - return this.#requestStream(`/projects/${projectId}/deployment_with_assets`, { + return this.#requestJsonStream(`/projects/${projectId}/deployment_with_assets`, { method: "POST", body: form }); @@ -3989,11 +4018,59 @@ class API { bytes ])); } - return this.#requestStream(`/projects/${projectId}/deployment_github_actions`, { + return this.#requestJsonStream(`/projects/${projectId}/deployment_github_actions`, { method: "POST", body: form }); } + getMetadata() { + return this.#requestJson("/meta"); + } + async streamMetering(project) { + const streamGen = ()=>this.#requestStream(`/projects/${project}/stats`); + let stream = await streamGen(); + return async function*() { + for(;;){ + try { + for await (const line of stream){ + try { + yield JSON.parse(line); + } catch {} + } + } catch (error) { + const interrupt = interruptSpinner(); + const spinner = wait1(`Error: ${error}. Reconnecting...`).start(); + await delay(5_000); + stream = await streamGen(); + spinner.stop(); + interrupt.resume(); + } + } + }(); + } + async getProjectDatabases(project) { + try { + return await this.#requestJson(`/projects/${project}/databases`); + } catch (err) { + if (err instanceof APIError && err.code === "projectNotFound") { + return null; + } + throw err; + } + } + async getDeploymentCrons(projectId, deploymentId) { + return await this.#requestJson(`/projects/${projectId}/deployments/${deploymentId}/crons`); + } + async getProjectCrons(projectId) { + try { + return await this.#requestJson(`/projects/${projectId}/deployments/latest/crons`); + } catch (err) { + if (err instanceof APIError && err.code === "deploymentNotFound") { + return null; + } + throw err; + } + } } async function calculateGitSha1(bytes) { const prefix = `blob ${bytes.byteLength}\0`; @@ -4006,10 +4083,10 @@ async function calculateGitSha1(bytes) { return hashHex; } function include(path, include, exclude) { - if (include.length && !include.some((pattern)=>path.startsWith(pattern))) { + if (include.length && !include.some((pattern)=>pattern.test(normalize2(path)))) { return false; } - if (exclude.length && exclude.some((pattern)=>path.startsWith(pattern))) { + if (exclude.length && exclude.some((pattern)=>pattern.test(normalize2(path)))) { return false; } return true; @@ -4017,12 +4094,9 @@ function include(path, include, exclude) { async function walk(cwd, dir, files, options) { const entries = {}; for await (const file of Deno.readDir(dir)){ - const path = join3(dir, file.name); + const path = join2(dir, file.name); const relative = path.slice(cwd.length); - // Do not test directories, because --include=foo/bar must include the directory foo - if (!file.isDirectory && - // .slice(1) removes the leading slash - !include(relative.slice(1), options.include, options.exclude)) { + if (!file.isDirectory && !include(path.slice(cwd.length + 1), options.include, options.exclude)) { continue; } let entry; @@ -4036,7 +4110,7 @@ async function walk(cwd, dir, files, options) { }; files.set(gitSha1, path); } else if (file.isDirectory) { - if (relative === "/.git" || relative.endsWith("/node_modules")) continue; + if (relative === "/.git") continue; entry = { kind: "directory", entries: await walk(cwd, path, files, options) @@ -4057,5 +4131,13 @@ async function walk(cwd, dir, files, options) { export { parseEntrypoint as parseEntrypoint }; export { API as API, APIError as APIError }; export { walk as walk }; -export { fromFileUrl2 as fromFileUrl, resolve2 as resolve, normalize3 as normalize }; +export { fromFileUrl2 as fromFileUrl, normalize2 as normalize, resolve2 as resolve }; +function isTerminal(stream) { + if (greaterOrEqual(parse(Deno.version.deno), parse("1.40.0"))) { + return stream.isTerminal(); + } else { + return Deno.isatty(stream.rid); + } +} +export { isTerminal as isTerminal }; diff --git a/action/node_modules/.bin/node-which b/action/node_modules/.bin/node-which index 6f8415ec..c4a428a2 120000 --- a/action/node_modules/.bin/node-which +++ b/action/node_modules/.bin/node-which @@ -1 +1 @@ -../which/bin/node-which \ No newline at end of file +../which/bin/which.js \ No newline at end of file diff --git a/action/node_modules/.package-lock.json b/action/node_modules/.package-lock.json index 2e3b5f47..b46c4ad4 100644 --- a/action/node_modules/.package-lock.json +++ b/action/node_modules/.package-lock.json @@ -1,6 +1,6 @@ { "name": "action", - "lockfileVersion": 2, + "lockfileVersion": 3, "requires": true, "packages": { "node_modules/@actions/core": { @@ -32,18 +32,26 @@ } }, "node_modules/@deno/shim-deno": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/@deno/shim-deno/-/shim-deno-0.10.0.tgz", - "integrity": "sha512-E7rQ0Hk33V45xQXKEnCxizdSP5C+hhqw1H3xWXsct3kYFWgG93B5gN3LKlyvcxbckt8d67jVa6s+y5duRYawvg==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@deno/shim-deno/-/shim-deno-0.19.2.tgz", + "integrity": "sha512-q3VTHl44ad8T2Tw2SpeAvghdGOjlnLPDNO2cpOxwMrBE/PVas6geWpbpIgrM+czOCH0yejp0yi8OaTuB+NU40Q==", "dependencies": { - "@deno/shim-deno-test": "^0.3.2", - "which": "^2.0.2" + "@deno/shim-deno-test": "^0.5.0", + "which": "^4.0.0" } }, "node_modules/@deno/shim-deno-test": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@deno/shim-deno-test/-/shim-deno-test-0.3.3.tgz", - "integrity": "sha512-Ge0Tnl7zZY0VvEfgsyLhjid8DzI1d0La0dgm+3m0/A8gZXgp5xwlyIyue5e4SCUuVB/3AH/0lun9LcJhhTwmbg==" + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@deno/shim-deno-test/-/shim-deno-test-0.5.0.tgz", + "integrity": "sha512-4nMhecpGlPi0cSzT67L+Tm+GOJqvuk8gqHBziqcUQOarnuIax1z96/gJHCSIz2Z0zhxE6Rzwb3IZXPtFh51j+w==" + }, + "node_modules/@fastify/busboy": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", + "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", + "engines": { + "node": ">=14" + } }, "node_modules/@octokit/auth-token": { "version": "2.5.0", @@ -151,17 +159,6 @@ "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz", "integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ==" }, - "node_modules/busboy": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", - "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", - "dependencies": { - "streamsearch": "^1.1.0" - }, - "engines": { - "node": ">=10.16.0" - } - }, "node_modules/deprecation": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", @@ -209,9 +206,12 @@ } }, "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "engines": { + "node": ">=16" + } }, "node_modules/node-domexception": { "version": "1.0.0", @@ -258,14 +258,6 @@ "wrappy": "1" } }, - "node_modules/streamsearch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", - "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -280,14 +272,14 @@ } }, "node_modules/undici": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.11.0.tgz", - "integrity": "sha512-oWjWJHzFet0Ow4YZBkyiJwiK5vWqEYoH7BINzJAJOLedZ++JpAlCbUktW2GQ2DS2FpKmxD/JMtWUUWl1BtghGw==", + "version": "5.28.4", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", + "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", "dependencies": { - "busboy": "^1.6.0" + "@fastify/busboy": "^2.0.0" }, "engines": { - "node": ">=12.18" + "node": ">=14.0" } }, "node_modules/universal-user-agent": { @@ -326,17 +318,17 @@ } }, "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", "dependencies": { - "isexe": "^2.0.0" + "isexe": "^3.1.1" }, "bin": { - "node-which": "bin/node-which" + "node-which": "bin/which.js" }, "engines": { - "node": ">= 8" + "node": "^16.13.0 || >=18.0.0" } }, "node_modules/wrappy": { diff --git a/action/node_modules/@deno/shim-deno-test/dist/definitions.d.ts b/action/node_modules/@deno/shim-deno-test/dist/definitions.d.ts index 650e8e7f..4ad3eded 100644 --- a/action/node_modules/@deno/shim-deno-test/dist/definitions.d.ts +++ b/action/node_modules/@deno/shim-deno-test/dist/definitions.d.ts @@ -1,3 +1,3 @@ -import { TestDefinition } from "./deno.types.gen.js"; -/** Reference to the array that `Deno.test` calls insert their definition into. */ -export declare const testDefinitions: TestDefinition[]; +import type { TestDefinition } from "./deno.types.gen.js"; +/** Reference to the array that `Deno.test` calls insert their definition into. */ +export declare const testDefinitions: TestDefinition[]; diff --git a/action/node_modules/@deno/shim-deno-test/dist/definitions.js b/action/node_modules/@deno/shim-deno-test/dist/definitions.js index d9a5f9b1..648a363a 100644 --- a/action/node_modules/@deno/shim-deno-test/dist/definitions.js +++ b/action/node_modules/@deno/shim-deno-test/dist/definitions.js @@ -1,5 +1,5 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.testDefinitions = void 0; -/** Reference to the array that `Deno.test` calls insert their definition into. */ -exports.testDefinitions = []; +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.testDefinitions = void 0; +/** Reference to the array that `Deno.test` calls insert their definition into. */ +exports.testDefinitions = []; diff --git a/action/node_modules/@deno/shim-deno-test/dist/deno.types.gen.d.ts b/action/node_modules/@deno/shim-deno-test/dist/deno.types.gen.d.ts index a51295d6..35f24cfb 100644 --- a/action/node_modules/@deno/shim-deno-test/dist/deno.types.gen.d.ts +++ b/action/node_modules/@deno/shim-deno-test/dist/deno.types.gen.d.ts @@ -1,359 +1,626 @@ -/// -import { URL } from "url"; -/** - * Register a test which will be run when `deno test` is used on the command - * line and the containing module looks like a test module. - * `fn` can be async if required. - * ```ts - * import {assert, fail, assertEquals} from "https://deno.land/std/testing/asserts.ts"; - * - * Deno.test({ - * name: "example test", - * fn(): void { - * assertEquals("world", "world"); - * }, - * }); - * - * Deno.test({ - * name: "example ignored test", - * ignore: Deno.build.os === "windows", - * fn(): void { - * // This test is ignored only on Windows machines - * }, - * }); - * - * Deno.test({ - * name: "example async test", - * async fn() { - * const decoder = new TextDecoder("utf-8"); - * const data = await Deno.readFile("hello_world.txt"); - * assertEquals(decoder.decode(data), "Hello world"); - * } - * }); - * ``` - */ -export declare function test(t: TestDefinition): void; -export interface TestDefinition { - fn: (t: TestContext) => void | Promise; - /** - * The current test name. - */ - name: string; - ignore?: boolean; - /** - * If at least one test has `only` set to true, only run tests that have - * `only` set to true and fail the test suite. - */ - only?: boolean; - /** - * Check that the number of async completed ops after the test is the same - * as number of dispatched ops. Defaults to true. - */ - sanitizeOps?: boolean; - /** - * Ensure the test case does not "leak" resources - ie. the resource table - * after the test has exactly the same contents as before the test. Defaults - * to true. - */ - sanitizeResources?: boolean; - /** - * Ensure the test case does not prematurely cause the process to exit, - * for example via a call to `Deno.exit`. Defaults to true. - */ - sanitizeExit?: boolean; - /** - * Specifies the permissions that should be used to run the test. - * Set this to "inherit" to keep the calling thread's permissions. - * Set this to "none" to revoke all permissions. - * - * Defaults to "inherit". - */ - permissions?: PermissionOptions; -} -export interface TestContext { - /** - * The current test name. - */ - name: string; - /** - * File Uri of the current test code. - */ - origin: string; - /** - * Parent test context. - */ - parent?: TestContext; - /** - * Run a sub step of the parent test or step. Returns a promise - * that resolves to a boolean signifying if the step completed successfully. - * The returned promise never rejects unless the arguments are invalid. - * If the test was ignored the promise returns `false`. - */ - step(t: TestStepDefinition): Promise; - /** - * Run a sub step of the parent test or step. Returns a promise - * that resolves to a boolean signifying if the step completed successfully. - * The returned promise never rejects unless the arguments are invalid. - * If the test was ignored the promise returns `false`. - */ - step(name: string, fn: (t: TestContext) => void | Promise): Promise; -} -export interface TestStepDefinition { - fn: (t: TestContext) => void | Promise; - /** - * The current test name. - */ - name: string; - ignore?: boolean; - /** - * Check that the number of async completed ops after the test step is the same - * as number of dispatched ops. Defaults to the parent test or step's value. - */ - sanitizeOps?: boolean; - /** - * Ensure the test step does not "leak" resources - ie. the resource table - * after the test has exactly the same contents as before the test. Defaults - * to the parent test or step's value. - */ - sanitizeResources?: boolean; - /** - * Ensure the test step does not prematurely cause the process to exit, - * for example via a call to `Deno.exit`. Defaults to the parent test or - * step's value. - */ - sanitizeExit?: boolean; -} -export declare type PermissionOptions = "inherit" | "none" | PermissionOptionsObject; -export interface PermissionOptionsObject { - /** - * Specifies if the `env` permission should be requested or revoked. - * If set to `"inherit"`, the current `env` permission will be inherited. - * If set to `true`, the global `env` permission will be requested. - * If set to `false`, the global `env` permission will be revoked. - * - * Defaults to `false`. - */ - env?: "inherit" | boolean | string[]; - /** - * Specifies if the `hrtime` permission should be requested or revoked. - * If set to `"inherit"`, the current `hrtime` permission will be inherited. - * If set to `true`, the global `hrtime` permission will be requested. - * If set to `false`, the global `hrtime` permission will be revoked. - * - * Defaults to `false`. - */ - hrtime?: "inherit" | boolean; - /** - * Specifies if the `net` permission should be requested or revoked. - * if set to `"inherit"`, the current `net` permission will be inherited. - * if set to `true`, the global `net` permission will be requested. - * if set to `false`, the global `net` permission will be revoked. - * if set to `string[]`, the `net` permission will be requested with the - * specified host strings with the format `"[:]`. - * - * Defaults to `false`. - * - * Examples: - * - * ```ts - * import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; - * - * Deno.test({ - * name: "inherit", - * permissions: { - * net: "inherit", - * }, - * async fn() { - * const status = await Deno.permissions.query({ name: "net" }) - * assertEquals(status.state, "granted"); - * }, - * }); - * ``` - * - * ```ts - * import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; - * - * Deno.test({ - * name: "true", - * permissions: { - * net: true, - * }, - * async fn() { - * const status = await Deno.permissions.query({ name: "net" }); - * assertEquals(status.state, "granted"); - * }, - * }); - * ``` - * - * ```ts - * import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; - * - * Deno.test({ - * name: "false", - * permissions: { - * net: false, - * }, - * async fn() { - * const status = await Deno.permissions.query({ name: "net" }); - * assertEquals(status.state, "denied"); - * }, - * }); - * ``` - * - * ```ts - * import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; - * - * Deno.test({ - * name: "localhost:8080", - * permissions: { - * net: ["localhost:8080"], - * }, - * async fn() { - * const status = await Deno.permissions.query({ name: "net", host: "localhost:8080" }); - * assertEquals(status.state, "granted"); - * }, - * }); - * ``` - */ - net?: "inherit" | boolean | string[]; - /** - * Specifies if the `ffi` permission should be requested or revoked. - * If set to `"inherit"`, the current `ffi` permission will be inherited. - * If set to `true`, the global `ffi` permission will be requested. - * If set to `false`, the global `ffi` permission will be revoked. - * - * Defaults to `false`. - */ - ffi?: "inherit" | boolean | Array; - /** - * Specifies if the `read` permission should be requested or revoked. - * If set to `"inherit"`, the current `read` permission will be inherited. - * If set to `true`, the global `read` permission will be requested. - * If set to `false`, the global `read` permission will be revoked. - * If set to `Array`, the `read` permission will be requested with the - * specified file paths. - * - * Defaults to `false`. - */ - read?: "inherit" | boolean | Array; - /** - * Specifies if the `run` permission should be requested or revoked. - * If set to `"inherit"`, the current `run` permission will be inherited. - * If set to `true`, the global `run` permission will be requested. - * If set to `false`, the global `run` permission will be revoked. - * - * Defaults to `false`. - */ - run?: "inherit" | boolean | Array; - /** - * Specifies if the `write` permission should be requested or revoked. - * If set to `"inherit"`, the current `write` permission will be inherited. - * If set to `true`, the global `write` permission will be requested. - * If set to `false`, the global `write` permission will be revoked. - * If set to `Array`, the `write` permission will be requested with the - * specified file paths. - * - * Defaults to `false`. - */ - write?: "inherit" | boolean | Array; -} -/** - * Register a test which will be run when `deno test` is used on the command - * line and the containing module looks like a test module. - * `fn` can be async if required. - * - * ```ts - * import {assert, fail, assertEquals} from "https://deno.land/std/testing/asserts.ts"; - * - * Deno.test("My test description", (): void => { - * assertEquals("hello", "hello"); - * }); - * - * Deno.test("My async test description", async (): Promise => { - * const decoder = new TextDecoder("utf-8"); - * const data = await Deno.readFile("hello_world.txt"); - * assertEquals(decoder.decode(data), "Hello world"); - * }); - * ``` - */ -export declare function test(name: string, fn: (t: TestContext) => void | Promise): void; -/** - * Register a test which will be run when `deno test` is used on the command - * line and the containing module looks like a test module. - * `fn` can be async if required. Declared function must have a name. - * - * ```ts - * import {assert, fail, assertEquals} from "https://deno.land/std/testing/asserts.ts"; - * - * Deno.test(function myTestName(): void { - * assertEquals("hello", "hello"); - * }); - * - * Deno.test(async function myOtherTestName(): Promise { - * const decoder = new TextDecoder("utf-8"); - * const data = await Deno.readFile("hello_world.txt"); - * assertEquals(decoder.decode(data), "Hello world"); - * }); - * ``` - */ -export declare function test(fn: (t: TestContext) => void | Promise): void; -/** - * Register a test which will be run when `deno test` is used on the command - * line and the containing module looks like a test module. - * `fn` can be async if required. - * - * ```ts - * import {assert, fail, assertEquals} from "https://deno.land/std/testing/asserts.ts"; - * - * Deno.test("My test description", { permissions: { read: true } }, (): void => { - * assertEquals("hello", "hello"); - * }); - * - * Deno.test("My async test description", { permissions: { read: false } }, async (): Promise => { - * const decoder = new TextDecoder("utf-8"); - * const data = await Deno.readFile("hello_world.txt"); - * assertEquals(decoder.decode(data), "Hello world"); - * }); - * ``` - */ -export declare function test(name: string, options: Omit, fn: (t: TestContext) => void | Promise): void; -/** - * Register a test which will be run when `deno test` is used on the command - * line and the containing module looks like a test module. - * `fn` can be async if required. - * - * ```ts - * import {assert, fail, assertEquals} from "https://deno.land/std/testing/asserts.ts"; - * - * Deno.test({ name: "My test description", permissions: { read: true } }, (): void => { - * assertEquals("hello", "hello"); - * }); - * - * Deno.test({ name: "My async test description", permissions: { read: false } }, async (): Promise => { - * const decoder = new TextDecoder("utf-8"); - * const data = await Deno.readFile("hello_world.txt"); - * assertEquals(decoder.decode(data), "Hello world"); - * }); - * ``` - */ -export declare function test(options: Omit, fn: (t: TestContext) => void | Promise): void; -/** - * Register a test which will be run when `deno test` is used on the command - * line and the containing module looks like a test module. - * `fn` can be async if required. Declared function must have a name. - * - * ```ts - * import {assert, fail, assertEquals} from "https://deno.land/std/testing/asserts.ts"; - * - * Deno.test({ permissions: { read: true } }, function myTestName(): void { - * assertEquals("hello", "hello"); - * }); - * - * Deno.test({ permissions: { read: false } }, async function myOtherTestName(): Promise { - * const decoder = new TextDecoder("utf-8"); - * const data = await Deno.readFile("hello_world.txt"); - * assertEquals(decoder.decode(data), "Hello world"); - * }); - * ``` - */ -export declare function test(options: Omit, fn: (t: TestContext) => void | Promise): void; +/// +import { URL } from "url"; +/** + * Register a test which will be run when `deno test` is used on the command + * line and the containing module looks like a test module. + * + * `fn` can be async if required. + * + * ```ts + * import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; + * + * Deno.test({ + * name: "example test", + * fn() { + * assertEquals("world", "world"); + * }, + * }); + * + * Deno.test({ + * name: "example ignored test", + * ignore: Deno.build.os === "windows", + * fn() { + * // This test is ignored only on Windows machines + * }, + * }); + * + * Deno.test({ + * name: "example async test", + * async fn() { + * const decoder = new TextDecoder("utf-8"); + * const data = await Deno.readFile("hello_world.txt"); + * assertEquals(decoder.decode(data), "Hello world"); + * } + * }); + * ``` + * + * @category Testing + */ +export declare const test: DenoTest; +/** @category Testing */ +export interface DenoTest { + /** + * Register a test which will be run when `deno test` is used on the command + * line and the containing module looks like a test module. + * + * `fn` can be async if required. + * + * ```ts + * import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; + * + * Deno.test({ + * name: "example test", + * fn() { + * assertEquals("world", "world"); + * }, + * }); + * + * Deno.test({ + * name: "example ignored test", + * ignore: Deno.build.os === "windows", + * fn() { + * // This test is ignored only on Windows machines + * }, + * }); + * + * Deno.test({ + * name: "example async test", + * async fn() { + * const decoder = new TextDecoder("utf-8"); + * const data = await Deno.readFile("hello_world.txt"); + * assertEquals(decoder.decode(data), "Hello world"); + * } + * }); + * ``` + * + * @category Testing + */ + (t: TestDefinition): void; + /** + * Register a test which will be run when `deno test` is used on the command + * line and the containing module looks like a test module. + * + * `fn` can be async if required. + * + * ```ts + * import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; + * + * Deno.test("My test description", () => { + * assertEquals("hello", "hello"); + * }); + * + * Deno.test("My async test description", async () => { + * const decoder = new TextDecoder("utf-8"); + * const data = await Deno.readFile("hello_world.txt"); + * assertEquals(decoder.decode(data), "Hello world"); + * }); + * ``` + * + * @category Testing + */ + (name: string, fn: (t: TestContext) => void | Promise): void; + /** + * Register a test which will be run when `deno test` is used on the command + * line and the containing module looks like a test module. + * + * `fn` can be async if required. Declared function must have a name. + * + * ```ts + * import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; + * + * Deno.test(function myTestName() { + * assertEquals("hello", "hello"); + * }); + * + * Deno.test(async function myOtherTestName() { + * const decoder = new TextDecoder("utf-8"); + * const data = await Deno.readFile("hello_world.txt"); + * assertEquals(decoder.decode(data), "Hello world"); + * }); + * ``` + * + * @category Testing + */ + (fn: (t: TestContext) => void | Promise): void; + /** + * Register a test which will be run when `deno test` is used on the command + * line and the containing module looks like a test module. + * + * `fn` can be async if required. + * + * ```ts + * import {assert, fail, assertEquals} from "https://deno.land/std/testing/asserts.ts"; + * + * Deno.test("My test description", { permissions: { read: true } }, (): void => { + * assertEquals("hello", "hello"); + * }); + * + * Deno.test("My async test description", { permissions: { read: false } }, async (): Promise => { + * const decoder = new TextDecoder("utf-8"); + * const data = await Deno.readFile("hello_world.txt"); + * assertEquals(decoder.decode(data), "Hello world"); + * }); + * ``` + * + * @category Testing + */ + (name: string, options: Omit, fn: (t: TestContext) => void | Promise): void; + /** + * Register a test which will be run when `deno test` is used on the command + * line and the containing module looks like a test module. + * + * `fn` can be async if required. + * + * ```ts + * import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; + * + * Deno.test( + * { + * name: "My test description", + * permissions: { read: true }, + * }, + * () => { + * assertEquals("hello", "hello"); + * }, + * ); + * + * Deno.test( + * { + * name: "My async test description", + * permissions: { read: false }, + * }, + * async () => { + * const decoder = new TextDecoder("utf-8"); + * const data = await Deno.readFile("hello_world.txt"); + * assertEquals(decoder.decode(data), "Hello world"); + * }, + * ); + * ``` + * + * @category Testing + */ + (options: Omit, fn: (t: TestContext) => void | Promise): void; + /** + * Register a test which will be run when `deno test` is used on the command + * line and the containing module looks like a test module. + * + * `fn` can be async if required. Declared function must have a name. + * + * ```ts + * import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; + * + * Deno.test( + * { permissions: { read: true } }, + * function myTestName() { + * assertEquals("hello", "hello"); + * }, + * ); + * + * Deno.test( + * { permissions: { read: false } }, + * async function myOtherTestName() { + * const decoder = new TextDecoder("utf-8"); + * const data = await Deno.readFile("hello_world.txt"); + * assertEquals(decoder.decode(data), "Hello world"); + * }, + * ); + * ``` + * + * @category Testing + */ + (options: Omit, fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for ignoring a particular test case. + * + * @category Testing + */ + ignore(t: Omit): void; + /** + * Shorthand property for ignoring a particular test case. + * + * @category Testing + */ + ignore(name: string, fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for ignoring a particular test case. + * + * @category Testing + */ + ignore(fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for ignoring a particular test case. + * + * @category Testing + */ + ignore(name: string, options: Omit, fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for ignoring a particular test case. + * + * @category Testing + */ + ignore(options: Omit, fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for ignoring a particular test case. + * + * @category Testing + */ + ignore(options: Omit, fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for focusing a particular test case. + * + * @category Testing + */ + only(t: Omit): void; + /** + * Shorthand property for focusing a particular test case. + * + * @category Testing + */ + only(name: string, fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for focusing a particular test case. + * + * @category Testing + */ + only(fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for focusing a particular test case. + * + * @category Testing + */ + only(name: string, options: Omit, fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for focusing a particular test case. + * + * @category Testing + */ + only(options: Omit, fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for focusing a particular test case. + * + * @category Testing + */ + only(options: Omit, fn: (t: TestContext) => void | Promise): void; +} +/** @category Testing */ +export interface TestDefinition { + fn: (t: TestContext) => void | Promise; + /** The name of the test. */ + name: string; + /** + * If truthy the current test step will be ignored. + * + * It is a quick way to skip over a step, but also can be used for + * conditional logic, like determining if an environment feature is present. + */ + ignore?: boolean; + /** + * If at least one test has `only` set to `true`, only run tests that have + * `only` set to `true` and fail the test suite. + */ + only?: boolean; + /** + * Check that the number of async completed operations after the test step + * is the same as number of dispatched operations. This ensures that the + * code tested does not start async operations which it then does + * not await. This helps in preventing logic errors and memory leaks + * in the application code. + * + * @default {true} + */ + sanitizeOps?: boolean; + /** + * Ensure the test step does not "leak" resources - like open files or + * network connections - by ensuring the open resources at the start of the + * test match the open resources at the end of the test. + * + * @default {true} + */ + sanitizeResources?: boolean; + /** + * Ensure the test case does not prematurely cause the process to exit, + * for example via a call to {@linkcode Deno.exit}. + * + * @default {true} + */ + sanitizeExit?: boolean; + /** + * Specifies the permissions that should be used to run the test. + * + * Set this to "inherit" to keep the calling runtime permissions, set this + * to "none" to revoke all permissions, or set a more specific set of + * permissions using a {@linkcode PermissionOptionsObject}. + * + * @default {"inherit"} + */ + permissions?: PermissionOptions; +} +/** + * Context that is passed to a testing function, which can be used to either + * gain information about the current test, or register additional test + * steps within the current test. + * + * @category Testing + */ +export interface TestContext { + /** The current test name. */ + name: string; + /** The string URL of the current test. */ + origin: string; + /** + * If the current test is a step of another test, the parent test context + * will be set here. + */ + parent?: TestContext; + /** + * Run a sub step of the parent test or step. Returns a promise + * that resolves to a boolean signifying if the step completed successfully. + * + * The returned promise never rejects unless the arguments are invalid. + * + * If the test was ignored the promise returns `false`. + * + * ```ts + * Deno.test({ + * name: "a parent test", + * async fn(t) { + * console.log("before the step"); + * await t.step({ + * name: "step 1", + * fn(t) { + * console.log("current step:", t.name); + * } + * }); + * console.log("after the step"); + * } + * }); + * ``` + */ + step(definition: TestStepDefinition): Promise; + /** + * Run a sub step of the parent test or step. Returns a promise + * that resolves to a boolean signifying if the step completed successfully. + * + * The returned promise never rejects unless the arguments are invalid. + * + * If the test was ignored the promise returns `false`. + * + * ```ts + * Deno.test( + * "a parent test", + * async (t) => { + * console.log("before the step"); + * await t.step( + * "step 1", + * (t) => { + * console.log("current step:", t.name); + * } + * ); + * console.log("after the step"); + * } + * ); + * ``` + */ + step(name: string, fn: (t: TestContext) => void | Promise): Promise; + /** + * Run a sub step of the parent test or step. Returns a promise + * that resolves to a boolean signifying if the step completed successfully. + * + * The returned promise never rejects unless the arguments are invalid. + * + * If the test was ignored the promise returns `false`. + * + * ```ts + * Deno.test(async function aParentTest(t) { + * console.log("before the step"); + * await t.step(function step1(t) { + * console.log("current step:", t.name); + * }); + * console.log("after the step"); + * }); + * ``` + */ + step(fn: (t: TestContext) => void | Promise): Promise; +} +/** @category Testing */ +export interface TestStepDefinition { + /** + * The test function that will be tested when this step is executed. The + * function can take an argument which will provide information about the + * current step's context. + */ + fn: (t: TestContext) => void | Promise; + /** The name of the step. */ + name: string; + /** + * If truthy the current test step will be ignored. + * + * This is a quick way to skip over a step, but also can be used for + * conditional logic, like determining if an environment feature is present. + */ + ignore?: boolean; + /** + * Check that the number of async completed operations after the test step + * is the same as number of dispatched operations. This ensures that the + * code tested does not start async operations which it then does + * not await. This helps in preventing logic errors and memory leaks + * in the application code. + * + * Defaults to the parent test or step's value. + */ + sanitizeOps?: boolean; + /** + * Ensure the test step does not "leak" resources - like open files or + * network connections - by ensuring the open resources at the start of the + * step match the open resources at the end of the step. + * + * Defaults to the parent test or step's value. + */ + sanitizeResources?: boolean; + /** + * Ensure the test step does not prematurely cause the process to exit, + * for example via a call to {@linkcode Deno.exit}. + * + * Defaults to the parent test or step's value. + */ + sanitizeExit?: boolean; +} +/** + * A set of options which can define the permissions within a test or worker + * context at a highly specific level. + * + * @category Permissions + */ +export interface PermissionOptionsObject { + /** + * Specifies if the `env` permission should be requested or revoked. + * If set to `"inherit"`, the current `env` permission will be inherited. + * If set to `true`, the global `env` permission will be requested. + * If set to `false`, the global `env` permission will be revoked. + * + * @default {false} + */ + env?: "inherit" | boolean | string[]; + /** + * Specifies if the `sys` permission should be requested or revoked. + * If set to `"inherit"`, the current `sys` permission will be inherited. + * If set to `true`, the global `sys` permission will be requested. + * If set to `false`, the global `sys` permission will be revoked. + * + * @default {false} + */ + sys?: "inherit" | boolean | string[]; + /** + * Specifies if the `hrtime` permission should be requested or revoked. + * If set to `"inherit"`, the current `hrtime` permission will be inherited. + * If set to `true`, the global `hrtime` permission will be requested. + * If set to `false`, the global `hrtime` permission will be revoked. + * + * @default {false} + */ + hrtime?: "inherit" | boolean; + /** + * Specifies if the `net` permission should be requested or revoked. + * if set to `"inherit"`, the current `net` permission will be inherited. + * if set to `true`, the global `net` permission will be requested. + * if set to `false`, the global `net` permission will be revoked. + * if set to `string[]`, the `net` permission will be requested with the + * specified host strings with the format `"[:]`. + * + * @default {false} + * + * Examples: + * + * ```ts + * import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; + * + * Deno.test({ + * name: "inherit", + * permissions: { + * net: "inherit", + * }, + * async fn() { + * const status = await Deno.permissions.query({ name: "net" }) + * assertEquals(status.state, "granted"); + * }, + * }); + * ``` + * + * ```ts + * import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; + * + * Deno.test({ + * name: "true", + * permissions: { + * net: true, + * }, + * async fn() { + * const status = await Deno.permissions.query({ name: "net" }); + * assertEquals(status.state, "granted"); + * }, + * }); + * ``` + * + * ```ts + * import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; + * + * Deno.test({ + * name: "false", + * permissions: { + * net: false, + * }, + * async fn() { + * const status = await Deno.permissions.query({ name: "net" }); + * assertEquals(status.state, "denied"); + * }, + * }); + * ``` + * + * ```ts + * import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; + * + * Deno.test({ + * name: "localhost:8080", + * permissions: { + * net: ["localhost:8080"], + * }, + * async fn() { + * const status = await Deno.permissions.query({ name: "net", host: "localhost:8080" }); + * assertEquals(status.state, "granted"); + * }, + * }); + * ``` + */ + net?: "inherit" | boolean | string[]; + /** + * Specifies if the `ffi` permission should be requested or revoked. + * If set to `"inherit"`, the current `ffi` permission will be inherited. + * If set to `true`, the global `ffi` permission will be requested. + * If set to `false`, the global `ffi` permission will be revoked. + * + * @default {false} + */ + ffi?: "inherit" | boolean | Array; + /** + * Specifies if the `read` permission should be requested or revoked. + * If set to `"inherit"`, the current `read` permission will be inherited. + * If set to `true`, the global `read` permission will be requested. + * If set to `false`, the global `read` permission will be revoked. + * If set to `Array`, the `read` permission will be requested with the + * specified file paths. + * + * @default {false} + */ + read?: "inherit" | boolean | Array; + /** + * Specifies if the `run` permission should be requested or revoked. + * If set to `"inherit"`, the current `run` permission will be inherited. + * If set to `true`, the global `run` permission will be requested. + * If set to `false`, the global `run` permission will be revoked. + * + * @default {false} + */ + run?: "inherit" | boolean | Array; + /** + * Specifies if the `write` permission should be requested or revoked. + * If set to `"inherit"`, the current `write` permission will be inherited. + * If set to `true`, the global `write` permission will be requested. + * If set to `false`, the global `write` permission will be revoked. + * If set to `Array`, the `write` permission will be requested with the + * specified file paths. + * + * @default {false} + */ + write?: "inherit" | boolean | Array; +} +/** + * Options which define the permissions within a test or worker context. + * + * `"inherit"` ensures that all permissions of the parent process will be + * applied to the test context. `"none"` ensures the test context has no + * permissions. A `PermissionOptionsObject` provides a more specific + * set of permissions to the test context. + * + * @category Permissions + */ +export type PermissionOptions = "inherit" | "none" | PermissionOptionsObject; diff --git a/action/node_modules/@deno/shim-deno-test/dist/deno.types.gen.js b/action/node_modules/@deno/shim-deno-test/dist/deno.types.gen.js index ce03781e..c8ad2e54 100644 --- a/action/node_modules/@deno/shim-deno-test/dist/deno.types.gen.js +++ b/action/node_modules/@deno/shim-deno-test/dist/deno.types.gen.js @@ -1,2 +1,2 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/action/node_modules/@deno/shim-deno-test/dist/index.d.ts b/action/node_modules/@deno/shim-deno-test/dist/index.d.ts index 3e544207..151ee6a0 100644 --- a/action/node_modules/@deno/shim-deno-test/dist/index.d.ts +++ b/action/node_modules/@deno/shim-deno-test/dist/index.d.ts @@ -1,3 +1,3 @@ -export * as Deno from "./test.js"; -export * from "./test.js"; -export { testDefinitions } from "./definitions.js"; +export * as Deno from "./test.js"; +export * from "./test.js"; +export { testDefinitions } from "./definitions.js"; diff --git a/action/node_modules/@deno/shim-deno-test/dist/index.js b/action/node_modules/@deno/shim-deno-test/dist/index.js index 1c6cb2be..d1ed8e61 100644 --- a/action/node_modules/@deno/shim-deno-test/dist/index.js +++ b/action/node_modules/@deno/shim-deno-test/dist/index.js @@ -1,21 +1,21 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.testDefinitions = exports.Deno = void 0; -exports.Deno = require("./test.js"); -__exportStar(require("./test.js"), exports); -var definitions_js_1 = require("./definitions.js"); -Object.defineProperty(exports, "testDefinitions", { enumerable: true, get: function () { return definitions_js_1.testDefinitions; } }); +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.testDefinitions = exports.Deno = void 0; +exports.Deno = require("./test.js"); +__exportStar(require("./test.js"), exports); +var definitions_js_1 = require("./definitions.js"); +Object.defineProperty(exports, "testDefinitions", { enumerable: true, get: function () { return definitions_js_1.testDefinitions; } }); diff --git a/action/node_modules/@deno/shim-deno-test/dist/test.d.ts b/action/node_modules/@deno/shim-deno-test/dist/test.d.ts index 7d0da88d..a78cc666 100644 --- a/action/node_modules/@deno/shim-deno-test/dist/test.d.ts +++ b/action/node_modules/@deno/shim-deno-test/dist/test.d.ts @@ -1,3 +1,3 @@ -import * as Deno from "./deno.types.gen.js"; -export type { TestContext, TestDefinition, TestStepDefinition, } from "./deno.types.gen.js"; -export declare const test: typeof Deno.test; +import * as Deno from "./deno.types.gen.js"; +export type { TestContext, TestDefinition, TestStepDefinition, } from "./deno.types.gen.js"; +export declare const test: typeof Deno.test; diff --git a/action/node_modules/@deno/shim-deno-test/dist/test.js b/action/node_modules/@deno/shim-deno-test/dist/test.js index ec3fc97e..cfc8ce93 100644 --- a/action/node_modules/@deno/shim-deno-test/dist/test.js +++ b/action/node_modules/@deno/shim-deno-test/dist/test.js @@ -1,72 +1,87 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.test = void 0; -const definitions_js_1 = require("./definitions.js"); -const test = function test() { - var _a, _b; - let testDef; - const firstArg = arguments[0]; - const secondArg = arguments[1]; - const thirdArg = arguments[2]; - if (typeof firstArg === "string") { - if (typeof secondArg === "object") { - if (typeof thirdArg === "function") { - if (secondArg.fn != null) { - throw new TypeError("Unexpected 'fn' field in options, test function is already provided as the third argument."); - } - } - if (secondArg.name != null) { - throw new TypeError("Unexpected 'name' field in options, test name is already provided as the first argument."); - } - // name, options, fn - testDef = { name: firstArg, fn: thirdArg, ...secondArg }; - } - else { - // name, fn - testDef = { name: firstArg, fn: secondArg }; - } - } - else if (firstArg instanceof Function) { - // function only - if (firstArg.name.length === 0) { - throw new TypeError("The test function must have a name"); - } - testDef = { fn: firstArg, name: firstArg.name }; - if (secondArg != null) { - throw new TypeError("Unexpected second argument to Deno.test()"); - } - } - else if (typeof firstArg === "object") { - testDef = { ...firstArg }; - if (typeof secondArg === "function") { - // options, fn - testDef.fn = secondArg; - if (firstArg.fn != null) { - throw new TypeError("Unexpected 'fn' field in options, test function is already provided as the second argument."); - } - if (testDef.name == null) { - if (secondArg.name.length === 0) { - throw new TypeError("The test function must have a name"); - } - // options without name, fn - testDef.name = secondArg.name; - } - } - else { - if (typeof firstArg.fn !== "function") { - throw new TypeError("Expected 'fn' field in the first argument to be a test function."); - } - } - } - else { - throw new TypeError("Unknown test overload"); - } - if (typeof testDef.fn !== "function") { - throw new TypeError("Missing test function"); - } - if (((_b = (_a = testDef.name) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) === 0) { - throw new TypeError("The test name can't be empty"); - } - definitions_js_1.testDefinitions.push(testDef); -}; -exports.test = test; +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.test = void 0; +const definitions_js_1 = require("./definitions.js"); +exports.test = Object.assign(function test() { + handleDefinition(arguments); +}, { + ignore() { + handleDefinition(arguments, { ignore: true }); + }, + only() { + handleDefinition(arguments, { only: true }); + }, +}); +function handleDefinition(args, additional) { + var _a, _b; + let testDef; + const firstArg = args[0]; + const secondArg = args[1]; + const thirdArg = args[2]; + if (typeof firstArg === "string") { + if (typeof secondArg === "object") { + if (typeof thirdArg === "function") { + if (secondArg.fn != null) { + throw new TypeError("Unexpected 'fn' field in options, test function is already provided as the third argument."); + } + } + if (secondArg.name != null) { + throw new TypeError("Unexpected 'name' field in options, test name is already provided as the first argument."); + } + // name, options, fn + testDef = { name: firstArg, fn: thirdArg, ...secondArg }; + } + else { + // name, fn + testDef = { name: firstArg, fn: secondArg }; + } + } + else if (firstArg instanceof Function) { + // function only + if (firstArg.name.length === 0) { + throw new TypeError("The test function must have a name"); + } + testDef = { fn: firstArg, name: firstArg.name }; + if (secondArg != null) { + throw new TypeError("Unexpected second argument to Deno.test()"); + } + } + else if (typeof firstArg === "object") { + testDef = { ...firstArg }; + if (typeof secondArg === "function") { + // options, fn + testDef.fn = secondArg; + if (firstArg.fn != null) { + throw new TypeError("Unexpected 'fn' field in options, test function is already provided as the second argument."); + } + if (testDef.name == null) { + if (secondArg.name.length === 0) { + throw new TypeError("The test function must have a name"); + } + // options without name, fn + testDef.name = secondArg.name; + } + } + else { + if (typeof firstArg.fn !== "function") { + throw new TypeError("Expected 'fn' field in the first argument to be a test function."); + } + } + } + else { + throw new TypeError("Unknown test overload"); + } + if (typeof testDef.fn !== "function") { + throw new TypeError("Missing test function"); + } + if (((_b = (_a = testDef.name) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) === 0) { + throw new TypeError("The test name can't be empty"); + } + if (additional === null || additional === void 0 ? void 0 : additional.ignore) { + testDef.ignore = true; + } + if (additional === null || additional === void 0 ? void 0 : additional.only) { + testDef.only = true; + } + definitions_js_1.testDefinitions.push(testDef); +} diff --git a/action/node_modules/@deno/shim-deno-test/package.json b/action/node_modules/@deno/shim-deno-test/package.json index 6fc41a08..2f8809b0 100644 --- a/action/node_modules/@deno/shim-deno-test/package.json +++ b/action/node_modules/@deno/shim-deno-test/package.json @@ -1,6 +1,6 @@ { "name": "@deno/shim-deno-test", - "version": "0.3.3", + "version": "0.5.0", "description": "Deno.test only shim.", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -29,6 +29,6 @@ }, "homepage": "https://github.com/denoland/node_deno_shims#readme", "devDependencies": { - "typescript": "^4.7.2" + "typescript": "^5.2.2" } } diff --git a/action/node_modules/@deno/shim-deno/README.md b/action/node_modules/@deno/shim-deno/README.md index 8a972dfe..ee086b65 100644 --- a/action/node_modules/@deno/shim-deno/README.md +++ b/action/node_modules/@deno/shim-deno/README.md @@ -21,11 +21,10 @@ starting this project and for their contributions—specifically 1. In `/.github/workflows/ci.yml`, increase the deno version in the setup-deno action 1. Update version in `./tools/denolib.ts` -1. Go into `./third_party/deno` and update the submodule (there's probably - better instructions): - - `git fetch` - - `git pull --recurse-submodules` +1. Go into `./third_party/deno` and update the submodule: + - `git fetch --tags` - `git checkout v1.x.x` -- replace with version + - `git submodule update` 1. In this package ensure the following work and if not, fix any issues: - `npm run build` - `npm run test` diff --git a/action/node_modules/@deno/shim-deno/dist/deno.js b/action/node_modules/@deno/shim-deno/dist/deno.js deleted file mode 100644 index a7fba180..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -__exportStar(require("./deno/stable/main.js"), exports); -__exportStar(require("./deno/unstable/main.js"), exports); diff --git a/action/node_modules/@deno/shim-deno/dist/deno/internal/Conn.js b/action/node_modules/@deno/shim-deno/dist/deno/internal/Conn.js deleted file mode 100644 index ef852463..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/internal/Conn.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; -/// -var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; -}; -var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -}; -var _Conn_socket; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TlsConn = exports.Conn = void 0; -const net_1 = require("net"); -const FsFile_js_1 = require("../stable/classes/FsFile.js"); -class Conn extends FsFile_js_1.FsFile { - constructor(rid, localAddr, remoteAddr, socket) { - super(rid); - this.rid = rid; - this.localAddr = localAddr; - this.remoteAddr = remoteAddr; - _Conn_socket.set(this, void 0); - __classPrivateFieldSet(this, _Conn_socket, socket || new net_1.Socket({ fd: rid }), "f"); - } - async closeWrite() { - await new Promise((resolve) => __classPrivateFieldGet(this, _Conn_socket, "f").end(resolve)); - } - setNoDelay(enable) { - __classPrivateFieldGet(this, _Conn_socket, "f").setNoDelay(enable); - } - setKeepAlive(enable) { - __classPrivateFieldGet(this, _Conn_socket, "f").setKeepAlive(enable); - } -} -exports.Conn = Conn; -_Conn_socket = new WeakMap(); -class TlsConn extends Conn { - handshake() { - console.warn("@deno/shim-deno: Handshake is not supported."); - return Promise.resolve({ - alpnProtocol: null, - }); - } -} -exports.TlsConn = TlsConn; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/internal/Listener.js b/action/node_modules/@deno/shim-deno/dist/deno/internal/Listener.js deleted file mode 100644 index 243e4cb8..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/internal/Listener.js +++ /dev/null @@ -1,89 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; -}; -var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -}; -var _Listener_listener; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Listener = void 0; -const close_js_1 = require("../stable/functions/close.js"); -const errors = __importStar(require("../stable/variables/errors.js")); -class Listener { - constructor(rid, addr, listener) { - this.rid = rid; - this.addr = addr; - _Listener_listener.set(this, void 0); - __classPrivateFieldSet(this, _Listener_listener, listener, "f"); - } - async accept() { - if (!__classPrivateFieldGet(this, _Listener_listener, "f")) { - throw new errors.BadResource("Listener not initialised"); - } - const result = await __classPrivateFieldGet(this, _Listener_listener, "f").next(); - if (result.done) { - throw new errors.BadResource("Server not listening"); - } - return result.value; - } - async next() { - let conn; - try { - conn = await this.accept(); - } - catch (error) { - if (error instanceof errors.BadResource) { - return { value: undefined, done: true }; - } - throw error; - } - return { value: conn, done: false }; - } - return(value) { - this.close(); - return Promise.resolve({ value, done: true }); - } - close() { - (0, close_js_1.close)(this.rid); - } - ref() { - throw new Error("Not implemented"); - } - unref() { - throw new Error("Not implemented"); - } - [(_Listener_listener = new WeakMap(), Symbol.asyncIterator)]() { - return this; - } -} -exports.Listener = Listener; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/internal/consts.js b/action/node_modules/@deno/shim-deno/dist/deno/internal/consts.js deleted file mode 100644 index 64305afd..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/internal/consts.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DEFAULT_BUFFER_SIZE = void 0; -exports.DEFAULT_BUFFER_SIZE = 32 * 1024; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/internal/fs_flags.js b/action/node_modules/@deno/shim-deno/dist/deno/internal/fs_flags.js deleted file mode 100644 index 563c5b66..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/internal/fs_flags.js +++ /dev/null @@ -1,91 +0,0 @@ -"use strict"; -// getAccessFlag and getCreationFlag adapted from the original in Rust's std::fs -// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getFsFlag = exports.getCreationFlag = exports.getAccessFlag = void 0; -const errors = __importStar(require("../stable/variables/errors.js")); -const fs_1 = require("fs"); -const os_1 = __importDefault(require("os")); -const { O_APPEND, O_CREAT, O_EXCL, O_RDONLY, O_RDWR, O_TRUNC, O_WRONLY } = fs_1.constants; -function getAccessFlag(opts) { - if (opts.read && !opts.write && !opts.append) - return O_RDONLY; - if (!opts.read && opts.write && !opts.append) - return O_WRONLY; - if (opts.read && opts.write && !opts.append) - return O_RDWR; - if (!opts.read && opts.append) - return O_WRONLY | O_APPEND; - if (opts.read && opts.append) - return O_RDWR | O_APPEND; - if (!opts.read && !opts.write && !opts.append) { - throw new errors.BadResource("EINVAL: One of 'read', 'write', 'append' is required to open file."); - } - throw new errors.BadResource("EINVAL: Invalid fs flags."); -} -exports.getAccessFlag = getAccessFlag; -function getCreationFlag(opts) { - if (!opts.write && !opts.append) { - if (opts.truncate || opts.create || opts.createNew) { - throw new errors.BadResource("EINVAL: One of 'write', 'append' is required to 'truncate', 'create' or 'createNew' file."); - } - } - if (opts.append) { - if (opts.truncate && !opts.createNew) { - throw new errors.BadResource("EINVAL: unexpected 'truncate': true and 'createNew': false when 'append' is true."); - } - } - if (!opts.create && !opts.truncate && !opts.createNew) - return 0; - if (opts.create && !opts.truncate && !opts.createNew) - return O_CREAT; - if (!opts.create && opts.truncate && !opts.createNew) { - if (os_1.default.platform() === "win32") { - // for some reason only providing O_TRUNC on windows will - // throw a "EINVAL: invalid argument", so to work around this - // we relax the restriction here to also create the file if it - // doesn't exist - return O_CREAT | O_TRUNC; - } - else { - return O_TRUNC; - } - } - if (opts.create && opts.truncate && !opts.createNew) { - return O_CREAT | O_TRUNC; - } - if (opts.createNew) - return O_CREAT | O_EXCL; - throw new errors.BadResource("EINVAL: Invalid fs flags."); -} -exports.getCreationFlag = getCreationFlag; -function getFsFlag(flags) { - return getAccessFlag(flags) | getCreationFlag(flags); -} -exports.getFsFlag = getFsFlag; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/internal/iterutil.js b/action/node_modules/@deno/shim-deno/dist/deno/internal/iterutil.js deleted file mode 100644 index e45111d9..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/internal/iterutil.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.merge = exports.mapAsync = exports.map = void 0; -function* map(iter, f) { - for (const i of iter) { - yield f(i); - } -} -exports.map = map; -async function* mapAsync(iter, f) { - for await (const i of iter) { - yield f(i); - } -} -exports.mapAsync = mapAsync; -async function* merge(iterables) { - const racers = new Map(map(map(iterables, (iter) => iter[Symbol.asyncIterator]()), (iter) => [iter, iter.next()])); - while (racers.size > 0) { - const winner = await Promise.race(map(racers.entries(), ([iter, prom]) => prom.then((result) => ({ result, iter })))); - if (winner.result.done) { - racers.delete(winner.iter); - } - else { - yield await winner.result.value; - racers.set(winner.iter, winner.iter.next()); - } - } -} -exports.merge = merge; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/internal/random_id.js b/action/node_modules/@deno/shim-deno/dist/deno/internal/random_id.js deleted file mode 100644 index 5ca61aa3..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/internal/random_id.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.randomId = void 0; -const randomId = () => { - const n = (Math.random() * 0xfffff * 1000000).toString(16); - return "" + n.slice(0, 6); -}; -exports.randomId = randomId; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/internal/streams.js b/action/node_modules/@deno/shim-deno/dist/deno/internal/streams.js deleted file mode 100644 index 8617e5ad..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/internal/streams.js +++ /dev/null @@ -1,120 +0,0 @@ -"use strict"; -/// -var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; -}; -var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -}; -var _BufferStreamReader_instances, _BufferStreamReader_stream, _BufferStreamReader_error, _BufferStreamReader_ended, _BufferStreamReader_pendingActions, _BufferStreamReader_runPendingActions, _StreamWriter_stream; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.StreamWriter = exports.BufferStreamReader = void 0; -class BufferStreamReader { - constructor(stream) { - _BufferStreamReader_instances.add(this); - _BufferStreamReader_stream.set(this, void 0); - _BufferStreamReader_error.set(this, void 0); - _BufferStreamReader_ended.set(this, false); - _BufferStreamReader_pendingActions.set(this, []); - __classPrivateFieldSet(this, _BufferStreamReader_stream, stream, "f"); - __classPrivateFieldGet(this, _BufferStreamReader_stream, "f").pause(); - __classPrivateFieldGet(this, _BufferStreamReader_stream, "f").on("error", (error) => { - __classPrivateFieldSet(this, _BufferStreamReader_error, error, "f"); - __classPrivateFieldGet(this, _BufferStreamReader_instances, "m", _BufferStreamReader_runPendingActions).call(this); - }); - __classPrivateFieldGet(this, _BufferStreamReader_stream, "f").on("readable", () => { - __classPrivateFieldGet(this, _BufferStreamReader_instances, "m", _BufferStreamReader_runPendingActions).call(this); - }); - __classPrivateFieldGet(this, _BufferStreamReader_stream, "f").on("end", () => { - __classPrivateFieldSet(this, _BufferStreamReader_ended, true, "f"); - __classPrivateFieldGet(this, _BufferStreamReader_instances, "m", _BufferStreamReader_runPendingActions).call(this); - }); - } - readAll() { - return new Promise((resolve, reject) => { - const chunks = []; - const action = () => { - if (__classPrivateFieldGet(this, _BufferStreamReader_error, "f")) { - reject(__classPrivateFieldGet(this, _BufferStreamReader_error, "f")); - return; - } - const buffer = __classPrivateFieldGet(this, _BufferStreamReader_stream, "f").read(); - if (buffer != null) { - chunks.push(buffer); - __classPrivateFieldGet(this, _BufferStreamReader_pendingActions, "f").push(action); - } - else if (__classPrivateFieldGet(this, _BufferStreamReader_ended, "f")) { - const result = Buffer.concat(chunks); - resolve(result); - } - else { - __classPrivateFieldGet(this, _BufferStreamReader_pendingActions, "f").push(action); - } - }; - action(); - }); - } - read(p) { - return new Promise((resolve, reject) => { - const action = () => { - if (__classPrivateFieldGet(this, _BufferStreamReader_error, "f")) { - reject(__classPrivateFieldGet(this, _BufferStreamReader_error, "f")); - return; - } - const readBuffer = __classPrivateFieldGet(this, _BufferStreamReader_stream, "f").read(p.byteLength); - if (readBuffer && readBuffer.byteLength > 0) { - readBuffer.copy(p, 0, 0, readBuffer.byteLength); - resolve(readBuffer.byteLength); - return; - } - if (__classPrivateFieldGet(this, _BufferStreamReader_ended, "f")) { - resolve(null); - } - else { - __classPrivateFieldGet(this, _BufferStreamReader_pendingActions, "f").push(action); - } - }; - action(); - }); - } -} -exports.BufferStreamReader = BufferStreamReader; -_BufferStreamReader_stream = new WeakMap(), _BufferStreamReader_error = new WeakMap(), _BufferStreamReader_ended = new WeakMap(), _BufferStreamReader_pendingActions = new WeakMap(), _BufferStreamReader_instances = new WeakSet(), _BufferStreamReader_runPendingActions = function _BufferStreamReader_runPendingActions() { - const errors = []; - for (const action of __classPrivateFieldGet(this, _BufferStreamReader_pendingActions, "f").splice(0)) { - try { - action(); - } - catch (err) { - errors.push(err); - } - } - if (errors.length > 0) { - throw (errors.length > 1 ? new AggregateError(errors) : errors[0]); - } -}; -class StreamWriter { - constructor(stream) { - _StreamWriter_stream.set(this, void 0); - __classPrivateFieldSet(this, _StreamWriter_stream, stream, "f"); - } - write(p) { - return new Promise((resolve, reject) => { - __classPrivateFieldGet(this, _StreamWriter_stream, "f").write(p, (err) => { - if (err) { - reject(err); - } - else { - resolve(p.byteLength); - } - }); - }); - } -} -exports.StreamWriter = StreamWriter; -_StreamWriter_stream = new WeakMap(); diff --git a/action/node_modules/@deno/shim-deno/dist/deno/internal/version.js b/action/node_modules/@deno/shim-deno/dist/deno/internal/version.js deleted file mode 100644 index 5cef5f3e..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/internal/version.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.typescript = exports.deno = void 0; -exports.deno = "1.25.1"; -exports.typescript = "4.7.4"; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/classes.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/classes.js deleted file mode 100644 index 31a6a40f..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/classes.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PermissionStatus = exports.Permissions = exports.FsFile = exports.File = void 0; -var FsFile_js_1 = require("./classes/FsFile.js"); -Object.defineProperty(exports, "File", { enumerable: true, get: function () { return FsFile_js_1.File; } }); -Object.defineProperty(exports, "FsFile", { enumerable: true, get: function () { return FsFile_js_1.FsFile; } }); -var Permissions_js_1 = require("./classes/Permissions.js"); -Object.defineProperty(exports, "Permissions", { enumerable: true, get: function () { return Permissions_js_1.Permissions; } }); -var PermissionStatus_js_1 = require("./classes/PermissionStatus.js"); -Object.defineProperty(exports, "PermissionStatus", { enumerable: true, get: function () { return PermissionStatus_js_1.PermissionStatus; } }); diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/classes/File.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/classes/File.js deleted file mode 100644 index 59cfdf3b..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/classes/File.js +++ /dev/null @@ -1,73 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.File = void 0; -const fs = __importStar(require("fs")); -const fstat_js_1 = require("../functions/fstat.js"); -const fstatSync_js_1 = require("../functions/fstatSync.js"); -const ftruncate_js_1 = require("../functions/ftruncate.js"); -const ftruncateSync_js_1 = require("../functions/ftruncateSync.js"); -const read_js_1 = require("../functions/read.js"); -const readSync_js_1 = require("../functions/readSync.js"); -const write_js_1 = require("../functions/write.js"); -const writeSync_js_1 = require("../functions/writeSync.js"); -class File { - constructor(rid) { - this.rid = rid; - } - async write(p) { - return await (0, write_js_1.write)(this.rid, p); - } - writeSync(p) { - return (0, writeSync_js_1.writeSync)(this.rid, p); - } - async truncate(len) { - await (0, ftruncate_js_1.ftruncate)(this.rid, len); - } - truncateSync(len) { - return (0, ftruncateSync_js_1.ftruncateSync)(this.rid, len); - } - read(p) { - return (0, read_js_1.read)(this.rid, p); - } - readSync(p) { - return (0, readSync_js_1.readSync)(this.rid, p); - } - // deno-lint-ignore no-unused-vars - seek(offset, whence) { - throw new Error("Method not implemented."); - } - // deno-lint-ignore no-unused-vars - seekSync(offset, whence) { - throw new Error("Method not implemented."); - } - async stat() { - return await (0, fstat_js_1.fstat)(this.rid); - } - statSync() { - return (0, fstatSync_js_1.fstatSync)(this.rid); - } - close() { - fs.closeSync(this.rid); - } -} -exports.File = File; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/classes/FsFile.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/classes/FsFile.js deleted file mode 100644 index 49a95ed6..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/classes/FsFile.js +++ /dev/null @@ -1,83 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.File = exports.FsFile = void 0; -const fs = __importStar(require("fs")); -const fstat_js_1 = require("../functions/fstat.js"); -const fstatSync_js_1 = require("../functions/fstatSync.js"); -const ftruncate_js_1 = require("../functions/ftruncate.js"); -const ftruncateSync_js_1 = require("../functions/ftruncateSync.js"); -const read_js_1 = require("../functions/read.js"); -const readSync_js_1 = require("../functions/readSync.js"); -const write_js_1 = require("../functions/write.js"); -const writeSync_js_1 = require("../functions/writeSync.js"); -class FsFile { - constructor(rid) { - this.rid = rid; - } - async write(p) { - return await (0, write_js_1.write)(this.rid, p); - } - writeSync(p) { - return (0, writeSync_js_1.writeSync)(this.rid, p); - } - async truncate(len) { - await (0, ftruncate_js_1.ftruncate)(this.rid, len); - } - truncateSync(len) { - return (0, ftruncateSync_js_1.ftruncateSync)(this.rid, len); - } - read(p) { - return (0, read_js_1.read)(this.rid, p); - } - readSync(p) { - return (0, readSync_js_1.readSync)(this.rid, p); - } - seek(_offset, _whence) { - throw new Error("Method not implemented."); - } - seekSync(_offset, _whence) { - throw new Error("Method not implemented."); - } - async stat() { - return await (0, fstat_js_1.fstat)(this.rid); - } - statSync() { - return (0, fstatSync_js_1.fstatSync)(this.rid); - } - close() { - fs.closeSync(this.rid); - } - get readable() { - throw new Error("Not implemented."); - } - get writable() { - throw new Error("Not implemented."); - } -} -exports.FsFile = FsFile; -const File = FsFile; -exports.File = File; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/classes/PermissionStatus.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/classes/PermissionStatus.js deleted file mode 100644 index ece99b27..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/classes/PermissionStatus.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -/// -var _a, _b; -var _c; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PermissionStatus = void 0; -// The listeners don't actually matter because the state of these permissions -// is constant and mocked as Node.js has all doors open. -(_a = (_c = globalThis).EventTarget) !== null && _a !== void 0 ? _a : (_c.EventTarget = (_b = require("events").EventTarget) !== null && _b !== void 0 ? _b : null); -class PermissionStatus extends EventTarget { - /** @internal */ - constructor(state) { - super(); - this.state = state; - this.onchange = null; - } -} -exports.PermissionStatus = PermissionStatus; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/classes/Permissions.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/classes/Permissions.js deleted file mode 100644 index 2f6774c4..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/classes/Permissions.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Permissions = void 0; -const PermissionStatus_js_1 = require("../classes/PermissionStatus.js"); -class Permissions { - query(_desc) { - return Promise.resolve(new PermissionStatus_js_1.PermissionStatus("granted")); - } - revoke(_desc) { - return Promise.resolve(new PermissionStatus_js_1.PermissionStatus("denied")); - } - request(desc) { - return this.query(desc); - } -} -exports.Permissions = Permissions; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/enums.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/enums.js deleted file mode 100644 index 9844f115..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/enums.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SeekMode = void 0; -var SeekMode_js_1 = require("./enums/SeekMode.js"); -Object.defineProperty(exports, "SeekMode", { enumerable: true, get: function () { return SeekMode_js_1.SeekMode; } }); diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/enums/SeekMode.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/enums/SeekMode.js deleted file mode 100644 index 35a61db0..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/enums/SeekMode.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SeekMode = void 0; -var SeekMode; -(function (SeekMode) { - SeekMode[SeekMode["Start"] = 0] = "Start"; - SeekMode[SeekMode["Current"] = 1] = "Current"; - SeekMode[SeekMode["End"] = 2] = "End"; -})(SeekMode = exports.SeekMode || (exports.SeekMode = {})); diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions.js deleted file mode 100644 index acfd96a1..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions.js +++ /dev/null @@ -1,158 +0,0 @@ -"use strict"; -// Command palette -> Organize imports -Object.defineProperty(exports, "__esModule", { value: true }); -exports.readSync = exports.readLinkSync = exports.readLink = exports.readFileSync = exports.readFile = exports.readDirSync = exports.readDir = exports.read = exports.openSync = exports.open = exports.mkdirSync = exports.mkdir = exports.memoryUsage = exports.makeTempFileSync = exports.makeTempFile = exports.makeTempDirSync = exports.makeTempDir = exports.lstatSync = exports.lstat = exports.listenTls = exports.listen = exports.linkSync = exports.link = exports.kill = exports.inspect = exports.ftruncateSync = exports.ftruncate = exports.fsyncSync = exports.fsync = exports.fstatSync = exports.fstat = exports.fdatasyncSync = exports.fdatasync = exports.exit = exports.execPath = exports.cwd = exports.createSync = exports.create = exports.copyFileSync = exports.copyFile = exports.copy = exports.connectTls = exports.connect = exports.close = exports.chownSync = exports.chown = exports.chmodSync = exports.chmod = exports.chdir = exports.isatty = void 0; -exports.args = exports.writeTextFileSync = exports.writeTextFile = exports.writeSync = exports.writeFileSync = exports.writeFile = exports.write = exports.watchFs = exports.truncateSync = exports.truncate = exports.test = exports.symlinkSync = exports.symlink = exports.statSync = exports.stat = exports.shutdown = exports.run = exports.Process = exports.resolveDns = exports.renameSync = exports.rename = exports.removeSync = exports.remove = exports.realPathSync = exports.realPath = exports.readTextFileSync = exports.readTextFile = void 0; -var tty_1 = require("tty"); -Object.defineProperty(exports, "isatty", { enumerable: true, get: function () { return tty_1.isatty; } }); -var chdir_js_1 = require("./functions/chdir.js"); -Object.defineProperty(exports, "chdir", { enumerable: true, get: function () { return chdir_js_1.chdir; } }); -var chmod_js_1 = require("./functions/chmod.js"); -Object.defineProperty(exports, "chmod", { enumerable: true, get: function () { return chmod_js_1.chmod; } }); -var chmodSync_js_1 = require("./functions/chmodSync.js"); -Object.defineProperty(exports, "chmodSync", { enumerable: true, get: function () { return chmodSync_js_1.chmodSync; } }); -var chown_js_1 = require("./functions/chown.js"); -Object.defineProperty(exports, "chown", { enumerable: true, get: function () { return chown_js_1.chown; } }); -var chownSync_js_1 = require("./functions/chownSync.js"); -Object.defineProperty(exports, "chownSync", { enumerable: true, get: function () { return chownSync_js_1.chownSync; } }); -var close_js_1 = require("./functions/close.js"); -Object.defineProperty(exports, "close", { enumerable: true, get: function () { return close_js_1.close; } }); -var connect_js_1 = require("./functions/connect.js"); -Object.defineProperty(exports, "connect", { enumerable: true, get: function () { return connect_js_1.connect; } }); -var connectTls_js_1 = require("./functions/connectTls.js"); -Object.defineProperty(exports, "connectTls", { enumerable: true, get: function () { return connectTls_js_1.connectTls; } }); -var copy_js_1 = require("./functions/copy.js"); -Object.defineProperty(exports, "copy", { enumerable: true, get: function () { return copy_js_1.copy; } }); -var copyFile_js_1 = require("./functions/copyFile.js"); -Object.defineProperty(exports, "copyFile", { enumerable: true, get: function () { return copyFile_js_1.copyFile; } }); -var copyFileSync_js_1 = require("./functions/copyFileSync.js"); -Object.defineProperty(exports, "copyFileSync", { enumerable: true, get: function () { return copyFileSync_js_1.copyFileSync; } }); -var create_js_1 = require("./functions/create.js"); -Object.defineProperty(exports, "create", { enumerable: true, get: function () { return create_js_1.create; } }); -var createSync_js_1 = require("./functions/createSync.js"); -Object.defineProperty(exports, "createSync", { enumerable: true, get: function () { return createSync_js_1.createSync; } }); -var cwd_js_1 = require("./functions/cwd.js"); -Object.defineProperty(exports, "cwd", { enumerable: true, get: function () { return cwd_js_1.cwd; } }); -var execPath_js_1 = require("./functions/execPath.js"); -Object.defineProperty(exports, "execPath", { enumerable: true, get: function () { return execPath_js_1.execPath; } }); -var exit_js_1 = require("./functions/exit.js"); -Object.defineProperty(exports, "exit", { enumerable: true, get: function () { return exit_js_1.exit; } }); -var fdatasync_js_1 = require("./functions/fdatasync.js"); -Object.defineProperty(exports, "fdatasync", { enumerable: true, get: function () { return fdatasync_js_1.fdatasync; } }); -var fdatasyncSync_js_1 = require("./functions/fdatasyncSync.js"); -Object.defineProperty(exports, "fdatasyncSync", { enumerable: true, get: function () { return fdatasyncSync_js_1.fdatasyncSync; } }); -var fstat_js_1 = require("./functions/fstat.js"); -Object.defineProperty(exports, "fstat", { enumerable: true, get: function () { return fstat_js_1.fstat; } }); -var fstatSync_js_1 = require("./functions/fstatSync.js"); -Object.defineProperty(exports, "fstatSync", { enumerable: true, get: function () { return fstatSync_js_1.fstatSync; } }); -var fsync_js_1 = require("./functions/fsync.js"); -Object.defineProperty(exports, "fsync", { enumerable: true, get: function () { return fsync_js_1.fsync; } }); -var fsyncSync_js_1 = require("./functions/fsyncSync.js"); -Object.defineProperty(exports, "fsyncSync", { enumerable: true, get: function () { return fsyncSync_js_1.fsyncSync; } }); -var ftruncate_js_1 = require("./functions/ftruncate.js"); -Object.defineProperty(exports, "ftruncate", { enumerable: true, get: function () { return ftruncate_js_1.ftruncate; } }); -var ftruncateSync_js_1 = require("./functions/ftruncateSync.js"); -Object.defineProperty(exports, "ftruncateSync", { enumerable: true, get: function () { return ftruncateSync_js_1.ftruncateSync; } }); -var inspect_js_1 = require("./functions/inspect.js"); -Object.defineProperty(exports, "inspect", { enumerable: true, get: function () { return inspect_js_1.inspect; } }); -var kill_js_1 = require("./functions/kill.js"); -Object.defineProperty(exports, "kill", { enumerable: true, get: function () { return kill_js_1.kill; } }); -var link_js_1 = require("./functions/link.js"); -Object.defineProperty(exports, "link", { enumerable: true, get: function () { return link_js_1.link; } }); -var linkSync_js_1 = require("./functions/linkSync.js"); -Object.defineProperty(exports, "linkSync", { enumerable: true, get: function () { return linkSync_js_1.linkSync; } }); -var listen_js_1 = require("./functions/listen.js"); -Object.defineProperty(exports, "listen", { enumerable: true, get: function () { return listen_js_1.listen; } }); -var listenTls_js_1 = require("./functions/listenTls.js"); -Object.defineProperty(exports, "listenTls", { enumerable: true, get: function () { return listenTls_js_1.listenTls; } }); -var lstat_js_1 = require("./functions/lstat.js"); -Object.defineProperty(exports, "lstat", { enumerable: true, get: function () { return lstat_js_1.lstat; } }); -var lstatSync_js_1 = require("./functions/lstatSync.js"); -Object.defineProperty(exports, "lstatSync", { enumerable: true, get: function () { return lstatSync_js_1.lstatSync; } }); -var makeTempDir_js_1 = require("./functions/makeTempDir.js"); -Object.defineProperty(exports, "makeTempDir", { enumerable: true, get: function () { return makeTempDir_js_1.makeTempDir; } }); -var makeTempDirSync_js_1 = require("./functions/makeTempDirSync.js"); -Object.defineProperty(exports, "makeTempDirSync", { enumerable: true, get: function () { return makeTempDirSync_js_1.makeTempDirSync; } }); -var makeTempFile_js_1 = require("./functions/makeTempFile.js"); -Object.defineProperty(exports, "makeTempFile", { enumerable: true, get: function () { return makeTempFile_js_1.makeTempFile; } }); -var makeTempFileSync_js_1 = require("./functions/makeTempFileSync.js"); -Object.defineProperty(exports, "makeTempFileSync", { enumerable: true, get: function () { return makeTempFileSync_js_1.makeTempFileSync; } }); -var memoryUsage_js_1 = require("./functions/memoryUsage.js"); -Object.defineProperty(exports, "memoryUsage", { enumerable: true, get: function () { return memoryUsage_js_1.memoryUsage; } }); -var mkdir_js_1 = require("./functions/mkdir.js"); -Object.defineProperty(exports, "mkdir", { enumerable: true, get: function () { return mkdir_js_1.mkdir; } }); -var mkdirSync_js_1 = require("./functions/mkdirSync.js"); -Object.defineProperty(exports, "mkdirSync", { enumerable: true, get: function () { return mkdirSync_js_1.mkdirSync; } }); -var open_js_1 = require("./functions/open.js"); -Object.defineProperty(exports, "open", { enumerable: true, get: function () { return open_js_1.open; } }); -var openSync_js_1 = require("./functions/openSync.js"); -Object.defineProperty(exports, "openSync", { enumerable: true, get: function () { return openSync_js_1.openSync; } }); -var read_js_1 = require("./functions/read.js"); -Object.defineProperty(exports, "read", { enumerable: true, get: function () { return read_js_1.read; } }); -var readDir_js_1 = require("./functions/readDir.js"); -Object.defineProperty(exports, "readDir", { enumerable: true, get: function () { return readDir_js_1.readDir; } }); -var readDirSync_js_1 = require("./functions/readDirSync.js"); -Object.defineProperty(exports, "readDirSync", { enumerable: true, get: function () { return readDirSync_js_1.readDirSync; } }); -var readFile_js_1 = require("./functions/readFile.js"); -Object.defineProperty(exports, "readFile", { enumerable: true, get: function () { return readFile_js_1.readFile; } }); -var readFileSync_js_1 = require("./functions/readFileSync.js"); -Object.defineProperty(exports, "readFileSync", { enumerable: true, get: function () { return readFileSync_js_1.readFileSync; } }); -var readLink_js_1 = require("./functions/readLink.js"); -Object.defineProperty(exports, "readLink", { enumerable: true, get: function () { return readLink_js_1.readLink; } }); -var readLinkSync_js_1 = require("./functions/readLinkSync.js"); -Object.defineProperty(exports, "readLinkSync", { enumerable: true, get: function () { return readLinkSync_js_1.readLinkSync; } }); -var readSync_js_1 = require("./functions/readSync.js"); -Object.defineProperty(exports, "readSync", { enumerable: true, get: function () { return readSync_js_1.readSync; } }); -var readTextFile_js_1 = require("./functions/readTextFile.js"); -Object.defineProperty(exports, "readTextFile", { enumerable: true, get: function () { return readTextFile_js_1.readTextFile; } }); -var readTextFileSync_js_1 = require("./functions/readTextFileSync.js"); -Object.defineProperty(exports, "readTextFileSync", { enumerable: true, get: function () { return readTextFileSync_js_1.readTextFileSync; } }); -var realPath_js_1 = require("./functions/realPath.js"); -Object.defineProperty(exports, "realPath", { enumerable: true, get: function () { return realPath_js_1.realPath; } }); -var realPathSync_js_1 = require("./functions/realPathSync.js"); -Object.defineProperty(exports, "realPathSync", { enumerable: true, get: function () { return realPathSync_js_1.realPathSync; } }); -var remove_js_1 = require("./functions/remove.js"); -Object.defineProperty(exports, "remove", { enumerable: true, get: function () { return remove_js_1.remove; } }); -var removeSync_js_1 = require("./functions/removeSync.js"); -Object.defineProperty(exports, "removeSync", { enumerable: true, get: function () { return removeSync_js_1.removeSync; } }); -var rename_js_1 = require("./functions/rename.js"); -Object.defineProperty(exports, "rename", { enumerable: true, get: function () { return rename_js_1.rename; } }); -var renameSync_js_1 = require("./functions/renameSync.js"); -Object.defineProperty(exports, "renameSync", { enumerable: true, get: function () { return renameSync_js_1.renameSync; } }); -var resolveDns_js_1 = require("./functions/resolveDns.js"); -Object.defineProperty(exports, "resolveDns", { enumerable: true, get: function () { return resolveDns_js_1.resolveDns; } }); -var run_js_1 = require("./functions/run.js"); -Object.defineProperty(exports, "Process", { enumerable: true, get: function () { return run_js_1.Process; } }); -Object.defineProperty(exports, "run", { enumerable: true, get: function () { return run_js_1.run; } }); -var shutdown_js_1 = require("./functions/shutdown.js"); -Object.defineProperty(exports, "shutdown", { enumerable: true, get: function () { return shutdown_js_1.shutdown; } }); -var stat_js_1 = require("./functions/stat.js"); -Object.defineProperty(exports, "stat", { enumerable: true, get: function () { return stat_js_1.stat; } }); -var statSync_js_1 = require("./functions/statSync.js"); -Object.defineProperty(exports, "statSync", { enumerable: true, get: function () { return statSync_js_1.statSync; } }); -var symlink_js_1 = require("./functions/symlink.js"); -Object.defineProperty(exports, "symlink", { enumerable: true, get: function () { return symlink_js_1.symlink; } }); -var symlinkSync_js_1 = require("./functions/symlinkSync.js"); -Object.defineProperty(exports, "symlinkSync", { enumerable: true, get: function () { return symlinkSync_js_1.symlinkSync; } }); -var test_js_1 = require("./functions/test.js"); -Object.defineProperty(exports, "test", { enumerable: true, get: function () { return test_js_1.test; } }); -var truncate_js_1 = require("./functions/truncate.js"); -Object.defineProperty(exports, "truncate", { enumerable: true, get: function () { return truncate_js_1.truncate; } }); -var truncateSync_js_1 = require("./functions/truncateSync.js"); -Object.defineProperty(exports, "truncateSync", { enumerable: true, get: function () { return truncateSync_js_1.truncateSync; } }); -var watchFs_js_1 = require("./functions/watchFs.js"); -Object.defineProperty(exports, "watchFs", { enumerable: true, get: function () { return watchFs_js_1.watchFs; } }); -var write_js_1 = require("./functions/write.js"); -Object.defineProperty(exports, "write", { enumerable: true, get: function () { return write_js_1.write; } }); -var writeFile_js_1 = require("./functions/writeFile.js"); -Object.defineProperty(exports, "writeFile", { enumerable: true, get: function () { return writeFile_js_1.writeFile; } }); -var writeFileSync_js_1 = require("./functions/writeFileSync.js"); -Object.defineProperty(exports, "writeFileSync", { enumerable: true, get: function () { return writeFileSync_js_1.writeFileSync; } }); -var writeSync_js_1 = require("./functions/writeSync.js"); -Object.defineProperty(exports, "writeSync", { enumerable: true, get: function () { return writeSync_js_1.writeSync; } }); -var writeTextFile_js_1 = require("./functions/writeTextFile.js"); -Object.defineProperty(exports, "writeTextFile", { enumerable: true, get: function () { return writeTextFile_js_1.writeTextFile; } }); -var writeTextFileSync_js_1 = require("./functions/writeTextFileSync.js"); -Object.defineProperty(exports, "writeTextFileSync", { enumerable: true, get: function () { return writeTextFileSync_js_1.writeTextFileSync; } }); -var args_js_1 = require("./variables/args.js"); -Object.defineProperty(exports, "args", { enumerable: true, get: function () { return args_js_1.args; } }); diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/chdir.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/chdir.js deleted file mode 100644 index 5a99151e..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/chdir.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -/// -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.chdir = void 0; -const url_1 = require("url"); -const errorMap_js_1 = __importDefault(require("../../internal/errorMap.js")); -const variables_js_1 = require("../variables.js"); -const chdir = function (path) { - try { - return process.chdir(path instanceof URL ? (0, url_1.fileURLToPath)(path) : path); - } - catch (error) { - if ((error === null || error === void 0 ? void 0 : error.code) === "ENOENT") { - throw new variables_js_1.errors.NotFound(`No such file or directory (os error 2), chdir '${path}'`); - } - throw (0, errorMap_js_1.default)(error); - } -}; -exports.chdir = chdir; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/chmod.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/chmod.js deleted file mode 100644 index 5984076d..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/chmod.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.chmod = void 0; -const fs = __importStar(require("fs/promises")); -exports.chmod = fs.chmod; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/chmodSync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/chmodSync.js deleted file mode 100644 index 7f88db71..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/chmodSync.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.chmodSync = void 0; -const fs = __importStar(require("fs")); -exports.chmodSync = fs.chmodSync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/chown.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/chown.js deleted file mode 100644 index 5ec82921..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/chown.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.chown = void 0; -const fs = __importStar(require("fs/promises")); -const chown = async (path, uid, gid) => await fs.chown(path, uid !== null && uid !== void 0 ? uid : -1, gid !== null && gid !== void 0 ? gid : -1); -exports.chown = chown; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/chownSync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/chownSync.js deleted file mode 100644 index 2595d447..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/chownSync.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.chownSync = void 0; -const fs = __importStar(require("fs")); -const chownSync = (path, uid, gid) => fs.chownSync(path, uid !== null && uid !== void 0 ? uid : -1, gid !== null && gid !== void 0 ? gid : -1); -exports.chownSync = chownSync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/close.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/close.js deleted file mode 100644 index affaa492..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/close.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.close = void 0; -const fs = __importStar(require("fs")); -exports.close = fs.closeSync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/connect.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/connect.js deleted file mode 100644 index ade90c03..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/connect.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.connect = void 0; -const net_1 = require("net"); -const Conn_js_1 = require("../../internal/Conn.js"); -const connect = function connect(options) { - if (options.transport === "unix") { - throw new Error("Unstable UnixConnectOptions is not implemented"); - } - const { transport = "tcp", hostname = "127.0.0.1", port } = options; - if (transport !== "tcp") { - throw new Error("Deno.connect is only implemented for transport: tcp"); - } - const socket = (0, net_1.createConnection)({ port, host: hostname }); - socket.on("error", (err) => console.error(err)); - return new Promise((resolve) => { - socket.once("connect", () => { - // @ts-expect-error undocumented socket._handle property - const rid = socket._handle.fd; - const localAddr = { - // cannot be undefined while socket is connected - hostname: socket.localAddress, - port: socket.localPort, - transport: "tcp", - }; - const remoteAddr = { - // cannot be undefined while socket is connected - hostname: socket.remoteAddress, - port: socket.remotePort, - transport: "tcp", - }; - resolve(new Conn_js_1.Conn(rid, localAddr, remoteAddr, socket)); - }); - }); -}; -exports.connect = connect; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/connectTls.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/connectTls.js deleted file mode 100644 index 1171c68a..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/connectTls.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.connectTls = void 0; -const tls_1 = require("tls"); -const Conn_js_1 = require("../../internal/Conn.js"); -const readTextFile_js_1 = require("./readTextFile.js"); -const connectTls = async function connectTls({ port, hostname = "127.0.0.1", certFile }) { - const cert = certFile && await (0, readTextFile_js_1.readTextFile)(certFile); - const socket = (0, tls_1.connect)({ port, host: hostname, cert }); - return new Promise((resolve) => { - socket.on("connect", () => { - // @ts-expect-error undocumented socket._handle property - const rid = socket._handle.fd; - const localAddr = { - // cannot be undefined while socket is connected - hostname: socket.localAddress, - port: socket.localPort, - transport: "tcp", - }; - const remoteAddr = { - // cannot be undefined while socket is connected - hostname: socket.remoteAddress, - port: socket.remotePort, - transport: "tcp", - }; - resolve(new Conn_js_1.TlsConn(rid, localAddr, remoteAddr, socket)); - }); - }); -}; -exports.connectTls = connectTls; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/copy.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/copy.js deleted file mode 100644 index db74107a..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/copy.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.copy = void 0; -const consts_js_1 = require("../../internal/consts.js"); -const copy = async function copy(src, dst, options) { - var _a; - let n = 0; - const bufSize = (_a = options === null || options === void 0 ? void 0 : options.bufSize) !== null && _a !== void 0 ? _a : consts_js_1.DEFAULT_BUFFER_SIZE; - const b = new Uint8Array(bufSize); - let gotEOF = false; - while (gotEOF === false) { - const result = await src.read(b); - if (result === null) { - gotEOF = true; - } - else { - let nwritten = 0; - while (nwritten < result) { - nwritten += await dst.write(b.subarray(nwritten, result)); - } - n += nwritten; - } - } - return n; -}; -exports.copy = copy; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/copyFile.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/copyFile.js deleted file mode 100644 index 3307dc8f..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/copyFile.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.copyFile = void 0; -const fs = __importStar(require("fs/promises")); -const errorMap_js_1 = __importDefault(require("../../internal/errorMap.js")); -const errors = __importStar(require("../variables/errors.js")); -const copyFile = async (src, dest) => { - try { - await fs.copyFile(src, dest); - } - catch (error) { - if ((error === null || error === void 0 ? void 0 : error.code) === "ENOENT") { - throw new errors.NotFound(`File not found, copy '${src}' -> '${dest}'`); - } - throw (0, errorMap_js_1.default)(error); - } -}; -exports.copyFile = copyFile; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/copyFileSync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/copyFileSync.js deleted file mode 100644 index c1356d29..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/copyFileSync.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.copyFileSync = void 0; -const fs = __importStar(require("fs")); -const errorMap_js_1 = __importDefault(require("../../internal/errorMap.js")); -const errors = __importStar(require("../variables/errors.js")); -const copyFileSync = (src, dest) => { - try { - fs.copyFileSync(src, dest); - } - catch (error) { - if ((error === null || error === void 0 ? void 0 : error.code) === "ENOENT") { - throw new errors.NotFound(`File not found, copy '${src}' -> '${dest}'`); - } - throw (0, errorMap_js_1.default)(error); - } -}; -exports.copyFileSync = copyFileSync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/create.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/create.js deleted file mode 100644 index 10c20d30..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/create.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.create = void 0; -const open_js_1 = require("./open.js"); -const create = async function create(path) { - return await (0, open_js_1.open)(path, { write: true, create: true, truncate: true }); -}; -exports.create = create; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/createSync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/createSync.js deleted file mode 100644 index a3c629c2..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/createSync.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createSync = void 0; -const openSync_js_1 = require("./openSync.js"); -const createSync = function createSync(path) { - return (0, openSync_js_1.openSync)(path, { - create: true, - truncate: true, - read: true, - write: true, - }); -}; -exports.createSync = createSync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/cwd.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/cwd.js deleted file mode 100644 index 1f2a7c2c..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/cwd.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.cwd = void 0; -exports.cwd = process.cwd; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/execPath.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/execPath.js deleted file mode 100644 index 1f1d17c7..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/execPath.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -/// -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.execPath = void 0; -const which_1 = __importDefault(require("which")); -const execPath = () => which_1.default.sync("deno"); -exports.execPath = execPath; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/exit.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/exit.js deleted file mode 100644 index aa799dbc..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/exit.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.exit = void 0; -const exit = function exit(code) { - return process.exit(code); -}; -exports.exit = exit; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/fdatasync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/fdatasync.js deleted file mode 100644 index c59e84a0..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/fdatasync.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.fdatasync = void 0; -const fs_1 = require("fs"); -const util_1 = require("util"); -const _fdatasync = (0, util_1.promisify)(fs_1.fdatasync); -exports.fdatasync = _fdatasync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/fdatasyncSync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/fdatasyncSync.js deleted file mode 100644 index 7af3c2cc..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/fdatasyncSync.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.fdatasyncSync = void 0; -const fs_1 = require("fs"); -exports.fdatasyncSync = fs_1.fdatasyncSync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/fstat.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/fstat.js deleted file mode 100644 index e0b62005..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/fstat.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.fstat = void 0; -const fs = __importStar(require("fs")); -const util_1 = require("util"); -const stat_js_1 = require("./stat.js"); -const nodeFstat = (0, util_1.promisify)(fs.fstat); -const fstat = async function (fd) { - return (0, stat_js_1.denoifyFileInfo)(await nodeFstat(fd)); -}; -exports.fstat = fstat; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/fstatSync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/fstatSync.js deleted file mode 100644 index ec708241..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/fstatSync.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.fstatSync = void 0; -const fs_1 = require("fs"); -const stat_js_1 = require("./stat.js"); -const fstatSync = function fstatSync(fd) { - return (0, stat_js_1.denoifyFileInfo)((0, fs_1.fstatSync)(fd)); -}; -exports.fstatSync = fstatSync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/fsync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/fsync.js deleted file mode 100644 index 5bf167a1..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/fsync.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.fsync = void 0; -const fs_1 = require("fs"); -const util_1 = require("util"); -const fsync = function fsync(rid) { - return (0, util_1.promisify)(fs_1.fsync)(rid); -}; -exports.fsync = fsync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/fsyncSync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/fsyncSync.js deleted file mode 100644 index 3ac2ddc7..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/fsyncSync.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.fsyncSync = void 0; -const fs_1 = require("fs"); -const fsyncSync = function fsyncSync(rid) { - return (0, fs_1.fsyncSync)(rid); -}; -exports.fsyncSync = fsyncSync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/ftruncate.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/ftruncate.js deleted file mode 100644 index 5153ad25..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/ftruncate.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ftruncate = void 0; -const fs_1 = require("fs"); -const util_1 = require("util"); -const _ftruncate = (0, util_1.promisify)(fs_1.ftruncate); -exports.ftruncate = _ftruncate; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/ftruncateSync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/ftruncateSync.js deleted file mode 100644 index 73579262..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/ftruncateSync.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ftruncateSync = void 0; -const fs_1 = require("fs"); -exports.ftruncateSync = fs_1.ftruncateSync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/inspect.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/inspect.js deleted file mode 100644 index 2b5fc2fc..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/inspect.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.inspect = void 0; -const util = __importStar(require("util")); -const inspect = (value, options = {}) => util.inspect(value, options); -exports.inspect = inspect; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/kill.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/kill.js deleted file mode 100644 index f09144f5..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/kill.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -/// -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.kill = void 0; -const os_1 = __importDefault(require("os")); -const process_1 = __importDefault(require("process")); -const kill = function (pid, signo) { - if (pid < 0 && os_1.default.platform() === "win32") { - throw new TypeError("Invalid pid"); - } - process_1.default.kill(pid, signo); -}; -exports.kill = kill; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/link.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/link.js deleted file mode 100644 index fb3d8c00..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/link.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.link = void 0; -const fs = __importStar(require("fs/promises")); -exports.link = fs.link; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/linkSync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/linkSync.js deleted file mode 100644 index b7d7cbd0..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/linkSync.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.linkSync = void 0; -const fs = __importStar(require("fs")); -exports.linkSync = fs.linkSync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/listen.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/listen.js deleted file mode 100644 index 9c2be73e..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/listen.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.listen = void 0; -const net_1 = require("net"); -const Conn_js_1 = require("../../internal/Conn.js"); -const Listener_js_1 = require("../../internal/Listener.js"); -async function* _listen(server, waitFor) { - await waitFor; - while (server.listening) { - yield new Promise((resolve) => server.once("connection", (socket) => { - socket.on("error", (err) => console.error(err)); - // @ts-expect-error undocumented socket._handle property - const rid = socket._handle.fd; - const localAddr = { - // cannot be undefined while socket is connected - hostname: socket.localAddress, - port: socket.localPort, - transport: "tcp", - }; - const remoteAddr = { - // cannot be undefined while socket is connected - hostname: socket.remoteAddress, - port: socket.remotePort, - transport: "tcp", - }; - resolve(new Conn_js_1.Conn(rid, localAddr, remoteAddr)); - })); - } -} -const listen = function listen(options) { - if (options.transport === "unix") { - throw new Error("Unstable UnixListenOptions is not implemented"); - } - const { port, hostname = "0.0.0.0", transport = "tcp" } = options; - if (transport !== "tcp") { - throw new Error("Deno.listen is only implemented for transport: tcp"); - } - const server = (0, net_1.createServer)(); - const waitFor = new Promise((resolve) => - // server._handle.fd is assigned immediately on .listen() - server.listen(port, hostname, resolve)); - // @ts-expect-error undocumented socket._handle property - const listener = new Listener_js_1.Listener(server._handle.fd, { - hostname, - port, - transport: "tcp", - }, _listen(server, waitFor)); - return listener; -}; -exports.listen = listen; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/listenTls.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/listenTls.js deleted file mode 100644 index 2d3f6b69..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/listenTls.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.listenTls = void 0; -const tls_1 = require("tls"); -const Conn_js_1 = require("../../internal/Conn.js"); -const Listener_js_1 = require("../../internal/Listener.js"); -const readTextFileSync_js_1 = require("./readTextFileSync.js"); -async function* _listen(server, waitFor) { - await waitFor; - while (server.listening) { - yield new Promise((resolve) => server.once("secureConnection", (socket) => { - socket.on("error", (err) => console.error(err)); - // @ts-expect-error undocumented socket._handle property - const rid = socket._handle.fd; - const localAddr = { - // cannot be undefined while socket is connected - hostname: socket.localAddress, - port: socket.localPort, - transport: "tcp", - }; - const remoteAddr = { - // cannot be undefined while socket is connected - hostname: socket.remoteAddress, - port: socket.remotePort, - transport: "tcp", - }; - resolve(new Conn_js_1.TlsConn(rid, localAddr, remoteAddr)); - })); - } -} -const listenTls = function listen({ port, hostname = "0.0.0.0", transport = "tcp", certFile, keyFile }) { - if (transport !== "tcp") { - throw new Error("Deno.listen is only implemented for transport: tcp"); - } - const [cert, key] = [certFile, keyFile].map((f) => f == null ? undefined : (0, readTextFileSync_js_1.readTextFileSync)(f)); - const server = (0, tls_1.createServer)({ cert, key }); - const waitFor = new Promise((resolve) => - // server._handle.fd is assigned immediately on .listen() - server.listen(port, hostname, resolve)); - // @ts-expect-error undocumented socket._handle property - const listener = new Listener_js_1.Listener(server._handle.fd, { - hostname, - port, - transport: "tcp", - }, _listen(server, waitFor)); - return listener; -}; -exports.listenTls = listenTls; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/lstat.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/lstat.js deleted file mode 100644 index b1b0ad31..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/lstat.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.lstat = void 0; -const fs = __importStar(require("fs/promises")); -const stat_js_1 = require("./stat.js"); -const errorMap_js_1 = __importDefault(require("../../internal/errorMap.js")); -const lstat = async (path) => { - try { - return (0, stat_js_1.denoifyFileInfo)(await fs.lstat(path)); - } - catch (e) { - throw (0, errorMap_js_1.default)(e); - } -}; -exports.lstat = lstat; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/lstatSync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/lstatSync.js deleted file mode 100644 index a8de4978..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/lstatSync.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.lstatSync = void 0; -const fs = __importStar(require("fs")); -const stat_js_1 = require("./stat.js"); -const lstatSync = (path) => (0, stat_js_1.denoifyFileInfo)(fs.lstatSync(path)); -exports.lstatSync = lstatSync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/makeTempDir.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/makeTempDir.js deleted file mode 100644 index add51930..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/makeTempDir.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.makeTempDir = void 0; -const promises_1 = require("fs/promises"); -const path_1 = require("path"); -const os_1 = require("os"); -const makeTempDir = function makeTempDir({ prefix = "" } = {}) { - return (0, promises_1.mkdtemp)((0, path_1.join)((0, os_1.tmpdir)(), prefix || "/")); -}; -exports.makeTempDir = makeTempDir; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/makeTempDirSync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/makeTempDirSync.js deleted file mode 100644 index e30e5e0a..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/makeTempDirSync.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.makeTempDirSync = void 0; -const fs_1 = require("fs"); -const path_1 = require("path"); -const os_1 = require("os"); -const makeTempDirSync = function makeTempDirSync({ prefix = "" } = {}) { - return (0, fs_1.mkdtempSync)((0, path_1.join)((0, os_1.tmpdir)(), prefix || "/")); -}; -exports.makeTempDirSync = makeTempDirSync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/makeTempFile.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/makeTempFile.js deleted file mode 100644 index 48b261b1..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/makeTempFile.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.makeTempFile = void 0; -const os_1 = require("os"); -const path_1 = require("path"); -const random_id_js_1 = require("../../internal/random_id.js"); -const writeTextFile_js_1 = require("./writeTextFile.js"); -const makeTempFile = async function makeTempFile({ prefix = "" } = {}) { - const name = (0, path_1.join)((0, os_1.tmpdir)(), prefix, (0, random_id_js_1.randomId)()); - await (0, writeTextFile_js_1.writeTextFile)(name, ""); - return name; -}; -exports.makeTempFile = makeTempFile; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/makeTempFileSync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/makeTempFileSync.js deleted file mode 100644 index f3e4aba5..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/makeTempFileSync.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.makeTempFileSync = void 0; -const os_1 = require("os"); -const path_1 = require("path"); -const random_id_js_1 = require("../../internal/random_id.js"); -const writeTextFileSync_js_1 = require("./writeTextFileSync.js"); -const makeTempFileSync = function makeTempFileSync({ prefix = "" } = {}) { - const name = (0, path_1.join)((0, os_1.tmpdir)(), prefix, (0, random_id_js_1.randomId)()); - (0, writeTextFileSync_js_1.writeTextFileSync)(name, ""); - return name; -}; -exports.makeTempFileSync = makeTempFileSync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/memoryUsage.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/memoryUsage.js deleted file mode 100644 index be372038..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/memoryUsage.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.memoryUsage = void 0; -exports.memoryUsage = process.memoryUsage; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/mkdir.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/mkdir.js deleted file mode 100644 index ace2247f..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/mkdir.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -/// -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.mkdir = void 0; -const promises_1 = require("fs/promises"); -const errorMap_js_1 = __importDefault(require("../../internal/errorMap.js")); -const variables_js_1 = require("../variables.js"); -const mkdir = async function mkdir(path, options) { - try { - await (0, promises_1.mkdir)(path, options); - } - catch (error) { - if ((error === null || error === void 0 ? void 0 : error.code) === "EEXIST") { - throw new variables_js_1.errors.AlreadyExists(`File exists (os error 17), mkdir '${path}'`); - } - throw (0, errorMap_js_1.default)(error); - } -}; -exports.mkdir = mkdir; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/mkdirSync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/mkdirSync.js deleted file mode 100644 index 05ec7ef0..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/mkdirSync.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.mkdirSync = void 0; -const fs = __importStar(require("fs")); -const errorMap_js_1 = __importDefault(require("../../internal/errorMap.js")); -const variables_js_1 = require("../variables.js"); -const mkdirSync = (path, options) => { - try { - fs.mkdirSync(path, options); - } - catch (error) { - if ((error === null || error === void 0 ? void 0 : error.code) === "EEXIST") { - throw new variables_js_1.errors.AlreadyExists(`File exists (os error 17), mkdir '${path}'`); - } - throw (0, errorMap_js_1.default)(error); - } -}; -exports.mkdirSync = mkdirSync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/open.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/open.js deleted file mode 100644 index 7c230bd4..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/open.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -/// -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.open = void 0; -const fs_1 = require("fs"); -const util_1 = require("util"); -const FsFile_js_1 = require("../classes/FsFile.js"); -const fs_flags_js_1 = require("../../internal/fs_flags.js"); -const errorMap_js_1 = __importDefault(require("../../internal/errorMap.js")); -const nodeOpen = (0, util_1.promisify)(fs_1.open); -const open = async function open(path, { read, write, append, truncate, create, createNew, mode = 0o666 } = { - read: true, -}) { - const flagMode = (0, fs_flags_js_1.getFsFlag)({ - read, - write, - append, - truncate, - create, - createNew, - }); - try { - const fd = await nodeOpen(path, flagMode, mode); - return new FsFile_js_1.File(fd); - } - catch (err) { - throw (0, errorMap_js_1.default)(err); - } -}; -exports.open = open; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/openSync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/openSync.js deleted file mode 100644 index aee446d9..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/openSync.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -/// -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.openSync = void 0; -const fs_1 = require("fs"); -const FsFile_js_1 = require("../classes/FsFile.js"); -const fs_flags_js_1 = require("../../internal/fs_flags.js"); -const errorMap_js_1 = __importDefault(require("../../internal/errorMap.js")); -const openSync = function openSync(path, { read, write, append, truncate, create, createNew, mode = 0o666 } = { - read: true, -}) { - const flagMode = (0, fs_flags_js_1.getFsFlag)({ - read, - write, - append, - truncate, - create, - createNew, - }); - try { - const fd = (0, fs_1.openSync)(path, flagMode, mode); - return new FsFile_js_1.File(fd); - } - catch (err) { - throw (0, errorMap_js_1.default)(err); - } -}; -exports.openSync = openSync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/read.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/read.js deleted file mode 100644 index 2da43628..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/read.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.read = void 0; -const util_1 = require("util"); -const fs_1 = require("fs"); -const _read = (0, util_1.promisify)(fs_1.read); -const read = async function read(rid, buffer) { - if (buffer == null) { - throw new TypeError("Buffer must not be null."); - } - if (buffer.length === 0) { - return 0; - } - const { bytesRead } = await _read(rid, buffer, 0, buffer.length, null); - // node returns 0 on EOF, Deno expects null - return bytesRead === 0 ? null : bytesRead; -}; -exports.read = read; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/readDir.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/readDir.js deleted file mode 100644 index a718ccd3..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/readDir.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -/// -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.readDir = void 0; -const promises_1 = require("fs/promises"); -const errorMap_js_1 = __importDefault(require("../../internal/errorMap.js")); -const readDir = async function* readDir(path) { - try { - for await (const e of await (0, promises_1.opendir)(String(path))) { - const ent = { - name: e.name, - isFile: e.isFile(), - isDirectory: e.isDirectory(), - isSymlink: e.isSymbolicLink(), - }; - yield ent; - } - } - catch (e) { - throw (0, errorMap_js_1.default)(e); - } -}; -exports.readDir = readDir; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/readDirSync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/readDirSync.js deleted file mode 100644 index ebabbb72..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/readDirSync.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -/// -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.readDirSync = void 0; -const fs_1 = require("fs"); -const errorMap_js_1 = __importDefault(require("../../internal/errorMap.js")); -const readDirSync = function* readDir(path) { - try { - for (const e of (0, fs_1.readdirSync)(String(path), { withFileTypes: true })) { - const ent = { - name: e.name, - isFile: e.isFile(), - isDirectory: e.isDirectory(), - isSymlink: e.isSymbolicLink(), - }; - yield ent; - } - } - catch (e) { - throw (0, errorMap_js_1.default)(e); - } -}; -exports.readDirSync = readDirSync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/readFile.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/readFile.js deleted file mode 100644 index 58c5bc6f..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/readFile.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -/// -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.readFile = void 0; -const promises_1 = require("fs/promises"); -const errorMap_js_1 = __importDefault(require("../../internal/errorMap.js")); -const readFile = async function readFile(path, { signal } = {}) { - try { - const buf = await (0, promises_1.readFile)(path, { signal }); - return new Uint8Array(buf.buffer, buf.byteOffset, buf.length); - } - catch (e) { - throw (0, errorMap_js_1.default)(e); - } -}; -exports.readFile = readFile; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/readFileSync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/readFileSync.js deleted file mode 100644 index b37e723a..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/readFileSync.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -/// -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.readFileSync = void 0; -const fs_1 = require("fs"); -const errorMap_js_1 = __importDefault(require("../../internal/errorMap.js")); -const readFileSync = function readFileSync(path) { - try { - const buf = (0, fs_1.readFileSync)(path); - return new Uint8Array(buf.buffer, buf.byteOffset, buf.length); - } - catch (e) { - throw (0, errorMap_js_1.default)(e); - } -}; -exports.readFileSync = readFileSync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/readLink.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/readLink.js deleted file mode 100644 index 4a663ed2..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/readLink.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.readLink = void 0; -const fs = __importStar(require("fs/promises")); -exports.readLink = fs.readlink; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/readLinkSync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/readLinkSync.js deleted file mode 100644 index 4a5472d9..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/readLinkSync.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.readLinkSync = void 0; -const fs = __importStar(require("fs")); -exports.readLinkSync = fs.readlinkSync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/readSync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/readSync.js deleted file mode 100644 index 22fc29e3..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/readSync.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.readSync = void 0; -const fs = __importStar(require("fs")); -const readSync = (fd, buffer) => { - const bytesRead = fs.readSync(fd, buffer); - // node returns 0 on EOF, Deno expects null - return bytesRead === 0 ? null : bytesRead; -}; -exports.readSync = readSync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/readTextFile.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/readTextFile.js deleted file mode 100644 index 8c177871..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/readTextFile.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -/// -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.readTextFile = void 0; -const promises_1 = require("fs/promises"); -const errorMap_js_1 = __importDefault(require("../../internal/errorMap.js")); -const readTextFile = async (path, { signal } = {}) => { - try { - return await (0, promises_1.readFile)(path, { encoding: "utf8", signal }); - } - catch (e) { - throw (0, errorMap_js_1.default)(e); - } -}; -exports.readTextFile = readTextFile; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/readTextFileSync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/readTextFileSync.js deleted file mode 100644 index a8d16ea4..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/readTextFileSync.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.readTextFileSync = void 0; -const fs = __importStar(require("fs")); -const errorMap_js_1 = __importDefault(require("../../internal/errorMap.js")); -const readTextFileSync = function (path) { - try { - return fs.readFileSync(path, "utf8"); - } - catch (e) { - throw (0, errorMap_js_1.default)(e); - } -}; -exports.readTextFileSync = readTextFileSync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/realPath.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/realPath.js deleted file mode 100644 index e0748983..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/realPath.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.realPath = void 0; -const fs = __importStar(require("fs/promises")); -exports.realPath = fs.realpath; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/realPathSync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/realPathSync.js deleted file mode 100644 index f70fce68..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/realPathSync.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.realPathSync = void 0; -const fs = __importStar(require("fs")); -exports.realPathSync = fs.realpathSync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/remove.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/remove.js deleted file mode 100644 index f1e377ae..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/remove.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.remove = void 0; -const promises_1 = require("fs/promises"); -const remove = async function remove(path, options = {}) { - const innerOptions = options.recursive - ? { recursive: true, force: true } - : {}; - try { - return await (0, promises_1.rm)(path, innerOptions); - } - catch (err) { - if (err.code === "ERR_FS_EISDIR") { - return await (0, promises_1.rmdir)(path, innerOptions); - } - else { - throw err; - } - } -}; -exports.remove = remove; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/removeSync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/removeSync.js deleted file mode 100644 index e3bf14d3..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/removeSync.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.removeSync = void 0; -const fs = __importStar(require("fs")); -const removeSync = (path, options = {}) => { - const innerOptions = options.recursive - ? { recursive: true, force: true } - : {}; - try { - fs.rmSync(path, innerOptions); - } - catch (err) { - if (err.code === "ERR_FS_EISDIR") { - fs.rmdirSync(path, innerOptions); - } - else { - throw err; - } - } -}; -exports.removeSync = removeSync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/rename.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/rename.js deleted file mode 100644 index 21f696f2..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/rename.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.rename = void 0; -const promises_1 = require("fs/promises"); -const rename = function rename(oldpath, newpath) { - return (0, promises_1.rename)(oldpath, newpath); -}; -exports.rename = rename; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/renameSync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/renameSync.js deleted file mode 100644 index f88c37cc..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/renameSync.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.renameSync = void 0; -const fs = __importStar(require("fs")); -exports.renameSync = fs.renameSync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/resolveDns.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/resolveDns.js deleted file mode 100644 index 6b720c90..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/resolveDns.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -/// -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.resolveDns = void 0; -const dns_1 = __importDefault(require("dns")); -const resolveDns = function resolveDns(query, recordType, options) { - if (options) { - throw Error(`resolveDns option not implemnted yet`); - } - switch (recordType) { - case "A": - /* falls through */ - case "AAAA": - case "CNAME": - case "NS": - case "PTR": - return new Promise((resolve, reject) => { - dns_1.default.resolve(query, recordType, (err, addresses) => { - if (err) { - reject(err); - } - else { - resolve(addresses); - } - }); - }); - case "ANAME": - case "CAA": - case "MX": - case "NAPTR": - case "SOA": - case "SRV": - case "TXT": - default: - throw Error(`resolveDns type ${recordType} not implemnted yet`); - } -}; -exports.resolveDns = resolveDns; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/run.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/run.js deleted file mode 100644 index a9c12afb..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/run.js +++ /dev/null @@ -1,276 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; -}; -var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -var _Process_process, _Process_stderr, _Process_stdout, _Process_stdin, _Process_status, _Process_receivedStatus, _ProcessReadStream_stream, _ProcessReadStream_bufferStreamReader, _ProcessReadStream_closed, _ProcessWriteStream_stream, _ProcessWriteStream_streamWriter, _ProcessWriteStream_closed; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Process = exports.run = void 0; -const child_process_1 = __importDefault(require("child_process")); -const fs_1 = __importDefault(require("fs")); -const os_1 = __importDefault(require("os")); -const url_1 = __importDefault(require("url")); -const events_1 = require("events"); -const which_1 = __importDefault(require("which")); -const streams_js_1 = require("../../internal/streams.js"); -const errors = __importStar(require("../variables/errors.js")); -const run = function run(options) { - const [cmd, ...args] = options.cmd; - if (options.cwd && !fs_1.default.existsSync(options.cwd)) { - throw new Error("The directory name is invalid."); - } - // childProcess.spawn will asynchronously check if the command exists, but - // we need to do this synchronously - const commandName = getCmd(cmd); - if (!which_1.default.sync(commandName, { nothrow: true })) { - throw new errors.NotFound("The system cannot find the file specified."); - } - const process = child_process_1.default.spawn(commandName, args, { - cwd: options.cwd, - env: getEnv(options), - uid: options.uid, - gid: options.gid, - shell: false, - stdio: [ - getStdio(options.stdin, "in"), - getStdio(options.stdout, "out"), - getStdio(options.stderr, "out"), - ], - }); - return new Process(process); -}; -exports.run = run; -function getStdio(value, kind) { - if (value === "inherit" || value == null) { - return "inherit"; // default - } - else if (value === "piped") { - return "pipe"; - } - else if (value === "null") { - return "ignore"; - } - else if (typeof value === "number") { - switch (kind) { - case "in": - return fs_1.default.createReadStream(null, { fd: value }); - case "out": - return fs_1.default.createWriteStream(null, { fd: value }); - default: { - const _assertNever = kind; - throw new Error("Unreachable."); - } - } - } - else { - const _assertNever = value; - throw new Error("Unknown value."); - } -} -function getCmd(firstArg) { - if (firstArg instanceof URL) { - return url_1.default.fileURLToPath(firstArg); - } - else { - return firstArg; - } -} -function getEnv(options) { - var _a; - const env = (_a = options.env) !== null && _a !== void 0 ? _a : {}; - for (const name in process.env) { - if (!Object.prototype.hasOwnProperty.call(env, name)) { - if (options.clearEnv) { - if (os_1.default.platform() === "win32") { - env[name] = ""; - } - else { - delete env[name]; - } - } - else { - env[name] = process.env[name]; - } - } - } - return env; -} -class Process { - /** @internal */ - constructor(process) { - var _a, _b, _c; - _Process_process.set(this, void 0); - _Process_stderr.set(this, void 0); - _Process_stdout.set(this, void 0); - _Process_stdin.set(this, void 0); - _Process_status.set(this, void 0); - _Process_receivedStatus.set(this, false); - __classPrivateFieldSet(this, _Process_process, process, "f"); - __classPrivateFieldSet(this, _Process_stdout, (_a = ProcessReadStream.fromNullable(__classPrivateFieldGet(this, _Process_process, "f").stdout)) !== null && _a !== void 0 ? _a : null, "f"); - __classPrivateFieldSet(this, _Process_stderr, (_b = ProcessReadStream.fromNullable(__classPrivateFieldGet(this, _Process_process, "f").stderr)) !== null && _b !== void 0 ? _b : null, "f"); - __classPrivateFieldSet(this, _Process_stdin, (_c = ProcessWriteStream.fromNullable(__classPrivateFieldGet(this, _Process_process, "f").stdin)) !== null && _c !== void 0 ? _c : null, "f"); - __classPrivateFieldSet(this, _Process_status, (0, events_1.once)(process, "exit"), "f"); - } - get rid() { - // todo: useful to return something? - return NaN; - } - get pid() { - // only undefined when the process doesn't spawn, in which case this - // will never be reached - return __classPrivateFieldGet(this, _Process_process, "f").pid; - } - get stdin() { - return __classPrivateFieldGet(this, _Process_stdin, "f"); - } - get stdout() { - return __classPrivateFieldGet(this, _Process_stdout, "f"); - } - get stderr() { - return __classPrivateFieldGet(this, _Process_stderr, "f"); - } - async status() { - const [receivedCode, signalName] = await __classPrivateFieldGet(this, _Process_status, "f"); - // when there is a signal, the exit code is 128 + signal code - const signal = signalName - ? os_1.default.constants.signals[signalName] - : receivedCode > 128 - ? receivedCode - 128 - : undefined; - const code = receivedCode != null - ? receivedCode - : signal != null - ? 128 + signal - : undefined; - const success = code === 0; - __classPrivateFieldSet(this, _Process_receivedStatus, true, "f"); - return { code, signal, success }; - } - async output() { - if (!__classPrivateFieldGet(this, _Process_stdout, "f")) { - throw new TypeError("stdout was not piped"); - } - const result = await __classPrivateFieldGet(this, _Process_stdout, "f").readAll(); - __classPrivateFieldGet(this, _Process_stdout, "f").close(); - return result; - } - async stderrOutput() { - if (!__classPrivateFieldGet(this, _Process_stderr, "f")) { - throw new TypeError("stderr was not piped"); - } - const result = await __classPrivateFieldGet(this, _Process_stderr, "f").readAll(); - __classPrivateFieldGet(this, _Process_stderr, "f").close(); - return result; - } - close() { - // Deno doesn't close any stdio streams here - __classPrivateFieldGet(this, _Process_process, "f").unref(); - __classPrivateFieldGet(this, _Process_process, "f").kill(); - } - kill(signo) { - if (__classPrivateFieldGet(this, _Process_receivedStatus, "f")) { - throw new errors.NotFound("entity not found"); - } - __classPrivateFieldGet(this, _Process_process, "f").kill(signo); - } -} -exports.Process = Process; -_Process_process = new WeakMap(), _Process_stderr = new WeakMap(), _Process_stdout = new WeakMap(), _Process_stdin = new WeakMap(), _Process_status = new WeakMap(), _Process_receivedStatus = new WeakMap(); -class ProcessReadStream { - constructor(stream) { - _ProcessReadStream_stream.set(this, void 0); - _ProcessReadStream_bufferStreamReader.set(this, void 0); - _ProcessReadStream_closed.set(this, false); - __classPrivateFieldSet(this, _ProcessReadStream_stream, stream, "f"); - __classPrivateFieldSet(this, _ProcessReadStream_bufferStreamReader, new streams_js_1.BufferStreamReader(stream), "f"); - } - static fromNullable(stream) { - return stream ? new ProcessReadStream(stream) : undefined; - } - readAll() { - if (__classPrivateFieldGet(this, _ProcessReadStream_closed, "f")) { - return Promise.resolve(new Uint8Array(0)); - } - else { - return __classPrivateFieldGet(this, _ProcessReadStream_bufferStreamReader, "f").readAll(); - } - } - read(p) { - if (__classPrivateFieldGet(this, _ProcessReadStream_closed, "f")) { - return Promise.resolve(null); - } - else { - return __classPrivateFieldGet(this, _ProcessReadStream_bufferStreamReader, "f").read(p); - } - } - close() { - __classPrivateFieldSet(this, _ProcessReadStream_closed, true, "f"); - __classPrivateFieldGet(this, _ProcessReadStream_stream, "f").destroy(); - } - get readable() { - throw new Error("Not implemented."); - } - get writable() { - throw new Error("Not implemented."); - } -} -_ProcessReadStream_stream = new WeakMap(), _ProcessReadStream_bufferStreamReader = new WeakMap(), _ProcessReadStream_closed = new WeakMap(); -class ProcessWriteStream { - constructor(stream) { - _ProcessWriteStream_stream.set(this, void 0); - _ProcessWriteStream_streamWriter.set(this, void 0); - _ProcessWriteStream_closed.set(this, false); - __classPrivateFieldSet(this, _ProcessWriteStream_stream, stream, "f"); - __classPrivateFieldSet(this, _ProcessWriteStream_streamWriter, new streams_js_1.StreamWriter(stream), "f"); - } - static fromNullable(stream) { - return stream ? new ProcessWriteStream(stream) : undefined; - } - write(p) { - if (__classPrivateFieldGet(this, _ProcessWriteStream_closed, "f")) { - return Promise.resolve(0); - } - else { - return __classPrivateFieldGet(this, _ProcessWriteStream_streamWriter, "f").write(p); - } - } - close() { - __classPrivateFieldSet(this, _ProcessWriteStream_closed, true, "f"); - __classPrivateFieldGet(this, _ProcessWriteStream_stream, "f").end(); - } -} -_ProcessWriteStream_stream = new WeakMap(), _ProcessWriteStream_streamWriter = new WeakMap(), _ProcessWriteStream_closed = new WeakMap(); diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/shutdown.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/shutdown.js deleted file mode 100644 index d4f17363..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/shutdown.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.shutdown = void 0; -const net_1 = require("net"); -const shutdown = async function shutdown(rid) { - await new Promise((resolve) => new net_1.Socket({ fd: rid }).end(resolve)); -}; -exports.shutdown = shutdown; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/stat.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/stat.js deleted file mode 100644 index 488504aa..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/stat.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; -/// -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.stat = exports.denoifyFileInfo = void 0; -const promises_1 = require("fs/promises"); -const errorMap_js_1 = __importDefault(require("../../internal/errorMap.js")); -function denoifyFileInfo(s) { - return { - atime: s.atime, - birthtime: s.birthtime, - blksize: s.blksize, - blocks: s.blocks, - dev: s.dev, - gid: s.gid, - ino: s.ino, - isDirectory: s.isDirectory(), - isFile: s.isFile(), - isSymlink: s.isSymbolicLink(), - mode: s.mode, - mtime: s.mtime, - nlink: s.nlink, - rdev: s.rdev, - size: s.size, - uid: s.uid, - }; -} -exports.denoifyFileInfo = denoifyFileInfo; -const stat = async (path) => { - try { - return denoifyFileInfo(await (0, promises_1.stat)(path)); - } - catch (e) { - throw (0, errorMap_js_1.default)(e); - } -}; -exports.stat = stat; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/statSync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/statSync.js deleted file mode 100644 index ae2a3cc4..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/statSync.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.statSync = void 0; -const fs = __importStar(require("fs")); -const stat_js_1 = require("./stat.js"); -const statSync = (path) => (0, stat_js_1.denoifyFileInfo)(fs.statSync(path)); -exports.statSync = statSync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/symlink.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/symlink.js deleted file mode 100644 index 81551bb3..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/symlink.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.symlink = void 0; -const fs = __importStar(require("fs/promises")); -const symlink = async (oldpath, newpath, options) => await fs.symlink(oldpath, newpath, options === null || options === void 0 ? void 0 : options.type); -exports.symlink = symlink; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/symlinkSync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/symlinkSync.js deleted file mode 100644 index eff95ec7..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/symlinkSync.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.symlinkSync = void 0; -const fs = __importStar(require("fs")); -const symlinkSync = (oldpath, newpath, options) => fs.symlinkSync(oldpath, newpath, options === null || options === void 0 ? void 0 : options.type); -exports.symlinkSync = symlinkSync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/test.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/test.js deleted file mode 100644 index eff70c94..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/test.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.test = void 0; -var shim_deno_test_1 = require("@deno/shim-deno-test"); -Object.defineProperty(exports, "test", { enumerable: true, get: function () { return shim_deno_test_1.test; } }); diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/truncate.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/truncate.js deleted file mode 100644 index 911664a3..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/truncate.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.truncate = void 0; -const fs = __importStar(require("fs/promises")); -const errorMap_js_1 = __importDefault(require("../../internal/errorMap.js")); -const variables_js_1 = require("../variables.js"); -const truncate = async (name, len) => { - try { - return await fs.truncate(name, len); - } - catch (error) { - if ((error === null || error === void 0 ? void 0 : error.code) === "ENOENT") { - throw new variables_js_1.errors.NotFound(`No such file or directory (os error 2), truncate '${name}'`); - } - throw (0, errorMap_js_1.default)(error); - } -}; -exports.truncate = truncate; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/truncateSync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/truncateSync.js deleted file mode 100644 index e32a8839..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/truncateSync.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.truncateSync = void 0; -const fs = __importStar(require("fs")); -const errorMap_js_1 = __importDefault(require("../../internal/errorMap.js")); -const variables_js_1 = require("../variables.js"); -const truncateSync = (name, len) => { - try { - return fs.truncateSync(name, len); - } - catch (error) { - if ((error === null || error === void 0 ? void 0 : error.code) === "ENOENT") { - throw new variables_js_1.errors.NotFound(`No such file or directory (os error 2), truncate '${name}'`); - } - throw (0, errorMap_js_1.default)(error); - } -}; -exports.truncateSync = truncateSync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/watchFs.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/watchFs.js deleted file mode 100644 index 86342d3f..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/watchFs.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.watchFs = void 0; -const promises_1 = require("fs/promises"); -const path_1 = require("path"); -const iterutil_js_1 = require("../../internal/iterutil.js"); -const watchFs = function watchFs(paths, options = { recursive: true }) { - paths = Array.isArray(paths) ? paths : [paths]; - const ac = new AbortController(); - const { signal } = ac; - // TODO(mkr): create valid rids for watchers - const rid = -1; - const masterWatcher = (0, iterutil_js_1.merge)(paths.map((path) => (0, iterutil_js_1.mapAsync)((0, promises_1.watch)(path, { recursive: options === null || options === void 0 ? void 0 : options.recursive, signal }), (info) => ({ - kind: "modify", - paths: [(0, path_1.resolve)(path, info.filename)], - })))); - function close() { - ac.abort(); - } - return Object.assign(masterWatcher, { rid, close }); -}; -exports.watchFs = watchFs; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/write.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/write.js deleted file mode 100644 index 5a103100..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/write.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.write = void 0; -const fs = __importStar(require("fs")); -const util_1 = require("util"); -const nodeWrite = (0, util_1.promisify)(fs.write); -const write = async (fd, data) => { - const { bytesWritten } = await nodeWrite(fd, data); - return bytesWritten; -}; -exports.write = write; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeFile.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeFile.js deleted file mode 100644 index 962f5788..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeFile.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.writeFile = void 0; -const fs = __importStar(require("fs/promises")); -const errorMap_js_1 = __importDefault(require("../../internal/errorMap.js")); -const fs_flags_js_1 = require("../../internal/fs_flags.js"); -const writeFile = async function writeFile(path, data, { append = false, create = true, mode, signal } = {}) { - const truncate = create && !append; - const flag = (0, fs_flags_js_1.getFsFlag)({ append, create, truncate, write: true }); - try { - await fs.writeFile(path, data, { flag, signal }); - if (mode !== undefined) - await fs.chmod(path, mode); - } - catch (error) { - throw (0, errorMap_js_1.default)(error); - } -}; -exports.writeFile = writeFile; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeFileSync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeFileSync.js deleted file mode 100644 index f117442e..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeFileSync.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -/// -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.writeFileSync = void 0; -const os_1 = require("os"); -const openSync_js_1 = require("./openSync.js"); -const errorMap_js_1 = __importDefault(require("../../internal/errorMap.js")); -const statSync_js_1 = require("./statSync.js"); -const chmodSync_js_1 = require("./chmodSync.js"); -const writeFileSync = function writeFileSync(path, data, options = {}) { - try { - if (options.create !== undefined) { - const create = !!options.create; - if (!create) { - // verify that file exists - (0, statSync_js_1.statSync)(path); - } - } - const openOptions = options.append - ? { write: true, create: true, append: true } - : { write: true, create: true, truncate: true }; - const file = (0, openSync_js_1.openSync)(path, openOptions); - if (options.mode !== undefined && - options.mode !== null && - (0, os_1.platform)() !== "win32") { - (0, chmodSync_js_1.chmodSync)(path, options.mode); - } - let nwritten = 0; - while (nwritten < data.length) { - nwritten += file.writeSync(data.subarray(nwritten)); - } - file.close(); - } - catch (e) { - throw (0, errorMap_js_1.default)(e); - } -}; -exports.writeFileSync = writeFileSync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeSync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeSync.js deleted file mode 100644 index 47c7b0fc..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeSync.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.writeSync = void 0; -const fs = __importStar(require("fs")); -exports.writeSync = fs.writeSync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeTextFile.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeTextFile.js deleted file mode 100644 index 248b2ad8..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeTextFile.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.writeTextFile = void 0; -const fs = __importStar(require("fs/promises")); -const errorMap_js_1 = __importDefault(require("../../internal/errorMap.js")); -const fs_flags_js_1 = require("../../internal/fs_flags.js"); -const writeTextFile = async function writeTextFile(path, data, { append = false, create = true, mode, signal } = {}) { - const truncate = create && !append; - const flag = (0, fs_flags_js_1.getFsFlag)({ append, create, truncate, write: true }); - try { - await fs.writeFile(path, data, { flag, mode, signal }); - if (mode !== undefined) - await fs.chmod(path, mode); - } - catch (error) { - throw (0, errorMap_js_1.default)(error); - } -}; -exports.writeTextFile = writeTextFile; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeTextFileSync.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeTextFileSync.js deleted file mode 100644 index c6e7d874..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeTextFileSync.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.writeTextFileSync = void 0; -const fs = __importStar(require("fs")); -const errorMap_js_1 = __importDefault(require("../../internal/errorMap.js")); -const writeTextFileSync = (path, data, { append = false, create = true, mode } = {}) => { - const flag = create ? (append ? "a" : "w") : "r+"; - try { - fs.writeFileSync(path, data, { flag, mode }); - if (mode !== undefined) - fs.chmodSync(path, mode); - } - catch (error) { - throw (0, errorMap_js_1.default)(error); - } -}; -exports.writeTextFileSync = writeTextFileSync; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/main.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/main.js deleted file mode 100644 index 1748b806..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/main.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -__exportStar(require("./classes.js"), exports); -__exportStar(require("./enums.js"), exports); -__exportStar(require("./functions.js"), exports); -__exportStar(require("./types.js"), exports); -__exportStar(require("./variables.js"), exports); diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/variables.js deleted file mode 100644 index faaf5f7b..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables.js +++ /dev/null @@ -1,53 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.version = exports.resources = exports.ppid = exports.pid = exports.permissions = exports.noColor = exports.metrics = exports.mainModule = exports.errors = exports.env = exports.customInspect = exports.build = void 0; -var build_js_1 = require("./variables/build.js"); -Object.defineProperty(exports, "build", { enumerable: true, get: function () { return build_js_1.build; } }); -var customInspect_js_1 = require("./variables/customInspect.js"); -Object.defineProperty(exports, "customInspect", { enumerable: true, get: function () { return customInspect_js_1.customInspect; } }); -var env_js_1 = require("./variables/env.js"); -Object.defineProperty(exports, "env", { enumerable: true, get: function () { return env_js_1.env; } }); -exports.errors = __importStar(require("./variables/errors.js")); -var mainModule_js_1 = require("./variables/mainModule.js"); -Object.defineProperty(exports, "mainModule", { enumerable: true, get: function () { return mainModule_js_1.mainModule; } }); -var metrics_js_1 = require("./variables/metrics.js"); -Object.defineProperty(exports, "metrics", { enumerable: true, get: function () { return metrics_js_1.metrics; } }); -var noColor_js_1 = require("./variables/noColor.js"); -Object.defineProperty(exports, "noColor", { enumerable: true, get: function () { return noColor_js_1.noColor; } }); -var permissions_js_1 = require("./variables/permissions.js"); -Object.defineProperty(exports, "permissions", { enumerable: true, get: function () { return permissions_js_1.permissions; } }); -var pid_js_1 = require("./variables/pid.js"); -Object.defineProperty(exports, "pid", { enumerable: true, get: function () { return pid_js_1.pid; } }); -var ppid_js_1 = require("./variables/ppid.js"); -Object.defineProperty(exports, "ppid", { enumerable: true, get: function () { return ppid_js_1.ppid; } }); -var resources_js_1 = require("./variables/resources.js"); -Object.defineProperty(exports, "resources", { enumerable: true, get: function () { return resources_js_1.resources; } }); -__exportStar(require("./variables/std.js"), exports); -var version_js_1 = require("./variables/version.js"); -Object.defineProperty(exports, "version", { enumerable: true, get: function () { return version_js_1.version; } }); diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/args.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/args.js deleted file mode 100644 index e684ab9f..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/args.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.args = void 0; -exports.args = process.argv.slice(2); diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/build.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/build.js deleted file mode 100644 index 91230737..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/build.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; -/// -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.build = void 0; -const os = __importStar(require("os")); -exports.build = { - arch: "x86_64", - os: ((p) => p === "win32" ? "windows" : p === "darwin" ? "darwin" : "linux")(os.platform()), - vendor: "pc", - target: ((p) => p === "win32" - ? "x86_64-pc-windows-msvc" - : p === "darwin" - ? "x86_64-apple-darwin" - : "x86_64-unknown-linux-gnu")(os.platform()), -}; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/customInspect.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/customInspect.js deleted file mode 100644 index b4bf1d31..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/customInspect.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.customInspect = void 0; -exports.customInspect = Symbol.for("nodejs.util.inspect.custom"); diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/env.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/env.js deleted file mode 100644 index f1926c2b..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/env.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.env = void 0; -exports.env = { - get(key) { - return process.env[key]; - }, - set(key, value) { - process.env[key] = value; - }, - delete(key) { - delete process.env[key]; - }, - // @ts-expect-error https://github.com/denoland/deno/issues/10267 - toObject() { - return { ...process.env }; - }, -}; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/errors.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/errors.js deleted file mode 100644 index 93bc1df1..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/errors.js +++ /dev/null @@ -1,59 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.WriteZero = exports.UnexpectedEof = exports.TimedOut = exports.PermissionDenied = exports.NotFound = exports.NotConnected = exports.InvalidData = exports.Interrupted = exports.Http = exports.ConnectionReset = exports.ConnectionRefused = exports.ConnectionAborted = exports.Busy = exports.BrokenPipe = exports.BadResource = exports.AlreadyExists = exports.AddrNotAvailable = exports.AddrInUse = void 0; -// please keep sorted -class AddrInUse extends Error { -} -exports.AddrInUse = AddrInUse; -class AddrNotAvailable extends Error { -} -exports.AddrNotAvailable = AddrNotAvailable; -class AlreadyExists extends Error { -} -exports.AlreadyExists = AlreadyExists; -class BadResource extends Error { -} -exports.BadResource = BadResource; -class BrokenPipe extends Error { -} -exports.BrokenPipe = BrokenPipe; -class Busy extends Error { -} -exports.Busy = Busy; -class ConnectionAborted extends Error { -} -exports.ConnectionAborted = ConnectionAborted; -class ConnectionRefused extends Error { -} -exports.ConnectionRefused = ConnectionRefused; -class ConnectionReset extends Error { -} -exports.ConnectionReset = ConnectionReset; -class Http extends Error { -} -exports.Http = Http; -class Interrupted extends Error { -} -exports.Interrupted = Interrupted; -class InvalidData extends Error { -} -exports.InvalidData = InvalidData; -class NotConnected extends Error { -} -exports.NotConnected = NotConnected; -class NotFound extends Error { -} -exports.NotFound = NotFound; -class PermissionDenied extends Error { -} -exports.PermissionDenied = PermissionDenied; -class TimedOut extends Error { -} -exports.TimedOut = TimedOut; -class UnexpectedEof extends Error { -} -exports.UnexpectedEof = UnexpectedEof; -class WriteZero extends Error { -} -exports.WriteZero = WriteZero; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/mainModule.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/mainModule.js deleted file mode 100644 index 9f054ea6..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/mainModule.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -var _a, _b; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.mainModule = void 0; -/// -const path_1 = require("path"); -const url_1 = require("url"); -exports.mainModule = (0, url_1.pathToFileURL)((_b = (_a = require.main) === null || _a === void 0 ? void 0 : _a.filename) !== null && _b !== void 0 ? _b : (0, path_1.join)(__dirname, "$deno$repl.ts")).href; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/metrics.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/metrics.js deleted file mode 100644 index 81b13e15..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/metrics.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.metrics = void 0; -const metrics = function metrics() { - return { - opsDispatched: 0, - opsDispatchedSync: 0, - opsDispatchedAsync: 0, - opsDispatchedAsyncUnref: 0, - opsCompleted: 0, - opsCompletedSync: 0, - opsCompletedAsync: 0, - opsCompletedAsyncUnref: 0, - bytesSentControl: 0, - bytesSentData: 0, - bytesReceived: 0, - ops: {}, - }; -}; -exports.metrics = metrics; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/noColor.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/noColor.js deleted file mode 100644 index 9e0c6311..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/noColor.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.noColor = void 0; -exports.noColor = process.env.NO_COLOR !== undefined; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/permissions.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/permissions.js deleted file mode 100644 index ae0a4f1e..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/permissions.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.permissions = void 0; -const Permissions_js_1 = require("../classes/Permissions.js"); -exports.permissions = new Permissions_js_1.Permissions(); diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/pid.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/pid.js deleted file mode 100644 index 0e67beda..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/pid.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.pid = void 0; -exports.pid = process.pid; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/ppid.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/ppid.js deleted file mode 100644 index fd8130f1..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/ppid.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ppid = void 0; -exports.ppid = process.ppid; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/resources.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/resources.js deleted file mode 100644 index 49cc1f53..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/resources.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.resources = void 0; -const resources = function resources() { - console.warn([ - "Deno.resources() shim returns a dummy object that does not update.", - "If you think this is a mistake, raise an issue at https://github.com/denoland/node_deno_shims/issues", - ].join("\n")); - return {}; -}; -exports.resources = resources; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/std.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/std.js deleted file mode 100644 index bd9f25db..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/std.js +++ /dev/null @@ -1,101 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.stderr = exports.stdout = exports.stdin = void 0; -function chain(fn, cleanup) { - let prev; - return function _fn(...args) { - const curr = (prev || Promise.resolve()) - .then(() => fn(...args)) - .finally(cleanup || (() => { })) - .then((result) => { - if (prev === curr) - prev = undefined; - return result; - }); - return (prev = curr); - }; -} -exports.stdin = { - rid: 0, - read: chain((p) => { - return new Promise((resolve, reject) => { - process.stdin.resume(); - process.stdin.on("error", onerror); - process.stdin.once("readable", () => { - var _a; - process.stdin.off("error", onerror); - const data = (_a = process.stdin.read(p.length)) !== null && _a !== void 0 ? _a : process.stdin.read(); - if (data) { - p.set(data); - resolve(data.length > 0 ? data.length : null); - } - else { - resolve(null); - } - }); - function onerror(error) { - reject(error); - process.stdin.off("error", onerror); - } - }); - }, () => process.stdin.pause()), - get readable() { - throw new Error("Not implemented."); - }, - readSync() { - // Node.js doesn't support readSync for stdin - throw new Error("Not implemented."); - }, - close() { - process.stdin.destroy(); - }, -}; -exports.stdout = { - rid: 1, - write: chain((p) => { - return new Promise((resolve) => { - const result = process.stdout.write(p); - if (!result) { - process.stdout.once("drain", () => resolve(p.length)); - } - else { - resolve(p.length); - } - }); - }), - get writable() { - throw new Error("Not implemented."); - }, - writeSync() { - // Node.js doesn't support writeSync for stdout - throw new Error("Not implemented"); - }, - close() { - process.stdout.destroy(); - }, -}; -exports.stderr = { - rid: 2, - write: chain((p) => { - return new Promise((resolve) => { - const result = process.stderr.write(p); - if (!result) { - process.stderr.once("drain", () => resolve(p.length)); - } - else { - resolve(p.length); - } - }); - }), - get writable() { - throw new Error("Not implemented."); - }, - writeSync() { - // Node.js doesn't support writeSync for stderr - throw new Error("Not implemented"); - }, - close() { - process.stderr.destroy(); - }, -}; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/version.js b/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/version.js deleted file mode 100644 index ec2d60ef..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/variables/version.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -/// -Object.defineProperty(exports, "__esModule", { value: true }); -exports.version = void 0; -const version_js_1 = require("../../internal/version.js"); -exports.version = { - deno: version_js_1.deno, - typescript: version_js_1.typescript, - v8: process.versions.v8, -}; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/unstable/main.js b/action/node_modules/@deno/shim-deno/dist/deno/unstable/main.js deleted file mode 100644 index 2efdb474..00000000 --- a/action/node_modules/@deno/shim-deno/dist/deno/unstable/main.js +++ /dev/null @@ -1,62 +0,0 @@ -"use strict"; -/// -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.utimeSync = exports.utime = exports.futimeSync = exports.futime = void 0; -const fs_1 = __importDefault(require("fs")); -const errorMap_js_1 = __importDefault(require("../internal/errorMap.js")); -const variables_js_1 = require("../stable/variables.js"); -const futime = async function (rid, atime, mtime) { - try { - await new Promise((resolve, reject) => { - // doesn't exist in fs.promises - fs_1.default.futimes(rid, atime, mtime, (err) => { - if (err) { - reject(err); - } - else { - resolve(); - } - }); - }); - } - catch (error) { - throw (0, errorMap_js_1.default)(error); - } -}; -exports.futime = futime; -const futimeSync = function (rid, atime, mtime) { - try { - fs_1.default.futimesSync(rid, atime, mtime); - } - catch (error) { - throw (0, errorMap_js_1.default)(error); - } -}; -exports.futimeSync = futimeSync; -const utime = async function (path, atime, mtime) { - try { - await fs_1.default.promises.utimes(path, atime, mtime); - } - catch (error) { - if ((error === null || error === void 0 ? void 0 : error.code) === "ENOENT") { - throw new variables_js_1.errors.NotFound(`No such file or directory (os error 2), utime '${path}'`); - } - throw (0, errorMap_js_1.default)(error); - } -}; -exports.utime = utime; -const utimeSync = function (path, atime, mtime) { - try { - fs_1.default.utimesSync(path, atime, mtime); - } - catch (error) { - if ((error === null || error === void 0 ? void 0 : error.code) === "ENOENT") { - throw new variables_js_1.errors.NotFound(`No such file or directory (os error 2), utime '${path}'`); - } - throw (0, errorMap_js_1.default)(error); - } -}; -exports.utimeSync = utimeSync; diff --git a/action/node_modules/@deno/shim-deno/dist/index.cjs b/action/node_modules/@deno/shim-deno/dist/index.cjs new file mode 100644 index 00000000..3bb5e966 --- /dev/null +++ b/action/node_modules/@deno/shim-deno/dist/index.cjs @@ -0,0 +1,4827 @@ +"use strict"; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; + +// dist/script/deno/stable/variables/errors.js +var require_errors = __commonJS({ + "dist/script/deno/stable/variables/errors.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.WriteZero = exports2.UnexpectedEof = exports2.TimedOut = exports2.PermissionDenied = exports2.NotFound = exports2.NotConnected = exports2.InvalidData = exports2.Interrupted = exports2.Http = exports2.ConnectionReset = exports2.ConnectionRefused = exports2.ConnectionAborted = exports2.Busy = exports2.BrokenPipe = exports2.BadResource = exports2.AlreadyExists = exports2.AddrNotAvailable = exports2.AddrInUse = void 0; + var AddrInUse = class extends Error { + }; + exports2.AddrInUse = AddrInUse; + var AddrNotAvailable = class extends Error { + }; + exports2.AddrNotAvailable = AddrNotAvailable; + var AlreadyExists = class extends Error { + }; + exports2.AlreadyExists = AlreadyExists; + var BadResource = class extends Error { + }; + exports2.BadResource = BadResource; + var BrokenPipe = class extends Error { + }; + exports2.BrokenPipe = BrokenPipe; + var Busy = class extends Error { + }; + exports2.Busy = Busy; + var ConnectionAborted = class extends Error { + }; + exports2.ConnectionAborted = ConnectionAborted; + var ConnectionRefused = class extends Error { + }; + exports2.ConnectionRefused = ConnectionRefused; + var ConnectionReset = class extends Error { + }; + exports2.ConnectionReset = ConnectionReset; + var Http = class extends Error { + }; + exports2.Http = Http; + var Interrupted = class extends Error { + }; + exports2.Interrupted = Interrupted; + var InvalidData = class extends Error { + }; + exports2.InvalidData = InvalidData; + var NotConnected = class extends Error { + }; + exports2.NotConnected = NotConnected; + var NotFound = class extends Error { + code = "ENOENT"; + }; + exports2.NotFound = NotFound; + var PermissionDenied = class extends Error { + }; + exports2.PermissionDenied = PermissionDenied; + var TimedOut = class extends Error { + }; + exports2.TimedOut = TimedOut; + var UnexpectedEof = class extends Error { + }; + exports2.UnexpectedEof = UnexpectedEof; + var WriteZero = class extends Error { + }; + exports2.WriteZero = WriteZero; + } +}); + +// dist/script/deno/internal/errorMap.js +var require_errorMap = __commonJS({ + "dist/script/deno/internal/errorMap.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var errors = __importStar2(require_errors()); + var mapper = (Ctor) => (err) => Object.assign(new Ctor(err.message), { + stack: err.stack + }); + var map = { + EEXIST: mapper(errors.AlreadyExists), + ENOENT: mapper(errors.NotFound), + EBADF: mapper(errors.BadResource) + }; + var isNodeErr = (e) => { + return e instanceof Error && "code" in e; + }; + function mapError(e) { + if (!isNodeErr(e)) + return e; + return map[e.code]?.(e) || e; + } + exports2.default = mapError; + } +}); + +// dist/script/deno/stable/functions/stat.js +var require_stat = __commonJS({ + "dist/script/deno/stable/functions/stat.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.stat = exports2.denoifyFileInfo = void 0; + var promises_1 = require("fs/promises"); + var os = __importStar2(require("os")); + var errorMap_js_1 = __importDefault(require_errorMap()); + var isWindows = os.platform() === "win32"; + function denoifyFileInfo(s) { + return { + atime: s.atime, + birthtime: s.birthtime, + blksize: isWindows ? null : s.blksize, + blocks: isWindows ? null : s.blocks, + dev: s.dev, + gid: isWindows ? null : s.gid, + ino: isWindows ? null : s.ino, + isDirectory: s.isDirectory(), + isFile: s.isFile(), + isSymlink: s.isSymbolicLink(), + isBlockDevice: isWindows ? null : s.isBlockDevice(), + isCharDevice: isWindows ? null : s.isCharacterDevice(), + isFifo: isWindows ? null : s.isFIFO(), + isSocket: isWindows ? null : s.isSocket(), + mode: isWindows ? null : s.mode, + mtime: s.mtime, + nlink: isWindows ? null : s.nlink, + rdev: isWindows ? null : s.rdev, + size: s.size, + uid: isWindows ? null : s.uid + }; + } + exports2.denoifyFileInfo = denoifyFileInfo; + var stat = async (path) => { + try { + return denoifyFileInfo(await (0, promises_1.stat)(path)); + } catch (e) { + throw (0, errorMap_js_1.default)(e); + } + }; + exports2.stat = stat; + } +}); + +// dist/script/deno/stable/functions/fstat.js +var require_fstat = __commonJS({ + "dist/script/deno/stable/functions/fstat.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fstat = void 0; + var fs = __importStar2(require("fs")); + var util_1 = require("util"); + var stat_js_1 = require_stat(); + var errorMap_js_1 = __importDefault(require_errorMap()); + var nodeFstat = (0, util_1.promisify)(fs.fstat); + var fstat = async function(fd) { + try { + return (0, stat_js_1.denoifyFileInfo)(await nodeFstat(fd)); + } catch (err) { + throw (0, errorMap_js_1.default)(err); + } + }; + exports2.fstat = fstat; + } +}); + +// dist/script/deno/stable/functions/fstatSync.js +var require_fstatSync = __commonJS({ + "dist/script/deno/stable/functions/fstatSync.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fstatSync = void 0; + var fs_1 = require("fs"); + var stat_js_1 = require_stat(); + var errorMap_js_1 = __importDefault(require_errorMap()); + var fstatSync = function fstatSync2(fd) { + try { + return (0, stat_js_1.denoifyFileInfo)((0, fs_1.fstatSync)(fd)); + } catch (err) { + throw (0, errorMap_js_1.default)(err); + } + }; + exports2.fstatSync = fstatSync; + } +}); + +// dist/script/deno/stable/functions/ftruncate.js +var require_ftruncate = __commonJS({ + "dist/script/deno/stable/functions/ftruncate.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ftruncate = void 0; + var fs_1 = require("fs"); + var util_1 = require("util"); + var _ftruncate = (0, util_1.promisify)(fs_1.ftruncate); + exports2.ftruncate = _ftruncate; + } +}); + +// dist/script/deno/stable/functions/ftruncateSync.js +var require_ftruncateSync = __commonJS({ + "dist/script/deno/stable/functions/ftruncateSync.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ftruncateSync = void 0; + var fs_1 = require("fs"); + exports2.ftruncateSync = fs_1.ftruncateSync; + } +}); + +// dist/script/deno/stable/functions/fdatasync.js +var require_fdatasync = __commonJS({ + "dist/script/deno/stable/functions/fdatasync.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fdatasync = void 0; + var fs_1 = require("fs"); + var util_1 = require("util"); + var _fdatasync = (0, util_1.promisify)(fs_1.fdatasync); + exports2.fdatasync = _fdatasync; + } +}); + +// dist/script/deno/stable/functions/fdatasyncSync.js +var require_fdatasyncSync = __commonJS({ + "dist/script/deno/stable/functions/fdatasyncSync.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fdatasyncSync = void 0; + var fs_1 = require("fs"); + exports2.fdatasyncSync = fs_1.fdatasyncSync; + } +}); + +// dist/script/deno/stable/functions/read.js +var require_read = __commonJS({ + "dist/script/deno/stable/functions/read.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.read = void 0; + var util_1 = require("util"); + var fs_1 = require("fs"); + var _read = (0, util_1.promisify)(fs_1.read); + var read = async function read2(rid, buffer) { + if (buffer == null) { + throw new TypeError("Buffer must not be null."); + } + if (buffer.length === 0) { + return 0; + } + const { bytesRead } = await _read(rid, buffer, 0, buffer.length, null); + return bytesRead === 0 ? null : bytesRead; + }; + exports2.read = read; + } +}); + +// dist/script/deno/stable/functions/readSync.js +var require_readSync = __commonJS({ + "dist/script/deno/stable/functions/readSync.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readSync = void 0; + var fs = __importStar2(require("fs")); + var readSync = (fd, buffer) => { + const bytesRead = fs.readSync(fd, buffer); + return bytesRead === 0 ? null : bytesRead; + }; + exports2.readSync = readSync; + } +}); + +// dist/script/deno/stable/functions/write.js +var require_write = __commonJS({ + "dist/script/deno/stable/functions/write.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.write = void 0; + var fs = __importStar2(require("fs")); + var util_1 = require("util"); + var nodeWrite = (0, util_1.promisify)(fs.write); + var write = async (fd, data) => { + const { bytesWritten } = await nodeWrite(fd, data); + return bytesWritten; + }; + exports2.write = write; + } +}); + +// dist/script/deno/stable/functions/writeSync.js +var require_writeSync = __commonJS({ + "dist/script/deno/stable/functions/writeSync.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.writeSync = void 0; + var fs = __importStar2(require("fs")); + exports2.writeSync = fs.writeSync; + } +}); + +// dist/script/deno/stable/classes/FsFile.js +var require_FsFile = __commonJS({ + "dist/script/deno/stable/classes/FsFile.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.File = exports2.FsFile = void 0; + var fs = __importStar2(require("fs")); + var stream = __importStar2(require("stream")); + var fstat_js_1 = require_fstat(); + var fstatSync_js_1 = require_fstatSync(); + var ftruncate_js_1 = require_ftruncate(); + var ftruncateSync_js_1 = require_ftruncateSync(); + var fdatasync_js_1 = require_fdatasync(); + var fdatasyncSync_js_1 = require_fdatasyncSync(); + var read_js_1 = require_read(); + var readSync_js_1 = require_readSync(); + var write_js_1 = require_write(); + var writeSync_js_1 = require_writeSync(); + Symbol.dispose ??= Symbol("Symbol.dispose"); + Symbol.asyncDispose ??= Symbol("Symbol.asyncDispose"); + var FsFile = class { + rid; + #closed = false; + constructor(rid) { + this.rid = rid; + } + [Symbol.dispose]() { + if (!this.#closed) { + this.close(); + } + } + async write(p) { + return await (0, write_js_1.write)(this.rid, p); + } + writeSync(p) { + return (0, writeSync_js_1.writeSync)(this.rid, p); + } + async truncate(len) { + await (0, ftruncate_js_1.ftruncate)(this.rid, len); + } + truncateSync(len) { + return (0, ftruncateSync_js_1.ftruncateSync)(this.rid, len); + } + read(p) { + return (0, read_js_1.read)(this.rid, p); + } + readSync(p) { + return (0, readSync_js_1.readSync)(this.rid, p); + } + seek(_offset, _whence) { + throw new Error("Method not implemented."); + } + seekSync(_offset, _whence) { + throw new Error("Method not implemented."); + } + async stat() { + return await (0, fstat_js_1.fstat)(this.rid); + } + statSync() { + return (0, fstatSync_js_1.fstatSync)(this.rid); + } + sync() { + throw new Error("Method not implemented."); + } + syncSync() { + throw new Error("Method not implemented."); + } + syncData() { + return (0, fdatasync_js_1.fdatasync)(this.rid); + } + syncDataSync() { + return (0, fdatasyncSync_js_1.fdatasyncSync)(this.rid); + } + utime(_atime, _mtime) { + throw new Error("Method not implemented."); + } + utimeSync(_atime, _mtime) { + throw new Error("Method not implemented."); + } + close() { + this.#closed = true; + fs.closeSync(this.rid); + } + #readableStream; + get readable() { + if (this.#readableStream == null) { + const nodeStream = fs.createReadStream(null, { + fd: this.rid, + autoClose: false + }); + this.#readableStream = stream.Readable.toWeb(nodeStream); + } + return this.#readableStream; + } + #writableStream; + get writable() { + if (this.#writableStream == null) { + const nodeStream = fs.createWriteStream(null, { + fd: this.rid, + autoClose: false + }); + this.#writableStream = stream.Writable.toWeb(nodeStream); + } + return this.#writableStream; + } + }; + exports2.FsFile = FsFile; + var File = FsFile; + exports2.File = File; + } +}); + +// dist/script/deno/stable/classes/PermissionStatus.js +var require_PermissionStatus = __commonJS({ + "dist/script/deno/stable/classes/PermissionStatus.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PermissionStatus = void 0; + var PermissionStatus = class extends EventTarget { + state; + onchange = null; + partial = false; + /** @internal */ + constructor(state) { + super(); + this.state = state; + } + }; + exports2.PermissionStatus = PermissionStatus; + } +}); + +// dist/script/deno/stable/classes/Permissions.js +var require_Permissions = __commonJS({ + "dist/script/deno/stable/classes/Permissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Permissions = void 0; + var PermissionStatus_js_1 = require_PermissionStatus(); + var Permissions = class { + query(desc) { + return Promise.resolve(this.querySync(desc)); + } + querySync(_desc) { + return new PermissionStatus_js_1.PermissionStatus("granted"); + } + revoke(desc) { + return Promise.resolve(this.revokeSync(desc)); + } + revokeSync(_desc) { + return new PermissionStatus_js_1.PermissionStatus("denied"); + } + request(desc) { + return this.query(desc); + } + requestSync(desc) { + return this.querySync(desc); + } + }; + exports2.Permissions = Permissions; + } +}); + +// dist/script/deno/stable/classes.js +var require_classes = __commonJS({ + "dist/script/deno/stable/classes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PermissionStatus = exports2.Permissions = exports2.FsFile = exports2.File = void 0; + var FsFile_js_1 = require_FsFile(); + Object.defineProperty(exports2, "File", { enumerable: true, get: function() { + return FsFile_js_1.File; + } }); + Object.defineProperty(exports2, "FsFile", { enumerable: true, get: function() { + return FsFile_js_1.FsFile; + } }); + var Permissions_js_1 = require_Permissions(); + Object.defineProperty(exports2, "Permissions", { enumerable: true, get: function() { + return Permissions_js_1.Permissions; + } }); + var PermissionStatus_js_1 = require_PermissionStatus(); + Object.defineProperty(exports2, "PermissionStatus", { enumerable: true, get: function() { + return PermissionStatus_js_1.PermissionStatus; + } }); + } +}); + +// dist/script/deno/stable/enums/SeekMode.js +var require_SeekMode = __commonJS({ + "dist/script/deno/stable/enums/SeekMode.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SeekMode = void 0; + var SeekMode; + (function(SeekMode2) { + SeekMode2[SeekMode2["Start"] = 0] = "Start"; + SeekMode2[SeekMode2["Current"] = 1] = "Current"; + SeekMode2[SeekMode2["End"] = 2] = "End"; + })(SeekMode || (exports2.SeekMode = SeekMode = {})); + } +}); + +// dist/script/deno/stable/enums.js +var require_enums = __commonJS({ + "dist/script/deno/stable/enums.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SeekMode = void 0; + var SeekMode_js_1 = require_SeekMode(); + Object.defineProperty(exports2, "SeekMode", { enumerable: true, get: function() { + return SeekMode_js_1.SeekMode; + } }); + } +}); + +// dist/script/deno/stable/variables/build.js +var require_build = __commonJS({ + "dist/script/deno/stable/variables/build.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.build = void 0; + var os = __importStar2(require("os")); + var arch = process.arch === "arm64" ? "aarch64" : "x86_64"; + exports2.build = { + arch, + os: /* @__PURE__ */ ((p) => p === "win32" ? "windows" : p === "darwin" ? "darwin" : "linux")(os.platform()), + vendor: "pc", + target: ((p) => p === "win32" ? `${arch}-pc-windows-msvc` : p === "darwin" ? `${arch}-apple-darwin` : `${arch}-unknown-linux-gnu`)(os.platform()) + }; + } +}); + +// dist/script/deno/stable/variables/customInspect.js +var require_customInspect = __commonJS({ + "dist/script/deno/stable/variables/customInspect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.customInspect = void 0; + exports2.customInspect = Symbol.for("nodejs.util.inspect.custom"); + } +}); + +// dist/script/deno/stable/variables/env.js +var require_env = __commonJS({ + "dist/script/deno/stable/variables/env.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.env = void 0; + exports2.env = { + get(key) { + assertValidKey(key); + return process.env[key]; + }, + set(key, value) { + assertValidKey(key); + assertValidValue(value); + process.env[key] = value; + }, + has(key) { + assertValidKey(key); + return key in process.env; + }, + delete(key) { + assertValidKey(key); + delete process.env[key]; + }, + // @ts-expect-error https://github.com/denoland/deno/issues/10267 + toObject() { + return { ...process.env }; + } + }; + var invalidKeyChars = ["=", "\0"].map((c) => c.charCodeAt(0)); + var invalidValueChar = "\0".charCodeAt(0); + function assertValidKey(key) { + if (key.length === 0) { + throw new TypeError("Key is an empty string."); + } + for (let i = 0; i < key.length; i++) { + if (invalidKeyChars.includes(key.charCodeAt(i))) { + const char = key.charCodeAt(i) === "\0".charCodeAt(0) ? "\\0" : key[i]; + throw new TypeError(`Key contains invalid characters: "${char}"`); + } + } + } + function assertValidValue(value) { + for (let i = 0; i < value.length; i++) { + if (value.charCodeAt(i) === invalidValueChar) { + throw new TypeError('Value contains invalid characters: "\\0"'); + } + } + } + } +}); + +// dist/script/deno/stable/variables/mainModule.js +var require_mainModule = __commonJS({ + "dist/script/deno/stable/variables/mainModule.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mainModule = void 0; + var path_1 = require("path"); + var url_1 = require("url"); + exports2.mainModule = (0, url_1.pathToFileURL)(process.argv[1] ?? (0, path_1.join)(process.cwd(), "$deno$repl.ts")).href; + } +}); + +// dist/script/deno/stable/variables/metrics.js +var require_metrics = __commonJS({ + "dist/script/deno/stable/variables/metrics.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.metrics = void 0; + var metrics = function metrics2() { + return { + opsDispatched: 0, + opsDispatchedSync: 0, + opsDispatchedAsync: 0, + opsDispatchedAsyncUnref: 0, + opsCompleted: 0, + opsCompletedSync: 0, + opsCompletedAsync: 0, + opsCompletedAsyncUnref: 0, + bytesSentControl: 0, + bytesSentData: 0, + bytesReceived: 0, + ops: {} + }; + }; + exports2.metrics = metrics; + } +}); + +// dist/script/deno/stable/variables/noColor.js +var require_noColor = __commonJS({ + "dist/script/deno/stable/variables/noColor.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.noColor = void 0; + exports2.noColor = process.env.NO_COLOR !== void 0; + } +}); + +// dist/script/deno/stable/variables/permissions.js +var require_permissions = __commonJS({ + "dist/script/deno/stable/variables/permissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.permissions = void 0; + var Permissions_js_1 = require_Permissions(); + exports2.permissions = new Permissions_js_1.Permissions(); + } +}); + +// dist/script/deno/stable/variables/pid.js +var require_pid = __commonJS({ + "dist/script/deno/stable/variables/pid.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pid = void 0; + exports2.pid = process.pid; + } +}); + +// dist/script/deno/stable/variables/ppid.js +var require_ppid = __commonJS({ + "dist/script/deno/stable/variables/ppid.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ppid = void 0; + exports2.ppid = process.ppid; + } +}); + +// dist/script/deno/stable/variables/resources.js +var require_resources = __commonJS({ + "dist/script/deno/stable/variables/resources.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.resources = void 0; + var resources = function resources2() { + console.warn([ + "Deno.resources() shim returns a dummy object that does not update.", + "If you think this is a mistake, raise an issue at https://github.com/denoland/node_deno_shims/issues" + ].join("\n")); + return {}; + }; + exports2.resources = resources; + } +}); + +// dist/script/deno/stable/variables/std.js +var require_std = __commonJS({ + "dist/script/deno/stable/variables/std.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.stderr = exports2.stdout = exports2.stdin = void 0; + var stream_1 = __importDefault(require("stream")); + var tty_1 = __importDefault(require("tty")); + var readSync_js_1 = require_readSync(); + var writeSync_js_1 = require_writeSync(); + function chain(fn, cleanup) { + let prev; + return function _fn(...args) { + const curr = (prev || Promise.resolve()).then(() => fn(...args)).finally(cleanup || (() => { + })).then((result) => { + if (prev === curr) + prev = void 0; + return result; + }); + return prev = curr; + }; + } + var stdinReadable; + exports2.stdin = { + rid: 0, + isTerminal() { + return tty_1.default.isatty(this.rid); + }, + read: chain((p) => { + return new Promise((resolve, reject) => { + process.stdin.resume(); + process.stdin.on("error", onerror); + process.stdin.once("readable", () => { + process.stdin.off("error", onerror); + const data = process.stdin.read(p.length) ?? process.stdin.read(); + if (data) { + p.set(data); + resolve(data.length > 0 ? data.length : null); + } else { + resolve(null); + } + }); + function onerror(error) { + reject(error); + process.stdin.off("error", onerror); + } + }); + }, () => process.stdin.pause()), + get readable() { + if (stdinReadable == null) { + stdinReadable = stream_1.default.Readable.toWeb(process.stdin); + } + return stdinReadable; + }, + readSync(buffer) { + return (0, readSync_js_1.readSync)(this.rid, buffer); + }, + close() { + process.stdin.destroy(); + }, + setRaw(mode, options) { + if (options?.cbreak) { + throw new Error("The cbreak option is not implemented."); + } + process.stdin.setRawMode(mode); + } + }; + var stdoutWritable; + exports2.stdout = { + rid: 1, + isTerminal() { + return tty_1.default.isatty(this.rid); + }, + write: chain((p) => { + return new Promise((resolve) => { + const result = process.stdout.write(p); + if (!result) { + process.stdout.once("drain", () => resolve(p.length)); + } else { + resolve(p.length); + } + }); + }), + get writable() { + if (stdoutWritable == null) { + stdoutWritable = stream_1.default.Writable.toWeb(process.stdout); + } + return stdoutWritable; + }, + writeSync(data) { + return (0, writeSync_js_1.writeSync)(this.rid, data); + }, + close() { + process.stdout.destroy(); + } + }; + var stderrWritable; + exports2.stderr = { + rid: 2, + isTerminal() { + return tty_1.default.isatty(this.rid); + }, + write: chain((p) => { + return new Promise((resolve) => { + const result = process.stderr.write(p); + if (!result) { + process.stderr.once("drain", () => resolve(p.length)); + } else { + resolve(p.length); + } + }); + }), + get writable() { + if (stderrWritable == null) { + stderrWritable = stream_1.default.Writable.toWeb(process.stderr); + } + return stderrWritable; + }, + writeSync(data) { + return (0, writeSync_js_1.writeSync)(this.rid, data); + }, + close() { + process.stderr.destroy(); + } + }; + } +}); + +// dist/script/deno/internal/version.js +var require_version = __commonJS({ + "dist/script/deno/internal/version.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.typescript = exports2.deno = void 0; + exports2.deno = "1.40.2"; + exports2.typescript = "5.3.3"; + } +}); + +// dist/script/deno/stable/variables/version.js +var require_version2 = __commonJS({ + "dist/script/deno/stable/variables/version.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.version = void 0; + var version_js_1 = require_version(); + exports2.version = { + deno: version_js_1.deno, + typescript: version_js_1.typescript, + v8: process.versions.v8 + }; + } +}); + +// dist/script/deno/stable/variables.js +var require_variables = __commonJS({ + "dist/script/deno/stable/variables.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.version = exports2.resources = exports2.ppid = exports2.pid = exports2.permissions = exports2.noColor = exports2.metrics = exports2.mainModule = exports2.errors = exports2.env = exports2.customInspect = exports2.build = void 0; + var build_js_1 = require_build(); + Object.defineProperty(exports2, "build", { enumerable: true, get: function() { + return build_js_1.build; + } }); + var customInspect_js_1 = require_customInspect(); + Object.defineProperty(exports2, "customInspect", { enumerable: true, get: function() { + return customInspect_js_1.customInspect; + } }); + var env_js_1 = require_env(); + Object.defineProperty(exports2, "env", { enumerable: true, get: function() { + return env_js_1.env; + } }); + exports2.errors = __importStar2(require_errors()); + var mainModule_js_1 = require_mainModule(); + Object.defineProperty(exports2, "mainModule", { enumerable: true, get: function() { + return mainModule_js_1.mainModule; + } }); + var metrics_js_1 = require_metrics(); + Object.defineProperty(exports2, "metrics", { enumerable: true, get: function() { + return metrics_js_1.metrics; + } }); + var noColor_js_1 = require_noColor(); + Object.defineProperty(exports2, "noColor", { enumerable: true, get: function() { + return noColor_js_1.noColor; + } }); + var permissions_js_1 = require_permissions(); + Object.defineProperty(exports2, "permissions", { enumerable: true, get: function() { + return permissions_js_1.permissions; + } }); + var pid_js_1 = require_pid(); + Object.defineProperty(exports2, "pid", { enumerable: true, get: function() { + return pid_js_1.pid; + } }); + var ppid_js_1 = require_ppid(); + Object.defineProperty(exports2, "ppid", { enumerable: true, get: function() { + return ppid_js_1.ppid; + } }); + var resources_js_1 = require_resources(); + Object.defineProperty(exports2, "resources", { enumerable: true, get: function() { + return resources_js_1.resources; + } }); + __exportStar(require_std(), exports2); + var version_js_1 = require_version2(); + Object.defineProperty(exports2, "version", { enumerable: true, get: function() { + return version_js_1.version; + } }); + } +}); + +// dist/script/deno/stable/functions/addSignalListener.js +var require_addSignalListener = __commonJS({ + "dist/script/deno/stable/functions/addSignalListener.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.addSignalListener = void 0; + var process_1 = __importDefault(require("process")); + function denoSignalToNodeJs(signal) { + if (signal === "SIGEMT") { + throw new Error("SIGEMT is not supported"); + } + return signal; + } + var addSignalListener = (signal, handler) => { + process_1.default.addListener(denoSignalToNodeJs(signal), handler); + }; + exports2.addSignalListener = addSignalListener; + } +}); + +// dist/script/deno/stable/functions/chdir.js +var require_chdir = __commonJS({ + "dist/script/deno/stable/functions/chdir.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.chdir = void 0; + var url_1 = require("url"); + var errorMap_js_1 = __importDefault(require_errorMap()); + var variables_js_1 = require_variables(); + var chdir = function(path) { + try { + return process.chdir(path instanceof URL ? (0, url_1.fileURLToPath)(path) : path); + } catch (error) { + if (error?.code === "ENOENT") { + throw new variables_js_1.errors.NotFound(`No such file or directory (os error 2), chdir '${path}'`); + } + throw (0, errorMap_js_1.default)(error); + } + }; + exports2.chdir = chdir; + } +}); + +// dist/script/deno/stable/functions/chmod.js +var require_chmod = __commonJS({ + "dist/script/deno/stable/functions/chmod.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.chmod = void 0; + var fs = __importStar2(require("fs/promises")); + exports2.chmod = fs.chmod; + } +}); + +// dist/script/deno/stable/functions/chmodSync.js +var require_chmodSync = __commonJS({ + "dist/script/deno/stable/functions/chmodSync.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.chmodSync = void 0; + var fs = __importStar2(require("fs")); + exports2.chmodSync = fs.chmodSync; + } +}); + +// dist/script/deno/stable/functions/chown.js +var require_chown = __commonJS({ + "dist/script/deno/stable/functions/chown.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.chown = void 0; + var fs = __importStar2(require("fs/promises")); + var chown = async (path, uid, gid) => await fs.chown(path, uid ?? -1, gid ?? -1); + exports2.chown = chown; + } +}); + +// dist/script/deno/stable/functions/chownSync.js +var require_chownSync = __commonJS({ + "dist/script/deno/stable/functions/chownSync.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.chownSync = void 0; + var fs = __importStar2(require("fs")); + var chownSync = (path, uid, gid) => fs.chownSync(path, uid ?? -1, gid ?? -1); + exports2.chownSync = chownSync; + } +}); + +// dist/script/deno/stable/functions/close.js +var require_close = __commonJS({ + "dist/script/deno/stable/functions/close.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.close = void 0; + var fs = __importStar2(require("fs")); + exports2.close = fs.closeSync; + } +}); + +// dist/script/deno/internal/Conn.js +var require_Conn = __commonJS({ + "dist/script/deno/internal/Conn.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.TlsConn = exports2.Conn = void 0; + var net_1 = require("net"); + var events_1 = require("events"); + var FsFile_js_1 = require_FsFile(); + var Conn = class extends FsFile_js_1.FsFile { + rid; + localAddr; + remoteAddr; + #socket; + constructor(rid, localAddr, remoteAddr, socket) { + super(rid); + this.rid = rid; + this.localAddr = localAddr; + this.remoteAddr = remoteAddr; + this.#socket = socket || new net_1.Socket({ fd: rid }); + } + [Symbol.dispose]() { + this.close(); + } + async closeWrite() { + await new Promise((resolve) => this.#socket.end(resolve)); + } + setNoDelay(enable) { + this.#socket.setNoDelay(enable); + } + setKeepAlive(enable) { + this.#socket.setKeepAlive(enable); + } + ref() { + this.#socket.ref(); + } + unref() { + this.#socket.unref(); + } + async read(p) { + try { + return await super.read(p); + } catch (error) { + if (!(error instanceof Error && "code" in error && error.code == "EAGAIN")) { + throw error; + } + } + await (0, events_1.once)(this.#socket, "readable"); + return await super.read(p); + } + }; + exports2.Conn = Conn; + var TlsConn = class extends Conn { + handshake() { + console.warn("@deno/shim-deno: Handshake is not supported."); + return Promise.resolve({ + alpnProtocol: null + }); + } + }; + exports2.TlsConn = TlsConn; + } +}); + +// dist/script/deno/stable/functions/connect.js +var require_connect = __commonJS({ + "dist/script/deno/stable/functions/connect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.connect = void 0; + var net_1 = require("net"); + var Conn_js_1 = require_Conn(); + var connect = function connect2(options) { + if (options.transport === "unix") { + throw new Error("Unstable UnixConnectOptions is not implemented"); + } + const { transport = "tcp", hostname = "127.0.0.1", port } = options; + if (transport !== "tcp") { + throw new Error("Deno.connect is only implemented for transport: tcp"); + } + const socket = (0, net_1.createConnection)({ port, host: hostname }); + socket.on("error", (err) => console.error(err)); + return new Promise((resolve) => { + socket.once("connect", () => { + const rid = socket._handle.fd; + const localAddr = { + // cannot be undefined while socket is connected + hostname: socket.localAddress, + port: socket.localPort, + transport: "tcp" + }; + const remoteAddr = { + // cannot be undefined while socket is connected + hostname: socket.remoteAddress, + port: socket.remotePort, + transport: "tcp" + }; + resolve(new Conn_js_1.Conn(rid, localAddr, remoteAddr, socket)); + }); + }); + }; + exports2.connect = connect; + } +}); + +// dist/script/deno/stable/functions/readTextFile.js +var require_readTextFile = __commonJS({ + "dist/script/deno/stable/functions/readTextFile.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readTextFile = void 0; + var promises_1 = require("fs/promises"); + var errorMap_js_1 = __importDefault(require_errorMap()); + var readTextFile = async (path, { signal } = {}) => { + try { + return await (0, promises_1.readFile)(path, { encoding: "utf8", signal }); + } catch (e) { + throw (0, errorMap_js_1.default)(e); + } + }; + exports2.readTextFile = readTextFile; + } +}); + +// dist/script/deno/stable/functions/connectTls.js +var require_connectTls = __commonJS({ + "dist/script/deno/stable/functions/connectTls.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.connectTls = void 0; + var tls_1 = require("tls"); + var Conn_js_1 = require_Conn(); + var readTextFile_js_1 = require_readTextFile(); + var connectTls = async function connectTls2({ port, hostname = "127.0.0.1", certFile }) { + const cert = certFile && await (0, readTextFile_js_1.readTextFile)(certFile); + const socket = (0, tls_1.connect)({ port, host: hostname, cert }); + return new Promise((resolve) => { + socket.on("connect", () => { + const rid = socket._handle.fd; + const localAddr = { + // cannot be undefined while socket is connected + hostname: socket.localAddress, + port: socket.localPort, + transport: "tcp" + }; + const remoteAddr = { + // cannot be undefined while socket is connected + hostname: socket.remoteAddress, + port: socket.remotePort, + transport: "tcp" + }; + resolve(new Conn_js_1.TlsConn(rid, localAddr, remoteAddr, socket)); + }); + }); + }; + exports2.connectTls = connectTls; + } +}); + +// dist/script/deno/stable/functions/consoleSize.js +var require_consoleSize = __commonJS({ + "dist/script/deno/stable/functions/consoleSize.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.consoleSize = void 0; + var consoleSize = function consoleSize2() { + const pipes = [process.stderr, process.stdout]; + for (const pipe of pipes) { + if (pipe.columns != null) { + const { columns, rows } = pipe; + return { columns, rows }; + } + } + throw new Error("The handle is invalid."); + }; + exports2.consoleSize = consoleSize; + } +}); + +// dist/script/deno/internal/consts.js +var require_consts = __commonJS({ + "dist/script/deno/internal/consts.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_BUFFER_SIZE = void 0; + exports2.DEFAULT_BUFFER_SIZE = 32 * 1024; + } +}); + +// dist/script/deno/stable/functions/copy.js +var require_copy = __commonJS({ + "dist/script/deno/stable/functions/copy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.copy = void 0; + var consts_js_1 = require_consts(); + var copy = async function copy2(src, dst, options) { + let n = 0; + const bufSize = options?.bufSize ?? consts_js_1.DEFAULT_BUFFER_SIZE; + const b = new Uint8Array(bufSize); + let gotEOF = false; + while (gotEOF === false) { + const result = await src.read(b); + if (result === null) { + gotEOF = true; + } else { + let nwritten = 0; + while (nwritten < result) { + nwritten += await dst.write(b.subarray(nwritten, result)); + } + n += nwritten; + } + } + return n; + }; + exports2.copy = copy; + } +}); + +// dist/script/deno/stable/functions/copyFile.js +var require_copyFile = __commonJS({ + "dist/script/deno/stable/functions/copyFile.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.copyFile = void 0; + var fs = __importStar2(require("fs/promises")); + var errorMap_js_1 = __importDefault(require_errorMap()); + var errors = __importStar2(require_errors()); + var copyFile = async (src, dest) => { + try { + await fs.copyFile(src, dest); + } catch (error) { + if (error?.code === "ENOENT") { + throw new errors.NotFound(`File not found, copy '${src}' -> '${dest}'`); + } + throw (0, errorMap_js_1.default)(error); + } + }; + exports2.copyFile = copyFile; + } +}); + +// dist/script/deno/stable/functions/copyFileSync.js +var require_copyFileSync = __commonJS({ + "dist/script/deno/stable/functions/copyFileSync.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.copyFileSync = void 0; + var fs = __importStar2(require("fs")); + var errorMap_js_1 = __importDefault(require_errorMap()); + var errors = __importStar2(require_errors()); + var copyFileSync = (src, dest) => { + try { + fs.copyFileSync(src, dest); + } catch (error) { + if (error?.code === "ENOENT") { + throw new errors.NotFound(`File not found, copy '${src}' -> '${dest}'`); + } + throw (0, errorMap_js_1.default)(error); + } + }; + exports2.copyFileSync = copyFileSync; + } +}); + +// dist/script/deno/internal/fs_flags.js +var require_fs_flags = __commonJS({ + "dist/script/deno/internal/fs_flags.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getFsFlag = exports2.getCreationFlag = exports2.getAccessFlag = void 0; + var errors = __importStar2(require_errors()); + var fs_1 = require("fs"); + var os_1 = __importDefault(require("os")); + var { O_APPEND, O_CREAT, O_EXCL, O_RDONLY, O_RDWR, O_TRUNC, O_WRONLY } = fs_1.constants; + function getAccessFlag(opts) { + if (opts.read && !opts.write && !opts.append) + return O_RDONLY; + if (!opts.read && opts.write && !opts.append) + return O_WRONLY; + if (opts.read && opts.write && !opts.append) + return O_RDWR; + if (!opts.read && opts.append) + return O_WRONLY | O_APPEND; + if (opts.read && opts.append) + return O_RDWR | O_APPEND; + if (!opts.read && !opts.write && !opts.append) { + throw new errors.BadResource("EINVAL: One of 'read', 'write', 'append' is required to open file."); + } + throw new errors.BadResource("EINVAL: Invalid fs flags."); + } + exports2.getAccessFlag = getAccessFlag; + function getCreationFlag(opts) { + if (!opts.write && !opts.append) { + if (opts.truncate || opts.create || opts.createNew) { + throw new errors.BadResource("EINVAL: One of 'write', 'append' is required to 'truncate', 'create' or 'createNew' file."); + } + } + if (opts.append) { + if (opts.truncate && !opts.createNew) { + throw new errors.BadResource("EINVAL: unexpected 'truncate': true and 'createNew': false when 'append' is true."); + } + } + if (!opts.create && !opts.truncate && !opts.createNew) + return 0; + if (opts.create && !opts.truncate && !opts.createNew) + return O_CREAT; + if (!opts.create && opts.truncate && !opts.createNew) { + if (os_1.default.platform() === "win32") { + return O_CREAT | O_TRUNC; + } else { + return O_TRUNC; + } + } + if (opts.create && opts.truncate && !opts.createNew) { + return O_CREAT | O_TRUNC; + } + if (opts.createNew) + return O_CREAT | O_EXCL; + throw new errors.BadResource("EINVAL: Invalid fs flags."); + } + exports2.getCreationFlag = getCreationFlag; + function getFsFlag(flags) { + return getAccessFlag(flags) | getCreationFlag(flags); + } + exports2.getFsFlag = getFsFlag; + } +}); + +// dist/script/deno/stable/functions/open.js +var require_open = __commonJS({ + "dist/script/deno/stable/functions/open.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.open = void 0; + var fs_1 = require("fs"); + var util_1 = require("util"); + var FsFile_js_1 = require_FsFile(); + var fs_flags_js_1 = require_fs_flags(); + var errorMap_js_1 = __importDefault(require_errorMap()); + var nodeOpen = (0, util_1.promisify)(fs_1.open); + var open = async function open2(path, { read, write, append, truncate, create, createNew, mode = 438 } = { + read: true + }) { + const flagMode = (0, fs_flags_js_1.getFsFlag)({ + read, + write, + append, + truncate, + create, + createNew + }); + try { + const fd = await nodeOpen(path, flagMode, mode); + return new FsFile_js_1.File(fd); + } catch (err) { + throw (0, errorMap_js_1.default)(err); + } + }; + exports2.open = open; + } +}); + +// dist/script/deno/stable/functions/create.js +var require_create = __commonJS({ + "dist/script/deno/stable/functions/create.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.create = void 0; + var open_js_1 = require_open(); + var create = async function create2(path) { + return await (0, open_js_1.open)(path, { write: true, create: true, truncate: true }); + }; + exports2.create = create; + } +}); + +// dist/script/deno/stable/functions/openSync.js +var require_openSync = __commonJS({ + "dist/script/deno/stable/functions/openSync.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.openSync = void 0; + var fs_1 = require("fs"); + var FsFile_js_1 = require_FsFile(); + var fs_flags_js_1 = require_fs_flags(); + var errorMap_js_1 = __importDefault(require_errorMap()); + var openSync = function openSync2(path, { read, write, append, truncate, create, createNew, mode = 438 } = { + read: true + }) { + const flagMode = (0, fs_flags_js_1.getFsFlag)({ + read, + write, + append, + truncate, + create, + createNew + }); + try { + const fd = (0, fs_1.openSync)(path, flagMode, mode); + return new FsFile_js_1.File(fd); + } catch (err) { + throw (0, errorMap_js_1.default)(err); + } + }; + exports2.openSync = openSync; + } +}); + +// dist/script/deno/stable/functions/createSync.js +var require_createSync = __commonJS({ + "dist/script/deno/stable/functions/createSync.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createSync = void 0; + var openSync_js_1 = require_openSync(); + var createSync = function createSync2(path) { + return (0, openSync_js_1.openSync)(path, { + create: true, + truncate: true, + read: true, + write: true + }); + }; + exports2.createSync = createSync; + } +}); + +// dist/script/deno/stable/functions/cwd.js +var require_cwd = __commonJS({ + "dist/script/deno/stable/functions/cwd.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.cwd = void 0; + exports2.cwd = process.cwd; + } +}); + +// dist/script/deno/stable/functions/execPath.js +var require_execPath = __commonJS({ + "dist/script/deno/stable/functions/execPath.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.execPath = void 0; + var which_1 = __importDefault(require("which")); + var execPath = () => which_1.default.sync("deno"); + exports2.execPath = execPath; + } +}); + +// dist/script/deno/stable/functions/exit.js +var require_exit = __commonJS({ + "dist/script/deno/stable/functions/exit.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exit = void 0; + var exit = function exit2(code) { + return process.exit(code); + }; + exports2.exit = exit; + } +}); + +// dist/script/deno/stable/functions/fsync.js +var require_fsync = __commonJS({ + "dist/script/deno/stable/functions/fsync.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fsync = void 0; + var fs_1 = require("fs"); + var util_1 = require("util"); + var fsync = function fsync2(rid) { + return (0, util_1.promisify)(fs_1.fsync)(rid); + }; + exports2.fsync = fsync; + } +}); + +// dist/script/deno/stable/functions/fsyncSync.js +var require_fsyncSync = __commonJS({ + "dist/script/deno/stable/functions/fsyncSync.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fsyncSync = void 0; + var fs_1 = require("fs"); + var fsyncSync = function fsyncSync2(rid) { + return (0, fs_1.fsyncSync)(rid); + }; + exports2.fsyncSync = fsyncSync; + } +}); + +// dist/script/deno/stable/functions/gid.js +var require_gid = __commonJS({ + "dist/script/deno/stable/functions/gid.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.gid = void 0; + var process_1 = __importDefault(require("process")); + exports2.gid = process_1.default.getgid ?? (() => null); + } +}); + +// dist/script/deno/stable/functions/hostname.js +var require_hostname = __commonJS({ + "dist/script/deno/stable/functions/hostname.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hostname = void 0; + var os = __importStar2(require("os")); + var hostname = function hostname2() { + return os.hostname(); + }; + exports2.hostname = hostname; + } +}); + +// dist/script/deno/stable/functions/inspect.js +var require_inspect = __commonJS({ + "dist/script/deno/stable/functions/inspect.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.inspect = void 0; + var util = __importStar2(require("util")); + var inspect = (value, options = {}) => util.inspect(value, options); + exports2.inspect = inspect; + } +}); + +// dist/script/deno/stable/functions/kill.js +var require_kill = __commonJS({ + "dist/script/deno/stable/functions/kill.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.kill = void 0; + var os_1 = __importDefault(require("os")); + var process_1 = __importDefault(require("process")); + var kill = function(pid, signo) { + if (pid < 0 && os_1.default.platform() === "win32") { + throw new TypeError("Invalid pid"); + } + process_1.default.kill(pid, signo); + }; + exports2.kill = kill; + } +}); + +// dist/script/deno/stable/functions/link.js +var require_link = __commonJS({ + "dist/script/deno/stable/functions/link.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.link = void 0; + var fs = __importStar2(require("fs/promises")); + exports2.link = fs.link; + } +}); + +// dist/script/deno/stable/functions/linkSync.js +var require_linkSync = __commonJS({ + "dist/script/deno/stable/functions/linkSync.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.linkSync = void 0; + var fs = __importStar2(require("fs")); + exports2.linkSync = fs.linkSync; + } +}); + +// dist/script/deno/internal/Listener.js +var require_Listener = __commonJS({ + "dist/script/deno/internal/Listener.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Listener = void 0; + var close_js_1 = require_close(); + var errors = __importStar2(require_errors()); + var Listener = class { + rid; + addr; + #listener; + constructor(rid, addr, listener) { + this.rid = rid; + this.addr = addr; + this.#listener = listener; + } + [Symbol.dispose]() { + this.close(); + } + async accept() { + if (!this.#listener) { + throw new errors.BadResource("Listener not initialised"); + } + const result = await this.#listener.next(); + if (result.done) { + throw new errors.BadResource("Server not listening"); + } + return result.value; + } + async next() { + let conn; + try { + conn = await this.accept(); + } catch (error) { + if (error instanceof errors.BadResource) { + return { value: void 0, done: true }; + } + throw error; + } + return { value: conn, done: false }; + } + return(value) { + this.close(); + return Promise.resolve({ value, done: true }); + } + close() { + (0, close_js_1.close)(this.rid); + } + ref() { + throw new Error("Not implemented"); + } + unref() { + throw new Error("Not implemented"); + } + [Symbol.asyncIterator]() { + return this; + } + }; + exports2.Listener = Listener; + } +}); + +// dist/script/deno/stable/functions/listen.js +var require_listen = __commonJS({ + "dist/script/deno/stable/functions/listen.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.listen = void 0; + var net_1 = require("net"); + var Conn_js_1 = require_Conn(); + var Listener_js_1 = require_Listener(); + async function* _listen(server, waitFor) { + await waitFor; + while (server.listening) { + yield new Promise((resolve) => server.once("connection", (socket) => { + socket.on("error", (err) => console.error(err)); + const rid = socket._handle.fd; + const localAddr = { + // cannot be undefined while socket is connected + hostname: socket.localAddress, + port: socket.localPort, + transport: "tcp" + }; + const remoteAddr = { + // cannot be undefined while socket is connected + hostname: socket.remoteAddress, + port: socket.remotePort, + transport: "tcp" + }; + resolve(new Conn_js_1.Conn(rid, localAddr, remoteAddr)); + })); + } + } + var listen = function listen2(options) { + if (options.transport === "unix") { + throw new Error("Unstable UnixListenOptions is not implemented"); + } + const { port, hostname = "0.0.0.0", transport = "tcp" } = options; + if (transport !== "tcp") { + throw new Error("Deno.listen is only implemented for transport: tcp"); + } + const server = (0, net_1.createServer)(); + const waitFor = new Promise((resolve) => ( + // server._handle.fd is assigned immediately on .listen() + server.listen(port, hostname, resolve) + )); + const listener = new Listener_js_1.Listener(server._handle.fd, { + hostname, + port, + transport: "tcp" + }, _listen(server, waitFor)); + return listener; + }; + exports2.listen = listen; + } +}); + +// dist/script/deno/stable/functions/readTextFileSync.js +var require_readTextFileSync = __commonJS({ + "dist/script/deno/stable/functions/readTextFileSync.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readTextFileSync = void 0; + var fs = __importStar2(require("fs")); + var errorMap_js_1 = __importDefault(require_errorMap()); + var readTextFileSync = function(path) { + try { + return fs.readFileSync(path, "utf8"); + } catch (e) { + throw (0, errorMap_js_1.default)(e); + } + }; + exports2.readTextFileSync = readTextFileSync; + } +}); + +// dist/script/deno/stable/functions/listenTls.js +var require_listenTls = __commonJS({ + "dist/script/deno/stable/functions/listenTls.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.listenTls = void 0; + var tls_1 = require("tls"); + var Conn_js_1 = require_Conn(); + var Listener_js_1 = require_Listener(); + var readTextFileSync_js_1 = require_readTextFileSync(); + async function* _listen(server, waitFor) { + await waitFor; + while (server.listening) { + yield new Promise((resolve) => server.once("secureConnection", (socket) => { + socket.on("error", (err) => console.error(err)); + const rid = socket._handle.fd; + const localAddr = { + // cannot be undefined while socket is connected + hostname: socket.localAddress, + port: socket.localPort, + transport: "tcp" + }; + const remoteAddr = { + // cannot be undefined while socket is connected + hostname: socket.remoteAddress, + port: socket.remotePort, + transport: "tcp" + }; + resolve(new Conn_js_1.TlsConn(rid, localAddr, remoteAddr)); + })); + } + } + var listenTls = function listen({ port, hostname = "0.0.0.0", transport = "tcp", certFile, keyFile }) { + if (transport !== "tcp") { + throw new Error("Deno.listen is only implemented for transport: tcp"); + } + const [cert, key] = [certFile, keyFile].map((f) => f == null ? void 0 : (0, readTextFileSync_js_1.readTextFileSync)(f)); + const server = (0, tls_1.createServer)({ cert, key }); + const waitFor = new Promise((resolve) => ( + // server._handle.fd is assigned immediately on .listen() + server.listen(port, hostname, resolve) + )); + const listener = new Listener_js_1.Listener(server._handle.fd, { + hostname, + port, + transport: "tcp" + }, _listen(server, waitFor)); + return listener; + }; + exports2.listenTls = listenTls; + } +}); + +// dist/script/deno/stable/functions/loadavg.js +var require_loadavg = __commonJS({ + "dist/script/deno/stable/functions/loadavg.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.loadavg = void 0; + var os = __importStar2(require("os")); + var loadavg = function loadavg2() { + return os.loadavg(); + }; + exports2.loadavg = loadavg; + } +}); + +// dist/script/deno/stable/functions/lstat.js +var require_lstat = __commonJS({ + "dist/script/deno/stable/functions/lstat.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.lstat = void 0; + var fs = __importStar2(require("fs/promises")); + var stat_js_1 = require_stat(); + var errorMap_js_1 = __importDefault(require_errorMap()); + var lstat = async (path) => { + try { + return (0, stat_js_1.denoifyFileInfo)(await fs.lstat(path)); + } catch (e) { + throw (0, errorMap_js_1.default)(e); + } + }; + exports2.lstat = lstat; + } +}); + +// dist/script/deno/stable/functions/lstatSync.js +var require_lstatSync = __commonJS({ + "dist/script/deno/stable/functions/lstatSync.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.lstatSync = void 0; + var fs = __importStar2(require("fs")); + var stat_js_1 = require_stat(); + var errorMap_js_1 = __importDefault(require_errorMap()); + var lstatSync = (path) => { + try { + return (0, stat_js_1.denoifyFileInfo)(fs.lstatSync(path)); + } catch (err) { + throw (0, errorMap_js_1.default)(err); + } + }; + exports2.lstatSync = lstatSync; + } +}); + +// dist/script/deno/stable/functions/makeTempDir.js +var require_makeTempDir = __commonJS({ + "dist/script/deno/stable/functions/makeTempDir.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.makeTempDir = void 0; + var promises_1 = require("fs/promises"); + var path_1 = require("path"); + var os_1 = require("os"); + var makeTempDir = function makeTempDir2({ prefix = "" } = {}) { + return (0, promises_1.mkdtemp)((0, path_1.join)((0, os_1.tmpdir)(), prefix || "/")); + }; + exports2.makeTempDir = makeTempDir; + } +}); + +// dist/script/deno/stable/functions/makeTempDirSync.js +var require_makeTempDirSync = __commonJS({ + "dist/script/deno/stable/functions/makeTempDirSync.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.makeTempDirSync = void 0; + var fs_1 = require("fs"); + var path_1 = require("path"); + var os_1 = require("os"); + var makeTempDirSync = function makeTempDirSync2({ prefix = "" } = {}) { + return (0, fs_1.mkdtempSync)((0, path_1.join)((0, os_1.tmpdir)(), prefix || "/")); + }; + exports2.makeTempDirSync = makeTempDirSync; + } +}); + +// dist/script/deno/internal/random_id.js +var require_random_id = __commonJS({ + "dist/script/deno/internal/random_id.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.randomId = void 0; + var randomId = () => { + const n = (Math.random() * 1048575 * 1e6).toString(16); + return "" + n.slice(0, 6); + }; + exports2.randomId = randomId; + } +}); + +// dist/script/deno/stable/functions/writeTextFile.js +var require_writeTextFile = __commonJS({ + "dist/script/deno/stable/functions/writeTextFile.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.writeTextFile = void 0; + var fs = __importStar2(require("fs/promises")); + var errorMap_js_1 = __importDefault(require_errorMap()); + var fs_flags_js_1 = require_fs_flags(); + var writeTextFile = async function writeTextFile2(path, data, { append = false, create = true, createNew = false, mode, signal } = {}) { + const truncate = create && !append; + const flag = (0, fs_flags_js_1.getFsFlag)({ + append, + create, + createNew, + truncate, + write: true + }); + try { + await fs.writeFile(path, data, { flag, mode, signal }); + if (mode !== void 0) + await fs.chmod(path, mode); + } catch (error) { + throw (0, errorMap_js_1.default)(error); + } + }; + exports2.writeTextFile = writeTextFile; + } +}); + +// dist/script/deno/stable/functions/makeTempFile.js +var require_makeTempFile = __commonJS({ + "dist/script/deno/stable/functions/makeTempFile.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.makeTempFile = void 0; + var os_1 = require("os"); + var path_1 = require("path"); + var random_id_js_1 = require_random_id(); + var writeTextFile_js_1 = require_writeTextFile(); + var makeTempFile = async function makeTempFile2({ prefix = "" } = {}) { + const name = (0, path_1.join)((0, os_1.tmpdir)(), prefix, (0, random_id_js_1.randomId)()); + await (0, writeTextFile_js_1.writeTextFile)(name, ""); + return name; + }; + exports2.makeTempFile = makeTempFile; + } +}); + +// dist/script/deno/stable/functions/writeTextFileSync.js +var require_writeTextFileSync = __commonJS({ + "dist/script/deno/stable/functions/writeTextFileSync.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.writeTextFileSync = void 0; + var fs = __importStar2(require("fs")); + var errorMap_js_1 = __importDefault(require_errorMap()); + var writeTextFileSync = (path, data, { append = false, create = true, mode } = {}) => { + const flag = create ? append ? "a" : "w" : "r+"; + try { + fs.writeFileSync(path, data, { flag, mode }); + if (mode !== void 0) + fs.chmodSync(path, mode); + } catch (error) { + throw (0, errorMap_js_1.default)(error); + } + }; + exports2.writeTextFileSync = writeTextFileSync; + } +}); + +// dist/script/deno/stable/functions/makeTempFileSync.js +var require_makeTempFileSync = __commonJS({ + "dist/script/deno/stable/functions/makeTempFileSync.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.makeTempFileSync = void 0; + var os_1 = require("os"); + var path_1 = require("path"); + var random_id_js_1 = require_random_id(); + var writeTextFileSync_js_1 = require_writeTextFileSync(); + var makeTempFileSync = function makeTempFileSync2({ prefix = "" } = {}) { + const name = (0, path_1.join)((0, os_1.tmpdir)(), prefix, (0, random_id_js_1.randomId)()); + (0, writeTextFileSync_js_1.writeTextFileSync)(name, ""); + return name; + }; + exports2.makeTempFileSync = makeTempFileSync; + } +}); + +// dist/script/deno/stable/functions/memoryUsage.js +var require_memoryUsage = __commonJS({ + "dist/script/deno/stable/functions/memoryUsage.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.memoryUsage = void 0; + exports2.memoryUsage = process.memoryUsage; + } +}); + +// dist/script/deno/stable/functions/mkdir.js +var require_mkdir = __commonJS({ + "dist/script/deno/stable/functions/mkdir.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mkdir = void 0; + var promises_1 = require("fs/promises"); + var errorMap_js_1 = __importDefault(require_errorMap()); + var variables_js_1 = require_variables(); + var mkdir = async function mkdir2(path, options) { + try { + await (0, promises_1.mkdir)(path, options); + } catch (error) { + if (error?.code === "EEXIST") { + throw new variables_js_1.errors.AlreadyExists(`File exists (os error 17), mkdir '${path}'`); + } + throw (0, errorMap_js_1.default)(error); + } + }; + exports2.mkdir = mkdir; + } +}); + +// dist/script/deno/stable/functions/mkdirSync.js +var require_mkdirSync = __commonJS({ + "dist/script/deno/stable/functions/mkdirSync.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mkdirSync = void 0; + var fs = __importStar2(require("fs")); + var errorMap_js_1 = __importDefault(require_errorMap()); + var variables_js_1 = require_variables(); + var mkdirSync = (path, options) => { + try { + fs.mkdirSync(path, options); + } catch (error) { + if (error?.code === "EEXIST") { + throw new variables_js_1.errors.AlreadyExists(`File exists (os error 17), mkdir '${path}'`); + } + throw (0, errorMap_js_1.default)(error); + } + }; + exports2.mkdirSync = mkdirSync; + } +}); + +// dist/script/deno/stable/functions/osRelease.js +var require_osRelease = __commonJS({ + "dist/script/deno/stable/functions/osRelease.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.osRelease = void 0; + var os_1 = require("os"); + var osRelease = function osRelease2() { + return (0, os_1.release)(); + }; + exports2.osRelease = osRelease; + } +}); + +// dist/script/deno/stable/functions/osUptime.js +var require_osUptime = __commonJS({ + "dist/script/deno/stable/functions/osUptime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.osUptime = void 0; + var os_1 = require("os"); + var osUptime = function osUptime2() { + return (0, os_1.uptime)(); + }; + exports2.osUptime = osUptime; + } +}); + +// dist/script/deno/stable/functions/readDir.js +var require_readDir = __commonJS({ + "dist/script/deno/stable/functions/readDir.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readDir = void 0; + var promises_1 = require("fs/promises"); + var errorMap_js_1 = __importDefault(require_errorMap()); + var readDir = async function* readDir2(path) { + try { + for await (const e of await (0, promises_1.opendir)(String(path))) { + const ent = { + name: e.name, + isFile: e.isFile(), + isDirectory: e.isDirectory(), + isSymlink: e.isSymbolicLink() + }; + yield ent; + } + } catch (e) { + throw (0, errorMap_js_1.default)(e); + } + }; + exports2.readDir = readDir; + } +}); + +// dist/script/deno/stable/functions/readDirSync.js +var require_readDirSync = __commonJS({ + "dist/script/deno/stable/functions/readDirSync.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readDirSync = void 0; + var fs_1 = require("fs"); + var errorMap_js_1 = __importDefault(require_errorMap()); + var readDirSync = function* readDir(path) { + try { + for (const e of (0, fs_1.readdirSync)(String(path), { withFileTypes: true })) { + const ent = { + name: e.name, + isFile: e.isFile(), + isDirectory: e.isDirectory(), + isSymlink: e.isSymbolicLink() + }; + yield ent; + } + } catch (e) { + throw (0, errorMap_js_1.default)(e); + } + }; + exports2.readDirSync = readDirSync; + } +}); + +// dist/script/deno/stable/functions/readFile.js +var require_readFile = __commonJS({ + "dist/script/deno/stable/functions/readFile.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readFile = void 0; + var promises_1 = require("fs/promises"); + var errorMap_js_1 = __importDefault(require_errorMap()); + var readFile = async function readFile2(path, { signal } = {}) { + try { + const buf = await (0, promises_1.readFile)(path, { signal }); + return new Uint8Array(buf.buffer, buf.byteOffset, buf.length); + } catch (e) { + throw (0, errorMap_js_1.default)(e); + } + }; + exports2.readFile = readFile; + } +}); + +// dist/script/deno/stable/functions/readFileSync.js +var require_readFileSync = __commonJS({ + "dist/script/deno/stable/functions/readFileSync.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readFileSync = void 0; + var fs_1 = require("fs"); + var errorMap_js_1 = __importDefault(require_errorMap()); + var readFileSync = function readFileSync2(path) { + try { + const buf = (0, fs_1.readFileSync)(path); + return new Uint8Array(buf.buffer, buf.byteOffset, buf.length); + } catch (e) { + throw (0, errorMap_js_1.default)(e); + } + }; + exports2.readFileSync = readFileSync; + } +}); + +// dist/script/deno/stable/functions/readLink.js +var require_readLink = __commonJS({ + "dist/script/deno/stable/functions/readLink.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readLink = void 0; + var fs = __importStar2(require("fs/promises")); + exports2.readLink = fs.readlink; + } +}); + +// dist/script/deno/stable/functions/readLinkSync.js +var require_readLinkSync = __commonJS({ + "dist/script/deno/stable/functions/readLinkSync.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readLinkSync = void 0; + var fs = __importStar2(require("fs")); + exports2.readLinkSync = fs.readlinkSync; + } +}); + +// dist/script/deno/stable/functions/realPath.js +var require_realPath = __commonJS({ + "dist/script/deno/stable/functions/realPath.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.realPath = void 0; + var fs = __importStar2(require("fs/promises")); + exports2.realPath = fs.realpath; + } +}); + +// dist/script/deno/stable/functions/realPathSync.js +var require_realPathSync = __commonJS({ + "dist/script/deno/stable/functions/realPathSync.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.realPathSync = void 0; + var fs = __importStar2(require("fs")); + exports2.realPathSync = fs.realpathSync; + } +}); + +// dist/script/deno/stable/functions/remove.js +var require_remove = __commonJS({ + "dist/script/deno/stable/functions/remove.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.remove = void 0; + var promises_1 = require("fs/promises"); + var remove = async function remove2(path, options = {}) { + const innerOptions = options.recursive ? { recursive: true, force: true } : {}; + try { + return await (0, promises_1.rm)(path, innerOptions); + } catch (err) { + if (err.code === "ERR_FS_EISDIR") { + return await (0, promises_1.rmdir)(path, innerOptions); + } else { + throw err; + } + } + }; + exports2.remove = remove; + } +}); + +// dist/script/deno/stable/functions/removeSignalListener.js +var require_removeSignalListener = __commonJS({ + "dist/script/deno/stable/functions/removeSignalListener.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.removeSignalListener = void 0; + var process_1 = __importDefault(require("process")); + var removeSignalListener = (signal, handler) => { + process_1.default.removeListener(signal, handler); + }; + exports2.removeSignalListener = removeSignalListener; + } +}); + +// dist/script/deno/stable/functions/removeSync.js +var require_removeSync = __commonJS({ + "dist/script/deno/stable/functions/removeSync.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.removeSync = void 0; + var fs = __importStar2(require("fs")); + var removeSync = (path, options = {}) => { + const innerOptions = options.recursive ? { recursive: true, force: true } : {}; + try { + fs.rmSync(path, innerOptions); + } catch (err) { + if (err.code === "ERR_FS_EISDIR") { + fs.rmdirSync(path, innerOptions); + } else { + throw err; + } + } + }; + exports2.removeSync = removeSync; + } +}); + +// dist/script/deno/stable/functions/rename.js +var require_rename = __commonJS({ + "dist/script/deno/stable/functions/rename.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rename = void 0; + var promises_1 = require("fs/promises"); + var rename = function rename2(oldpath, newpath) { + return (0, promises_1.rename)(oldpath, newpath); + }; + exports2.rename = rename; + } +}); + +// dist/script/deno/stable/functions/renameSync.js +var require_renameSync = __commonJS({ + "dist/script/deno/stable/functions/renameSync.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.renameSync = void 0; + var fs = __importStar2(require("fs")); + exports2.renameSync = fs.renameSync; + } +}); + +// dist/script/deno/stable/functions/resolveDns.js +var require_resolveDns = __commonJS({ + "dist/script/deno/stable/functions/resolveDns.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.resolveDns = void 0; + var dns_1 = __importDefault(require("dns")); + var resolveDns = function resolveDns2(query, recordType, options) { + if (options) { + throw Error(`resolveDns option not implemnted yet`); + } + switch (recordType) { + case "A": + case "AAAA": + case "CNAME": + case "NS": + case "PTR": + return new Promise((resolve, reject) => { + dns_1.default.resolve(query, recordType, (err, addresses) => { + if (err) { + reject(err); + } else { + resolve(addresses); + } + }); + }); + case "ANAME": + case "CAA": + case "MX": + case "NAPTR": + case "SOA": + case "SRV": + case "TXT": + default: + throw Error(`resolveDns type ${recordType} not implemnted yet`); + } + }; + exports2.resolveDns = resolveDns; + } +}); + +// dist/script/deno/internal/streams.js +var require_streams = __commonJS({ + "dist/script/deno/internal/streams.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StreamWriter = exports2.BufferStreamReader = void 0; + var BufferStreamReader = class { + #stream; + #error; + #ended = false; + #pendingActions = []; + constructor(stream) { + this.#stream = stream; + this.#stream.pause(); + this.#stream.on("error", (error) => { + this.#error = error; + this.#runPendingActions(); + }); + this.#stream.on("readable", () => { + this.#runPendingActions(); + }); + this.#stream.on("end", () => { + this.#ended = true; + this.#runPendingActions(); + }); + } + readAll() { + return new Promise((resolve, reject) => { + const chunks = []; + const action = () => { + if (this.#error) { + reject(this.#error); + return; + } + const buffer = this.#stream.read(); + if (buffer != null) { + chunks.push(buffer); + this.#pendingActions.push(action); + } else if (this.#ended) { + const result = Buffer.concat(chunks); + resolve(result); + } else { + this.#pendingActions.push(action); + } + }; + action(); + }); + } + read(p) { + return new Promise((resolve, reject) => { + const action = () => { + if (this.#error) { + reject(this.#error); + return; + } + const readBuffer = this.#stream.read(p.byteLength); + if (readBuffer && readBuffer.byteLength > 0) { + readBuffer.copy(p, 0, 0, readBuffer.byteLength); + resolve(readBuffer.byteLength); + return; + } + if (this.#ended) { + resolve(null); + } else { + this.#pendingActions.push(action); + } + }; + action(); + }); + } + #runPendingActions() { + const errors = []; + for (const action of this.#pendingActions.splice(0)) { + try { + action(); + } catch (err) { + errors.push(err); + } + } + if (errors.length > 0) { + throw errors.length > 1 ? new globalThis.AggregateError(errors) : errors[0]; + } + } + }; + exports2.BufferStreamReader = BufferStreamReader; + var StreamWriter = class { + #stream; + constructor(stream) { + this.#stream = stream; + } + write(p) { + return new Promise((resolve, reject) => { + this.#stream.write(p, (err) => { + if (err) { + reject(err); + } else { + resolve(p.byteLength); + } + }); + }); + } + }; + exports2.StreamWriter = StreamWriter; + } +}); + +// dist/script/deno/stable/functions/run.js +var require_run = __commonJS({ + "dist/script/deno/stable/functions/run.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Process = exports2.run = void 0; + var child_process_1 = __importDefault(require("child_process")); + var fs_1 = __importDefault(require("fs")); + var os_1 = __importDefault(require("os")); + var url_1 = __importDefault(require("url")); + var events_1 = require("events"); + var which_1 = __importDefault(require("which")); + var streams_js_1 = require_streams(); + var errors = __importStar2(require_errors()); + var run = function run2(options) { + const [cmd, ...args] = options.cmd; + if (options.cwd && !fs_1.default.existsSync(options.cwd)) { + throw new Error("The directory name is invalid."); + } + const commandName = getCmd(cmd); + if (!which_1.default.sync(commandName, { nothrow: true })) { + throw new errors.NotFound("The system cannot find the file specified."); + } + const process2 = child_process_1.default.spawn(commandName, args, { + cwd: options.cwd, + env: getEnv(options), + uid: options.uid, + gid: options.gid, + shell: false, + stdio: [ + getStdio(options.stdin, "in"), + getStdio(options.stdout, "out"), + getStdio(options.stderr, "out") + ] + }); + return new Process(process2); + }; + exports2.run = run; + function getStdio(value, kind) { + if (value === "inherit" || value == null) { + return "inherit"; + } else if (value === "piped") { + return "pipe"; + } else if (value === "null") { + return "ignore"; + } else if (typeof value === "number") { + switch (kind) { + case "in": + return fs_1.default.createReadStream(null, { fd: value }); + case "out": + return fs_1.default.createWriteStream(null, { fd: value }); + default: { + const _assertNever = kind; + throw new Error("Unreachable."); + } + } + } else { + const _assertNever = value; + throw new Error("Unknown value."); + } + } + function getCmd(firstArg) { + if (firstArg instanceof URL) { + return url_1.default.fileURLToPath(firstArg); + } else { + return firstArg; + } + } + function getEnv(options) { + const env = options.env ?? {}; + for (const name in process.env) { + if (!Object.prototype.hasOwnProperty.call(env, name)) { + if (options.clearEnv) { + if (os_1.default.platform() === "win32") { + env[name] = ""; + } else { + delete env[name]; + } + } else { + env[name] = process.env[name]; + } + } + } + return env; + } + var Process = class { + #process; + #stderr; + #stdout; + #stdin; + #status; + #receivedStatus = false; + /** @internal */ + constructor(process2) { + this.#process = process2; + this.#stdout = ProcessReadStream.fromNullable(this.#process.stdout) ?? null; + this.#stderr = ProcessReadStream.fromNullable(this.#process.stderr) ?? null; + this.#stdin = ProcessWriteStream.fromNullable(this.#process.stdin) ?? null; + this.#status = (0, events_1.once)(process2, "exit"); + } + get rid() { + return NaN; + } + get pid() { + return this.#process.pid; + } + get stdin() { + return this.#stdin; + } + get stdout() { + return this.#stdout; + } + get stderr() { + return this.#stderr; + } + async status() { + const [receivedCode, signalName] = await this.#status; + const signal = signalName ? os_1.default.constants.signals[signalName] : receivedCode > 128 ? receivedCode - 128 : void 0; + const code = receivedCode != null ? receivedCode : signal != null ? 128 + signal : void 0; + const success = code === 0; + this.#receivedStatus = true; + return { code, signal, success }; + } + async output() { + if (!this.#stdout) { + throw new TypeError("stdout was not piped"); + } + const result = await this.#stdout.readAll(); + this.#stdout.close(); + return result; + } + async stderrOutput() { + if (!this.#stderr) { + throw new TypeError("stderr was not piped"); + } + const result = await this.#stderr.readAll(); + this.#stderr.close(); + return result; + } + close() { + this.#process.unref(); + this.#process.kill(); + } + kill(signo = "SIGTERM") { + if (this.#receivedStatus) { + throw new errors.NotFound("entity not found"); + } + this.#process.kill(signo); + } + }; + exports2.Process = Process; + var ProcessReadStream = class _ProcessReadStream { + #stream; + #bufferStreamReader; + #closed = false; + constructor(stream) { + this.#stream = stream; + this.#bufferStreamReader = new streams_js_1.BufferStreamReader(stream); + } + static fromNullable(stream) { + return stream ? new _ProcessReadStream(stream) : void 0; + } + readAll() { + if (this.#closed) { + return Promise.resolve(new Uint8Array(0)); + } else { + return this.#bufferStreamReader.readAll(); + } + } + read(p) { + if (this.#closed) { + return Promise.resolve(null); + } else { + return this.#bufferStreamReader.read(p); + } + } + close() { + this.#closed = true; + this.#stream.destroy(); + } + get readable() { + throw new Error("Not implemented."); + } + get writable() { + throw new Error("Not implemented."); + } + }; + var ProcessWriteStream = class _ProcessWriteStream { + #stream; + #streamWriter; + #closed = false; + constructor(stream) { + this.#stream = stream; + this.#streamWriter = new streams_js_1.StreamWriter(stream); + } + static fromNullable(stream) { + return stream ? new _ProcessWriteStream(stream) : void 0; + } + write(p) { + if (this.#closed) { + return Promise.resolve(0); + } else { + return this.#streamWriter.write(p); + } + } + close() { + this.#closed = true; + this.#stream.end(); + } + }; + } +}); + +// dist/script/deno/stable/functions/shutdown.js +var require_shutdown = __commonJS({ + "dist/script/deno/stable/functions/shutdown.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.shutdown = void 0; + var net_1 = require("net"); + var shutdown = async function shutdown2(rid) { + await new Promise((resolve) => new net_1.Socket({ fd: rid }).end(resolve)); + }; + exports2.shutdown = shutdown; + } +}); + +// dist/script/deno/stable/functions/statSync.js +var require_statSync = __commonJS({ + "dist/script/deno/stable/functions/statSync.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.statSync = void 0; + var fs = __importStar2(require("fs")); + var stat_js_1 = require_stat(); + var errorMap_js_1 = __importDefault(require_errorMap()); + var statSync = (path) => { + try { + return (0, stat_js_1.denoifyFileInfo)(fs.statSync(path)); + } catch (err) { + throw (0, errorMap_js_1.default)(err); + } + }; + exports2.statSync = statSync; + } +}); + +// dist/script/deno/stable/functions/symlink.js +var require_symlink = __commonJS({ + "dist/script/deno/stable/functions/symlink.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.symlink = void 0; + var fs = __importStar2(require("fs/promises")); + var symlink = async (oldpath, newpath, options) => await fs.symlink(oldpath, newpath, options?.type); + exports2.symlink = symlink; + } +}); + +// dist/script/deno/stable/functions/symlinkSync.js +var require_symlinkSync = __commonJS({ + "dist/script/deno/stable/functions/symlinkSync.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.symlinkSync = void 0; + var fs = __importStar2(require("fs")); + var symlinkSync = (oldpath, newpath, options) => fs.symlinkSync(oldpath, newpath, options?.type); + exports2.symlinkSync = symlinkSync; + } +}); + +// dist/script/deno/stable/functions/test.js +var require_test = __commonJS({ + "dist/script/deno/stable/functions/test.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.test = void 0; + var shim_deno_test_1 = require("@deno/shim-deno-test"); + Object.defineProperty(exports2, "test", { enumerable: true, get: function() { + return shim_deno_test_1.test; + } }); + } +}); + +// dist/script/deno/stable/functions/truncate.js +var require_truncate = __commonJS({ + "dist/script/deno/stable/functions/truncate.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.truncate = void 0; + var fs = __importStar2(require("fs/promises")); + var errorMap_js_1 = __importDefault(require_errorMap()); + var variables_js_1 = require_variables(); + var truncate = async (name, len) => { + try { + return await fs.truncate(name, len); + } catch (error) { + if (error?.code === "ENOENT") { + throw new variables_js_1.errors.NotFound(`No such file or directory (os error 2), truncate '${name}'`); + } + throw (0, errorMap_js_1.default)(error); + } + }; + exports2.truncate = truncate; + } +}); + +// dist/script/deno/stable/functions/truncateSync.js +var require_truncateSync = __commonJS({ + "dist/script/deno/stable/functions/truncateSync.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.truncateSync = void 0; + var fs = __importStar2(require("fs")); + var errorMap_js_1 = __importDefault(require_errorMap()); + var variables_js_1 = require_variables(); + var truncateSync = (name, len) => { + try { + return fs.truncateSync(name, len); + } catch (error) { + if (error?.code === "ENOENT") { + throw new variables_js_1.errors.NotFound(`No such file or directory (os error 2), truncate '${name}'`); + } + throw (0, errorMap_js_1.default)(error); + } + }; + exports2.truncateSync = truncateSync; + } +}); + +// dist/script/deno/stable/functions/uid.js +var require_uid = __commonJS({ + "dist/script/deno/stable/functions/uid.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.uid = void 0; + var process_1 = __importDefault(require("process")); + exports2.uid = process_1.default.getuid ?? (() => null); + } +}); + +// dist/script/deno/internal/iterutil.js +var require_iterutil = __commonJS({ + "dist/script/deno/internal/iterutil.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.merge = exports2.filterAsync = exports2.mapAsync = exports2.map = void 0; + function* map(iter, f) { + for (const i of iter) { + yield f(i); + } + } + exports2.map = map; + async function* mapAsync(iter, f) { + for await (const i of iter) { + yield f(i); + } + } + exports2.mapAsync = mapAsync; + async function* filterAsync(iter, filter) { + for await (const i of iter) { + if (filter(i)) { + yield i; + } + } + } + exports2.filterAsync = filterAsync; + async function* merge(iterables) { + const racers = new Map(map(map(iterables, (iter) => iter[Symbol.asyncIterator]()), (iter) => [iter, iter.next()])); + while (racers.size > 0) { + const winner = await Promise.race(map(racers.entries(), ([iter, prom]) => prom.then((result) => ({ result, iter })))); + if (winner.result.done) { + racers.delete(winner.iter); + } else { + yield await winner.result.value; + racers.set(winner.iter, winner.iter.next()); + } + } + } + exports2.merge = merge; + } +}); + +// dist/script/deno/stable/functions/watchFs.js +var require_watchFs = __commonJS({ + "dist/script/deno/stable/functions/watchFs.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.watchFs = void 0; + var promises_1 = require("fs/promises"); + var path_1 = require("path"); + var iterutil_js_1 = require_iterutil(); + var watchFs = function watchFs2(paths, options = { recursive: true }) { + paths = Array.isArray(paths) ? paths : [paths]; + const ac = new AbortController(); + const { signal } = ac; + const rid = -1; + const masterWatcher = (0, iterutil_js_1.merge)(paths.map((path) => (0, iterutil_js_1.mapAsync)((0, iterutil_js_1.filterAsync)((0, promises_1.watch)(path, { recursive: options?.recursive, signal }), (info) => info.filename != null), (info) => ({ + kind: "modify", + paths: [(0, path_1.resolve)(path, info.filename)] + })))); + function close() { + ac.abort(); + } + return Object.assign(masterWatcher, { + rid, + close, + [Symbol.dispose]: close + }); + }; + exports2.watchFs = watchFs; + } +}); + +// dist/script/deno/stable/functions/writeFile.js +var require_writeFile = __commonJS({ + "dist/script/deno/stable/functions/writeFile.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.writeFile = void 0; + var fs = __importStar2(require("fs/promises")); + var errorMap_js_1 = __importDefault(require_errorMap()); + var fs_flags_js_1 = require_fs_flags(); + var writeFile = async function writeFile2(path, data, { append = false, create = true, createNew = false, mode, signal } = {}) { + const truncate = create && !append; + const flag = (0, fs_flags_js_1.getFsFlag)({ append, create, createNew, truncate, write: true }); + try { + await fs.writeFile(path, data, { flag, signal }); + if (mode != null) + await fs.chmod(path, mode); + } catch (error) { + throw (0, errorMap_js_1.default)(error); + } + }; + exports2.writeFile = writeFile; + } +}); + +// dist/script/deno/stable/functions/writeFileSync.js +var require_writeFileSync = __commonJS({ + "dist/script/deno/stable/functions/writeFileSync.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.writeFileSync = void 0; + var os_1 = require("os"); + var openSync_js_1 = require_openSync(); + var errorMap_js_1 = __importDefault(require_errorMap()); + var statSync_js_1 = require_statSync(); + var chmodSync_js_1 = require_chmodSync(); + var writeFileSync = function writeFileSync2(path, data, options = {}) { + try { + if (options.create !== void 0) { + const create = !!options.create; + if (!create) { + (0, statSync_js_1.statSync)(path); + } + } + const openOptions = { + write: true, + create: true, + createNew: options.createNew, + append: !!options.append, + truncate: !options.append + }; + const file = (0, openSync_js_1.openSync)(path, openOptions); + if (options.mode !== void 0 && options.mode !== null && (0, os_1.platform)() !== "win32") { + (0, chmodSync_js_1.chmodSync)(path, options.mode); + } + let nwritten = 0; + while (nwritten < data.length) { + nwritten += file.writeSync(data.subarray(nwritten)); + } + file.close(); + } catch (e) { + throw (0, errorMap_js_1.default)(e); + } + }; + exports2.writeFileSync = writeFileSync; + } +}); + +// dist/script/deno/stable/variables/args.js +var require_args = __commonJS({ + "dist/script/deno/stable/variables/args.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.args = void 0; + exports2.args = process.argv.slice(2); + } +}); + +// dist/script/deno/stable/functions.js +var require_functions = __commonJS({ + "dist/script/deno/stable/functions.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.read = exports2.osUptime = exports2.osRelease = exports2.openSync = exports2.open = exports2.mkdirSync = exports2.mkdir = exports2.memoryUsage = exports2.makeTempFileSync = exports2.makeTempFile = exports2.makeTempDirSync = exports2.makeTempDir = exports2.lstatSync = exports2.lstat = exports2.loadavg = exports2.listenTls = exports2.listen = exports2.linkSync = exports2.link = exports2.kill = exports2.inspect = exports2.hostname = exports2.gid = exports2.ftruncateSync = exports2.ftruncate = exports2.fsyncSync = exports2.fsync = exports2.fstatSync = exports2.fstat = exports2.fdatasyncSync = exports2.fdatasync = exports2.exit = exports2.execPath = exports2.cwd = exports2.createSync = exports2.create = exports2.copyFileSync = exports2.copyFile = exports2.copy = exports2.consoleSize = exports2.connectTls = exports2.connect = exports2.close = exports2.chownSync = exports2.chown = exports2.chmodSync = exports2.chmod = exports2.chdir = exports2.addSignalListener = exports2.isatty = void 0; + exports2.utimeSync = exports2.utime = exports2.futimeSync = exports2.futime = exports2.args = exports2.writeTextFileSync = exports2.writeTextFile = exports2.writeSync = exports2.writeFileSync = exports2.writeFile = exports2.write = exports2.watchFs = exports2.uid = exports2.truncateSync = exports2.truncate = exports2.test = exports2.symlinkSync = exports2.symlink = exports2.statSync = exports2.stat = exports2.shutdown = exports2.run = exports2.Process = exports2.resolveDns = exports2.renameSync = exports2.rename = exports2.removeSync = exports2.removeSignalListener = exports2.remove = exports2.realPathSync = exports2.realPath = exports2.readTextFileSync = exports2.readTextFile = exports2.readSync = exports2.readLinkSync = exports2.readLink = exports2.readFileSync = exports2.readFile = exports2.readDirSync = exports2.readDir = void 0; + var fs_1 = __importDefault(require("fs")); + var errorMap_js_1 = __importDefault(require_errorMap()); + var variables_js_1 = require_variables(); + var tty_1 = require("tty"); + Object.defineProperty(exports2, "isatty", { enumerable: true, get: function() { + return tty_1.isatty; + } }); + var addSignalListener_js_1 = require_addSignalListener(); + Object.defineProperty(exports2, "addSignalListener", { enumerable: true, get: function() { + return addSignalListener_js_1.addSignalListener; + } }); + var chdir_js_1 = require_chdir(); + Object.defineProperty(exports2, "chdir", { enumerable: true, get: function() { + return chdir_js_1.chdir; + } }); + var chmod_js_1 = require_chmod(); + Object.defineProperty(exports2, "chmod", { enumerable: true, get: function() { + return chmod_js_1.chmod; + } }); + var chmodSync_js_1 = require_chmodSync(); + Object.defineProperty(exports2, "chmodSync", { enumerable: true, get: function() { + return chmodSync_js_1.chmodSync; + } }); + var chown_js_1 = require_chown(); + Object.defineProperty(exports2, "chown", { enumerable: true, get: function() { + return chown_js_1.chown; + } }); + var chownSync_js_1 = require_chownSync(); + Object.defineProperty(exports2, "chownSync", { enumerable: true, get: function() { + return chownSync_js_1.chownSync; + } }); + var close_js_1 = require_close(); + Object.defineProperty(exports2, "close", { enumerable: true, get: function() { + return close_js_1.close; + } }); + var connect_js_1 = require_connect(); + Object.defineProperty(exports2, "connect", { enumerable: true, get: function() { + return connect_js_1.connect; + } }); + var connectTls_js_1 = require_connectTls(); + Object.defineProperty(exports2, "connectTls", { enumerable: true, get: function() { + return connectTls_js_1.connectTls; + } }); + var consoleSize_js_1 = require_consoleSize(); + Object.defineProperty(exports2, "consoleSize", { enumerable: true, get: function() { + return consoleSize_js_1.consoleSize; + } }); + var copy_js_1 = require_copy(); + Object.defineProperty(exports2, "copy", { enumerable: true, get: function() { + return copy_js_1.copy; + } }); + var copyFile_js_1 = require_copyFile(); + Object.defineProperty(exports2, "copyFile", { enumerable: true, get: function() { + return copyFile_js_1.copyFile; + } }); + var copyFileSync_js_1 = require_copyFileSync(); + Object.defineProperty(exports2, "copyFileSync", { enumerable: true, get: function() { + return copyFileSync_js_1.copyFileSync; + } }); + var create_js_1 = require_create(); + Object.defineProperty(exports2, "create", { enumerable: true, get: function() { + return create_js_1.create; + } }); + var createSync_js_1 = require_createSync(); + Object.defineProperty(exports2, "createSync", { enumerable: true, get: function() { + return createSync_js_1.createSync; + } }); + var cwd_js_1 = require_cwd(); + Object.defineProperty(exports2, "cwd", { enumerable: true, get: function() { + return cwd_js_1.cwd; + } }); + var execPath_js_1 = require_execPath(); + Object.defineProperty(exports2, "execPath", { enumerable: true, get: function() { + return execPath_js_1.execPath; + } }); + var exit_js_1 = require_exit(); + Object.defineProperty(exports2, "exit", { enumerable: true, get: function() { + return exit_js_1.exit; + } }); + var fdatasync_js_1 = require_fdatasync(); + Object.defineProperty(exports2, "fdatasync", { enumerable: true, get: function() { + return fdatasync_js_1.fdatasync; + } }); + var fdatasyncSync_js_1 = require_fdatasyncSync(); + Object.defineProperty(exports2, "fdatasyncSync", { enumerable: true, get: function() { + return fdatasyncSync_js_1.fdatasyncSync; + } }); + var fstat_js_1 = require_fstat(); + Object.defineProperty(exports2, "fstat", { enumerable: true, get: function() { + return fstat_js_1.fstat; + } }); + var fstatSync_js_1 = require_fstatSync(); + Object.defineProperty(exports2, "fstatSync", { enumerable: true, get: function() { + return fstatSync_js_1.fstatSync; + } }); + var fsync_js_1 = require_fsync(); + Object.defineProperty(exports2, "fsync", { enumerable: true, get: function() { + return fsync_js_1.fsync; + } }); + var fsyncSync_js_1 = require_fsyncSync(); + Object.defineProperty(exports2, "fsyncSync", { enumerable: true, get: function() { + return fsyncSync_js_1.fsyncSync; + } }); + var ftruncate_js_1 = require_ftruncate(); + Object.defineProperty(exports2, "ftruncate", { enumerable: true, get: function() { + return ftruncate_js_1.ftruncate; + } }); + var ftruncateSync_js_1 = require_ftruncateSync(); + Object.defineProperty(exports2, "ftruncateSync", { enumerable: true, get: function() { + return ftruncateSync_js_1.ftruncateSync; + } }); + var gid_js_1 = require_gid(); + Object.defineProperty(exports2, "gid", { enumerable: true, get: function() { + return gid_js_1.gid; + } }); + var hostname_js_1 = require_hostname(); + Object.defineProperty(exports2, "hostname", { enumerable: true, get: function() { + return hostname_js_1.hostname; + } }); + var inspect_js_1 = require_inspect(); + Object.defineProperty(exports2, "inspect", { enumerable: true, get: function() { + return inspect_js_1.inspect; + } }); + var kill_js_1 = require_kill(); + Object.defineProperty(exports2, "kill", { enumerable: true, get: function() { + return kill_js_1.kill; + } }); + var link_js_1 = require_link(); + Object.defineProperty(exports2, "link", { enumerable: true, get: function() { + return link_js_1.link; + } }); + var linkSync_js_1 = require_linkSync(); + Object.defineProperty(exports2, "linkSync", { enumerable: true, get: function() { + return linkSync_js_1.linkSync; + } }); + var listen_js_1 = require_listen(); + Object.defineProperty(exports2, "listen", { enumerable: true, get: function() { + return listen_js_1.listen; + } }); + var listenTls_js_1 = require_listenTls(); + Object.defineProperty(exports2, "listenTls", { enumerable: true, get: function() { + return listenTls_js_1.listenTls; + } }); + var loadavg_js_1 = require_loadavg(); + Object.defineProperty(exports2, "loadavg", { enumerable: true, get: function() { + return loadavg_js_1.loadavg; + } }); + var lstat_js_1 = require_lstat(); + Object.defineProperty(exports2, "lstat", { enumerable: true, get: function() { + return lstat_js_1.lstat; + } }); + var lstatSync_js_1 = require_lstatSync(); + Object.defineProperty(exports2, "lstatSync", { enumerable: true, get: function() { + return lstatSync_js_1.lstatSync; + } }); + var makeTempDir_js_1 = require_makeTempDir(); + Object.defineProperty(exports2, "makeTempDir", { enumerable: true, get: function() { + return makeTempDir_js_1.makeTempDir; + } }); + var makeTempDirSync_js_1 = require_makeTempDirSync(); + Object.defineProperty(exports2, "makeTempDirSync", { enumerable: true, get: function() { + return makeTempDirSync_js_1.makeTempDirSync; + } }); + var makeTempFile_js_1 = require_makeTempFile(); + Object.defineProperty(exports2, "makeTempFile", { enumerable: true, get: function() { + return makeTempFile_js_1.makeTempFile; + } }); + var makeTempFileSync_js_1 = require_makeTempFileSync(); + Object.defineProperty(exports2, "makeTempFileSync", { enumerable: true, get: function() { + return makeTempFileSync_js_1.makeTempFileSync; + } }); + var memoryUsage_js_1 = require_memoryUsage(); + Object.defineProperty(exports2, "memoryUsage", { enumerable: true, get: function() { + return memoryUsage_js_1.memoryUsage; + } }); + var mkdir_js_1 = require_mkdir(); + Object.defineProperty(exports2, "mkdir", { enumerable: true, get: function() { + return mkdir_js_1.mkdir; + } }); + var mkdirSync_js_1 = require_mkdirSync(); + Object.defineProperty(exports2, "mkdirSync", { enumerable: true, get: function() { + return mkdirSync_js_1.mkdirSync; + } }); + var open_js_1 = require_open(); + Object.defineProperty(exports2, "open", { enumerable: true, get: function() { + return open_js_1.open; + } }); + var openSync_js_1 = require_openSync(); + Object.defineProperty(exports2, "openSync", { enumerable: true, get: function() { + return openSync_js_1.openSync; + } }); + var osRelease_js_1 = require_osRelease(); + Object.defineProperty(exports2, "osRelease", { enumerable: true, get: function() { + return osRelease_js_1.osRelease; + } }); + var osUptime_js_1 = require_osUptime(); + Object.defineProperty(exports2, "osUptime", { enumerable: true, get: function() { + return osUptime_js_1.osUptime; + } }); + var read_js_1 = require_read(); + Object.defineProperty(exports2, "read", { enumerable: true, get: function() { + return read_js_1.read; + } }); + var readDir_js_1 = require_readDir(); + Object.defineProperty(exports2, "readDir", { enumerable: true, get: function() { + return readDir_js_1.readDir; + } }); + var readDirSync_js_1 = require_readDirSync(); + Object.defineProperty(exports2, "readDirSync", { enumerable: true, get: function() { + return readDirSync_js_1.readDirSync; + } }); + var readFile_js_1 = require_readFile(); + Object.defineProperty(exports2, "readFile", { enumerable: true, get: function() { + return readFile_js_1.readFile; + } }); + var readFileSync_js_1 = require_readFileSync(); + Object.defineProperty(exports2, "readFileSync", { enumerable: true, get: function() { + return readFileSync_js_1.readFileSync; + } }); + var readLink_js_1 = require_readLink(); + Object.defineProperty(exports2, "readLink", { enumerable: true, get: function() { + return readLink_js_1.readLink; + } }); + var readLinkSync_js_1 = require_readLinkSync(); + Object.defineProperty(exports2, "readLinkSync", { enumerable: true, get: function() { + return readLinkSync_js_1.readLinkSync; + } }); + var readSync_js_1 = require_readSync(); + Object.defineProperty(exports2, "readSync", { enumerable: true, get: function() { + return readSync_js_1.readSync; + } }); + var readTextFile_js_1 = require_readTextFile(); + Object.defineProperty(exports2, "readTextFile", { enumerable: true, get: function() { + return readTextFile_js_1.readTextFile; + } }); + var readTextFileSync_js_1 = require_readTextFileSync(); + Object.defineProperty(exports2, "readTextFileSync", { enumerable: true, get: function() { + return readTextFileSync_js_1.readTextFileSync; + } }); + var realPath_js_1 = require_realPath(); + Object.defineProperty(exports2, "realPath", { enumerable: true, get: function() { + return realPath_js_1.realPath; + } }); + var realPathSync_js_1 = require_realPathSync(); + Object.defineProperty(exports2, "realPathSync", { enumerable: true, get: function() { + return realPathSync_js_1.realPathSync; + } }); + var remove_js_1 = require_remove(); + Object.defineProperty(exports2, "remove", { enumerable: true, get: function() { + return remove_js_1.remove; + } }); + var removeSignalListener_js_1 = require_removeSignalListener(); + Object.defineProperty(exports2, "removeSignalListener", { enumerable: true, get: function() { + return removeSignalListener_js_1.removeSignalListener; + } }); + var removeSync_js_1 = require_removeSync(); + Object.defineProperty(exports2, "removeSync", { enumerable: true, get: function() { + return removeSync_js_1.removeSync; + } }); + var rename_js_1 = require_rename(); + Object.defineProperty(exports2, "rename", { enumerable: true, get: function() { + return rename_js_1.rename; + } }); + var renameSync_js_1 = require_renameSync(); + Object.defineProperty(exports2, "renameSync", { enumerable: true, get: function() { + return renameSync_js_1.renameSync; + } }); + var resolveDns_js_1 = require_resolveDns(); + Object.defineProperty(exports2, "resolveDns", { enumerable: true, get: function() { + return resolveDns_js_1.resolveDns; + } }); + var run_js_1 = require_run(); + Object.defineProperty(exports2, "Process", { enumerable: true, get: function() { + return run_js_1.Process; + } }); + Object.defineProperty(exports2, "run", { enumerable: true, get: function() { + return run_js_1.run; + } }); + var shutdown_js_1 = require_shutdown(); + Object.defineProperty(exports2, "shutdown", { enumerable: true, get: function() { + return shutdown_js_1.shutdown; + } }); + var stat_js_1 = require_stat(); + Object.defineProperty(exports2, "stat", { enumerable: true, get: function() { + return stat_js_1.stat; + } }); + var statSync_js_1 = require_statSync(); + Object.defineProperty(exports2, "statSync", { enumerable: true, get: function() { + return statSync_js_1.statSync; + } }); + var symlink_js_1 = require_symlink(); + Object.defineProperty(exports2, "symlink", { enumerable: true, get: function() { + return symlink_js_1.symlink; + } }); + var symlinkSync_js_1 = require_symlinkSync(); + Object.defineProperty(exports2, "symlinkSync", { enumerable: true, get: function() { + return symlinkSync_js_1.symlinkSync; + } }); + var test_js_1 = require_test(); + Object.defineProperty(exports2, "test", { enumerable: true, get: function() { + return test_js_1.test; + } }); + var truncate_js_1 = require_truncate(); + Object.defineProperty(exports2, "truncate", { enumerable: true, get: function() { + return truncate_js_1.truncate; + } }); + var truncateSync_js_1 = require_truncateSync(); + Object.defineProperty(exports2, "truncateSync", { enumerable: true, get: function() { + return truncateSync_js_1.truncateSync; + } }); + var uid_js_1 = require_uid(); + Object.defineProperty(exports2, "uid", { enumerable: true, get: function() { + return uid_js_1.uid; + } }); + var watchFs_js_1 = require_watchFs(); + Object.defineProperty(exports2, "watchFs", { enumerable: true, get: function() { + return watchFs_js_1.watchFs; + } }); + var write_js_1 = require_write(); + Object.defineProperty(exports2, "write", { enumerable: true, get: function() { + return write_js_1.write; + } }); + var writeFile_js_1 = require_writeFile(); + Object.defineProperty(exports2, "writeFile", { enumerable: true, get: function() { + return writeFile_js_1.writeFile; + } }); + var writeFileSync_js_1 = require_writeFileSync(); + Object.defineProperty(exports2, "writeFileSync", { enumerable: true, get: function() { + return writeFileSync_js_1.writeFileSync; + } }); + var writeSync_js_1 = require_writeSync(); + Object.defineProperty(exports2, "writeSync", { enumerable: true, get: function() { + return writeSync_js_1.writeSync; + } }); + var writeTextFile_js_1 = require_writeTextFile(); + Object.defineProperty(exports2, "writeTextFile", { enumerable: true, get: function() { + return writeTextFile_js_1.writeTextFile; + } }); + var writeTextFileSync_js_1 = require_writeTextFileSync(); + Object.defineProperty(exports2, "writeTextFileSync", { enumerable: true, get: function() { + return writeTextFileSync_js_1.writeTextFileSync; + } }); + var args_js_1 = require_args(); + Object.defineProperty(exports2, "args", { enumerable: true, get: function() { + return args_js_1.args; + } }); + var futime = async function(rid, atime, mtime) { + try { + await new Promise((resolve, reject) => { + fs_1.default.futimes(rid, atime, mtime, (err) => { + if (err) { + reject(err); + } else { + resolve(); + } + }); + }); + } catch (error) { + throw (0, errorMap_js_1.default)(error); + } + }; + exports2.futime = futime; + var futimeSync = function(rid, atime, mtime) { + try { + fs_1.default.futimesSync(rid, atime, mtime); + } catch (error) { + throw (0, errorMap_js_1.default)(error); + } + }; + exports2.futimeSync = futimeSync; + var utime = async function(path, atime, mtime) { + try { + await fs_1.default.promises.utimes(path, atime, mtime); + } catch (error) { + if (error?.code === "ENOENT") { + throw new variables_js_1.errors.NotFound(`No such file or directory (os error 2), utime '${path}'`); + } + throw (0, errorMap_js_1.default)(error); + } + }; + exports2.utime = utime; + var utimeSync = function(path, atime, mtime) { + try { + fs_1.default.utimesSync(path, atime, mtime); + } catch (error) { + if (error?.code === "ENOENT") { + throw new variables_js_1.errors.NotFound(`No such file or directory (os error 2), utime '${path}'`); + } + throw (0, errorMap_js_1.default)(error); + } + }; + exports2.utimeSync = utimeSync; + } +}); + +// dist/script/deno/stable/types.js +var require_types = __commonJS({ + "dist/script/deno/stable/types.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// dist/script/deno/stable/main.js +var require_main = __commonJS({ + "dist/script/deno/stable/main.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar(require_classes(), exports2); + __exportStar(require_enums(), exports2); + __exportStar(require_functions(), exports2); + __exportStar(require_types(), exports2); + __exportStar(require_variables(), exports2); + } +}); + +// dist/script/index.js +var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); +} : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; +}); +var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +} : function(o, v) { + o["default"] = v; +}); +var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Deno = void 0; +exports.Deno = __importStar(require_main()); diff --git a/action/node_modules/@deno/shim-deno/dist/index.d.cts b/action/node_modules/@deno/shim-deno/dist/index.d.cts new file mode 100644 index 00000000..bc87ed47 --- /dev/null +++ b/action/node_modules/@deno/shim-deno/dist/index.d.cts @@ -0,0 +1,4762 @@ +// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. + +/// + +import { URL } from "url"; +import { ReadableStream, WritableStream } from "stream/web"; + +/** @category DOM Events */ +declare interface EventListenerOptions { + capture?: boolean; +} + +/** @category DOM Events */ +declare interface AddEventListenerOptions extends EventListenerOptions { + once?: boolean; + passive?: boolean; + signal?: AbortSignal; +} + +/** @category DOM Events */ +declare interface EventListener { + (evt: Event): void | Promise; +} + +/** @category DOM Events */ +declare interface EventListenerObject { + handleEvent(evt: Event): void | Promise; +} + +/** @category DOM Events */ +declare type EventListenerOrEventListenerObject = | EventListener + | EventListenerObject; + +interface Disposable { + [Symbol.dispose](): void; +} + +interface AsyncDisposable { + [Symbol.asyncDispose](): PromiseLike; +} + +export declare namespace Deno { + export const File: typeof FsFile; + + export class FsFile implements Deno.FsFile { + #private; + readonly rid: number; + constructor(rid: number); + get readable(): ReadableStream; + get writable(): WritableStream; + [Symbol.dispose](): void; + write(p: Uint8Array): Promise; + writeSync(p: Uint8Array): number; + truncate(len?: number): Promise; + truncateSync(len?: number): void; + read(p: Uint8Array): Promise; + readSync(p: Uint8Array): number | null; + seek(_offset: number, _whence: Deno.SeekMode): Promise; + seekSync(_offset: number, _whence: Deno.SeekMode): number; + stat(): Promise; + statSync(): Deno.FileInfo; + sync(): Promise; + syncSync(): void; + syncData(): Promise; + syncDataSync(): void; + utime(_atime: number | Date, _mtime: number | Date): Promise; + utimeSync(_atime: number | Date, _mtime: number | Date): void; + close(): void; + } + + export class Permissions implements Deno.Permissions { + query(desc: Deno.PermissionDescriptor): Promise; + querySync(_desc: Deno.PermissionDescriptor): PermissionStatus; + revoke(desc: Deno.PermissionDescriptor): Promise; + revokeSync(_desc: Deno.PermissionDescriptor): PermissionStatus; + request(desc: Deno.PermissionDescriptor): Promise; + requestSync(desc: Deno.PermissionDescriptor): PermissionStatus; + } + + export class PermissionStatus extends EventTarget implements Deno.PermissionStatus { + readonly state: Deno.PermissionState; + onchange: ((this: PermissionStatus, ev: Event) => any) | null; + readonly partial: boolean; + } + + export enum SeekMode { + Start = 0, + Current = 1, + End = 2 + } + + /** + * The `tty.isatty()` method returns `true` if the given `fd` is associated with + * a TTY and `false` if it is not, including whenever `fd` is not a non-negative + * integer. + * @since v0.5.8 + * @param fd A numeric file descriptor + */ + export function isatty(fd: number): boolean; + /** + * Registers the given function as a listener of the given signal event. + * + * ```ts + * Deno.addSignalListener( + * "SIGTERM", + * () => { + * console.log("SIGTERM!") + * } + * ); + * ``` + * + * _Note_: On Windows only `"SIGINT"` (CTRL+C) and `"SIGBREAK"` (CTRL+Break) + * are supported. + * + * @category Runtime Environment + */ + export function addSignalListener(signal: Signal, handler: () => void): void; + /** + * Change the current working directory to the specified path. + * + * ```ts + * Deno.chdir("/home/userA"); + * Deno.chdir("../userB"); + * Deno.chdir("C:\\Program Files (x86)\\Java"); + * ``` + * + * Throws {@linkcode Deno.errors.NotFound} if directory not found. + * + * Throws {@linkcode Deno.errors.PermissionDenied} if the user does not have + * operating system file access rights. + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category Runtime Environment + */ + export function chdir(directory: string | URL): void; + /** + * Changes the permission of a specific file/directory of specified path. + * Ignores the process's umask. + * + * ```ts + * await Deno.chmod("/path/to/file", 0o666); + * ``` + * + * The mode is a sequence of 3 octal numbers. The first/left-most number + * specifies the permissions for the owner. The second number specifies the + * permissions for the group. The last/right-most number specifies the + * permissions for others. For example, with a mode of 0o764, the owner (7) + * can read/write/execute, the group (6) can read/write and everyone else (4) + * can read only. + * + * | Number | Description | + * | ------ | ----------- | + * | 7 | read, write, and execute | + * | 6 | read and write | + * | 5 | read and execute | + * | 4 | read only | + * | 3 | write and execute | + * | 2 | write only | + * | 1 | execute only | + * | 0 | no permission | + * + * NOTE: This API currently throws on Windows + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function chmod(path: string | URL, mode: number): Promise; + /** + * Synchronously changes the permission of a specific file/directory of + * specified path. Ignores the process's umask. + * + * ```ts + * Deno.chmodSync("/path/to/file", 0o666); + * ``` + * + * For a full description, see {@linkcode Deno.chmod}. + * + * NOTE: This API currently throws on Windows + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function chmodSync(path: string | URL, mode: number): void; + /** + * Change owner of a regular file or directory. + * + * This functionality is not available on Windows. + * + * ```ts + * await Deno.chown("myFile.txt", 1000, 1002); + * ``` + * + * Requires `allow-write` permission. + * + * Throws Error (not implemented) if executed on Windows. + * + * @tags allow-write + * @category File System + * @param path path to the file + * @param uid user id (UID) of the new owner, or `null` for no change + * @param gid group id (GID) of the new owner, or `null` for no change + */ + export function chown(path: string | URL, uid: number | null, gid: number | null): Promise; + /** + * Synchronously change owner of a regular file or directory. + * + * This functionality is not available on Windows. + * + * ```ts + * Deno.chownSync("myFile.txt", 1000, 1002); + * ``` + * + * Requires `allow-write` permission. + * + * Throws Error (not implemented) if executed on Windows. + * + * @tags allow-write + * @category File System + * @param path path to the file + * @param uid user id (UID) of the new owner, or `null` for no change + * @param gid group id (GID) of the new owner, or `null` for no change + */ + export function chownSync(path: string | URL, uid: number | null, gid: number | null): void; + /** + * Close the given resource ID (`rid`) which has been previously opened, such + * as via opening or creating a file. Closing a file when you are finished + * with it is important to avoid leaking resources. + * + * ```ts + * const file = await Deno.open("my_file.txt"); + * // do work with "file" object + * Deno.close(file.rid); + * ``` + * + * It is recommended to define the variable with the `using` keyword so the + * runtime will automatically close the resource when it goes out of scope. + * Doing so negates the need to manually close the resource. + * + * ```ts + * using file = await Deno.open("my_file.txt"); + * // do work with "file" object + * ``` + * + * @deprecated Use `.close()` method on the resource instead. + * {@linkcode Deno.close} will be removed in Deno 2.0. + * @category I/O + */ + export function close(rid: number): void; + /** + * Connects to the hostname (default is "127.0.0.1") and port on the named + * transport (default is "tcp"), and resolves to the connection (`Conn`). + * + * ```ts + * const conn1 = await Deno.connect({ port: 80 }); + * const conn2 = await Deno.connect({ hostname: "192.0.2.1", port: 80 }); + * const conn3 = await Deno.connect({ hostname: "[2001:db8::1]", port: 80 }); + * const conn4 = await Deno.connect({ hostname: "golang.org", port: 80, transport: "tcp" }); + * ``` + * + * Requires `allow-net` permission for "tcp". + * + * @tags allow-net + * @category Network + */ + export function connect(options: ConnectOptions): Promise; + /** + * Connects to the hostname (default is "127.0.0.1") and port on the named + * transport (default is "tcp"), and resolves to the connection (`Conn`). + * + * ```ts + * const conn1 = await Deno.connect({ port: 80 }); + * const conn2 = await Deno.connect({ hostname: "192.0.2.1", port: 80 }); + * const conn3 = await Deno.connect({ hostname: "[2001:db8::1]", port: 80 }); + * const conn4 = await Deno.connect({ hostname: "golang.org", port: 80, transport: "tcp" }); + * const conn5 = await Deno.connect({ path: "/foo/bar.sock", transport: "unix" }); + * ``` + * + * Requires `allow-net` permission for "tcp" and `allow-read` for "unix". + * + * @tags allow-net, allow-read + * @category Network + */ + export function connect(options: UnixConnectOptions): Promise; + /** + * Establishes a secure connection over TLS (transport layer security) using + * an optional cert file, hostname (default is "127.0.0.1") and port. The + * cert file is optional and if not included Mozilla's root certificates will + * be used (see also https://github.com/ctz/webpki-roots for specifics) + * + * ```ts + * const caCert = await Deno.readTextFile("./certs/my_custom_root_CA.pem"); + * const conn1 = await Deno.connectTls({ port: 80 }); + * const conn2 = await Deno.connectTls({ caCerts: [caCert], hostname: "192.0.2.1", port: 80 }); + * const conn3 = await Deno.connectTls({ hostname: "[2001:db8::1]", port: 80 }); + * const conn4 = await Deno.connectTls({ caCerts: [caCert], hostname: "golang.org", port: 80}); + * ``` + * + * Requires `allow-net` permission. + * + * @tags allow-net + * @category Network + */ + export function connectTls(options: ConnectTlsOptions): Promise; + /** + * Gets the size of the console as columns/rows. + * + * ```ts + * const { columns, rows } = Deno.consoleSize(); + * ``` + * + * This returns the size of the console window as reported by the operating + * system. It's not a reflection of how many characters will fit within the + * console window, but can be used as part of that calculation. + * + * @category I/O + */ + export function consoleSize(): { + columns: number; + rows: number; + }; + /** + * Copies from `src` to `dst` until either EOF (`null`) is read from `src` or + * an error occurs. It resolves to the number of bytes copied or rejects with + * the first error encountered while copying. + * + * @deprecated Use {@linkcode https://deno.land/std/io/copy.ts?s=copy | copy} + * instead. {@linkcode Deno.copy} will be removed in v2.0.0. + * @category I/O + * @param src The source to copy from + * @param dst The destination to copy to + * @param options Can be used to tune size of the buffer. Default size is 32kB + */ + export function copy(src: Reader, dst: Writer, options?: { bufSize?: number }): Promise; + /** + * Copies the contents and permissions of one file to another specified path, + * by default creating a new file if needed, else overwriting. Fails if target + * path is a directory or is unwritable. + * + * ```ts + * await Deno.copyFile("from.txt", "to.txt"); + * ``` + * + * Requires `allow-read` permission on `fromPath`. + * + * Requires `allow-write` permission on `toPath`. + * + * @tags allow-read, allow-write + * @category File System + */ + export function copyFile(fromPath: string | URL, toPath: string | URL): Promise; + /** + * Synchronously copies the contents and permissions of one file to another + * specified path, by default creating a new file if needed, else overwriting. + * Fails if target path is a directory or is unwritable. + * + * ```ts + * Deno.copyFileSync("from.txt", "to.txt"); + * ``` + * + * Requires `allow-read` permission on `fromPath`. + * + * Requires `allow-write` permission on `toPath`. + * + * @tags allow-read, allow-write + * @category File System + */ + export function copyFileSync(fromPath: string | URL, toPath: string | URL): void; + /** + * Creates a file if none exists or truncates an existing file and resolves to + * an instance of {@linkcode Deno.FsFile}. + * + * ```ts + * const file = await Deno.create("/foo/bar.txt"); + * ``` + * + * Requires `allow-read` and `allow-write` permissions. + * + * @tags allow-read, allow-write + * @category File System + */ + export function create(path: string | URL): Promise; + /** + * Creates a file if none exists or truncates an existing file and returns + * an instance of {@linkcode Deno.FsFile}. + * + * ```ts + * const file = Deno.createSync("/foo/bar.txt"); + * ``` + * + * Requires `allow-read` and `allow-write` permissions. + * + * @tags allow-read, allow-write + * @category File System + */ + export function createSync(path: string | URL): FsFile; + /** + * Return a string representing the current working directory. + * + * If the current directory can be reached via multiple paths (due to symbolic + * links), `cwd()` may return any one of them. + * + * ```ts + * const currentWorkingDirectory = Deno.cwd(); + * ``` + * + * Throws {@linkcode Deno.errors.NotFound} if directory not available. + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category Runtime Environment + */ + export function cwd(): string; + /** + * Returns the path to the current deno executable. + * + * ```ts + * console.log(Deno.execPath()); // e.g. "/home/alice/.local/bin/deno" + * ``` + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category Runtime Environment + */ + export function execPath(): string; + /** + * Exit the Deno process with optional exit code. + * + * If no exit code is supplied then Deno will exit with return code of `0`. + * + * In worker contexts this is an alias to `self.close();`. + * + * ```ts + * Deno.exit(5); + * ``` + * + * @category Runtime Environment + */ + export function exit(code?: number): never; + /** + * Flushes any pending data operations of the given file stream to disk. + * ```ts + * const file = await Deno.open( + * "my_file.txt", + * { read: true, write: true, create: true }, + * ); + * await file.write(new TextEncoder().encode("Hello World")); + * await Deno.fdatasync(file.rid); + * console.log(await Deno.readTextFile("my_file.txt")); // Hello World + * ``` + * + * @category I/O + */ + export function fdatasync(rid: number): Promise; + /** + * Synchronously flushes any pending data operations of the given file stream + * to disk. + * + * ```ts + * const file = Deno.openSync( + * "my_file.txt", + * { read: true, write: true, create: true }, + * ); + * Deno.writeSync(file.rid, new TextEncoder().encode("Hello World")); + * Deno.fdatasyncSync(file.rid); + * console.log(Deno.readTextFileSync("my_file.txt")); // Hello World + * ``` + * + * @category I/O + */ + export function fdatasyncSync(rid: number): void; + /** + * Returns a `Deno.FileInfo` for the given file stream. + * + * ```ts + * import { assert } from "https://deno.land/std/assert/mod.ts"; + * + * const file = await Deno.open("file.txt", { read: true }); + * const fileInfo = await Deno.fstat(file.rid); + * assert(fileInfo.isFile); + * ``` + * + * @deprecated Use `file.stat()` instead. + * {@linkcode Deno.fstat} will be removed in Deno 2.0. + * @category File System + */ + export function fstat(rid: number): Promise; + /** + * Synchronously returns a {@linkcode Deno.FileInfo} for the given file + * stream. + * + * ```ts + * import { assert } from "https://deno.land/std/assert/mod.ts"; + * + * const file = Deno.openSync("file.txt", { read: true }); + * const fileInfo = Deno.fstatSync(file.rid); + * assert(fileInfo.isFile); + * ``` + * + * @deprecated Use `file.statSync()` instead. + * {@linkcode Deno.fstatSync} will be removed in Deno 2.0. + * @category File System + */ + export function fstatSync(rid: number): FileInfo; + /** + * Flushes any pending data and metadata operations of the given file stream + * to disk. + * + * ```ts + * const file = await Deno.open( + * "my_file.txt", + * { read: true, write: true, create: true }, + * ); + * await file.write(new TextEncoder().encode("Hello World")); + * await file.truncate(1); + * await Deno.fsync(file.rid); + * console.log(await Deno.readTextFile("my_file.txt")); // H + * ``` + * + * @category I/O + */ + export function fsync(rid: number): Promise; + /** + * Synchronously flushes any pending data and metadata operations of the given + * file stream to disk. + * + * ```ts + * const file = Deno.openSync( + * "my_file.txt", + * { read: true, write: true, create: true }, + * ); + * Deno.writeSync(file.rid, new TextEncoder().encode("Hello World")); + * file.truncateSync(1); + * Deno.fsyncSync(file.rid); + * console.log(Deno.readTextFileSync("my_file.txt")); // H + * ``` + * + * @category I/O + */ + export function fsyncSync(rid: number): void; + /** + * Truncates or extends the specified file stream, to reach the specified + * `len`. + * + * If `len` is not specified then the entire file contents are truncated as if + * `len` was set to `0`. + * + * If the file previously was larger than this new length, the extra data is + * lost. + * + * If the file previously was shorter, it is extended, and the extended part + * reads as null bytes ('\0'). + * + * ### Truncate the entire file + * + * ```ts + * const file = await Deno.open( + * "my_file.txt", + * { read: true, write: true, create: true } + * ); + * await Deno.ftruncate(file.rid); + * ``` + * + * ### Truncate part of the file + * + * ```ts + * const file = await Deno.open( + * "my_file.txt", + * { read: true, write: true, create: true } + * ); + * await file.write(new TextEncoder().encode("Hello World")); + * await Deno.ftruncate(file.rid, 7); + * const data = new Uint8Array(32); + * await Deno.read(file.rid, data); + * console.log(new TextDecoder().decode(data)); // Hello W + * ``` + * + * @deprecated Use {@linkcode Deno.FsFile.truncate} instead. + * {@linkcode Deno.ftruncate} will be removed in Deno 2.0. + * @category File System + */ + export function ftruncate(rid: number, len?: number): Promise; + /** + * Synchronously truncates or extends the specified file stream, to reach the + * specified `len`. + * + * If `len` is not specified then the entire file contents are truncated as if + * `len` was set to `0`. + * + * If the file previously was larger than this new length, the extra data is + * lost. + * + * If the file previously was shorter, it is extended, and the extended part + * reads as null bytes ('\0'). + * + * ### Truncate the entire file + * + * ```ts + * const file = Deno.openSync( + * "my_file.txt", + * { read: true, write: true, truncate: true, create: true } + * ); + * Deno.ftruncateSync(file.rid); + * ``` + * + * ### Truncate part of the file + * + * ```ts + * const file = Deno.openSync( + * "my_file.txt", + * { read: true, write: true, create: true } + * ); + * Deno.writeSync(file.rid, new TextEncoder().encode("Hello World")); + * Deno.ftruncateSync(file.rid, 7); + * Deno.seekSync(file.rid, 0, Deno.SeekMode.Start); + * const data = new Uint8Array(32); + * Deno.readSync(file.rid, data); + * console.log(new TextDecoder().decode(data)); // Hello W + * ``` + * + * @deprecated Use {@linkcode Deno.FsFile.truncateSync} instead. + * {@linkcode Deno.ftruncateSync} will be removed in Deno 2.0. + * @category File System + */ + export function ftruncateSync(rid: number, len?: number): void; + /** + * Returns the group id of the process on POSIX platforms. Returns null on windows. + * + * ```ts + * console.log(Deno.gid()); + * ``` + * + * Requires `allow-sys` permission. + * + * @tags allow-sys + * @category Runtime Environment + */ + export function gid(): number | null; + /** + * Get the `hostname` of the machine the Deno process is running on. + * + * ```ts + * console.log(Deno.hostname()); + * ``` + * + * Requires `allow-sys` permission. + * + * @tags allow-sys + * @category Runtime Environment + */ + export function hostname(): string; + /** + * Converts the input into a string that has the same format as printed by + * `console.log()`. + * + * ```ts + * const obj = { + * a: 10, + * b: "hello", + * }; + * const objAsString = Deno.inspect(obj); // { a: 10, b: "hello" } + * console.log(obj); // prints same value as objAsString, e.g. { a: 10, b: "hello" } + * ``` + * + * A custom inspect functions can be registered on objects, via the symbol + * `Symbol.for("Deno.customInspect")`, to control and customize the output + * of `inspect()` or when using `console` logging: + * + * ```ts + * class A { + * x = 10; + * y = "hello"; + * [Symbol.for("Deno.customInspect")]() { + * return `x=${this.x}, y=${this.y}`; + * } + * } + * + * const inStringFormat = Deno.inspect(new A()); // "x=10, y=hello" + * console.log(inStringFormat); // prints "x=10, y=hello" + * ``` + * + * A depth can be specified by using the `depth` option: + * + * ```ts + * Deno.inspect({a: {b: {c: {d: 'hello'}}}}, {depth: 2}); // { a: { b: [Object] } } + * ``` + * + * @category Console and Debugging + */ + export function inspect(value: unknown, options?: InspectOptions): string; + /** + * Send a signal to process under given `pid`. The value and meaning of the + * `signal` to the process is operating system and process dependant. + * {@linkcode Signal} provides the most common signals. Default signal + * is `"SIGTERM"`. + * + * The term `kill` is adopted from the UNIX-like command line command `kill` + * which also signals processes. + * + * If `pid` is negative, the signal will be sent to the process group + * identified by `pid`. An error will be thrown if a negative `pid` is used on + * Windows. + * + * ```ts + * const p = Deno.run({ + * cmd: ["sleep", "10000"] + * }); + * + * Deno.kill(p.pid, "SIGINT"); + * ``` + * + * Requires `allow-run` permission. + * + * @tags allow-run + * @category Sub Process + */ + export function kill(pid: number, signo?: Signal): void; + /** + * Creates `newpath` as a hard link to `oldpath`. + * + * ```ts + * await Deno.link("old/name", "new/name"); + * ``` + * + * Requires `allow-read` and `allow-write` permissions. + * + * @tags allow-read, allow-write + * @category File System + */ + export function link(oldpath: string, newpath: string): Promise; + /** + * Synchronously creates `newpath` as a hard link to `oldpath`. + * + * ```ts + * Deno.linkSync("old/name", "new/name"); + * ``` + * + * Requires `allow-read` and `allow-write` permissions. + * + * @tags allow-read, allow-write + * @category File System + */ + export function linkSync(oldpath: string, newpath: string): void; + /** + * Listen announces on the local transport address. + * + * ```ts + * const listener1 = Deno.listen({ port: 80 }) + * const listener2 = Deno.listen({ hostname: "192.0.2.1", port: 80 }) + * const listener3 = Deno.listen({ hostname: "[2001:db8::1]", port: 80 }); + * const listener4 = Deno.listen({ hostname: "golang.org", port: 80, transport: "tcp" }); + * ``` + * + * Requires `allow-net` permission. + * + * @tags allow-net + * @category Network + */ + export function listen(options: TcpListenOptions & { transport?: "tcp" }): Listener; + /** + * Listen announces on the local transport address. + * + * ```ts + * const listener = Deno.listen({ path: "/foo/bar.sock", transport: "unix" }) + * ``` + * + * Requires `allow-read` and `allow-write` permission. + * + * @tags allow-read, allow-write + * @category Network + */ + export function listen(options: UnixListenOptions & { transport: "unix" }): Listener; + /** + * Listen announces on the local transport address over TLS (transport layer + * security). + * + * ```ts + * using listener = Deno.listenTls({ + * port: 443, + * cert: Deno.readTextFileSync("./server.crt"), + * key: Deno.readTextFileSync("./server.key"), + * }); + * ``` + * + * Requires `allow-net` permission. + * + * @tags allow-net + * @category Network + */ + export function listenTls(options: ListenTlsOptions): TlsListener; + /** + * Returns an array containing the 1, 5, and 15 minute load averages. The + * load average is a measure of CPU and IO utilization of the last one, five, + * and 15 minute periods expressed as a fractional number. Zero means there + * is no load. On Windows, the three values are always the same and represent + * the current load, not the 1, 5 and 15 minute load averages. + * + * ```ts + * console.log(Deno.loadavg()); // e.g. [ 0.71, 0.44, 0.44 ] + * ``` + * + * Requires `allow-sys` permission. + * + * On Windows there is no API available to retrieve this information and this method returns `[ 0, 0, 0 ]`. + * + * @tags allow-sys + * @category Observability + */ + export function loadavg(): number[]; + /** + * Resolves to a {@linkcode Deno.FileInfo} for the specified `path`. If + * `path` is a symlink, information for the symlink will be returned instead + * of what it points to. + * + * ```ts + * import { assert } from "https://deno.land/std/assert/mod.ts"; + * const fileInfo = await Deno.lstat("hello.txt"); + * assert(fileInfo.isFile); + * ``` + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category File System + */ + export function lstat(path: string | URL): Promise; + /** + * Synchronously returns a {@linkcode Deno.FileInfo} for the specified + * `path`. If `path` is a symlink, information for the symlink will be + * returned instead of what it points to. + * + * ```ts + * import { assert } from "https://deno.land/std/assert/mod.ts"; + * const fileInfo = Deno.lstatSync("hello.txt"); + * assert(fileInfo.isFile); + * ``` + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category File System + */ + export function lstatSync(path: string | URL): FileInfo; + /** + * Creates a new temporary directory in the default directory for temporary + * files, unless `dir` is specified. Other optional options include + * prefixing and suffixing the directory name with `prefix` and `suffix` + * respectively. + * + * This call resolves to the full path to the newly created directory. + * + * Multiple programs calling this function simultaneously will create different + * directories. It is the caller's responsibility to remove the directory when + * no longer needed. + * + * ```ts + * const tempDirName0 = await Deno.makeTempDir(); // e.g. /tmp/2894ea76 + * const tempDirName1 = await Deno.makeTempDir({ prefix: 'my_temp' }); // e.g. /tmp/my_temp339c944d + * ``` + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function makeTempDir(options?: MakeTempOptions): Promise; + /** + * Synchronously creates a new temporary directory in the default directory + * for temporary files, unless `dir` is specified. Other optional options + * include prefixing and suffixing the directory name with `prefix` and + * `suffix` respectively. + * + * The full path to the newly created directory is returned. + * + * Multiple programs calling this function simultaneously will create different + * directories. It is the caller's responsibility to remove the directory when + * no longer needed. + * + * ```ts + * const tempDirName0 = Deno.makeTempDirSync(); // e.g. /tmp/2894ea76 + * const tempDirName1 = Deno.makeTempDirSync({ prefix: 'my_temp' }); // e.g. /tmp/my_temp339c944d + * ``` + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function makeTempDirSync(options?: MakeTempOptions): string; + /** + * Creates a new temporary file in the default directory for temporary + * files, unless `dir` is specified. + * + * Other options include prefixing and suffixing the directory name with + * `prefix` and `suffix` respectively. + * + * This call resolves to the full path to the newly created file. + * + * Multiple programs calling this function simultaneously will create + * different files. It is the caller's responsibility to remove the file when + * no longer needed. + * + * ```ts + * const tmpFileName0 = await Deno.makeTempFile(); // e.g. /tmp/419e0bf2 + * const tmpFileName1 = await Deno.makeTempFile({ prefix: 'my_temp' }); // e.g. /tmp/my_temp754d3098 + * ``` + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function makeTempFile(options?: MakeTempOptions): Promise; + /** + * Synchronously creates a new temporary file in the default directory for + * temporary files, unless `dir` is specified. + * + * Other options include prefixing and suffixing the directory name with + * `prefix` and `suffix` respectively. + * + * The full path to the newly created file is returned. + * + * Multiple programs calling this function simultaneously will create + * different files. It is the caller's responsibility to remove the file when + * no longer needed. + * + * ```ts + * const tempFileName0 = Deno.makeTempFileSync(); // e.g. /tmp/419e0bf2 + * const tempFileName1 = Deno.makeTempFileSync({ prefix: 'my_temp' }); // e.g. /tmp/my_temp754d3098 + * ``` + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function makeTempFileSync(options?: MakeTempOptions): string; + /** + * Returns an object describing the memory usage of the Deno process and the + * V8 subsystem measured in bytes. + * + * @category Runtime Environment + */ + export function memoryUsage(): MemoryUsage; + /** + * Creates a new directory with the specified path. + * + * ```ts + * await Deno.mkdir("new_dir"); + * await Deno.mkdir("nested/directories", { recursive: true }); + * await Deno.mkdir("restricted_access_dir", { mode: 0o700 }); + * ``` + * + * Defaults to throwing error if the directory already exists. + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function mkdir(path: string | URL, options?: MkdirOptions): Promise; + /** + * Synchronously creates a new directory with the specified path. + * + * ```ts + * Deno.mkdirSync("new_dir"); + * Deno.mkdirSync("nested/directories", { recursive: true }); + * Deno.mkdirSync("restricted_access_dir", { mode: 0o700 }); + * ``` + * + * Defaults to throwing error if the directory already exists. + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function mkdirSync(path: string | URL, options?: MkdirOptions): void; + /** + * Open a file and resolve to an instance of {@linkcode Deno.FsFile}. The + * file does not need to previously exist if using the `create` or `createNew` + * open options. The caller may have the resulting file automatically closed + * by the runtime once it's out of scope by declaring the file variable with + * the `using` keyword. + * + * ```ts + * using file = await Deno.open("/foo/bar.txt", { read: true, write: true }); + * // Do work with file + * ``` + * + * Alternatively, the caller may manually close the resource when finished with + * it. + * + * ```ts + * const file = await Deno.open("/foo/bar.txt", { read: true, write: true }); + * // Do work with file + * file.close(); + * ``` + * + * Requires `allow-read` and/or `allow-write` permissions depending on + * options. + * + * @tags allow-read, allow-write + * @category File System + */ + export function open(path: string | URL, options?: OpenOptions): Promise; + /** + * Synchronously open a file and return an instance of + * {@linkcode Deno.FsFile}. The file does not need to previously exist if + * using the `create` or `createNew` open options. The caller may have the + * resulting file automatically closed by the runtime once it's out of scope + * by declaring the file variable with the `using` keyword. + * + * ```ts + * using file = Deno.openSync("/foo/bar.txt", { read: true, write: true }); + * // Do work with file + * ``` + * + * Alternatively, the caller may manually close the resource when finished with + * it. + * + * ```ts + * const file = Deno.openSync("/foo/bar.txt", { read: true, write: true }); + * // Do work with file + * file.close(); + * ``` + * + * Requires `allow-read` and/or `allow-write` permissions depending on + * options. + * + * @tags allow-read, allow-write + * @category File System + */ + export function openSync(path: string | URL, options?: OpenOptions): FsFile; + /** + * Returns the release version of the Operating System. + * + * ```ts + * console.log(Deno.osRelease()); + * ``` + * + * Requires `allow-sys` permission. + * Under consideration to possibly move to Deno.build or Deno.versions and if + * it should depend sys-info, which may not be desirable. + * + * @tags allow-sys + * @category Runtime Environment + */ + export function osRelease(): string; + /** + * Returns the Operating System uptime in number of seconds. + * + * ```ts + * console.log(Deno.osUptime()); + * ``` + * + * Requires `allow-sys` permission. + * + * @tags allow-sys + * @category Runtime Environment + */ + export function osUptime(): number; + /** + * Read from a resource ID (`rid`) into an array buffer (`buffer`). + * + * Resolves to either the number of bytes read during the operation or EOF + * (`null`) if there was nothing more to read. + * + * It is possible for a read to successfully return with `0` bytes. This does + * not indicate EOF. + * + * This function is one of the lowest level APIs and most users should not + * work with this directly, but rather use {@linkcode ReadableStream} and + * {@linkcode https://deno.land/std/streams/mod.ts?s=toArrayBuffer|toArrayBuffer} + * instead. + * + * **It is not guaranteed that the full buffer will be read in a single call.** + * + * ```ts + * // if "/foo/bar.txt" contains the text "hello world": + * using file = await Deno.open("/foo/bar.txt"); + * const buf = new Uint8Array(100); + * const numberOfBytesRead = await Deno.read(file.rid, buf); // 11 bytes + * const text = new TextDecoder().decode(buf); // "hello world" + * ``` + * + * @deprecated Use `reader.read()` instead. {@linkcode Deno.read} will be + * removed in Deno 2.0. + * @category I/O + */ + export function read(rid: number, buffer: Uint8Array): Promise; + /** + * Reads the directory given by `path` and returns an async iterable of + * {@linkcode Deno.DirEntry}. The order of entries is not guaranteed. + * + * ```ts + * for await (const dirEntry of Deno.readDir("/")) { + * console.log(dirEntry.name); + * } + * ``` + * + * Throws error if `path` is not a directory. + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category File System + */ + export function readDir(path: string | URL): AsyncIterable; + /** + * Synchronously reads the directory given by `path` and returns an iterable + * of {@linkcode Deno.DirEntry}. The order of entries is not guaranteed. + * + * ```ts + * for (const dirEntry of Deno.readDirSync("/")) { + * console.log(dirEntry.name); + * } + * ``` + * + * Throws error if `path` is not a directory. + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category File System + */ + export function readDirSync(path: string | URL): Iterable; + /** + * Reads and resolves to the entire contents of a file as an array of bytes. + * `TextDecoder` can be used to transform the bytes to string if required. + * Reading a directory returns an empty data array. + * + * ```ts + * const decoder = new TextDecoder("utf-8"); + * const data = await Deno.readFile("hello.txt"); + * console.log(decoder.decode(data)); + * ``` + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category File System + */ + export function readFile(path: string | URL, options?: ReadFileOptions): Promise; + /** + * Synchronously reads and returns the entire contents of a file as an array + * of bytes. `TextDecoder` can be used to transform the bytes to string if + * required. Reading a directory returns an empty data array. + * + * ```ts + * const decoder = new TextDecoder("utf-8"); + * const data = Deno.readFileSync("hello.txt"); + * console.log(decoder.decode(data)); + * ``` + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category File System + */ + export function readFileSync(path: string | URL): Uint8Array; + /** + * Resolves to the full path destination of the named symbolic link. + * + * ```ts + * await Deno.symlink("./test.txt", "./test_link.txt"); + * const target = await Deno.readLink("./test_link.txt"); // full path of ./test.txt + * ``` + * + * Throws TypeError if called with a hard link. + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category File System + */ + export function readLink(path: string | URL): Promise; + /** + * Synchronously returns the full path destination of the named symbolic + * link. + * + * ```ts + * Deno.symlinkSync("./test.txt", "./test_link.txt"); + * const target = Deno.readLinkSync("./test_link.txt"); // full path of ./test.txt + * ``` + * + * Throws TypeError if called with a hard link. + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category File System + */ + export function readLinkSync(path: string | URL): string; + /** + * Synchronously read from a resource ID (`rid`) into an array buffer + * (`buffer`). + * + * Returns either the number of bytes read during the operation or EOF + * (`null`) if there was nothing more to read. + * + * It is possible for a read to successfully return with `0` bytes. This does + * not indicate EOF. + * + * This function is one of the lowest level APIs and most users should not + * work with this directly, but rather use {@linkcode ReadableStream} and + * {@linkcode https://deno.land/std/streams/mod.ts?s=toArrayBuffer|toArrayBuffer} + * instead. + * + * **It is not guaranteed that the full buffer will be read in a single + * call.** + * + * ```ts + * // if "/foo/bar.txt" contains the text "hello world": + * using file = Deno.openSync("/foo/bar.txt"); + * const buf = new Uint8Array(100); + * const numberOfBytesRead = Deno.readSync(file.rid, buf); // 11 bytes + * const text = new TextDecoder().decode(buf); // "hello world" + * ``` + * + * @deprecated Use `reader.readSync()` instead. {@linkcode Deno.readSync} + * will be removed in Deno 2.0. + * @category I/O + */ + export function readSync(rid: number, buffer: Uint8Array): number | null; + /** + * Asynchronously reads and returns the entire contents of a file as an UTF-8 + * decoded string. Reading a directory throws an error. + * + * ```ts + * const data = await Deno.readTextFile("hello.txt"); + * console.log(data); + * ``` + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category File System + */ + export function readTextFile(path: string | URL, options?: ReadFileOptions): Promise; + /** + * Synchronously reads and returns the entire contents of a file as an UTF-8 + * decoded string. Reading a directory throws an error. + * + * ```ts + * const data = Deno.readTextFileSync("hello.txt"); + * console.log(data); + * ``` + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category File System + */ + export function readTextFileSync(path: string | URL): string; + /** + * Resolves to the absolute normalized path, with symbolic links resolved. + * + * ```ts + * // e.g. given /home/alice/file.txt and current directory /home/alice + * await Deno.symlink("file.txt", "symlink_file.txt"); + * const realPath = await Deno.realPath("./file.txt"); + * const realSymLinkPath = await Deno.realPath("./symlink_file.txt"); + * console.log(realPath); // outputs "/home/alice/file.txt" + * console.log(realSymLinkPath); // outputs "/home/alice/file.txt" + * ``` + * + * Requires `allow-read` permission for the target path. + * + * Also requires `allow-read` permission for the `CWD` if the target path is + * relative. + * + * @tags allow-read + * @category File System + */ + export function realPath(path: string | URL): Promise; + /** + * Synchronously returns absolute normalized path, with symbolic links + * resolved. + * + * ```ts + * // e.g. given /home/alice/file.txt and current directory /home/alice + * Deno.symlinkSync("file.txt", "symlink_file.txt"); + * const realPath = Deno.realPathSync("./file.txt"); + * const realSymLinkPath = Deno.realPathSync("./symlink_file.txt"); + * console.log(realPath); // outputs "/home/alice/file.txt" + * console.log(realSymLinkPath); // outputs "/home/alice/file.txt" + * ``` + * + * Requires `allow-read` permission for the target path. + * + * Also requires `allow-read` permission for the `CWD` if the target path is + * relative. + * + * @tags allow-read + * @category File System + */ + export function realPathSync(path: string | URL): string; + /** + * Removes the named file or directory. + * + * ```ts + * await Deno.remove("/path/to/empty_dir/or/file"); + * await Deno.remove("/path/to/populated_dir/or/file", { recursive: true }); + * ``` + * + * Throws error if permission denied, path not found, or path is a non-empty + * directory and the `recursive` option isn't set to `true`. + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function remove(path: string | URL, options?: RemoveOptions): Promise; + /** + * Removes the given signal listener that has been registered with + * {@linkcode Deno.addSignalListener}. + * + * ```ts + * const listener = () => { + * console.log("SIGTERM!") + * }; + * Deno.addSignalListener("SIGTERM", listener); + * Deno.removeSignalListener("SIGTERM", listener); + * ``` + * + * _Note_: On Windows only `"SIGINT"` (CTRL+C) and `"SIGBREAK"` (CTRL+Break) + * are supported. + * + * @category Runtime Environment + */ + export function removeSignalListener(signal: Signal, handler: () => void): void; + /** + * Synchronously removes the named file or directory. + * + * ```ts + * Deno.removeSync("/path/to/empty_dir/or/file"); + * Deno.removeSync("/path/to/populated_dir/or/file", { recursive: true }); + * ``` + * + * Throws error if permission denied, path not found, or path is a non-empty + * directory and the `recursive` option isn't set to `true`. + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function removeSync(path: string | URL, options?: RemoveOptions): void; + /** + * Renames (moves) `oldpath` to `newpath`. Paths may be files or directories. + * If `newpath` already exists and is not a directory, `rename()` replaces it. + * OS-specific restrictions may apply when `oldpath` and `newpath` are in + * different directories. + * + * ```ts + * await Deno.rename("old/path", "new/path"); + * ``` + * + * On Unix-like OSes, this operation does not follow symlinks at either path. + * + * It varies between platforms when the operation throws errors, and if so + * what they are. It's always an error to rename anything to a non-empty + * directory. + * + * Requires `allow-read` and `allow-write` permissions. + * + * @tags allow-read, allow-write + * @category File System + */ + export function rename(oldpath: string | URL, newpath: string | URL): Promise; + /** + * Synchronously renames (moves) `oldpath` to `newpath`. Paths may be files or + * directories. If `newpath` already exists and is not a directory, + * `renameSync()` replaces it. OS-specific restrictions may apply when + * `oldpath` and `newpath` are in different directories. + * + * ```ts + * Deno.renameSync("old/path", "new/path"); + * ``` + * + * On Unix-like OSes, this operation does not follow symlinks at either path. + * + * It varies between platforms when the operation throws errors, and if so what + * they are. It's always an error to rename anything to a non-empty directory. + * + * Requires `allow-read` and `allow-write` permissions. + * + * @tags allow-read, allow-write + * @category File System + */ + export function renameSync(oldpath: string | URL, newpath: string | URL): void; + /** + * Performs DNS resolution against the given query, returning resolved + * records. + * + * Fails in the cases such as: + * + * - the query is in invalid format. + * - the options have an invalid parameter. For example `nameServer.port` is + * beyond the range of 16-bit unsigned integer. + * - the request timed out. + * + * ```ts + * const a = await Deno.resolveDns("example.com", "A"); + * + * const aaaa = await Deno.resolveDns("example.com", "AAAA", { + * nameServer: { ipAddr: "8.8.8.8", port: 53 }, + * }); + * ``` + * + * Requires `allow-net` permission. + * + * @tags allow-net + * @category Network + */ + export function resolveDns(query: string, recordType: "A" | "AAAA" | "ANAME" | "CNAME" | "NS" | "PTR", options?: ResolveDnsOptions): Promise; + /** + * Performs DNS resolution against the given query, returning resolved + * records. + * + * Fails in the cases such as: + * + * - the query is in invalid format. + * - the options have an invalid parameter. For example `nameServer.port` is + * beyond the range of 16-bit unsigned integer. + * - the request timed out. + * + * ```ts + * const a = await Deno.resolveDns("example.com", "A"); + * + * const aaaa = await Deno.resolveDns("example.com", "AAAA", { + * nameServer: { ipAddr: "8.8.8.8", port: 53 }, + * }); + * ``` + * + * Requires `allow-net` permission. + * + * @tags allow-net + * @category Network + */ + export function resolveDns(query: string, recordType: "CAA", options?: ResolveDnsOptions): Promise; + /** + * Performs DNS resolution against the given query, returning resolved + * records. + * + * Fails in the cases such as: + * + * - the query is in invalid format. + * - the options have an invalid parameter. For example `nameServer.port` is + * beyond the range of 16-bit unsigned integer. + * - the request timed out. + * + * ```ts + * const a = await Deno.resolveDns("example.com", "A"); + * + * const aaaa = await Deno.resolveDns("example.com", "AAAA", { + * nameServer: { ipAddr: "8.8.8.8", port: 53 }, + * }); + * ``` + * + * Requires `allow-net` permission. + * + * @tags allow-net + * @category Network + */ + export function resolveDns(query: string, recordType: "MX", options?: ResolveDnsOptions): Promise; + /** + * Performs DNS resolution against the given query, returning resolved + * records. + * + * Fails in the cases such as: + * + * - the query is in invalid format. + * - the options have an invalid parameter. For example `nameServer.port` is + * beyond the range of 16-bit unsigned integer. + * - the request timed out. + * + * ```ts + * const a = await Deno.resolveDns("example.com", "A"); + * + * const aaaa = await Deno.resolveDns("example.com", "AAAA", { + * nameServer: { ipAddr: "8.8.8.8", port: 53 }, + * }); + * ``` + * + * Requires `allow-net` permission. + * + * @tags allow-net + * @category Network + */ + export function resolveDns(query: string, recordType: "NAPTR", options?: ResolveDnsOptions): Promise; + /** + * Performs DNS resolution against the given query, returning resolved + * records. + * + * Fails in the cases such as: + * + * - the query is in invalid format. + * - the options have an invalid parameter. For example `nameServer.port` is + * beyond the range of 16-bit unsigned integer. + * - the request timed out. + * + * ```ts + * const a = await Deno.resolveDns("example.com", "A"); + * + * const aaaa = await Deno.resolveDns("example.com", "AAAA", { + * nameServer: { ipAddr: "8.8.8.8", port: 53 }, + * }); + * ``` + * + * Requires `allow-net` permission. + * + * @tags allow-net + * @category Network + */ + export function resolveDns(query: string, recordType: "SOA", options?: ResolveDnsOptions): Promise; + /** + * Performs DNS resolution against the given query, returning resolved + * records. + * + * Fails in the cases such as: + * + * - the query is in invalid format. + * - the options have an invalid parameter. For example `nameServer.port` is + * beyond the range of 16-bit unsigned integer. + * - the request timed out. + * + * ```ts + * const a = await Deno.resolveDns("example.com", "A"); + * + * const aaaa = await Deno.resolveDns("example.com", "AAAA", { + * nameServer: { ipAddr: "8.8.8.8", port: 53 }, + * }); + * ``` + * + * Requires `allow-net` permission. + * + * @tags allow-net + * @category Network + */ + export function resolveDns(query: string, recordType: "SRV", options?: ResolveDnsOptions): Promise; + /** + * Performs DNS resolution against the given query, returning resolved + * records. + * + * Fails in the cases such as: + * + * - the query is in invalid format. + * - the options have an invalid parameter. For example `nameServer.port` is + * beyond the range of 16-bit unsigned integer. + * - the request timed out. + * + * ```ts + * const a = await Deno.resolveDns("example.com", "A"); + * + * const aaaa = await Deno.resolveDns("example.com", "AAAA", { + * nameServer: { ipAddr: "8.8.8.8", port: 53 }, + * }); + * ``` + * + * Requires `allow-net` permission. + * + * @tags allow-net + * @category Network + */ + export function resolveDns(query: string, recordType: "TXT", options?: ResolveDnsOptions): Promise; + /** + * Performs DNS resolution against the given query, returning resolved + * records. + * + * Fails in the cases such as: + * + * - the query is in invalid format. + * - the options have an invalid parameter. For example `nameServer.port` is + * beyond the range of 16-bit unsigned integer. + * - the request timed out. + * + * ```ts + * const a = await Deno.resolveDns("example.com", "A"); + * + * const aaaa = await Deno.resolveDns("example.com", "AAAA", { + * nameServer: { ipAddr: "8.8.8.8", port: 53 }, + * }); + * ``` + * + * Requires `allow-net` permission. + * + * @tags allow-net + * @category Network + */ + export function resolveDns(query: string, recordType: RecordType, options?: ResolveDnsOptions): Promise< + | string[] + | CAARecord[] + | MXRecord[] + | NAPTRRecord[] + | SOARecord[] + | SRVRecord[] + | string[][] + >; + + export class Process implements Deno.Process { + #private; + get rid(): number; + get pid(): number; + get stdin(): T["stdin"] extends "piped" ? Deno.Writer & Deno.Closer & { + writable: import("stream/web").WritableStream; + } : (Deno.Writer & Deno.Closer & { + writable: import("stream/web").WritableStream; + }) | null; + get stdout(): T["stdout"] extends "piped" ? Deno.Reader & Deno.Closer & { + readable: import("stream/web").ReadableStream; + } : (Deno.Reader & Deno.Closer & { + readable: import("stream/web").ReadableStream; + }) | null; + get stderr(): T["stderr"] extends "piped" ? Deno.Reader & Deno.Closer & { + readable: import("stream/web").ReadableStream; + } : (Deno.Reader & Deno.Closer & { + readable: import("stream/web").ReadableStream; + }) | null; + status(): Promise; + output(): Promise; + stderrOutput(): Promise; + close(): void; + kill(signo?: string): void; + } + + /** + * Spawns new subprocess. RunOptions must contain at a minimum the `opt.cmd`, + * an array of program arguments, the first of which is the binary. + * + * ```ts + * const p = Deno.run({ + * cmd: ["curl", "https://example.com"], + * }); + * const status = await p.status(); + * ``` + * + * Subprocess uses same working directory as parent process unless `opt.cwd` + * is specified. + * + * Environmental variables from parent process can be cleared using `opt.clearEnv`. + * Doesn't guarantee that only `opt.env` variables are present, + * as the OS may set environmental variables for processes. + * + * Environmental variables for subprocess can be specified using `opt.env` + * mapping. + * + * `opt.uid` sets the child process’s user ID. This translates to a setuid call + * in the child process. Failure in the setuid call will cause the spawn to fail. + * + * `opt.gid` is similar to `opt.uid`, but sets the group ID of the child process. + * This has the same semantics as the uid field. + * + * By default subprocess inherits stdio of parent process. To change + * this this, `opt.stdin`, `opt.stdout`, and `opt.stderr` can be set + * independently to a resource ID (_rid_) of an open file, `"inherit"`, + * `"piped"`, or `"null"`: + * + * - _number_: the resource ID of an open file/resource. This allows you to + * read or write to a file. + * - `"inherit"`: The default if unspecified. The subprocess inherits from the + * parent. + * - `"piped"`: A new pipe should be arranged to connect the parent and child + * sub-process. + * - `"null"`: This stream will be ignored. This is the equivalent of attaching + * the stream to `/dev/null`. + * + * Details of the spawned process are returned as an instance of + * {@linkcode Deno.Process}. + * + * Requires `allow-run` permission. + * + * @deprecated Use {@linkcode Deno.Command} instead. {@linkcode Deno.run} + * will be removed in v2.0.0. + * @tags allow-run + * @category Sub Process + */ + export function run(opt: T): Process; + /** + * *UNSTABLE**: New API, yet to be vetted. + * + * Spawns new subprocess. RunOptions must contain at a minimum the `opt.cmd`, + * an array of program arguments, the first of which is the binary. + * + * ```ts + * const p = Deno.run({ + * cmd: ["curl", "https://example.com"], + * }); + * const status = await p.status(); + * ``` + * + * Subprocess uses same working directory as parent process unless `opt.cwd` + * is specified. + * + * Environmental variables from parent process can be cleared using `opt.clearEnv`. + * Doesn't guarantee that only `opt.env` variables are present, + * as the OS may set environmental variables for processes. + * + * Environmental variables for subprocess can be specified using `opt.env` + * mapping. + * + * `opt.uid` sets the child process’s user ID. This translates to a setuid call + * in the child process. Failure in the setuid call will cause the spawn to fail. + * + * `opt.gid` is similar to `opt.uid`, but sets the group ID of the child process. + * This has the same semantics as the uid field. + * + * By default subprocess inherits stdio of parent process. To change + * this this, `opt.stdin`, `opt.stdout`, and `opt.stderr` can be set + * independently to a resource ID (_rid_) of an open file, `"inherit"`, + * `"piped"`, or `"null"`: + * + * - _number_: the resource ID of an open file/resource. This allows you to + * read or write to a file. + * - `"inherit"`: The default if unspecified. The subprocess inherits from the + * parent. + * - `"piped"`: A new pipe should be arranged to connect the parent and child + * sub-process. + * - `"null"`: This stream will be ignored. This is the equivalent of attaching + * the stream to `/dev/null`. + * + * Details of the spawned process are returned as an instance of + * {@linkcode Deno.Process}. + * + * Requires `allow-run` permission. + * + * @tags allow-run + * @category Sub Process + */ + export function run(opt: T): Process; + export type UnstableRunOptions = RunOptions & { + clearEnv?: boolean; + gid?: number; + uid?: number; + }; + /** + * Shutdown socket send operations. + * + * Matches behavior of POSIX shutdown(3). + * + * ```ts + * const listener = Deno.listen({ port: 80 }); + * const conn = await listener.accept(); + * Deno.shutdown(conn.rid); + * ``` + * + * @deprecated Use {@linkcode Deno.Conn.closeWrite} instead. + * {@linkcode Deno.shutdown} will be removed in Deno 2.0. + * @category Network + */ + export function shutdown(rid: number): Promise; + /** + * Resolves to a {@linkcode Deno.FileInfo} for the specified `path`. Will + * always follow symlinks. + * + * ```ts + * import { assert } from "https://deno.land/std/assert/mod.ts"; + * const fileInfo = await Deno.stat("hello.txt"); + * assert(fileInfo.isFile); + * ``` + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category File System + */ + export function stat(path: string | URL): Promise; + /** + * Synchronously returns a {@linkcode Deno.FileInfo} for the specified + * `path`. Will always follow symlinks. + * + * ```ts + * import { assert } from "https://deno.land/std/assert/mod.ts"; + * const fileInfo = Deno.statSync("hello.txt"); + * assert(fileInfo.isFile); + * ``` + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category File System + */ + export function statSync(path: string | URL): FileInfo; + /** + * Creates `newpath` as a symbolic link to `oldpath`. + * + * The `options.type` parameter can be set to `"file"` or `"dir"`. This + * argument is only available on Windows and ignored on other platforms. + * + * ```ts + * await Deno.symlink("old/name", "new/name"); + * ``` + * + * Requires full `allow-read` and `allow-write` permissions. + * + * @tags allow-read, allow-write + * @category File System + */ + export function symlink(oldpath: string | URL, newpath: string | URL, options?: SymlinkOptions): Promise; + /** + * Creates `newpath` as a symbolic link to `oldpath`. + * + * The `options.type` parameter can be set to `"file"` or `"dir"`. This + * argument is only available on Windows and ignored on other platforms. + * + * ```ts + * Deno.symlinkSync("old/name", "new/name"); + * ``` + * + * Requires full `allow-read` and `allow-write` permissions. + * + * @tags allow-read, allow-write + * @category File System + */ + export function symlinkSync(oldpath: string | URL, newpath: string | URL, options?: SymlinkOptions): void; + /** + * Register a test which will be run when `deno test` is used on the command + * line and the containing module looks like a test module. + * + * `fn` can be async if required. + * + * ```ts + * import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; + * + * Deno.test({ + * name: "example test", + * fn() { + * assertEquals("world", "world"); + * }, + * }); + * + * Deno.test({ + * name: "example ignored test", + * ignore: Deno.build.os === "windows", + * fn() { + * // This test is ignored only on Windows machines + * }, + * }); + * + * Deno.test({ + * name: "example async test", + * async fn() { + * const decoder = new TextDecoder("utf-8"); + * const data = await Deno.readFile("hello_world.txt"); + * assertEquals(decoder.decode(data), "Hello world"); + * } + * }); + * ``` + * + * @category Testing + */ + export const test: DenoTest; + /** + * Truncates (or extends) the specified file, to reach the specified `len`. + * If `len` is not specified then the entire file contents are truncated. + * + * ### Truncate the entire file + * ```ts + * await Deno.truncate("my_file.txt"); + * ``` + * + * ### Truncate part of the file + * + * ```ts + * const file = await Deno.makeTempFile(); + * await Deno.writeTextFile(file, "Hello World"); + * await Deno.truncate(file, 7); + * const data = await Deno.readFile(file); + * console.log(new TextDecoder().decode(data)); // "Hello W" + * ``` + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function truncate(name: string, len?: number): Promise; + /** + * Synchronously truncates (or extends) the specified file, to reach the + * specified `len`. If `len` is not specified then the entire file contents + * are truncated. + * + * ### Truncate the entire file + * + * ```ts + * Deno.truncateSync("my_file.txt"); + * ``` + * + * ### Truncate part of the file + * + * ```ts + * const file = Deno.makeTempFileSync(); + * Deno.writeFileSync(file, new TextEncoder().encode("Hello World")); + * Deno.truncateSync(file, 7); + * const data = Deno.readFileSync(file); + * console.log(new TextDecoder().decode(data)); + * ``` + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function truncateSync(name: string, len?: number): void; + /** + * Returns the user id of the process on POSIX platforms. Returns null on Windows. + * + * ```ts + * console.log(Deno.uid()); + * ``` + * + * Requires `allow-sys` permission. + * + * @tags allow-sys + * @category Runtime Environment + */ + export function uid(): number | null; + /** + * Watch for file system events against one or more `paths`, which can be + * files or directories. These paths must exist already. One user action (e.g. + * `touch test.file`) can generate multiple file system events. Likewise, + * one user action can result in multiple file paths in one event (e.g. `mv + * old_name.txt new_name.txt`). + * + * The recursive option is `true` by default and, for directories, will watch + * the specified directory and all sub directories. + * + * Note that the exact ordering of the events can vary between operating + * systems. + * + * ```ts + * const watcher = Deno.watchFs("/"); + * for await (const event of watcher) { + * console.log(">>>> event", event); + * // { kind: "create", paths: [ "/foo.txt" ] } + * } + * ``` + * + * Call `watcher.close()` to stop watching. + * + * ```ts + * const watcher = Deno.watchFs("/"); + * + * setTimeout(() => { + * watcher.close(); + * }, 5000); + * + * for await (const event of watcher) { + * console.log(">>>> event", event); + * } + * ``` + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category File System + */ + export function watchFs(paths: string | string[], options?: { recursive: boolean }): FsWatcher; + /** + * Write to the resource ID (`rid`) the contents of the array buffer (`data`). + * + * Resolves to the number of bytes written. This function is one of the lowest + * level APIs and most users should not work with this directly, but rather + * use {@linkcode WritableStream}, {@linkcode ReadableStream.from} and + * {@linkcode ReadableStream.pipeTo}. + * + * **It is not guaranteed that the full buffer will be written in a single + * call.** + * + * ```ts + * const encoder = new TextEncoder(); + * const data = encoder.encode("Hello world"); + * using file = await Deno.open("/foo/bar.txt", { write: true }); + * const bytesWritten = await Deno.write(file.rid, data); // 11 + * ``` + * + * @deprecated Use `writer.write()` instead. {@linkcode Deno.write} will be + * removed in Deno 2.0. + * @category I/O + */ + export function write(rid: number, data: Uint8Array): Promise; + /** + * Write `data` to the given `path`, by default creating a new file if + * needed, else overwriting. + * + * ```ts + * const encoder = new TextEncoder(); + * const data = encoder.encode("Hello world\n"); + * await Deno.writeFile("hello1.txt", data); // overwrite "hello1.txt" or create it + * await Deno.writeFile("hello2.txt", data, { create: false }); // only works if "hello2.txt" exists + * await Deno.writeFile("hello3.txt", data, { mode: 0o777 }); // set permissions on new file + * await Deno.writeFile("hello4.txt", data, { append: true }); // add data to the end of the file + * ``` + * + * Requires `allow-write` permission, and `allow-read` if `options.create` is + * `false`. + * + * @tags allow-read, allow-write + * @category File System + */ + export function writeFile(path: string | URL, data: Uint8Array | ReadableStream, options?: WriteFileOptions): Promise; + /** + * Synchronously write `data` to the given `path`, by default creating a new + * file if needed, else overwriting. + * + * ```ts + * const encoder = new TextEncoder(); + * const data = encoder.encode("Hello world\n"); + * Deno.writeFileSync("hello1.txt", data); // overwrite "hello1.txt" or create it + * Deno.writeFileSync("hello2.txt", data, { create: false }); // only works if "hello2.txt" exists + * Deno.writeFileSync("hello3.txt", data, { mode: 0o777 }); // set permissions on new file + * Deno.writeFileSync("hello4.txt", data, { append: true }); // add data to the end of the file + * ``` + * + * Requires `allow-write` permission, and `allow-read` if `options.create` is + * `false`. + * + * @tags allow-read, allow-write + * @category File System + */ + export function writeFileSync(path: string | URL, data: Uint8Array, options?: WriteFileOptions): void; + /** + * Synchronously write to the resource ID (`rid`) the contents of the array + * buffer (`data`). + * + * Returns the number of bytes written. This function is one of the lowest + * level APIs and most users should not work with this directly, but rather + * use {@linkcode WritableStream}, {@linkcode ReadableStream.from} and + * {@linkcode ReadableStream.pipeTo}. + * + * **It is not guaranteed that the full buffer will be written in a single + * call.** + * + * ```ts + * const encoder = new TextEncoder(); + * const data = encoder.encode("Hello world"); + * using file = Deno.openSync("/foo/bar.txt", { write: true }); + * const bytesWritten = Deno.writeSync(file.rid, data); // 11 + * ``` + * + * @deprecated Use `writer.writeSync()` instead. {@linkcode Deno.writeSync} + * will be removed in Deno 2.0. + * @category I/O + */ + export function writeSync(rid: number, data: Uint8Array): number; + /** + * Write string `data` to the given `path`, by default creating a new file if + * needed, else overwriting. + * + * ```ts + * await Deno.writeTextFile("hello1.txt", "Hello world\n"); // overwrite "hello1.txt" or create it + * ``` + * + * Requires `allow-write` permission, and `allow-read` if `options.create` is + * `false`. + * + * @tags allow-read, allow-write + * @category File System + */ + export function writeTextFile(path: string | URL, data: string | ReadableStream, options?: WriteFileOptions): Promise; + /** + * Synchronously write string `data` to the given `path`, by default creating + * a new file if needed, else overwriting. + * + * ```ts + * Deno.writeTextFileSync("hello1.txt", "Hello world\n"); // overwrite "hello1.txt" or create it + * ``` + * + * Requires `allow-write` permission, and `allow-read` if `options.create` is + * `false`. + * + * @tags allow-read, allow-write + * @category File System + */ + export function writeTextFileSync(path: string | URL, data: string, options?: WriteFileOptions): void; + /** + * Returns the script arguments to the program. + * + * Give the following command line invocation of Deno: + * + * ```sh + * deno run --allow-read https://examples.deno.land/command-line-arguments.ts Sushi + * ``` + * + * Then `Deno.args` will contain: + * + * ```ts + * [ "Sushi" ] + * ``` + * + * If you are looking for a structured way to parse arguments, there is the + * [`std/flags`](https://deno.land/std/flags) module as part of the Deno + * standard library. + * + * @category Runtime Environment + */ + export const args: string[]; + /** + * Changes the access (`atime`) and modification (`mtime`) times of a file + * stream resource referenced by `rid`. Given times are either in seconds + * (UNIX epoch time) or as `Date` objects. + * + * ```ts + * const file = await Deno.open("file.txt", { create: true, write: true }); + * await Deno.futime(file.rid, 1556495550, new Date()); + * ``` + * + * @deprecated Use {@linkcode Deno.FsFile.utime} instead. + * {@linkcode Deno.futime} will be removed in Deno 2.0. + * @category File System + */ + export function futime(rid: number, atime: number | Date, mtime: number | Date): Promise; + /** + * Synchronously changes the access (`atime`) and modification (`mtime`) times + * of a file stream resource referenced by `rid`. Given times are either in + * seconds (UNIX epoch time) or as `Date` objects. + * + * ```ts + * const file = Deno.openSync("file.txt", { create: true, write: true }); + * Deno.futimeSync(file.rid, 1556495550, new Date()); + * ``` + * + * @deprecated Use {@linkcode Deno.FsFile.utimeSync} instead. + * {@linkcode Deno.futimeSync} will be removed in Deno 2.0. + * @category File System + */ + export function futimeSync(rid: number, atime: number | Date, mtime: number | Date): void; + /** + * Changes the access (`atime`) and modification (`mtime`) times of a file + * system object referenced by `path`. Given times are either in seconds + * (UNIX epoch time) or as `Date` objects. + * + * ```ts + * await Deno.utime("myfile.txt", 1556495550, new Date()); + * ``` + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function utime(path: string | URL, atime: number | Date, mtime: number | Date): Promise; + /** + * Synchronously changes the access (`atime`) and modification (`mtime`) times + * of a file system object referenced by `path`. Given times are either in + * seconds (UNIX epoch time) or as `Date` objects. + * + * ```ts + * Deno.utimeSync("myfile.txt", 1556495550, new Date()); + * ``` + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function utimeSync(path: string | URL, atime: number | Date, mtime: number | Date): void; + /** @category Network */ + export type Addr = NetAddr | UnixAddr; + + /** + * An abstract interface which when implemented provides an interface to close + * files/resources that were previously opened. + * + * @deprecated Use {@linkcode ReadableStream} and {@linkcode WritableStream} + * instead. {@linkcode Closer} will be removed in v2.0.0. + * @category I/O + */ + export interface Closer { + /** Closes the resource, "freeing" the backing file/resource. */ + close(): void; + } + + /** @category Network */ + export interface Conn extends Reader, Writer, Closer, Disposable { + /** The local address of the connection. */ + readonly localAddr: Addr; + /** The remote address of the connection. */ + readonly remoteAddr: Addr; + /** + * The resource ID of the connection. + * + * @deprecated Use {@linkcode Deno.Conn} instance methods instead. + * {@linkcode Deno.Conn.rid} will be removed in Deno 2.0. + */ + readonly rid: number; + readonly readable: ReadableStream; + readonly writable: WritableStream; + /** + * Shuts down (`shutdown(2)`) the write side of the connection. Most + * callers should just use `close()`. + */ + closeWrite(): Promise; + /** + * Make the connection block the event loop from finishing. + * + * Note: the connection blocks the event loop from finishing by default. + * This method is only meaningful after `.unref()` is called. + */ + ref(): void; + /** Make the connection not block the event loop from finishing. */ + unref(): void; + } + + /** @category Network */ + export interface ConnectOptions { + /** The port to connect to. */ + port: number; + /** + * A literal IP address or host name that can be resolved to an IP address. + * If not specified, + * + * @default {"127.0.0.1"} + */ + hostname?: string; + transport?: "tcp"; + } + + /** @category Network */ + export interface ConnectTlsOptions { + /** The port to connect to. */ + port: number; + /** + * A literal IP address or host name that can be resolved to an IP address. + * + * @default {"127.0.0.1"} + */ + hostname?: string; + /** + * Server certificate file. + * + * @deprecated Pass the cert file contents directly to the + * {@linkcode Deno.ConnectTlsOptions.caCerts} option instead. This option + * will be removed in Deno 2.0. + */ + certFile?: string; + /** + * A list of root certificates that will be used in addition to the + * default root certificates to verify the peer's certificate. + * + * Must be in PEM format. + */ + caCerts?: string[]; + /** + * Application-Layer Protocol Negotiation (ALPN) protocols supported by + * the client. If not specified, no ALPN extension will be included in the + * TLS handshake. + */ + alpnProtocols?: string[]; + /** PEM formatted client certificate chain. */ + certChain?: string; + /** PEM formatted (RSA or PKCS8) private key of client certificate. */ + privateKey?: string; + } + + /** @category Testing */ + export interface DenoTest { + /** + * Register a test which will be run when `deno test` is used on the command + * line and the containing module looks like a test module. + * + * `fn` can be async if required. + * + * ```ts + * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * + * Deno.test({ + * name: "example test", + * fn() { + * assertEquals("world", "world"); + * }, + * }); + * + * Deno.test({ + * name: "example ignored test", + * ignore: Deno.build.os === "windows", + * fn() { + * // This test is ignored only on Windows machines + * }, + * }); + * + * Deno.test({ + * name: "example async test", + * async fn() { + * const decoder = new TextDecoder("utf-8"); + * const data = await Deno.readFile("hello_world.txt"); + * assertEquals(decoder.decode(data), "Hello world"); + * } + * }); + * ``` + * + * @category Testing + */ + (t: TestDefinition): void; + /** + * Register a test which will be run when `deno test` is used on the command + * line and the containing module looks like a test module. + * + * `fn` can be async if required. + * + * ```ts + * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * + * Deno.test("My test description", () => { + * assertEquals("hello", "hello"); + * }); + * + * Deno.test("My async test description", async () => { + * const decoder = new TextDecoder("utf-8"); + * const data = await Deno.readFile("hello_world.txt"); + * assertEquals(decoder.decode(data), "Hello world"); + * }); + * ``` + * + * @category Testing + */ + (name: string, fn: (t: TestContext) => void | Promise): void; + /** + * Register a test which will be run when `deno test` is used on the command + * line and the containing module looks like a test module. + * + * `fn` can be async if required. Declared function must have a name. + * + * ```ts + * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * + * Deno.test(function myTestName() { + * assertEquals("hello", "hello"); + * }); + * + * Deno.test(async function myOtherTestName() { + * const decoder = new TextDecoder("utf-8"); + * const data = await Deno.readFile("hello_world.txt"); + * assertEquals(decoder.decode(data), "Hello world"); + * }); + * ``` + * + * @category Testing + */ + (fn: (t: TestContext) => void | Promise): void; + /** + * Register a test which will be run when `deno test` is used on the command + * line and the containing module looks like a test module. + * + * `fn` can be async if required. + * + * ```ts + * import {assert, fail, assertEquals} from "https://deno.land/std/assert/mod.ts"; + * + * Deno.test("My test description", { permissions: { read: true } }, (): void => { + * assertEquals("hello", "hello"); + * }); + * + * Deno.test("My async test description", { permissions: { read: false } }, async (): Promise => { + * const decoder = new TextDecoder("utf-8"); + * const data = await Deno.readFile("hello_world.txt"); + * assertEquals(decoder.decode(data), "Hello world"); + * }); + * ``` + * + * @category Testing + */ + (name: string, options: Omit, fn: (t: TestContext) => void | Promise): void; + /** + * Register a test which will be run when `deno test` is used on the command + * line and the containing module looks like a test module. + * + * `fn` can be async if required. + * + * ```ts + * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * + * Deno.test( + * { + * name: "My test description", + * permissions: { read: true }, + * }, + * () => { + * assertEquals("hello", "hello"); + * }, + * ); + * + * Deno.test( + * { + * name: "My async test description", + * permissions: { read: false }, + * }, + * async () => { + * const decoder = new TextDecoder("utf-8"); + * const data = await Deno.readFile("hello_world.txt"); + * assertEquals(decoder.decode(data), "Hello world"); + * }, + * ); + * ``` + * + * @category Testing + */ + (options: Omit, fn: (t: TestContext) => void | Promise): void; + /** + * Register a test which will be run when `deno test` is used on the command + * line and the containing module looks like a test module. + * + * `fn` can be async if required. Declared function must have a name. + * + * ```ts + * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * + * Deno.test( + * { permissions: { read: true } }, + * function myTestName() { + * assertEquals("hello", "hello"); + * }, + * ); + * + * Deno.test( + * { permissions: { read: false } }, + * async function myOtherTestName() { + * const decoder = new TextDecoder("utf-8"); + * const data = await Deno.readFile("hello_world.txt"); + * assertEquals(decoder.decode(data), "Hello world"); + * }, + * ); + * ``` + * + * @category Testing + */ + (options: Omit, fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for ignoring a particular test case. + * + * @category Testing + */ + ignore(t: Omit): void; + /** + * Shorthand property for ignoring a particular test case. + * + * @category Testing + */ + ignore(name: string, fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for ignoring a particular test case. + * + * @category Testing + */ + ignore(fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for ignoring a particular test case. + * + * @category Testing + */ + ignore(name: string, options: Omit, fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for ignoring a particular test case. + * + * @category Testing + */ + ignore(options: Omit, fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for ignoring a particular test case. + * + * @category Testing + */ + ignore(options: Omit, fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for focusing a particular test case. + * + * @category Testing + */ + only(t: Omit): void; + /** + * Shorthand property for focusing a particular test case. + * + * @category Testing + */ + only(name: string, fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for focusing a particular test case. + * + * @category Testing + */ + only(fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for focusing a particular test case. + * + * @category Testing + */ + only(name: string, options: Omit, fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for focusing a particular test case. + * + * @category Testing + */ + only(options: Omit, fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for focusing a particular test case. + * + * @category Testing + */ + only(options: Omit, fn: (t: TestContext) => void | Promise): void; + } + + /** + * Information about a directory entry returned from {@linkcode Deno.readDir} + * and {@linkcode Deno.readDirSync}. + * + * @category File System + */ + export interface DirEntry { + /** + * The file name of the entry. It is just the entity name and does not + * include the full path. + */ + name: string; + /** + * True if this is info for a regular file. Mutually exclusive to + * `DirEntry.isDirectory` and `DirEntry.isSymlink`. + */ + isFile: boolean; + /** + * True if this is info for a regular directory. Mutually exclusive to + * `DirEntry.isFile` and `DirEntry.isSymlink`. + */ + isDirectory: boolean; + /** + * True if this is info for a symlink. Mutually exclusive to + * `DirEntry.isFile` and `DirEntry.isDirectory`. + */ + isSymlink: boolean; + } + + /** + * The permission descriptor for the `allow-env` and `deny-env` permissions, which controls + * access to being able to read and write to the process environment variables + * as well as access other information about the environment. The option + * `variable` allows scoping the permission to a specific environment + * variable. + * + * @category Permissions + */ + export interface EnvPermissionDescriptor { + name: "env"; + /** Optional environment variable name (e.g. `PATH`). */ + variable?: string; + } + + /** + * The permission descriptor for the `allow-ffi` and `deny-ffi` permissions, which controls + * access to loading _foreign_ code and interfacing with it via the + * [Foreign Function Interface API](https://deno.land/manual/runtime/ffi_api) + * available in Deno. The option `path` allows scoping the permission to a + * specific path on the host. + * + * @category Permissions + */ + export interface FfiPermissionDescriptor { + name: "ffi"; + /** Optional path on the local host to scope the permission to. */ + path?: string | URL; + } + + /** + * The permission descriptor for the `allow-sys` and `deny-sys` permissions, which controls + * access to sensitive host system information, which malicious code might + * attempt to exploit. The option `kind` allows scoping the permission to a + * specific piece of information. + * + * @category Permissions + */ + export interface SysPermissionDescriptor { + name: "sys"; + /** The specific information to scope the permission to. */ + kind?: | "loadavg" + | "hostname" + | "systemMemoryInfo" + | "networkInterfaces" + | "osRelease" + | "osUptime" + | "uid" + | "gid"; + } + + /** + * An interface containing methods to interact with the process environment + * variables. + * + * @tags allow-env + * @category Runtime Environment + */ + export interface Env { + /** + * Retrieve the value of an environment variable. + * + * Returns `undefined` if the supplied environment variable is not defined. + * + * ```ts + * console.log(Deno.env.get("HOME")); // e.g. outputs "/home/alice" + * console.log(Deno.env.get("MADE_UP_VAR")); // outputs "undefined" + * ``` + * + * Requires `allow-env` permission. + * + * @tags allow-env + */ + get(key: string): string | undefined; + /** + * Set the value of an environment variable. + * + * ```ts + * Deno.env.set("SOME_VAR", "Value"); + * Deno.env.get("SOME_VAR"); // outputs "Value" + * ``` + * + * Requires `allow-env` permission. + * + * @tags allow-env + */ + set(key: string, value: string): void; + /** + * Delete the value of an environment variable. + * + * ```ts + * Deno.env.set("SOME_VAR", "Value"); + * Deno.env.delete("SOME_VAR"); // outputs "undefined" + * ``` + * + * Requires `allow-env` permission. + * + * @tags allow-env + */ + delete(key: string): void; + /** + * Check whether an environment variable is present or not. + * + * ```ts + * Deno.env.set("SOME_VAR", "Value"); + * Deno.env.has("SOME_VAR"); // outputs true + * ``` + * + * Requires `allow-env` permission. + * + * @tags allow-env + */ + has(key: string): boolean; + /** + * Returns a snapshot of the environment variables at invocation as a + * simple object of keys and values. + * + * ```ts + * Deno.env.set("TEST_VAR", "A"); + * const myEnv = Deno.env.toObject(); + * console.log(myEnv.SHELL); + * Deno.env.set("TEST_VAR", "B"); + * console.log(myEnv.TEST_VAR); // outputs "A" + * ``` + * + * Requires `allow-env` permission. + * + * @tags allow-env + */ + toObject(): { [index: string]: string }; + } + + /** + * Provides information about a file and is returned by + * {@linkcode Deno.stat}, {@linkcode Deno.lstat}, {@linkcode Deno.statSync}, + * and {@linkcode Deno.lstatSync} or from calling `stat()` and `statSync()` + * on an {@linkcode Deno.FsFile} instance. + * + * @category File System + */ + export interface FileInfo { + /** + * True if this is info for a regular file. Mutually exclusive to + * `FileInfo.isDirectory` and `FileInfo.isSymlink`. + */ + isFile: boolean; + /** + * True if this is info for a regular directory. Mutually exclusive to + * `FileInfo.isFile` and `FileInfo.isSymlink`. + */ + isDirectory: boolean; + /** + * True if this is info for a symlink. Mutually exclusive to + * `FileInfo.isFile` and `FileInfo.isDirectory`. + */ + isSymlink: boolean; + /** The size of the file, in bytes. */ + size: number; + /** + * The last modification time of the file. This corresponds to the `mtime` + * field from `stat` on Linux/Mac OS and `ftLastWriteTime` on Windows. This + * may not be available on all platforms. + */ + mtime: Date | null; + /** + * The last access time of the file. This corresponds to the `atime` + * field from `stat` on Unix and `ftLastAccessTime` on Windows. This may not + * be available on all platforms. + */ + atime: Date | null; + /** + * The creation time of the file. This corresponds to the `birthtime` + * field from `stat` on Mac/BSD and `ftCreationTime` on Windows. This may + * not be available on all platforms. + */ + birthtime: Date | null; + /** ID of the device containing the file. */ + dev: number; + /** + * Inode number. + * + * _Linux/Mac OS only._ + */ + ino: number | null; + /** + * The underlying raw `st_mode` bits that contain the standard Unix + * permissions for this file/directory. + * + * _Linux/Mac OS only._ + */ + mode: number | null; + /** + * Number of hard links pointing to this file. + * + * _Linux/Mac OS only._ + */ + nlink: number | null; + /** + * User ID of the owner of this file. + * + * _Linux/Mac OS only._ + */ + uid: number | null; + /** + * Group ID of the owner of this file. + * + * _Linux/Mac OS only._ + */ + gid: number | null; + /** + * Device ID of this file. + * + * _Linux/Mac OS only._ + */ + rdev: number | null; + /** + * Blocksize for filesystem I/O. + * + * _Linux/Mac OS only._ + */ + blksize: number | null; + /** + * Number of blocks allocated to the file, in 512-byte units. + * + * _Linux/Mac OS only._ + */ + blocks: number | null; + /** + * True if this is info for a block device. + * + * _Linux/Mac OS only._ + */ + isBlockDevice: boolean | null; + /** + * True if this is info for a char device. + * + * _Linux/Mac OS only._ + */ + isCharDevice: boolean | null; + /** + * True if this is info for a fifo. + * + * _Linux/Mac OS only._ + */ + isFifo: boolean | null; + /** + * True if this is info for a socket. + * + * _Linux/Mac OS only._ + */ + isSocket: boolean | null; + } + + /** + * Represents a unique file system event yielded by a + * {@linkcode Deno.FsWatcher}. + * + * @category File System + */ + export interface FsEvent { + /** The kind/type of the file system event. */ + kind: "any" | "access" | "create" | "modify" | "remove" | "other"; + /** An array of paths that are associated with the file system event. */ + paths: string[]; + /** Any additional flags associated with the event. */ + flag?: FsEventFlag; + } + + /** + * Additional information for FsEvent objects with the "other" kind. + * + * - `"rescan"`: rescan notices indicate either a lapse in the events or a + * change in the filesystem such that events received so far can no longer + * be relied on to represent the state of the filesystem now. An + * application that simply reacts to file changes may not care about this. + * An application that keeps an in-memory representation of the filesystem + * will need to care, and will need to refresh that representation directly + * from the filesystem. + * + * @category File System + */ + export type FsEventFlag = "rescan"; + + /** + * Returned by {@linkcode Deno.watchFs}. It is an async iterator yielding up + * system events. To stop watching the file system by calling `.close()` + * method. + * + * @category File System + */ + export interface FsWatcher extends AsyncIterable, Disposable { + /** + * The resource id. + * + * @deprecated Use {@linkcode Deno.FsWatcher} instance methods instead. + * {@linkcode Deno.FsWatcher.rid} will be removed in Deno 2.0. + */ + readonly rid: number; + /** Stops watching the file system and closes the watcher resource. */ + close(): void; + /** + * Stops watching the file system and closes the watcher resource. + * + * @deprecated {@linkcode Deno.FsWatcher.return} will be removed in Deno 2.0. + */ + return?(value?: any): Promise>; + [Symbol.asyncIterator](): AsyncIterableIterator; + } + + /** + * The permission descriptor for the `allow-hrtime` and `deny-hrtime` permissions, which + * controls if the runtime code has access to high resolution time. High + * resolution time is considered sensitive information, because it can be used + * by malicious code to gain information about the host that it might not + * otherwise have access to. + * + * @category Permissions + */ + export interface HrtimePermissionDescriptor { + name: "hrtime"; + } + + /** + * Option which can be specified when performing {@linkcode Deno.inspect}. + * + * @category Console and Debugging + */ + export interface InspectOptions { + /** + * Stylize output with ANSI colors. + * + * @default {false} + */ + colors?: boolean; + /** + * Try to fit more than one entry of a collection on the same line. + * + * @default {true} + */ + compact?: boolean; + /** + * Traversal depth for nested objects. + * + * @default {4} + */ + depth?: number; + /** + * The maximum length for an inspection to take up a single line. + * + * @default {80} + */ + breakLength?: number; + /** + * Whether or not to escape sequences. + * + * @default {true} + */ + escapeSequences?: boolean; + /** + * The maximum number of iterable entries to print. + * + * @default {100} + */ + iterableLimit?: number; + /** + * Show a Proxy's target and handler. + * + * @default {false} + */ + showProxy?: boolean; + /** + * Sort Object, Set and Map entries by key. + * + * @default {false} + */ + sorted?: boolean; + /** + * Add a trailing comma for multiline collections. + * + * @default {false} + */ + trailingComma?: boolean; + /** + * Evaluate the result of calling getters. + * + * @default {false} + */ + getters?: boolean; + /** + * Show an object's non-enumerable properties. + * + * @default {false} + */ + showHidden?: boolean; + /** + * The maximum length of a string before it is truncated with an + * ellipsis. + */ + strAbbreviateSize?: number; + } + + /** + * A generic network listener for stream-oriented protocols. + * + * @category Network + */ + export interface Listener extends AsyncIterable, Disposable { + /** Return the address of the `Listener`. */ + readonly addr: Addr; + /** + * Return the rid of the `Listener`. + * + * @deprecated Use {@linkcode Deno.Listener} instance methods instead. + * {@linkcode Deno.Listener.rid} will be removed in Deno 2.0. + */ + readonly rid: number; + /** Waits for and resolves to the next connection to the `Listener`. */ + accept(): Promise; + /** + * Close closes the listener. Any pending accept promises will be rejected + * with errors. + */ + close(): void; + [Symbol.asyncIterator](): AsyncIterableIterator; + /** + * Make the listener block the event loop from finishing. + * + * Note: the listener blocks the event loop from finishing by default. + * This method is only meaningful after `.unref()` is called. + */ + ref(): void; + /** Make the listener not block the event loop from finishing. */ + unref(): void; + } + + /** @category Network */ + export interface ListenOptions { + /** The port to listen on. */ + port: number; + /** + * A literal IP address or host name that can be resolved to an IP address. + * + * __Note about `0.0.0.0`__ While listening `0.0.0.0` works on all platforms, + * the browsers on Windows don't work with the address `0.0.0.0`. + * You should show the message like `server running on localhost:8080` instead of + * `server running on 0.0.0.0:8080` if your program supports Windows. + * + * @default {"0.0.0.0"} + */ + hostname?: string; + } + + /** @category Network */ + export interface ListenTlsOptions extends TcpListenOptions { + /** Server private key in PEM format */ + key?: string; + /** Cert chain in PEM format */ + cert?: string; + /** + * Path to a file containing a PEM formatted CA certificate. Requires + * `--allow-read`. + * + * @tags allow-read + * @deprecated Pass the certificate file contents directly to the + * {@linkcode Deno.ListenTlsOptions.cert} option instead. This option will + * be removed in Deno 2.0. + */ + certFile?: string; + /** + * Server private key file. Requires `--allow-read`. + * + * @tags allow-read + * @deprecated Pass the key file contents directly to the + * {@linkcode Deno.ListenTlsOptions.key} option instead. This option will + * be removed in Deno 2.0. + */ + keyFile?: string; + transport?: "tcp"; + /** + * Application-Layer Protocol Negotiation (ALPN) protocols to announce to + * the client. If not specified, no ALPN extension will be included in the + * TLS handshake. + */ + alpnProtocols?: string[]; + } + + /** + * Options which can be set when using {@linkcode Deno.makeTempDir}, + * {@linkcode Deno.makeTempDirSync}, {@linkcode Deno.makeTempFile}, and + * {@linkcode Deno.makeTempFileSync}. + * + * @category File System + */ + export interface MakeTempOptions { + /** + * Directory where the temporary directory should be created (defaults to + * the env variable `TMPDIR`, or the system's default, usually `/tmp`). + * + * Note that if the passed `dir` is relative, the path returned by + * `makeTempFile()` and `makeTempDir()` will also be relative. Be mindful of + * this when changing working directory. + */ + dir?: string; + /** + * String that should precede the random portion of the temporary + * directory's name. + */ + prefix?: string; + /** + * String that should follow the random portion of the temporary + * directory's name. + */ + suffix?: string; + } + + /** @category Runtime Environment */ + export interface MemoryUsage { + /** + * The number of bytes of the current Deno's process resident set size, + * which is the amount of memory occupied in main memory (RAM). + */ + rss: number; + /** The total size of the heap for V8, in bytes. */ + heapTotal: number; + /** The amount of the heap used for V8, in bytes. */ + heapUsed: number; + /** + * Memory, in bytes, associated with JavaScript objects outside of the + * JavaScript isolate. + */ + external: number; + } + + /** + * @category Observability + * @deprecated {@linkcode Deno.metrics} will be removed in v2.0.0. + */ + export interface Metrics extends OpMetrics { + ops: Record; + } + + /** + * Options which can be set when using {@linkcode Deno.mkdir} and + * {@linkcode Deno.mkdirSync}. + * + * @category File System + */ + export interface MkdirOptions { + /** + * If set to `true`, means that any intermediate directories will also be + * created (as with the shell command `mkdir -p`). + * + * Intermediate directories are created with the same permissions. + * + * When recursive is set to `true`, succeeds silently (without changing any + * permissions) if a directory already exists at the path, or if the path + * is a symlink to an existing directory. + * + * @default {false} + */ + recursive?: boolean; + /** + * Permissions to use when creating the directory (defaults to `0o777`, + * before the process's umask). + * + * Ignored on Windows. + */ + mode?: number; + } + + /** @category Network */ + export interface NetAddr { + transport: "tcp" | "udp"; + hostname: string; + port: number; + } + + /** + * The permission descriptor for the `allow-net` and `deny-net` permissions, which controls + * access to opening network ports and connecting to remote hosts via the + * network. The option `host` allows scoping the permission for outbound + * connection to a specific host and port. + * + * @category Permissions + */ + export interface NetPermissionDescriptor { + name: "net"; + /** + * Optional host string of the form `"[:]"`. Examples: + * + * "github.com" + * "deno.land:8080" + */ + host?: string; + } + + /** + * Options which can be set when doing {@linkcode Deno.open} and + * {@linkcode Deno.openSync}. + * + * @category File System + */ + export interface OpenOptions { + /** + * Sets the option for read access. This option, when `true`, means that + * the file should be read-able if opened. + * + * @default {true} + */ + read?: boolean; + /** + * Sets the option for write access. This option, when `true`, means that + * the file should be write-able if opened. If the file already exists, + * any write calls on it will overwrite its contents, by default without + * truncating it. + * + * @default {false} + */ + write?: boolean; + /** + * Sets the option for the append mode. This option, when `true`, means + * that writes will append to a file instead of overwriting previous + * contents. + * + * Note that setting `{ write: true, append: true }` has the same effect as + * setting only `{ append: true }`. + * + * @default {false} + */ + append?: boolean; + /** + * Sets the option for truncating a previous file. If a file is + * successfully opened with this option set it will truncate the file to `0` + * size if it already exists. The file must be opened with write access + * for truncate to work. + * + * @default {false} + */ + truncate?: boolean; + /** + * Sets the option to allow creating a new file, if one doesn't already + * exist at the specified path. Requires write or append access to be + * used. + * + * @default {false} + */ + create?: boolean; + /** + * If set to `true`, no file, directory, or symlink is allowed to exist at + * the target location. Requires write or append access to be used. When + * createNew is set to `true`, create and truncate are ignored. + * + * @default {false} + */ + createNew?: boolean; + /** + * Permissions to use if creating the file (defaults to `0o666`, before + * the process's umask). + * + * Ignored on Windows. + */ + mode?: number; + } + + /** + * @category Observability + * @deprecated {@linkcode Deno.metrics} will be removed in v2.0.0. + */ + export interface OpMetrics { + opsDispatched: number; + opsDispatchedSync: number; + opsDispatchedAsync: number; + opsDispatchedAsyncUnref: number; + opsCompleted: number; + opsCompletedSync: number; + opsCompletedAsync: number; + opsCompletedAsyncUnref: number; + bytesSentControl: number; + bytesSentData: number; + bytesReceived: number; + } + + /** + * Permission descriptors which define a permission and can be queried, + * requested, or revoked. + * + * View the specifics of the individual descriptors for more information about + * each permission kind. + * + * @category Permissions + */ + export type PermissionDescriptor = | RunPermissionDescriptor + | ReadPermissionDescriptor + | WritePermissionDescriptor + | NetPermissionDescriptor + | EnvPermissionDescriptor + | SysPermissionDescriptor + | FfiPermissionDescriptor + | HrtimePermissionDescriptor; + /** + * The name of a privileged feature which needs permission. + * + * @category Permissions + */ + export type PermissionName = | "run" + | "read" + | "write" + | "net" + | "env" + | "sys" + | "ffi" + | "hrtime"; + /** + * Options which define the permissions within a test or worker context. + * + * `"inherit"` ensures that all permissions of the parent process will be + * applied to the test context. `"none"` ensures the test context has no + * permissions. A `PermissionOptionsObject` provides a more specific + * set of permissions to the test context. + * + * @category Permissions + */ + export type PermissionOptions = | "inherit" + | "none" + | PermissionOptionsObject; + + /** + * A set of options which can define the permissions within a test or worker + * context at a highly specific level. + * + * @category Permissions + */ + export interface PermissionOptionsObject { + /** + * Specifies if the `env` permission should be requested or revoked. + * If set to `"inherit"`, the current `env` permission will be inherited. + * If set to `true`, the global `env` permission will be requested. + * If set to `false`, the global `env` permission will be revoked. + * + * @default {false} + */ + env?: "inherit" | boolean | string[]; + /** + * Specifies if the `sys` permission should be requested or revoked. + * If set to `"inherit"`, the current `sys` permission will be inherited. + * If set to `true`, the global `sys` permission will be requested. + * If set to `false`, the global `sys` permission will be revoked. + * + * @default {false} + */ + sys?: "inherit" | boolean | string[]; + /** + * Specifies if the `hrtime` permission should be requested or revoked. + * If set to `"inherit"`, the current `hrtime` permission will be inherited. + * If set to `true`, the global `hrtime` permission will be requested. + * If set to `false`, the global `hrtime` permission will be revoked. + * + * @default {false} + */ + hrtime?: "inherit" | boolean; + /** + * Specifies if the `net` permission should be requested or revoked. + * if set to `"inherit"`, the current `net` permission will be inherited. + * if set to `true`, the global `net` permission will be requested. + * if set to `false`, the global `net` permission will be revoked. + * if set to `string[]`, the `net` permission will be requested with the + * specified host strings with the format `"[:]`. + * + * @default {false} + * + * Examples: + * + * ```ts + * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * + * Deno.test({ + * name: "inherit", + * permissions: { + * net: "inherit", + * }, + * async fn() { + * const status = await Deno.permissions.query({ name: "net" }) + * assertEquals(status.state, "granted"); + * }, + * }); + * ``` + * + * ```ts + * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * + * Deno.test({ + * name: "true", + * permissions: { + * net: true, + * }, + * async fn() { + * const status = await Deno.permissions.query({ name: "net" }); + * assertEquals(status.state, "granted"); + * }, + * }); + * ``` + * + * ```ts + * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * + * Deno.test({ + * name: "false", + * permissions: { + * net: false, + * }, + * async fn() { + * const status = await Deno.permissions.query({ name: "net" }); + * assertEquals(status.state, "denied"); + * }, + * }); + * ``` + * + * ```ts + * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * + * Deno.test({ + * name: "localhost:8080", + * permissions: { + * net: ["localhost:8080"], + * }, + * async fn() { + * const status = await Deno.permissions.query({ name: "net", host: "localhost:8080" }); + * assertEquals(status.state, "granted"); + * }, + * }); + * ``` + */ + net?: "inherit" | boolean | string[]; + /** + * Specifies if the `ffi` permission should be requested or revoked. + * If set to `"inherit"`, the current `ffi` permission will be inherited. + * If set to `true`, the global `ffi` permission will be requested. + * If set to `false`, the global `ffi` permission will be revoked. + * + * @default {false} + */ + ffi?: "inherit" | boolean | Array; + /** + * Specifies if the `read` permission should be requested or revoked. + * If set to `"inherit"`, the current `read` permission will be inherited. + * If set to `true`, the global `read` permission will be requested. + * If set to `false`, the global `read` permission will be revoked. + * If set to `Array`, the `read` permission will be requested with the + * specified file paths. + * + * @default {false} + */ + read?: "inherit" | boolean | Array; + /** + * Specifies if the `run` permission should be requested or revoked. + * If set to `"inherit"`, the current `run` permission will be inherited. + * If set to `true`, the global `run` permission will be requested. + * If set to `false`, the global `run` permission will be revoked. + * + * @default {false} + */ + run?: "inherit" | boolean | Array; + /** + * Specifies if the `write` permission should be requested or revoked. + * If set to `"inherit"`, the current `write` permission will be inherited. + * If set to `true`, the global `write` permission will be requested. + * If set to `false`, the global `write` permission will be revoked. + * If set to `Array`, the `write` permission will be requested with the + * specified file paths. + * + * @default {false} + */ + write?: "inherit" | boolean | Array; + } + + /** + * The current status of the permission: + * + * - `"granted"` - the permission has been granted. + * - `"denied"` - the permission has been explicitly denied. + * - `"prompt"` - the permission has not explicitly granted nor denied. + * + * @category Permissions + */ + export type PermissionState = | "granted" + | "denied" + | "prompt"; + + /** + * The interface which defines what event types are supported by + * {@linkcode PermissionStatus} instances. + * + * @category Permissions + */ + export interface PermissionStatusEventMap { + "change": Event; + } + + /** + * The status resolved from the `.status()` method of a + * {@linkcode Deno.Process} instance. + * + * If `success` is `true`, then `code` will be `0`, but if `success` is + * `false`, the sub-process exit code will be set in `code`. + * + * @deprecated Use {@linkcode Deno.Command} instead. {@linkcode Deno.run} + * will be removed in v2.0.0. + * @category Sub Process + */ + export type ProcessStatus = | { + success: true; + code: 0; + signal?: undefined; + } + | { + success: false; + code: number; + signal?: number; + }; + + /** + * An abstract interface which when implemented provides an interface to read + * bytes into an array buffer asynchronously. + * + * @deprecated Use {@linkcode ReadableStream} instead. {@linkcode Reader} + * will be removed in v2.0.0. + * @category I/O + */ + export interface Reader { + /** + * Reads up to `p.byteLength` bytes into `p`. It resolves to the number of + * bytes read (`0` < `n` <= `p.byteLength`) and rejects if any error + * encountered. Even if `read()` resolves to `n` < `p.byteLength`, it may + * use all of `p` as scratch space during the call. If some data is + * available but not `p.byteLength` bytes, `read()` conventionally resolves + * to what is available instead of waiting for more. + * + * When `read()` encounters end-of-file condition, it resolves to EOF + * (`null`). + * + * When `read()` encounters an error, it rejects with an error. + * + * Callers should always process the `n` > `0` bytes returned before + * considering the EOF (`null`). Doing so correctly handles I/O errors that + * happen after reading some bytes and also both of the allowed EOF + * behaviors. + * + * Implementations should not retain a reference to `p`. + * + * Use + * [`itereateReader`](https://deno.land/std/streams/iterate_reader.ts?s=iterateReader) + * from + * [`std/streams/iterate_reader.ts`](https://deno.land/std/streams/iterate_reader.ts) + * to turn a `Reader` into an {@linkcode AsyncIterator}. + */ + read(p: Uint8Array): Promise; + } + + /** + * An abstract interface which when implemented provides an interface to read + * bytes into an array buffer synchronously. + * + * @deprecated Use {@linkcode ReadableStream} instead. {@linkcode ReaderSync} + * will be removed in v2.0.0. + * @category I/O + */ + export interface ReaderSync { + /** + * Reads up to `p.byteLength` bytes into `p`. It resolves to the number + * of bytes read (`0` < `n` <= `p.byteLength`) and rejects if any error + * encountered. Even if `readSync()` returns `n` < `p.byteLength`, it may use + * all of `p` as scratch space during the call. If some data is available + * but not `p.byteLength` bytes, `readSync()` conventionally returns what is + * available instead of waiting for more. + * + * When `readSync()` encounters end-of-file condition, it returns EOF + * (`null`). + * + * When `readSync()` encounters an error, it throws with an error. + * + * Callers should always process the `n` > `0` bytes returned before + * considering the EOF (`null`). Doing so correctly handles I/O errors that + * happen after reading some bytes and also both of the allowed EOF + * behaviors. + * + * Implementations should not retain a reference to `p`. + * + * Use + * [`itereateReaderSync`](https://deno.land/std/streams/iterate_reader.ts?s=iterateReaderSync) + * from from + * [`std/streams/iterate_reader.ts`](https://deno.land/std/streams/iterate_reader.ts) + * to turn a `ReaderSync` into an {@linkcode Iterator}. + */ + readSync(p: Uint8Array): number | null; + } + + /** + * Options which can be set when using {@linkcode Deno.readFile} or + * {@linkcode Deno.readFileSync}. + * + * @category File System + */ + export interface ReadFileOptions { + /** + * An abort signal to allow cancellation of the file read operation. + * If the signal becomes aborted the readFile operation will be stopped + * and the promise returned will be rejected with an AbortError. + */ + signal?: AbortSignal; + } + + /** + * The permission descriptor for the `allow-read` and `deny-read` permissions, which controls + * access to reading resources from the local host. The option `path` allows + * scoping the permission to a specific path (and if the path is a directory + * any sub paths). + * + * Permission granted under `allow-read` only allows runtime code to attempt + * to read, the underlying operating system may apply additional permissions. + * + * @category Permissions + */ + export interface ReadPermissionDescriptor { + name: "read"; + /** + * An `allow-read` or `deny-read` permission can be scoped to a specific path (and if + * the path is a directory, any sub paths). + */ + path?: string | URL; + } + + /** + * Options which can be set when using {@linkcode Deno.remove} and + * {@linkcode Deno.removeSync}. + * + * @category File System + */ + export interface RemoveOptions { + /** + * If set to `true`, path will be removed even if it's a non-empty directory. + * + * @default {false} + */ + recursive?: boolean; + } + + /** + * A map of open resources that Deno is tracking. The key is the resource ID + * (_rid_) and the value is its representation. + * + * @deprecated {@linkcode Deno.resources} will be removed in Deno 2.0. + * @category Observability + */ + export interface ResourceMap { + [rid: number]: unknown; + } + + /** + * Options which can be used with {@linkcode Deno.run}. + * + * @deprecated Use {@linkcode Deno.Command} instead. {@linkcode Deno.run} + * will be removed in v2.0.0. + * @category Sub Process + */ + export interface RunOptions { + /** + * Arguments to pass. + * + * _Note_: the first element needs to be a path to the executable that is + * being run. + */ + cmd: readonly string[] | [string | URL, ...string[]]; + /** + * The current working directory that should be used when running the + * sub-process. + */ + cwd?: string; + /** Any environment variables to be set when running the sub-process. */ + env?: Record; + /** + * By default subprocess inherits `stdout` of parent process. To change + * this this option can be set to a resource ID (_rid_) of an open file, + * `"inherit"`, `"piped"`, or `"null"`: + * + * - _number_: the resource ID of an open file/resource. This allows you to + * write to a file. + * - `"inherit"`: The default if unspecified. The subprocess inherits from the + * parent. + * - `"piped"`: A new pipe should be arranged to connect the parent and child + * sub-process. + * - `"null"`: This stream will be ignored. This is the equivalent of attaching + * the stream to `/dev/null`. + */ + stdout?: "inherit" | "piped" | "null" | number; + /** + * By default subprocess inherits `stderr` of parent process. To change + * this this option can be set to a resource ID (_rid_) of an open file, + * `"inherit"`, `"piped"`, or `"null"`: + * + * - _number_: the resource ID of an open file/resource. This allows you to + * write to a file. + * - `"inherit"`: The default if unspecified. The subprocess inherits from the + * parent. + * - `"piped"`: A new pipe should be arranged to connect the parent and child + * sub-process. + * - `"null"`: This stream will be ignored. This is the equivalent of attaching + * the stream to `/dev/null`. + */ + stderr?: "inherit" | "piped" | "null" | number; + /** + * By default subprocess inherits `stdin` of parent process. To change + * this this option can be set to a resource ID (_rid_) of an open file, + * `"inherit"`, `"piped"`, or `"null"`: + * + * - _number_: the resource ID of an open file/resource. This allows you to + * read from a file. + * - `"inherit"`: The default if unspecified. The subprocess inherits from the + * parent. + * - `"piped"`: A new pipe should be arranged to connect the parent and child + * sub-process. + * - `"null"`: This stream will be ignored. This is the equivalent of attaching + * the stream to `/dev/null`. + */ + stdin?: "inherit" | "piped" | "null" | number; + } + + /** + * The permission descriptor for the `allow-run` and `deny-run` permissions, which controls + * access to what sub-processes can be executed by Deno. The option `command` + * allows scoping the permission to a specific executable. + * + * **Warning, in practice, `allow-run` is effectively the same as `allow-all` + * in the sense that malicious code could execute any arbitrary code on the + * host.** + * + * @category Permissions + */ + export interface RunPermissionDescriptor { + name: "run"; + /** + * An `allow-run` or `deny-run` permission can be scoped to a specific executable, + * which would be relative to the start-up CWD of the Deno CLI. + */ + command?: string | URL; + } + + /** + * An abstract interface which when implemented provides an interface to seek + * within an open file/resource asynchronously. + * + * @category I/O + */ + export interface Seeker { + /** + * Seek sets the offset for the next `read()` or `write()` to offset, + * interpreted according to `whence`: `Start` means relative to the + * start of the file, `Current` means relative to the current offset, + * and `End` means relative to the end. Seek resolves to the new offset + * relative to the start of the file. + * + * Seeking to an offset before the start of the file is an error. Seeking to + * any positive offset is legal, but the behavior of subsequent I/O + * operations on the underlying object is implementation-dependent. + * + * It resolves with the updated offset. + */ + seek(offset: number | bigint, whence: SeekMode): Promise; + } + + /** + * An abstract interface which when implemented provides an interface to seek + * within an open file/resource synchronously. + * + * @category I/O + */ + export interface SeekerSync { + /** + * Seek sets the offset for the next `readSync()` or `writeSync()` to + * offset, interpreted according to `whence`: `Start` means relative + * to the start of the file, `Current` means relative to the current + * offset, and `End` means relative to the end. + * + * Seeking to an offset before the start of the file is an error. Seeking to + * any positive offset is legal, but the behavior of subsequent I/O + * operations on the underlying object is implementation-dependent. + * + * It returns the updated offset. + */ + seekSync(offset: number | bigint, whence: SeekMode): number; + } + + /** @category I/O */ + export interface SetRawOptions { + /** + * The `cbreak` option can be used to indicate that characters that + * correspond to a signal should still be generated. When disabling raw + * mode, this option is ignored. This functionality currently only works on + * Linux and Mac OS. + */ + cbreak: boolean; + } + + /** + * Operating signals which can be listened for or sent to sub-processes. What + * signals and what their standard behaviors are OS dependent. + * + * @category Runtime Environment + */ + export type Signal = | "SIGABRT" + | "SIGALRM" + | "SIGBREAK" + | "SIGBUS" + | "SIGCHLD" + | "SIGCONT" + | "SIGEMT" + | "SIGFPE" + | "SIGHUP" + | "SIGILL" + | "SIGINFO" + | "SIGINT" + | "SIGIO" + | "SIGKILL" + | "SIGPIPE" + | "SIGPROF" + | "SIGPWR" + | "SIGQUIT" + | "SIGSEGV" + | "SIGSTKFLT" + | "SIGSTOP" + | "SIGSYS" + | "SIGTERM" + | "SIGTRAP" + | "SIGTSTP" + | "SIGTTIN" + | "SIGTTOU" + | "SIGURG" + | "SIGUSR1" + | "SIGUSR2" + | "SIGVTALRM" + | "SIGWINCH" + | "SIGXCPU" + | "SIGXFSZ"; + + /** + * Options that can be used with {@linkcode symlink} and + * {@linkcode symlinkSync}. + * + * @category File System + */ + export interface SymlinkOptions { + /** + * If the symbolic link should be either a file or directory. This option + * only applies to Windows and is ignored on other operating systems. + */ + type: "file" | "dir"; + } + + /** @category Testing */ + export interface TestDefinition { + fn: (t: TestContext) => void | Promise; + /** The name of the test. */ + name: string; + /** + * If truthy the current test step will be ignored. + * + * It is a quick way to skip over a step, but also can be used for + * conditional logic, like determining if an environment feature is present. + */ + ignore?: boolean; + /** + * If at least one test has `only` set to `true`, only run tests that have + * `only` set to `true` and fail the test suite. + */ + only?: boolean; + /** + * Check that the number of async completed operations after the test step + * is the same as number of dispatched operations. This ensures that the + * code tested does not start async operations which it then does + * not await. This helps in preventing logic errors and memory leaks + * in the application code. + * + * @default {true} + */ + sanitizeOps?: boolean; + /** + * Ensure the test step does not "leak" resources - like open files or + * network connections - by ensuring the open resources at the start of the + * test match the open resources at the end of the test. + * + * @default {true} + */ + sanitizeResources?: boolean; + /** + * Ensure the test case does not prematurely cause the process to exit, + * for example via a call to {@linkcode Deno.exit}. + * + * @default {true} + */ + sanitizeExit?: boolean; + /** + * Specifies the permissions that should be used to run the test. + * + * Set this to "inherit" to keep the calling runtime permissions, set this + * to "none" to revoke all permissions, or set a more specific set of + * permissions using a {@linkcode PermissionOptionsObject}. + * + * @default {"inherit"} + */ + permissions?: PermissionOptions; + } + + /** @category Testing */ + export interface TestStepDefinition { + /** + * The test function that will be tested when this step is executed. The + * function can take an argument which will provide information about the + * current step's context. + */ + fn: (t: TestContext) => void | Promise; + /** The name of the step. */ + name: string; + /** + * If truthy the current test step will be ignored. + * + * This is a quick way to skip over a step, but also can be used for + * conditional logic, like determining if an environment feature is present. + */ + ignore?: boolean; + /** + * Check that the number of async completed operations after the test step + * is the same as number of dispatched operations. This ensures that the + * code tested does not start async operations which it then does + * not await. This helps in preventing logic errors and memory leaks + * in the application code. + * + * Defaults to the parent test or step's value. + */ + sanitizeOps?: boolean; + /** + * Ensure the test step does not "leak" resources - like open files or + * network connections - by ensuring the open resources at the start of the + * step match the open resources at the end of the step. + * + * Defaults to the parent test or step's value. + */ + sanitizeResources?: boolean; + /** + * Ensure the test step does not prematurely cause the process to exit, + * for example via a call to {@linkcode Deno.exit}. + * + * Defaults to the parent test or step's value. + */ + sanitizeExit?: boolean; + } + + /** + * Context that is passed to a testing function, which can be used to either + * gain information about the current test, or register additional test + * steps within the current test. + * + * @category Testing + */ + export interface TestContext { + /** The current test name. */ + name: string; + /** The string URL of the current test. */ + origin: string; + /** + * If the current test is a step of another test, the parent test context + * will be set here. + */ + parent?: TestContext; + /** + * Run a sub step of the parent test or step. Returns a promise + * that resolves to a boolean signifying if the step completed successfully. + * + * The returned promise never rejects unless the arguments are invalid. + * + * If the test was ignored the promise returns `false`. + * + * ```ts + * Deno.test({ + * name: "a parent test", + * async fn(t) { + * console.log("before the step"); + * await t.step({ + * name: "step 1", + * fn(t) { + * console.log("current step:", t.name); + * } + * }); + * console.log("after the step"); + * } + * }); + * ``` + */ + step(definition: TestStepDefinition): Promise; + /** + * Run a sub step of the parent test or step. Returns a promise + * that resolves to a boolean signifying if the step completed successfully. + * + * The returned promise never rejects unless the arguments are invalid. + * + * If the test was ignored the promise returns `false`. + * + * ```ts + * Deno.test( + * "a parent test", + * async (t) => { + * console.log("before the step"); + * await t.step( + * "step 1", + * (t) => { + * console.log("current step:", t.name); + * } + * ); + * console.log("after the step"); + * } + * ); + * ``` + */ + step(name: string, fn: (t: TestContext) => void | Promise): Promise; + /** + * Run a sub step of the parent test or step. Returns a promise + * that resolves to a boolean signifying if the step completed successfully. + * + * The returned promise never rejects unless the arguments are invalid. + * + * If the test was ignored the promise returns `false`. + * + * ```ts + * Deno.test(async function aParentTest(t) { + * console.log("before the step"); + * await t.step(function step1(t) { + * console.log("current step:", t.name); + * }); + * console.log("after the step"); + * }); + * ``` + */ + step(fn: (t: TestContext) => void | Promise): Promise; + } + + /** @category Network */ + export interface TcpConn extends Conn { + /** + * The resource ID of the connection. + * + * @deprecated Use {@linkcode Deno.Conn} instance methods instead. + * {@linkcode Deno.Conn.rid} will be removed in Deno 2.0. + */ + readonly rid: number; + /** + * Enable/disable the use of Nagle's algorithm. + * + * @param [noDelay=true] + */ + setNoDelay(noDelay?: boolean): void; + /** Enable/disable keep-alive functionality. */ + setKeepAlive(keepAlive?: boolean): void; + } + + /** @category Network */ + export interface TcpListenOptions extends ListenOptions { + } + + /** @category Network */ + export interface TcpListenOptions extends ListenOptions { + /** + * When `true` the SO_REUSEPORT flag will be set on the listener. This + * allows multiple processes to listen on the same address and port. + * + * On Linux this will cause the kernel to distribute incoming connections + * across the different processes that are listening on the same address and + * port. + * + * This flag is only supported on Linux. It is silently ignored on other + * platforms. + * + * @default {false} + */ + reusePort?: boolean; + } + + /** @category Network */ + export interface TlsConn extends Conn { + /** + * The resource ID of the connection. + * + * @deprecated Use {@linkcode Deno.TlsConn} instance methods instead. + * {@linkcode Deno.TlsConn.rid} will be removed in Deno 2.0. + */ + readonly rid: number; + /** + * Runs the client or server handshake protocol to completion if that has + * not happened yet. Calling this method is optional; the TLS handshake + * will be completed automatically as soon as data is sent or received. + */ + handshake(): Promise; + } + + /** @category Network */ + export interface TlsHandshakeInfo { + /** + * Contains the ALPN protocol selected during negotiation with the server. + * If no ALPN protocol selected, returns `null`. + */ + alpnProtocol: string | null; + } + + /** + * Specialized listener that accepts TLS connections. + * + * @category Network + */ + export type TlsListener = Listener; + + /** @category Network */ + export interface UnixAddr { + transport: "unix" | "unixpacket"; + path: string; + } + + /** @category Network */ + export interface UnixConn extends Conn { + /** + * The resource ID of the connection. + * + * @deprecated Use {@linkcode Deno.UnixConn} instance methods instead. + * {@linkcode Deno.UnixConn.rid} will be removed in Deno 2.0. + */ + readonly rid: number; + } + + /** @category Network */ + export interface UnixConnectOptions { + transport: "unix"; + path: string; + } + + /** + * Options which can be set when opening a Unix listener via + * {@linkcode Deno.listen} or {@linkcode Deno.listenDatagram}. + * + * @category Network + */ + export interface UnixListenOptions { + /** A path to the Unix Socket. */ + path: string; + } + + /** + * Options for writing to a file. + * + * @category File System + */ + export interface WriteFileOptions { + /** + * If set to `true`, will append to a file instead of overwriting previous + * contents. + * + * @default {false} + */ + append?: boolean; + /** + * Sets the option to allow creating a new file, if one doesn't already + * exist at the specified path. + * + * @default {true} + */ + create?: boolean; + /** + * If set to `true`, no file, directory, or symlink is allowed to exist at + * the target location. When createNew is set to `true`, `create` is ignored. + * + * @default {false} + */ + createNew?: boolean; + /** Permissions always applied to file. */ + mode?: number; + /** + * An abort signal to allow cancellation of the file write operation. + * + * If the signal becomes aborted the write file operation will be stopped + * and the promise returned will be rejected with an {@linkcode AbortError}. + */ + signal?: AbortSignal; + } + + /** + * The permission descriptor for the `allow-write` and `deny-write` permissions, which + * controls access to writing to resources from the local host. The option + * `path` allow scoping the permission to a specific path (and if the path is + * a directory any sub paths). + * + * Permission granted under `allow-write` only allows runtime code to attempt + * to write, the underlying operating system may apply additional permissions. + * + * @category Permissions + */ + export interface WritePermissionDescriptor { + name: "write"; + /** + * An `allow-write` or `deny-write` permission can be scoped to a specific path (and if + * the path is a directory, any sub paths). + */ + path?: string | URL; + } + + /** + * An abstract interface which when implemented provides an interface to write + * bytes from an array buffer to a file/resource asynchronously. + * + * @deprecated Use {@linkcode WritableStream} instead. {@linkcode Writer} + * will be removed in v2.0.0. + * @category I/O + */ + export interface Writer { + /** + * Writes `p.byteLength` bytes from `p` to the underlying data stream. It + * resolves to the number of bytes written from `p` (`0` <= `n` <= + * `p.byteLength`) or reject with the error encountered that caused the + * write to stop early. `write()` must reject with a non-null error if + * would resolve to `n` < `p.byteLength`. `write()` must not modify the + * slice data, even temporarily. + * + * This function is one of the lowest + * level APIs and most users should not work with this directly, but rather use + * [`writeAll()`](https://deno.land/std/streams/write_all.ts?s=writeAll) from + * [`std/streams/write_all.ts`](https://deno.land/std/streams/write_all.ts) + * instead. + * + * Implementations should not retain a reference to `p`. + */ + write(p: Uint8Array): Promise; + } + + /** + * An abstract interface which when implemented provides an interface to write + * bytes from an array buffer to a file/resource synchronously. + * + * @deprecated Use {@linkcode WritableStream} instead. {@linkcode WriterSync} + * will be removed in v2.0.0. + * @category I/O + */ + export interface WriterSync { + /** + * Writes `p.byteLength` bytes from `p` to the underlying data + * stream. It returns the number of bytes written from `p` (`0` <= `n` + * <= `p.byteLength`) and any error encountered that caused the write to + * stop early. `writeSync()` must throw a non-null error if it returns `n` < + * `p.byteLength`. `writeSync()` must not modify the slice data, even + * temporarily. + * + * Implementations should not retain a reference to `p`. + */ + writeSync(p: Uint8Array): number; + } + + /** + * If {@linkcode Deno.resolveDns} is called with `"CAA"` record type + * specified, it will resolve with an array of objects with this interface. + * + * @category Network + */ + export interface CAARecord { + /** + * If `true`, indicates that the corresponding property tag **must** be + * understood if the semantics of the CAA record are to be correctly + * interpreted by an issuer. + * + * Issuers **must not** issue certificates for a domain if the relevant CAA + * Resource Record set contains unknown property tags that have `critical` + * set. + */ + critical: boolean; + /** + * An string that represents the identifier of the property represented by + * the record. + */ + tag: string; + /** The value associated with the tag. */ + value: string; + } + + /** + * If {@linkcode Deno.resolveDns} is called with `"MX"` record type + * specified, it will return an array of objects with this interface. + * + * @category Network + */ + export interface MXRecord { + /** + * A priority value, which is a relative value compared to the other + * preferences of MX records for the domain. + */ + preference: number; + /** The server that mail should be delivered to. */ + exchange: string; + } + + /** + * If {@linkcode Deno.resolveDns} is called with `"NAPTR"` record type + * specified, it will return an array of objects with this interface. + * + * @category Network + */ + export interface NAPTRRecord { + order: number; + preference: number; + flags: string; + services: string; + regexp: string; + replacement: string; + } + + /** + * Options which can be set when using {@linkcode Deno.resolveDns}. + * + * @category Network + */ + export interface ResolveDnsOptions { + /** + * The name server to be used for lookups. + * + * If not specified, defaults to the system configuration. For example + * `/etc/resolv.conf` on Unix-like systems. + */ + nameServer?: { + /** The IP address of the name server. */ + ipAddr: string; + /** The port number the query will be sent to. + * + * @default {53} */ + port?: number; + }; + /** + * An abort signal to allow cancellation of the DNS resolution operation. + * If the signal becomes aborted the resolveDns operation will be stopped + * and the promise returned will be rejected with an AbortError. + */ + signal?: AbortSignal; + } + + /** + * If {@linkcode Deno.resolveDns} is called with `"SOA"` record type + * specified, it will return an array of objects with this interface. + * + * @category Network + */ + export interface SOARecord { + mname: string; + rname: string; + serial: number; + refresh: number; + retry: number; + expire: number; + minimum: number; + } + + /** + * If {@linkcode Deno.resolveDns} is called with `"SRV"` record type + * specified, it will return an array of objects with this interface. + * + * @category Network + */ + export interface SRVRecord { + priority: number; + weight: number; + port: number; + target: string; + } + + /** + * The type of the resource record to resolve via DNS using + * {@linkcode Deno.resolveDns}. + * + * Only the listed types are supported currently. + * + * @category Network + */ + export type RecordType = | "A" + | "AAAA" + | "ANAME" + | "CAA" + | "CNAME" + | "MX" + | "NAPTR" + | "NS" + | "PTR" + | "SOA" + | "SRV" + | "TXT"; + /** + * Information related to the build of the current Deno runtime. + * + * Users are discouraged from code branching based on this information, as + * assumptions about what is available in what build environment might change + * over time. Developers should specifically sniff out the features they + * intend to use. + * + * The intended use for the information is for logging and debugging purposes. + * + * @category Runtime Environment + */ + export const build: { + /** The [LLVM](https://llvm.org/) target triple, which is the combination + * of `${arch}-${vendor}-${os}` and represent the specific build target that + * the current runtime was built for. */ + target: string; + /** Instruction set architecture that the Deno CLI was built for. */ + arch: "x86_64" | "aarch64"; + /** The operating system that the Deno CLI was built for. `"darwin"` is + * also known as OSX or MacOS. */ + os: + | "darwin" + | "linux" + | "android" + | "windows" + | "freebsd" + | "netbsd" + | "aix" + | "solaris" + | "illumos"; + /** The computer vendor that the Deno CLI was built for. */ + vendor: string; + /** Optional environment flags that were set for this build of Deno CLI. */ + env?: string; + }; + export const customInspect: unique symbol; + /** + * An interface containing methods to interact with the process environment + * variables. + * + * @tags allow-env + * @category Runtime Environment + */ + export const env: Env; + + export namespace errors { + export class AddrInUse extends Error { + } + + export class AddrNotAvailable extends Error { + } + + export class AlreadyExists extends Error { + } + + export class BadResource extends Error { + } + + export class BrokenPipe extends Error { + } + + export class Busy extends Error { + } + + export class ConnectionAborted extends Error { + } + + export class ConnectionRefused extends Error { + } + + export class ConnectionReset extends Error { + } + + export class Http extends Error { + } + + export class Interrupted extends Error { + } + + export class InvalidData extends Error { + } + + export class NotConnected extends Error { + } + + export class NotFound extends Error { + code: string; + } + + export class PermissionDenied extends Error { + } + + export class TimedOut extends Error { + } + + export class UnexpectedEof extends Error { + } + + export class WriteZero extends Error { + } + } + + /** + * The URL of the entrypoint module entered from the command-line. It + * requires read permission to the CWD. + * + * Also see {@linkcode ImportMeta} for other related information. + * + * @tags allow-read + * @category Runtime Environment + */ + export const mainModule: string; + /** + * Receive metrics from the privileged side of Deno. This is primarily used + * in the development of Deno. _Ops_, also called _bindings_, are the + * go-between between Deno JavaScript sandbox and the rest of Deno. + * + * ```shell + * > console.table(Deno.metrics()) + * ┌─────────────────────────┬────────┐ + * │ (index) │ Values │ + * ├─────────────────────────┼────────┤ + * │ opsDispatched │ 3 │ + * │ opsDispatchedSync │ 2 │ + * │ opsDispatchedAsync │ 1 │ + * │ opsDispatchedAsyncUnref │ 0 │ + * │ opsCompleted │ 3 │ + * │ opsCompletedSync │ 2 │ + * │ opsCompletedAsync │ 1 │ + * │ opsCompletedAsyncUnref │ 0 │ + * │ bytesSentControl │ 73 │ + * │ bytesSentData │ 0 │ + * │ bytesReceived │ 375 │ + * └─────────────────────────┴────────┘ + * ``` + * + * @category Observability + * @deprecated {@linkcode Deno.metrics} will be removed in v2.0.0. + */ + export function metrics(): Metrics; + /** + * Reflects the `NO_COLOR` environment variable at program start. + * + * When the value is `true`, the Deno CLI will attempt to not send color codes + * to `stderr` or `stdout` and other command line programs should also attempt + * to respect this value. + * + * See: https://no-color.org/ + * + * @category Runtime Environment + */ + export const noColor: boolean; + /** + * Deno's permission management API. + * + * It is a singleton instance of the {@linkcode Permissions} object and is + * based on the web platform + * [Permissions API](https://developer.mozilla.org/en-US/docs/Web/API/Permissions_API), + * though some proposed parts of the API which are useful in a server side + * runtime context were removed or abandoned in the web platform specification + * which is why it was chosen to locate it in the {@linkcode Deno} namespace + * instead. + * + * By default, if the `stdin`/`stdout` is TTY for the Deno CLI (meaning it can + * send and receive text), then the CLI will prompt the user to grant + * permission when an un-granted permission is requested. This behavior can + * be changed by using the `--no-prompt` command at startup. When prompting + * the CLI will request the narrowest permission possible, potentially making + * it annoying to the user. The permissions APIs allow the code author to + * request a wider set of permissions at one time in order to provide a better + * user experience. + * + * Requesting already granted permissions will not prompt the user and will + * return that the permission was granted. + * + * ### Querying + * + * ```ts + * const status = await Deno.permissions.query({ name: "read", path: "/etc" }); + * console.log(status.state); + * ``` + * + * ```ts + * const status = Deno.permissions.querySync({ name: "read", path: "/etc" }); + * console.log(status.state); + * ``` + * + * ### Revoking + * + * ```ts + * import { assert } from "https://deno.land/std/assert/mod.ts"; + * + * const status = await Deno.permissions.revoke({ name: "run" }); + * assert(status.state !== "granted") + * ``` + * + * ```ts + * import { assert } from "https://deno.land/std/assert/mod.ts"; + * + * const status = Deno.permissions.revokeSync({ name: "run" }); + * assert(status.state !== "granted") + * ``` + * + * ### Requesting + * + * ```ts + * const status = await Deno.permissions.request({ name: "env" }); + * if (status.state === "granted") { + * console.log("'env' permission is granted."); + * } else { + * console.log("'env' permission is denied."); + * } + * ``` + * + * ```ts + * const status = Deno.permissions.requestSync({ name: "env" }); + * if (status.state === "granted") { + * console.log("'env' permission is granted."); + * } else { + * console.log("'env' permission is denied."); + * } + * ``` + * + * @category Permissions + */ + export const permissions: Permissions; + /** + * The current process ID of this instance of the Deno CLI. + * + * ```ts + * console.log(Deno.pid); + * ``` + * + * @category Runtime Environment + */ + export const pid: number; + /** + * The process ID of parent process of this instance of the Deno CLI. + * + * ```ts + * console.log(Deno.ppid); + * ``` + * + * @category Runtime Environment + */ + export const ppid: number; + /** + * Returns a map of open resource IDs (_rid_) along with their string + * representations. This is an internal API and as such resource + * representation has `unknown` type; that means it can change any time and + * should not be depended upon. + * + * ```ts + * console.log(Deno.resources()); + * // { 0: "stdin", 1: "stdout", 2: "stderr" } + * Deno.openSync('../test.file'); + * console.log(Deno.resources()); + * // { 0: "stdin", 1: "stdout", 2: "stderr", 3: "fsFile" } + * ``` + * + * @deprecated {@linkcode Deno.resources} will be removed in Deno 2.0. + * @category Observability + */ + export function resources(): ResourceMap; + /** + * Version information related to the current Deno CLI runtime environment. + * + * Users are discouraged from code branching based on this information, as + * assumptions about what is available in what build environment might change + * over time. Developers should specifically sniff out the features they + * intend to use. + * + * The intended use for the information is for logging and debugging purposes. + * + * @category Runtime Environment + */ + export const version: { + /** Deno CLI's version. For example: `"1.26.0"`. */ + deno: string; + /** The V8 version used by Deno. For example: `"10.7.100.0"`. + * + * V8 is the underlying JavaScript runtime platform that Deno is built on + * top of. */ + v8: string; + /** The TypeScript version used by Deno. For example: `"4.8.3"`. + * + * A version of the TypeScript type checker and language server is built-in + * to the Deno CLI. */ + typescript: string; + }; + /** + * A reference to `stdin` which can be used to read directly from `stdin`. + * It implements the Deno specific {@linkcode Reader}, {@linkcode ReaderSync}, + * and {@linkcode Closer} interfaces as well as provides a + * {@linkcode ReadableStream} interface. + * + * ### Reading chunks from the readable stream + * + * ```ts + * const decoder = new TextDecoder(); + * for await (const chunk of Deno.stdin.readable) { + * const text = decoder.decode(chunk); + * // do something with the text + * } + * ``` + * + * @category I/O + */ + export const stdin: Reader & ReaderSync & Closer & { + /** + * The resource ID assigned to `stdin`. This can be used with the discreet + * I/O functions in the `Deno` namespace. + * + * @deprecated Use {@linkcode Deno.stdin} instance methods instead. + * {@linkcode Deno.stdin.rid} will be removed in Deno 2.0. + */ + readonly rid: number; + /** A readable stream interface to `stdin`. */ + readonly readable: ReadableStream; + /** + * Set TTY to be under raw mode or not. In raw mode, characters are read and + * returned as is, without being processed. All special processing of + * characters by the terminal is disabled, including echoing input + * characters. Reading from a TTY device in raw mode is faster than reading + * from a TTY device in canonical mode. + * + * ```ts + * Deno.stdin.setRaw(true, { cbreak: true }); + * ``` + * + * @category I/O + */ + setRaw(mode: boolean, options?: SetRawOptions): void; + /** + * Checks if `stdin` is a TTY (terminal). + * + * ```ts + * // This example is system and context specific + * Deno.stdin.isTerminal(); // true + * ``` + * + * @category I/O + */ + isTerminal(): boolean; + }; + /** + * A reference to `stdout` which can be used to write directly to `stdout`. + * It implements the Deno specific {@linkcode Writer}, {@linkcode WriterSync}, + * and {@linkcode Closer} interfaces as well as provides a + * {@linkcode WritableStream} interface. + * + * These are low level constructs, and the {@linkcode console} interface is a + * more straight forward way to interact with `stdout` and `stderr`. + * + * @category I/O + */ + export const stdout: Writer & WriterSync & Closer & { + /** + * The resource ID assigned to `stdout`. This can be used with the discreet + * I/O functions in the `Deno` namespace. + * + * @deprecated Use {@linkcode Deno.stdout} instance methods instead. + * {@linkcode Deno.stdout.rid} will be removed in Deno 2.0. + */ + readonly rid: number; + /** A writable stream interface to `stdout`. */ + readonly writable: WritableStream; + /** + * Checks if `stdout` is a TTY (terminal). + * + * ```ts + * // This example is system and context specific + * Deno.stdout.isTerminal(); // true + * ``` + * + * @category I/O + */ + isTerminal(): boolean; + }; + /** + * A reference to `stderr` which can be used to write directly to `stderr`. + * It implements the Deno specific {@linkcode Writer}, {@linkcode WriterSync}, + * and {@linkcode Closer} interfaces as well as provides a + * {@linkcode WritableStream} interface. + * + * These are low level constructs, and the {@linkcode console} interface is a + * more straight forward way to interact with `stdout` and `stderr`. + * + * @category I/O + */ + export const stderr: Writer & WriterSync & Closer & { + /** + * The resource ID assigned to `stderr`. This can be used with the discreet + * I/O functions in the `Deno` namespace. + * + * @deprecated Use {@linkcode Deno.stderr} instance methods instead. + * {@linkcode Deno.stderr.rid} will be removed in Deno 2.0. + */ + readonly rid: number; + /** A writable stream interface to `stderr`. */ + readonly writable: WritableStream; + /** + * Checks if `stderr` is a TTY (terminal). + * + * ```ts + * // This example is system and context specific + * Deno.stderr.isTerminal(); // true + * ``` + * + * @category I/O + */ + isTerminal(): boolean; + }; +} + +declare module "@deno/shim-deno/test-internals" { + type TestDefinition = Deno.TestDefinition; + /** Reference to the array that `Deno.test` calls insert their definition into. */ + export const testDefinitions: TestDefinition[]; +} + +declare global { + interface SymbolConstructor { + readonly asyncDispose: unique symbol; + readonly dispose: unique symbol; + } +} + +type MessagePort = typeof globalThis["MessagePort"]; diff --git a/action/node_modules/@deno/shim-deno/dist/index.d.mts b/action/node_modules/@deno/shim-deno/dist/index.d.mts new file mode 100644 index 00000000..bc87ed47 --- /dev/null +++ b/action/node_modules/@deno/shim-deno/dist/index.d.mts @@ -0,0 +1,4762 @@ +// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. + +/// + +import { URL } from "url"; +import { ReadableStream, WritableStream } from "stream/web"; + +/** @category DOM Events */ +declare interface EventListenerOptions { + capture?: boolean; +} + +/** @category DOM Events */ +declare interface AddEventListenerOptions extends EventListenerOptions { + once?: boolean; + passive?: boolean; + signal?: AbortSignal; +} + +/** @category DOM Events */ +declare interface EventListener { + (evt: Event): void | Promise; +} + +/** @category DOM Events */ +declare interface EventListenerObject { + handleEvent(evt: Event): void | Promise; +} + +/** @category DOM Events */ +declare type EventListenerOrEventListenerObject = | EventListener + | EventListenerObject; + +interface Disposable { + [Symbol.dispose](): void; +} + +interface AsyncDisposable { + [Symbol.asyncDispose](): PromiseLike; +} + +export declare namespace Deno { + export const File: typeof FsFile; + + export class FsFile implements Deno.FsFile { + #private; + readonly rid: number; + constructor(rid: number); + get readable(): ReadableStream; + get writable(): WritableStream; + [Symbol.dispose](): void; + write(p: Uint8Array): Promise; + writeSync(p: Uint8Array): number; + truncate(len?: number): Promise; + truncateSync(len?: number): void; + read(p: Uint8Array): Promise; + readSync(p: Uint8Array): number | null; + seek(_offset: number, _whence: Deno.SeekMode): Promise; + seekSync(_offset: number, _whence: Deno.SeekMode): number; + stat(): Promise; + statSync(): Deno.FileInfo; + sync(): Promise; + syncSync(): void; + syncData(): Promise; + syncDataSync(): void; + utime(_atime: number | Date, _mtime: number | Date): Promise; + utimeSync(_atime: number | Date, _mtime: number | Date): void; + close(): void; + } + + export class Permissions implements Deno.Permissions { + query(desc: Deno.PermissionDescriptor): Promise; + querySync(_desc: Deno.PermissionDescriptor): PermissionStatus; + revoke(desc: Deno.PermissionDescriptor): Promise; + revokeSync(_desc: Deno.PermissionDescriptor): PermissionStatus; + request(desc: Deno.PermissionDescriptor): Promise; + requestSync(desc: Deno.PermissionDescriptor): PermissionStatus; + } + + export class PermissionStatus extends EventTarget implements Deno.PermissionStatus { + readonly state: Deno.PermissionState; + onchange: ((this: PermissionStatus, ev: Event) => any) | null; + readonly partial: boolean; + } + + export enum SeekMode { + Start = 0, + Current = 1, + End = 2 + } + + /** + * The `tty.isatty()` method returns `true` if the given `fd` is associated with + * a TTY and `false` if it is not, including whenever `fd` is not a non-negative + * integer. + * @since v0.5.8 + * @param fd A numeric file descriptor + */ + export function isatty(fd: number): boolean; + /** + * Registers the given function as a listener of the given signal event. + * + * ```ts + * Deno.addSignalListener( + * "SIGTERM", + * () => { + * console.log("SIGTERM!") + * } + * ); + * ``` + * + * _Note_: On Windows only `"SIGINT"` (CTRL+C) and `"SIGBREAK"` (CTRL+Break) + * are supported. + * + * @category Runtime Environment + */ + export function addSignalListener(signal: Signal, handler: () => void): void; + /** + * Change the current working directory to the specified path. + * + * ```ts + * Deno.chdir("/home/userA"); + * Deno.chdir("../userB"); + * Deno.chdir("C:\\Program Files (x86)\\Java"); + * ``` + * + * Throws {@linkcode Deno.errors.NotFound} if directory not found. + * + * Throws {@linkcode Deno.errors.PermissionDenied} if the user does not have + * operating system file access rights. + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category Runtime Environment + */ + export function chdir(directory: string | URL): void; + /** + * Changes the permission of a specific file/directory of specified path. + * Ignores the process's umask. + * + * ```ts + * await Deno.chmod("/path/to/file", 0o666); + * ``` + * + * The mode is a sequence of 3 octal numbers. The first/left-most number + * specifies the permissions for the owner. The second number specifies the + * permissions for the group. The last/right-most number specifies the + * permissions for others. For example, with a mode of 0o764, the owner (7) + * can read/write/execute, the group (6) can read/write and everyone else (4) + * can read only. + * + * | Number | Description | + * | ------ | ----------- | + * | 7 | read, write, and execute | + * | 6 | read and write | + * | 5 | read and execute | + * | 4 | read only | + * | 3 | write and execute | + * | 2 | write only | + * | 1 | execute only | + * | 0 | no permission | + * + * NOTE: This API currently throws on Windows + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function chmod(path: string | URL, mode: number): Promise; + /** + * Synchronously changes the permission of a specific file/directory of + * specified path. Ignores the process's umask. + * + * ```ts + * Deno.chmodSync("/path/to/file", 0o666); + * ``` + * + * For a full description, see {@linkcode Deno.chmod}. + * + * NOTE: This API currently throws on Windows + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function chmodSync(path: string | URL, mode: number): void; + /** + * Change owner of a regular file or directory. + * + * This functionality is not available on Windows. + * + * ```ts + * await Deno.chown("myFile.txt", 1000, 1002); + * ``` + * + * Requires `allow-write` permission. + * + * Throws Error (not implemented) if executed on Windows. + * + * @tags allow-write + * @category File System + * @param path path to the file + * @param uid user id (UID) of the new owner, or `null` for no change + * @param gid group id (GID) of the new owner, or `null` for no change + */ + export function chown(path: string | URL, uid: number | null, gid: number | null): Promise; + /** + * Synchronously change owner of a regular file or directory. + * + * This functionality is not available on Windows. + * + * ```ts + * Deno.chownSync("myFile.txt", 1000, 1002); + * ``` + * + * Requires `allow-write` permission. + * + * Throws Error (not implemented) if executed on Windows. + * + * @tags allow-write + * @category File System + * @param path path to the file + * @param uid user id (UID) of the new owner, or `null` for no change + * @param gid group id (GID) of the new owner, or `null` for no change + */ + export function chownSync(path: string | URL, uid: number | null, gid: number | null): void; + /** + * Close the given resource ID (`rid`) which has been previously opened, such + * as via opening or creating a file. Closing a file when you are finished + * with it is important to avoid leaking resources. + * + * ```ts + * const file = await Deno.open("my_file.txt"); + * // do work with "file" object + * Deno.close(file.rid); + * ``` + * + * It is recommended to define the variable with the `using` keyword so the + * runtime will automatically close the resource when it goes out of scope. + * Doing so negates the need to manually close the resource. + * + * ```ts + * using file = await Deno.open("my_file.txt"); + * // do work with "file" object + * ``` + * + * @deprecated Use `.close()` method on the resource instead. + * {@linkcode Deno.close} will be removed in Deno 2.0. + * @category I/O + */ + export function close(rid: number): void; + /** + * Connects to the hostname (default is "127.0.0.1") and port on the named + * transport (default is "tcp"), and resolves to the connection (`Conn`). + * + * ```ts + * const conn1 = await Deno.connect({ port: 80 }); + * const conn2 = await Deno.connect({ hostname: "192.0.2.1", port: 80 }); + * const conn3 = await Deno.connect({ hostname: "[2001:db8::1]", port: 80 }); + * const conn4 = await Deno.connect({ hostname: "golang.org", port: 80, transport: "tcp" }); + * ``` + * + * Requires `allow-net` permission for "tcp". + * + * @tags allow-net + * @category Network + */ + export function connect(options: ConnectOptions): Promise; + /** + * Connects to the hostname (default is "127.0.0.1") and port on the named + * transport (default is "tcp"), and resolves to the connection (`Conn`). + * + * ```ts + * const conn1 = await Deno.connect({ port: 80 }); + * const conn2 = await Deno.connect({ hostname: "192.0.2.1", port: 80 }); + * const conn3 = await Deno.connect({ hostname: "[2001:db8::1]", port: 80 }); + * const conn4 = await Deno.connect({ hostname: "golang.org", port: 80, transport: "tcp" }); + * const conn5 = await Deno.connect({ path: "/foo/bar.sock", transport: "unix" }); + * ``` + * + * Requires `allow-net` permission for "tcp" and `allow-read` for "unix". + * + * @tags allow-net, allow-read + * @category Network + */ + export function connect(options: UnixConnectOptions): Promise; + /** + * Establishes a secure connection over TLS (transport layer security) using + * an optional cert file, hostname (default is "127.0.0.1") and port. The + * cert file is optional and if not included Mozilla's root certificates will + * be used (see also https://github.com/ctz/webpki-roots for specifics) + * + * ```ts + * const caCert = await Deno.readTextFile("./certs/my_custom_root_CA.pem"); + * const conn1 = await Deno.connectTls({ port: 80 }); + * const conn2 = await Deno.connectTls({ caCerts: [caCert], hostname: "192.0.2.1", port: 80 }); + * const conn3 = await Deno.connectTls({ hostname: "[2001:db8::1]", port: 80 }); + * const conn4 = await Deno.connectTls({ caCerts: [caCert], hostname: "golang.org", port: 80}); + * ``` + * + * Requires `allow-net` permission. + * + * @tags allow-net + * @category Network + */ + export function connectTls(options: ConnectTlsOptions): Promise; + /** + * Gets the size of the console as columns/rows. + * + * ```ts + * const { columns, rows } = Deno.consoleSize(); + * ``` + * + * This returns the size of the console window as reported by the operating + * system. It's not a reflection of how many characters will fit within the + * console window, but can be used as part of that calculation. + * + * @category I/O + */ + export function consoleSize(): { + columns: number; + rows: number; + }; + /** + * Copies from `src` to `dst` until either EOF (`null`) is read from `src` or + * an error occurs. It resolves to the number of bytes copied or rejects with + * the first error encountered while copying. + * + * @deprecated Use {@linkcode https://deno.land/std/io/copy.ts?s=copy | copy} + * instead. {@linkcode Deno.copy} will be removed in v2.0.0. + * @category I/O + * @param src The source to copy from + * @param dst The destination to copy to + * @param options Can be used to tune size of the buffer. Default size is 32kB + */ + export function copy(src: Reader, dst: Writer, options?: { bufSize?: number }): Promise; + /** + * Copies the contents and permissions of one file to another specified path, + * by default creating a new file if needed, else overwriting. Fails if target + * path is a directory or is unwritable. + * + * ```ts + * await Deno.copyFile("from.txt", "to.txt"); + * ``` + * + * Requires `allow-read` permission on `fromPath`. + * + * Requires `allow-write` permission on `toPath`. + * + * @tags allow-read, allow-write + * @category File System + */ + export function copyFile(fromPath: string | URL, toPath: string | URL): Promise; + /** + * Synchronously copies the contents and permissions of one file to another + * specified path, by default creating a new file if needed, else overwriting. + * Fails if target path is a directory or is unwritable. + * + * ```ts + * Deno.copyFileSync("from.txt", "to.txt"); + * ``` + * + * Requires `allow-read` permission on `fromPath`. + * + * Requires `allow-write` permission on `toPath`. + * + * @tags allow-read, allow-write + * @category File System + */ + export function copyFileSync(fromPath: string | URL, toPath: string | URL): void; + /** + * Creates a file if none exists or truncates an existing file and resolves to + * an instance of {@linkcode Deno.FsFile}. + * + * ```ts + * const file = await Deno.create("/foo/bar.txt"); + * ``` + * + * Requires `allow-read` and `allow-write` permissions. + * + * @tags allow-read, allow-write + * @category File System + */ + export function create(path: string | URL): Promise; + /** + * Creates a file if none exists or truncates an existing file and returns + * an instance of {@linkcode Deno.FsFile}. + * + * ```ts + * const file = Deno.createSync("/foo/bar.txt"); + * ``` + * + * Requires `allow-read` and `allow-write` permissions. + * + * @tags allow-read, allow-write + * @category File System + */ + export function createSync(path: string | URL): FsFile; + /** + * Return a string representing the current working directory. + * + * If the current directory can be reached via multiple paths (due to symbolic + * links), `cwd()` may return any one of them. + * + * ```ts + * const currentWorkingDirectory = Deno.cwd(); + * ``` + * + * Throws {@linkcode Deno.errors.NotFound} if directory not available. + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category Runtime Environment + */ + export function cwd(): string; + /** + * Returns the path to the current deno executable. + * + * ```ts + * console.log(Deno.execPath()); // e.g. "/home/alice/.local/bin/deno" + * ``` + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category Runtime Environment + */ + export function execPath(): string; + /** + * Exit the Deno process with optional exit code. + * + * If no exit code is supplied then Deno will exit with return code of `0`. + * + * In worker contexts this is an alias to `self.close();`. + * + * ```ts + * Deno.exit(5); + * ``` + * + * @category Runtime Environment + */ + export function exit(code?: number): never; + /** + * Flushes any pending data operations of the given file stream to disk. + * ```ts + * const file = await Deno.open( + * "my_file.txt", + * { read: true, write: true, create: true }, + * ); + * await file.write(new TextEncoder().encode("Hello World")); + * await Deno.fdatasync(file.rid); + * console.log(await Deno.readTextFile("my_file.txt")); // Hello World + * ``` + * + * @category I/O + */ + export function fdatasync(rid: number): Promise; + /** + * Synchronously flushes any pending data operations of the given file stream + * to disk. + * + * ```ts + * const file = Deno.openSync( + * "my_file.txt", + * { read: true, write: true, create: true }, + * ); + * Deno.writeSync(file.rid, new TextEncoder().encode("Hello World")); + * Deno.fdatasyncSync(file.rid); + * console.log(Deno.readTextFileSync("my_file.txt")); // Hello World + * ``` + * + * @category I/O + */ + export function fdatasyncSync(rid: number): void; + /** + * Returns a `Deno.FileInfo` for the given file stream. + * + * ```ts + * import { assert } from "https://deno.land/std/assert/mod.ts"; + * + * const file = await Deno.open("file.txt", { read: true }); + * const fileInfo = await Deno.fstat(file.rid); + * assert(fileInfo.isFile); + * ``` + * + * @deprecated Use `file.stat()` instead. + * {@linkcode Deno.fstat} will be removed in Deno 2.0. + * @category File System + */ + export function fstat(rid: number): Promise; + /** + * Synchronously returns a {@linkcode Deno.FileInfo} for the given file + * stream. + * + * ```ts + * import { assert } from "https://deno.land/std/assert/mod.ts"; + * + * const file = Deno.openSync("file.txt", { read: true }); + * const fileInfo = Deno.fstatSync(file.rid); + * assert(fileInfo.isFile); + * ``` + * + * @deprecated Use `file.statSync()` instead. + * {@linkcode Deno.fstatSync} will be removed in Deno 2.0. + * @category File System + */ + export function fstatSync(rid: number): FileInfo; + /** + * Flushes any pending data and metadata operations of the given file stream + * to disk. + * + * ```ts + * const file = await Deno.open( + * "my_file.txt", + * { read: true, write: true, create: true }, + * ); + * await file.write(new TextEncoder().encode("Hello World")); + * await file.truncate(1); + * await Deno.fsync(file.rid); + * console.log(await Deno.readTextFile("my_file.txt")); // H + * ``` + * + * @category I/O + */ + export function fsync(rid: number): Promise; + /** + * Synchronously flushes any pending data and metadata operations of the given + * file stream to disk. + * + * ```ts + * const file = Deno.openSync( + * "my_file.txt", + * { read: true, write: true, create: true }, + * ); + * Deno.writeSync(file.rid, new TextEncoder().encode("Hello World")); + * file.truncateSync(1); + * Deno.fsyncSync(file.rid); + * console.log(Deno.readTextFileSync("my_file.txt")); // H + * ``` + * + * @category I/O + */ + export function fsyncSync(rid: number): void; + /** + * Truncates or extends the specified file stream, to reach the specified + * `len`. + * + * If `len` is not specified then the entire file contents are truncated as if + * `len` was set to `0`. + * + * If the file previously was larger than this new length, the extra data is + * lost. + * + * If the file previously was shorter, it is extended, and the extended part + * reads as null bytes ('\0'). + * + * ### Truncate the entire file + * + * ```ts + * const file = await Deno.open( + * "my_file.txt", + * { read: true, write: true, create: true } + * ); + * await Deno.ftruncate(file.rid); + * ``` + * + * ### Truncate part of the file + * + * ```ts + * const file = await Deno.open( + * "my_file.txt", + * { read: true, write: true, create: true } + * ); + * await file.write(new TextEncoder().encode("Hello World")); + * await Deno.ftruncate(file.rid, 7); + * const data = new Uint8Array(32); + * await Deno.read(file.rid, data); + * console.log(new TextDecoder().decode(data)); // Hello W + * ``` + * + * @deprecated Use {@linkcode Deno.FsFile.truncate} instead. + * {@linkcode Deno.ftruncate} will be removed in Deno 2.0. + * @category File System + */ + export function ftruncate(rid: number, len?: number): Promise; + /** + * Synchronously truncates or extends the specified file stream, to reach the + * specified `len`. + * + * If `len` is not specified then the entire file contents are truncated as if + * `len` was set to `0`. + * + * If the file previously was larger than this new length, the extra data is + * lost. + * + * If the file previously was shorter, it is extended, and the extended part + * reads as null bytes ('\0'). + * + * ### Truncate the entire file + * + * ```ts + * const file = Deno.openSync( + * "my_file.txt", + * { read: true, write: true, truncate: true, create: true } + * ); + * Deno.ftruncateSync(file.rid); + * ``` + * + * ### Truncate part of the file + * + * ```ts + * const file = Deno.openSync( + * "my_file.txt", + * { read: true, write: true, create: true } + * ); + * Deno.writeSync(file.rid, new TextEncoder().encode("Hello World")); + * Deno.ftruncateSync(file.rid, 7); + * Deno.seekSync(file.rid, 0, Deno.SeekMode.Start); + * const data = new Uint8Array(32); + * Deno.readSync(file.rid, data); + * console.log(new TextDecoder().decode(data)); // Hello W + * ``` + * + * @deprecated Use {@linkcode Deno.FsFile.truncateSync} instead. + * {@linkcode Deno.ftruncateSync} will be removed in Deno 2.0. + * @category File System + */ + export function ftruncateSync(rid: number, len?: number): void; + /** + * Returns the group id of the process on POSIX platforms. Returns null on windows. + * + * ```ts + * console.log(Deno.gid()); + * ``` + * + * Requires `allow-sys` permission. + * + * @tags allow-sys + * @category Runtime Environment + */ + export function gid(): number | null; + /** + * Get the `hostname` of the machine the Deno process is running on. + * + * ```ts + * console.log(Deno.hostname()); + * ``` + * + * Requires `allow-sys` permission. + * + * @tags allow-sys + * @category Runtime Environment + */ + export function hostname(): string; + /** + * Converts the input into a string that has the same format as printed by + * `console.log()`. + * + * ```ts + * const obj = { + * a: 10, + * b: "hello", + * }; + * const objAsString = Deno.inspect(obj); // { a: 10, b: "hello" } + * console.log(obj); // prints same value as objAsString, e.g. { a: 10, b: "hello" } + * ``` + * + * A custom inspect functions can be registered on objects, via the symbol + * `Symbol.for("Deno.customInspect")`, to control and customize the output + * of `inspect()` or when using `console` logging: + * + * ```ts + * class A { + * x = 10; + * y = "hello"; + * [Symbol.for("Deno.customInspect")]() { + * return `x=${this.x}, y=${this.y}`; + * } + * } + * + * const inStringFormat = Deno.inspect(new A()); // "x=10, y=hello" + * console.log(inStringFormat); // prints "x=10, y=hello" + * ``` + * + * A depth can be specified by using the `depth` option: + * + * ```ts + * Deno.inspect({a: {b: {c: {d: 'hello'}}}}, {depth: 2}); // { a: { b: [Object] } } + * ``` + * + * @category Console and Debugging + */ + export function inspect(value: unknown, options?: InspectOptions): string; + /** + * Send a signal to process under given `pid`. The value and meaning of the + * `signal` to the process is operating system and process dependant. + * {@linkcode Signal} provides the most common signals. Default signal + * is `"SIGTERM"`. + * + * The term `kill` is adopted from the UNIX-like command line command `kill` + * which also signals processes. + * + * If `pid` is negative, the signal will be sent to the process group + * identified by `pid`. An error will be thrown if a negative `pid` is used on + * Windows. + * + * ```ts + * const p = Deno.run({ + * cmd: ["sleep", "10000"] + * }); + * + * Deno.kill(p.pid, "SIGINT"); + * ``` + * + * Requires `allow-run` permission. + * + * @tags allow-run + * @category Sub Process + */ + export function kill(pid: number, signo?: Signal): void; + /** + * Creates `newpath` as a hard link to `oldpath`. + * + * ```ts + * await Deno.link("old/name", "new/name"); + * ``` + * + * Requires `allow-read` and `allow-write` permissions. + * + * @tags allow-read, allow-write + * @category File System + */ + export function link(oldpath: string, newpath: string): Promise; + /** + * Synchronously creates `newpath` as a hard link to `oldpath`. + * + * ```ts + * Deno.linkSync("old/name", "new/name"); + * ``` + * + * Requires `allow-read` and `allow-write` permissions. + * + * @tags allow-read, allow-write + * @category File System + */ + export function linkSync(oldpath: string, newpath: string): void; + /** + * Listen announces on the local transport address. + * + * ```ts + * const listener1 = Deno.listen({ port: 80 }) + * const listener2 = Deno.listen({ hostname: "192.0.2.1", port: 80 }) + * const listener3 = Deno.listen({ hostname: "[2001:db8::1]", port: 80 }); + * const listener4 = Deno.listen({ hostname: "golang.org", port: 80, transport: "tcp" }); + * ``` + * + * Requires `allow-net` permission. + * + * @tags allow-net + * @category Network + */ + export function listen(options: TcpListenOptions & { transport?: "tcp" }): Listener; + /** + * Listen announces on the local transport address. + * + * ```ts + * const listener = Deno.listen({ path: "/foo/bar.sock", transport: "unix" }) + * ``` + * + * Requires `allow-read` and `allow-write` permission. + * + * @tags allow-read, allow-write + * @category Network + */ + export function listen(options: UnixListenOptions & { transport: "unix" }): Listener; + /** + * Listen announces on the local transport address over TLS (transport layer + * security). + * + * ```ts + * using listener = Deno.listenTls({ + * port: 443, + * cert: Deno.readTextFileSync("./server.crt"), + * key: Deno.readTextFileSync("./server.key"), + * }); + * ``` + * + * Requires `allow-net` permission. + * + * @tags allow-net + * @category Network + */ + export function listenTls(options: ListenTlsOptions): TlsListener; + /** + * Returns an array containing the 1, 5, and 15 minute load averages. The + * load average is a measure of CPU and IO utilization of the last one, five, + * and 15 minute periods expressed as a fractional number. Zero means there + * is no load. On Windows, the three values are always the same and represent + * the current load, not the 1, 5 and 15 minute load averages. + * + * ```ts + * console.log(Deno.loadavg()); // e.g. [ 0.71, 0.44, 0.44 ] + * ``` + * + * Requires `allow-sys` permission. + * + * On Windows there is no API available to retrieve this information and this method returns `[ 0, 0, 0 ]`. + * + * @tags allow-sys + * @category Observability + */ + export function loadavg(): number[]; + /** + * Resolves to a {@linkcode Deno.FileInfo} for the specified `path`. If + * `path` is a symlink, information for the symlink will be returned instead + * of what it points to. + * + * ```ts + * import { assert } from "https://deno.land/std/assert/mod.ts"; + * const fileInfo = await Deno.lstat("hello.txt"); + * assert(fileInfo.isFile); + * ``` + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category File System + */ + export function lstat(path: string | URL): Promise; + /** + * Synchronously returns a {@linkcode Deno.FileInfo} for the specified + * `path`. If `path` is a symlink, information for the symlink will be + * returned instead of what it points to. + * + * ```ts + * import { assert } from "https://deno.land/std/assert/mod.ts"; + * const fileInfo = Deno.lstatSync("hello.txt"); + * assert(fileInfo.isFile); + * ``` + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category File System + */ + export function lstatSync(path: string | URL): FileInfo; + /** + * Creates a new temporary directory in the default directory for temporary + * files, unless `dir` is specified. Other optional options include + * prefixing and suffixing the directory name with `prefix` and `suffix` + * respectively. + * + * This call resolves to the full path to the newly created directory. + * + * Multiple programs calling this function simultaneously will create different + * directories. It is the caller's responsibility to remove the directory when + * no longer needed. + * + * ```ts + * const tempDirName0 = await Deno.makeTempDir(); // e.g. /tmp/2894ea76 + * const tempDirName1 = await Deno.makeTempDir({ prefix: 'my_temp' }); // e.g. /tmp/my_temp339c944d + * ``` + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function makeTempDir(options?: MakeTempOptions): Promise; + /** + * Synchronously creates a new temporary directory in the default directory + * for temporary files, unless `dir` is specified. Other optional options + * include prefixing and suffixing the directory name with `prefix` and + * `suffix` respectively. + * + * The full path to the newly created directory is returned. + * + * Multiple programs calling this function simultaneously will create different + * directories. It is the caller's responsibility to remove the directory when + * no longer needed. + * + * ```ts + * const tempDirName0 = Deno.makeTempDirSync(); // e.g. /tmp/2894ea76 + * const tempDirName1 = Deno.makeTempDirSync({ prefix: 'my_temp' }); // e.g. /tmp/my_temp339c944d + * ``` + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function makeTempDirSync(options?: MakeTempOptions): string; + /** + * Creates a new temporary file in the default directory for temporary + * files, unless `dir` is specified. + * + * Other options include prefixing and suffixing the directory name with + * `prefix` and `suffix` respectively. + * + * This call resolves to the full path to the newly created file. + * + * Multiple programs calling this function simultaneously will create + * different files. It is the caller's responsibility to remove the file when + * no longer needed. + * + * ```ts + * const tmpFileName0 = await Deno.makeTempFile(); // e.g. /tmp/419e0bf2 + * const tmpFileName1 = await Deno.makeTempFile({ prefix: 'my_temp' }); // e.g. /tmp/my_temp754d3098 + * ``` + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function makeTempFile(options?: MakeTempOptions): Promise; + /** + * Synchronously creates a new temporary file in the default directory for + * temporary files, unless `dir` is specified. + * + * Other options include prefixing and suffixing the directory name with + * `prefix` and `suffix` respectively. + * + * The full path to the newly created file is returned. + * + * Multiple programs calling this function simultaneously will create + * different files. It is the caller's responsibility to remove the file when + * no longer needed. + * + * ```ts + * const tempFileName0 = Deno.makeTempFileSync(); // e.g. /tmp/419e0bf2 + * const tempFileName1 = Deno.makeTempFileSync({ prefix: 'my_temp' }); // e.g. /tmp/my_temp754d3098 + * ``` + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function makeTempFileSync(options?: MakeTempOptions): string; + /** + * Returns an object describing the memory usage of the Deno process and the + * V8 subsystem measured in bytes. + * + * @category Runtime Environment + */ + export function memoryUsage(): MemoryUsage; + /** + * Creates a new directory with the specified path. + * + * ```ts + * await Deno.mkdir("new_dir"); + * await Deno.mkdir("nested/directories", { recursive: true }); + * await Deno.mkdir("restricted_access_dir", { mode: 0o700 }); + * ``` + * + * Defaults to throwing error if the directory already exists. + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function mkdir(path: string | URL, options?: MkdirOptions): Promise; + /** + * Synchronously creates a new directory with the specified path. + * + * ```ts + * Deno.mkdirSync("new_dir"); + * Deno.mkdirSync("nested/directories", { recursive: true }); + * Deno.mkdirSync("restricted_access_dir", { mode: 0o700 }); + * ``` + * + * Defaults to throwing error if the directory already exists. + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function mkdirSync(path: string | URL, options?: MkdirOptions): void; + /** + * Open a file and resolve to an instance of {@linkcode Deno.FsFile}. The + * file does not need to previously exist if using the `create` or `createNew` + * open options. The caller may have the resulting file automatically closed + * by the runtime once it's out of scope by declaring the file variable with + * the `using` keyword. + * + * ```ts + * using file = await Deno.open("/foo/bar.txt", { read: true, write: true }); + * // Do work with file + * ``` + * + * Alternatively, the caller may manually close the resource when finished with + * it. + * + * ```ts + * const file = await Deno.open("/foo/bar.txt", { read: true, write: true }); + * // Do work with file + * file.close(); + * ``` + * + * Requires `allow-read` and/or `allow-write` permissions depending on + * options. + * + * @tags allow-read, allow-write + * @category File System + */ + export function open(path: string | URL, options?: OpenOptions): Promise; + /** + * Synchronously open a file and return an instance of + * {@linkcode Deno.FsFile}. The file does not need to previously exist if + * using the `create` or `createNew` open options. The caller may have the + * resulting file automatically closed by the runtime once it's out of scope + * by declaring the file variable with the `using` keyword. + * + * ```ts + * using file = Deno.openSync("/foo/bar.txt", { read: true, write: true }); + * // Do work with file + * ``` + * + * Alternatively, the caller may manually close the resource when finished with + * it. + * + * ```ts + * const file = Deno.openSync("/foo/bar.txt", { read: true, write: true }); + * // Do work with file + * file.close(); + * ``` + * + * Requires `allow-read` and/or `allow-write` permissions depending on + * options. + * + * @tags allow-read, allow-write + * @category File System + */ + export function openSync(path: string | URL, options?: OpenOptions): FsFile; + /** + * Returns the release version of the Operating System. + * + * ```ts + * console.log(Deno.osRelease()); + * ``` + * + * Requires `allow-sys` permission. + * Under consideration to possibly move to Deno.build or Deno.versions and if + * it should depend sys-info, which may not be desirable. + * + * @tags allow-sys + * @category Runtime Environment + */ + export function osRelease(): string; + /** + * Returns the Operating System uptime in number of seconds. + * + * ```ts + * console.log(Deno.osUptime()); + * ``` + * + * Requires `allow-sys` permission. + * + * @tags allow-sys + * @category Runtime Environment + */ + export function osUptime(): number; + /** + * Read from a resource ID (`rid`) into an array buffer (`buffer`). + * + * Resolves to either the number of bytes read during the operation or EOF + * (`null`) if there was nothing more to read. + * + * It is possible for a read to successfully return with `0` bytes. This does + * not indicate EOF. + * + * This function is one of the lowest level APIs and most users should not + * work with this directly, but rather use {@linkcode ReadableStream} and + * {@linkcode https://deno.land/std/streams/mod.ts?s=toArrayBuffer|toArrayBuffer} + * instead. + * + * **It is not guaranteed that the full buffer will be read in a single call.** + * + * ```ts + * // if "/foo/bar.txt" contains the text "hello world": + * using file = await Deno.open("/foo/bar.txt"); + * const buf = new Uint8Array(100); + * const numberOfBytesRead = await Deno.read(file.rid, buf); // 11 bytes + * const text = new TextDecoder().decode(buf); // "hello world" + * ``` + * + * @deprecated Use `reader.read()` instead. {@linkcode Deno.read} will be + * removed in Deno 2.0. + * @category I/O + */ + export function read(rid: number, buffer: Uint8Array): Promise; + /** + * Reads the directory given by `path` and returns an async iterable of + * {@linkcode Deno.DirEntry}. The order of entries is not guaranteed. + * + * ```ts + * for await (const dirEntry of Deno.readDir("/")) { + * console.log(dirEntry.name); + * } + * ``` + * + * Throws error if `path` is not a directory. + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category File System + */ + export function readDir(path: string | URL): AsyncIterable; + /** + * Synchronously reads the directory given by `path` and returns an iterable + * of {@linkcode Deno.DirEntry}. The order of entries is not guaranteed. + * + * ```ts + * for (const dirEntry of Deno.readDirSync("/")) { + * console.log(dirEntry.name); + * } + * ``` + * + * Throws error if `path` is not a directory. + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category File System + */ + export function readDirSync(path: string | URL): Iterable; + /** + * Reads and resolves to the entire contents of a file as an array of bytes. + * `TextDecoder` can be used to transform the bytes to string if required. + * Reading a directory returns an empty data array. + * + * ```ts + * const decoder = new TextDecoder("utf-8"); + * const data = await Deno.readFile("hello.txt"); + * console.log(decoder.decode(data)); + * ``` + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category File System + */ + export function readFile(path: string | URL, options?: ReadFileOptions): Promise; + /** + * Synchronously reads and returns the entire contents of a file as an array + * of bytes. `TextDecoder` can be used to transform the bytes to string if + * required. Reading a directory returns an empty data array. + * + * ```ts + * const decoder = new TextDecoder("utf-8"); + * const data = Deno.readFileSync("hello.txt"); + * console.log(decoder.decode(data)); + * ``` + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category File System + */ + export function readFileSync(path: string | URL): Uint8Array; + /** + * Resolves to the full path destination of the named symbolic link. + * + * ```ts + * await Deno.symlink("./test.txt", "./test_link.txt"); + * const target = await Deno.readLink("./test_link.txt"); // full path of ./test.txt + * ``` + * + * Throws TypeError if called with a hard link. + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category File System + */ + export function readLink(path: string | URL): Promise; + /** + * Synchronously returns the full path destination of the named symbolic + * link. + * + * ```ts + * Deno.symlinkSync("./test.txt", "./test_link.txt"); + * const target = Deno.readLinkSync("./test_link.txt"); // full path of ./test.txt + * ``` + * + * Throws TypeError if called with a hard link. + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category File System + */ + export function readLinkSync(path: string | URL): string; + /** + * Synchronously read from a resource ID (`rid`) into an array buffer + * (`buffer`). + * + * Returns either the number of bytes read during the operation or EOF + * (`null`) if there was nothing more to read. + * + * It is possible for a read to successfully return with `0` bytes. This does + * not indicate EOF. + * + * This function is one of the lowest level APIs and most users should not + * work with this directly, but rather use {@linkcode ReadableStream} and + * {@linkcode https://deno.land/std/streams/mod.ts?s=toArrayBuffer|toArrayBuffer} + * instead. + * + * **It is not guaranteed that the full buffer will be read in a single + * call.** + * + * ```ts + * // if "/foo/bar.txt" contains the text "hello world": + * using file = Deno.openSync("/foo/bar.txt"); + * const buf = new Uint8Array(100); + * const numberOfBytesRead = Deno.readSync(file.rid, buf); // 11 bytes + * const text = new TextDecoder().decode(buf); // "hello world" + * ``` + * + * @deprecated Use `reader.readSync()` instead. {@linkcode Deno.readSync} + * will be removed in Deno 2.0. + * @category I/O + */ + export function readSync(rid: number, buffer: Uint8Array): number | null; + /** + * Asynchronously reads and returns the entire contents of a file as an UTF-8 + * decoded string. Reading a directory throws an error. + * + * ```ts + * const data = await Deno.readTextFile("hello.txt"); + * console.log(data); + * ``` + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category File System + */ + export function readTextFile(path: string | URL, options?: ReadFileOptions): Promise; + /** + * Synchronously reads and returns the entire contents of a file as an UTF-8 + * decoded string. Reading a directory throws an error. + * + * ```ts + * const data = Deno.readTextFileSync("hello.txt"); + * console.log(data); + * ``` + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category File System + */ + export function readTextFileSync(path: string | URL): string; + /** + * Resolves to the absolute normalized path, with symbolic links resolved. + * + * ```ts + * // e.g. given /home/alice/file.txt and current directory /home/alice + * await Deno.symlink("file.txt", "symlink_file.txt"); + * const realPath = await Deno.realPath("./file.txt"); + * const realSymLinkPath = await Deno.realPath("./symlink_file.txt"); + * console.log(realPath); // outputs "/home/alice/file.txt" + * console.log(realSymLinkPath); // outputs "/home/alice/file.txt" + * ``` + * + * Requires `allow-read` permission for the target path. + * + * Also requires `allow-read` permission for the `CWD` if the target path is + * relative. + * + * @tags allow-read + * @category File System + */ + export function realPath(path: string | URL): Promise; + /** + * Synchronously returns absolute normalized path, with symbolic links + * resolved. + * + * ```ts + * // e.g. given /home/alice/file.txt and current directory /home/alice + * Deno.symlinkSync("file.txt", "symlink_file.txt"); + * const realPath = Deno.realPathSync("./file.txt"); + * const realSymLinkPath = Deno.realPathSync("./symlink_file.txt"); + * console.log(realPath); // outputs "/home/alice/file.txt" + * console.log(realSymLinkPath); // outputs "/home/alice/file.txt" + * ``` + * + * Requires `allow-read` permission for the target path. + * + * Also requires `allow-read` permission for the `CWD` if the target path is + * relative. + * + * @tags allow-read + * @category File System + */ + export function realPathSync(path: string | URL): string; + /** + * Removes the named file or directory. + * + * ```ts + * await Deno.remove("/path/to/empty_dir/or/file"); + * await Deno.remove("/path/to/populated_dir/or/file", { recursive: true }); + * ``` + * + * Throws error if permission denied, path not found, or path is a non-empty + * directory and the `recursive` option isn't set to `true`. + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function remove(path: string | URL, options?: RemoveOptions): Promise; + /** + * Removes the given signal listener that has been registered with + * {@linkcode Deno.addSignalListener}. + * + * ```ts + * const listener = () => { + * console.log("SIGTERM!") + * }; + * Deno.addSignalListener("SIGTERM", listener); + * Deno.removeSignalListener("SIGTERM", listener); + * ``` + * + * _Note_: On Windows only `"SIGINT"` (CTRL+C) and `"SIGBREAK"` (CTRL+Break) + * are supported. + * + * @category Runtime Environment + */ + export function removeSignalListener(signal: Signal, handler: () => void): void; + /** + * Synchronously removes the named file or directory. + * + * ```ts + * Deno.removeSync("/path/to/empty_dir/or/file"); + * Deno.removeSync("/path/to/populated_dir/or/file", { recursive: true }); + * ``` + * + * Throws error if permission denied, path not found, or path is a non-empty + * directory and the `recursive` option isn't set to `true`. + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function removeSync(path: string | URL, options?: RemoveOptions): void; + /** + * Renames (moves) `oldpath` to `newpath`. Paths may be files or directories. + * If `newpath` already exists and is not a directory, `rename()` replaces it. + * OS-specific restrictions may apply when `oldpath` and `newpath` are in + * different directories. + * + * ```ts + * await Deno.rename("old/path", "new/path"); + * ``` + * + * On Unix-like OSes, this operation does not follow symlinks at either path. + * + * It varies between platforms when the operation throws errors, and if so + * what they are. It's always an error to rename anything to a non-empty + * directory. + * + * Requires `allow-read` and `allow-write` permissions. + * + * @tags allow-read, allow-write + * @category File System + */ + export function rename(oldpath: string | URL, newpath: string | URL): Promise; + /** + * Synchronously renames (moves) `oldpath` to `newpath`. Paths may be files or + * directories. If `newpath` already exists and is not a directory, + * `renameSync()` replaces it. OS-specific restrictions may apply when + * `oldpath` and `newpath` are in different directories. + * + * ```ts + * Deno.renameSync("old/path", "new/path"); + * ``` + * + * On Unix-like OSes, this operation does not follow symlinks at either path. + * + * It varies between platforms when the operation throws errors, and if so what + * they are. It's always an error to rename anything to a non-empty directory. + * + * Requires `allow-read` and `allow-write` permissions. + * + * @tags allow-read, allow-write + * @category File System + */ + export function renameSync(oldpath: string | URL, newpath: string | URL): void; + /** + * Performs DNS resolution against the given query, returning resolved + * records. + * + * Fails in the cases such as: + * + * - the query is in invalid format. + * - the options have an invalid parameter. For example `nameServer.port` is + * beyond the range of 16-bit unsigned integer. + * - the request timed out. + * + * ```ts + * const a = await Deno.resolveDns("example.com", "A"); + * + * const aaaa = await Deno.resolveDns("example.com", "AAAA", { + * nameServer: { ipAddr: "8.8.8.8", port: 53 }, + * }); + * ``` + * + * Requires `allow-net` permission. + * + * @tags allow-net + * @category Network + */ + export function resolveDns(query: string, recordType: "A" | "AAAA" | "ANAME" | "CNAME" | "NS" | "PTR", options?: ResolveDnsOptions): Promise; + /** + * Performs DNS resolution against the given query, returning resolved + * records. + * + * Fails in the cases such as: + * + * - the query is in invalid format. + * - the options have an invalid parameter. For example `nameServer.port` is + * beyond the range of 16-bit unsigned integer. + * - the request timed out. + * + * ```ts + * const a = await Deno.resolveDns("example.com", "A"); + * + * const aaaa = await Deno.resolveDns("example.com", "AAAA", { + * nameServer: { ipAddr: "8.8.8.8", port: 53 }, + * }); + * ``` + * + * Requires `allow-net` permission. + * + * @tags allow-net + * @category Network + */ + export function resolveDns(query: string, recordType: "CAA", options?: ResolveDnsOptions): Promise; + /** + * Performs DNS resolution against the given query, returning resolved + * records. + * + * Fails in the cases such as: + * + * - the query is in invalid format. + * - the options have an invalid parameter. For example `nameServer.port` is + * beyond the range of 16-bit unsigned integer. + * - the request timed out. + * + * ```ts + * const a = await Deno.resolveDns("example.com", "A"); + * + * const aaaa = await Deno.resolveDns("example.com", "AAAA", { + * nameServer: { ipAddr: "8.8.8.8", port: 53 }, + * }); + * ``` + * + * Requires `allow-net` permission. + * + * @tags allow-net + * @category Network + */ + export function resolveDns(query: string, recordType: "MX", options?: ResolveDnsOptions): Promise; + /** + * Performs DNS resolution against the given query, returning resolved + * records. + * + * Fails in the cases such as: + * + * - the query is in invalid format. + * - the options have an invalid parameter. For example `nameServer.port` is + * beyond the range of 16-bit unsigned integer. + * - the request timed out. + * + * ```ts + * const a = await Deno.resolveDns("example.com", "A"); + * + * const aaaa = await Deno.resolveDns("example.com", "AAAA", { + * nameServer: { ipAddr: "8.8.8.8", port: 53 }, + * }); + * ``` + * + * Requires `allow-net` permission. + * + * @tags allow-net + * @category Network + */ + export function resolveDns(query: string, recordType: "NAPTR", options?: ResolveDnsOptions): Promise; + /** + * Performs DNS resolution against the given query, returning resolved + * records. + * + * Fails in the cases such as: + * + * - the query is in invalid format. + * - the options have an invalid parameter. For example `nameServer.port` is + * beyond the range of 16-bit unsigned integer. + * - the request timed out. + * + * ```ts + * const a = await Deno.resolveDns("example.com", "A"); + * + * const aaaa = await Deno.resolveDns("example.com", "AAAA", { + * nameServer: { ipAddr: "8.8.8.8", port: 53 }, + * }); + * ``` + * + * Requires `allow-net` permission. + * + * @tags allow-net + * @category Network + */ + export function resolveDns(query: string, recordType: "SOA", options?: ResolveDnsOptions): Promise; + /** + * Performs DNS resolution against the given query, returning resolved + * records. + * + * Fails in the cases such as: + * + * - the query is in invalid format. + * - the options have an invalid parameter. For example `nameServer.port` is + * beyond the range of 16-bit unsigned integer. + * - the request timed out. + * + * ```ts + * const a = await Deno.resolveDns("example.com", "A"); + * + * const aaaa = await Deno.resolveDns("example.com", "AAAA", { + * nameServer: { ipAddr: "8.8.8.8", port: 53 }, + * }); + * ``` + * + * Requires `allow-net` permission. + * + * @tags allow-net + * @category Network + */ + export function resolveDns(query: string, recordType: "SRV", options?: ResolveDnsOptions): Promise; + /** + * Performs DNS resolution against the given query, returning resolved + * records. + * + * Fails in the cases such as: + * + * - the query is in invalid format. + * - the options have an invalid parameter. For example `nameServer.port` is + * beyond the range of 16-bit unsigned integer. + * - the request timed out. + * + * ```ts + * const a = await Deno.resolveDns("example.com", "A"); + * + * const aaaa = await Deno.resolveDns("example.com", "AAAA", { + * nameServer: { ipAddr: "8.8.8.8", port: 53 }, + * }); + * ``` + * + * Requires `allow-net` permission. + * + * @tags allow-net + * @category Network + */ + export function resolveDns(query: string, recordType: "TXT", options?: ResolveDnsOptions): Promise; + /** + * Performs DNS resolution against the given query, returning resolved + * records. + * + * Fails in the cases such as: + * + * - the query is in invalid format. + * - the options have an invalid parameter. For example `nameServer.port` is + * beyond the range of 16-bit unsigned integer. + * - the request timed out. + * + * ```ts + * const a = await Deno.resolveDns("example.com", "A"); + * + * const aaaa = await Deno.resolveDns("example.com", "AAAA", { + * nameServer: { ipAddr: "8.8.8.8", port: 53 }, + * }); + * ``` + * + * Requires `allow-net` permission. + * + * @tags allow-net + * @category Network + */ + export function resolveDns(query: string, recordType: RecordType, options?: ResolveDnsOptions): Promise< + | string[] + | CAARecord[] + | MXRecord[] + | NAPTRRecord[] + | SOARecord[] + | SRVRecord[] + | string[][] + >; + + export class Process implements Deno.Process { + #private; + get rid(): number; + get pid(): number; + get stdin(): T["stdin"] extends "piped" ? Deno.Writer & Deno.Closer & { + writable: import("stream/web").WritableStream; + } : (Deno.Writer & Deno.Closer & { + writable: import("stream/web").WritableStream; + }) | null; + get stdout(): T["stdout"] extends "piped" ? Deno.Reader & Deno.Closer & { + readable: import("stream/web").ReadableStream; + } : (Deno.Reader & Deno.Closer & { + readable: import("stream/web").ReadableStream; + }) | null; + get stderr(): T["stderr"] extends "piped" ? Deno.Reader & Deno.Closer & { + readable: import("stream/web").ReadableStream; + } : (Deno.Reader & Deno.Closer & { + readable: import("stream/web").ReadableStream; + }) | null; + status(): Promise; + output(): Promise; + stderrOutput(): Promise; + close(): void; + kill(signo?: string): void; + } + + /** + * Spawns new subprocess. RunOptions must contain at a minimum the `opt.cmd`, + * an array of program arguments, the first of which is the binary. + * + * ```ts + * const p = Deno.run({ + * cmd: ["curl", "https://example.com"], + * }); + * const status = await p.status(); + * ``` + * + * Subprocess uses same working directory as parent process unless `opt.cwd` + * is specified. + * + * Environmental variables from parent process can be cleared using `opt.clearEnv`. + * Doesn't guarantee that only `opt.env` variables are present, + * as the OS may set environmental variables for processes. + * + * Environmental variables for subprocess can be specified using `opt.env` + * mapping. + * + * `opt.uid` sets the child process’s user ID. This translates to a setuid call + * in the child process. Failure in the setuid call will cause the spawn to fail. + * + * `opt.gid` is similar to `opt.uid`, but sets the group ID of the child process. + * This has the same semantics as the uid field. + * + * By default subprocess inherits stdio of parent process. To change + * this this, `opt.stdin`, `opt.stdout`, and `opt.stderr` can be set + * independently to a resource ID (_rid_) of an open file, `"inherit"`, + * `"piped"`, or `"null"`: + * + * - _number_: the resource ID of an open file/resource. This allows you to + * read or write to a file. + * - `"inherit"`: The default if unspecified. The subprocess inherits from the + * parent. + * - `"piped"`: A new pipe should be arranged to connect the parent and child + * sub-process. + * - `"null"`: This stream will be ignored. This is the equivalent of attaching + * the stream to `/dev/null`. + * + * Details of the spawned process are returned as an instance of + * {@linkcode Deno.Process}. + * + * Requires `allow-run` permission. + * + * @deprecated Use {@linkcode Deno.Command} instead. {@linkcode Deno.run} + * will be removed in v2.0.0. + * @tags allow-run + * @category Sub Process + */ + export function run(opt: T): Process; + /** + * *UNSTABLE**: New API, yet to be vetted. + * + * Spawns new subprocess. RunOptions must contain at a minimum the `opt.cmd`, + * an array of program arguments, the first of which is the binary. + * + * ```ts + * const p = Deno.run({ + * cmd: ["curl", "https://example.com"], + * }); + * const status = await p.status(); + * ``` + * + * Subprocess uses same working directory as parent process unless `opt.cwd` + * is specified. + * + * Environmental variables from parent process can be cleared using `opt.clearEnv`. + * Doesn't guarantee that only `opt.env` variables are present, + * as the OS may set environmental variables for processes. + * + * Environmental variables for subprocess can be specified using `opt.env` + * mapping. + * + * `opt.uid` sets the child process’s user ID. This translates to a setuid call + * in the child process. Failure in the setuid call will cause the spawn to fail. + * + * `opt.gid` is similar to `opt.uid`, but sets the group ID of the child process. + * This has the same semantics as the uid field. + * + * By default subprocess inherits stdio of parent process. To change + * this this, `opt.stdin`, `opt.stdout`, and `opt.stderr` can be set + * independently to a resource ID (_rid_) of an open file, `"inherit"`, + * `"piped"`, or `"null"`: + * + * - _number_: the resource ID of an open file/resource. This allows you to + * read or write to a file. + * - `"inherit"`: The default if unspecified. The subprocess inherits from the + * parent. + * - `"piped"`: A new pipe should be arranged to connect the parent and child + * sub-process. + * - `"null"`: This stream will be ignored. This is the equivalent of attaching + * the stream to `/dev/null`. + * + * Details of the spawned process are returned as an instance of + * {@linkcode Deno.Process}. + * + * Requires `allow-run` permission. + * + * @tags allow-run + * @category Sub Process + */ + export function run(opt: T): Process; + export type UnstableRunOptions = RunOptions & { + clearEnv?: boolean; + gid?: number; + uid?: number; + }; + /** + * Shutdown socket send operations. + * + * Matches behavior of POSIX shutdown(3). + * + * ```ts + * const listener = Deno.listen({ port: 80 }); + * const conn = await listener.accept(); + * Deno.shutdown(conn.rid); + * ``` + * + * @deprecated Use {@linkcode Deno.Conn.closeWrite} instead. + * {@linkcode Deno.shutdown} will be removed in Deno 2.0. + * @category Network + */ + export function shutdown(rid: number): Promise; + /** + * Resolves to a {@linkcode Deno.FileInfo} for the specified `path`. Will + * always follow symlinks. + * + * ```ts + * import { assert } from "https://deno.land/std/assert/mod.ts"; + * const fileInfo = await Deno.stat("hello.txt"); + * assert(fileInfo.isFile); + * ``` + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category File System + */ + export function stat(path: string | URL): Promise; + /** + * Synchronously returns a {@linkcode Deno.FileInfo} for the specified + * `path`. Will always follow symlinks. + * + * ```ts + * import { assert } from "https://deno.land/std/assert/mod.ts"; + * const fileInfo = Deno.statSync("hello.txt"); + * assert(fileInfo.isFile); + * ``` + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category File System + */ + export function statSync(path: string | URL): FileInfo; + /** + * Creates `newpath` as a symbolic link to `oldpath`. + * + * The `options.type` parameter can be set to `"file"` or `"dir"`. This + * argument is only available on Windows and ignored on other platforms. + * + * ```ts + * await Deno.symlink("old/name", "new/name"); + * ``` + * + * Requires full `allow-read` and `allow-write` permissions. + * + * @tags allow-read, allow-write + * @category File System + */ + export function symlink(oldpath: string | URL, newpath: string | URL, options?: SymlinkOptions): Promise; + /** + * Creates `newpath` as a symbolic link to `oldpath`. + * + * The `options.type` parameter can be set to `"file"` or `"dir"`. This + * argument is only available on Windows and ignored on other platforms. + * + * ```ts + * Deno.symlinkSync("old/name", "new/name"); + * ``` + * + * Requires full `allow-read` and `allow-write` permissions. + * + * @tags allow-read, allow-write + * @category File System + */ + export function symlinkSync(oldpath: string | URL, newpath: string | URL, options?: SymlinkOptions): void; + /** + * Register a test which will be run when `deno test` is used on the command + * line and the containing module looks like a test module. + * + * `fn` can be async if required. + * + * ```ts + * import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; + * + * Deno.test({ + * name: "example test", + * fn() { + * assertEquals("world", "world"); + * }, + * }); + * + * Deno.test({ + * name: "example ignored test", + * ignore: Deno.build.os === "windows", + * fn() { + * // This test is ignored only on Windows machines + * }, + * }); + * + * Deno.test({ + * name: "example async test", + * async fn() { + * const decoder = new TextDecoder("utf-8"); + * const data = await Deno.readFile("hello_world.txt"); + * assertEquals(decoder.decode(data), "Hello world"); + * } + * }); + * ``` + * + * @category Testing + */ + export const test: DenoTest; + /** + * Truncates (or extends) the specified file, to reach the specified `len`. + * If `len` is not specified then the entire file contents are truncated. + * + * ### Truncate the entire file + * ```ts + * await Deno.truncate("my_file.txt"); + * ``` + * + * ### Truncate part of the file + * + * ```ts + * const file = await Deno.makeTempFile(); + * await Deno.writeTextFile(file, "Hello World"); + * await Deno.truncate(file, 7); + * const data = await Deno.readFile(file); + * console.log(new TextDecoder().decode(data)); // "Hello W" + * ``` + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function truncate(name: string, len?: number): Promise; + /** + * Synchronously truncates (or extends) the specified file, to reach the + * specified `len`. If `len` is not specified then the entire file contents + * are truncated. + * + * ### Truncate the entire file + * + * ```ts + * Deno.truncateSync("my_file.txt"); + * ``` + * + * ### Truncate part of the file + * + * ```ts + * const file = Deno.makeTempFileSync(); + * Deno.writeFileSync(file, new TextEncoder().encode("Hello World")); + * Deno.truncateSync(file, 7); + * const data = Deno.readFileSync(file); + * console.log(new TextDecoder().decode(data)); + * ``` + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function truncateSync(name: string, len?: number): void; + /** + * Returns the user id of the process on POSIX platforms. Returns null on Windows. + * + * ```ts + * console.log(Deno.uid()); + * ``` + * + * Requires `allow-sys` permission. + * + * @tags allow-sys + * @category Runtime Environment + */ + export function uid(): number | null; + /** + * Watch for file system events against one or more `paths`, which can be + * files or directories. These paths must exist already. One user action (e.g. + * `touch test.file`) can generate multiple file system events. Likewise, + * one user action can result in multiple file paths in one event (e.g. `mv + * old_name.txt new_name.txt`). + * + * The recursive option is `true` by default and, for directories, will watch + * the specified directory and all sub directories. + * + * Note that the exact ordering of the events can vary between operating + * systems. + * + * ```ts + * const watcher = Deno.watchFs("/"); + * for await (const event of watcher) { + * console.log(">>>> event", event); + * // { kind: "create", paths: [ "/foo.txt" ] } + * } + * ``` + * + * Call `watcher.close()` to stop watching. + * + * ```ts + * const watcher = Deno.watchFs("/"); + * + * setTimeout(() => { + * watcher.close(); + * }, 5000); + * + * for await (const event of watcher) { + * console.log(">>>> event", event); + * } + * ``` + * + * Requires `allow-read` permission. + * + * @tags allow-read + * @category File System + */ + export function watchFs(paths: string | string[], options?: { recursive: boolean }): FsWatcher; + /** + * Write to the resource ID (`rid`) the contents of the array buffer (`data`). + * + * Resolves to the number of bytes written. This function is one of the lowest + * level APIs and most users should not work with this directly, but rather + * use {@linkcode WritableStream}, {@linkcode ReadableStream.from} and + * {@linkcode ReadableStream.pipeTo}. + * + * **It is not guaranteed that the full buffer will be written in a single + * call.** + * + * ```ts + * const encoder = new TextEncoder(); + * const data = encoder.encode("Hello world"); + * using file = await Deno.open("/foo/bar.txt", { write: true }); + * const bytesWritten = await Deno.write(file.rid, data); // 11 + * ``` + * + * @deprecated Use `writer.write()` instead. {@linkcode Deno.write} will be + * removed in Deno 2.0. + * @category I/O + */ + export function write(rid: number, data: Uint8Array): Promise; + /** + * Write `data` to the given `path`, by default creating a new file if + * needed, else overwriting. + * + * ```ts + * const encoder = new TextEncoder(); + * const data = encoder.encode("Hello world\n"); + * await Deno.writeFile("hello1.txt", data); // overwrite "hello1.txt" or create it + * await Deno.writeFile("hello2.txt", data, { create: false }); // only works if "hello2.txt" exists + * await Deno.writeFile("hello3.txt", data, { mode: 0o777 }); // set permissions on new file + * await Deno.writeFile("hello4.txt", data, { append: true }); // add data to the end of the file + * ``` + * + * Requires `allow-write` permission, and `allow-read` if `options.create` is + * `false`. + * + * @tags allow-read, allow-write + * @category File System + */ + export function writeFile(path: string | URL, data: Uint8Array | ReadableStream, options?: WriteFileOptions): Promise; + /** + * Synchronously write `data` to the given `path`, by default creating a new + * file if needed, else overwriting. + * + * ```ts + * const encoder = new TextEncoder(); + * const data = encoder.encode("Hello world\n"); + * Deno.writeFileSync("hello1.txt", data); // overwrite "hello1.txt" or create it + * Deno.writeFileSync("hello2.txt", data, { create: false }); // only works if "hello2.txt" exists + * Deno.writeFileSync("hello3.txt", data, { mode: 0o777 }); // set permissions on new file + * Deno.writeFileSync("hello4.txt", data, { append: true }); // add data to the end of the file + * ``` + * + * Requires `allow-write` permission, and `allow-read` if `options.create` is + * `false`. + * + * @tags allow-read, allow-write + * @category File System + */ + export function writeFileSync(path: string | URL, data: Uint8Array, options?: WriteFileOptions): void; + /** + * Synchronously write to the resource ID (`rid`) the contents of the array + * buffer (`data`). + * + * Returns the number of bytes written. This function is one of the lowest + * level APIs and most users should not work with this directly, but rather + * use {@linkcode WritableStream}, {@linkcode ReadableStream.from} and + * {@linkcode ReadableStream.pipeTo}. + * + * **It is not guaranteed that the full buffer will be written in a single + * call.** + * + * ```ts + * const encoder = new TextEncoder(); + * const data = encoder.encode("Hello world"); + * using file = Deno.openSync("/foo/bar.txt", { write: true }); + * const bytesWritten = Deno.writeSync(file.rid, data); // 11 + * ``` + * + * @deprecated Use `writer.writeSync()` instead. {@linkcode Deno.writeSync} + * will be removed in Deno 2.0. + * @category I/O + */ + export function writeSync(rid: number, data: Uint8Array): number; + /** + * Write string `data` to the given `path`, by default creating a new file if + * needed, else overwriting. + * + * ```ts + * await Deno.writeTextFile("hello1.txt", "Hello world\n"); // overwrite "hello1.txt" or create it + * ``` + * + * Requires `allow-write` permission, and `allow-read` if `options.create` is + * `false`. + * + * @tags allow-read, allow-write + * @category File System + */ + export function writeTextFile(path: string | URL, data: string | ReadableStream, options?: WriteFileOptions): Promise; + /** + * Synchronously write string `data` to the given `path`, by default creating + * a new file if needed, else overwriting. + * + * ```ts + * Deno.writeTextFileSync("hello1.txt", "Hello world\n"); // overwrite "hello1.txt" or create it + * ``` + * + * Requires `allow-write` permission, and `allow-read` if `options.create` is + * `false`. + * + * @tags allow-read, allow-write + * @category File System + */ + export function writeTextFileSync(path: string | URL, data: string, options?: WriteFileOptions): void; + /** + * Returns the script arguments to the program. + * + * Give the following command line invocation of Deno: + * + * ```sh + * deno run --allow-read https://examples.deno.land/command-line-arguments.ts Sushi + * ``` + * + * Then `Deno.args` will contain: + * + * ```ts + * [ "Sushi" ] + * ``` + * + * If you are looking for a structured way to parse arguments, there is the + * [`std/flags`](https://deno.land/std/flags) module as part of the Deno + * standard library. + * + * @category Runtime Environment + */ + export const args: string[]; + /** + * Changes the access (`atime`) and modification (`mtime`) times of a file + * stream resource referenced by `rid`. Given times are either in seconds + * (UNIX epoch time) or as `Date` objects. + * + * ```ts + * const file = await Deno.open("file.txt", { create: true, write: true }); + * await Deno.futime(file.rid, 1556495550, new Date()); + * ``` + * + * @deprecated Use {@linkcode Deno.FsFile.utime} instead. + * {@linkcode Deno.futime} will be removed in Deno 2.0. + * @category File System + */ + export function futime(rid: number, atime: number | Date, mtime: number | Date): Promise; + /** + * Synchronously changes the access (`atime`) and modification (`mtime`) times + * of a file stream resource referenced by `rid`. Given times are either in + * seconds (UNIX epoch time) or as `Date` objects. + * + * ```ts + * const file = Deno.openSync("file.txt", { create: true, write: true }); + * Deno.futimeSync(file.rid, 1556495550, new Date()); + * ``` + * + * @deprecated Use {@linkcode Deno.FsFile.utimeSync} instead. + * {@linkcode Deno.futimeSync} will be removed in Deno 2.0. + * @category File System + */ + export function futimeSync(rid: number, atime: number | Date, mtime: number | Date): void; + /** + * Changes the access (`atime`) and modification (`mtime`) times of a file + * system object referenced by `path`. Given times are either in seconds + * (UNIX epoch time) or as `Date` objects. + * + * ```ts + * await Deno.utime("myfile.txt", 1556495550, new Date()); + * ``` + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function utime(path: string | URL, atime: number | Date, mtime: number | Date): Promise; + /** + * Synchronously changes the access (`atime`) and modification (`mtime`) times + * of a file system object referenced by `path`. Given times are either in + * seconds (UNIX epoch time) or as `Date` objects. + * + * ```ts + * Deno.utimeSync("myfile.txt", 1556495550, new Date()); + * ``` + * + * Requires `allow-write` permission. + * + * @tags allow-write + * @category File System + */ + export function utimeSync(path: string | URL, atime: number | Date, mtime: number | Date): void; + /** @category Network */ + export type Addr = NetAddr | UnixAddr; + + /** + * An abstract interface which when implemented provides an interface to close + * files/resources that were previously opened. + * + * @deprecated Use {@linkcode ReadableStream} and {@linkcode WritableStream} + * instead. {@linkcode Closer} will be removed in v2.0.0. + * @category I/O + */ + export interface Closer { + /** Closes the resource, "freeing" the backing file/resource. */ + close(): void; + } + + /** @category Network */ + export interface Conn extends Reader, Writer, Closer, Disposable { + /** The local address of the connection. */ + readonly localAddr: Addr; + /** The remote address of the connection. */ + readonly remoteAddr: Addr; + /** + * The resource ID of the connection. + * + * @deprecated Use {@linkcode Deno.Conn} instance methods instead. + * {@linkcode Deno.Conn.rid} will be removed in Deno 2.0. + */ + readonly rid: number; + readonly readable: ReadableStream; + readonly writable: WritableStream; + /** + * Shuts down (`shutdown(2)`) the write side of the connection. Most + * callers should just use `close()`. + */ + closeWrite(): Promise; + /** + * Make the connection block the event loop from finishing. + * + * Note: the connection blocks the event loop from finishing by default. + * This method is only meaningful after `.unref()` is called. + */ + ref(): void; + /** Make the connection not block the event loop from finishing. */ + unref(): void; + } + + /** @category Network */ + export interface ConnectOptions { + /** The port to connect to. */ + port: number; + /** + * A literal IP address or host name that can be resolved to an IP address. + * If not specified, + * + * @default {"127.0.0.1"} + */ + hostname?: string; + transport?: "tcp"; + } + + /** @category Network */ + export interface ConnectTlsOptions { + /** The port to connect to. */ + port: number; + /** + * A literal IP address or host name that can be resolved to an IP address. + * + * @default {"127.0.0.1"} + */ + hostname?: string; + /** + * Server certificate file. + * + * @deprecated Pass the cert file contents directly to the + * {@linkcode Deno.ConnectTlsOptions.caCerts} option instead. This option + * will be removed in Deno 2.0. + */ + certFile?: string; + /** + * A list of root certificates that will be used in addition to the + * default root certificates to verify the peer's certificate. + * + * Must be in PEM format. + */ + caCerts?: string[]; + /** + * Application-Layer Protocol Negotiation (ALPN) protocols supported by + * the client. If not specified, no ALPN extension will be included in the + * TLS handshake. + */ + alpnProtocols?: string[]; + /** PEM formatted client certificate chain. */ + certChain?: string; + /** PEM formatted (RSA or PKCS8) private key of client certificate. */ + privateKey?: string; + } + + /** @category Testing */ + export interface DenoTest { + /** + * Register a test which will be run when `deno test` is used on the command + * line and the containing module looks like a test module. + * + * `fn` can be async if required. + * + * ```ts + * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * + * Deno.test({ + * name: "example test", + * fn() { + * assertEquals("world", "world"); + * }, + * }); + * + * Deno.test({ + * name: "example ignored test", + * ignore: Deno.build.os === "windows", + * fn() { + * // This test is ignored only on Windows machines + * }, + * }); + * + * Deno.test({ + * name: "example async test", + * async fn() { + * const decoder = new TextDecoder("utf-8"); + * const data = await Deno.readFile("hello_world.txt"); + * assertEquals(decoder.decode(data), "Hello world"); + * } + * }); + * ``` + * + * @category Testing + */ + (t: TestDefinition): void; + /** + * Register a test which will be run when `deno test` is used on the command + * line and the containing module looks like a test module. + * + * `fn` can be async if required. + * + * ```ts + * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * + * Deno.test("My test description", () => { + * assertEquals("hello", "hello"); + * }); + * + * Deno.test("My async test description", async () => { + * const decoder = new TextDecoder("utf-8"); + * const data = await Deno.readFile("hello_world.txt"); + * assertEquals(decoder.decode(data), "Hello world"); + * }); + * ``` + * + * @category Testing + */ + (name: string, fn: (t: TestContext) => void | Promise): void; + /** + * Register a test which will be run when `deno test` is used on the command + * line and the containing module looks like a test module. + * + * `fn` can be async if required. Declared function must have a name. + * + * ```ts + * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * + * Deno.test(function myTestName() { + * assertEquals("hello", "hello"); + * }); + * + * Deno.test(async function myOtherTestName() { + * const decoder = new TextDecoder("utf-8"); + * const data = await Deno.readFile("hello_world.txt"); + * assertEquals(decoder.decode(data), "Hello world"); + * }); + * ``` + * + * @category Testing + */ + (fn: (t: TestContext) => void | Promise): void; + /** + * Register a test which will be run when `deno test` is used on the command + * line and the containing module looks like a test module. + * + * `fn` can be async if required. + * + * ```ts + * import {assert, fail, assertEquals} from "https://deno.land/std/assert/mod.ts"; + * + * Deno.test("My test description", { permissions: { read: true } }, (): void => { + * assertEquals("hello", "hello"); + * }); + * + * Deno.test("My async test description", { permissions: { read: false } }, async (): Promise => { + * const decoder = new TextDecoder("utf-8"); + * const data = await Deno.readFile("hello_world.txt"); + * assertEquals(decoder.decode(data), "Hello world"); + * }); + * ``` + * + * @category Testing + */ + (name: string, options: Omit, fn: (t: TestContext) => void | Promise): void; + /** + * Register a test which will be run when `deno test` is used on the command + * line and the containing module looks like a test module. + * + * `fn` can be async if required. + * + * ```ts + * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * + * Deno.test( + * { + * name: "My test description", + * permissions: { read: true }, + * }, + * () => { + * assertEquals("hello", "hello"); + * }, + * ); + * + * Deno.test( + * { + * name: "My async test description", + * permissions: { read: false }, + * }, + * async () => { + * const decoder = new TextDecoder("utf-8"); + * const data = await Deno.readFile("hello_world.txt"); + * assertEquals(decoder.decode(data), "Hello world"); + * }, + * ); + * ``` + * + * @category Testing + */ + (options: Omit, fn: (t: TestContext) => void | Promise): void; + /** + * Register a test which will be run when `deno test` is used on the command + * line and the containing module looks like a test module. + * + * `fn` can be async if required. Declared function must have a name. + * + * ```ts + * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * + * Deno.test( + * { permissions: { read: true } }, + * function myTestName() { + * assertEquals("hello", "hello"); + * }, + * ); + * + * Deno.test( + * { permissions: { read: false } }, + * async function myOtherTestName() { + * const decoder = new TextDecoder("utf-8"); + * const data = await Deno.readFile("hello_world.txt"); + * assertEquals(decoder.decode(data), "Hello world"); + * }, + * ); + * ``` + * + * @category Testing + */ + (options: Omit, fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for ignoring a particular test case. + * + * @category Testing + */ + ignore(t: Omit): void; + /** + * Shorthand property for ignoring a particular test case. + * + * @category Testing + */ + ignore(name: string, fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for ignoring a particular test case. + * + * @category Testing + */ + ignore(fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for ignoring a particular test case. + * + * @category Testing + */ + ignore(name: string, options: Omit, fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for ignoring a particular test case. + * + * @category Testing + */ + ignore(options: Omit, fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for ignoring a particular test case. + * + * @category Testing + */ + ignore(options: Omit, fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for focusing a particular test case. + * + * @category Testing + */ + only(t: Omit): void; + /** + * Shorthand property for focusing a particular test case. + * + * @category Testing + */ + only(name: string, fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for focusing a particular test case. + * + * @category Testing + */ + only(fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for focusing a particular test case. + * + * @category Testing + */ + only(name: string, options: Omit, fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for focusing a particular test case. + * + * @category Testing + */ + only(options: Omit, fn: (t: TestContext) => void | Promise): void; + /** + * Shorthand property for focusing a particular test case. + * + * @category Testing + */ + only(options: Omit, fn: (t: TestContext) => void | Promise): void; + } + + /** + * Information about a directory entry returned from {@linkcode Deno.readDir} + * and {@linkcode Deno.readDirSync}. + * + * @category File System + */ + export interface DirEntry { + /** + * The file name of the entry. It is just the entity name and does not + * include the full path. + */ + name: string; + /** + * True if this is info for a regular file. Mutually exclusive to + * `DirEntry.isDirectory` and `DirEntry.isSymlink`. + */ + isFile: boolean; + /** + * True if this is info for a regular directory. Mutually exclusive to + * `DirEntry.isFile` and `DirEntry.isSymlink`. + */ + isDirectory: boolean; + /** + * True if this is info for a symlink. Mutually exclusive to + * `DirEntry.isFile` and `DirEntry.isDirectory`. + */ + isSymlink: boolean; + } + + /** + * The permission descriptor for the `allow-env` and `deny-env` permissions, which controls + * access to being able to read and write to the process environment variables + * as well as access other information about the environment. The option + * `variable` allows scoping the permission to a specific environment + * variable. + * + * @category Permissions + */ + export interface EnvPermissionDescriptor { + name: "env"; + /** Optional environment variable name (e.g. `PATH`). */ + variable?: string; + } + + /** + * The permission descriptor for the `allow-ffi` and `deny-ffi` permissions, which controls + * access to loading _foreign_ code and interfacing with it via the + * [Foreign Function Interface API](https://deno.land/manual/runtime/ffi_api) + * available in Deno. The option `path` allows scoping the permission to a + * specific path on the host. + * + * @category Permissions + */ + export interface FfiPermissionDescriptor { + name: "ffi"; + /** Optional path on the local host to scope the permission to. */ + path?: string | URL; + } + + /** + * The permission descriptor for the `allow-sys` and `deny-sys` permissions, which controls + * access to sensitive host system information, which malicious code might + * attempt to exploit. The option `kind` allows scoping the permission to a + * specific piece of information. + * + * @category Permissions + */ + export interface SysPermissionDescriptor { + name: "sys"; + /** The specific information to scope the permission to. */ + kind?: | "loadavg" + | "hostname" + | "systemMemoryInfo" + | "networkInterfaces" + | "osRelease" + | "osUptime" + | "uid" + | "gid"; + } + + /** + * An interface containing methods to interact with the process environment + * variables. + * + * @tags allow-env + * @category Runtime Environment + */ + export interface Env { + /** + * Retrieve the value of an environment variable. + * + * Returns `undefined` if the supplied environment variable is not defined. + * + * ```ts + * console.log(Deno.env.get("HOME")); // e.g. outputs "/home/alice" + * console.log(Deno.env.get("MADE_UP_VAR")); // outputs "undefined" + * ``` + * + * Requires `allow-env` permission. + * + * @tags allow-env + */ + get(key: string): string | undefined; + /** + * Set the value of an environment variable. + * + * ```ts + * Deno.env.set("SOME_VAR", "Value"); + * Deno.env.get("SOME_VAR"); // outputs "Value" + * ``` + * + * Requires `allow-env` permission. + * + * @tags allow-env + */ + set(key: string, value: string): void; + /** + * Delete the value of an environment variable. + * + * ```ts + * Deno.env.set("SOME_VAR", "Value"); + * Deno.env.delete("SOME_VAR"); // outputs "undefined" + * ``` + * + * Requires `allow-env` permission. + * + * @tags allow-env + */ + delete(key: string): void; + /** + * Check whether an environment variable is present or not. + * + * ```ts + * Deno.env.set("SOME_VAR", "Value"); + * Deno.env.has("SOME_VAR"); // outputs true + * ``` + * + * Requires `allow-env` permission. + * + * @tags allow-env + */ + has(key: string): boolean; + /** + * Returns a snapshot of the environment variables at invocation as a + * simple object of keys and values. + * + * ```ts + * Deno.env.set("TEST_VAR", "A"); + * const myEnv = Deno.env.toObject(); + * console.log(myEnv.SHELL); + * Deno.env.set("TEST_VAR", "B"); + * console.log(myEnv.TEST_VAR); // outputs "A" + * ``` + * + * Requires `allow-env` permission. + * + * @tags allow-env + */ + toObject(): { [index: string]: string }; + } + + /** + * Provides information about a file and is returned by + * {@linkcode Deno.stat}, {@linkcode Deno.lstat}, {@linkcode Deno.statSync}, + * and {@linkcode Deno.lstatSync} or from calling `stat()` and `statSync()` + * on an {@linkcode Deno.FsFile} instance. + * + * @category File System + */ + export interface FileInfo { + /** + * True if this is info for a regular file. Mutually exclusive to + * `FileInfo.isDirectory` and `FileInfo.isSymlink`. + */ + isFile: boolean; + /** + * True if this is info for a regular directory. Mutually exclusive to + * `FileInfo.isFile` and `FileInfo.isSymlink`. + */ + isDirectory: boolean; + /** + * True if this is info for a symlink. Mutually exclusive to + * `FileInfo.isFile` and `FileInfo.isDirectory`. + */ + isSymlink: boolean; + /** The size of the file, in bytes. */ + size: number; + /** + * The last modification time of the file. This corresponds to the `mtime` + * field from `stat` on Linux/Mac OS and `ftLastWriteTime` on Windows. This + * may not be available on all platforms. + */ + mtime: Date | null; + /** + * The last access time of the file. This corresponds to the `atime` + * field from `stat` on Unix and `ftLastAccessTime` on Windows. This may not + * be available on all platforms. + */ + atime: Date | null; + /** + * The creation time of the file. This corresponds to the `birthtime` + * field from `stat` on Mac/BSD and `ftCreationTime` on Windows. This may + * not be available on all platforms. + */ + birthtime: Date | null; + /** ID of the device containing the file. */ + dev: number; + /** + * Inode number. + * + * _Linux/Mac OS only._ + */ + ino: number | null; + /** + * The underlying raw `st_mode` bits that contain the standard Unix + * permissions for this file/directory. + * + * _Linux/Mac OS only._ + */ + mode: number | null; + /** + * Number of hard links pointing to this file. + * + * _Linux/Mac OS only._ + */ + nlink: number | null; + /** + * User ID of the owner of this file. + * + * _Linux/Mac OS only._ + */ + uid: number | null; + /** + * Group ID of the owner of this file. + * + * _Linux/Mac OS only._ + */ + gid: number | null; + /** + * Device ID of this file. + * + * _Linux/Mac OS only._ + */ + rdev: number | null; + /** + * Blocksize for filesystem I/O. + * + * _Linux/Mac OS only._ + */ + blksize: number | null; + /** + * Number of blocks allocated to the file, in 512-byte units. + * + * _Linux/Mac OS only._ + */ + blocks: number | null; + /** + * True if this is info for a block device. + * + * _Linux/Mac OS only._ + */ + isBlockDevice: boolean | null; + /** + * True if this is info for a char device. + * + * _Linux/Mac OS only._ + */ + isCharDevice: boolean | null; + /** + * True if this is info for a fifo. + * + * _Linux/Mac OS only._ + */ + isFifo: boolean | null; + /** + * True if this is info for a socket. + * + * _Linux/Mac OS only._ + */ + isSocket: boolean | null; + } + + /** + * Represents a unique file system event yielded by a + * {@linkcode Deno.FsWatcher}. + * + * @category File System + */ + export interface FsEvent { + /** The kind/type of the file system event. */ + kind: "any" | "access" | "create" | "modify" | "remove" | "other"; + /** An array of paths that are associated with the file system event. */ + paths: string[]; + /** Any additional flags associated with the event. */ + flag?: FsEventFlag; + } + + /** + * Additional information for FsEvent objects with the "other" kind. + * + * - `"rescan"`: rescan notices indicate either a lapse in the events or a + * change in the filesystem such that events received so far can no longer + * be relied on to represent the state of the filesystem now. An + * application that simply reacts to file changes may not care about this. + * An application that keeps an in-memory representation of the filesystem + * will need to care, and will need to refresh that representation directly + * from the filesystem. + * + * @category File System + */ + export type FsEventFlag = "rescan"; + + /** + * Returned by {@linkcode Deno.watchFs}. It is an async iterator yielding up + * system events. To stop watching the file system by calling `.close()` + * method. + * + * @category File System + */ + export interface FsWatcher extends AsyncIterable, Disposable { + /** + * The resource id. + * + * @deprecated Use {@linkcode Deno.FsWatcher} instance methods instead. + * {@linkcode Deno.FsWatcher.rid} will be removed in Deno 2.0. + */ + readonly rid: number; + /** Stops watching the file system and closes the watcher resource. */ + close(): void; + /** + * Stops watching the file system and closes the watcher resource. + * + * @deprecated {@linkcode Deno.FsWatcher.return} will be removed in Deno 2.0. + */ + return?(value?: any): Promise>; + [Symbol.asyncIterator](): AsyncIterableIterator; + } + + /** + * The permission descriptor for the `allow-hrtime` and `deny-hrtime` permissions, which + * controls if the runtime code has access to high resolution time. High + * resolution time is considered sensitive information, because it can be used + * by malicious code to gain information about the host that it might not + * otherwise have access to. + * + * @category Permissions + */ + export interface HrtimePermissionDescriptor { + name: "hrtime"; + } + + /** + * Option which can be specified when performing {@linkcode Deno.inspect}. + * + * @category Console and Debugging + */ + export interface InspectOptions { + /** + * Stylize output with ANSI colors. + * + * @default {false} + */ + colors?: boolean; + /** + * Try to fit more than one entry of a collection on the same line. + * + * @default {true} + */ + compact?: boolean; + /** + * Traversal depth for nested objects. + * + * @default {4} + */ + depth?: number; + /** + * The maximum length for an inspection to take up a single line. + * + * @default {80} + */ + breakLength?: number; + /** + * Whether or not to escape sequences. + * + * @default {true} + */ + escapeSequences?: boolean; + /** + * The maximum number of iterable entries to print. + * + * @default {100} + */ + iterableLimit?: number; + /** + * Show a Proxy's target and handler. + * + * @default {false} + */ + showProxy?: boolean; + /** + * Sort Object, Set and Map entries by key. + * + * @default {false} + */ + sorted?: boolean; + /** + * Add a trailing comma for multiline collections. + * + * @default {false} + */ + trailingComma?: boolean; + /** + * Evaluate the result of calling getters. + * + * @default {false} + */ + getters?: boolean; + /** + * Show an object's non-enumerable properties. + * + * @default {false} + */ + showHidden?: boolean; + /** + * The maximum length of a string before it is truncated with an + * ellipsis. + */ + strAbbreviateSize?: number; + } + + /** + * A generic network listener for stream-oriented protocols. + * + * @category Network + */ + export interface Listener extends AsyncIterable, Disposable { + /** Return the address of the `Listener`. */ + readonly addr: Addr; + /** + * Return the rid of the `Listener`. + * + * @deprecated Use {@linkcode Deno.Listener} instance methods instead. + * {@linkcode Deno.Listener.rid} will be removed in Deno 2.0. + */ + readonly rid: number; + /** Waits for and resolves to the next connection to the `Listener`. */ + accept(): Promise; + /** + * Close closes the listener. Any pending accept promises will be rejected + * with errors. + */ + close(): void; + [Symbol.asyncIterator](): AsyncIterableIterator; + /** + * Make the listener block the event loop from finishing. + * + * Note: the listener blocks the event loop from finishing by default. + * This method is only meaningful after `.unref()` is called. + */ + ref(): void; + /** Make the listener not block the event loop from finishing. */ + unref(): void; + } + + /** @category Network */ + export interface ListenOptions { + /** The port to listen on. */ + port: number; + /** + * A literal IP address or host name that can be resolved to an IP address. + * + * __Note about `0.0.0.0`__ While listening `0.0.0.0` works on all platforms, + * the browsers on Windows don't work with the address `0.0.0.0`. + * You should show the message like `server running on localhost:8080` instead of + * `server running on 0.0.0.0:8080` if your program supports Windows. + * + * @default {"0.0.0.0"} + */ + hostname?: string; + } + + /** @category Network */ + export interface ListenTlsOptions extends TcpListenOptions { + /** Server private key in PEM format */ + key?: string; + /** Cert chain in PEM format */ + cert?: string; + /** + * Path to a file containing a PEM formatted CA certificate. Requires + * `--allow-read`. + * + * @tags allow-read + * @deprecated Pass the certificate file contents directly to the + * {@linkcode Deno.ListenTlsOptions.cert} option instead. This option will + * be removed in Deno 2.0. + */ + certFile?: string; + /** + * Server private key file. Requires `--allow-read`. + * + * @tags allow-read + * @deprecated Pass the key file contents directly to the + * {@linkcode Deno.ListenTlsOptions.key} option instead. This option will + * be removed in Deno 2.0. + */ + keyFile?: string; + transport?: "tcp"; + /** + * Application-Layer Protocol Negotiation (ALPN) protocols to announce to + * the client. If not specified, no ALPN extension will be included in the + * TLS handshake. + */ + alpnProtocols?: string[]; + } + + /** + * Options which can be set when using {@linkcode Deno.makeTempDir}, + * {@linkcode Deno.makeTempDirSync}, {@linkcode Deno.makeTempFile}, and + * {@linkcode Deno.makeTempFileSync}. + * + * @category File System + */ + export interface MakeTempOptions { + /** + * Directory where the temporary directory should be created (defaults to + * the env variable `TMPDIR`, or the system's default, usually `/tmp`). + * + * Note that if the passed `dir` is relative, the path returned by + * `makeTempFile()` and `makeTempDir()` will also be relative. Be mindful of + * this when changing working directory. + */ + dir?: string; + /** + * String that should precede the random portion of the temporary + * directory's name. + */ + prefix?: string; + /** + * String that should follow the random portion of the temporary + * directory's name. + */ + suffix?: string; + } + + /** @category Runtime Environment */ + export interface MemoryUsage { + /** + * The number of bytes of the current Deno's process resident set size, + * which is the amount of memory occupied in main memory (RAM). + */ + rss: number; + /** The total size of the heap for V8, in bytes. */ + heapTotal: number; + /** The amount of the heap used for V8, in bytes. */ + heapUsed: number; + /** + * Memory, in bytes, associated with JavaScript objects outside of the + * JavaScript isolate. + */ + external: number; + } + + /** + * @category Observability + * @deprecated {@linkcode Deno.metrics} will be removed in v2.0.0. + */ + export interface Metrics extends OpMetrics { + ops: Record; + } + + /** + * Options which can be set when using {@linkcode Deno.mkdir} and + * {@linkcode Deno.mkdirSync}. + * + * @category File System + */ + export interface MkdirOptions { + /** + * If set to `true`, means that any intermediate directories will also be + * created (as with the shell command `mkdir -p`). + * + * Intermediate directories are created with the same permissions. + * + * When recursive is set to `true`, succeeds silently (without changing any + * permissions) if a directory already exists at the path, or if the path + * is a symlink to an existing directory. + * + * @default {false} + */ + recursive?: boolean; + /** + * Permissions to use when creating the directory (defaults to `0o777`, + * before the process's umask). + * + * Ignored on Windows. + */ + mode?: number; + } + + /** @category Network */ + export interface NetAddr { + transport: "tcp" | "udp"; + hostname: string; + port: number; + } + + /** + * The permission descriptor for the `allow-net` and `deny-net` permissions, which controls + * access to opening network ports and connecting to remote hosts via the + * network. The option `host` allows scoping the permission for outbound + * connection to a specific host and port. + * + * @category Permissions + */ + export interface NetPermissionDescriptor { + name: "net"; + /** + * Optional host string of the form `"[:]"`. Examples: + * + * "github.com" + * "deno.land:8080" + */ + host?: string; + } + + /** + * Options which can be set when doing {@linkcode Deno.open} and + * {@linkcode Deno.openSync}. + * + * @category File System + */ + export interface OpenOptions { + /** + * Sets the option for read access. This option, when `true`, means that + * the file should be read-able if opened. + * + * @default {true} + */ + read?: boolean; + /** + * Sets the option for write access. This option, when `true`, means that + * the file should be write-able if opened. If the file already exists, + * any write calls on it will overwrite its contents, by default without + * truncating it. + * + * @default {false} + */ + write?: boolean; + /** + * Sets the option for the append mode. This option, when `true`, means + * that writes will append to a file instead of overwriting previous + * contents. + * + * Note that setting `{ write: true, append: true }` has the same effect as + * setting only `{ append: true }`. + * + * @default {false} + */ + append?: boolean; + /** + * Sets the option for truncating a previous file. If a file is + * successfully opened with this option set it will truncate the file to `0` + * size if it already exists. The file must be opened with write access + * for truncate to work. + * + * @default {false} + */ + truncate?: boolean; + /** + * Sets the option to allow creating a new file, if one doesn't already + * exist at the specified path. Requires write or append access to be + * used. + * + * @default {false} + */ + create?: boolean; + /** + * If set to `true`, no file, directory, or symlink is allowed to exist at + * the target location. Requires write or append access to be used. When + * createNew is set to `true`, create and truncate are ignored. + * + * @default {false} + */ + createNew?: boolean; + /** + * Permissions to use if creating the file (defaults to `0o666`, before + * the process's umask). + * + * Ignored on Windows. + */ + mode?: number; + } + + /** + * @category Observability + * @deprecated {@linkcode Deno.metrics} will be removed in v2.0.0. + */ + export interface OpMetrics { + opsDispatched: number; + opsDispatchedSync: number; + opsDispatchedAsync: number; + opsDispatchedAsyncUnref: number; + opsCompleted: number; + opsCompletedSync: number; + opsCompletedAsync: number; + opsCompletedAsyncUnref: number; + bytesSentControl: number; + bytesSentData: number; + bytesReceived: number; + } + + /** + * Permission descriptors which define a permission and can be queried, + * requested, or revoked. + * + * View the specifics of the individual descriptors for more information about + * each permission kind. + * + * @category Permissions + */ + export type PermissionDescriptor = | RunPermissionDescriptor + | ReadPermissionDescriptor + | WritePermissionDescriptor + | NetPermissionDescriptor + | EnvPermissionDescriptor + | SysPermissionDescriptor + | FfiPermissionDescriptor + | HrtimePermissionDescriptor; + /** + * The name of a privileged feature which needs permission. + * + * @category Permissions + */ + export type PermissionName = | "run" + | "read" + | "write" + | "net" + | "env" + | "sys" + | "ffi" + | "hrtime"; + /** + * Options which define the permissions within a test or worker context. + * + * `"inherit"` ensures that all permissions of the parent process will be + * applied to the test context. `"none"` ensures the test context has no + * permissions. A `PermissionOptionsObject` provides a more specific + * set of permissions to the test context. + * + * @category Permissions + */ + export type PermissionOptions = | "inherit" + | "none" + | PermissionOptionsObject; + + /** + * A set of options which can define the permissions within a test or worker + * context at a highly specific level. + * + * @category Permissions + */ + export interface PermissionOptionsObject { + /** + * Specifies if the `env` permission should be requested or revoked. + * If set to `"inherit"`, the current `env` permission will be inherited. + * If set to `true`, the global `env` permission will be requested. + * If set to `false`, the global `env` permission will be revoked. + * + * @default {false} + */ + env?: "inherit" | boolean | string[]; + /** + * Specifies if the `sys` permission should be requested or revoked. + * If set to `"inherit"`, the current `sys` permission will be inherited. + * If set to `true`, the global `sys` permission will be requested. + * If set to `false`, the global `sys` permission will be revoked. + * + * @default {false} + */ + sys?: "inherit" | boolean | string[]; + /** + * Specifies if the `hrtime` permission should be requested or revoked. + * If set to `"inherit"`, the current `hrtime` permission will be inherited. + * If set to `true`, the global `hrtime` permission will be requested. + * If set to `false`, the global `hrtime` permission will be revoked. + * + * @default {false} + */ + hrtime?: "inherit" | boolean; + /** + * Specifies if the `net` permission should be requested or revoked. + * if set to `"inherit"`, the current `net` permission will be inherited. + * if set to `true`, the global `net` permission will be requested. + * if set to `false`, the global `net` permission will be revoked. + * if set to `string[]`, the `net` permission will be requested with the + * specified host strings with the format `"[:]`. + * + * @default {false} + * + * Examples: + * + * ```ts + * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * + * Deno.test({ + * name: "inherit", + * permissions: { + * net: "inherit", + * }, + * async fn() { + * const status = await Deno.permissions.query({ name: "net" }) + * assertEquals(status.state, "granted"); + * }, + * }); + * ``` + * + * ```ts + * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * + * Deno.test({ + * name: "true", + * permissions: { + * net: true, + * }, + * async fn() { + * const status = await Deno.permissions.query({ name: "net" }); + * assertEquals(status.state, "granted"); + * }, + * }); + * ``` + * + * ```ts + * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * + * Deno.test({ + * name: "false", + * permissions: { + * net: false, + * }, + * async fn() { + * const status = await Deno.permissions.query({ name: "net" }); + * assertEquals(status.state, "denied"); + * }, + * }); + * ``` + * + * ```ts + * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * + * Deno.test({ + * name: "localhost:8080", + * permissions: { + * net: ["localhost:8080"], + * }, + * async fn() { + * const status = await Deno.permissions.query({ name: "net", host: "localhost:8080" }); + * assertEquals(status.state, "granted"); + * }, + * }); + * ``` + */ + net?: "inherit" | boolean | string[]; + /** + * Specifies if the `ffi` permission should be requested or revoked. + * If set to `"inherit"`, the current `ffi` permission will be inherited. + * If set to `true`, the global `ffi` permission will be requested. + * If set to `false`, the global `ffi` permission will be revoked. + * + * @default {false} + */ + ffi?: "inherit" | boolean | Array; + /** + * Specifies if the `read` permission should be requested or revoked. + * If set to `"inherit"`, the current `read` permission will be inherited. + * If set to `true`, the global `read` permission will be requested. + * If set to `false`, the global `read` permission will be revoked. + * If set to `Array`, the `read` permission will be requested with the + * specified file paths. + * + * @default {false} + */ + read?: "inherit" | boolean | Array; + /** + * Specifies if the `run` permission should be requested or revoked. + * If set to `"inherit"`, the current `run` permission will be inherited. + * If set to `true`, the global `run` permission will be requested. + * If set to `false`, the global `run` permission will be revoked. + * + * @default {false} + */ + run?: "inherit" | boolean | Array; + /** + * Specifies if the `write` permission should be requested or revoked. + * If set to `"inherit"`, the current `write` permission will be inherited. + * If set to `true`, the global `write` permission will be requested. + * If set to `false`, the global `write` permission will be revoked. + * If set to `Array`, the `write` permission will be requested with the + * specified file paths. + * + * @default {false} + */ + write?: "inherit" | boolean | Array; + } + + /** + * The current status of the permission: + * + * - `"granted"` - the permission has been granted. + * - `"denied"` - the permission has been explicitly denied. + * - `"prompt"` - the permission has not explicitly granted nor denied. + * + * @category Permissions + */ + export type PermissionState = | "granted" + | "denied" + | "prompt"; + + /** + * The interface which defines what event types are supported by + * {@linkcode PermissionStatus} instances. + * + * @category Permissions + */ + export interface PermissionStatusEventMap { + "change": Event; + } + + /** + * The status resolved from the `.status()` method of a + * {@linkcode Deno.Process} instance. + * + * If `success` is `true`, then `code` will be `0`, but if `success` is + * `false`, the sub-process exit code will be set in `code`. + * + * @deprecated Use {@linkcode Deno.Command} instead. {@linkcode Deno.run} + * will be removed in v2.0.0. + * @category Sub Process + */ + export type ProcessStatus = | { + success: true; + code: 0; + signal?: undefined; + } + | { + success: false; + code: number; + signal?: number; + }; + + /** + * An abstract interface which when implemented provides an interface to read + * bytes into an array buffer asynchronously. + * + * @deprecated Use {@linkcode ReadableStream} instead. {@linkcode Reader} + * will be removed in v2.0.0. + * @category I/O + */ + export interface Reader { + /** + * Reads up to `p.byteLength` bytes into `p`. It resolves to the number of + * bytes read (`0` < `n` <= `p.byteLength`) and rejects if any error + * encountered. Even if `read()` resolves to `n` < `p.byteLength`, it may + * use all of `p` as scratch space during the call. If some data is + * available but not `p.byteLength` bytes, `read()` conventionally resolves + * to what is available instead of waiting for more. + * + * When `read()` encounters end-of-file condition, it resolves to EOF + * (`null`). + * + * When `read()` encounters an error, it rejects with an error. + * + * Callers should always process the `n` > `0` bytes returned before + * considering the EOF (`null`). Doing so correctly handles I/O errors that + * happen after reading some bytes and also both of the allowed EOF + * behaviors. + * + * Implementations should not retain a reference to `p`. + * + * Use + * [`itereateReader`](https://deno.land/std/streams/iterate_reader.ts?s=iterateReader) + * from + * [`std/streams/iterate_reader.ts`](https://deno.land/std/streams/iterate_reader.ts) + * to turn a `Reader` into an {@linkcode AsyncIterator}. + */ + read(p: Uint8Array): Promise; + } + + /** + * An abstract interface which when implemented provides an interface to read + * bytes into an array buffer synchronously. + * + * @deprecated Use {@linkcode ReadableStream} instead. {@linkcode ReaderSync} + * will be removed in v2.0.0. + * @category I/O + */ + export interface ReaderSync { + /** + * Reads up to `p.byteLength` bytes into `p`. It resolves to the number + * of bytes read (`0` < `n` <= `p.byteLength`) and rejects if any error + * encountered. Even if `readSync()` returns `n` < `p.byteLength`, it may use + * all of `p` as scratch space during the call. If some data is available + * but not `p.byteLength` bytes, `readSync()` conventionally returns what is + * available instead of waiting for more. + * + * When `readSync()` encounters end-of-file condition, it returns EOF + * (`null`). + * + * When `readSync()` encounters an error, it throws with an error. + * + * Callers should always process the `n` > `0` bytes returned before + * considering the EOF (`null`). Doing so correctly handles I/O errors that + * happen after reading some bytes and also both of the allowed EOF + * behaviors. + * + * Implementations should not retain a reference to `p`. + * + * Use + * [`itereateReaderSync`](https://deno.land/std/streams/iterate_reader.ts?s=iterateReaderSync) + * from from + * [`std/streams/iterate_reader.ts`](https://deno.land/std/streams/iterate_reader.ts) + * to turn a `ReaderSync` into an {@linkcode Iterator}. + */ + readSync(p: Uint8Array): number | null; + } + + /** + * Options which can be set when using {@linkcode Deno.readFile} or + * {@linkcode Deno.readFileSync}. + * + * @category File System + */ + export interface ReadFileOptions { + /** + * An abort signal to allow cancellation of the file read operation. + * If the signal becomes aborted the readFile operation will be stopped + * and the promise returned will be rejected with an AbortError. + */ + signal?: AbortSignal; + } + + /** + * The permission descriptor for the `allow-read` and `deny-read` permissions, which controls + * access to reading resources from the local host. The option `path` allows + * scoping the permission to a specific path (and if the path is a directory + * any sub paths). + * + * Permission granted under `allow-read` only allows runtime code to attempt + * to read, the underlying operating system may apply additional permissions. + * + * @category Permissions + */ + export interface ReadPermissionDescriptor { + name: "read"; + /** + * An `allow-read` or `deny-read` permission can be scoped to a specific path (and if + * the path is a directory, any sub paths). + */ + path?: string | URL; + } + + /** + * Options which can be set when using {@linkcode Deno.remove} and + * {@linkcode Deno.removeSync}. + * + * @category File System + */ + export interface RemoveOptions { + /** + * If set to `true`, path will be removed even if it's a non-empty directory. + * + * @default {false} + */ + recursive?: boolean; + } + + /** + * A map of open resources that Deno is tracking. The key is the resource ID + * (_rid_) and the value is its representation. + * + * @deprecated {@linkcode Deno.resources} will be removed in Deno 2.0. + * @category Observability + */ + export interface ResourceMap { + [rid: number]: unknown; + } + + /** + * Options which can be used with {@linkcode Deno.run}. + * + * @deprecated Use {@linkcode Deno.Command} instead. {@linkcode Deno.run} + * will be removed in v2.0.0. + * @category Sub Process + */ + export interface RunOptions { + /** + * Arguments to pass. + * + * _Note_: the first element needs to be a path to the executable that is + * being run. + */ + cmd: readonly string[] | [string | URL, ...string[]]; + /** + * The current working directory that should be used when running the + * sub-process. + */ + cwd?: string; + /** Any environment variables to be set when running the sub-process. */ + env?: Record; + /** + * By default subprocess inherits `stdout` of parent process. To change + * this this option can be set to a resource ID (_rid_) of an open file, + * `"inherit"`, `"piped"`, or `"null"`: + * + * - _number_: the resource ID of an open file/resource. This allows you to + * write to a file. + * - `"inherit"`: The default if unspecified. The subprocess inherits from the + * parent. + * - `"piped"`: A new pipe should be arranged to connect the parent and child + * sub-process. + * - `"null"`: This stream will be ignored. This is the equivalent of attaching + * the stream to `/dev/null`. + */ + stdout?: "inherit" | "piped" | "null" | number; + /** + * By default subprocess inherits `stderr` of parent process. To change + * this this option can be set to a resource ID (_rid_) of an open file, + * `"inherit"`, `"piped"`, or `"null"`: + * + * - _number_: the resource ID of an open file/resource. This allows you to + * write to a file. + * - `"inherit"`: The default if unspecified. The subprocess inherits from the + * parent. + * - `"piped"`: A new pipe should be arranged to connect the parent and child + * sub-process. + * - `"null"`: This stream will be ignored. This is the equivalent of attaching + * the stream to `/dev/null`. + */ + stderr?: "inherit" | "piped" | "null" | number; + /** + * By default subprocess inherits `stdin` of parent process. To change + * this this option can be set to a resource ID (_rid_) of an open file, + * `"inherit"`, `"piped"`, or `"null"`: + * + * - _number_: the resource ID of an open file/resource. This allows you to + * read from a file. + * - `"inherit"`: The default if unspecified. The subprocess inherits from the + * parent. + * - `"piped"`: A new pipe should be arranged to connect the parent and child + * sub-process. + * - `"null"`: This stream will be ignored. This is the equivalent of attaching + * the stream to `/dev/null`. + */ + stdin?: "inherit" | "piped" | "null" | number; + } + + /** + * The permission descriptor for the `allow-run` and `deny-run` permissions, which controls + * access to what sub-processes can be executed by Deno. The option `command` + * allows scoping the permission to a specific executable. + * + * **Warning, in practice, `allow-run` is effectively the same as `allow-all` + * in the sense that malicious code could execute any arbitrary code on the + * host.** + * + * @category Permissions + */ + export interface RunPermissionDescriptor { + name: "run"; + /** + * An `allow-run` or `deny-run` permission can be scoped to a specific executable, + * which would be relative to the start-up CWD of the Deno CLI. + */ + command?: string | URL; + } + + /** + * An abstract interface which when implemented provides an interface to seek + * within an open file/resource asynchronously. + * + * @category I/O + */ + export interface Seeker { + /** + * Seek sets the offset for the next `read()` or `write()` to offset, + * interpreted according to `whence`: `Start` means relative to the + * start of the file, `Current` means relative to the current offset, + * and `End` means relative to the end. Seek resolves to the new offset + * relative to the start of the file. + * + * Seeking to an offset before the start of the file is an error. Seeking to + * any positive offset is legal, but the behavior of subsequent I/O + * operations on the underlying object is implementation-dependent. + * + * It resolves with the updated offset. + */ + seek(offset: number | bigint, whence: SeekMode): Promise; + } + + /** + * An abstract interface which when implemented provides an interface to seek + * within an open file/resource synchronously. + * + * @category I/O + */ + export interface SeekerSync { + /** + * Seek sets the offset for the next `readSync()` or `writeSync()` to + * offset, interpreted according to `whence`: `Start` means relative + * to the start of the file, `Current` means relative to the current + * offset, and `End` means relative to the end. + * + * Seeking to an offset before the start of the file is an error. Seeking to + * any positive offset is legal, but the behavior of subsequent I/O + * operations on the underlying object is implementation-dependent. + * + * It returns the updated offset. + */ + seekSync(offset: number | bigint, whence: SeekMode): number; + } + + /** @category I/O */ + export interface SetRawOptions { + /** + * The `cbreak` option can be used to indicate that characters that + * correspond to a signal should still be generated. When disabling raw + * mode, this option is ignored. This functionality currently only works on + * Linux and Mac OS. + */ + cbreak: boolean; + } + + /** + * Operating signals which can be listened for or sent to sub-processes. What + * signals and what their standard behaviors are OS dependent. + * + * @category Runtime Environment + */ + export type Signal = | "SIGABRT" + | "SIGALRM" + | "SIGBREAK" + | "SIGBUS" + | "SIGCHLD" + | "SIGCONT" + | "SIGEMT" + | "SIGFPE" + | "SIGHUP" + | "SIGILL" + | "SIGINFO" + | "SIGINT" + | "SIGIO" + | "SIGKILL" + | "SIGPIPE" + | "SIGPROF" + | "SIGPWR" + | "SIGQUIT" + | "SIGSEGV" + | "SIGSTKFLT" + | "SIGSTOP" + | "SIGSYS" + | "SIGTERM" + | "SIGTRAP" + | "SIGTSTP" + | "SIGTTIN" + | "SIGTTOU" + | "SIGURG" + | "SIGUSR1" + | "SIGUSR2" + | "SIGVTALRM" + | "SIGWINCH" + | "SIGXCPU" + | "SIGXFSZ"; + + /** + * Options that can be used with {@linkcode symlink} and + * {@linkcode symlinkSync}. + * + * @category File System + */ + export interface SymlinkOptions { + /** + * If the symbolic link should be either a file or directory. This option + * only applies to Windows and is ignored on other operating systems. + */ + type: "file" | "dir"; + } + + /** @category Testing */ + export interface TestDefinition { + fn: (t: TestContext) => void | Promise; + /** The name of the test. */ + name: string; + /** + * If truthy the current test step will be ignored. + * + * It is a quick way to skip over a step, but also can be used for + * conditional logic, like determining if an environment feature is present. + */ + ignore?: boolean; + /** + * If at least one test has `only` set to `true`, only run tests that have + * `only` set to `true` and fail the test suite. + */ + only?: boolean; + /** + * Check that the number of async completed operations after the test step + * is the same as number of dispatched operations. This ensures that the + * code tested does not start async operations which it then does + * not await. This helps in preventing logic errors and memory leaks + * in the application code. + * + * @default {true} + */ + sanitizeOps?: boolean; + /** + * Ensure the test step does not "leak" resources - like open files or + * network connections - by ensuring the open resources at the start of the + * test match the open resources at the end of the test. + * + * @default {true} + */ + sanitizeResources?: boolean; + /** + * Ensure the test case does not prematurely cause the process to exit, + * for example via a call to {@linkcode Deno.exit}. + * + * @default {true} + */ + sanitizeExit?: boolean; + /** + * Specifies the permissions that should be used to run the test. + * + * Set this to "inherit" to keep the calling runtime permissions, set this + * to "none" to revoke all permissions, or set a more specific set of + * permissions using a {@linkcode PermissionOptionsObject}. + * + * @default {"inherit"} + */ + permissions?: PermissionOptions; + } + + /** @category Testing */ + export interface TestStepDefinition { + /** + * The test function that will be tested when this step is executed. The + * function can take an argument which will provide information about the + * current step's context. + */ + fn: (t: TestContext) => void | Promise; + /** The name of the step. */ + name: string; + /** + * If truthy the current test step will be ignored. + * + * This is a quick way to skip over a step, but also can be used for + * conditional logic, like determining if an environment feature is present. + */ + ignore?: boolean; + /** + * Check that the number of async completed operations after the test step + * is the same as number of dispatched operations. This ensures that the + * code tested does not start async operations which it then does + * not await. This helps in preventing logic errors and memory leaks + * in the application code. + * + * Defaults to the parent test or step's value. + */ + sanitizeOps?: boolean; + /** + * Ensure the test step does not "leak" resources - like open files or + * network connections - by ensuring the open resources at the start of the + * step match the open resources at the end of the step. + * + * Defaults to the parent test or step's value. + */ + sanitizeResources?: boolean; + /** + * Ensure the test step does not prematurely cause the process to exit, + * for example via a call to {@linkcode Deno.exit}. + * + * Defaults to the parent test or step's value. + */ + sanitizeExit?: boolean; + } + + /** + * Context that is passed to a testing function, which can be used to either + * gain information about the current test, or register additional test + * steps within the current test. + * + * @category Testing + */ + export interface TestContext { + /** The current test name. */ + name: string; + /** The string URL of the current test. */ + origin: string; + /** + * If the current test is a step of another test, the parent test context + * will be set here. + */ + parent?: TestContext; + /** + * Run a sub step of the parent test or step. Returns a promise + * that resolves to a boolean signifying if the step completed successfully. + * + * The returned promise never rejects unless the arguments are invalid. + * + * If the test was ignored the promise returns `false`. + * + * ```ts + * Deno.test({ + * name: "a parent test", + * async fn(t) { + * console.log("before the step"); + * await t.step({ + * name: "step 1", + * fn(t) { + * console.log("current step:", t.name); + * } + * }); + * console.log("after the step"); + * } + * }); + * ``` + */ + step(definition: TestStepDefinition): Promise; + /** + * Run a sub step of the parent test or step. Returns a promise + * that resolves to a boolean signifying if the step completed successfully. + * + * The returned promise never rejects unless the arguments are invalid. + * + * If the test was ignored the promise returns `false`. + * + * ```ts + * Deno.test( + * "a parent test", + * async (t) => { + * console.log("before the step"); + * await t.step( + * "step 1", + * (t) => { + * console.log("current step:", t.name); + * } + * ); + * console.log("after the step"); + * } + * ); + * ``` + */ + step(name: string, fn: (t: TestContext) => void | Promise): Promise; + /** + * Run a sub step of the parent test or step. Returns a promise + * that resolves to a boolean signifying if the step completed successfully. + * + * The returned promise never rejects unless the arguments are invalid. + * + * If the test was ignored the promise returns `false`. + * + * ```ts + * Deno.test(async function aParentTest(t) { + * console.log("before the step"); + * await t.step(function step1(t) { + * console.log("current step:", t.name); + * }); + * console.log("after the step"); + * }); + * ``` + */ + step(fn: (t: TestContext) => void | Promise): Promise; + } + + /** @category Network */ + export interface TcpConn extends Conn { + /** + * The resource ID of the connection. + * + * @deprecated Use {@linkcode Deno.Conn} instance methods instead. + * {@linkcode Deno.Conn.rid} will be removed in Deno 2.0. + */ + readonly rid: number; + /** + * Enable/disable the use of Nagle's algorithm. + * + * @param [noDelay=true] + */ + setNoDelay(noDelay?: boolean): void; + /** Enable/disable keep-alive functionality. */ + setKeepAlive(keepAlive?: boolean): void; + } + + /** @category Network */ + export interface TcpListenOptions extends ListenOptions { + } + + /** @category Network */ + export interface TcpListenOptions extends ListenOptions { + /** + * When `true` the SO_REUSEPORT flag will be set on the listener. This + * allows multiple processes to listen on the same address and port. + * + * On Linux this will cause the kernel to distribute incoming connections + * across the different processes that are listening on the same address and + * port. + * + * This flag is only supported on Linux. It is silently ignored on other + * platforms. + * + * @default {false} + */ + reusePort?: boolean; + } + + /** @category Network */ + export interface TlsConn extends Conn { + /** + * The resource ID of the connection. + * + * @deprecated Use {@linkcode Deno.TlsConn} instance methods instead. + * {@linkcode Deno.TlsConn.rid} will be removed in Deno 2.0. + */ + readonly rid: number; + /** + * Runs the client or server handshake protocol to completion if that has + * not happened yet. Calling this method is optional; the TLS handshake + * will be completed automatically as soon as data is sent or received. + */ + handshake(): Promise; + } + + /** @category Network */ + export interface TlsHandshakeInfo { + /** + * Contains the ALPN protocol selected during negotiation with the server. + * If no ALPN protocol selected, returns `null`. + */ + alpnProtocol: string | null; + } + + /** + * Specialized listener that accepts TLS connections. + * + * @category Network + */ + export type TlsListener = Listener; + + /** @category Network */ + export interface UnixAddr { + transport: "unix" | "unixpacket"; + path: string; + } + + /** @category Network */ + export interface UnixConn extends Conn { + /** + * The resource ID of the connection. + * + * @deprecated Use {@linkcode Deno.UnixConn} instance methods instead. + * {@linkcode Deno.UnixConn.rid} will be removed in Deno 2.0. + */ + readonly rid: number; + } + + /** @category Network */ + export interface UnixConnectOptions { + transport: "unix"; + path: string; + } + + /** + * Options which can be set when opening a Unix listener via + * {@linkcode Deno.listen} or {@linkcode Deno.listenDatagram}. + * + * @category Network + */ + export interface UnixListenOptions { + /** A path to the Unix Socket. */ + path: string; + } + + /** + * Options for writing to a file. + * + * @category File System + */ + export interface WriteFileOptions { + /** + * If set to `true`, will append to a file instead of overwriting previous + * contents. + * + * @default {false} + */ + append?: boolean; + /** + * Sets the option to allow creating a new file, if one doesn't already + * exist at the specified path. + * + * @default {true} + */ + create?: boolean; + /** + * If set to `true`, no file, directory, or symlink is allowed to exist at + * the target location. When createNew is set to `true`, `create` is ignored. + * + * @default {false} + */ + createNew?: boolean; + /** Permissions always applied to file. */ + mode?: number; + /** + * An abort signal to allow cancellation of the file write operation. + * + * If the signal becomes aborted the write file operation will be stopped + * and the promise returned will be rejected with an {@linkcode AbortError}. + */ + signal?: AbortSignal; + } + + /** + * The permission descriptor for the `allow-write` and `deny-write` permissions, which + * controls access to writing to resources from the local host. The option + * `path` allow scoping the permission to a specific path (and if the path is + * a directory any sub paths). + * + * Permission granted under `allow-write` only allows runtime code to attempt + * to write, the underlying operating system may apply additional permissions. + * + * @category Permissions + */ + export interface WritePermissionDescriptor { + name: "write"; + /** + * An `allow-write` or `deny-write` permission can be scoped to a specific path (and if + * the path is a directory, any sub paths). + */ + path?: string | URL; + } + + /** + * An abstract interface which when implemented provides an interface to write + * bytes from an array buffer to a file/resource asynchronously. + * + * @deprecated Use {@linkcode WritableStream} instead. {@linkcode Writer} + * will be removed in v2.0.0. + * @category I/O + */ + export interface Writer { + /** + * Writes `p.byteLength` bytes from `p` to the underlying data stream. It + * resolves to the number of bytes written from `p` (`0` <= `n` <= + * `p.byteLength`) or reject with the error encountered that caused the + * write to stop early. `write()` must reject with a non-null error if + * would resolve to `n` < `p.byteLength`. `write()` must not modify the + * slice data, even temporarily. + * + * This function is one of the lowest + * level APIs and most users should not work with this directly, but rather use + * [`writeAll()`](https://deno.land/std/streams/write_all.ts?s=writeAll) from + * [`std/streams/write_all.ts`](https://deno.land/std/streams/write_all.ts) + * instead. + * + * Implementations should not retain a reference to `p`. + */ + write(p: Uint8Array): Promise; + } + + /** + * An abstract interface which when implemented provides an interface to write + * bytes from an array buffer to a file/resource synchronously. + * + * @deprecated Use {@linkcode WritableStream} instead. {@linkcode WriterSync} + * will be removed in v2.0.0. + * @category I/O + */ + export interface WriterSync { + /** + * Writes `p.byteLength` bytes from `p` to the underlying data + * stream. It returns the number of bytes written from `p` (`0` <= `n` + * <= `p.byteLength`) and any error encountered that caused the write to + * stop early. `writeSync()` must throw a non-null error if it returns `n` < + * `p.byteLength`. `writeSync()` must not modify the slice data, even + * temporarily. + * + * Implementations should not retain a reference to `p`. + */ + writeSync(p: Uint8Array): number; + } + + /** + * If {@linkcode Deno.resolveDns} is called with `"CAA"` record type + * specified, it will resolve with an array of objects with this interface. + * + * @category Network + */ + export interface CAARecord { + /** + * If `true`, indicates that the corresponding property tag **must** be + * understood if the semantics of the CAA record are to be correctly + * interpreted by an issuer. + * + * Issuers **must not** issue certificates for a domain if the relevant CAA + * Resource Record set contains unknown property tags that have `critical` + * set. + */ + critical: boolean; + /** + * An string that represents the identifier of the property represented by + * the record. + */ + tag: string; + /** The value associated with the tag. */ + value: string; + } + + /** + * If {@linkcode Deno.resolveDns} is called with `"MX"` record type + * specified, it will return an array of objects with this interface. + * + * @category Network + */ + export interface MXRecord { + /** + * A priority value, which is a relative value compared to the other + * preferences of MX records for the domain. + */ + preference: number; + /** The server that mail should be delivered to. */ + exchange: string; + } + + /** + * If {@linkcode Deno.resolveDns} is called with `"NAPTR"` record type + * specified, it will return an array of objects with this interface. + * + * @category Network + */ + export interface NAPTRRecord { + order: number; + preference: number; + flags: string; + services: string; + regexp: string; + replacement: string; + } + + /** + * Options which can be set when using {@linkcode Deno.resolveDns}. + * + * @category Network + */ + export interface ResolveDnsOptions { + /** + * The name server to be used for lookups. + * + * If not specified, defaults to the system configuration. For example + * `/etc/resolv.conf` on Unix-like systems. + */ + nameServer?: { + /** The IP address of the name server. */ + ipAddr: string; + /** The port number the query will be sent to. + * + * @default {53} */ + port?: number; + }; + /** + * An abort signal to allow cancellation of the DNS resolution operation. + * If the signal becomes aborted the resolveDns operation will be stopped + * and the promise returned will be rejected with an AbortError. + */ + signal?: AbortSignal; + } + + /** + * If {@linkcode Deno.resolveDns} is called with `"SOA"` record type + * specified, it will return an array of objects with this interface. + * + * @category Network + */ + export interface SOARecord { + mname: string; + rname: string; + serial: number; + refresh: number; + retry: number; + expire: number; + minimum: number; + } + + /** + * If {@linkcode Deno.resolveDns} is called with `"SRV"` record type + * specified, it will return an array of objects with this interface. + * + * @category Network + */ + export interface SRVRecord { + priority: number; + weight: number; + port: number; + target: string; + } + + /** + * The type of the resource record to resolve via DNS using + * {@linkcode Deno.resolveDns}. + * + * Only the listed types are supported currently. + * + * @category Network + */ + export type RecordType = | "A" + | "AAAA" + | "ANAME" + | "CAA" + | "CNAME" + | "MX" + | "NAPTR" + | "NS" + | "PTR" + | "SOA" + | "SRV" + | "TXT"; + /** + * Information related to the build of the current Deno runtime. + * + * Users are discouraged from code branching based on this information, as + * assumptions about what is available in what build environment might change + * over time. Developers should specifically sniff out the features they + * intend to use. + * + * The intended use for the information is for logging and debugging purposes. + * + * @category Runtime Environment + */ + export const build: { + /** The [LLVM](https://llvm.org/) target triple, which is the combination + * of `${arch}-${vendor}-${os}` and represent the specific build target that + * the current runtime was built for. */ + target: string; + /** Instruction set architecture that the Deno CLI was built for. */ + arch: "x86_64" | "aarch64"; + /** The operating system that the Deno CLI was built for. `"darwin"` is + * also known as OSX or MacOS. */ + os: + | "darwin" + | "linux" + | "android" + | "windows" + | "freebsd" + | "netbsd" + | "aix" + | "solaris" + | "illumos"; + /** The computer vendor that the Deno CLI was built for. */ + vendor: string; + /** Optional environment flags that were set for this build of Deno CLI. */ + env?: string; + }; + export const customInspect: unique symbol; + /** + * An interface containing methods to interact with the process environment + * variables. + * + * @tags allow-env + * @category Runtime Environment + */ + export const env: Env; + + export namespace errors { + export class AddrInUse extends Error { + } + + export class AddrNotAvailable extends Error { + } + + export class AlreadyExists extends Error { + } + + export class BadResource extends Error { + } + + export class BrokenPipe extends Error { + } + + export class Busy extends Error { + } + + export class ConnectionAborted extends Error { + } + + export class ConnectionRefused extends Error { + } + + export class ConnectionReset extends Error { + } + + export class Http extends Error { + } + + export class Interrupted extends Error { + } + + export class InvalidData extends Error { + } + + export class NotConnected extends Error { + } + + export class NotFound extends Error { + code: string; + } + + export class PermissionDenied extends Error { + } + + export class TimedOut extends Error { + } + + export class UnexpectedEof extends Error { + } + + export class WriteZero extends Error { + } + } + + /** + * The URL of the entrypoint module entered from the command-line. It + * requires read permission to the CWD. + * + * Also see {@linkcode ImportMeta} for other related information. + * + * @tags allow-read + * @category Runtime Environment + */ + export const mainModule: string; + /** + * Receive metrics from the privileged side of Deno. This is primarily used + * in the development of Deno. _Ops_, also called _bindings_, are the + * go-between between Deno JavaScript sandbox and the rest of Deno. + * + * ```shell + * > console.table(Deno.metrics()) + * ┌─────────────────────────┬────────┐ + * │ (index) │ Values │ + * ├─────────────────────────┼────────┤ + * │ opsDispatched │ 3 │ + * │ opsDispatchedSync │ 2 │ + * │ opsDispatchedAsync │ 1 │ + * │ opsDispatchedAsyncUnref │ 0 │ + * │ opsCompleted │ 3 │ + * │ opsCompletedSync │ 2 │ + * │ opsCompletedAsync │ 1 │ + * │ opsCompletedAsyncUnref │ 0 │ + * │ bytesSentControl │ 73 │ + * │ bytesSentData │ 0 │ + * │ bytesReceived │ 375 │ + * └─────────────────────────┴────────┘ + * ``` + * + * @category Observability + * @deprecated {@linkcode Deno.metrics} will be removed in v2.0.0. + */ + export function metrics(): Metrics; + /** + * Reflects the `NO_COLOR` environment variable at program start. + * + * When the value is `true`, the Deno CLI will attempt to not send color codes + * to `stderr` or `stdout` and other command line programs should also attempt + * to respect this value. + * + * See: https://no-color.org/ + * + * @category Runtime Environment + */ + export const noColor: boolean; + /** + * Deno's permission management API. + * + * It is a singleton instance of the {@linkcode Permissions} object and is + * based on the web platform + * [Permissions API](https://developer.mozilla.org/en-US/docs/Web/API/Permissions_API), + * though some proposed parts of the API which are useful in a server side + * runtime context were removed or abandoned in the web platform specification + * which is why it was chosen to locate it in the {@linkcode Deno} namespace + * instead. + * + * By default, if the `stdin`/`stdout` is TTY for the Deno CLI (meaning it can + * send and receive text), then the CLI will prompt the user to grant + * permission when an un-granted permission is requested. This behavior can + * be changed by using the `--no-prompt` command at startup. When prompting + * the CLI will request the narrowest permission possible, potentially making + * it annoying to the user. The permissions APIs allow the code author to + * request a wider set of permissions at one time in order to provide a better + * user experience. + * + * Requesting already granted permissions will not prompt the user and will + * return that the permission was granted. + * + * ### Querying + * + * ```ts + * const status = await Deno.permissions.query({ name: "read", path: "/etc" }); + * console.log(status.state); + * ``` + * + * ```ts + * const status = Deno.permissions.querySync({ name: "read", path: "/etc" }); + * console.log(status.state); + * ``` + * + * ### Revoking + * + * ```ts + * import { assert } from "https://deno.land/std/assert/mod.ts"; + * + * const status = await Deno.permissions.revoke({ name: "run" }); + * assert(status.state !== "granted") + * ``` + * + * ```ts + * import { assert } from "https://deno.land/std/assert/mod.ts"; + * + * const status = Deno.permissions.revokeSync({ name: "run" }); + * assert(status.state !== "granted") + * ``` + * + * ### Requesting + * + * ```ts + * const status = await Deno.permissions.request({ name: "env" }); + * if (status.state === "granted") { + * console.log("'env' permission is granted."); + * } else { + * console.log("'env' permission is denied."); + * } + * ``` + * + * ```ts + * const status = Deno.permissions.requestSync({ name: "env" }); + * if (status.state === "granted") { + * console.log("'env' permission is granted."); + * } else { + * console.log("'env' permission is denied."); + * } + * ``` + * + * @category Permissions + */ + export const permissions: Permissions; + /** + * The current process ID of this instance of the Deno CLI. + * + * ```ts + * console.log(Deno.pid); + * ``` + * + * @category Runtime Environment + */ + export const pid: number; + /** + * The process ID of parent process of this instance of the Deno CLI. + * + * ```ts + * console.log(Deno.ppid); + * ``` + * + * @category Runtime Environment + */ + export const ppid: number; + /** + * Returns a map of open resource IDs (_rid_) along with their string + * representations. This is an internal API and as such resource + * representation has `unknown` type; that means it can change any time and + * should not be depended upon. + * + * ```ts + * console.log(Deno.resources()); + * // { 0: "stdin", 1: "stdout", 2: "stderr" } + * Deno.openSync('../test.file'); + * console.log(Deno.resources()); + * // { 0: "stdin", 1: "stdout", 2: "stderr", 3: "fsFile" } + * ``` + * + * @deprecated {@linkcode Deno.resources} will be removed in Deno 2.0. + * @category Observability + */ + export function resources(): ResourceMap; + /** + * Version information related to the current Deno CLI runtime environment. + * + * Users are discouraged from code branching based on this information, as + * assumptions about what is available in what build environment might change + * over time. Developers should specifically sniff out the features they + * intend to use. + * + * The intended use for the information is for logging and debugging purposes. + * + * @category Runtime Environment + */ + export const version: { + /** Deno CLI's version. For example: `"1.26.0"`. */ + deno: string; + /** The V8 version used by Deno. For example: `"10.7.100.0"`. + * + * V8 is the underlying JavaScript runtime platform that Deno is built on + * top of. */ + v8: string; + /** The TypeScript version used by Deno. For example: `"4.8.3"`. + * + * A version of the TypeScript type checker and language server is built-in + * to the Deno CLI. */ + typescript: string; + }; + /** + * A reference to `stdin` which can be used to read directly from `stdin`. + * It implements the Deno specific {@linkcode Reader}, {@linkcode ReaderSync}, + * and {@linkcode Closer} interfaces as well as provides a + * {@linkcode ReadableStream} interface. + * + * ### Reading chunks from the readable stream + * + * ```ts + * const decoder = new TextDecoder(); + * for await (const chunk of Deno.stdin.readable) { + * const text = decoder.decode(chunk); + * // do something with the text + * } + * ``` + * + * @category I/O + */ + export const stdin: Reader & ReaderSync & Closer & { + /** + * The resource ID assigned to `stdin`. This can be used with the discreet + * I/O functions in the `Deno` namespace. + * + * @deprecated Use {@linkcode Deno.stdin} instance methods instead. + * {@linkcode Deno.stdin.rid} will be removed in Deno 2.0. + */ + readonly rid: number; + /** A readable stream interface to `stdin`. */ + readonly readable: ReadableStream; + /** + * Set TTY to be under raw mode or not. In raw mode, characters are read and + * returned as is, without being processed. All special processing of + * characters by the terminal is disabled, including echoing input + * characters. Reading from a TTY device in raw mode is faster than reading + * from a TTY device in canonical mode. + * + * ```ts + * Deno.stdin.setRaw(true, { cbreak: true }); + * ``` + * + * @category I/O + */ + setRaw(mode: boolean, options?: SetRawOptions): void; + /** + * Checks if `stdin` is a TTY (terminal). + * + * ```ts + * // This example is system and context specific + * Deno.stdin.isTerminal(); // true + * ``` + * + * @category I/O + */ + isTerminal(): boolean; + }; + /** + * A reference to `stdout` which can be used to write directly to `stdout`. + * It implements the Deno specific {@linkcode Writer}, {@linkcode WriterSync}, + * and {@linkcode Closer} interfaces as well as provides a + * {@linkcode WritableStream} interface. + * + * These are low level constructs, and the {@linkcode console} interface is a + * more straight forward way to interact with `stdout` and `stderr`. + * + * @category I/O + */ + export const stdout: Writer & WriterSync & Closer & { + /** + * The resource ID assigned to `stdout`. This can be used with the discreet + * I/O functions in the `Deno` namespace. + * + * @deprecated Use {@linkcode Deno.stdout} instance methods instead. + * {@linkcode Deno.stdout.rid} will be removed in Deno 2.0. + */ + readonly rid: number; + /** A writable stream interface to `stdout`. */ + readonly writable: WritableStream; + /** + * Checks if `stdout` is a TTY (terminal). + * + * ```ts + * // This example is system and context specific + * Deno.stdout.isTerminal(); // true + * ``` + * + * @category I/O + */ + isTerminal(): boolean; + }; + /** + * A reference to `stderr` which can be used to write directly to `stderr`. + * It implements the Deno specific {@linkcode Writer}, {@linkcode WriterSync}, + * and {@linkcode Closer} interfaces as well as provides a + * {@linkcode WritableStream} interface. + * + * These are low level constructs, and the {@linkcode console} interface is a + * more straight forward way to interact with `stdout` and `stderr`. + * + * @category I/O + */ + export const stderr: Writer & WriterSync & Closer & { + /** + * The resource ID assigned to `stderr`. This can be used with the discreet + * I/O functions in the `Deno` namespace. + * + * @deprecated Use {@linkcode Deno.stderr} instance methods instead. + * {@linkcode Deno.stderr.rid} will be removed in Deno 2.0. + */ + readonly rid: number; + /** A writable stream interface to `stderr`. */ + readonly writable: WritableStream; + /** + * Checks if `stderr` is a TTY (terminal). + * + * ```ts + * // This example is system and context specific + * Deno.stderr.isTerminal(); // true + * ``` + * + * @category I/O + */ + isTerminal(): boolean; + }; +} + +declare module "@deno/shim-deno/test-internals" { + type TestDefinition = Deno.TestDefinition; + /** Reference to the array that `Deno.test` calls insert their definition into. */ + export const testDefinitions: TestDefinition[]; +} + +declare global { + interface SymbolConstructor { + readonly asyncDispose: unique symbol; + readonly dispose: unique symbol; + } +} + +type MessagePort = typeof globalThis["MessagePort"]; diff --git a/action/node_modules/@deno/shim-deno/dist/index.js b/action/node_modules/@deno/shim-deno/dist/index.js deleted file mode 100644 index 6f6daa5b..00000000 --- a/action/node_modules/@deno/shim-deno/dist/index.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Deno = void 0; -exports.Deno = __importStar(require("./deno.js")); diff --git a/action/node_modules/@deno/shim-deno/dist/index.mjs b/action/node_modules/@deno/shim-deno/dist/index.mjs new file mode 100644 index 00000000..37ead555 --- /dev/null +++ b/action/node_modules/@deno/shim-deno/dist/index.mjs @@ -0,0 +1,2052 @@ +var __defProp = Object.defineProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; + +// dist/esm/deno/stable/main.js +var main_exports = {}; +__export(main_exports, { + File: () => File, + FsFile: () => FsFile, + PermissionStatus: () => PermissionStatus, + Permissions: () => Permissions, + Process: () => Process, + SeekMode: () => SeekMode, + addSignalListener: () => addSignalListener, + args: () => args, + build: () => build, + chdir: () => chdir, + chmod: () => chmod2, + chmodSync: () => chmodSync2, + chown: () => chown2, + chownSync: () => chownSync2, + close: () => close, + connect: () => connect, + connectTls: () => connectTls, + consoleSize: () => consoleSize, + copy: () => copy, + copyFile: () => copyFile2, + copyFileSync: () => copyFileSync2, + create: () => create, + createSync: () => createSync, + customInspect: () => customInspect, + cwd: () => cwd, + env: () => env, + errors: () => errors_exports, + execPath: () => execPath, + exit: () => exit, + fdatasync: () => fdatasync, + fdatasyncSync: () => fdatasyncSync, + fstat: () => fstat2, + fstatSync: () => fstatSync, + fsync: () => fsync, + fsyncSync: () => fsyncSync, + ftruncate: () => ftruncate, + ftruncateSync: () => ftruncateSync, + futime: () => futime, + futimeSync: () => futimeSync, + gid: () => gid, + hostname: () => hostname2, + inspect: () => inspect2, + isatty: () => isatty, + kill: () => kill, + link: () => link2, + linkSync: () => linkSync2, + listen: () => listen, + listenTls: () => listenTls, + loadavg: () => loadavg2, + lstat: () => lstat2, + lstatSync: () => lstatSync2, + mainModule: () => mainModule, + makeTempDir: () => makeTempDir, + makeTempDirSync: () => makeTempDirSync, + makeTempFile: () => makeTempFile, + makeTempFileSync: () => makeTempFileSync, + memoryUsage: () => memoryUsage, + metrics: () => metrics, + mkdir: () => mkdir, + mkdirSync: () => mkdirSync2, + noColor: () => noColor, + open: () => open, + openSync: () => openSync, + osRelease: () => osRelease, + osUptime: () => osUptime, + permissions: () => permissions, + pid: () => pid, + ppid: () => ppid, + read: () => read, + readDir: () => readDir, + readDirSync: () => readDirSync, + readFile: () => readFile2, + readFileSync: () => readFileSync2, + readLink: () => readLink, + readLinkSync: () => readLinkSync, + readSync: () => readSync2, + readTextFile: () => readTextFile, + readTextFileSync: () => readTextFileSync, + realPath: () => realPath, + realPathSync: () => realPathSync, + remove: () => remove, + removeSignalListener: () => removeSignalListener, + removeSync: () => removeSync, + rename: () => rename, + renameSync: () => renameSync2, + resolveDns: () => resolveDns, + resources: () => resources, + run: () => run, + shutdown: () => shutdown, + stat: () => stat, + statSync: () => statSync2, + stderr: () => stderr, + stdin: () => stdin, + stdout: () => stdout, + symlink: () => symlink2, + symlinkSync: () => symlinkSync2, + test: () => test, + truncate: () => truncate2, + truncateSync: () => truncateSync2, + uid: () => uid, + utime: () => utime, + utimeSync: () => utimeSync, + version: () => version, + watchFs: () => watchFs, + write: () => write2, + writeFile: () => writeFile3, + writeFileSync: () => writeFileSync2, + writeSync: () => writeSync2, + writeTextFile: () => writeTextFile, + writeTextFileSync: () => writeTextFileSync +}); + +// dist/esm/deno/stable/classes/FsFile.js +import * as fs5 from "fs"; +import * as stream from "stream"; + +// dist/esm/deno/stable/functions/fstat.js +import * as fs from "fs"; +import { promisify } from "util"; + +// dist/esm/deno/stable/functions/stat.js +import { stat as nodeStat } from "fs/promises"; +import * as os from "os"; + +// dist/esm/deno/stable/variables/errors.js +var errors_exports = {}; +__export(errors_exports, { + AddrInUse: () => AddrInUse, + AddrNotAvailable: () => AddrNotAvailable, + AlreadyExists: () => AlreadyExists, + BadResource: () => BadResource, + BrokenPipe: () => BrokenPipe, + Busy: () => Busy, + ConnectionAborted: () => ConnectionAborted, + ConnectionRefused: () => ConnectionRefused, + ConnectionReset: () => ConnectionReset, + Http: () => Http, + Interrupted: () => Interrupted, + InvalidData: () => InvalidData, + NotConnected: () => NotConnected, + NotFound: () => NotFound, + PermissionDenied: () => PermissionDenied, + TimedOut: () => TimedOut, + UnexpectedEof: () => UnexpectedEof, + WriteZero: () => WriteZero +}); +var AddrInUse = class extends Error { +}; +var AddrNotAvailable = class extends Error { +}; +var AlreadyExists = class extends Error { +}; +var BadResource = class extends Error { +}; +var BrokenPipe = class extends Error { +}; +var Busy = class extends Error { +}; +var ConnectionAborted = class extends Error { +}; +var ConnectionRefused = class extends Error { +}; +var ConnectionReset = class extends Error { +}; +var Http = class extends Error { +}; +var Interrupted = class extends Error { +}; +var InvalidData = class extends Error { +}; +var NotConnected = class extends Error { +}; +var NotFound = class extends Error { + code = "ENOENT"; +}; +var PermissionDenied = class extends Error { +}; +var TimedOut = class extends Error { +}; +var UnexpectedEof = class extends Error { +}; +var WriteZero = class extends Error { +}; + +// dist/esm/deno/internal/errorMap.js +var mapper = (Ctor) => (err) => Object.assign(new Ctor(err.message), { + stack: err.stack +}); +var map = { + EEXIST: mapper(AlreadyExists), + ENOENT: mapper(NotFound), + EBADF: mapper(BadResource) +}; +var isNodeErr = (e) => { + return e instanceof Error && "code" in e; +}; +function mapError(e) { + if (!isNodeErr(e)) + return e; + return map[e.code]?.(e) || e; +} + +// dist/esm/deno/stable/functions/stat.js +var isWindows = os.platform() === "win32"; +function denoifyFileInfo(s) { + return { + atime: s.atime, + birthtime: s.birthtime, + blksize: isWindows ? null : s.blksize, + blocks: isWindows ? null : s.blocks, + dev: s.dev, + gid: isWindows ? null : s.gid, + ino: isWindows ? null : s.ino, + isDirectory: s.isDirectory(), + isFile: s.isFile(), + isSymlink: s.isSymbolicLink(), + isBlockDevice: isWindows ? null : s.isBlockDevice(), + isCharDevice: isWindows ? null : s.isCharacterDevice(), + isFifo: isWindows ? null : s.isFIFO(), + isSocket: isWindows ? null : s.isSocket(), + mode: isWindows ? null : s.mode, + mtime: s.mtime, + nlink: isWindows ? null : s.nlink, + rdev: isWindows ? null : s.rdev, + size: s.size, + uid: isWindows ? null : s.uid + }; +} +var stat = async (path) => { + try { + return denoifyFileInfo(await nodeStat(path)); + } catch (e) { + throw mapError(e); + } +}; + +// dist/esm/deno/stable/functions/fstat.js +var nodeFstat = promisify(fs.fstat); +var fstat2 = async function(fd) { + try { + return denoifyFileInfo(await nodeFstat(fd)); + } catch (err) { + throw mapError(err); + } +}; + +// dist/esm/deno/stable/functions/fstatSync.js +import { fstatSync as nodeFstatSync } from "fs"; +var fstatSync = function fstatSync2(fd) { + try { + return denoifyFileInfo(nodeFstatSync(fd)); + } catch (err) { + throw mapError(err); + } +}; + +// dist/esm/deno/stable/functions/ftruncate.js +import { ftruncate as nodeftruncate } from "fs"; +import { promisify as promisify2 } from "util"; +var _ftruncate = promisify2(nodeftruncate); +var ftruncate = _ftruncate; + +// dist/esm/deno/stable/functions/ftruncateSync.js +import { ftruncateSync as nodeftruncateSync } from "fs"; +var ftruncateSync = nodeftruncateSync; + +// dist/esm/deno/stable/functions/fdatasync.js +import { fdatasync as nodefdatasync } from "fs"; +import { promisify as promisify3 } from "util"; +var _fdatasync = promisify3(nodefdatasync); +var fdatasync = _fdatasync; + +// dist/esm/deno/stable/functions/fdatasyncSync.js +import { fdatasyncSync as nodefdatasyncSync } from "fs"; +var fdatasyncSync = nodefdatasyncSync; + +// dist/esm/deno/stable/functions/read.js +import { promisify as promisify4 } from "util"; +import { read as nodeRead } from "fs"; +var _read = promisify4(nodeRead); +var read = async function read2(rid, buffer) { + if (buffer == null) { + throw new TypeError("Buffer must not be null."); + } + if (buffer.length === 0) { + return 0; + } + const { bytesRead } = await _read(rid, buffer, 0, buffer.length, null); + return bytesRead === 0 ? null : bytesRead; +}; + +// dist/esm/deno/stable/functions/readSync.js +import * as fs2 from "fs"; +var readSync2 = (fd, buffer) => { + const bytesRead = fs2.readSync(fd, buffer); + return bytesRead === 0 ? null : bytesRead; +}; + +// dist/esm/deno/stable/functions/write.js +import * as fs3 from "fs"; +import { promisify as promisify5 } from "util"; +var nodeWrite = promisify5(fs3.write); +var write2 = async (fd, data) => { + const { bytesWritten } = await nodeWrite(fd, data); + return bytesWritten; +}; + +// dist/esm/deno/stable/functions/writeSync.js +import * as fs4 from "fs"; +var writeSync2 = fs4.writeSync; + +// dist/esm/deno/stable/classes/FsFile.js +Symbol.dispose ??= Symbol("Symbol.dispose"); +Symbol.asyncDispose ??= Symbol("Symbol.asyncDispose"); +var FsFile = class { + rid; + #closed = false; + constructor(rid) { + this.rid = rid; + } + [Symbol.dispose]() { + if (!this.#closed) { + this.close(); + } + } + async write(p) { + return await write2(this.rid, p); + } + writeSync(p) { + return writeSync2(this.rid, p); + } + async truncate(len) { + await ftruncate(this.rid, len); + } + truncateSync(len) { + return ftruncateSync(this.rid, len); + } + read(p) { + return read(this.rid, p); + } + readSync(p) { + return readSync2(this.rid, p); + } + seek(_offset, _whence) { + throw new Error("Method not implemented."); + } + seekSync(_offset, _whence) { + throw new Error("Method not implemented."); + } + async stat() { + return await fstat2(this.rid); + } + statSync() { + return fstatSync(this.rid); + } + sync() { + throw new Error("Method not implemented."); + } + syncSync() { + throw new Error("Method not implemented."); + } + syncData() { + return fdatasync(this.rid); + } + syncDataSync() { + return fdatasyncSync(this.rid); + } + utime(_atime, _mtime) { + throw new Error("Method not implemented."); + } + utimeSync(_atime, _mtime) { + throw new Error("Method not implemented."); + } + close() { + this.#closed = true; + fs5.closeSync(this.rid); + } + #readableStream; + get readable() { + if (this.#readableStream == null) { + const nodeStream = fs5.createReadStream(null, { + fd: this.rid, + autoClose: false + }); + this.#readableStream = stream.Readable.toWeb(nodeStream); + } + return this.#readableStream; + } + #writableStream; + get writable() { + if (this.#writableStream == null) { + const nodeStream = fs5.createWriteStream(null, { + fd: this.rid, + autoClose: false + }); + this.#writableStream = stream.Writable.toWeb(nodeStream); + } + return this.#writableStream; + } +}; +var File = FsFile; + +// dist/esm/deno/stable/classes/PermissionStatus.js +var PermissionStatus = class extends EventTarget { + state; + onchange = null; + partial = false; + /** @internal */ + constructor(state) { + super(); + this.state = state; + } +}; + +// dist/esm/deno/stable/classes/Permissions.js +var Permissions = class { + query(desc) { + return Promise.resolve(this.querySync(desc)); + } + querySync(_desc) { + return new PermissionStatus("granted"); + } + revoke(desc) { + return Promise.resolve(this.revokeSync(desc)); + } + revokeSync(_desc) { + return new PermissionStatus("denied"); + } + request(desc) { + return this.query(desc); + } + requestSync(desc) { + return this.querySync(desc); + } +}; + +// dist/esm/deno/stable/enums/SeekMode.js +var SeekMode; +(function(SeekMode2) { + SeekMode2[SeekMode2["Start"] = 0] = "Start"; + SeekMode2[SeekMode2["Current"] = 1] = "Current"; + SeekMode2[SeekMode2["End"] = 2] = "End"; +})(SeekMode || (SeekMode = {})); + +// dist/esm/deno/stable/functions.js +import fs34 from "fs"; + +// dist/esm/deno/stable/variables/build.js +import * as os2 from "os"; +var arch = process.arch === "arm64" ? "aarch64" : "x86_64"; +var build = { + arch, + os: /* @__PURE__ */ ((p) => p === "win32" ? "windows" : p === "darwin" ? "darwin" : "linux")(os2.platform()), + vendor: "pc", + target: ((p) => p === "win32" ? `${arch}-pc-windows-msvc` : p === "darwin" ? `${arch}-apple-darwin` : `${arch}-unknown-linux-gnu`)(os2.platform()) +}; + +// dist/esm/deno/stable/variables/customInspect.js +var customInspect = Symbol.for("nodejs.util.inspect.custom"); + +// dist/esm/deno/stable/variables/env.js +var env = { + get(key) { + assertValidKey(key); + return process.env[key]; + }, + set(key, value) { + assertValidKey(key); + assertValidValue(value); + process.env[key] = value; + }, + has(key) { + assertValidKey(key); + return key in process.env; + }, + delete(key) { + assertValidKey(key); + delete process.env[key]; + }, + // @ts-expect-error https://github.com/denoland/deno/issues/10267 + toObject() { + return { ...process.env }; + } +}; +var invalidKeyChars = ["=", "\0"].map((c) => c.charCodeAt(0)); +var invalidValueChar = "\0".charCodeAt(0); +function assertValidKey(key) { + if (key.length === 0) { + throw new TypeError("Key is an empty string."); + } + for (let i = 0; i < key.length; i++) { + if (invalidKeyChars.includes(key.charCodeAt(i))) { + const char = key.charCodeAt(i) === "\0".charCodeAt(0) ? "\\0" : key[i]; + throw new TypeError(`Key contains invalid characters: "${char}"`); + } + } +} +function assertValidValue(value) { + for (let i = 0; i < value.length; i++) { + if (value.charCodeAt(i) === invalidValueChar) { + throw new TypeError('Value contains invalid characters: "\\0"'); + } + } +} + +// dist/esm/deno/stable/variables/mainModule.js +import { join } from "path"; +import { pathToFileURL } from "url"; +var mainModule = pathToFileURL(process.argv[1] ?? join(process.cwd(), "$deno$repl.ts")).href; + +// dist/esm/deno/stable/variables/metrics.js +var metrics = function metrics2() { + return { + opsDispatched: 0, + opsDispatchedSync: 0, + opsDispatchedAsync: 0, + opsDispatchedAsyncUnref: 0, + opsCompleted: 0, + opsCompletedSync: 0, + opsCompletedAsync: 0, + opsCompletedAsyncUnref: 0, + bytesSentControl: 0, + bytesSentData: 0, + bytesReceived: 0, + ops: {} + }; +}; + +// dist/esm/deno/stable/variables/noColor.js +var noColor = process.env.NO_COLOR !== void 0; + +// dist/esm/deno/stable/variables/permissions.js +var permissions = new Permissions(); + +// dist/esm/deno/stable/variables/pid.js +var pid = process.pid; + +// dist/esm/deno/stable/variables/ppid.js +var ppid = process.ppid; + +// dist/esm/deno/stable/variables/resources.js +var resources = function resources2() { + console.warn([ + "Deno.resources() shim returns a dummy object that does not update.", + "If you think this is a mistake, raise an issue at https://github.com/denoland/node_deno_shims/issues" + ].join("\n")); + return {}; +}; + +// dist/esm/deno/stable/variables/std.js +import stream2 from "stream"; +import tty from "tty"; +function chain(fn, cleanup) { + let prev; + return function _fn(...args2) { + const curr = (prev || Promise.resolve()).then(() => fn(...args2)).finally(cleanup || (() => { + })).then((result) => { + if (prev === curr) + prev = void 0; + return result; + }); + return prev = curr; + }; +} +var stdinReadable; +var stdin = { + rid: 0, + isTerminal() { + return tty.isatty(this.rid); + }, + read: chain((p) => { + return new Promise((resolve2, reject) => { + process.stdin.resume(); + process.stdin.on("error", onerror); + process.stdin.once("readable", () => { + process.stdin.off("error", onerror); + const data = process.stdin.read(p.length) ?? process.stdin.read(); + if (data) { + p.set(data); + resolve2(data.length > 0 ? data.length : null); + } else { + resolve2(null); + } + }); + function onerror(error) { + reject(error); + process.stdin.off("error", onerror); + } + }); + }, () => process.stdin.pause()), + get readable() { + if (stdinReadable == null) { + stdinReadable = stream2.Readable.toWeb(process.stdin); + } + return stdinReadable; + }, + readSync(buffer) { + return readSync2(this.rid, buffer); + }, + close() { + process.stdin.destroy(); + }, + setRaw(mode, options) { + if (options?.cbreak) { + throw new Error("The cbreak option is not implemented."); + } + process.stdin.setRawMode(mode); + } +}; +var stdoutWritable; +var stdout = { + rid: 1, + isTerminal() { + return tty.isatty(this.rid); + }, + write: chain((p) => { + return new Promise((resolve2) => { + const result = process.stdout.write(p); + if (!result) { + process.stdout.once("drain", () => resolve2(p.length)); + } else { + resolve2(p.length); + } + }); + }), + get writable() { + if (stdoutWritable == null) { + stdoutWritable = stream2.Writable.toWeb(process.stdout); + } + return stdoutWritable; + }, + writeSync(data) { + return writeSync2(this.rid, data); + }, + close() { + process.stdout.destroy(); + } +}; +var stderrWritable; +var stderr = { + rid: 2, + isTerminal() { + return tty.isatty(this.rid); + }, + write: chain((p) => { + return new Promise((resolve2) => { + const result = process.stderr.write(p); + if (!result) { + process.stderr.once("drain", () => resolve2(p.length)); + } else { + resolve2(p.length); + } + }); + }), + get writable() { + if (stderrWritable == null) { + stderrWritable = stream2.Writable.toWeb(process.stderr); + } + return stderrWritable; + }, + writeSync(data) { + return writeSync2(this.rid, data); + }, + close() { + process.stderr.destroy(); + } +}; + +// dist/esm/deno/internal/version.js +var deno = "1.40.2"; +var typescript = "5.3.3"; + +// dist/esm/deno/stable/variables/version.js +var version = { + deno, + typescript, + v8: process.versions.v8 +}; + +// dist/esm/deno/stable/functions.js +import { isatty } from "tty"; + +// dist/esm/deno/stable/functions/addSignalListener.js +import ps from "process"; +function denoSignalToNodeJs(signal) { + if (signal === "SIGEMT") { + throw new Error("SIGEMT is not supported"); + } + return signal; +} +var addSignalListener = (signal, handler) => { + ps.addListener(denoSignalToNodeJs(signal), handler); +}; + +// dist/esm/deno/stable/functions/chdir.js +import { fileURLToPath } from "url"; +var chdir = function(path) { + try { + return process.chdir(path instanceof URL ? fileURLToPath(path) : path); + } catch (error) { + if (error?.code === "ENOENT") { + throw new errors_exports.NotFound(`No such file or directory (os error 2), chdir '${path}'`); + } + throw mapError(error); + } +}; + +// dist/esm/deno/stable/functions/chmod.js +import * as fs6 from "fs/promises"; +var chmod2 = fs6.chmod; + +// dist/esm/deno/stable/functions/chmodSync.js +import * as fs7 from "fs"; +var chmodSync2 = fs7.chmodSync; + +// dist/esm/deno/stable/functions/chown.js +import * as fs8 from "fs/promises"; +var chown2 = async (path, uid2, gid2) => await fs8.chown(path, uid2 ?? -1, gid2 ?? -1); + +// dist/esm/deno/stable/functions/chownSync.js +import * as fs9 from "fs"; +var chownSync2 = (path, uid2, gid2) => fs9.chownSync(path, uid2 ?? -1, gid2 ?? -1); + +// dist/esm/deno/stable/functions/close.js +import * as fs10 from "fs"; +var close = fs10.closeSync; + +// dist/esm/deno/stable/functions/connect.js +import { createConnection } from "net"; + +// dist/esm/deno/internal/Conn.js +import { Socket } from "net"; +import { once } from "events"; +var Conn = class extends FsFile { + rid; + localAddr; + remoteAddr; + #socket; + constructor(rid, localAddr, remoteAddr, socket) { + super(rid); + this.rid = rid; + this.localAddr = localAddr; + this.remoteAddr = remoteAddr; + this.#socket = socket || new Socket({ fd: rid }); + } + [Symbol.dispose]() { + this.close(); + } + async closeWrite() { + await new Promise((resolve2) => this.#socket.end(resolve2)); + } + setNoDelay(enable) { + this.#socket.setNoDelay(enable); + } + setKeepAlive(enable) { + this.#socket.setKeepAlive(enable); + } + ref() { + this.#socket.ref(); + } + unref() { + this.#socket.unref(); + } + async read(p) { + try { + return await super.read(p); + } catch (error) { + if (!(error instanceof Error && "code" in error && error.code == "EAGAIN")) { + throw error; + } + } + await once(this.#socket, "readable"); + return await super.read(p); + } +}; +var TlsConn = class extends Conn { + handshake() { + console.warn("@deno/shim-deno: Handshake is not supported."); + return Promise.resolve({ + alpnProtocol: null + }); + } +}; + +// dist/esm/deno/stable/functions/connect.js +var connect = function connect2(options) { + if (options.transport === "unix") { + throw new Error("Unstable UnixConnectOptions is not implemented"); + } + const { transport = "tcp", hostname: hostname4 = "127.0.0.1", port } = options; + if (transport !== "tcp") { + throw new Error("Deno.connect is only implemented for transport: tcp"); + } + const socket = createConnection({ port, host: hostname4 }); + socket.on("error", (err) => console.error(err)); + return new Promise((resolve2) => { + socket.once("connect", () => { + const rid = socket._handle.fd; + const localAddr = { + // cannot be undefined while socket is connected + hostname: socket.localAddress, + port: socket.localPort, + transport: "tcp" + }; + const remoteAddr = { + // cannot be undefined while socket is connected + hostname: socket.remoteAddress, + port: socket.remotePort, + transport: "tcp" + }; + resolve2(new Conn(rid, localAddr, remoteAddr, socket)); + }); + }); +}; + +// dist/esm/deno/stable/functions/connectTls.js +import { connect as tlsConnect } from "tls"; + +// dist/esm/deno/stable/functions/readTextFile.js +import { readFile } from "fs/promises"; +var readTextFile = async (path, { signal } = {}) => { + try { + return await readFile(path, { encoding: "utf8", signal }); + } catch (e) { + throw mapError(e); + } +}; + +// dist/esm/deno/stable/functions/connectTls.js +var connectTls = async function connectTls2({ port, hostname: hostname4 = "127.0.0.1", certFile }) { + const cert = certFile && await readTextFile(certFile); + const socket = tlsConnect({ port, host: hostname4, cert }); + return new Promise((resolve2) => { + socket.on("connect", () => { + const rid = socket._handle.fd; + const localAddr = { + // cannot be undefined while socket is connected + hostname: socket.localAddress, + port: socket.localPort, + transport: "tcp" + }; + const remoteAddr = { + // cannot be undefined while socket is connected + hostname: socket.remoteAddress, + port: socket.remotePort, + transport: "tcp" + }; + resolve2(new TlsConn(rid, localAddr, remoteAddr, socket)); + }); + }); +}; + +// dist/esm/deno/stable/functions/consoleSize.js +var consoleSize = function consoleSize2() { + const pipes = [process.stderr, process.stdout]; + for (const pipe of pipes) { + if (pipe.columns != null) { + const { columns, rows } = pipe; + return { columns, rows }; + } + } + throw new Error("The handle is invalid."); +}; + +// dist/esm/deno/internal/consts.js +var DEFAULT_BUFFER_SIZE = 32 * 1024; + +// dist/esm/deno/stable/functions/copy.js +var copy = async function copy2(src, dst, options) { + let n = 0; + const bufSize = options?.bufSize ?? DEFAULT_BUFFER_SIZE; + const b = new Uint8Array(bufSize); + let gotEOF = false; + while (gotEOF === false) { + const result = await src.read(b); + if (result === null) { + gotEOF = true; + } else { + let nwritten = 0; + while (nwritten < result) { + nwritten += await dst.write(b.subarray(nwritten, result)); + } + n += nwritten; + } + } + return n; +}; + +// dist/esm/deno/stable/functions/copyFile.js +import * as fs11 from "fs/promises"; +var copyFile2 = async (src, dest) => { + try { + await fs11.copyFile(src, dest); + } catch (error) { + if (error?.code === "ENOENT") { + throw new NotFound(`File not found, copy '${src}' -> '${dest}'`); + } + throw mapError(error); + } +}; + +// dist/esm/deno/stable/functions/copyFileSync.js +import * as fs12 from "fs"; +var copyFileSync2 = (src, dest) => { + try { + fs12.copyFileSync(src, dest); + } catch (error) { + if (error?.code === "ENOENT") { + throw new NotFound(`File not found, copy '${src}' -> '${dest}'`); + } + throw mapError(error); + } +}; + +// dist/esm/deno/stable/functions/open.js +import { open as _open } from "fs"; +import { promisify as promisify6 } from "util"; + +// dist/esm/deno/internal/fs_flags.js +import { constants } from "fs"; +import os3 from "os"; +var { O_APPEND, O_CREAT, O_EXCL, O_RDONLY, O_RDWR, O_TRUNC, O_WRONLY } = constants; +function getAccessFlag(opts) { + if (opts.read && !opts.write && !opts.append) + return O_RDONLY; + if (!opts.read && opts.write && !opts.append) + return O_WRONLY; + if (opts.read && opts.write && !opts.append) + return O_RDWR; + if (!opts.read && opts.append) + return O_WRONLY | O_APPEND; + if (opts.read && opts.append) + return O_RDWR | O_APPEND; + if (!opts.read && !opts.write && !opts.append) { + throw new BadResource("EINVAL: One of 'read', 'write', 'append' is required to open file."); + } + throw new BadResource("EINVAL: Invalid fs flags."); +} +function getCreationFlag(opts) { + if (!opts.write && !opts.append) { + if (opts.truncate || opts.create || opts.createNew) { + throw new BadResource("EINVAL: One of 'write', 'append' is required to 'truncate', 'create' or 'createNew' file."); + } + } + if (opts.append) { + if (opts.truncate && !opts.createNew) { + throw new BadResource("EINVAL: unexpected 'truncate': true and 'createNew': false when 'append' is true."); + } + } + if (!opts.create && !opts.truncate && !opts.createNew) + return 0; + if (opts.create && !opts.truncate && !opts.createNew) + return O_CREAT; + if (!opts.create && opts.truncate && !opts.createNew) { + if (os3.platform() === "win32") { + return O_CREAT | O_TRUNC; + } else { + return O_TRUNC; + } + } + if (opts.create && opts.truncate && !opts.createNew) { + return O_CREAT | O_TRUNC; + } + if (opts.createNew) + return O_CREAT | O_EXCL; + throw new BadResource("EINVAL: Invalid fs flags."); +} +function getFsFlag(flags) { + return getAccessFlag(flags) | getCreationFlag(flags); +} + +// dist/esm/deno/stable/functions/open.js +var nodeOpen = promisify6(_open); +var open = async function open2(path, { read: read3, write: write3, append, truncate: truncate3, create: create3, createNew, mode = 438 } = { + read: true +}) { + const flagMode = getFsFlag({ + read: read3, + write: write3, + append, + truncate: truncate3, + create: create3, + createNew + }); + try { + const fd = await nodeOpen(path, flagMode, mode); + return new File(fd); + } catch (err) { + throw mapError(err); + } +}; + +// dist/esm/deno/stable/functions/create.js +var create = async function create2(path) { + return await open(path, { write: true, create: true, truncate: true }); +}; + +// dist/esm/deno/stable/functions/openSync.js +import { openSync as nodeOpenSync } from "fs"; +var openSync = function openSync2(path, { read: read3, write: write3, append, truncate: truncate3, create: create3, createNew, mode = 438 } = { + read: true +}) { + const flagMode = getFsFlag({ + read: read3, + write: write3, + append, + truncate: truncate3, + create: create3, + createNew + }); + try { + const fd = nodeOpenSync(path, flagMode, mode); + return new File(fd); + } catch (err) { + throw mapError(err); + } +}; + +// dist/esm/deno/stable/functions/createSync.js +var createSync = function createSync2(path) { + return openSync(path, { + create: true, + truncate: true, + read: true, + write: true + }); +}; + +// dist/esm/deno/stable/functions/cwd.js +var cwd = process.cwd; + +// dist/esm/deno/stable/functions/execPath.js +import which from "which"; +var execPath = () => which.sync("deno"); + +// dist/esm/deno/stable/functions/exit.js +var exit = function exit2(code) { + return process.exit(code); +}; + +// dist/esm/deno/stable/functions/fsync.js +import { fsync as nodeFsync } from "fs"; +import { promisify as promisify7 } from "util"; +var fsync = function fsync2(rid) { + return promisify7(nodeFsync)(rid); +}; + +// dist/esm/deno/stable/functions/fsyncSync.js +import { fsyncSync as nodeFsyncSync } from "fs"; +var fsyncSync = function fsyncSync2(rid) { + return nodeFsyncSync(rid); +}; + +// dist/esm/deno/stable/functions/gid.js +import ps2 from "process"; +var gid = ps2.getgid ?? (() => null); + +// dist/esm/deno/stable/functions/hostname.js +import * as os4 from "os"; +var hostname2 = function hostname3() { + return os4.hostname(); +}; + +// dist/esm/deno/stable/functions/inspect.js +import * as util from "util"; +var inspect2 = (value, options = {}) => util.inspect(value, options); + +// dist/esm/deno/stable/functions/kill.js +import os5 from "os"; +import ps3 from "process"; +var kill = function(pid2, signo) { + if (pid2 < 0 && os5.platform() === "win32") { + throw new TypeError("Invalid pid"); + } + ps3.kill(pid2, signo); +}; + +// dist/esm/deno/stable/functions/link.js +import * as fs13 from "fs/promises"; +var link2 = fs13.link; + +// dist/esm/deno/stable/functions/linkSync.js +import * as fs14 from "fs"; +var linkSync2 = fs14.linkSync; + +// dist/esm/deno/stable/functions/listen.js +import { createServer } from "net"; + +// dist/esm/deno/internal/Listener.js +var Listener = class { + rid; + addr; + #listener; + constructor(rid, addr, listener) { + this.rid = rid; + this.addr = addr; + this.#listener = listener; + } + [Symbol.dispose]() { + this.close(); + } + async accept() { + if (!this.#listener) { + throw new BadResource("Listener not initialised"); + } + const result = await this.#listener.next(); + if (result.done) { + throw new BadResource("Server not listening"); + } + return result.value; + } + async next() { + let conn; + try { + conn = await this.accept(); + } catch (error) { + if (error instanceof BadResource) { + return { value: void 0, done: true }; + } + throw error; + } + return { value: conn, done: false }; + } + return(value) { + this.close(); + return Promise.resolve({ value, done: true }); + } + close() { + close(this.rid); + } + ref() { + throw new Error("Not implemented"); + } + unref() { + throw new Error("Not implemented"); + } + [Symbol.asyncIterator]() { + return this; + } +}; + +// dist/esm/deno/stable/functions/listen.js +async function* _listen(server, waitFor) { + await waitFor; + while (server.listening) { + yield new Promise((resolve2) => server.once("connection", (socket) => { + socket.on("error", (err) => console.error(err)); + const rid = socket._handle.fd; + const localAddr = { + // cannot be undefined while socket is connected + hostname: socket.localAddress, + port: socket.localPort, + transport: "tcp" + }; + const remoteAddr = { + // cannot be undefined while socket is connected + hostname: socket.remoteAddress, + port: socket.remotePort, + transport: "tcp" + }; + resolve2(new Conn(rid, localAddr, remoteAddr)); + })); + } +} +var listen = function listen2(options) { + if (options.transport === "unix") { + throw new Error("Unstable UnixListenOptions is not implemented"); + } + const { port, hostname: hostname4 = "0.0.0.0", transport = "tcp" } = options; + if (transport !== "tcp") { + throw new Error("Deno.listen is only implemented for transport: tcp"); + } + const server = createServer(); + const waitFor = new Promise((resolve2) => ( + // server._handle.fd is assigned immediately on .listen() + server.listen(port, hostname4, resolve2) + )); + const listener = new Listener(server._handle.fd, { + hostname: hostname4, + port, + transport: "tcp" + }, _listen(server, waitFor)); + return listener; +}; + +// dist/esm/deno/stable/functions/listenTls.js +import { createServer as createServer2 } from "tls"; + +// dist/esm/deno/stable/functions/readTextFileSync.js +import * as fs15 from "fs"; +var readTextFileSync = function(path) { + try { + return fs15.readFileSync(path, "utf8"); + } catch (e) { + throw mapError(e); + } +}; + +// dist/esm/deno/stable/functions/listenTls.js +async function* _listen2(server, waitFor) { + await waitFor; + while (server.listening) { + yield new Promise((resolve2) => server.once("secureConnection", (socket) => { + socket.on("error", (err) => console.error(err)); + const rid = socket._handle.fd; + const localAddr = { + // cannot be undefined while socket is connected + hostname: socket.localAddress, + port: socket.localPort, + transport: "tcp" + }; + const remoteAddr = { + // cannot be undefined while socket is connected + hostname: socket.remoteAddress, + port: socket.remotePort, + transport: "tcp" + }; + resolve2(new TlsConn(rid, localAddr, remoteAddr)); + })); + } +} +var listenTls = function listen3({ port, hostname: hostname4 = "0.0.0.0", transport = "tcp", certFile, keyFile }) { + if (transport !== "tcp") { + throw new Error("Deno.listen is only implemented for transport: tcp"); + } + const [cert, key] = [certFile, keyFile].map((f) => f == null ? void 0 : readTextFileSync(f)); + const server = createServer2({ cert, key }); + const waitFor = new Promise((resolve2) => ( + // server._handle.fd is assigned immediately on .listen() + server.listen(port, hostname4, resolve2) + )); + const listener = new Listener(server._handle.fd, { + hostname: hostname4, + port, + transport: "tcp" + }, _listen2(server, waitFor)); + return listener; +}; + +// dist/esm/deno/stable/functions/loadavg.js +import * as os6 from "os"; +var loadavg2 = function loadavg3() { + return os6.loadavg(); +}; + +// dist/esm/deno/stable/functions/lstat.js +import * as fs16 from "fs/promises"; +var lstat2 = async (path) => { + try { + return denoifyFileInfo(await fs16.lstat(path)); + } catch (e) { + throw mapError(e); + } +}; + +// dist/esm/deno/stable/functions/lstatSync.js +import * as fs17 from "fs"; +var lstatSync2 = (path) => { + try { + return denoifyFileInfo(fs17.lstatSync(path)); + } catch (err) { + throw mapError(err); + } +}; + +// dist/esm/deno/stable/functions/makeTempDir.js +import { mkdtemp } from "fs/promises"; +import { join as join2 } from "path"; +import { tmpdir } from "os"; +var makeTempDir = function makeTempDir2({ prefix = "" } = {}) { + return mkdtemp(join2(tmpdir(), prefix || "/")); +}; + +// dist/esm/deno/stable/functions/makeTempDirSync.js +import { mkdtempSync } from "fs"; +import { join as join3 } from "path"; +import { tmpdir as tmpdir2 } from "os"; +var makeTempDirSync = function makeTempDirSync2({ prefix = "" } = {}) { + return mkdtempSync(join3(tmpdir2(), prefix || "/")); +}; + +// dist/esm/deno/stable/functions/makeTempFile.js +import { tmpdir as tmpdir3 } from "os"; +import { join as join4 } from "path"; + +// dist/esm/deno/internal/random_id.js +var randomId = () => { + const n = (Math.random() * 1048575 * 1e6).toString(16); + return "" + n.slice(0, 6); +}; + +// dist/esm/deno/stable/functions/writeTextFile.js +import * as fs18 from "fs/promises"; +var writeTextFile = async function writeTextFile2(path, data, { append = false, create: create3 = true, createNew = false, mode, signal } = {}) { + const truncate3 = create3 && !append; + const flag = getFsFlag({ + append, + create: create3, + createNew, + truncate: truncate3, + write: true + }); + try { + await fs18.writeFile(path, data, { flag, mode, signal }); + if (mode !== void 0) + await fs18.chmod(path, mode); + } catch (error) { + throw mapError(error); + } +}; + +// dist/esm/deno/stable/functions/makeTempFile.js +var makeTempFile = async function makeTempFile2({ prefix = "" } = {}) { + const name = join4(tmpdir3(), prefix, randomId()); + await writeTextFile(name, ""); + return name; +}; + +// dist/esm/deno/stable/functions/makeTempFileSync.js +import { tmpdir as tmpdir4 } from "os"; +import { join as join5 } from "path"; + +// dist/esm/deno/stable/functions/writeTextFileSync.js +import * as fs19 from "fs"; +var writeTextFileSync = (path, data, { append = false, create: create3 = true, mode } = {}) => { + const flag = create3 ? append ? "a" : "w" : "r+"; + try { + fs19.writeFileSync(path, data, { flag, mode }); + if (mode !== void 0) + fs19.chmodSync(path, mode); + } catch (error) { + throw mapError(error); + } +}; + +// dist/esm/deno/stable/functions/makeTempFileSync.js +var makeTempFileSync = function makeTempFileSync2({ prefix = "" } = {}) { + const name = join5(tmpdir4(), prefix, randomId()); + writeTextFileSync(name, ""); + return name; +}; + +// dist/esm/deno/stable/functions/memoryUsage.js +var memoryUsage = process.memoryUsage; + +// dist/esm/deno/stable/functions/mkdir.js +import { mkdir as nodeMkdir } from "fs/promises"; +var mkdir = async function mkdir2(path, options) { + try { + await nodeMkdir(path, options); + } catch (error) { + if (error?.code === "EEXIST") { + throw new errors_exports.AlreadyExists(`File exists (os error 17), mkdir '${path}'`); + } + throw mapError(error); + } +}; + +// dist/esm/deno/stable/functions/mkdirSync.js +import * as fs20 from "fs"; +var mkdirSync2 = (path, options) => { + try { + fs20.mkdirSync(path, options); + } catch (error) { + if (error?.code === "EEXIST") { + throw new errors_exports.AlreadyExists(`File exists (os error 17), mkdir '${path}'`); + } + throw mapError(error); + } +}; + +// dist/esm/deno/stable/functions/osRelease.js +import { release } from "os"; +var osRelease = function osRelease2() { + return release(); +}; + +// dist/esm/deno/stable/functions/osUptime.js +import { uptime } from "os"; +var osUptime = function osUptime2() { + return uptime(); +}; + +// dist/esm/deno/stable/functions/readDir.js +import { opendir } from "fs/promises"; +var readDir = async function* readDir2(path) { + try { + for await (const e of await opendir(String(path))) { + const ent = { + name: e.name, + isFile: e.isFile(), + isDirectory: e.isDirectory(), + isSymlink: e.isSymbolicLink() + }; + yield ent; + } + } catch (e) { + throw mapError(e); + } +}; + +// dist/esm/deno/stable/functions/readDirSync.js +import { readdirSync as nodeReadDir } from "fs"; +var readDirSync = function* readDir3(path) { + try { + for (const e of nodeReadDir(String(path), { withFileTypes: true })) { + const ent = { + name: e.name, + isFile: e.isFile(), + isDirectory: e.isDirectory(), + isSymlink: e.isSymbolicLink() + }; + yield ent; + } + } catch (e) { + throw mapError(e); + } +}; + +// dist/esm/deno/stable/functions/readFile.js +import { readFile as nodeReadFile } from "fs/promises"; +var readFile2 = async function readFile3(path, { signal } = {}) { + try { + const buf = await nodeReadFile(path, { signal }); + return new Uint8Array(buf.buffer, buf.byteOffset, buf.length); + } catch (e) { + throw mapError(e); + } +}; + +// dist/esm/deno/stable/functions/readFileSync.js +import { readFileSync as nodeReadFile2 } from "fs"; +var readFileSync2 = function readFileSync3(path) { + try { + const buf = nodeReadFile2(path); + return new Uint8Array(buf.buffer, buf.byteOffset, buf.length); + } catch (e) { + throw mapError(e); + } +}; + +// dist/esm/deno/stable/functions/readLink.js +import * as fs21 from "fs/promises"; +var readLink = fs21.readlink; + +// dist/esm/deno/stable/functions/readLinkSync.js +import * as fs22 from "fs"; +var readLinkSync = fs22.readlinkSync; + +// dist/esm/deno/stable/functions/realPath.js +import * as fs23 from "fs/promises"; +var realPath = fs23.realpath; + +// dist/esm/deno/stable/functions/realPathSync.js +import * as fs24 from "fs"; +var realPathSync = fs24.realpathSync; + +// dist/esm/deno/stable/functions/remove.js +import { rm, rmdir } from "fs/promises"; +var remove = async function remove2(path, options = {}) { + const innerOptions = options.recursive ? { recursive: true, force: true } : {}; + try { + return await rm(path, innerOptions); + } catch (err) { + if (err.code === "ERR_FS_EISDIR") { + return await rmdir(path, innerOptions); + } else { + throw err; + } + } +}; + +// dist/esm/deno/stable/functions/removeSignalListener.js +import ps4 from "process"; +var removeSignalListener = (signal, handler) => { + ps4.removeListener(signal, handler); +}; + +// dist/esm/deno/stable/functions/removeSync.js +import * as fs25 from "fs"; +var removeSync = (path, options = {}) => { + const innerOptions = options.recursive ? { recursive: true, force: true } : {}; + try { + fs25.rmSync(path, innerOptions); + } catch (err) { + if (err.code === "ERR_FS_EISDIR") { + fs25.rmdirSync(path, innerOptions); + } else { + throw err; + } + } +}; + +// dist/esm/deno/stable/functions/rename.js +import { rename as nodeRename } from "fs/promises"; +var rename = function rename2(oldpath, newpath) { + return nodeRename(oldpath, newpath); +}; + +// dist/esm/deno/stable/functions/renameSync.js +import * as fs26 from "fs"; +var renameSync2 = fs26.renameSync; + +// dist/esm/deno/stable/functions/resolveDns.js +import dns from "dns"; +var resolveDns = function resolveDns2(query, recordType, options) { + if (options) { + throw Error(`resolveDns option not implemnted yet`); + } + switch (recordType) { + case "A": + case "AAAA": + case "CNAME": + case "NS": + case "PTR": + return new Promise((resolve2, reject) => { + dns.resolve(query, recordType, (err, addresses) => { + if (err) { + reject(err); + } else { + resolve2(addresses); + } + }); + }); + case "ANAME": + case "CAA": + case "MX": + case "NAPTR": + case "SOA": + case "SRV": + case "TXT": + default: + throw Error(`resolveDns type ${recordType} not implemnted yet`); + } +}; + +// dist/esm/deno/stable/functions/run.js +import childProcess from "child_process"; +import fs27 from "fs"; +import os7 from "os"; +import url from "url"; +import { once as once2 } from "events"; +import which2 from "which"; + +// dist/esm/deno/internal/streams.js +var BufferStreamReader = class { + #stream; + #error; + #ended = false; + #pendingActions = []; + constructor(stream3) { + this.#stream = stream3; + this.#stream.pause(); + this.#stream.on("error", (error) => { + this.#error = error; + this.#runPendingActions(); + }); + this.#stream.on("readable", () => { + this.#runPendingActions(); + }); + this.#stream.on("end", () => { + this.#ended = true; + this.#runPendingActions(); + }); + } + readAll() { + return new Promise((resolve2, reject) => { + const chunks = []; + const action = () => { + if (this.#error) { + reject(this.#error); + return; + } + const buffer = this.#stream.read(); + if (buffer != null) { + chunks.push(buffer); + this.#pendingActions.push(action); + } else if (this.#ended) { + const result = Buffer.concat(chunks); + resolve2(result); + } else { + this.#pendingActions.push(action); + } + }; + action(); + }); + } + read(p) { + return new Promise((resolve2, reject) => { + const action = () => { + if (this.#error) { + reject(this.#error); + return; + } + const readBuffer = this.#stream.read(p.byteLength); + if (readBuffer && readBuffer.byteLength > 0) { + readBuffer.copy(p, 0, 0, readBuffer.byteLength); + resolve2(readBuffer.byteLength); + return; + } + if (this.#ended) { + resolve2(null); + } else { + this.#pendingActions.push(action); + } + }; + action(); + }); + } + #runPendingActions() { + const errors = []; + for (const action of this.#pendingActions.splice(0)) { + try { + action(); + } catch (err) { + errors.push(err); + } + } + if (errors.length > 0) { + throw errors.length > 1 ? new globalThis.AggregateError(errors) : errors[0]; + } + } +}; +var StreamWriter = class { + #stream; + constructor(stream3) { + this.#stream = stream3; + } + write(p) { + return new Promise((resolve2, reject) => { + this.#stream.write(p, (err) => { + if (err) { + reject(err); + } else { + resolve2(p.byteLength); + } + }); + }); + } +}; + +// dist/esm/deno/stable/functions/run.js +var run = function run2(options) { + const [cmd, ...args2] = options.cmd; + if (options.cwd && !fs27.existsSync(options.cwd)) { + throw new Error("The directory name is invalid."); + } + const commandName = getCmd(cmd); + if (!which2.sync(commandName, { nothrow: true })) { + throw new NotFound("The system cannot find the file specified."); + } + const process2 = childProcess.spawn(commandName, args2, { + cwd: options.cwd, + env: getEnv(options), + uid: options.uid, + gid: options.gid, + shell: false, + stdio: [ + getStdio(options.stdin, "in"), + getStdio(options.stdout, "out"), + getStdio(options.stderr, "out") + ] + }); + return new Process(process2); +}; +function getStdio(value, kind) { + if (value === "inherit" || value == null) { + return "inherit"; + } else if (value === "piped") { + return "pipe"; + } else if (value === "null") { + return "ignore"; + } else if (typeof value === "number") { + switch (kind) { + case "in": + return fs27.createReadStream(null, { fd: value }); + case "out": + return fs27.createWriteStream(null, { fd: value }); + default: { + const _assertNever = kind; + throw new Error("Unreachable."); + } + } + } else { + const _assertNever = value; + throw new Error("Unknown value."); + } +} +function getCmd(firstArg) { + if (firstArg instanceof URL) { + return url.fileURLToPath(firstArg); + } else { + return firstArg; + } +} +function getEnv(options) { + const env2 = options.env ?? {}; + for (const name in process.env) { + if (!Object.prototype.hasOwnProperty.call(env2, name)) { + if (options.clearEnv) { + if (os7.platform() === "win32") { + env2[name] = ""; + } else { + delete env2[name]; + } + } else { + env2[name] = process.env[name]; + } + } + } + return env2; +} +var Process = class { + #process; + #stderr; + #stdout; + #stdin; + #status; + #receivedStatus = false; + /** @internal */ + constructor(process2) { + this.#process = process2; + this.#stdout = ProcessReadStream.fromNullable(this.#process.stdout) ?? null; + this.#stderr = ProcessReadStream.fromNullable(this.#process.stderr) ?? null; + this.#stdin = ProcessWriteStream.fromNullable(this.#process.stdin) ?? null; + this.#status = once2(process2, "exit"); + } + get rid() { + return NaN; + } + get pid() { + return this.#process.pid; + } + get stdin() { + return this.#stdin; + } + get stdout() { + return this.#stdout; + } + get stderr() { + return this.#stderr; + } + async status() { + const [receivedCode, signalName] = await this.#status; + const signal = signalName ? os7.constants.signals[signalName] : receivedCode > 128 ? receivedCode - 128 : void 0; + const code = receivedCode != null ? receivedCode : signal != null ? 128 + signal : void 0; + const success = code === 0; + this.#receivedStatus = true; + return { code, signal, success }; + } + async output() { + if (!this.#stdout) { + throw new TypeError("stdout was not piped"); + } + const result = await this.#stdout.readAll(); + this.#stdout.close(); + return result; + } + async stderrOutput() { + if (!this.#stderr) { + throw new TypeError("stderr was not piped"); + } + const result = await this.#stderr.readAll(); + this.#stderr.close(); + return result; + } + close() { + this.#process.unref(); + this.#process.kill(); + } + kill(signo = "SIGTERM") { + if (this.#receivedStatus) { + throw new NotFound("entity not found"); + } + this.#process.kill(signo); + } +}; +var ProcessReadStream = class _ProcessReadStream { + #stream; + #bufferStreamReader; + #closed = false; + constructor(stream3) { + this.#stream = stream3; + this.#bufferStreamReader = new BufferStreamReader(stream3); + } + static fromNullable(stream3) { + return stream3 ? new _ProcessReadStream(stream3) : void 0; + } + readAll() { + if (this.#closed) { + return Promise.resolve(new Uint8Array(0)); + } else { + return this.#bufferStreamReader.readAll(); + } + } + read(p) { + if (this.#closed) { + return Promise.resolve(null); + } else { + return this.#bufferStreamReader.read(p); + } + } + close() { + this.#closed = true; + this.#stream.destroy(); + } + get readable() { + throw new Error("Not implemented."); + } + get writable() { + throw new Error("Not implemented."); + } +}; +var ProcessWriteStream = class _ProcessWriteStream { + #stream; + #streamWriter; + #closed = false; + constructor(stream3) { + this.#stream = stream3; + this.#streamWriter = new StreamWriter(stream3); + } + static fromNullable(stream3) { + return stream3 ? new _ProcessWriteStream(stream3) : void 0; + } + write(p) { + if (this.#closed) { + return Promise.resolve(0); + } else { + return this.#streamWriter.write(p); + } + } + close() { + this.#closed = true; + this.#stream.end(); + } +}; + +// dist/esm/deno/stable/functions/shutdown.js +import { Socket as Socket2 } from "net"; +var shutdown = async function shutdown2(rid) { + await new Promise((resolve2) => new Socket2({ fd: rid }).end(resolve2)); +}; + +// dist/esm/deno/stable/functions/statSync.js +import * as fs28 from "fs"; +var statSync2 = (path) => { + try { + return denoifyFileInfo(fs28.statSync(path)); + } catch (err) { + throw mapError(err); + } +}; + +// dist/esm/deno/stable/functions/symlink.js +import * as fs29 from "fs/promises"; +var symlink2 = async (oldpath, newpath, options) => await fs29.symlink(oldpath, newpath, options?.type); + +// dist/esm/deno/stable/functions/symlinkSync.js +import * as fs30 from "fs"; +var symlinkSync2 = (oldpath, newpath, options) => fs30.symlinkSync(oldpath, newpath, options?.type); + +// dist/esm/deno/stable/functions/test.js +import { test } from "@deno/shim-deno-test"; + +// dist/esm/deno/stable/functions/truncate.js +import * as fs31 from "fs/promises"; +var truncate2 = async (name, len) => { + try { + return await fs31.truncate(name, len); + } catch (error) { + if (error?.code === "ENOENT") { + throw new errors_exports.NotFound(`No such file or directory (os error 2), truncate '${name}'`); + } + throw mapError(error); + } +}; + +// dist/esm/deno/stable/functions/truncateSync.js +import * as fs32 from "fs"; +var truncateSync2 = (name, len) => { + try { + return fs32.truncateSync(name, len); + } catch (error) { + if (error?.code === "ENOENT") { + throw new errors_exports.NotFound(`No such file or directory (os error 2), truncate '${name}'`); + } + throw mapError(error); + } +}; + +// dist/esm/deno/stable/functions/uid.js +import ps5 from "process"; +var uid = ps5.getuid ?? (() => null); + +// dist/esm/deno/stable/functions/watchFs.js +import { watch } from "fs/promises"; +import { resolve } from "path"; + +// dist/esm/deno/internal/iterutil.js +function* map2(iter, f) { + for (const i of iter) { + yield f(i); + } +} +async function* mapAsync(iter, f) { + for await (const i of iter) { + yield f(i); + } +} +async function* filterAsync(iter, filter) { + for await (const i of iter) { + if (filter(i)) { + yield i; + } + } +} +async function* merge(iterables) { + const racers = new Map(map2(map2(iterables, (iter) => iter[Symbol.asyncIterator]()), (iter) => [iter, iter.next()])); + while (racers.size > 0) { + const winner = await Promise.race(map2(racers.entries(), ([iter, prom]) => prom.then((result) => ({ result, iter })))); + if (winner.result.done) { + racers.delete(winner.iter); + } else { + yield await winner.result.value; + racers.set(winner.iter, winner.iter.next()); + } + } +} + +// dist/esm/deno/stable/functions/watchFs.js +var watchFs = function watchFs2(paths, options = { recursive: true }) { + paths = Array.isArray(paths) ? paths : [paths]; + const ac = new AbortController(); + const { signal } = ac; + const rid = -1; + const masterWatcher = merge(paths.map((path) => mapAsync(filterAsync(watch(path, { recursive: options?.recursive, signal }), (info) => info.filename != null), (info) => ({ + kind: "modify", + paths: [resolve(path, info.filename)] + })))); + function close2() { + ac.abort(); + } + return Object.assign(masterWatcher, { + rid, + close: close2, + [Symbol.dispose]: close2 + }); +}; + +// dist/esm/deno/stable/functions/writeFile.js +import * as fs33 from "fs/promises"; +var writeFile3 = async function writeFile4(path, data, { append = false, create: create3 = true, createNew = false, mode, signal } = {}) { + const truncate3 = create3 && !append; + const flag = getFsFlag({ append, create: create3, createNew, truncate: truncate3, write: true }); + try { + await fs33.writeFile(path, data, { flag, signal }); + if (mode != null) + await fs33.chmod(path, mode); + } catch (error) { + throw mapError(error); + } +}; + +// dist/esm/deno/stable/functions/writeFileSync.js +import { platform as platform3 } from "os"; +var writeFileSync2 = function writeFileSync3(path, data, options = {}) { + try { + if (options.create !== void 0) { + const create3 = !!options.create; + if (!create3) { + statSync2(path); + } + } + const openOptions = { + write: true, + create: true, + createNew: options.createNew, + append: !!options.append, + truncate: !options.append + }; + const file = openSync(path, openOptions); + if (options.mode !== void 0 && options.mode !== null && platform3() !== "win32") { + chmodSync2(path, options.mode); + } + let nwritten = 0; + while (nwritten < data.length) { + nwritten += file.writeSync(data.subarray(nwritten)); + } + file.close(); + } catch (e) { + throw mapError(e); + } +}; + +// dist/esm/deno/stable/variables/args.js +var args = process.argv.slice(2); + +// dist/esm/deno/stable/functions.js +var futime = async function(rid, atime, mtime) { + try { + await new Promise((resolve2, reject) => { + fs34.futimes(rid, atime, mtime, (err) => { + if (err) { + reject(err); + } else { + resolve2(); + } + }); + }); + } catch (error) { + throw mapError(error); + } +}; +var futimeSync = function(rid, atime, mtime) { + try { + fs34.futimesSync(rid, atime, mtime); + } catch (error) { + throw mapError(error); + } +}; +var utime = async function(path, atime, mtime) { + try { + await fs34.promises.utimes(path, atime, mtime); + } catch (error) { + if (error?.code === "ENOENT") { + throw new errors_exports.NotFound(`No such file or directory (os error 2), utime '${path}'`); + } + throw mapError(error); + } +}; +var utimeSync = function(path, atime, mtime) { + try { + fs34.utimesSync(path, atime, mtime); + } catch (error) { + if (error?.code === "ENOENT") { + throw new errors_exports.NotFound(`No such file or directory (os error 2), utime '${path}'`); + } + throw mapError(error); + } +}; +export { + main_exports as Deno +}; diff --git a/action/node_modules/@deno/shim-deno/dist/deno/internal/test.js b/action/node_modules/@deno/shim-deno/dist/test-internals.cjs similarity index 98% rename from action/node_modules/@deno/shim-deno/dist/deno/internal/test.js rename to action/node_modules/@deno/shim-deno/dist/test-internals.cjs index 0c0d1aed..a36f40e1 100644 --- a/action/node_modules/@deno/shim-deno/dist/deno/internal/test.js +++ b/action/node_modules/@deno/shim-deno/dist/test-internals.cjs @@ -1,5 +1,5 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.testDefinitions = void 0; -var shim_deno_test_1 = require("@deno/shim-deno-test"); -Object.defineProperty(exports, "testDefinitions", { enumerable: true, get: function () { return shim_deno_test_1.testDefinitions; } }); +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.testDefinitions = void 0; +var shim_deno_test_1 = require("@deno/shim-deno-test"); +Object.defineProperty(exports, "testDefinitions", { enumerable: true, get: function () { return shim_deno_test_1.testDefinitions; } }); diff --git a/action/node_modules/@deno/shim-deno/dist/test-internals.d.cts b/action/node_modules/@deno/shim-deno/dist/test-internals.d.cts new file mode 100644 index 00000000..d3ca34bf --- /dev/null +++ b/action/node_modules/@deno/shim-deno/dist/test-internals.d.cts @@ -0,0 +1 @@ +export { testDefinitions } from "@deno/shim-deno-test"; diff --git a/action/node_modules/@deno/shim-deno/dist/test-internals.d.mts b/action/node_modules/@deno/shim-deno/dist/test-internals.d.mts new file mode 100644 index 00000000..d3ca34bf --- /dev/null +++ b/action/node_modules/@deno/shim-deno/dist/test-internals.d.mts @@ -0,0 +1 @@ +export { testDefinitions } from "@deno/shim-deno-test"; diff --git a/action/node_modules/@deno/shim-deno/dist/test-internals.mjs b/action/node_modules/@deno/shim-deno/dist/test-internals.mjs new file mode 100644 index 00000000..d3ca34bf --- /dev/null +++ b/action/node_modules/@deno/shim-deno/dist/test-internals.mjs @@ -0,0 +1 @@ +export { testDefinitions } from "@deno/shim-deno-test"; diff --git a/action/node_modules/@deno/shim-deno/lib/shim-deno.lib.d.ts b/action/node_modules/@deno/shim-deno/lib/shim-deno.lib.d.ts deleted file mode 100644 index 0d495853..00000000 --- a/action/node_modules/@deno/shim-deno/lib/shim-deno.lib.d.ts +++ /dev/null @@ -1,3399 +0,0 @@ -// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. - -/// - -import { URL } from "url"; -import { ReadableStream, WritableStream } from "node:stream/web"; - -/** - * EventTarget is a DOM interface implemented by objects that can receive events - * and may have listeners for them. - * - * @category DOM Events - */ -declare class EventTarget { - /** - * Appends an event listener for events whose type attribute value is type. - * The callback argument sets the callback that will be invoked when the event - * is dispatched. - * - * The options argument sets listener-specific options. For compatibility this - * can be a boolean, in which case the method behaves exactly as if the value - * was specified as options's capture. - * - * When set to true, options's capture prevents callback from being invoked - * when the event's eventPhase attribute value is BUBBLING_PHASE. When false - * (or not present), callback will not be invoked when event's eventPhase - * attribute value is CAPTURING_PHASE. Either way, callback will be invoked if - * event's eventPhase attribute value is AT_TARGET. - * - * When set to true, options's passive indicates that the callback will not - * cancel the event by invoking preventDefault(). This is used to enable - * performance optimizations described in § 2.8 Observing event listeners. - * - * When set to true, options's once indicates that the callback will only be - * invoked once after which the event listener will be removed. - * - * The event listener is appended to target's event listener list and is not - * appended if it has the same type, callback, and capture. - */ - addEventListener(type: string, listener: EventListenerOrEventListenerObject | null, options?: boolean | AddEventListenerOptions): void; - /** - * Dispatches a synthetic event event to target and returns true if either - * event's cancelable attribute value is false or its preventDefault() method - * was not invoked, and false otherwise. - */ - dispatchEvent(event: Event): boolean; - /** - * Removes the event listener in target's event listener list with the same - * type, callback, and options. - */ - removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void; -} - -/** - * An event which takes place in the DOM. - * - * @category DOM Events - */ -declare class Event { - /** - * Returns true or false depending on how event was initialized. True if - * event goes through its target's ancestors in reverse tree order, and - * false otherwise. - */ - readonly bubbles: boolean; - cancelBubble: boolean; - /** - * Returns true or false depending on how event was initialized. Its return - * value does not always carry meaning, but true can indicate that part of the - * operation during which event was dispatched, can be canceled by invoking - * the preventDefault() method. - */ - readonly cancelable: boolean; - /** - * Returns true or false depending on how event was initialized. True if - * event invokes listeners past a ShadowRoot node that is the root of its - * target, and false otherwise. - */ - readonly composed: boolean; - /** - * Returns the object whose event listener's callback is currently being - * invoked. - */ - readonly currentTarget: EventTarget | null; - /** - * Returns true if preventDefault() was invoked successfully to indicate - * cancellation, and false otherwise. - */ - readonly defaultPrevented: boolean; - /** - * Returns the event's phase, which is one of NONE, CAPTURING_PHASE, - * AT_TARGET, and BUBBLING_PHASE. - */ - readonly eventPhase: number; - /** - * Returns true if event was dispatched by the user agent, and false - * otherwise. - */ - readonly isTrusted: boolean; - /** Returns the object to which event is dispatched (its target). */ - readonly target: EventTarget | null; - /** - * Returns the event's timestamp as the number of milliseconds measured - * relative to the time origin. - */ - readonly timeStamp: number; - /** Returns the type of event, e.g. "click", "hashchange", or "submit". */ - readonly type: string; - readonly AT_TARGET: number; - readonly BUBBLING_PHASE: number; - readonly CAPTURING_PHASE: number; - readonly NONE: number; - static readonly AT_TARGET: number; - static readonly BUBBLING_PHASE: number; - static readonly CAPTURING_PHASE: number; - static readonly NONE: number; - constructor(type: string, eventInitDict?: EventInit); - /** - * Returns the invocation target objects of event's path (objects on which - * listeners will be invoked), except for any nodes in shadow trees of which - * the shadow root's mode is "closed" that are not reachable from event's - * currentTarget. - */ - composedPath(): EventTarget[]; - /** - * If invoked when the cancelable attribute value is true, and while - * executing a listener for the event with passive set to false, signals to - * the operation that caused event to be dispatched that it needs to be - * canceled. - */ - preventDefault(): void; - /** - * Invoking this method prevents event from reaching any registered event - * listeners after the current one finishes running and, when dispatched in a - * tree, also prevents event from reaching any other objects. - */ - stopImmediatePropagation(): void; - /** - * When dispatched in a tree, invoking this method prevents event from - * reaching any objects other than the current object. - */ - stopPropagation(): void; -} - -/** @category DOM Events */ -interface EventInit { - bubbles?: boolean; - cancelable?: boolean; - composed?: boolean; -} - -/** @category DOM Events */ -interface EventListenerOptions { - capture?: boolean; -} - -/** @category DOM Events */ -interface AddEventListenerOptions extends EventListenerOptions { - once?: boolean; - passive?: boolean; - signal?: AbortSignal; -} - -/** @category DOM Events */ -interface EventListener { - (evt: Event): void | Promise; -} - -/** @category DOM Events */ -interface EventListenerObject { - handleEvent(evt: Event): void | Promise; -} - -/** @category DOM Events */ -declare type EventListenerOrEventListenerObject = | EventListener - | EventListenerObject; - -export declare namespace Deno { - export const File: typeof FsFile; - - export class FsFile implements Deno.FsFile { - readonly rid: number; - constructor(rid: number); - get readable(): ReadableStream; - get writable(): WritableStream; - write(p: Uint8Array): Promise; - writeSync(p: Uint8Array): number; - truncate(len?: number): Promise; - truncateSync(len?: number): void; - read(p: Uint8Array): Promise; - readSync(p: Uint8Array): number | null; - seek(_offset: number, _whence: Deno.SeekMode): Promise; - seekSync(_offset: number, _whence: Deno.SeekMode): number; - stat(): Promise; - statSync(): Deno.FileInfo; - close(): void; - } - - export class Permissions implements Deno.Permissions { - query(_desc: Deno.PermissionDescriptor): Promise; - revoke(_desc: Deno.PermissionDescriptor): Promise; - request(desc: Deno.PermissionDescriptor): Promise; - } - - export class PermissionStatus extends EventTarget implements Deno.PermissionStatus { - readonly state: Deno.PermissionState; - onchange: ((this: PermissionStatus, ev: Event) => any) | null; - } - - export enum SeekMode { - Start = 0, - Current = 1, - End = 2 - } - - /** - * The `tty.isatty()` method returns `true` if the given `fd` is associated with - * a TTY and `false` if it is not, including whenever `fd` is not a non-negative - * integer. - * @since v0.5.8 - * @param fd A numeric file descriptor - */ - export function isatty(fd: number): boolean; - /** - * Change the current working directory to the specified path. - * - * ```ts - * Deno.chdir("/home/userA"); - * Deno.chdir("../userB"); - * Deno.chdir("C:\\Program Files (x86)\\Java"); - * ``` - * - * Throws `Deno.errors.NotFound` if directory not found. - * Throws `Deno.errors.PermissionDenied` if the user does not have access - * rights - * - * Requires --allow-read. - * - * @tags allow-read - * @category Runtime Environment - */ - export function chdir(directory: string | URL): void; - /** - * Changes the permission of a specific file/directory of specified path. - * Ignores the process's umask. - * - * ```ts - * await Deno.chmod("/path/to/file", 0o666); - * ``` - * - * The mode is a sequence of 3 octal numbers. The first/left-most number - * specifies the permissions for the owner. The second number specifies the - * permissions for the group. The last/right-most number specifies the - * permissions for others. For example, with a mode of 0o764, the owner (7) can - * read/write/execute, the group (6) can read/write and everyone else (4) can - * read only. - * - * | Number | Description | - * | ------ | ----------- | - * | 7 | read, write, and execute | - * | 6 | read and write | - * | 5 | read and execute | - * | 4 | read only | - * | 3 | write and execute | - * | 2 | write only | - * | 1 | execute only | - * | 0 | no permission | - * - * NOTE: This API currently throws on Windows - * - * Requires `allow-write` permission. - * - * @tags allow-write - * @category File System - */ - export function chmod(path: string | URL, mode: number): Promise; - /** - * Synchronously changes the permission of a specific file/directory of - * specified path. Ignores the process's umask. - * - * ```ts - * Deno.chmodSync("/path/to/file", 0o666); - * ``` - * - * For a full description, see [chmod](#Deno.chmod) - * - * NOTE: This API currently throws on Windows - * - * Requires `allow-write` permission. - * - * @tags allow-write - * @category File System - */ - export function chmodSync(path: string | URL, mode: number): void; - /** - * Change owner of a regular file or directory. This functionality - * is not available on Windows. - * - * ```ts - * await Deno.chown("myFile.txt", 1000, 1002); - * ``` - * - * Requires `allow-write` permission. - * - * Throws Error (not implemented) if executed on Windows - * - * @tags allow-write - * @category File System - * @param path path to the file - * @param uid user id (UID) of the new owner, or `null` for no change - * @param gid group id (GID) of the new owner, or `null` for no change - */ - export function chown(path: string | URL, uid: number | null, gid: number | null): Promise; - /** - * Synchronously change owner of a regular file or directory. This functionality - * is not available on Windows. - * - * ```ts - * Deno.chownSync("myFile.txt", 1000, 1002); - * ``` - * - * Requires `allow-write` permission. - * - * Throws Error (not implemented) if executed on Windows - * - * @tags allow-write - * @category File System - * @param path path to the file - * @param uid user id (UID) of the new owner, or `null` for no change - * @param gid group id (GID) of the new owner, or `null` for no change - */ - export function chownSync(path: string | URL, uid: number | null, gid: number | null): void; - /** - * Close the given resource ID (rid) which has been previously opened, such - * as via opening or creating a file. Closing a file when you are finished - * with it is important to avoid leaking resources. - * - * ```ts - * const file = await Deno.open("my_file.txt"); - * // do work with "file" object - * Deno.close(file.rid); - * ``` - * - * @category I/O - */ - export function close(rid: number): void; - /** - * Connects to the hostname (default is "127.0.0.1") and port on the named - * transport (default is "tcp"), and resolves to the connection (`Conn`). - * - * ```ts - * const conn1 = await Deno.connect({ port: 80 }); - * const conn2 = await Deno.connect({ hostname: "192.0.2.1", port: 80 }); - * const conn3 = await Deno.connect({ hostname: "[2001:db8::1]", port: 80 }); - * const conn4 = await Deno.connect({ hostname: "golang.org", port: 80, transport: "tcp" }); - * ``` - * - * Requires `allow-net` permission for "tcp". - * - * @tags allow-net - * @category Network - */ - export function connect(options: ConnectOptions): Promise; - /** - * *UNSTABLE**: The unix socket transport is unstable as a new API yet to - * be vetted. The TCP transport is considered stable. - * - * Connects to the hostname (default is "127.0.0.1") and port on the named - * transport (default is "tcp"), and resolves to the connection (`Conn`). - * - * ```ts - * const conn1 = await Deno.connect({ port: 80 }); - * const conn2 = await Deno.connect({ hostname: "192.0.2.1", port: 80 }); - * const conn3 = await Deno.connect({ hostname: "[2001:db8::1]", port: 80 }); - * const conn4 = await Deno.connect({ hostname: "golang.org", port: 80, transport: "tcp" }); - * const conn5 = await Deno.connect({ path: "/foo/bar.sock", transport: "unix" }); - * ``` - * - * Requires `allow-net` permission for "tcp" and `allow-read` for "unix". - * - * @tags allow-net, allow-read - * @category Network - */ - export function connect(options: ConnectOptions): Promise; - export function connect(options: UnixConnectOptions): Promise; - /** - * Establishes a secure connection over TLS (transport layer security) using - * an optional cert file, hostname (default is "127.0.0.1") and port. The - * cert file is optional and if not included Mozilla's root certificates will - * be used (see also https://github.com/ctz/webpki-roots for specifics) - * - * ```ts - * const caCert = await Deno.readTextFile("./certs/my_custom_root_CA.pem"); - * const conn1 = await Deno.connectTls({ port: 80 }); - * const conn2 = await Deno.connectTls({ caCerts: [caCert], hostname: "192.0.2.1", port: 80 }); - * const conn3 = await Deno.connectTls({ hostname: "[2001:db8::1]", port: 80 }); - * const conn4 = await Deno.connectTls({ caCerts: [caCert], hostname: "golang.org", port: 80}); - * ``` - * - * Requires `allow-net` permission. - * - * @tags allow-net - * @category Network - */ - export function connectTls(options: ConnectTlsOptions): Promise; - /** - * *UNSTABLE** New API, yet to be vetted. - * - * Create a TLS connection with an attached client certificate. - * - * ```ts - * const conn = await Deno.connectTls({ - * hostname: "deno.land", - * port: 443, - * certChain: "---- BEGIN CERTIFICATE ----\n ...", - * privateKey: "---- BEGIN PRIVATE KEY ----\n ...", - * }); - * ``` - * - * Requires `allow-net` permission. - * - * @tags allow-net - * @category Network - */ - export function connectTls(options: ConnectTlsOptions): Promise; - /** - * Copies from `src` to `dst` until either EOF (`null`) is read from `src` or - * an error occurs. It resolves to the number of bytes copied or rejects with - * the first error encountered while copying. - * - * ```ts - * const source = await Deno.open("my_file.txt"); - * const bytesCopied1 = await Deno.copy(source, Deno.stdout); - * const destination = await Deno.create("my_file_2.txt"); - * const bytesCopied2 = await Deno.copy(source, destination); - * ``` - * - * @deprecated Use `copy` from https://deno.land/std/streams/conversion.ts - * instead. `Deno.copy` will be removed in Deno 2.0. - * @category I/O - * @param src The source to copy from - * @param dst The destination to copy to - * @param options Can be used to tune size of the buffer. Default size is 32kB - */ - export function copy(src: Reader, dst: Writer, options?: { - bufSize?: number; - }): Promise; - /** - * Copies the contents and permissions of one file to another specified path, - * by default creating a new file if needed, else overwriting. Fails if target - * path is a directory or is unwritable. - * - * ```ts - * await Deno.copyFile("from.txt", "to.txt"); - * ``` - * - * Requires `allow-read` permission on fromPath. - * Requires `allow-write` permission on toPath. - * - * @tags allow-read, allow-write - * @category File System - */ - export function copyFile(fromPath: string | URL, toPath: string | URL): Promise; - /** - * Synchronously copies the contents and permissions of one file to another - * specified path, by default creating a new file if needed, else overwriting. - * Fails if target path is a directory or is unwritable. - * - * ```ts - * Deno.copyFileSync("from.txt", "to.txt"); - * ``` - * - * Requires `allow-read` permission on fromPath. - * Requires `allow-write` permission on toPath. - * - * @tags allow-read, allow-write - * @category File System - */ - export function copyFileSync(fromPath: string | URL, toPath: string | URL): void; - /** - * Creates a file if none exists or truncates an existing file and resolves to - * an instance of `Deno.FsFile`. - * - * ```ts - * const file = await Deno.create("/foo/bar.txt"); - * ``` - * - * Requires `allow-read` and `allow-write` permissions. - * - * @tags allow-read, allow-write - * @category File System - */ - export function create(path: string | URL): Promise; - /** - * Creates a file if none exists or truncates an existing file and returns - * an instance of `Deno.FsFile`. - * - * ```ts - * const file = Deno.createSync("/foo/bar.txt"); - * ``` - * - * Requires `allow-read` and `allow-write` permissions. - * - * @tags allow-read, allow-write - * @category File System - */ - export function createSync(path: string | URL): FsFile; - /** - * Return a string representing the current working directory. - * - * If the current directory can be reached via multiple paths (due to symbolic - * links), `cwd()` may return any one of them. - * - * ```ts - * const currentWorkingDirectory = Deno.cwd(); - * ``` - * - * Throws `Deno.errors.NotFound` if directory not available. - * - * Requires --allow-read - * - * @tags allow-read - * @category Runtime Environment - */ - export function cwd(): string; - /** - * Returns the path to the current deno executable. - * - * ```ts - * console.log(Deno.execPath()); // e.g. "/home/alice/.local/bin/deno" - * ``` - * - * Requires `allow-read` permission. - * - * @tags allow-read - * @category Runtime Environment - */ - export function execPath(): string; - /** - * Exit the Deno process with optional exit code. If no exit code is supplied - * then Deno will exit with return code of 0. - * - * In worker contexts this is an alias to `self.close();`. - * - * ```ts - * Deno.exit(5); - * ``` - * - * @category Runtime Environment - */ - export function exit(code?: number): never; - /** - * Flushes any pending data operations of the given file stream to disk. - * ```ts - * const file = await Deno.open("my_file.txt", { read: true, write: true, create: true }); - * await Deno.write(file.rid, new TextEncoder().encode("Hello World")); - * await Deno.fdatasync(file.rid); - * console.log(new TextDecoder().decode(await Deno.readFile("my_file.txt"))); // Hello World - * ``` - * - * @category I/O - */ - export function fdatasync(rid: number): Promise; - /** - * Synchronously flushes any pending data operations of the given file stream - * to disk. - * - * ```ts - * const file = Deno.openSync("my_file.txt", { read: true, write: true, create: true }); - * Deno.writeSync(file.rid, new TextEncoder().encode("Hello World")); - * Deno.fdatasyncSync(file.rid); - * console.log(new TextDecoder().decode(Deno.readFileSync("my_file.txt"))); // Hello World - * ``` - * - * @category I/O - */ - export function fdatasyncSync(rid: number): void; - /** - * Returns a `Deno.FileInfo` for the given file stream. - * - * ```ts - * import { assert } from "https://deno.land/std/testing/asserts.ts"; - * const file = await Deno.open("file.txt", { read: true }); - * const fileInfo = await Deno.fstat(file.rid); - * assert(fileInfo.isFile); - * ``` - * - * @category File System - */ - export function fstat(rid: number): Promise; - /** - * Synchronously returns a `Deno.FileInfo` for the given file stream. - * - * ```ts - * import { assert } from "https://deno.land/std/testing/asserts.ts"; - * const file = Deno.openSync("file.txt", { read: true }); - * const fileInfo = Deno.fstatSync(file.rid); - * assert(fileInfo.isFile); - * ``` - * - * @category File System - */ - export function fstatSync(rid: number): FileInfo; - /** - * Flushes any pending data and metadata operations of the given file stream - * to disk. - * - * ```ts - * const file = await Deno.open("my_file.txt", { read: true, write: true, create: true }); - * await Deno.write(file.rid, new TextEncoder().encode("Hello World")); - * await Deno.ftruncate(file.rid, 1); - * await Deno.fsync(file.rid); - * console.log(new TextDecoder().decode(await Deno.readFile("my_file.txt"))); // H - * ``` - * - * @category I/O - */ - export function fsync(rid: number): Promise; - /** - * Synchronously flushes any pending data and metadata operations of the given - * file stream to disk. - * - * ```ts - * const file = Deno.openSync("my_file.txt", { read: true, write: true, create: true }); - * Deno.writeSync(file.rid, new TextEncoder().encode("Hello World")); - * Deno.ftruncateSync(file.rid, 1); - * Deno.fsyncSync(file.rid); - * console.log(new TextDecoder().decode(Deno.readFileSync("my_file.txt"))); // H - * ``` - * - * @category I/O - */ - export function fsyncSync(rid: number): void; - /** - * Truncates or extends the specified file stream, to reach the specified `len`. - * - * If `len` is not specified then the entire file contents are truncated as if len was set to 0. - * - * If the file previously was larger than this new length, the extra data is lost. - * - * If the file previously was shorter, it is extended, and the extended part reads as null bytes ('\0'). - * - * ```ts - * // truncate the entire file - * const file = await Deno.open("my_file.txt", { read: true, write: true, create: true }); - * await Deno.ftruncate(file.rid); - * ``` - * - * ```ts - * // truncate part of the file - * const file = await Deno.open("my_file.txt", { read: true, write: true, create: true }); - * await Deno.write(file.rid, new TextEncoder().encode("Hello World")); - * await Deno.ftruncate(file.rid, 7); - * const data = new Uint8Array(32); - * await Deno.read(file.rid, data); - * console.log(new TextDecoder().decode(data)); // Hello W - * ``` - * - * @category File System - */ - export function ftruncate(rid: number, len?: number): Promise; - /** - * Synchronously truncates or extends the specified file stream, to reach the - * specified `len`. - * - * If `len` is not specified then the entire file contents are truncated as if len was set to 0. - * - * if the file previously was larger than this new length, the extra data is lost. - * - * if the file previously was shorter, it is extended, and the extended part reads as null bytes ('\0'). - * - * ```ts - * // truncate the entire file - * const file = Deno.openSync("my_file.txt", { read: true, write: true, truncate: true, create: true }); - * Deno.ftruncateSync(file.rid); - * ``` - * - * ```ts - * // truncate part of the file - * const file = Deno.openSync("my_file.txt", { read: true, write: true, create: true }); - * Deno.writeSync(file.rid, new TextEncoder().encode("Hello World")); - * Deno.ftruncateSync(file.rid, 7); - * Deno.seekSync(file.rid, 0, Deno.SeekMode.Start); - * const data = new Uint8Array(32); - * Deno.readSync(file.rid, data); - * console.log(new TextDecoder().decode(data)); // Hello W - * ``` - * - * @category File System - */ - export function ftruncateSync(rid: number, len?: number): void; - /** - * Converts the input into a string that has the same format as printed by - * `console.log()`. - * - * ```ts - * const obj = { - * a: 10, - * b: "hello", - * }; - * const objAsString = Deno.inspect(obj); // { a: 10, b: "hello" } - * console.log(obj); // prints same value as objAsString, e.g. { a: 10, b: "hello" } - * ``` - * - * You can also register custom inspect functions, via the symbol `Symbol.for("Deno.customInspect")`, - * on objects, to control and customize the output. - * - * ```ts - * class A { - * x = 10; - * y = "hello"; - * [Symbol.for("Deno.customInspect")](): string { - * return "x=" + this.x + ", y=" + this.y; - * } - * } - * - * const inStringFormat = Deno.inspect(new A()); // "x=10, y=hello" - * console.log(inStringFormat); // prints "x=10, y=hello" - * ``` - * - * Finally, you can also specify the depth to which it will format. - * - * ```ts - * Deno.inspect({a: {b: {c: {d: 'hello'}}}}, {depth: 2}); // { a: { b: [Object] } } - * ``` - * - * @category Console and Debugging - */ - export function inspect(value: unknown, options?: InspectOptions): string; - /** - * Send a signal to process under given `pid`. - * - * If `pid` is negative, the signal will be sent to the process group - * identified by `pid`. An error will be thrown if a negative - * `pid` is used on Windows. - * - * ```ts - * const p = Deno.run({ - * cmd: ["sleep", "10000"] - * }); - * - * Deno.kill(p.pid, "SIGINT"); - * ``` - * - * Requires `allow-run` permission. - * - * @tags allow-run - * @category Sub Process - */ - export function kill(pid: number, signo: Signal): void; - /** - * Creates `newpath` as a hard link to `oldpath`. - * - * ```ts - * await Deno.link("old/name", "new/name"); - * ``` - * - * Requires `allow-read` and `allow-write` permissions. - * - * @tags allow-read - * @category File System - */ - export function link(oldpath: string, newpath: string): Promise; - /** - * Synchronously creates `newpath` as a hard link to `oldpath`. - * - * ```ts - * Deno.linkSync("old/name", "new/name"); - * ``` - * - * Requires `allow-read` and `allow-write` permissions. - * - * @tags allow-read - * @category File System - */ - export function linkSync(oldpath: string, newpath: string): void; - /** - * Listen announces on the local transport address. - * - * ```ts - * const listener1 = Deno.listen({ port: 80 }) - * const listener2 = Deno.listen({ hostname: "192.0.2.1", port: 80 }) - * const listener3 = Deno.listen({ hostname: "[2001:db8::1]", port: 80 }); - * const listener4 = Deno.listen({ hostname: "golang.org", port: 80, transport: "tcp" }); - * ``` - * - * Requires `allow-net` permission. - * - * @tags allow-net - * @category Network - */ - export function listen(options: ListenOptions & { transport?: "tcp" }): Listener; - /** - * *UNSTABLE**: new API, yet to be vetted. - * - * Listen announces on the local transport address. - * - * ```ts - * const listener = Deno.listen({ path: "/foo/bar.sock", transport: "unix" }) - * ``` - * - * Requires `allow-read` and `allow-write` permission. - * - * @tags allow-read, allow-write - * @category Network - */ - export function listen(options: UnixListenOptions & { transport: "unix" }): Listener; - /** - * Listen announces on the local transport address over TLS (transport layer - * security). - * - * ```ts - * const lstnr = Deno.listenTls({ port: 443, certFile: "./server.crt", keyFile: "./server.key" }); - * ``` - * - * Requires `allow-net` permission. - * - * @tags allow-net - * @category Network - */ - export function listenTls(options: ListenTlsOptions): TlsListener; - /** - * Resolves to a `Deno.FileInfo` for the specified `path`. If `path` is a - * symlink, information for the symlink will be returned instead of what it - * points to. - * - * ```ts - * import { assert } from "https://deno.land/std/testing/asserts.ts"; - * const fileInfo = await Deno.lstat("hello.txt"); - * assert(fileInfo.isFile); - * ``` - * - * Requires `allow-read` permission. - * - * @tags allow-read - * @category File System - */ - export function lstat(path: string | URL): Promise; - /** - * Synchronously returns a `Deno.FileInfo` for the specified `path`. If - * `path` is a symlink, information for the symlink will be returned instead of - * what it points to.. - * - * ```ts - * import { assert } from "https://deno.land/std/testing/asserts.ts"; - * const fileInfo = Deno.lstatSync("hello.txt"); - * assert(fileInfo.isFile); - * ``` - * - * Requires `allow-read` permission. - * - * @tags allow-read - * @category File System - */ - export function lstatSync(path: string | URL): FileInfo; - /** - * Creates a new temporary directory in the default directory for temporary - * files, unless `dir` is specified. Other optional options include - * prefixing and suffixing the directory name with `prefix` and `suffix` - * respectively. - * - * This call resolves to the full path to the newly created directory. - * - * Multiple programs calling this function simultaneously will create different - * directories. It is the caller's responsibility to remove the directory when - * no longer needed. - * - * ```ts - * const tempDirName0 = await Deno.makeTempDir(); // e.g. /tmp/2894ea76 - * const tempDirName1 = await Deno.makeTempDir({ prefix: 'my_temp' }); // e.g. /tmp/my_temp339c944d - * ``` - * - * Requires `allow-write` permission. - * - * @tags allow-write - * @category File System - */ - export function makeTempDir(options?: MakeTempOptions): Promise; - /** - * Synchronously creates a new temporary directory in the default directory - * for temporary files, unless `dir` is specified. Other optional options - * include prefixing and suffixing the directory name with `prefix` and - * `suffix` respectively. - * - * The full path to the newly created directory is returned. - * - * Multiple programs calling this function simultaneously will create different - * directories. It is the caller's responsibility to remove the directory when - * no longer needed. - * - * ```ts - * const tempDirName0 = Deno.makeTempDirSync(); // e.g. /tmp/2894ea76 - * const tempDirName1 = Deno.makeTempDirSync({ prefix: 'my_temp' }); // e.g. /tmp/my_temp339c944d - * ``` - * - * Requires `allow-write` permission. - * - * @tags allow-write - * @category File System - */ - export function makeTempDirSync(options?: MakeTempOptions): string; - /** - * Creates a new temporary file in the default directory for temporary - * files, unless `dir` is specified. Other - * optional options include prefixing and suffixing the directory name with - * `prefix` and `suffix` respectively. - * - * This call resolves to the full path to the newly created file. - * - * Multiple programs calling this function simultaneously will create different - * files. It is the caller's responsibility to remove the file when no longer - * needed. - * - * ```ts - * const tmpFileName0 = await Deno.makeTempFile(); // e.g. /tmp/419e0bf2 - * const tmpFileName1 = await Deno.makeTempFile({ prefix: 'my_temp' }); // e.g. /tmp/my_temp754d3098 - * ``` - * - * Requires `allow-write` permission. - * - * @tags allow-write - * @category File System - */ - export function makeTempFile(options?: MakeTempOptions): Promise; - /** - * Synchronously creates a new temporary file in the default directory for - * temporary files, unless `dir` is specified. - * Other optional options include prefixing and suffixing the directory name - * with `prefix` and `suffix` respectively. - * - * The full path to the newly created file is returned. - * - * Multiple programs calling this function simultaneously will create different - * files. It is the caller's responsibility to remove the file when no longer - * needed. - * - * ```ts - * const tempFileName0 = Deno.makeTempFileSync(); // e.g. /tmp/419e0bf2 - * const tempFileName1 = Deno.makeTempFileSync({ prefix: 'my_temp' }); // e.g. /tmp/my_temp754d3098 - * ``` - * - * Requires `allow-write` permission. - * - * @tags allow-write - * @category File System - */ - export function makeTempFileSync(options?: MakeTempOptions): string; - /** - * Returns an object describing the memory usage of the Deno process measured - * in bytes. - * - * @category Runtime Environment - */ - export function memoryUsage(): MemoryUsage; - /** - * Creates a new directory with the specified path. - * - * ```ts - * await Deno.mkdir("new_dir"); - * await Deno.mkdir("nested/directories", { recursive: true }); - * await Deno.mkdir("restricted_access_dir", { mode: 0o700 }); - * ``` - * - * Defaults to throwing error if the directory already exists. - * - * Requires `allow-write` permission. - * - * @tags allow-write - * @category File System - */ - export function mkdir(path: string | URL, options?: MkdirOptions): Promise; - /** - * Synchronously creates a new directory with the specified path. - * - * ```ts - * Deno.mkdirSync("new_dir"); - * Deno.mkdirSync("nested/directories", { recursive: true }); - * Deno.mkdirSync("restricted_access_dir", { mode: 0o700 }); - * ``` - * - * Defaults to throwing error if the directory already exists. - * - * Requires `allow-write` permission. - * - * @tags allow-write - * @category File System - */ - export function mkdirSync(path: string | URL, options?: MkdirOptions): void; - /** - * Open a file and resolve to an instance of `Deno.FsFile`. The - * file does not need to previously exist if using the `create` or `createNew` - * open options. It is the callers responsibility to close the file when finished - * with it. - * - * ```ts - * const file = await Deno.open("/foo/bar.txt", { read: true, write: true }); - * // Do work with file - * Deno.close(file.rid); - * ``` - * - * Requires `allow-read` and/or `allow-write` permissions depending on options. - * - * @tags allow-read, allow-write - * @category File System - */ - export function open(path: string | URL, options?: OpenOptions): Promise; - /** - * Synchronously open a file and return an instance of `Deno.FsFile`. The - * file does not need to previously exist if using the `create` or `createNew` - * open options. It is the callers responsibility to close the file when finished - * with it. - * - * ```ts - * const file = Deno.openSync("/foo/bar.txt", { read: true, write: true }); - * // Do work with file - * Deno.close(file.rid); - * ``` - * - * Requires `allow-read` and/or `allow-write` permissions depending on options. - * - * @tags allow-read, allow-write - * @category File System - */ - export function openSync(path: string | URL, options?: OpenOptions): FsFile; - /** - * Read from a resource ID (`rid`) into an array buffer (`buffer`). - * - * Resolves to either the number of bytes read during the operation or EOF - * (`null`) if there was nothing more to read. - * - * It is possible for a read to successfully return with `0` bytes. This does - * not indicate EOF. - * - * This function is one of the lowest level APIs and most users should not - * work with this directly, but rather use - * `readAll()` from https://deno.land/std/streams/conversion.ts instead. - * - * **It is not guaranteed that the full buffer will be read in a single call.** - * - * ```ts - * // if "/foo/bar.txt" contains the text "hello world": - * const file = await Deno.open("/foo/bar.txt"); - * const buf = new Uint8Array(100); - * const numberOfBytesRead = await Deno.read(file.rid, buf); // 11 bytes - * const text = new TextDecoder().decode(buf); // "hello world" - * Deno.close(file.rid); - * ``` - * - * @category I/O - */ - export function read(rid: number, buffer: Uint8Array): Promise; - /** - * Reads the directory given by `path` and returns an async iterable of - * `Deno.DirEntry`. - * - * ```ts - * for await (const dirEntry of Deno.readDir("/")) { - * console.log(dirEntry.name); - * } - * ``` - * - * Throws error if `path` is not a directory. - * - * Requires `allow-read` permission. - * - * @tags allow-read - * @category File System - */ - export function readDir(path: string | URL): AsyncIterable; - /** - * Synchronously reads the directory given by `path` and returns an iterable - * of `Deno.DirEntry`. - * - * ```ts - * for (const dirEntry of Deno.readDirSync("/")) { - * console.log(dirEntry.name); - * } - * ``` - * - * Throws error if `path` is not a directory. - * - * Requires `allow-read` permission. - * - * @tags allow-read - * @category File System - */ - export function readDirSync(path: string | URL): Iterable; - /** - * Reads and resolves to the entire contents of a file as an array of bytes. - * `TextDecoder` can be used to transform the bytes to string if required. - * Reading a directory returns an empty data array. - * - * ```ts - * const decoder = new TextDecoder("utf-8"); - * const data = await Deno.readFile("hello.txt"); - * console.log(decoder.decode(data)); - * ``` - * - * Requires `allow-read` permission. - * - * @tags allow-read - * @category File System - */ - export function readFile(path: string | URL, options?: ReadFileOptions): Promise; - /** - * Synchronously reads and returns the entire contents of a file as an array - * of bytes. `TextDecoder` can be used to transform the bytes to string if - * required. Reading a directory returns an empty data array. - * - * ```ts - * const decoder = new TextDecoder("utf-8"); - * const data = Deno.readFileSync("hello.txt"); - * console.log(decoder.decode(data)); - * ``` - * - * Requires `allow-read` permission. - * - * @tags allow-read - * @category File System - */ - export function readFileSync(path: string | URL): Uint8Array; - /** - * Resolves to the full path destination of the named symbolic link. - * - * ```ts - * await Deno.symlink("./test.txt", "./test_link.txt"); - * const target = await Deno.readLink("./test_link.txt"); // full path of ./test.txt - * ``` - * - * Throws TypeError if called with a hard link - * - * Requires `allow-read` permission. - * - * @tags allow-read - * @category File System - */ - export function readLink(path: string | URL): Promise; - /** - * Returns the full path destination of the named symbolic link. - * - * ```ts - * Deno.symlinkSync("./test.txt", "./test_link.txt"); - * const target = Deno.readLinkSync("./test_link.txt"); // full path of ./test.txt - * ``` - * - * Throws TypeError if called with a hard link - * - * Requires `allow-read` permission. - * - * @tags allow-read - * @category File System - */ - export function readLinkSync(path: string | URL): string; - /** - * Synchronously read from a resource ID (`rid`) into an array buffer (`buffer`). - * - * Returns either the number of bytes read during the operation or EOF - * (`null`) if there was nothing more to read. - * - * It is possible for a read to successfully return with `0` bytes. This does - * not indicate EOF. - * - * This function is one of the lowest level APIs and most users should not - * work with this directly, but rather use - * `readAllSync()` from https://deno.land/std/streams/conversion.ts instead. - * - * **It is not guaranteed that the full buffer will be read in a single call.** - * - * ```ts - * // if "/foo/bar.txt" contains the text "hello world": - * const file = Deno.openSync("/foo/bar.txt"); - * const buf = new Uint8Array(100); - * const numberOfBytesRead = Deno.readSync(file.rid, buf); // 11 bytes - * const text = new TextDecoder().decode(buf); // "hello world" - * Deno.close(file.rid); - * ``` - * - * @category I/O - */ - export function readSync(rid: number, buffer: Uint8Array): number | null; - /** - * Asynchronously reads and returns the entire contents of a file as utf8 - * encoded string. Reading a directory throws an error. - * - * ```ts - * const data = await Deno.readTextFile("hello.txt"); - * console.log(data); - * ``` - * - * Requires `allow-read` permission. - * - * @tags allow-read - * @category File System - */ - export function readTextFile(path: string | URL, options?: ReadFileOptions): Promise; - /** - * Synchronously reads and returns the entire contents of a file as utf8 - * encoded string. Reading a directory throws an error. - * - * ```ts - * const data = Deno.readTextFileSync("hello.txt"); - * console.log(data); - * ``` - * - * Requires `allow-read` permission. - * - * @tags allow-read - * @category File System - */ - export function readTextFileSync(path: string | URL): string; - /** - * Resolves to the absolute normalized path, with symbolic links resolved. - * - * ```ts - * // e.g. given /home/alice/file.txt and current directory /home/alice - * await Deno.symlink("file.txt", "symlink_file.txt"); - * const realPath = await Deno.realPath("./file.txt"); - * const realSymLinkPath = await Deno.realPath("./symlink_file.txt"); - * console.log(realPath); // outputs "/home/alice/file.txt" - * console.log(realSymLinkPath); // outputs "/home/alice/file.txt" - * ``` - * - * Requires `allow-read` permission for the target path. - * Also requires `allow-read` permission for the CWD if the target path is - * relative. - * - * @tags allow-read - * @category File System - */ - export function realPath(path: string | URL): Promise; - /** - * Returns absolute normalized path, with symbolic links resolved. - * - * ```ts - * // e.g. given /home/alice/file.txt and current directory /home/alice - * Deno.symlinkSync("file.txt", "symlink_file.txt"); - * const realPath = Deno.realPathSync("./file.txt"); - * const realSymLinkPath = Deno.realPathSync("./symlink_file.txt"); - * console.log(realPath); // outputs "/home/alice/file.txt" - * console.log(realSymLinkPath); // outputs "/home/alice/file.txt" - * ``` - * - * Requires `allow-read` permission for the target path. - * Also requires `allow-read` permission for the CWD if the target path is - * relative. - * - * @tags allow-read - * @category File System - */ - export function realPathSync(path: string | URL): string; - /** - * Removes the named file or directory. - * - * ```ts - * await Deno.remove("/path/to/empty_dir/or/file"); - * await Deno.remove("/path/to/populated_dir/or/file", { recursive: true }); - * ``` - * - * Throws error if permission denied, path not found, or path is a non-empty - * directory and the `recursive` option isn't set to `true`. - * - * Requires `allow-write` permission. - * - * @tags allow-write - * @category File System - */ - export function remove(path: string | URL, options?: RemoveOptions): Promise; - /** - * Synchronously removes the named file or directory. - * - * ```ts - * Deno.removeSync("/path/to/empty_dir/or/file"); - * Deno.removeSync("/path/to/populated_dir/or/file", { recursive: true }); - * ``` - * - * Throws error if permission denied, path not found, or path is a non-empty - * directory and the `recursive` option isn't set to `true`. - * - * Requires `allow-write` permission. - * - * @tags allow-write - * @category File System - */ - export function removeSync(path: string | URL, options?: RemoveOptions): void; - /** - * Renames (moves) `oldpath` to `newpath`. Paths may be files or directories. - * If `newpath` already exists and is not a directory, `rename()` replaces it. - * OS-specific restrictions may apply when `oldpath` and `newpath` are in - * different directories. - * - * ```ts - * await Deno.rename("old/path", "new/path"); - * ``` - * - * On Unix, this operation does not follow symlinks at either path. - * - * It varies between platforms when the operation throws errors, and if so what - * they are. It's always an error to rename anything to a non-empty directory. - * - * Requires `allow-read` and `allow-write` permission. - * - * @tags allow-read, allow-write - * @category File System - */ - export function rename(oldpath: string | URL, newpath: string | URL): Promise; - /** - * Synchronously renames (moves) `oldpath` to `newpath`. Paths may be files or - * directories. If `newpath` already exists and is not a directory, - * `renameSync()` replaces it. OS-specific restrictions may apply when - * `oldpath` and `newpath` are in different directories. - * - * ```ts - * Deno.renameSync("old/path", "new/path"); - * ``` - * - * On Unix, this operation does not follow symlinks at either path. - * - * It varies between platforms when the operation throws errors, and if so what - * they are. It's always an error to rename anything to a non-empty directory. - * - * Requires `allow-read` and `allow-write` permissions. - * - * @tags allow-read, allow-write - * @category File System - */ - export function renameSync(oldpath: string | URL, newpath: string | URL): void; - /** @category Network */ - export function resolveDns(query: string, recordType: "A" | "AAAA" | "ANAME" | "CNAME" | "NS" | "PTR", options?: ResolveDnsOptions): Promise; - /** @category Network */ - export function resolveDns(query: string, recordType: "CAA", options?: ResolveDnsOptions): Promise; - /** @category Network */ - export function resolveDns(query: string, recordType: "MX", options?: ResolveDnsOptions): Promise; - /** @category Network */ - export function resolveDns(query: string, recordType: "NAPTR", options?: ResolveDnsOptions): Promise; - /** @category Network */ - export function resolveDns(query: string, recordType: "SOA", options?: ResolveDnsOptions): Promise; - /** @category Network */ - export function resolveDns(query: string, recordType: "SRV", options?: ResolveDnsOptions): Promise; - /** @category Network */ - export function resolveDns(query: string, recordType: "TXT", options?: ResolveDnsOptions): Promise; - /** - * Performs DNS resolution against the given query, returning resolved records. - * Fails in the cases such as: - * - the query is in invalid format - * - the options have an invalid parameter, e.g. `nameServer.port` is beyond the range of 16-bit unsigned integer - * - timed out - * - * ```ts - * const a = await Deno.resolveDns("example.com", "A"); - * - * const aaaa = await Deno.resolveDns("example.com", "AAAA", { - * nameServer: { ipAddr: "8.8.8.8", port: 53 }, - * }); - * ``` - * - * Requires `allow-net` permission. - * - * @tags allow-net - * @category Network - */ - export function resolveDns(query: string, recordType: RecordType, options?: ResolveDnsOptions): Promise< - | string[] - | CAARecord[] - | MXRecord[] - | NAPTRRecord[] - | SOARecord[] - | SRVRecord[] - | string[][] - >; - - export class Process implements Deno.Process { - #private; - get rid(): number; - get pid(): number; - get stdin(): T["stdin"] extends "piped" ? Deno.Writer & Deno.Closer & { - writable: import("stream/web").WritableStream; - } : (Deno.Writer & Deno.Closer & { - writable: import("stream/web").WritableStream; - }) | null; - get stdout(): T["stdout"] extends "piped" ? Deno.Reader & Deno.Closer & { - readable: import("stream/web").ReadableStream; - } : (Deno.Reader & Deno.Closer & { - readable: import("stream/web").ReadableStream; - }) | null; - get stderr(): T["stderr"] extends "piped" ? Deno.Reader & Deno.Closer & { - readable: import("stream/web").ReadableStream; - } : (Deno.Reader & Deno.Closer & { - readable: import("stream/web").ReadableStream; - }) | null; - status(): Promise; - output(): Promise; - stderrOutput(): Promise; - close(): void; - kill(signo: string): void; - } - - /** - * Spawns new subprocess. RunOptions must contain at a minimum the `opt.cmd`, - * an array of program arguments, the first of which is the binary. - * - * ```ts - * const p = Deno.run({ - * cmd: ["curl", "https://example.com"], - * }); - * const status = await p.status(); - * ``` - * - * Subprocess uses same working directory as parent process unless `opt.cwd` - * is specified. - * - * Environmental variables from parent process can be cleared using `opt.clearEnv`. - * Doesn't guarantee that only `opt.env` variables are present, - * as the OS may set environmental variables for processes. - * - * Environmental variables for subprocess can be specified using `opt.env` - * mapping. - * - * `opt.uid` sets the child process’s user ID. This translates to a setuid call - * in the child process. Failure in the setuid call will cause the spawn to fail. - * - * `opt.gid` is similar to `opt.uid`, but sets the group ID of the child process. - * This has the same semantics as the uid field. - * - * By default subprocess inherits stdio of parent process. To change that - * `opt.stdout`, `opt.stderr` and `opt.stdin` can be specified independently - - * they can be set to either an rid of open file or set to "inherit" "piped" - * or "null": - * - * `"inherit"` The default if unspecified. The child inherits from the - * corresponding parent descriptor. - * - * `"piped"` A new pipe should be arranged to connect the parent and child - * sub-processes. - * - * `"null"` This stream will be ignored. This is the equivalent of attaching - * the stream to `/dev/null`. - * - * Details of the spawned process are returned. - * - * Requires `allow-run` permission. - * - * @tags allow-run - * @category Sub Process - */ - export function run(opt: T): Process; - /** @category Sub Process */ - export function run(opt: T): Process; - /** - * Shutdown socket send operations. - * - * Matches behavior of POSIX shutdown(3). - * - * ```ts - * const listener = Deno.listen({ port: 80 }); - * const conn = await listener.accept(); - * Deno.shutdown(conn.rid); - * ``` - * - * @category Network - */ - export function shutdown(rid: number): Promise; - /** - * Resolves to a `Deno.FileInfo` for the specified `path`. Will always - * follow symlinks. - * - * ```ts - * import { assert } from "https://deno.land/std/testing/asserts.ts"; - * const fileInfo = await Deno.stat("hello.txt"); - * assert(fileInfo.isFile); - * ``` - * - * Requires `allow-read` permission. - * - * @tags allow-read - * @category File System - */ - export function stat(path: string | URL): Promise; - /** - * Synchronously returns a `Deno.FileInfo` for the specified `path`. Will - * always follow symlinks. - * - * ```ts - * import { assert } from "https://deno.land/std/testing/asserts.ts"; - * const fileInfo = Deno.statSync("hello.txt"); - * assert(fileInfo.isFile); - * ``` - * - * Requires `allow-read` permission. - * - * @tags allow-read - * @category File System - */ - export function statSync(path: string | URL): FileInfo; - /** - * Creates `newpath` as a symbolic link to `oldpath`. - * - * The options.type parameter can be set to `file` or `dir`. This argument is only - * available on Windows and ignored on other platforms. - * - * ```ts - * await Deno.symlink("old/name", "new/name"); - * ``` - * - * Requires full `allow-read` and `allow-write` permissions. - * - * @tags allow-read, allow-write - * @category File System - */ - export function symlink(oldpath: string | URL, newpath: string | URL, options?: SymlinkOptions): Promise; - /** - * Creates `newpath` as a symbolic link to `oldpath`. - * - * The options.type parameter can be set to `file` or `dir`. This argument is only - * available on Windows and ignored on other platforms. - * - * ```ts - * Deno.symlinkSync("old/name", "new/name"); - * ``` - * - * Requires full `allow-read` and `allow-write` permissions. - * - * @tags allow-read, allow-write - * @category File System - */ - export function symlinkSync(oldpath: string | URL, newpath: string | URL, options?: SymlinkOptions): void; - /** - * Register a test which will be run when `deno test` is used on the command - * line and the containing module looks like a test module. - * `fn` can be async if required. - * ```ts - * import {assert, fail, assertEquals} from "https://deno.land/std/testing/asserts.ts"; - * - * Deno.test({ - * name: "example test", - * fn(): void { - * assertEquals("world", "world"); - * }, - * }); - * - * Deno.test({ - * name: "example ignored test", - * ignore: Deno.build.os === "windows", - * fn(): void { - * // This test is ignored only on Windows machines - * }, - * }); - * - * Deno.test({ - * name: "example async test", - * async fn() { - * const decoder = new TextDecoder("utf-8"); - * const data = await Deno.readFile("hello_world.txt"); - * assertEquals(decoder.decode(data), "Hello world"); - * } - * }); - * ``` - */ - export function test(t: TestDefinition): void; - /** - * Register a test which will be run when `deno test` is used on the command - * line and the containing module looks like a test module. - * `fn` can be async if required. - * - * ```ts - * import {assert, fail, assertEquals} from "https://deno.land/std/testing/asserts.ts"; - * - * Deno.test("My test description", (): void => { - * assertEquals("hello", "hello"); - * }); - * - * Deno.test("My async test description", async (): Promise => { - * const decoder = new TextDecoder("utf-8"); - * const data = await Deno.readFile("hello_world.txt"); - * assertEquals(decoder.decode(data), "Hello world"); - * }); - * ``` - */ - export function test(name: string, fn: (t: TestContext) => void | Promise): void; - /** - * Register a test which will be run when `deno test` is used on the command - * line and the containing module looks like a test module. - * `fn` can be async if required. Declared function must have a name. - * - * ```ts - * import {assert, fail, assertEquals} from "https://deno.land/std/testing/asserts.ts"; - * - * Deno.test(function myTestName(): void { - * assertEquals("hello", "hello"); - * }); - * - * Deno.test(async function myOtherTestName(): Promise { - * const decoder = new TextDecoder("utf-8"); - * const data = await Deno.readFile("hello_world.txt"); - * assertEquals(decoder.decode(data), "Hello world"); - * }); - * ``` - */ - export function test(fn: (t: TestContext) => void | Promise): void; - /** - * Register a test which will be run when `deno test` is used on the command - * line and the containing module looks like a test module. - * `fn` can be async if required. - * - * ```ts - * import {assert, fail, assertEquals} from "https://deno.land/std/testing/asserts.ts"; - * - * Deno.test("My test description", { permissions: { read: true } }, (): void => { - * assertEquals("hello", "hello"); - * }); - * - * Deno.test("My async test description", { permissions: { read: false } }, async (): Promise => { - * const decoder = new TextDecoder("utf-8"); - * const data = await Deno.readFile("hello_world.txt"); - * assertEquals(decoder.decode(data), "Hello world"); - * }); - * ``` - */ - export function test(name: string, options: Omit, fn: (t: TestContext) => void | Promise): void; - /** - * Register a test which will be run when `deno test` is used on the command - * line and the containing module looks like a test module. - * `fn` can be async if required. - * - * ```ts - * import {assert, fail, assertEquals} from "https://deno.land/std/testing/asserts.ts"; - * - * Deno.test({ name: "My test description", permissions: { read: true } }, (): void => { - * assertEquals("hello", "hello"); - * }); - * - * Deno.test({ name: "My async test description", permissions: { read: false } }, async (): Promise => { - * const decoder = new TextDecoder("utf-8"); - * const data = await Deno.readFile("hello_world.txt"); - * assertEquals(decoder.decode(data), "Hello world"); - * }); - * ``` - */ - export function test(options: Omit, fn: (t: TestContext) => void | Promise): void; - /** - * Register a test which will be run when `deno test` is used on the command - * line and the containing module looks like a test module. - * `fn` can be async if required. Declared function must have a name. - * - * ```ts - * import {assert, fail, assertEquals} from "https://deno.land/std/testing/asserts.ts"; - * - * Deno.test({ permissions: { read: true } }, function myTestName(): void { - * assertEquals("hello", "hello"); - * }); - * - * Deno.test({ permissions: { read: false } }, async function myOtherTestName(): Promise { - * const decoder = new TextDecoder("utf-8"); - * const data = await Deno.readFile("hello_world.txt"); - * assertEquals(decoder.decode(data), "Hello world"); - * }); - * ``` - */ - export function test(options: Omit, fn: (t: TestContext) => void | Promise): void; - /** - * Truncates or extends the specified file, to reach the specified `len`. If - * `len` is not specified then the entire file contents are truncated. - * - * ```ts - * // truncate the entire file - * await Deno.truncate("my_file.txt"); - * - * // truncate part of the file - * const file = await Deno.makeTempFile(); - * await Deno.writeFile(file, new TextEncoder().encode("Hello World")); - * await Deno.truncate(file, 7); - * const data = await Deno.readFile(file); - * console.log(new TextDecoder().decode(data)); // "Hello W" - * ``` - * - * Requires `allow-write` permission. - * - * @tags allow-write - * @category File System - */ - export function truncate(name: string, len?: number): Promise; - /** - * Synchronously truncates or extends the specified file, to reach the - * specified `len`. If `len` is not specified then the entire file contents - * are truncated. - * - * ```ts - * // truncate the entire file - * Deno.truncateSync("my_file.txt"); - * - * // truncate part of the file - * const file = Deno.makeTempFileSync(); - * Deno.writeFileSync(file, new TextEncoder().encode("Hello World")); - * Deno.truncateSync(file, 7); - * const data = Deno.readFileSync(file); - * console.log(new TextDecoder().decode(data)); - * ``` - * - * Requires `allow-write` permission. - * - * @tags allow-write - * @category File System - */ - export function truncateSync(name: string, len?: number): void; - /** - * Watch for file system events against one or more `paths`, which can be files - * or directories. These paths must exist already. One user action (e.g. - * `touch test.file`) can generate multiple file system events. Likewise, - * one user action can result in multiple file paths in one event (e.g. `mv - * old_name.txt new_name.txt`). Recursive option is `true` by default and, - * for directories, will watch the specified directory and all sub directories. - * Note that the exact ordering of the events can vary between operating systems. - * - * ```ts - * const watcher = Deno.watchFs("/"); - * for await (const event of watcher) { - * console.log(">>>> event", event); - * // { kind: "create", paths: [ "/foo.txt" ] } - * } - * ``` - * - * Requires `allow-read` permission. - * - * Call `watcher.close()` to stop watching. - * - * ```ts - * const watcher = Deno.watchFs("/"); - * - * setTimeout(() => { - * watcher.close(); - * }, 5000); - * - * for await (const event of watcher) { - * console.log(">>>> event", event); - * } - * ``` - * - * @tags allow-read - * @category File System - */ - export function watchFs(paths: string | string[], options?: { recursive: boolean }): FsWatcher; - /** - * Write to the resource ID (`rid`) the contents of the array buffer (`data`). - * - * Resolves to the number of bytes written. This function is one of the lowest - * level APIs and most users should not work with this directly, but rather use - * `writeAll()` from https://deno.land/std/streams/conversion.ts instead. - * - * **It is not guaranteed that the full buffer will be written in a single - * call.** - * - * ```ts - * const encoder = new TextEncoder(); - * const data = encoder.encode("Hello world"); - * const file = await Deno.open("/foo/bar.txt", { write: true }); - * const bytesWritten = await Deno.write(file.rid, data); // 11 - * Deno.close(file.rid); - * ``` - * - * @category I/O - */ - export function write(rid: number, data: Uint8Array): Promise; - /** - * Write `data` to the given `path`, by default creating a new file if needed, - * else overwriting. - * - * ```ts - * const encoder = new TextEncoder(); - * const data = encoder.encode("Hello world\n"); - * await Deno.writeFile("hello1.txt", data); // overwrite "hello1.txt" or create it - * await Deno.writeFile("hello2.txt", data, {create: false}); // only works if "hello2.txt" exists - * await Deno.writeFile("hello3.txt", data, {mode: 0o777}); // set permissions on new file - * await Deno.writeFile("hello4.txt", data, {append: true}); // add data to the end of the file - * ``` - * - * Requires `allow-write` permission, and `allow-read` if `options.create` is `false`. - * - * @tags allow-read, allow-write - * @category File System - */ - export function writeFile(path: string | URL, data: Uint8Array, options?: WriteFileOptions): Promise; - /** - * Synchronously write `data` to the given `path`, by default creating a new - * file if needed, else overwriting. - * - * ```ts - * const encoder = new TextEncoder(); - * const data = encoder.encode("Hello world\n"); - * Deno.writeFileSync("hello1.txt", data); // overwrite "hello1.txt" or create it - * Deno.writeFileSync("hello2.txt", data, {create: false}); // only works if "hello2.txt" exists - * Deno.writeFileSync("hello3.txt", data, {mode: 0o777}); // set permissions on new file - * Deno.writeFileSync("hello4.txt", data, {append: true}); // add data to the end of the file - * ``` - * - * Requires `allow-write` permission, and `allow-read` if `options.create` is - * `false`. - * - * @tags allow-read, allow-write - * @category File System - */ - export function writeFileSync(path: string | URL, data: Uint8Array, options?: WriteFileOptions): void; - /** - * Synchronously write to the resource ID (`rid`) the contents of the array - * buffer (`data`). - * - * Returns the number of bytes written. This function is one of the lowest - * level APIs and most users should not work with this directly, but rather use - * `writeAllSync()` from https://deno.land/std/streams/conversion.ts instead. - * - * **It is not guaranteed that the full buffer will be written in a single - * call.** - * - * ```ts - * const encoder = new TextEncoder(); - * const data = encoder.encode("Hello world"); - * const file = Deno.openSync("/foo/bar.txt", {write: true}); - * const bytesWritten = Deno.writeSync(file.rid, data); // 11 - * Deno.close(file.rid); - * ``` - * - * @category I/O - */ - export function writeSync(rid: number, data: Uint8Array): number; - /** - * Asynchronously write string `data` to the given `path`, by default creating a new file if needed, - * else overwriting. - * - * ```ts - * await Deno.writeTextFile("hello1.txt", "Hello world\n"); // overwrite "hello1.txt" or create it - * ``` - * - * Requires `allow-write` permission, and `allow-read` if `options.create` is `false`. - * - * @tags allow-read, allow-write - * @category File System - */ - export function writeTextFile(path: string | URL, data: string, options?: WriteFileOptions): Promise; - /** - * Synchronously write string `data` to the given `path`, by default creating a new file if needed, - * else overwriting. - * - * ```ts - * Deno.writeTextFileSync("hello1.txt", "Hello world\n"); // overwrite "hello1.txt" or create it - * ``` - * - * Requires `allow-write` permission, and `allow-read` if `options.create` is `false`. - * - * @tags allow-read, allow-write - * @category File System - */ - export function writeTextFileSync(path: string | URL, data: string, options?: WriteFileOptions): void; - /** - * Returns the script arguments to the program. If for example we run a - * program: - * - * deno run --allow-read https://deno.land/std/examples/cat.ts /etc/passwd - * - * Then `Deno.args` will contain: - * - * [ "/etc/passwd" ] - * - * @category Runtime Environment - */ - export const args: string[]; - /** @category Network */ - export type Addr = NetAddr | UnixAddr; - - /** @category I/O */ - export interface Closer { - close(): void; - } - - /** @category Network */ - export interface Conn extends Reader, Writer, Closer { - /** The local address of the connection. */ - readonly localAddr: Addr; - /** The remote address of the connection. */ - readonly remoteAddr: Addr; - /** The resource ID of the connection. */ - readonly rid: number; - readonly readable: ReadableStream; - readonly writable: WritableStream; - /** - * Shuts down (`shutdown(2)`) the write side of the connection. Most - * callers should just use `close()`. - */ - closeWrite(): Promise; - } - - /** @category Network */ - export interface ConnectOptions { - /** The port to connect to. */ - port: number; - /** - * A literal IP address or host name that can be resolved to an IP address. - * If not specified, defaults to `127.0.0.1`. - */ - hostname?: string; - transport?: "tcp"; - } - - /** @category Network */ - export interface ConnectTlsOptions { - /** The port to connect to. */ - port: number; - /** - * A literal IP address or host name that can be resolved to an IP address. - * If not specified, defaults to `127.0.0.1`. - */ - hostname?: string; - /** - * Server certificate file. - * - * @deprecated This option is deprecated and will be removed in a future - * release. - */ - certFile?: string; - /** - * A list of root certificates that will be used in addition to the - * default root certificates to verify the peer's certificate. - * - * Must be in PEM format. - */ - caCerts?: string[]; - } - - export interface ConnectTlsOptions { - /** PEM formatted client certificate chain. */ - certChain?: string; - /** PEM formatted (RSA or PKCS8) private key of client certificate. */ - privateKey?: string; - /** - * *UNSTABLE**: new API, yet to be vetted. - * - * Application-Layer Protocol Negotiation (ALPN) protocols supported by - * the client. If not specified, no ALPN extension will be included in the - * TLS handshake. - */ - alpnProtocols?: string[]; - } - - /** @category File System */ - export interface DirEntry { - name: string; - isFile: boolean; - isDirectory: boolean; - isSymlink: boolean; - } - - /** @category Permissions */ - export interface EnvPermissionDescriptor { - name: "env"; - variable?: string; - } - - /** @category Permissions */ - export interface FfiPermissionDescriptor { - name: "ffi"; - path?: string | URL; - } - - /** - * A FileInfo describes a file and is returned by `stat`, `lstat`, - * `statSync`, `lstatSync`. - * - * @category File System - */ - export interface FileInfo { - /** - * True if this is info for a regular file. Mutually exclusive to - * `FileInfo.isDirectory` and `FileInfo.isSymlink`. - */ - isFile: boolean; - /** - * True if this is info for a regular directory. Mutually exclusive to - * `FileInfo.isFile` and `FileInfo.isSymlink`. - */ - isDirectory: boolean; - /** - * True if this is info for a symlink. Mutually exclusive to - * `FileInfo.isFile` and `FileInfo.isDirectory`. - */ - isSymlink: boolean; - /** The size of the file, in bytes. */ - size: number; - /** - * The last modification time of the file. This corresponds to the `mtime` - * field from `stat` on Linux/Mac OS and `ftLastWriteTime` on Windows. This - * may not be available on all platforms. - */ - mtime: Date | null; - /** - * The last access time of the file. This corresponds to the `atime` - * field from `stat` on Unix and `ftLastAccessTime` on Windows. This may not - * be available on all platforms. - */ - atime: Date | null; - /** - * The creation time of the file. This corresponds to the `birthtime` - * field from `stat` on Mac/BSD and `ftCreationTime` on Windows. This may - * not be available on all platforms. - */ - birthtime: Date | null; - /** - * ID of the device containing the file. - * - * _Linux/Mac OS only._ - */ - dev: number | null; - /** - * Inode number. - * - * _Linux/Mac OS only._ - */ - ino: number | null; - /** - * *UNSTABLE**: Match behavior with Go on Windows for `mode`. - * - * The underlying raw `st_mode` bits that contain the standard Unix - * permissions for this file/directory. - */ - mode: number | null; - /** - * Number of hard links pointing to this file. - * - * _Linux/Mac OS only._ - */ - nlink: number | null; - /** - * User ID of the owner of this file. - * - * _Linux/Mac OS only._ - */ - uid: number | null; - /** - * Group ID of the owner of this file. - * - * _Linux/Mac OS only._ - */ - gid: number | null; - /** - * Device ID of this file. - * - * _Linux/Mac OS only._ - */ - rdev: number | null; - /** - * Blocksize for filesystem I/O. - * - * _Linux/Mac OS only._ - */ - blksize: number | null; - /** - * Number of blocks allocated to the file, in 512-byte units. - * - * _Linux/Mac OS only._ - */ - blocks: number | null; - } - - /** @category File System */ - export interface FsEvent { - kind: "any" | "access" | "create" | "modify" | "remove" | "other"; - paths: string[]; - flag?: FsEventFlag; - } - - /** - * Additional information for FsEvent objects with the "other" kind. - * - * - "rescan": rescan notices indicate either a lapse in the events or a - * change in the filesystem such that events received so far can no longer - * be relied on to represent the state of the filesystem now. An - * application that simply reacts to file changes may not care about this. - * An application that keeps an in-memory representation of the filesystem - * will need to care, and will need to refresh that representation directly - * from the filesystem. - * - * @category File System - */ - export type FsEventFlag = "rescan"; - - /** - * FsWatcher is returned by `Deno.watchFs` function when you start watching - * the file system. You can iterate over this interface to get the file - * system events, and also you can stop watching the file system by calling - * `.close()` method. - * - * @category File System - */ - export interface FsWatcher extends AsyncIterable { - /** The resource id of the `FsWatcher`. */ - readonly rid: number; - /** Stops watching the file system and closes the watcher resource. */ - close(): void; - /** - * Stops watching the file system and closes the watcher resource. - * - * @deprecated Will be removed at 2.0. - */ - return?(value?: any): Promise>; - [Symbol.asyncIterator](): AsyncIterableIterator; - } - - /** @category Permissions */ - export interface HrtimePermissionDescriptor { - name: "hrtime"; - } - - /** @category Console and Debugging */ - export interface InspectOptions { - /** Stylize output with ANSI colors. Defaults to false. */ - colors?: boolean; - /** - * Try to fit more than one entry of a collection on the same line. - * Defaults to true. - */ - compact?: boolean; - /** Traversal depth for nested objects. Defaults to 4. */ - depth?: number; - /** The maximum number of iterable entries to print. Defaults to 100. */ - iterableLimit?: number; - /** Show a Proxy's target and handler. Defaults to false. */ - showProxy?: boolean; - /** Sort Object, Set and Map entries by key. Defaults to false. */ - sorted?: boolean; - /** Add a trailing comma for multiline collections. Defaults to false. */ - trailingComma?: boolean; - /** Evaluate the result of calling getters. Defaults to false. */ - getters?: boolean; - /** Show an object's non-enumerable properties. Defaults to false. */ - showHidden?: boolean; - /** The maximum length of a string before it is truncated with an ellipsis */ - strAbbreviateSize?: number; - } - - /** - * A generic network listener for stream-oriented protocols. - * - * @category Network - */ - export interface Listener extends AsyncIterable { - /** Return the address of the `Listener`. */ - readonly addr: Addr; - /** Return the rid of the `Listener`. */ - readonly rid: number; - /** Waits for and resolves to the next connection to the `Listener`. */ - accept(): Promise; - /** - * Close closes the listener. Any pending accept promises will be rejected - * with errors. - */ - close(): void; - [Symbol.asyncIterator](): AsyncIterableIterator; - } - - /** @category Network */ - export interface Listener extends AsyncIterable { - /** - * *UNSTABLE**: new API, yet to be vetted. - * - * Make the listener block the event loop from finishing. - * - * Note: the listener blocks the event loop from finishing by default. - * This method is only meaningful after `.unref()` is called. - */ - ref(): void; - /** - * *UNSTABLE**: new API, yet to be vetted. - * - * Make the listener not block the event loop from finishing. - */ - unref(): void; - } - - /** @category Network */ - export interface ListenOptions { - /** The port to listen on. */ - port: number; - /** - * A literal IP address or host name that can be resolved to an IP address. - * If not specified, defaults to `0.0.0.0`. - * - * __Note about `0.0.0.0`__ While listening `0.0.0.0` works on all platforms, - * the browsers on Windows don't work with the address `0.0.0.0`. - * You should show the message like `server running on localhost:8080` instead of - * `server running on 0.0.0.0:8080` if your program supports Windows. - */ - hostname?: string; - } - - /** @category Network */ - export interface ListenTlsOptions extends ListenOptions { - /** Server private key in PEM format */ - key?: string; - /** Cert chain in PEM format */ - cert?: string; - /** - * Path to a file containing a PEM formatted CA certificate. Requires - * `--allow-read`. - * - * @tags allow-read - * @deprecated This option is deprecated and will be removed in Deno 2.0. - */ - certFile?: string; - /** - * Server private key file. Requires `--allow-read`. - * - * @tags allow-read - * @deprecated This option is deprecated and will be removed in Deno 2.0. - */ - keyFile?: string; - transport?: "tcp"; - } - - /** @category Network */ - export interface ListenTlsOptions { - /** - * *UNSTABLE**: new API, yet to be vetted. - * - * Application-Layer Protocol Negotiation (ALPN) protocols to announce to - * the client. If not specified, no ALPN extension will be included in the - * TLS handshake. - */ - alpnProtocols?: string[]; - } - - /** @category File System */ - export interface MakeTempOptions { - /** - * Directory where the temporary directory should be created (defaults to - * the env variable TMPDIR, or the system's default, usually /tmp). - * - * Note that if the passed `dir` is relative, the path returned by - * makeTempFile() and makeTempDir() will also be relative. Be mindful of - * this when changing working directory. - */ - dir?: string; - /** - * String that should precede the random portion of the temporary - * directory's name. - */ - prefix?: string; - /** - * String that should follow the random portion of the temporary - * directory's name. - */ - suffix?: string; - } - - /** @category Runtime Environment */ - export interface MemoryUsage { - rss: number; - heapTotal: number; - heapUsed: number; - external: number; - } - - /** @category Observability */ - export interface Metrics extends OpMetrics { - ops: Record; - } - - /** @category File System */ - export interface MkdirOptions { - /** - * Defaults to `false`. If set to `true`, means that any intermediate - * directories will also be created (as with the shell command `mkdir -p`). - * Intermediate directories are created with the same permissions. - * When recursive is set to `true`, succeeds silently (without changing any - * permissions) if a directory already exists at the path, or if the path - * is a symlink to an existing directory. - */ - recursive?: boolean; - /** - * Permissions to use when creating the directory (defaults to `0o777`, - * before the process's umask). - * Ignored on Windows. - */ - mode?: number; - } - - /** @category Network */ - export interface NetAddr { - transport: "tcp" | "udp"; - hostname: string; - port: number; - } - - /** @category Permissions */ - export interface NetPermissionDescriptor { - name: "net"; - /** - * Optional host string of the form `"[:]"`. Examples: - * - * "github.com" - * "deno.land:8080" - */ - host?: string; - } - - /** @category File System */ - export interface OpenOptions { - /** - * Sets the option for read access. This option, when `true`, means that the - * file should be read-able if opened. - */ - read?: boolean; - /** - * Sets the option for write access. This option, when `true`, means that - * the file should be write-able if opened. If the file already exists, - * any write calls on it will overwrite its contents, by default without - * truncating it. - */ - write?: boolean; - /** - * Sets the option for the append mode. This option, when `true`, means that - * writes will append to a file instead of overwriting previous contents. - * Note that setting `{ write: true, append: true }` has the same effect as - * setting only `{ append: true }`. - */ - append?: boolean; - /** - * Sets the option for truncating a previous file. If a file is - * successfully opened with this option set it will truncate the file to `0` - * size if it already exists. The file must be opened with write access - * for truncate to work. - */ - truncate?: boolean; - /** - * Sets the option to allow creating a new file, if one doesn't already - * exist at the specified path. Requires write or append access to be - * used. - */ - create?: boolean; - /** - * Defaults to `false`. If set to `true`, no file, directory, or symlink is - * allowed to exist at the target location. Requires write or append - * access to be used. When createNew is set to `true`, create and truncate - * are ignored. - */ - createNew?: boolean; - /** - * Permissions to use if creating the file (defaults to `0o666`, before - * the process's umask). - * Ignored on Windows. - */ - mode?: number; - } - - /** @category Observability */ - export interface OpMetrics { - opsDispatched: number; - opsDispatchedSync: number; - opsDispatchedAsync: number; - opsDispatchedAsyncUnref: number; - opsCompleted: number; - opsCompletedSync: number; - opsCompletedAsync: number; - opsCompletedAsyncUnref: number; - bytesSentControl: number; - bytesSentData: number; - bytesReceived: number; - } - - /** - * Permission descriptors which define a permission and can be queried, - * requested, or revoked. - * - * @category Permissions - */ - export type PermissionDescriptor = | RunPermissionDescriptor - | ReadPermissionDescriptor - | WritePermissionDescriptor - | NetPermissionDescriptor - | EnvPermissionDescriptor - | FfiPermissionDescriptor - | HrtimePermissionDescriptor; - /** - * The name of a "powerful feature" which needs permission. - * - * @category Permissions - */ - export type PermissionName = | "run" - | "read" - | "write" - | "net" - | "env" - | "ffi" - | "hrtime"; - /** @category Permissions */ - export type PermissionOptions = "inherit" | "none" | PermissionOptionsObject; - - /** @category Permissions */ - export interface PermissionOptionsObject { - /** - * Specifies if the `env` permission should be requested or revoked. - * If set to `"inherit"`, the current `env` permission will be inherited. - * If set to `true`, the global `env` permission will be requested. - * If set to `false`, the global `env` permission will be revoked. - * - * Defaults to `false`. - */ - env?: "inherit" | boolean | string[]; - /** - * Specifies if the `hrtime` permission should be requested or revoked. - * If set to `"inherit"`, the current `hrtime` permission will be inherited. - * If set to `true`, the global `hrtime` permission will be requested. - * If set to `false`, the global `hrtime` permission will be revoked. - * - * Defaults to `false`. - */ - hrtime?: "inherit" | boolean; - /** - * Specifies if the `net` permission should be requested or revoked. - * if set to `"inherit"`, the current `net` permission will be inherited. - * if set to `true`, the global `net` permission will be requested. - * if set to `false`, the global `net` permission will be revoked. - * if set to `string[]`, the `net` permission will be requested with the - * specified host strings with the format `"[:]`. - * - * Defaults to `false`. - * - * Examples: - * - * ```ts - * import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; - * - * Deno.test({ - * name: "inherit", - * permissions: { - * net: "inherit", - * }, - * async fn() { - * const status = await Deno.permissions.query({ name: "net" }) - * assertEquals(status.state, "granted"); - * }, - * }); - * ``` - * - * ```ts - * import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; - * - * Deno.test({ - * name: "true", - * permissions: { - * net: true, - * }, - * async fn() { - * const status = await Deno.permissions.query({ name: "net" }); - * assertEquals(status.state, "granted"); - * }, - * }); - * ``` - * - * ```ts - * import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; - * - * Deno.test({ - * name: "false", - * permissions: { - * net: false, - * }, - * async fn() { - * const status = await Deno.permissions.query({ name: "net" }); - * assertEquals(status.state, "denied"); - * }, - * }); - * ``` - * - * ```ts - * import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; - * - * Deno.test({ - * name: "localhost:8080", - * permissions: { - * net: ["localhost:8080"], - * }, - * async fn() { - * const status = await Deno.permissions.query({ name: "net", host: "localhost:8080" }); - * assertEquals(status.state, "granted"); - * }, - * }); - * ``` - */ - net?: "inherit" | boolean | string[]; - /** - * Specifies if the `ffi` permission should be requested or revoked. - * If set to `"inherit"`, the current `ffi` permission will be inherited. - * If set to `true`, the global `ffi` permission will be requested. - * If set to `false`, the global `ffi` permission will be revoked. - * - * Defaults to `false`. - */ - ffi?: "inherit" | boolean | Array; - /** - * Specifies if the `read` permission should be requested or revoked. - * If set to `"inherit"`, the current `read` permission will be inherited. - * If set to `true`, the global `read` permission will be requested. - * If set to `false`, the global `read` permission will be revoked. - * If set to `Array`, the `read` permission will be requested with the - * specified file paths. - * - * Defaults to `false`. - */ - read?: "inherit" | boolean | Array; - /** - * Specifies if the `run` permission should be requested or revoked. - * If set to `"inherit"`, the current `run` permission will be inherited. - * If set to `true`, the global `run` permission will be requested. - * If set to `false`, the global `run` permission will be revoked. - * - * Defaults to `false`. - */ - run?: "inherit" | boolean | Array; - /** - * Specifies if the `write` permission should be requested or revoked. - * If set to `"inherit"`, the current `write` permission will be inherited. - * If set to `true`, the global `write` permission will be requested. - * If set to `false`, the global `write` permission will be revoked. - * If set to `Array`, the `write` permission will be requested with the - * specified file paths. - * - * Defaults to `false`. - */ - write?: "inherit" | boolean | Array; - } - - /** - * The current status of the permission. - * - * @category Permissions - */ - export type PermissionState = "granted" | "denied" | "prompt"; - - /** @category Permissions */ - export interface PermissionStatusEventMap { - "change": Event; - } - - /** @category Sub Process */ - export type ProcessStatus = | { - success: true; - code: 0; - signal?: undefined; - } - | { - success: false; - code: number; - signal?: number; - }; - - /** @category I/O */ - export interface Reader { - /** - * Reads up to `p.byteLength` bytes into `p`. It resolves to the number of - * bytes read (`0` < `n` <= `p.byteLength`) and rejects if any error - * encountered. Even if `read()` resolves to `n` < `p.byteLength`, it may - * use all of `p` as scratch space during the call. If some data is - * available but not `p.byteLength` bytes, `read()` conventionally resolves - * to what is available instead of waiting for more. - * - * When `read()` encounters end-of-file condition, it resolves to EOF - * (`null`). - * - * When `read()` encounters an error, it rejects with an error. - * - * Callers should always process the `n` > `0` bytes returned before - * considering the EOF (`null`). Doing so correctly handles I/O errors that - * happen after reading some bytes and also both of the allowed EOF - * behaviors. - * - * Implementations should not retain a reference to `p`. - * - * Use `itereateReader` from from https://deno.land/std/streams/conversion.ts to - * turn a Reader into an AsyncIterator. - */ - read(p: Uint8Array): Promise; - } - - /** @category I/O */ - export interface ReaderSync { - /** - * Reads up to `p.byteLength` bytes into `p`. It resolves to the number - * of bytes read (`0` < `n` <= `p.byteLength`) and rejects if any error - * encountered. Even if `readSync()` returns `n` < `p.byteLength`, it may use - * all of `p` as scratch space during the call. If some data is available - * but not `p.byteLength` bytes, `readSync()` conventionally returns what is - * available instead of waiting for more. - * - * When `readSync()` encounters end-of-file condition, it returns EOF - * (`null`). - * - * When `readSync()` encounters an error, it throws with an error. - * - * Callers should always process the `n` > `0` bytes returned before - * considering the EOF (`null`). Doing so correctly handles I/O errors that happen - * after reading some bytes and also both of the allowed EOF behaviors. - * - * Implementations should not retain a reference to `p`. - * - * Use `iterateReaderSync()` from from https://deno.land/std/streams/conversion.ts - * to turn a ReaderSync into an Iterator. - */ - readSync(p: Uint8Array): number | null; - } - - /** @category File System */ - export interface ReadFileOptions { - /** - * An abort signal to allow cancellation of the file read operation. - * If the signal becomes aborted the readFile operation will be stopped - * and the promise returned will be rejected with an AbortError. - */ - signal?: AbortSignal; - } - - /** @category Permissions */ - export interface ReadPermissionDescriptor { - name: "read"; - path?: string | URL; - } - - /** @category File System */ - export interface RemoveOptions { - /** - * Defaults to `false`. If set to `true`, path will be removed even if - * it's a non-empty directory. - */ - recursive?: boolean; - } - - /** @category Observability */ - export interface ResourceMap { - [rid: number]: any; - } - - /** @category Sub Process */ - export interface RunOptions { - /** - * Arguments to pass. Note, the first element needs to be a path to the - * binary - */ - cmd: readonly string[] | [URL, ...string[]]; - cwd?: string; - env?: { - [key: string]: string; - }; - stdout?: "inherit" | "piped" | "null" | number; - stderr?: "inherit" | "piped" | "null" | number; - stdin?: "inherit" | "piped" | "null" | number; - } - - /** @category Permissions */ - export interface RunPermissionDescriptor { - name: "run"; - command?: string | URL; - } - - /** @category I/O */ - export interface Seeker { - /** - * Seek sets the offset for the next `read()` or `write()` to offset, - * interpreted according to `whence`: `Start` means relative to the - * start of the file, `Current` means relative to the current offset, - * and `End` means relative to the end. Seek resolves to the new offset - * relative to the start of the file. - * - * Seeking to an offset before the start of the file is an error. Seeking to - * any positive offset is legal, but the behavior of subsequent I/O - * operations on the underlying object is implementation-dependent. - * It returns the number of cursor position. - */ - seek(offset: number, whence: SeekMode): Promise; - } - - /** @category I/O */ - export interface SeekerSync { - /** - * Seek sets the offset for the next `readSync()` or `writeSync()` to - * offset, interpreted according to `whence`: `Start` means relative - * to the start of the file, `Current` means relative to the current - * offset, and `End` means relative to the end. - * - * Seeking to an offset before the start of the file is an error. Seeking to - * any positive offset is legal, but the behavior of subsequent I/O - * operations on the underlying object is implementation-dependent. - */ - seekSync(offset: number, whence: SeekMode): number; - } - - /** @category Runtime Environment */ - export type Signal = | "SIGABRT" - | "SIGALRM" - | "SIGBREAK" - | "SIGBUS" - | "SIGCHLD" - | "SIGCONT" - | "SIGEMT" - | "SIGFPE" - | "SIGHUP" - | "SIGILL" - | "SIGINFO" - | "SIGINT" - | "SIGIO" - | "SIGKILL" - | "SIGPIPE" - | "SIGPROF" - | "SIGPWR" - | "SIGQUIT" - | "SIGSEGV" - | "SIGSTKFLT" - | "SIGSTOP" - | "SIGSYS" - | "SIGTERM" - | "SIGTRAP" - | "SIGTSTP" - | "SIGTTIN" - | "SIGTTOU" - | "SIGURG" - | "SIGUSR1" - | "SIGUSR2" - | "SIGVTALRM" - | "SIGWINCH" - | "SIGXCPU" - | "SIGXFSZ"; - /** @category File System */ - export type SymlinkOptions = { - type: "file" | "dir"; - }; - - /** @category Testing */ - export interface TestDefinition { - fn: (t: TestContext) => void | Promise; - /** - * The current test name. - */ - name: string; - ignore?: boolean; - /** - * If at least one test has `only` set to true, only run tests that have - * `only` set to true and fail the test suite. - */ - only?: boolean; - /** - * Check that the number of async completed ops after the test is the same - * as number of dispatched ops. Defaults to true. - */ - sanitizeOps?: boolean; - /** - * Ensure the test case does not "leak" resources - ie. the resource table - * after the test has exactly the same contents as before the test. Defaults - * to true. - */ - sanitizeResources?: boolean; - /** - * Ensure the test case does not prematurely cause the process to exit, - * for example via a call to `Deno.exit`. Defaults to true. - */ - sanitizeExit?: boolean; - /** - * Specifies the permissions that should be used to run the test. - * Set this to "inherit" to keep the calling thread's permissions. - * Set this to "none" to revoke all permissions. - * - * Defaults to "inherit". - */ - permissions?: PermissionOptions; - } - - /** @category Testing */ - export interface TestStepDefinition { - fn: (t: TestContext) => void | Promise; - /** - * The current test name. - */ - name: string; - ignore?: boolean; - /** - * Check that the number of async completed ops after the test step is the same - * as number of dispatched ops. Defaults to the parent test or step's value. - */ - sanitizeOps?: boolean; - /** - * Ensure the test step does not "leak" resources - ie. the resource table - * after the test has exactly the same contents as before the test. Defaults - * to the parent test or step's value. - */ - sanitizeResources?: boolean; - /** - * Ensure the test step does not prematurely cause the process to exit, - * for example via a call to `Deno.exit`. Defaults to the parent test or - * step's value. - */ - sanitizeExit?: boolean; - } - - /** @category Testing */ - export interface TestContext { - /** - * The current test name. - */ - name: string; - /** - * File Uri of the current test code. - */ - origin: string; - /** - * Parent test context. - */ - parent?: TestContext; - /** - * Run a sub step of the parent test or step. Returns a promise - * that resolves to a boolean signifying if the step completed successfully. - * The returned promise never rejects unless the arguments are invalid. - * If the test was ignored the promise returns `false`. - */ - step(t: TestStepDefinition): Promise; - /** - * Run a sub step of the parent test or step. Returns a promise - * that resolves to a boolean signifying if the step completed successfully. - * The returned promise never rejects unless the arguments are invalid. - * If the test was ignored the promise returns `false`. - */ - step(name: string, fn: (t: TestContext) => void | Promise): Promise; - } - - /** @category Network */ - export interface TcpConn extends Conn { - /** - * **UNSTABLE**: new API, see https://github.com/denoland/deno/issues/13617. - * - * Enable/disable the use of Nagle's algorithm. Defaults to true. - */ - setNoDelay(nodelay?: boolean): void; - /** - * **UNSTABLE**: new API, see https://github.com/denoland/deno/issues/13617. - * - * Enable/disable keep-alive functionality. - */ - setKeepAlive(keepalive?: boolean): void; - } - - /** @category Network */ - export interface TlsConn extends Conn { - /** - * Runs the client or server handshake protocol to completion if that has - * not happened yet. Calling this method is optional; the TLS handshake - * will be completed automatically as soon as data is sent or received. - */ - handshake(): Promise; - } - - /** @category Network */ - export interface TlsConn extends Conn { - /** - * Runs the client or server handshake protocol to completion if that has - * not happened yet. Calling this method is optional; the TLS handshake - * will be completed automatically as soon as data is sent or received. - */ - handshake(): Promise; - } - - /** - * Specialized listener that accepts TLS connections. - * - * @category Network - */ - export interface TlsListener extends Listener, AsyncIterable { - /** Waits for a TLS client to connect and accepts the connection. */ - accept(): Promise; - [Symbol.asyncIterator](): AsyncIterableIterator; - } - - /** @category Network */ - export interface UnixAddr { - transport: "unix" | "unixpacket"; - path: string; - } - - /** @category Network */ - export interface UnixConn extends Conn { - } - - /** - * Options for writing to a file. - * - * @category File System - */ - export interface WriteFileOptions { - /** - * Defaults to `false`. If set to `true`, will append to a file instead of - * overwriting previous contents. - */ - append?: boolean; - /** - * Sets the option to allow creating a new file, if one doesn't already - * exist at the specified path (defaults to `true`). - */ - create?: boolean; - /** Permissions always applied to file. */ - mode?: number; - /** - * An abort signal to allow cancellation of the file write operation. - * If the signal becomes aborted the writeFile operation will be stopped - * and the promise returned will be rejected with an AbortError. - */ - signal?: AbortSignal; - } - - /** @category Permissions */ - export interface WritePermissionDescriptor { - name: "write"; - path?: string | URL; - } - - /** @category I/O */ - export interface Writer { - /** - * Writes `p.byteLength` bytes from `p` to the underlying data stream. It - * resolves to the number of bytes written from `p` (`0` <= `n` <= - * `p.byteLength`) or reject with the error encountered that caused the - * write to stop early. `write()` must reject with a non-null error if - * would resolve to `n` < `p.byteLength`. `write()` must not modify the - * slice data, even temporarily. - * - * Implementations should not retain a reference to `p`. - */ - write(p: Uint8Array): Promise; - } - - /** @category I/O */ - export interface WriterSync { - /** - * Writes `p.byteLength` bytes from `p` to the underlying data - * stream. It returns the number of bytes written from `p` (`0` <= `n` - * <= `p.byteLength`) and any error encountered that caused the write to - * stop early. `writeSync()` must throw a non-null error if it returns `n` < - * `p.byteLength`. `writeSync()` must not modify the slice data, even - * temporarily. - * - * Implementations should not retain a reference to `p`. - */ - writeSync(p: Uint8Array): number; - } - - /** - * If `resolveDns` is called with "CAA" record type specified, it will return - * an array of this interface. - * - * @category Network - */ - export interface CAARecord { - critical: boolean; - tag: string; - value: string; - } - - /** - * If `resolveDns` is called with "MX" record type specified, it will return - * an array of this interface. - * - * @category Network - */ - export interface MXRecord { - preference: number; - exchange: string; - } - - /** - * If `resolveDns` is called with "NAPTR" record type specified, it will - * return an array of this interface. - * - * @category Network - */ - export interface NAPTRRecord { - order: number; - preference: number; - flags: string; - services: string; - regexp: string; - replacement: string; - } - - /** @category Network */ - export interface ResolveDnsOptions { - /** - * The name server to be used for lookups. - * If not specified, defaults to the system configuration e.g. `/etc/resolv.conf` on Unix. - */ - nameServer?: { - /** The IP address of the name server */ - ipAddr: string; - /** The port number the query will be sent to. - * If not specified, defaults to 53. */ - port?: number; - }; - } - - /** - * If `resolveDns` is called with "SOA" record type specified, it will return - * an array of this interface. - * - * @category Network - */ - export interface SOARecord { - mname: string; - rname: string; - serial: number; - refresh: number; - retry: number; - expire: number; - minimum: number; - } - - /** - * If `resolveDns` is called with "SRV" record type specified, it will return - * an array of this interface. - * - * @category Network - */ - export interface SRVRecord { - priority: number; - weight: number; - port: number; - target: string; - } - - /** - * The type of the resource record. - * Only the listed types are supported currently. - * - * @category Network - */ - export type RecordType = | "A" - | "AAAA" - | "ANAME" - | "CAA" - | "CNAME" - | "MX" - | "NAPTR" - | "NS" - | "PTR" - | "SOA" - | "SRV" - | "TXT"; - /** - * Build related information. - * - * @category Runtime Environment - */ - export const build: { - /** The LLVM target triple */ - target: string; - /** Instruction set architecture */ - arch: "x86_64" | "aarch64"; - /** Operating system */ - os: "darwin" | "linux" | "windows"; - /** Computer vendor */ - vendor: string; - /** Optional environment */ - env?: string; - }; - export const customInspect: unique symbol; - /** - * @tags allow-env - * @category Runtime Environment - */ - export const env: { - /** Retrieve the value of an environment variable. Returns `undefined` if that - * key doesn't exist. - * - * ```ts - * console.log(Deno.env.get("HOME")); // e.g. outputs "/home/alice" - * console.log(Deno.env.get("MADE_UP_VAR")); // outputs "undefined" - * ``` - * Requires `allow-env` permission. - * - * @tags allow-env - */ - get(key: string): string | undefined; - - /** Set the value of an environment variable. - * - * ```ts - * Deno.env.set("SOME_VAR", "Value"); - * Deno.env.get("SOME_VAR"); // outputs "Value" - * ``` - * - * Requires `allow-env` permission. - * - * @tags allow-env - */ - set(key: string, value: string): void; - - /** Delete the value of an environment variable. - * - * ```ts - * Deno.env.set("SOME_VAR", "Value"); - * Deno.env.delete("SOME_VAR"); // outputs "undefined" - * ``` - * - * Requires `allow-env` permission. - * - * @tags allow-env - */ - delete(key: string): void; - - /** Returns a snapshot of the environment variables at invocation. - * - * ```ts - * Deno.env.set("TEST_VAR", "A"); - * const myEnv = Deno.env.toObject(); - * console.log(myEnv.SHELL); - * Deno.env.set("TEST_VAR", "B"); - * console.log(myEnv.TEST_VAR); // outputs "A" - * ``` - * - * Requires `allow-env` permission. - * - * @tags allow-env - */ - toObject(): { [index: string]: string }; - }; - - export namespace errors { - export class AddrInUse extends Error { - } - - export class AddrNotAvailable extends Error { - } - - export class AlreadyExists extends Error { - } - - export class BadResource extends Error { - } - - export class BrokenPipe extends Error { - } - - export class Busy extends Error { - } - - export class ConnectionAborted extends Error { - } - - export class ConnectionRefused extends Error { - } - - export class ConnectionReset extends Error { - } - - export class Http extends Error { - } - - export class Interrupted extends Error { - } - - export class InvalidData extends Error { - } - - export class NotConnected extends Error { - } - - export class NotFound extends Error { - } - - export class PermissionDenied extends Error { - } - - export class TimedOut extends Error { - } - - export class UnexpectedEof extends Error { - } - - export class WriteZero extends Error { - } - } - - /** - * The URL of the entrypoint module entered from the command-line. - * - * @category Runtime Environment - */ - export const mainModule: string; - /** - * Receive metrics from the privileged side of Deno. This is primarily used - * in the development of Deno. 'Ops', also called 'bindings', are the go-between - * between Deno JavaScript and Deno Rust. - * - * > console.table(Deno.metrics()) - * ┌─────────────────────────┬────────┐ - * │ (index) │ Values │ - * ├─────────────────────────┼────────┤ - * │ opsDispatched │ 3 │ - * │ opsDispatchedSync │ 2 │ - * │ opsDispatchedAsync │ 1 │ - * │ opsDispatchedAsyncUnref │ 0 │ - * │ opsCompleted │ 3 │ - * │ opsCompletedSync │ 2 │ - * │ opsCompletedAsync │ 1 │ - * │ opsCompletedAsyncUnref │ 0 │ - * │ bytesSentControl │ 73 │ - * │ bytesSentData │ 0 │ - * │ bytesReceived │ 375 │ - * └─────────────────────────┴────────┘ - * - * @category Observability - */ - export function metrics(): Metrics; - /** - * Reflects the `NO_COLOR` environment variable at program start. - * - * See: https://no-color.org/ - * - * @category Runtime Environment - */ - export const noColor: boolean; - /** - * Deno's permission management API. - * - * @category Permissions - */ - export const permissions: Permissions; - /** - * The current process id of the runtime. - * - * @category Runtime Environment - */ - export const pid: number; - /** - * The pid of the current process's parent. - * - * @category Runtime Environment - */ - export const ppid: number; - /** - * Returns a map of open resource ids (rid) along with their string - * representations. This is an internal API and as such resource - * representation has `any` type; that means it can change any time. - * - * ```ts - * console.log(Deno.resources()); - * // { 0: "stdin", 1: "stdout", 2: "stderr" } - * Deno.openSync('../test.file'); - * console.log(Deno.resources()); - * // { 0: "stdin", 1: "stdout", 2: "stderr", 3: "fsFile" } - * ``` - * - * @category Observability - */ - export function resources(): ResourceMap; - /** - * Version related information. - * - * @category Runtime Environment - */ - export const version: { - /** Deno's version. For example: `"1.0.0"` */ - deno: string; - /** The V8 version used by Deno. For example: `"8.0.0.0"` */ - v8: string; - /** The TypeScript version used by Deno. For example: `"4.0.0"` */ - typescript: string; - }; - /** - * A handle for `stdin`. - * - * @category I/O - */ - export const stdin: Reader & ReaderSync & Closer & { - readonly rid: number; - readonly readable: ReadableStream; - }; - /** - * A handle for `stdout`. - * - * @category I/O - */ - export const stdout: Writer & WriterSync & Closer & { - readonly rid: number; - readonly writable: WritableStream; - }; - /** - * A handle for `stderr`. - * - * @category I/O - */ - export const stderr: Writer & WriterSync & Closer & { - readonly rid: number; - readonly writable: WritableStream; - }; - - /** @category Network */ - export interface TlsHandshakeInfo { - } - - /** @category Network */ - export interface TlsHandshakeInfo { - /** - * *UNSTABLE**: new API, yet to be vetted. - * - * Contains the ALPN protocol selected during negotiation with the server. - * If no ALPN protocol selected, returns `null`. - */ - alpnProtocol: string | null; - } - - export interface UnixConnectOptions { - transport: "unix"; - path: string; - } - - /** @category Network */ - export interface UnixListenOptions { - /** A Path to the Unix Socket. */ - path: string; - } - - /** - * *UNSTABLE**: needs investigation into high precision time. - * - * Changes the access (`atime`) and modification (`mtime`) times of a file - * stream resource referenced by `rid`. Given times are either in seconds - * (UNIX epoch time) or as `Date` objects. - * - * ```ts - * const file = await Deno.open("file.txt", { create: true, write: true }); - * await Deno.futime(file.rid, 1556495550, new Date()); - * ``` - * - * @category File System - */ - export function futime(rid: number, atime: number | Date, mtime: number | Date): Promise; - /** - * *UNSTABLE**: needs investigation into high precision time. - * - * Synchronously changes the access (`atime`) and modification (`mtime`) times - * of a file stream resource referenced by `rid`. Given times are either in - * seconds (UNIX epoch time) or as `Date` objects. - * - * ```ts - * const file = Deno.openSync("file.txt", { create: true, write: true }); - * Deno.futimeSync(file.rid, 1556495550, new Date()); - * ``` - * - * @category File System - */ - export function futimeSync(rid: number, atime: number | Date, mtime: number | Date): void; - /** - * *UNSTABLE**: needs investigation into high precision time. - * - * Changes the access (`atime`) and modification (`mtime`) times of a file - * system object referenced by `path`. Given times are either in seconds - * (UNIX epoch time) or as `Date` objects. - * - * ```ts - * await Deno.utime("myfile.txt", 1556495550, new Date()); - * ``` - * - * Requires `allow-write` permission. - * - * @tags allow-write - * @category File System - */ - export function utime(path: string | URL, atime: number | Date, mtime: number | Date): Promise; - /** - * *UNSTABLE**: needs investigation into high precision time. - * - * Synchronously changes the access (`atime`) and modification (`mtime`) times - * of a file system object referenced by `path`. Given times are either in - * seconds (UNIX epoch time) or as `Date` objects. - * - * ```ts - * Deno.utimeSync("myfile.txt", 1556495550, new Date()); - * ``` - * - * Requires `allow-write` permission. - * - * @tags allow-write - * @category File System - */ - export function utimeSync(path: string | URL, atime: number | Date, mtime: number | Date): void; -} - -declare module "@deno/shim-deno/test-internals" { - type TestDefinition = Deno.TestDefinition; - /** Reference to the array that `Deno.test` calls insert their definition into. */ - export const testDefinitions: TestDefinition[]; -} diff --git a/action/node_modules/@deno/shim-deno/package.json b/action/node_modules/@deno/shim-deno/package.json index c51bbac7..78ce0ad7 100644 --- a/action/node_modules/@deno/shim-deno/package.json +++ b/action/node_modules/@deno/shim-deno/package.json @@ -1,6 +1,6 @@ { "name": "@deno/shim-deno", - "version": "0.10.0", + "version": "0.19.2", "description": "Deno namespace shim for Node.js", "keywords": [ "deno namespace", @@ -9,8 +9,8 @@ "ponyfill", "shim" ], - "main": "./dist/index.js", - "types": "./lib/shim-deno.lib.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "author": "Thomas Rory Gummerson (https://trgwii.no/)", "contributors": [ "Wojciech Pawlik ", @@ -22,30 +22,35 @@ "url": "https://github.com/denoland/node_deno_shims.git" }, "exports": { - ".": "./dist/index.js", - "./test-internals": "./dist/deno/internal/test.js" + ".": { + "import": "./dist/index.mjs", + "require": "./dist/index.cjs" + }, + "./test-internals": { + "import": "./dist/test-internals.mjs", + "require": "./dist/test-internals.cjs" + } }, "files": [ - "dist", - "lib/shim-deno.lib.d.ts" + "dist" ], "scripts": { - "build": "npm run denolib && tsc && npm run generate-declaration-file", + "build": "npm run denolib && tsc && tsc --build tsconfig.esm.json && npm run generate-declaration-file && deno run -A tools/bundle.ts", "prepublishOnly": "npm run build", "clean": "git clean -fXde !node_modules/", "test": "node --loader=ts-node/esm tools/run_tests.mjs", "denolib": "deno run --allow-run --allow-write=src/deno tools/denolib.ts", - "generate-declaration-file": "deno run --allow-write=lib --allow-read tools/generateDeclarationFile.ts", + "generate-declaration-file": "deno run --allow-write=lib,dist --allow-read tools/generateDeclarationFile.ts", "update-progress": "deno run --allow-read tools/missing.ts > PROGRESS.md" }, "dependencies": { - "@deno/shim-deno-test": "^0.3.2", - "which": "^2.0.2" + "@deno/shim-deno-test": "^0.5.0", + "which": "^4.0.0" }, "devDependencies": { - "@types/node": "^16.4.13", - "@types/which": "^2.0.1", - "ts-node": "^10.8.0", - "typescript": "^4.7.2" + "@types/node": "^20.9.0", + "@types/which": "^3.0.2", + "ts-node": "^10.9.1", + "typescript": "^5.2.2" } } diff --git a/action/node_modules/busboy/LICENSE b/action/node_modules/@fastify/busboy/LICENSE similarity index 100% rename from action/node_modules/busboy/LICENSE rename to action/node_modules/@fastify/busboy/LICENSE diff --git a/action/node_modules/@fastify/busboy/README.md b/action/node_modules/@fastify/busboy/README.md new file mode 100644 index 00000000..ece3cc8a --- /dev/null +++ b/action/node_modules/@fastify/busboy/README.md @@ -0,0 +1,271 @@ +# busboy + +
+ +[![Build Status](https://github.com/fastify/busboy/actions/workflows/ci.yml/badge.svg)](https://github.com/fastify/busboy/actions) +[![Coverage Status](https://coveralls.io/repos/fastify/busboy/badge.svg?branch=master)](https://coveralls.io/r/fastify/busboy?branch=master) +[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/) +[![Security Responsible Disclosure](https://img.shields.io/badge/Security-Responsible%20Disclosure-yellow.svg)](https://github.com/fastify/.github/blob/main/SECURITY.md) + +
+ +
+ +[![NPM version](https://img.shields.io/npm/v/@fastify/busboy.svg?style=flat)](https://www.npmjs.com/package/@fastify/busboy) +[![NPM downloads](https://img.shields.io/npm/dm/@fastify/busboy.svg?style=flat)](https://www.npmjs.com/package/@fastify/busboy) + +
+ +Description +=========== + +A Node.js module for parsing incoming HTML form data. + +This is an officially supported fork by [fastify](https://github.com/fastify/) organization of the amazing library [originally created](https://github.com/mscdex/busboy) by Brian White, +aimed at addressing long-standing issues with it. + +Benchmark (Mean time for 500 Kb payload, 2000 cycles, 1000 cycle warmup): + +| Library | Version | Mean time in nanoseconds (less is better) | +|-----------------------|---------|-------------------------------------------| +| busboy | 0.3.1 | `340114` | +| @fastify/busboy | 1.0.0 | `270984` | + +[Changelog](https://github.com/fastify/busboy/blob/master/CHANGELOG.md) since busboy 0.31. + +Requirements +============ + +* [Node.js](http://nodejs.org/) 10+ + + +Install +======= + + npm i @fastify/busboy + + +Examples +======== + +* Parsing (multipart) with default options: + +```javascript +const http = require('node:http'); +const { inspect } = require('node:util'); +const Busboy = require('busboy'); + +http.createServer((req, res) => { + if (req.method === 'POST') { + const busboy = new Busboy({ headers: req.headers }); + busboy.on('file', (fieldname, file, filename, encoding, mimetype) => { + console.log(`File [${fieldname}]: filename: ${filename}, encoding: ${encoding}, mimetype: ${mimetype}`); + file.on('data', data => { + console.log(`File [${fieldname}] got ${data.length} bytes`); + }); + file.on('end', () => { + console.log(`File [${fieldname}] Finished`); + }); + }); + busboy.on('field', (fieldname, val, fieldnameTruncated, valTruncated, encoding, mimetype) => { + console.log(`Field [${fieldname}]: value: ${inspect(val)}`); + }); + busboy.on('finish', () => { + console.log('Done parsing form!'); + res.writeHead(303, { Connection: 'close', Location: '/' }); + res.end(); + }); + req.pipe(busboy); + } else if (req.method === 'GET') { + res.writeHead(200, { Connection: 'close' }); + res.end(` +
+
+
+ +
+ `); + } +}).listen(8000, () => { + console.log('Listening for requests'); +}); + +// Example output, using http://nodejs.org/images/ryan-speaker.jpg as the file: +// +// Listening for requests +// File [filefield]: filename: ryan-speaker.jpg, encoding: binary +// File [filefield] got 11971 bytes +// Field [textfield]: value: 'testing! :-)' +// File [filefield] Finished +// Done parsing form! +``` + +* Save all incoming files to disk: + +```javascript +const http = require('node:http'); +const path = require('node:path'); +const os = require('node:os'); +const fs = require('node:fs'); + +const Busboy = require('busboy'); + +http.createServer(function(req, res) { + if (req.method === 'POST') { + const busboy = new Busboy({ headers: req.headers }); + busboy.on('file', function(fieldname, file, filename, encoding, mimetype) { + var saveTo = path.join(os.tmpdir(), path.basename(fieldname)); + file.pipe(fs.createWriteStream(saveTo)); + }); + busboy.on('finish', function() { + res.writeHead(200, { 'Connection': 'close' }); + res.end("That's all folks!"); + }); + return req.pipe(busboy); + } + res.writeHead(404); + res.end(); +}).listen(8000, function() { + console.log('Listening for requests'); +}); +``` + +* Parsing (urlencoded) with default options: + +```javascript +const http = require('node:http'); +const { inspect } = require('node:util'); + +const Busboy = require('busboy'); + +http.createServer(function(req, res) { + if (req.method === 'POST') { + const busboy = new Busboy({ headers: req.headers }); + busboy.on('file', function(fieldname, file, filename, encoding, mimetype) { + console.log('File [' + fieldname + ']: filename: ' + filename); + file.on('data', function(data) { + console.log('File [' + fieldname + '] got ' + data.length + ' bytes'); + }); + file.on('end', function() { + console.log('File [' + fieldname + '] Finished'); + }); + }); + busboy.on('field', function(fieldname, val, fieldnameTruncated, valTruncated) { + console.log('Field [' + fieldname + ']: value: ' + inspect(val)); + }); + busboy.on('finish', function() { + console.log('Done parsing form!'); + res.writeHead(303, { Connection: 'close', Location: '/' }); + res.end(); + }); + req.pipe(busboy); + } else if (req.method === 'GET') { + res.writeHead(200, { Connection: 'close' }); + res.end('\ +
\ +
\ +
\ + Node.js rules!
\ + \ +
\ + '); + } +}).listen(8000, function() { + console.log('Listening for requests'); +}); + +// Example output: +// +// Listening for requests +// Field [textfield]: value: 'testing! :-)' +// Field [selectfield]: value: '9001' +// Field [checkfield]: value: 'on' +// Done parsing form! +``` + + +API +=== + +_Busboy_ is a _Writable_ stream + +Busboy (special) events +----------------------- + +* **file**(< _string_ >fieldname, < _ReadableStream_ >stream, < _string_ >filename, < _string_ >transferEncoding, < _string_ >mimeType) - Emitted for each new file form field found. `transferEncoding` contains the 'Content-Transfer-Encoding' value for the file stream. `mimeType` contains the 'Content-Type' value for the file stream. + * Note: if you listen for this event, you should always handle the `stream` no matter if you care about the file contents or not (e.g. you can simply just do `stream.resume();` if you want to discard the contents), otherwise the 'finish' event will never fire on the Busboy instance. However, if you don't care about **any** incoming files, you can simply not listen for the 'file' event at all and any/all files will be automatically and safely discarded (these discarded files do still count towards `files` and `parts` limits). + * If a configured file size limit was reached, `stream` will both have a boolean property `truncated` (best checked at the end of the stream) and emit a 'limit' event to notify you when this happens. + * The property `bytesRead` informs about the number of bytes that have been read so far. + +* **field**(< _string_ >fieldname, < _string_ >value, < _boolean_ >fieldnameTruncated, < _boolean_ >valueTruncated, < _string_ >transferEncoding, < _string_ >mimeType) - Emitted for each new non-file field found. + +* **partsLimit**() - Emitted when specified `parts` limit has been reached. No more 'file' or 'field' events will be emitted. + +* **filesLimit**() - Emitted when specified `files` limit has been reached. No more 'file' events will be emitted. + +* **fieldsLimit**() - Emitted when specified `fields` limit has been reached. No more 'field' events will be emitted. + + +Busboy methods +-------------- + +* **(constructor)**(< _object_ >config) - Creates and returns a new Busboy instance. + + * The constructor takes the following valid `config` settings: + + * **headers** - _object_ - These are the HTTP headers of the incoming request, which are used by individual parsers. + + * **autoDestroy** - _boolean_ - Whether this stream should automatically call .destroy() on itself after ending. (Default: false). + + * **highWaterMark** - _integer_ - highWaterMark to use for this Busboy instance (Default: WritableStream default). + + * **fileHwm** - _integer_ - highWaterMark to use for file streams (Default: ReadableStream default). + + * **defCharset** - _string_ - Default character set to use when one isn't defined (Default: 'utf8'). + + * **preservePath** - _boolean_ - If paths in the multipart 'filename' field shall be preserved. (Default: false). + + * **isPartAFile** - __function__ - Use this function to override the default file detection functionality. It has following parameters: + + * fieldName - __string__ The name of the field. + + * contentType - __string__ The content-type of the part, e.g. `text/plain`, `image/jpeg`, `application/octet-stream` + + * fileName - __string__ The name of a file supplied by the part. + + (Default: `(fieldName, contentType, fileName) => (contentType === 'application/octet-stream' || fileName !== undefined)`) + + * **limits** - _object_ - Various limits on incoming data. Valid properties are: + + * **fieldNameSize** - _integer_ - Max field name size (in bytes) (Default: 100 bytes). + + * **fieldSize** - _integer_ - Max field value size (in bytes) (Default: 1 MiB, which is 1024 x 1024 bytes). + + * **fields** - _integer_ - Max number of non-file fields (Default: Infinity). + + * **fileSize** - _integer_ - For multipart forms, the max file size (in bytes) (Default: Infinity). + + * **files** - _integer_ - For multipart forms, the max number of file fields (Default: Infinity). + + * **parts** - _integer_ - For multipart forms, the max number of parts (fields + files) (Default: Infinity). + + * **headerPairs** - _integer_ - For multipart forms, the max number of header key=>value pairs to parse **Default:** 2000 + + * **headerSize** - _integer_ - For multipart forms, the max size of a multipart header **Default:** 81920. + + * The constructor can throw errors: + + * **Busboy expected an options-Object.** - Busboy expected an Object as first parameters. + + * **Busboy expected an options-Object with headers-attribute.** - The first parameter is lacking of a headers-attribute. + + * **Limit $limit is not a valid number** - Busboy expected the desired limit to be of type number. Busboy throws this Error to prevent a potential security issue by falling silently back to the Busboy-defaults. Potential source for this Error can be the direct use of environment variables without transforming them to the type number. + + * **Unsupported Content-Type.** - The `Content-Type` isn't one Busboy can parse. + + * **Missing Content-Type-header.** - The provided headers don't include `Content-Type` at all. diff --git a/action/node_modules/streamsearch/LICENSE b/action/node_modules/@fastify/busboy/deps/dicer/LICENSE similarity index 98% rename from action/node_modules/streamsearch/LICENSE rename to action/node_modules/@fastify/busboy/deps/dicer/LICENSE index 9ea90e03..290762e9 100644 --- a/action/node_modules/streamsearch/LICENSE +++ b/action/node_modules/@fastify/busboy/deps/dicer/LICENSE @@ -1,19 +1,19 @@ -Copyright Brian White. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +Copyright Brian White. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/action/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js b/action/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js new file mode 100644 index 00000000..3c8c081a --- /dev/null +++ b/action/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js @@ -0,0 +1,213 @@ +'use strict' + +const WritableStream = require('node:stream').Writable +const inherits = require('node:util').inherits + +const StreamSearch = require('../../streamsearch/sbmh') + +const PartStream = require('./PartStream') +const HeaderParser = require('./HeaderParser') + +const DASH = 45 +const B_ONEDASH = Buffer.from('-') +const B_CRLF = Buffer.from('\r\n') +const EMPTY_FN = function () {} + +function Dicer (cfg) { + if (!(this instanceof Dicer)) { return new Dicer(cfg) } + WritableStream.call(this, cfg) + + if (!cfg || (!cfg.headerFirst && typeof cfg.boundary !== 'string')) { throw new TypeError('Boundary required') } + + if (typeof cfg.boundary === 'string') { this.setBoundary(cfg.boundary) } else { this._bparser = undefined } + + this._headerFirst = cfg.headerFirst + + this._dashes = 0 + this._parts = 0 + this._finished = false + this._realFinish = false + this._isPreamble = true + this._justMatched = false + this._firstWrite = true + this._inHeader = true + this._part = undefined + this._cb = undefined + this._ignoreData = false + this._partOpts = { highWaterMark: cfg.partHwm } + this._pause = false + + const self = this + this._hparser = new HeaderParser(cfg) + this._hparser.on('header', function (header) { + self._inHeader = false + self._part.emit('header', header) + }) +} +inherits(Dicer, WritableStream) + +Dicer.prototype.emit = function (ev) { + if (ev === 'finish' && !this._realFinish) { + if (!this._finished) { + const self = this + process.nextTick(function () { + self.emit('error', new Error('Unexpected end of multipart data')) + if (self._part && !self._ignoreData) { + const type = (self._isPreamble ? 'Preamble' : 'Part') + self._part.emit('error', new Error(type + ' terminated early due to unexpected end of multipart data')) + self._part.push(null) + process.nextTick(function () { + self._realFinish = true + self.emit('finish') + self._realFinish = false + }) + return + } + self._realFinish = true + self.emit('finish') + self._realFinish = false + }) + } + } else { WritableStream.prototype.emit.apply(this, arguments) } +} + +Dicer.prototype._write = function (data, encoding, cb) { + // ignore unexpected data (e.g. extra trailer data after finished) + if (!this._hparser && !this._bparser) { return cb() } + + if (this._headerFirst && this._isPreamble) { + if (!this._part) { + this._part = new PartStream(this._partOpts) + if (this.listenerCount('preamble') !== 0) { this.emit('preamble', this._part) } else { this._ignore() } + } + const r = this._hparser.push(data) + if (!this._inHeader && r !== undefined && r < data.length) { data = data.slice(r) } else { return cb() } + } + + // allows for "easier" testing + if (this._firstWrite) { + this._bparser.push(B_CRLF) + this._firstWrite = false + } + + this._bparser.push(data) + + if (this._pause) { this._cb = cb } else { cb() } +} + +Dicer.prototype.reset = function () { + this._part = undefined + this._bparser = undefined + this._hparser = undefined +} + +Dicer.prototype.setBoundary = function (boundary) { + const self = this + this._bparser = new StreamSearch('\r\n--' + boundary) + this._bparser.on('info', function (isMatch, data, start, end) { + self._oninfo(isMatch, data, start, end) + }) +} + +Dicer.prototype._ignore = function () { + if (this._part && !this._ignoreData) { + this._ignoreData = true + this._part.on('error', EMPTY_FN) + // we must perform some kind of read on the stream even though we are + // ignoring the data, otherwise node's Readable stream will not emit 'end' + // after pushing null to the stream + this._part.resume() + } +} + +Dicer.prototype._oninfo = function (isMatch, data, start, end) { + let buf; const self = this; let i = 0; let r; let shouldWriteMore = true + + if (!this._part && this._justMatched && data) { + while (this._dashes < 2 && (start + i) < end) { + if (data[start + i] === DASH) { + ++i + ++this._dashes + } else { + if (this._dashes) { buf = B_ONEDASH } + this._dashes = 0 + break + } + } + if (this._dashes === 2) { + if ((start + i) < end && this.listenerCount('trailer') !== 0) { this.emit('trailer', data.slice(start + i, end)) } + this.reset() + this._finished = true + // no more parts will be added + if (self._parts === 0) { + self._realFinish = true + self.emit('finish') + self._realFinish = false + } + } + if (this._dashes) { return } + } + if (this._justMatched) { this._justMatched = false } + if (!this._part) { + this._part = new PartStream(this._partOpts) + this._part._read = function (n) { + self._unpause() + } + if (this._isPreamble && this.listenerCount('preamble') !== 0) { + this.emit('preamble', this._part) + } else if (this._isPreamble !== true && this.listenerCount('part') !== 0) { + this.emit('part', this._part) + } else { + this._ignore() + } + if (!this._isPreamble) { this._inHeader = true } + } + if (data && start < end && !this._ignoreData) { + if (this._isPreamble || !this._inHeader) { + if (buf) { shouldWriteMore = this._part.push(buf) } + shouldWriteMore = this._part.push(data.slice(start, end)) + if (!shouldWriteMore) { this._pause = true } + } else if (!this._isPreamble && this._inHeader) { + if (buf) { this._hparser.push(buf) } + r = this._hparser.push(data.slice(start, end)) + if (!this._inHeader && r !== undefined && r < end) { this._oninfo(false, data, start + r, end) } + } + } + if (isMatch) { + this._hparser.reset() + if (this._isPreamble) { this._isPreamble = false } else { + if (start !== end) { + ++this._parts + this._part.on('end', function () { + if (--self._parts === 0) { + if (self._finished) { + self._realFinish = true + self.emit('finish') + self._realFinish = false + } else { + self._unpause() + } + } + }) + } + } + this._part.push(null) + this._part = undefined + this._ignoreData = false + this._justMatched = true + this._dashes = 0 + } +} + +Dicer.prototype._unpause = function () { + if (!this._pause) { return } + + this._pause = false + if (this._cb) { + const cb = this._cb + this._cb = undefined + cb() + } +} + +module.exports = Dicer diff --git a/action/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js b/action/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js new file mode 100644 index 00000000..65f667b5 --- /dev/null +++ b/action/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js @@ -0,0 +1,100 @@ +'use strict' + +const EventEmitter = require('node:events').EventEmitter +const inherits = require('node:util').inherits +const getLimit = require('../../../lib/utils/getLimit') + +const StreamSearch = require('../../streamsearch/sbmh') + +const B_DCRLF = Buffer.from('\r\n\r\n') +const RE_CRLF = /\r\n/g +const RE_HDR = /^([^:]+):[ \t]?([\x00-\xFF]+)?$/ // eslint-disable-line no-control-regex + +function HeaderParser (cfg) { + EventEmitter.call(this) + + cfg = cfg || {} + const self = this + this.nread = 0 + this.maxed = false + this.npairs = 0 + this.maxHeaderPairs = getLimit(cfg, 'maxHeaderPairs', 2000) + this.maxHeaderSize = getLimit(cfg, 'maxHeaderSize', 80 * 1024) + this.buffer = '' + this.header = {} + this.finished = false + this.ss = new StreamSearch(B_DCRLF) + this.ss.on('info', function (isMatch, data, start, end) { + if (data && !self.maxed) { + if (self.nread + end - start >= self.maxHeaderSize) { + end = self.maxHeaderSize - self.nread + start + self.nread = self.maxHeaderSize + self.maxed = true + } else { self.nread += (end - start) } + + self.buffer += data.toString('binary', start, end) + } + if (isMatch) { self._finish() } + }) +} +inherits(HeaderParser, EventEmitter) + +HeaderParser.prototype.push = function (data) { + const r = this.ss.push(data) + if (this.finished) { return r } +} + +HeaderParser.prototype.reset = function () { + this.finished = false + this.buffer = '' + this.header = {} + this.ss.reset() +} + +HeaderParser.prototype._finish = function () { + if (this.buffer) { this._parseHeader() } + this.ss.matches = this.ss.maxMatches + const header = this.header + this.header = {} + this.buffer = '' + this.finished = true + this.nread = this.npairs = 0 + this.maxed = false + this.emit('header', header) +} + +HeaderParser.prototype._parseHeader = function () { + if (this.npairs === this.maxHeaderPairs) { return } + + const lines = this.buffer.split(RE_CRLF) + const len = lines.length + let m, h + + for (var i = 0; i < len; ++i) { // eslint-disable-line no-var + if (lines[i].length === 0) { continue } + if (lines[i][0] === '\t' || lines[i][0] === ' ') { + // folded header content + // RFC2822 says to just remove the CRLF and not the whitespace following + // it, so we follow the RFC and include the leading whitespace ... + if (h) { + this.header[h][this.header[h].length - 1] += lines[i] + continue + } + } + + const posColon = lines[i].indexOf(':') + if ( + posColon === -1 || + posColon === 0 + ) { + return + } + m = RE_HDR.exec(lines[i]) + h = m[1].toLowerCase() + this.header[h] = this.header[h] || [] + this.header[h].push((m[2] || '')) + if (++this.npairs === this.maxHeaderPairs) { break } + } +} + +module.exports = HeaderParser diff --git a/action/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js b/action/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js new file mode 100644 index 00000000..c91da1c4 --- /dev/null +++ b/action/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js @@ -0,0 +1,13 @@ +'use strict' + +const inherits = require('node:util').inherits +const ReadableStream = require('node:stream').Readable + +function PartStream (opts) { + ReadableStream.call(this, opts) +} +inherits(PartStream, ReadableStream) + +PartStream.prototype._read = function (n) {} + +module.exports = PartStream diff --git a/action/node_modules/@fastify/busboy/deps/dicer/lib/dicer.d.ts b/action/node_modules/@fastify/busboy/deps/dicer/lib/dicer.d.ts new file mode 100644 index 00000000..3c5b8962 --- /dev/null +++ b/action/node_modules/@fastify/busboy/deps/dicer/lib/dicer.d.ts @@ -0,0 +1,164 @@ +// Type definitions for dicer 0.2 +// Project: https://github.com/mscdex/dicer +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 +/// + +import stream = require("stream"); + +// tslint:disable:unified-signatures + +/** + * A very fast streaming multipart parser for node.js. + * Dicer is a WritableStream + * + * Dicer (special) events: + * - on('finish', ()) - Emitted when all parts have been parsed and the Dicer instance has been ended. + * - on('part', (stream: PartStream)) - Emitted when a new part has been found. + * - on('preamble', (stream: PartStream)) - Emitted for preamble if you should happen to need it (can usually be ignored). + * - on('trailer', (data: Buffer)) - Emitted when trailing data was found after the terminating boundary (as with the preamble, this can usually be ignored too). + */ +export class Dicer extends stream.Writable { + /** + * Creates and returns a new Dicer instance with the following valid config settings: + * + * @param config The configuration to use + */ + constructor(config: Dicer.Config); + /** + * Sets the boundary to use for parsing and performs some initialization needed for parsing. + * You should only need to use this if you set headerFirst to true in the constructor and are parsing the boundary from the preamble header. + * + * @param boundary The boundary to use + */ + setBoundary(boundary: string): void; + addListener(event: "finish", listener: () => void): this; + addListener(event: "part", listener: (stream: Dicer.PartStream) => void): this; + addListener(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; + addListener(event: "trailer", listener: (data: Buffer) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "pipe", listener: (src: stream.Readable) => void): this; + addListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + addListener(event: string, listener: (...args: any[]) => void): this; + on(event: "finish", listener: () => void): this; + on(event: "part", listener: (stream: Dicer.PartStream) => void): this; + on(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; + on(event: "trailer", listener: (data: Buffer) => void): this; + on(event: "close", listener: () => void): this; + on(event: "drain", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "pipe", listener: (src: stream.Readable) => void): this; + on(event: "unpipe", listener: (src: stream.Readable) => void): this; + on(event: string, listener: (...args: any[]) => void): this; + once(event: "finish", listener: () => void): this; + once(event: "part", listener: (stream: Dicer.PartStream) => void): this; + once(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; + once(event: "trailer", listener: (data: Buffer) => void): this; + once(event: "close", listener: () => void): this; + once(event: "drain", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "pipe", listener: (src: stream.Readable) => void): this; + once(event: "unpipe", listener: (src: stream.Readable) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "finish", listener: () => void): this; + prependListener(event: "part", listener: (stream: Dicer.PartStream) => void): this; + prependListener(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; + prependListener(event: "trailer", listener: (data: Buffer) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "finish", listener: () => void): this; + prependOnceListener(event: "part", listener: (stream: Dicer.PartStream) => void): this; + prependOnceListener(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; + prependOnceListener(event: "trailer", listener: (data: Buffer) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + removeListener(event: "finish", listener: () => void): this; + removeListener(event: "part", listener: (stream: Dicer.PartStream) => void): this; + removeListener(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; + removeListener(event: "trailer", listener: (data: Buffer) => void): this; + removeListener(event: "close", listener: () => void): this; + removeListener(event: "drain", listener: () => void): this; + removeListener(event: "error", listener: (err: Error) => void): this; + removeListener(event: "pipe", listener: (src: stream.Readable) => void): this; + removeListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + removeListener(event: string, listener: (...args: any[]) => void): this; +} + +declare namespace Dicer { + interface Config { + /** + * This is the boundary used to detect the beginning of a new part. + */ + boundary?: string | undefined; + /** + * If true, preamble header parsing will be performed first. + */ + headerFirst?: boolean | undefined; + /** + * The maximum number of header key=>value pairs to parse Default: 2000 (same as node's http). + */ + maxHeaderPairs?: number | undefined; + } + + /** + * PartStream is a _ReadableStream_ + * + * PartStream (special) events: + * - on('header', (header: object)) - An object containing the header for this particular part. Each property value is an array of one or more string values. + */ + interface PartStream extends stream.Readable { + addListener(event: "header", listener: (header: object) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "data", listener: (chunk: Buffer | string) => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "readable", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: string, listener: (...args: any[]) => void): this; + on(event: "header", listener: (header: object) => void): this; + on(event: "close", listener: () => void): this; + on(event: "data", listener: (chunk: Buffer | string) => void): this; + on(event: "end", listener: () => void): this; + on(event: "readable", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: string, listener: (...args: any[]) => void): this; + once(event: "header", listener: (header: object) => void): this; + once(event: "close", listener: () => void): this; + once(event: "data", listener: (chunk: Buffer | string) => void): this; + once(event: "end", listener: () => void): this; + once(event: "readable", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "header", listener: (header: object) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "readable", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "header", listener: (header: object) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "readable", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + removeListener(event: "header", listener: (header: object) => void): this; + removeListener(event: "close", listener: () => void): this; + removeListener(event: "data", listener: (chunk: Buffer | string) => void): this; + removeListener(event: "end", listener: () => void): this; + removeListener(event: "readable", listener: () => void): this; + removeListener(event: "error", listener: (err: Error) => void): this; + removeListener(event: string, listener: (...args: any[]) => void): this; + } +} \ No newline at end of file diff --git a/action/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js b/action/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js new file mode 100644 index 00000000..b90c0e86 --- /dev/null +++ b/action/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js @@ -0,0 +1,228 @@ +'use strict' + +/** + * Copyright Brian White. All rights reserved. + * + * @see https://github.com/mscdex/streamsearch + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + * Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation + * by Hongli Lai at: https://github.com/FooBarWidget/boyer-moore-horspool + */ +const EventEmitter = require('node:events').EventEmitter +const inherits = require('node:util').inherits + +function SBMH (needle) { + if (typeof needle === 'string') { + needle = Buffer.from(needle) + } + + if (!Buffer.isBuffer(needle)) { + throw new TypeError('The needle has to be a String or a Buffer.') + } + + const needleLength = needle.length + + if (needleLength === 0) { + throw new Error('The needle cannot be an empty String/Buffer.') + } + + if (needleLength > 256) { + throw new Error('The needle cannot have a length bigger than 256.') + } + + this.maxMatches = Infinity + this.matches = 0 + + this._occ = new Array(256) + .fill(needleLength) // Initialize occurrence table. + this._lookbehind_size = 0 + this._needle = needle + this._bufpos = 0 + + this._lookbehind = Buffer.alloc(needleLength) + + // Populate occurrence table with analysis of the needle, + // ignoring last letter. + for (var i = 0; i < needleLength - 1; ++i) { // eslint-disable-line no-var + this._occ[needle[i]] = needleLength - 1 - i + } +} +inherits(SBMH, EventEmitter) + +SBMH.prototype.reset = function () { + this._lookbehind_size = 0 + this.matches = 0 + this._bufpos = 0 +} + +SBMH.prototype.push = function (chunk, pos) { + if (!Buffer.isBuffer(chunk)) { + chunk = Buffer.from(chunk, 'binary') + } + const chlen = chunk.length + this._bufpos = pos || 0 + let r + while (r !== chlen && this.matches < this.maxMatches) { r = this._sbmh_feed(chunk) } + return r +} + +SBMH.prototype._sbmh_feed = function (data) { + const len = data.length + const needle = this._needle + const needleLength = needle.length + const lastNeedleChar = needle[needleLength - 1] + + // Positive: points to a position in `data` + // pos == 3 points to data[3] + // Negative: points to a position in the lookbehind buffer + // pos == -2 points to lookbehind[lookbehind_size - 2] + let pos = -this._lookbehind_size + let ch + + if (pos < 0) { + // Lookbehind buffer is not empty. Perform Boyer-Moore-Horspool + // search with character lookup code that considers both the + // lookbehind buffer and the current round's haystack data. + // + // Loop until + // there is a match. + // or until + // we've moved past the position that requires the + // lookbehind buffer. In this case we switch to the + // optimized loop. + // or until + // the character to look at lies outside the haystack. + while (pos < 0 && pos <= len - needleLength) { + ch = this._sbmh_lookup_char(data, pos + needleLength - 1) + + if ( + ch === lastNeedleChar && + this._sbmh_memcmp(data, pos, needleLength - 1) + ) { + this._lookbehind_size = 0 + ++this.matches + this.emit('info', true) + + return (this._bufpos = pos + needleLength) + } + pos += this._occ[ch] + } + + // No match. + + if (pos < 0) { + // There's too few data for Boyer-Moore-Horspool to run, + // so let's use a different algorithm to skip as much as + // we can. + // Forward pos until + // the trailing part of lookbehind + data + // looks like the beginning of the needle + // or until + // pos == 0 + while (pos < 0 && !this._sbmh_memcmp(data, pos, len - pos)) { ++pos } + } + + if (pos >= 0) { + // Discard lookbehind buffer. + this.emit('info', false, this._lookbehind, 0, this._lookbehind_size) + this._lookbehind_size = 0 + } else { + // Cut off part of the lookbehind buffer that has + // been processed and append the entire haystack + // into it. + const bytesToCutOff = this._lookbehind_size + pos + if (bytesToCutOff > 0) { + // The cut off data is guaranteed not to contain the needle. + this.emit('info', false, this._lookbehind, 0, bytesToCutOff) + } + + this._lookbehind.copy(this._lookbehind, 0, bytesToCutOff, + this._lookbehind_size - bytesToCutOff) + this._lookbehind_size -= bytesToCutOff + + data.copy(this._lookbehind, this._lookbehind_size) + this._lookbehind_size += len + + this._bufpos = len + return len + } + } + + pos += (pos >= 0) * this._bufpos + + // Lookbehind buffer is now empty. We only need to check if the + // needle is in the haystack. + if (data.indexOf(needle, pos) !== -1) { + pos = data.indexOf(needle, pos) + ++this.matches + if (pos > 0) { this.emit('info', true, data, this._bufpos, pos) } else { this.emit('info', true) } + + return (this._bufpos = pos + needleLength) + } else { + pos = len - needleLength + } + + // There was no match. If there's trailing haystack data that we cannot + // match yet using the Boyer-Moore-Horspool algorithm (because the trailing + // data is less than the needle size) then match using a modified + // algorithm that starts matching from the beginning instead of the end. + // Whatever trailing data is left after running this algorithm is added to + // the lookbehind buffer. + while ( + pos < len && + ( + data[pos] !== needle[0] || + ( + (Buffer.compare( + data.subarray(pos, pos + len - pos), + needle.subarray(0, len - pos) + ) !== 0) + ) + ) + ) { + ++pos + } + if (pos < len) { + data.copy(this._lookbehind, 0, pos, pos + (len - pos)) + this._lookbehind_size = len - pos + } + + // Everything until pos is guaranteed not to contain needle data. + if (pos > 0) { this.emit('info', false, data, this._bufpos, pos < len ? pos : len) } + + this._bufpos = len + return len +} + +SBMH.prototype._sbmh_lookup_char = function (data, pos) { + return (pos < 0) + ? this._lookbehind[this._lookbehind_size + pos] + : data[pos] +} + +SBMH.prototype._sbmh_memcmp = function (data, pos, len) { + for (var i = 0; i < len; ++i) { // eslint-disable-line no-var + if (this._sbmh_lookup_char(data, pos + i) !== this._needle[i]) { return false } + } + return true +} + +module.exports = SBMH diff --git a/action/node_modules/@fastify/busboy/lib/main.d.ts b/action/node_modules/@fastify/busboy/lib/main.d.ts new file mode 100644 index 00000000..91b64483 --- /dev/null +++ b/action/node_modules/@fastify/busboy/lib/main.d.ts @@ -0,0 +1,196 @@ +// Definitions by: Jacob Baskin +// BendingBender +// Igor Savin + +/// + +import * as http from 'http'; +import { Readable, Writable } from 'stream'; +export { Dicer } from "../deps/dicer/lib/dicer"; + +export const Busboy: BusboyConstructor; +export default Busboy; + +export interface BusboyConfig { + /** + * These are the HTTP headers of the incoming request, which are used by individual parsers. + */ + headers: BusboyHeaders; + /** + * `highWaterMark` to use for this Busboy instance. + * @default WritableStream default. + */ + highWaterMark?: number | undefined; + /** + * highWaterMark to use for file streams. + * @default ReadableStream default. + */ + fileHwm?: number | undefined; + /** + * Default character set to use when one isn't defined. + * @default 'utf8' + */ + defCharset?: string | undefined; + /** + * Detect if a Part is a file. + * + * By default a file is detected if contentType + * is application/octet-stream or fileName is not + * undefined. + * + * Modify this to handle e.g. Blobs. + */ + isPartAFile?: (fieldName: string | undefined, contentType: string | undefined, fileName: string | undefined) => boolean; + /** + * If paths in the multipart 'filename' field shall be preserved. + * @default false + */ + preservePath?: boolean | undefined; + /** + * Various limits on incoming data. + */ + limits?: + | { + /** + * Max field name size (in bytes) + * @default 100 bytes + */ + fieldNameSize?: number | undefined; + /** + * Max field value size (in bytes) + * @default 1MB + */ + fieldSize?: number | undefined; + /** + * Max number of non-file fields + * @default Infinity + */ + fields?: number | undefined; + /** + * For multipart forms, the max file size (in bytes) + * @default Infinity + */ + fileSize?: number | undefined; + /** + * For multipart forms, the max number of file fields + * @default Infinity + */ + files?: number | undefined; + /** + * For multipart forms, the max number of parts (fields + files) + * @default Infinity + */ + parts?: number | undefined; + /** + * For multipart forms, the max number of header key=>value pairs to parse + * @default 2000 + */ + headerPairs?: number | undefined; + + /** + * For multipart forms, the max size of a header part + * @default 81920 + */ + headerSize?: number | undefined; + } + | undefined; +} + +export type BusboyHeaders = { 'content-type': string } & http.IncomingHttpHeaders; + +export interface BusboyFileStream extends + Readable { + + truncated: boolean; + + /** + * The number of bytes that have been read so far. + */ + bytesRead: number; +} + +export interface Busboy extends Writable { + addListener(event: Event, listener: BusboyEvents[Event]): this; + + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + on(event: Event, listener: BusboyEvents[Event]): this; + + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: Event, listener: BusboyEvents[Event]): this; + + once(event: string | symbol, listener: (...args: any[]) => void): this; + + removeListener(event: Event, listener: BusboyEvents[Event]): this; + + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + + off(event: Event, listener: BusboyEvents[Event]): this; + + off(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: Event, listener: BusboyEvents[Event]): this; + + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: Event, listener: BusboyEvents[Event]): this; + + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; +} + +export interface BusboyEvents { + /** + * Emitted for each new file form field found. + * + * * Note: if you listen for this event, you should always handle the `stream` no matter if you care about the + * file contents or not (e.g. you can simply just do `stream.resume();` if you want to discard the contents), + * otherwise the 'finish' event will never fire on the Busboy instance. However, if you don't care about **any** + * incoming files, you can simply not listen for the 'file' event at all and any/all files will be automatically + * and safely discarded (these discarded files do still count towards `files` and `parts` limits). + * * If a configured file size limit was reached, `stream` will both have a boolean property `truncated` + * (best checked at the end of the stream) and emit a 'limit' event to notify you when this happens. + * + * @param listener.transferEncoding Contains the 'Content-Transfer-Encoding' value for the file stream. + * @param listener.mimeType Contains the 'Content-Type' value for the file stream. + */ + file: ( + fieldname: string, + stream: BusboyFileStream, + filename: string, + transferEncoding: string, + mimeType: string, + ) => void; + /** + * Emitted for each new non-file field found. + */ + field: ( + fieldname: string, + value: string, + fieldnameTruncated: boolean, + valueTruncated: boolean, + transferEncoding: string, + mimeType: string, + ) => void; + finish: () => void; + /** + * Emitted when specified `parts` limit has been reached. No more 'file' or 'field' events will be emitted. + */ + partsLimit: () => void; + /** + * Emitted when specified `files` limit has been reached. No more 'file' events will be emitted. + */ + filesLimit: () => void; + /** + * Emitted when specified `fields` limit has been reached. No more 'field' events will be emitted. + */ + fieldsLimit: () => void; + error: (error: unknown) => void; +} + +export interface BusboyConstructor { + (options: BusboyConfig): Busboy; + + new(options: BusboyConfig): Busboy; +} + diff --git a/action/node_modules/@fastify/busboy/lib/main.js b/action/node_modules/@fastify/busboy/lib/main.js new file mode 100644 index 00000000..8794bebf --- /dev/null +++ b/action/node_modules/@fastify/busboy/lib/main.js @@ -0,0 +1,85 @@ +'use strict' + +const WritableStream = require('node:stream').Writable +const { inherits } = require('node:util') +const Dicer = require('../deps/dicer/lib/Dicer') + +const MultipartParser = require('./types/multipart') +const UrlencodedParser = require('./types/urlencoded') +const parseParams = require('./utils/parseParams') + +function Busboy (opts) { + if (!(this instanceof Busboy)) { return new Busboy(opts) } + + if (typeof opts !== 'object') { + throw new TypeError('Busboy expected an options-Object.') + } + if (typeof opts.headers !== 'object') { + throw new TypeError('Busboy expected an options-Object with headers-attribute.') + } + if (typeof opts.headers['content-type'] !== 'string') { + throw new TypeError('Missing Content-Type-header.') + } + + const { + headers, + ...streamOptions + } = opts + + this.opts = { + autoDestroy: false, + ...streamOptions + } + WritableStream.call(this, this.opts) + + this._done = false + this._parser = this.getParserByHeaders(headers) + this._finished = false +} +inherits(Busboy, WritableStream) + +Busboy.prototype.emit = function (ev) { + if (ev === 'finish') { + if (!this._done) { + this._parser?.end() + return + } else if (this._finished) { + return + } + this._finished = true + } + WritableStream.prototype.emit.apply(this, arguments) +} + +Busboy.prototype.getParserByHeaders = function (headers) { + const parsed = parseParams(headers['content-type']) + + const cfg = { + defCharset: this.opts.defCharset, + fileHwm: this.opts.fileHwm, + headers, + highWaterMark: this.opts.highWaterMark, + isPartAFile: this.opts.isPartAFile, + limits: this.opts.limits, + parsedConType: parsed, + preservePath: this.opts.preservePath + } + + if (MultipartParser.detect.test(parsed[0])) { + return new MultipartParser(this, cfg) + } + if (UrlencodedParser.detect.test(parsed[0])) { + return new UrlencodedParser(this, cfg) + } + throw new Error('Unsupported Content-Type.') +} + +Busboy.prototype._write = function (chunk, encoding, cb) { + this._parser.write(chunk, cb) +} + +module.exports = Busboy +module.exports.default = Busboy +module.exports.Busboy = Busboy + +module.exports.Dicer = Dicer diff --git a/action/node_modules/@fastify/busboy/lib/types/multipart.js b/action/node_modules/@fastify/busboy/lib/types/multipart.js new file mode 100644 index 00000000..d691eca3 --- /dev/null +++ b/action/node_modules/@fastify/busboy/lib/types/multipart.js @@ -0,0 +1,306 @@ +'use strict' + +// TODO: +// * support 1 nested multipart level +// (see second multipart example here: +// http://www.w3.org/TR/html401/interact/forms.html#didx-multipartform-data) +// * support limits.fieldNameSize +// -- this will require modifications to utils.parseParams + +const { Readable } = require('node:stream') +const { inherits } = require('node:util') + +const Dicer = require('../../deps/dicer/lib/Dicer') + +const parseParams = require('../utils/parseParams') +const decodeText = require('../utils/decodeText') +const basename = require('../utils/basename') +const getLimit = require('../utils/getLimit') + +const RE_BOUNDARY = /^boundary$/i +const RE_FIELD = /^form-data$/i +const RE_CHARSET = /^charset$/i +const RE_FILENAME = /^filename$/i +const RE_NAME = /^name$/i + +Multipart.detect = /^multipart\/form-data/i +function Multipart (boy, cfg) { + let i + let len + const self = this + let boundary + const limits = cfg.limits + const isPartAFile = cfg.isPartAFile || ((fieldName, contentType, fileName) => (contentType === 'application/octet-stream' || fileName !== undefined)) + const parsedConType = cfg.parsedConType || [] + const defCharset = cfg.defCharset || 'utf8' + const preservePath = cfg.preservePath + const fileOpts = { highWaterMark: cfg.fileHwm } + + for (i = 0, len = parsedConType.length; i < len; ++i) { + if (Array.isArray(parsedConType[i]) && + RE_BOUNDARY.test(parsedConType[i][0])) { + boundary = parsedConType[i][1] + break + } + } + + function checkFinished () { + if (nends === 0 && finished && !boy._done) { + finished = false + self.end() + } + } + + if (typeof boundary !== 'string') { throw new Error('Multipart: Boundary not found') } + + const fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024) + const fileSizeLimit = getLimit(limits, 'fileSize', Infinity) + const filesLimit = getLimit(limits, 'files', Infinity) + const fieldsLimit = getLimit(limits, 'fields', Infinity) + const partsLimit = getLimit(limits, 'parts', Infinity) + const headerPairsLimit = getLimit(limits, 'headerPairs', 2000) + const headerSizeLimit = getLimit(limits, 'headerSize', 80 * 1024) + + let nfiles = 0 + let nfields = 0 + let nends = 0 + let curFile + let curField + let finished = false + + this._needDrain = false + this._pause = false + this._cb = undefined + this._nparts = 0 + this._boy = boy + + const parserCfg = { + boundary, + maxHeaderPairs: headerPairsLimit, + maxHeaderSize: headerSizeLimit, + partHwm: fileOpts.highWaterMark, + highWaterMark: cfg.highWaterMark + } + + this.parser = new Dicer(parserCfg) + this.parser.on('drain', function () { + self._needDrain = false + if (self._cb && !self._pause) { + const cb = self._cb + self._cb = undefined + cb() + } + }).on('part', function onPart (part) { + if (++self._nparts > partsLimit) { + self.parser.removeListener('part', onPart) + self.parser.on('part', skipPart) + boy.hitPartsLimit = true + boy.emit('partsLimit') + return skipPart(part) + } + + // hack because streams2 _always_ doesn't emit 'end' until nextTick, so let + // us emit 'end' early since we know the part has ended if we are already + // seeing the next part + if (curField) { + const field = curField + field.emit('end') + field.removeAllListeners('end') + } + + part.on('header', function (header) { + let contype + let fieldname + let parsed + let charset + let encoding + let filename + let nsize = 0 + + if (header['content-type']) { + parsed = parseParams(header['content-type'][0]) + if (parsed[0]) { + contype = parsed[0].toLowerCase() + for (i = 0, len = parsed.length; i < len; ++i) { + if (RE_CHARSET.test(parsed[i][0])) { + charset = parsed[i][1].toLowerCase() + break + } + } + } + } + + if (contype === undefined) { contype = 'text/plain' } + if (charset === undefined) { charset = defCharset } + + if (header['content-disposition']) { + parsed = parseParams(header['content-disposition'][0]) + if (!RE_FIELD.test(parsed[0])) { return skipPart(part) } + for (i = 0, len = parsed.length; i < len; ++i) { + if (RE_NAME.test(parsed[i][0])) { + fieldname = parsed[i][1] + } else if (RE_FILENAME.test(parsed[i][0])) { + filename = parsed[i][1] + if (!preservePath) { filename = basename(filename) } + } + } + } else { return skipPart(part) } + + if (header['content-transfer-encoding']) { encoding = header['content-transfer-encoding'][0].toLowerCase() } else { encoding = '7bit' } + + let onData, + onEnd + + if (isPartAFile(fieldname, contype, filename)) { + // file/binary field + if (nfiles === filesLimit) { + if (!boy.hitFilesLimit) { + boy.hitFilesLimit = true + boy.emit('filesLimit') + } + return skipPart(part) + } + + ++nfiles + + if (boy.listenerCount('file') === 0) { + self.parser._ignore() + return + } + + ++nends + const file = new FileStream(fileOpts) + curFile = file + file.on('end', function () { + --nends + self._pause = false + checkFinished() + if (self._cb && !self._needDrain) { + const cb = self._cb + self._cb = undefined + cb() + } + }) + file._read = function (n) { + if (!self._pause) { return } + self._pause = false + if (self._cb && !self._needDrain) { + const cb = self._cb + self._cb = undefined + cb() + } + } + boy.emit('file', fieldname, file, filename, encoding, contype) + + onData = function (data) { + if ((nsize += data.length) > fileSizeLimit) { + const extralen = fileSizeLimit - nsize + data.length + if (extralen > 0) { file.push(data.slice(0, extralen)) } + file.truncated = true + file.bytesRead = fileSizeLimit + part.removeAllListeners('data') + file.emit('limit') + return + } else if (!file.push(data)) { self._pause = true } + + file.bytesRead = nsize + } + + onEnd = function () { + curFile = undefined + file.push(null) + } + } else { + // non-file field + if (nfields === fieldsLimit) { + if (!boy.hitFieldsLimit) { + boy.hitFieldsLimit = true + boy.emit('fieldsLimit') + } + return skipPart(part) + } + + ++nfields + ++nends + let buffer = '' + let truncated = false + curField = part + + onData = function (data) { + if ((nsize += data.length) > fieldSizeLimit) { + const extralen = (fieldSizeLimit - (nsize - data.length)) + buffer += data.toString('binary', 0, extralen) + truncated = true + part.removeAllListeners('data') + } else { buffer += data.toString('binary') } + } + + onEnd = function () { + curField = undefined + if (buffer.length) { buffer = decodeText(buffer, 'binary', charset) } + boy.emit('field', fieldname, buffer, false, truncated, encoding, contype) + --nends + checkFinished() + } + } + + /* As of node@2efe4ab761666 (v0.10.29+/v0.11.14+), busboy had become + broken. Streams2/streams3 is a huge black box of confusion, but + somehow overriding the sync state seems to fix things again (and still + seems to work for previous node versions). + */ + part._readableState.sync = false + + part.on('data', onData) + part.on('end', onEnd) + }).on('error', function (err) { + if (curFile) { curFile.emit('error', err) } + }) + }).on('error', function (err) { + boy.emit('error', err) + }).on('finish', function () { + finished = true + checkFinished() + }) +} + +Multipart.prototype.write = function (chunk, cb) { + const r = this.parser.write(chunk) + if (r && !this._pause) { + cb() + } else { + this._needDrain = !r + this._cb = cb + } +} + +Multipart.prototype.end = function () { + const self = this + + if (self.parser.writable) { + self.parser.end() + } else if (!self._boy._done) { + process.nextTick(function () { + self._boy._done = true + self._boy.emit('finish') + }) + } +} + +function skipPart (part) { + part.resume() +} + +function FileStream (opts) { + Readable.call(this, opts) + + this.bytesRead = 0 + + this.truncated = false +} + +inherits(FileStream, Readable) + +FileStream.prototype._read = function (n) {} + +module.exports = Multipart diff --git a/action/node_modules/@fastify/busboy/lib/types/urlencoded.js b/action/node_modules/@fastify/busboy/lib/types/urlencoded.js new file mode 100644 index 00000000..6f5f7846 --- /dev/null +++ b/action/node_modules/@fastify/busboy/lib/types/urlencoded.js @@ -0,0 +1,190 @@ +'use strict' + +const Decoder = require('../utils/Decoder') +const decodeText = require('../utils/decodeText') +const getLimit = require('../utils/getLimit') + +const RE_CHARSET = /^charset$/i + +UrlEncoded.detect = /^application\/x-www-form-urlencoded/i +function UrlEncoded (boy, cfg) { + const limits = cfg.limits + const parsedConType = cfg.parsedConType + this.boy = boy + + this.fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024) + this.fieldNameSizeLimit = getLimit(limits, 'fieldNameSize', 100) + this.fieldsLimit = getLimit(limits, 'fields', Infinity) + + let charset + for (var i = 0, len = parsedConType.length; i < len; ++i) { // eslint-disable-line no-var + if (Array.isArray(parsedConType[i]) && + RE_CHARSET.test(parsedConType[i][0])) { + charset = parsedConType[i][1].toLowerCase() + break + } + } + + if (charset === undefined) { charset = cfg.defCharset || 'utf8' } + + this.decoder = new Decoder() + this.charset = charset + this._fields = 0 + this._state = 'key' + this._checkingBytes = true + this._bytesKey = 0 + this._bytesVal = 0 + this._key = '' + this._val = '' + this._keyTrunc = false + this._valTrunc = false + this._hitLimit = false +} + +UrlEncoded.prototype.write = function (data, cb) { + if (this._fields === this.fieldsLimit) { + if (!this.boy.hitFieldsLimit) { + this.boy.hitFieldsLimit = true + this.boy.emit('fieldsLimit') + } + return cb() + } + + let idxeq; let idxamp; let i; let p = 0; const len = data.length + + while (p < len) { + if (this._state === 'key') { + idxeq = idxamp = undefined + for (i = p; i < len; ++i) { + if (!this._checkingBytes) { ++p } + if (data[i] === 0x3D/* = */) { + idxeq = i + break + } else if (data[i] === 0x26/* & */) { + idxamp = i + break + } + if (this._checkingBytes && this._bytesKey === this.fieldNameSizeLimit) { + this._hitLimit = true + break + } else if (this._checkingBytes) { ++this._bytesKey } + } + + if (idxeq !== undefined) { + // key with assignment + if (idxeq > p) { this._key += this.decoder.write(data.toString('binary', p, idxeq)) } + this._state = 'val' + + this._hitLimit = false + this._checkingBytes = true + this._val = '' + this._bytesVal = 0 + this._valTrunc = false + this.decoder.reset() + + p = idxeq + 1 + } else if (idxamp !== undefined) { + // key with no assignment + ++this._fields + let key; const keyTrunc = this._keyTrunc + if (idxamp > p) { key = (this._key += this.decoder.write(data.toString('binary', p, idxamp))) } else { key = this._key } + + this._hitLimit = false + this._checkingBytes = true + this._key = '' + this._bytesKey = 0 + this._keyTrunc = false + this.decoder.reset() + + if (key.length) { + this.boy.emit('field', decodeText(key, 'binary', this.charset), + '', + keyTrunc, + false) + } + + p = idxamp + 1 + if (this._fields === this.fieldsLimit) { return cb() } + } else if (this._hitLimit) { + // we may not have hit the actual limit if there are encoded bytes... + if (i > p) { this._key += this.decoder.write(data.toString('binary', p, i)) } + p = i + if ((this._bytesKey = this._key.length) === this.fieldNameSizeLimit) { + // yep, we actually did hit the limit + this._checkingBytes = false + this._keyTrunc = true + } + } else { + if (p < len) { this._key += this.decoder.write(data.toString('binary', p)) } + p = len + } + } else { + idxamp = undefined + for (i = p; i < len; ++i) { + if (!this._checkingBytes) { ++p } + if (data[i] === 0x26/* & */) { + idxamp = i + break + } + if (this._checkingBytes && this._bytesVal === this.fieldSizeLimit) { + this._hitLimit = true + break + } else if (this._checkingBytes) { ++this._bytesVal } + } + + if (idxamp !== undefined) { + ++this._fields + if (idxamp > p) { this._val += this.decoder.write(data.toString('binary', p, idxamp)) } + this.boy.emit('field', decodeText(this._key, 'binary', this.charset), + decodeText(this._val, 'binary', this.charset), + this._keyTrunc, + this._valTrunc) + this._state = 'key' + + this._hitLimit = false + this._checkingBytes = true + this._key = '' + this._bytesKey = 0 + this._keyTrunc = false + this.decoder.reset() + + p = idxamp + 1 + if (this._fields === this.fieldsLimit) { return cb() } + } else if (this._hitLimit) { + // we may not have hit the actual limit if there are encoded bytes... + if (i > p) { this._val += this.decoder.write(data.toString('binary', p, i)) } + p = i + if ((this._val === '' && this.fieldSizeLimit === 0) || + (this._bytesVal = this._val.length) === this.fieldSizeLimit) { + // yep, we actually did hit the limit + this._checkingBytes = false + this._valTrunc = true + } + } else { + if (p < len) { this._val += this.decoder.write(data.toString('binary', p)) } + p = len + } + } + } + cb() +} + +UrlEncoded.prototype.end = function () { + if (this.boy._done) { return } + + if (this._state === 'key' && this._key.length > 0) { + this.boy.emit('field', decodeText(this._key, 'binary', this.charset), + '', + this._keyTrunc, + false) + } else if (this._state === 'val') { + this.boy.emit('field', decodeText(this._key, 'binary', this.charset), + decodeText(this._val, 'binary', this.charset), + this._keyTrunc, + this._valTrunc) + } + this.boy._done = true + this.boy.emit('finish') +} + +module.exports = UrlEncoded diff --git a/action/node_modules/@fastify/busboy/lib/utils/Decoder.js b/action/node_modules/@fastify/busboy/lib/utils/Decoder.js new file mode 100644 index 00000000..7917678c --- /dev/null +++ b/action/node_modules/@fastify/busboy/lib/utils/Decoder.js @@ -0,0 +1,54 @@ +'use strict' + +const RE_PLUS = /\+/g + +const HEX = [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +] + +function Decoder () { + this.buffer = undefined +} +Decoder.prototype.write = function (str) { + // Replace '+' with ' ' before decoding + str = str.replace(RE_PLUS, ' ') + let res = '' + let i = 0; let p = 0; const len = str.length + for (; i < len; ++i) { + if (this.buffer !== undefined) { + if (!HEX[str.charCodeAt(i)]) { + res += '%' + this.buffer + this.buffer = undefined + --i // retry character + } else { + this.buffer += str[i] + ++p + if (this.buffer.length === 2) { + res += String.fromCharCode(parseInt(this.buffer, 16)) + this.buffer = undefined + } + } + } else if (str[i] === '%') { + if (i > p) { + res += str.substring(p, i) + p = i + } + this.buffer = '' + ++p + } + } + if (p < len && this.buffer === undefined) { res += str.substring(p) } + return res +} +Decoder.prototype.reset = function () { + this.buffer = undefined +} + +module.exports = Decoder diff --git a/action/node_modules/@fastify/busboy/lib/utils/basename.js b/action/node_modules/@fastify/busboy/lib/utils/basename.js new file mode 100644 index 00000000..db588199 --- /dev/null +++ b/action/node_modules/@fastify/busboy/lib/utils/basename.js @@ -0,0 +1,14 @@ +'use strict' + +module.exports = function basename (path) { + if (typeof path !== 'string') { return '' } + for (var i = path.length - 1; i >= 0; --i) { // eslint-disable-line no-var + switch (path.charCodeAt(i)) { + case 0x2F: // '/' + case 0x5C: // '\' + path = path.slice(i + 1) + return (path === '..' || path === '.' ? '' : path) + } + } + return (path === '..' || path === '.' ? '' : path) +} diff --git a/action/node_modules/@fastify/busboy/lib/utils/decodeText.js b/action/node_modules/@fastify/busboy/lib/utils/decodeText.js new file mode 100644 index 00000000..eac7d35e --- /dev/null +++ b/action/node_modules/@fastify/busboy/lib/utils/decodeText.js @@ -0,0 +1,114 @@ +'use strict' + +// Node has always utf-8 +const utf8Decoder = new TextDecoder('utf-8') +const textDecoders = new Map([ + ['utf-8', utf8Decoder], + ['utf8', utf8Decoder] +]) + +function getDecoder (charset) { + let lc + while (true) { + switch (charset) { + case 'utf-8': + case 'utf8': + return decoders.utf8 + case 'latin1': + case 'ascii': // TODO: Make these a separate, strict decoder? + case 'us-ascii': + case 'iso-8859-1': + case 'iso8859-1': + case 'iso88591': + case 'iso_8859-1': + case 'windows-1252': + case 'iso_8859-1:1987': + case 'cp1252': + case 'x-cp1252': + return decoders.latin1 + case 'utf16le': + case 'utf-16le': + case 'ucs2': + case 'ucs-2': + return decoders.utf16le + case 'base64': + return decoders.base64 + default: + if (lc === undefined) { + lc = true + charset = charset.toLowerCase() + continue + } + return decoders.other.bind(charset) + } + } +} + +const decoders = { + utf8: (data, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + data = Buffer.from(data, sourceEncoding) + } + return data.utf8Slice(0, data.length) + }, + + latin1: (data, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + return data + } + return data.latin1Slice(0, data.length) + }, + + utf16le: (data, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + data = Buffer.from(data, sourceEncoding) + } + return data.ucs2Slice(0, data.length) + }, + + base64: (data, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + data = Buffer.from(data, sourceEncoding) + } + return data.base64Slice(0, data.length) + }, + + other: (data, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + data = Buffer.from(data, sourceEncoding) + } + + if (textDecoders.has(this.toString())) { + try { + return textDecoders.get(this).decode(data) + } catch {} + } + return typeof data === 'string' + ? data + : data.toString() + } +} + +function decodeText (text, sourceEncoding, destEncoding) { + if (text) { + return getDecoder(destEncoding)(text, sourceEncoding) + } + return text +} + +module.exports = decodeText diff --git a/action/node_modules/@fastify/busboy/lib/utils/getLimit.js b/action/node_modules/@fastify/busboy/lib/utils/getLimit.js new file mode 100644 index 00000000..cb64fd67 --- /dev/null +++ b/action/node_modules/@fastify/busboy/lib/utils/getLimit.js @@ -0,0 +1,16 @@ +'use strict' + +module.exports = function getLimit (limits, name, defaultLimit) { + if ( + !limits || + limits[name] === undefined || + limits[name] === null + ) { return defaultLimit } + + if ( + typeof limits[name] !== 'number' || + isNaN(limits[name]) + ) { throw new TypeError('Limit ' + name + ' is not a valid number') } + + return limits[name] +} diff --git a/action/node_modules/@fastify/busboy/lib/utils/parseParams.js b/action/node_modules/@fastify/busboy/lib/utils/parseParams.js new file mode 100644 index 00000000..1698e62e --- /dev/null +++ b/action/node_modules/@fastify/busboy/lib/utils/parseParams.js @@ -0,0 +1,196 @@ +/* eslint-disable object-property-newline */ +'use strict' + +const decodeText = require('./decodeText') + +const RE_ENCODED = /%[a-fA-F0-9][a-fA-F0-9]/g + +const EncodedLookup = { + '%00': '\x00', '%01': '\x01', '%02': '\x02', '%03': '\x03', '%04': '\x04', + '%05': '\x05', '%06': '\x06', '%07': '\x07', '%08': '\x08', '%09': '\x09', + '%0a': '\x0a', '%0A': '\x0a', '%0b': '\x0b', '%0B': '\x0b', '%0c': '\x0c', + '%0C': '\x0c', '%0d': '\x0d', '%0D': '\x0d', '%0e': '\x0e', '%0E': '\x0e', + '%0f': '\x0f', '%0F': '\x0f', '%10': '\x10', '%11': '\x11', '%12': '\x12', + '%13': '\x13', '%14': '\x14', '%15': '\x15', '%16': '\x16', '%17': '\x17', + '%18': '\x18', '%19': '\x19', '%1a': '\x1a', '%1A': '\x1a', '%1b': '\x1b', + '%1B': '\x1b', '%1c': '\x1c', '%1C': '\x1c', '%1d': '\x1d', '%1D': '\x1d', + '%1e': '\x1e', '%1E': '\x1e', '%1f': '\x1f', '%1F': '\x1f', '%20': '\x20', + '%21': '\x21', '%22': '\x22', '%23': '\x23', '%24': '\x24', '%25': '\x25', + '%26': '\x26', '%27': '\x27', '%28': '\x28', '%29': '\x29', '%2a': '\x2a', + '%2A': '\x2a', '%2b': '\x2b', '%2B': '\x2b', '%2c': '\x2c', '%2C': '\x2c', + '%2d': '\x2d', '%2D': '\x2d', '%2e': '\x2e', '%2E': '\x2e', '%2f': '\x2f', + '%2F': '\x2f', '%30': '\x30', '%31': '\x31', '%32': '\x32', '%33': '\x33', + '%34': '\x34', '%35': '\x35', '%36': '\x36', '%37': '\x37', '%38': '\x38', + '%39': '\x39', '%3a': '\x3a', '%3A': '\x3a', '%3b': '\x3b', '%3B': '\x3b', + '%3c': '\x3c', '%3C': '\x3c', '%3d': '\x3d', '%3D': '\x3d', '%3e': '\x3e', + '%3E': '\x3e', '%3f': '\x3f', '%3F': '\x3f', '%40': '\x40', '%41': '\x41', + '%42': '\x42', '%43': '\x43', '%44': '\x44', '%45': '\x45', '%46': '\x46', + '%47': '\x47', '%48': '\x48', '%49': '\x49', '%4a': '\x4a', '%4A': '\x4a', + '%4b': '\x4b', '%4B': '\x4b', '%4c': '\x4c', '%4C': '\x4c', '%4d': '\x4d', + '%4D': '\x4d', '%4e': '\x4e', '%4E': '\x4e', '%4f': '\x4f', '%4F': '\x4f', + '%50': '\x50', '%51': '\x51', '%52': '\x52', '%53': '\x53', '%54': '\x54', + '%55': '\x55', '%56': '\x56', '%57': '\x57', '%58': '\x58', '%59': '\x59', + '%5a': '\x5a', '%5A': '\x5a', '%5b': '\x5b', '%5B': '\x5b', '%5c': '\x5c', + '%5C': '\x5c', '%5d': '\x5d', '%5D': '\x5d', '%5e': '\x5e', '%5E': '\x5e', + '%5f': '\x5f', '%5F': '\x5f', '%60': '\x60', '%61': '\x61', '%62': '\x62', + '%63': '\x63', '%64': '\x64', '%65': '\x65', '%66': '\x66', '%67': '\x67', + '%68': '\x68', '%69': '\x69', '%6a': '\x6a', '%6A': '\x6a', '%6b': '\x6b', + '%6B': '\x6b', '%6c': '\x6c', '%6C': '\x6c', '%6d': '\x6d', '%6D': '\x6d', + '%6e': '\x6e', '%6E': '\x6e', '%6f': '\x6f', '%6F': '\x6f', '%70': '\x70', + '%71': '\x71', '%72': '\x72', '%73': '\x73', '%74': '\x74', '%75': '\x75', + '%76': '\x76', '%77': '\x77', '%78': '\x78', '%79': '\x79', '%7a': '\x7a', + '%7A': '\x7a', '%7b': '\x7b', '%7B': '\x7b', '%7c': '\x7c', '%7C': '\x7c', + '%7d': '\x7d', '%7D': '\x7d', '%7e': '\x7e', '%7E': '\x7e', '%7f': '\x7f', + '%7F': '\x7f', '%80': '\x80', '%81': '\x81', '%82': '\x82', '%83': '\x83', + '%84': '\x84', '%85': '\x85', '%86': '\x86', '%87': '\x87', '%88': '\x88', + '%89': '\x89', '%8a': '\x8a', '%8A': '\x8a', '%8b': '\x8b', '%8B': '\x8b', + '%8c': '\x8c', '%8C': '\x8c', '%8d': '\x8d', '%8D': '\x8d', '%8e': '\x8e', + '%8E': '\x8e', '%8f': '\x8f', '%8F': '\x8f', '%90': '\x90', '%91': '\x91', + '%92': '\x92', '%93': '\x93', '%94': '\x94', '%95': '\x95', '%96': '\x96', + '%97': '\x97', '%98': '\x98', '%99': '\x99', '%9a': '\x9a', '%9A': '\x9a', + '%9b': '\x9b', '%9B': '\x9b', '%9c': '\x9c', '%9C': '\x9c', '%9d': '\x9d', + '%9D': '\x9d', '%9e': '\x9e', '%9E': '\x9e', '%9f': '\x9f', '%9F': '\x9f', + '%a0': '\xa0', '%A0': '\xa0', '%a1': '\xa1', '%A1': '\xa1', '%a2': '\xa2', + '%A2': '\xa2', '%a3': '\xa3', '%A3': '\xa3', '%a4': '\xa4', '%A4': '\xa4', + '%a5': '\xa5', '%A5': '\xa5', '%a6': '\xa6', '%A6': '\xa6', '%a7': '\xa7', + '%A7': '\xa7', '%a8': '\xa8', '%A8': '\xa8', '%a9': '\xa9', '%A9': '\xa9', + '%aa': '\xaa', '%Aa': '\xaa', '%aA': '\xaa', '%AA': '\xaa', '%ab': '\xab', + '%Ab': '\xab', '%aB': '\xab', '%AB': '\xab', '%ac': '\xac', '%Ac': '\xac', + '%aC': '\xac', '%AC': '\xac', '%ad': '\xad', '%Ad': '\xad', '%aD': '\xad', + '%AD': '\xad', '%ae': '\xae', '%Ae': '\xae', '%aE': '\xae', '%AE': '\xae', + '%af': '\xaf', '%Af': '\xaf', '%aF': '\xaf', '%AF': '\xaf', '%b0': '\xb0', + '%B0': '\xb0', '%b1': '\xb1', '%B1': '\xb1', '%b2': '\xb2', '%B2': '\xb2', + '%b3': '\xb3', '%B3': '\xb3', '%b4': '\xb4', '%B4': '\xb4', '%b5': '\xb5', + '%B5': '\xb5', '%b6': '\xb6', '%B6': '\xb6', '%b7': '\xb7', '%B7': '\xb7', + '%b8': '\xb8', '%B8': '\xb8', '%b9': '\xb9', '%B9': '\xb9', '%ba': '\xba', + '%Ba': '\xba', '%bA': '\xba', '%BA': '\xba', '%bb': '\xbb', '%Bb': '\xbb', + '%bB': '\xbb', '%BB': '\xbb', '%bc': '\xbc', '%Bc': '\xbc', '%bC': '\xbc', + '%BC': '\xbc', '%bd': '\xbd', '%Bd': '\xbd', '%bD': '\xbd', '%BD': '\xbd', + '%be': '\xbe', '%Be': '\xbe', '%bE': '\xbe', '%BE': '\xbe', '%bf': '\xbf', + '%Bf': '\xbf', '%bF': '\xbf', '%BF': '\xbf', '%c0': '\xc0', '%C0': '\xc0', + '%c1': '\xc1', '%C1': '\xc1', '%c2': '\xc2', '%C2': '\xc2', '%c3': '\xc3', + '%C3': '\xc3', '%c4': '\xc4', '%C4': '\xc4', '%c5': '\xc5', '%C5': '\xc5', + '%c6': '\xc6', '%C6': '\xc6', '%c7': '\xc7', '%C7': '\xc7', '%c8': '\xc8', + '%C8': '\xc8', '%c9': '\xc9', '%C9': '\xc9', '%ca': '\xca', '%Ca': '\xca', + '%cA': '\xca', '%CA': '\xca', '%cb': '\xcb', '%Cb': '\xcb', '%cB': '\xcb', + '%CB': '\xcb', '%cc': '\xcc', '%Cc': '\xcc', '%cC': '\xcc', '%CC': '\xcc', + '%cd': '\xcd', '%Cd': '\xcd', '%cD': '\xcd', '%CD': '\xcd', '%ce': '\xce', + '%Ce': '\xce', '%cE': '\xce', '%CE': '\xce', '%cf': '\xcf', '%Cf': '\xcf', + '%cF': '\xcf', '%CF': '\xcf', '%d0': '\xd0', '%D0': '\xd0', '%d1': '\xd1', + '%D1': '\xd1', '%d2': '\xd2', '%D2': '\xd2', '%d3': '\xd3', '%D3': '\xd3', + '%d4': '\xd4', '%D4': '\xd4', '%d5': '\xd5', '%D5': '\xd5', '%d6': '\xd6', + '%D6': '\xd6', '%d7': '\xd7', '%D7': '\xd7', '%d8': '\xd8', '%D8': '\xd8', + '%d9': '\xd9', '%D9': '\xd9', '%da': '\xda', '%Da': '\xda', '%dA': '\xda', + '%DA': '\xda', '%db': '\xdb', '%Db': '\xdb', '%dB': '\xdb', '%DB': '\xdb', + '%dc': '\xdc', '%Dc': '\xdc', '%dC': '\xdc', '%DC': '\xdc', '%dd': '\xdd', + '%Dd': '\xdd', '%dD': '\xdd', '%DD': '\xdd', '%de': '\xde', '%De': '\xde', + '%dE': '\xde', '%DE': '\xde', '%df': '\xdf', '%Df': '\xdf', '%dF': '\xdf', + '%DF': '\xdf', '%e0': '\xe0', '%E0': '\xe0', '%e1': '\xe1', '%E1': '\xe1', + '%e2': '\xe2', '%E2': '\xe2', '%e3': '\xe3', '%E3': '\xe3', '%e4': '\xe4', + '%E4': '\xe4', '%e5': '\xe5', '%E5': '\xe5', '%e6': '\xe6', '%E6': '\xe6', + '%e7': '\xe7', '%E7': '\xe7', '%e8': '\xe8', '%E8': '\xe8', '%e9': '\xe9', + '%E9': '\xe9', '%ea': '\xea', '%Ea': '\xea', '%eA': '\xea', '%EA': '\xea', + '%eb': '\xeb', '%Eb': '\xeb', '%eB': '\xeb', '%EB': '\xeb', '%ec': '\xec', + '%Ec': '\xec', '%eC': '\xec', '%EC': '\xec', '%ed': '\xed', '%Ed': '\xed', + '%eD': '\xed', '%ED': '\xed', '%ee': '\xee', '%Ee': '\xee', '%eE': '\xee', + '%EE': '\xee', '%ef': '\xef', '%Ef': '\xef', '%eF': '\xef', '%EF': '\xef', + '%f0': '\xf0', '%F0': '\xf0', '%f1': '\xf1', '%F1': '\xf1', '%f2': '\xf2', + '%F2': '\xf2', '%f3': '\xf3', '%F3': '\xf3', '%f4': '\xf4', '%F4': '\xf4', + '%f5': '\xf5', '%F5': '\xf5', '%f6': '\xf6', '%F6': '\xf6', '%f7': '\xf7', + '%F7': '\xf7', '%f8': '\xf8', '%F8': '\xf8', '%f9': '\xf9', '%F9': '\xf9', + '%fa': '\xfa', '%Fa': '\xfa', '%fA': '\xfa', '%FA': '\xfa', '%fb': '\xfb', + '%Fb': '\xfb', '%fB': '\xfb', '%FB': '\xfb', '%fc': '\xfc', '%Fc': '\xfc', + '%fC': '\xfc', '%FC': '\xfc', '%fd': '\xfd', '%Fd': '\xfd', '%fD': '\xfd', + '%FD': '\xfd', '%fe': '\xfe', '%Fe': '\xfe', '%fE': '\xfe', '%FE': '\xfe', + '%ff': '\xff', '%Ff': '\xff', '%fF': '\xff', '%FF': '\xff' +} + +function encodedReplacer (match) { + return EncodedLookup[match] +} + +const STATE_KEY = 0 +const STATE_VALUE = 1 +const STATE_CHARSET = 2 +const STATE_LANG = 3 + +function parseParams (str) { + const res = [] + let state = STATE_KEY + let charset = '' + let inquote = false + let escaping = false + let p = 0 + let tmp = '' + const len = str.length + + for (var i = 0; i < len; ++i) { // eslint-disable-line no-var + const char = str[i] + if (char === '\\' && inquote) { + if (escaping) { escaping = false } else { + escaping = true + continue + } + } else if (char === '"') { + if (!escaping) { + if (inquote) { + inquote = false + state = STATE_KEY + } else { inquote = true } + continue + } else { escaping = false } + } else { + if (escaping && inquote) { tmp += '\\' } + escaping = false + if ((state === STATE_CHARSET || state === STATE_LANG) && char === "'") { + if (state === STATE_CHARSET) { + state = STATE_LANG + charset = tmp.substring(1) + } else { state = STATE_VALUE } + tmp = '' + continue + } else if (state === STATE_KEY && + (char === '*' || char === '=') && + res.length) { + state = char === '*' + ? STATE_CHARSET + : STATE_VALUE + res[p] = [tmp, undefined] + tmp = '' + continue + } else if (!inquote && char === ';') { + state = STATE_KEY + if (charset) { + if (tmp.length) { + tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer), + 'binary', + charset) + } + charset = '' + } else if (tmp.length) { + tmp = decodeText(tmp, 'binary', 'utf8') + } + if (res[p] === undefined) { res[p] = tmp } else { res[p][1] = tmp } + tmp = '' + ++p + continue + } else if (!inquote && (char === ' ' || char === '\t')) { continue } + } + tmp += char + } + if (charset && tmp.length) { + tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer), + 'binary', + charset) + } else if (tmp) { + tmp = decodeText(tmp, 'binary', 'utf8') + } + + if (res[p] === undefined) { + if (tmp) { res[p] = tmp } + } else { res[p][1] = tmp } + + return res +} + +module.exports = parseParams diff --git a/action/node_modules/@fastify/busboy/package.json b/action/node_modules/@fastify/busboy/package.json new file mode 100644 index 00000000..83693acb --- /dev/null +++ b/action/node_modules/@fastify/busboy/package.json @@ -0,0 +1,86 @@ +{ + "name": "@fastify/busboy", + "version": "2.1.1", + "private": false, + "author": "Brian White ", + "contributors": [ + { + "name": "Igor Savin", + "email": "kibertoad@gmail.com", + "url": "https://github.com/kibertoad" + }, + { + "name": "Aras Abbasi", + "email": "aras.abbasi@gmail.com", + "url": "https://github.com/uzlopak" + } + ], + "description": "A streaming parser for HTML form data for node.js", + "main": "lib/main", + "type": "commonjs", + "types": "lib/main.d.ts", + "scripts": { + "bench:busboy": "cd benchmarks && npm install && npm run benchmark-fastify", + "bench:dicer": "node bench/dicer/dicer-bench-multipart-parser.js", + "coveralls": "nyc report --reporter=lcov", + "lint": "npm run lint:standard", + "lint:everything": "npm run lint && npm run test:types", + "lint:fix": "standard --fix", + "lint:standard": "standard --verbose | snazzy", + "test:mocha": "tap", + "test:types": "tsd", + "test:coverage": "nyc npm run test", + "test": "npm run test:mocha" + }, + "engines": { + "node": ">=14" + }, + "devDependencies": { + "@types/node": "^20.1.0", + "busboy": "^1.0.0", + "photofinish": "^1.8.0", + "snazzy": "^9.0.0", + "standard": "^17.0.0", + "tap": "^16.3.8", + "tinybench": "^2.5.1", + "tsd": "^0.30.0", + "typescript": "^5.0.2" + }, + "keywords": [ + "uploads", + "forms", + "multipart", + "form-data" + ], + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/fastify/busboy.git" + }, + "tsd": { + "directory": "test/types", + "compilerOptions": { + "esModuleInterop": false, + "module": "commonjs", + "target": "ES2017" + } + }, + "standard": { + "globals": [ + "describe", + "it" + ], + "ignore": [ + "bench" + ] + }, + "files": [ + "README.md", + "LICENSE", + "lib/*", + "deps/encoding/*", + "deps/dicer/lib", + "deps/streamsearch/", + "deps/dicer/LICENSE" + ] +} diff --git a/action/node_modules/busboy/.eslintrc.js b/action/node_modules/busboy/.eslintrc.js deleted file mode 100644 index be9311d0..00000000 --- a/action/node_modules/busboy/.eslintrc.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -module.exports = { - extends: '@mscdex/eslint-config', -}; diff --git a/action/node_modules/busboy/.github/workflows/ci.yml b/action/node_modules/busboy/.github/workflows/ci.yml deleted file mode 100644 index 799bae04..00000000 --- a/action/node_modules/busboy/.github/workflows/ci.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: CI - -on: - pull_request: - push: - branches: [ master ] - -jobs: - tests-linux: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - node-version: [10.16.0, 10.x, 12.x, 14.x, 16.x] - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: Install module - run: npm install - - name: Run tests - run: npm test diff --git a/action/node_modules/busboy/.github/workflows/lint.yml b/action/node_modules/busboy/.github/workflows/lint.yml deleted file mode 100644 index 9f9e1f58..00000000 --- a/action/node_modules/busboy/.github/workflows/lint.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: lint - -on: - pull_request: - push: - branches: [ master ] - -env: - NODE_VERSION: 16.x - -jobs: - lint-js: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ env.NODE_VERSION }} - uses: actions/setup-node@v1 - with: - node-version: ${{ env.NODE_VERSION }} - - name: Install ESLint + ESLint configs/plugins - run: npm install --only=dev - - name: Lint files - run: npm run lint diff --git a/action/node_modules/busboy/README.md b/action/node_modules/busboy/README.md deleted file mode 100644 index 654af304..00000000 --- a/action/node_modules/busboy/README.md +++ /dev/null @@ -1,191 +0,0 @@ -# Description - -A node.js module for parsing incoming HTML form data. - -Changes (breaking or otherwise) in v1.0.0 can be found [here](https://github.com/mscdex/busboy/issues/266). - -# Requirements - -* [node.js](http://nodejs.org/) -- v10.16.0 or newer - - -# Install - - npm install busboy - - -# Examples - -* Parsing (multipart) with default options: - -```js -const http = require('http'); - -const busboy = require('busboy'); - -http.createServer((req, res) => { - if (req.method === 'POST') { - console.log('POST request'); - const bb = busboy({ headers: req.headers }); - bb.on('file', (name, file, info) => { - const { filename, encoding, mimeType } = info; - console.log( - `File [${name}]: filename: %j, encoding: %j, mimeType: %j`, - filename, - encoding, - mimeType - ); - file.on('data', (data) => { - console.log(`File [${name}] got ${data.length} bytes`); - }).on('close', () => { - console.log(`File [${name}] done`); - }); - }); - bb.on('field', (name, val, info) => { - console.log(`Field [${name}]: value: %j`, val); - }); - bb.on('close', () => { - console.log('Done parsing form!'); - res.writeHead(303, { Connection: 'close', Location: '/' }); - res.end(); - }); - req.pipe(bb); - } else if (req.method === 'GET') { - res.writeHead(200, { Connection: 'close' }); - res.end(` - - - -
-
-
- -
- - - `); - } -}).listen(8000, () => { - console.log('Listening for requests'); -}); - -// Example output: -// -// Listening for requests -// < ... form submitted ... > -// POST request -// File [filefield]: filename: "logo.jpg", encoding: "binary", mime: "image/jpeg" -// File [filefield] got 11912 bytes -// Field [textfield]: value: "testing! :-)" -// File [filefield] done -// Done parsing form! -``` - -* Save all incoming files to disk: - -```js -const { randomFillSync } = require('crypto'); -const fs = require('fs'); -const http = require('http'); -const os = require('os'); -const path = require('path'); - -const busboy = require('busboy'); - -const random = (() => { - const buf = Buffer.alloc(16); - return () => randomFillSync(buf).toString('hex'); -})(); - -http.createServer((req, res) => { - if (req.method === 'POST') { - const bb = busboy({ headers: req.headers }); - bb.on('file', (name, file, info) => { - const saveTo = path.join(os.tmpdir(), `busboy-upload-${random()}`); - file.pipe(fs.createWriteStream(saveTo)); - }); - bb.on('close', () => { - res.writeHead(200, { 'Connection': 'close' }); - res.end(`That's all folks!`); - }); - req.pipe(bb); - return; - } - res.writeHead(404); - res.end(); -}).listen(8000, () => { - console.log('Listening for requests'); -}); -``` - - -# API - -## Exports - -`busboy` exports a single function: - -**( _function_ )**(< _object_ >config) - Creates and returns a new _Writable_ form parser stream. - -* Valid `config` properties: - - * **headers** - _object_ - These are the HTTP headers of the incoming request, which are used by individual parsers. - - * **highWaterMark** - _integer_ - highWaterMark to use for the parser stream. **Default:** node's _stream.Writable_ default. - - * **fileHwm** - _integer_ - highWaterMark to use for individual file streams. **Default:** node's _stream.Readable_ default. - - * **defCharset** - _string_ - Default character set to use when one isn't defined. **Default:** `'utf8'`. - - * **defParamCharset** - _string_ - For multipart forms, the default character set to use for values of part header parameters (e.g. filename) that are not extended parameters (that contain an explicit charset). **Default:** `'latin1'`. - - * **preservePath** - _boolean_ - If paths in filenames from file parts in a `'multipart/form-data'` request shall be preserved. **Default:** `false`. - - * **limits** - _object_ - Various limits on incoming data. Valid properties are: - - * **fieldNameSize** - _integer_ - Max field name size (in bytes). **Default:** `100`. - - * **fieldSize** - _integer_ - Max field value size (in bytes). **Default:** `1048576` (1MB). - - * **fields** - _integer_ - Max number of non-file fields. **Default:** `Infinity`. - - * **fileSize** - _integer_ - For multipart forms, the max file size (in bytes). **Default:** `Infinity`. - - * **files** - _integer_ - For multipart forms, the max number of file fields. **Default:** `Infinity`. - - * **parts** - _integer_ - For multipart forms, the max number of parts (fields + files). **Default:** `Infinity`. - - * **headerPairs** - _integer_ - For multipart forms, the max number of header key-value pairs to parse. **Default:** `2000` (same as node's http module). - -This function can throw exceptions if there is something wrong with the values in `config`. For example, if the Content-Type in `headers` is missing entirely, is not a supported type, or is missing the boundary for `'multipart/form-data'` requests. - -## (Special) Parser stream events - -* **file**(< _string_ >name, < _Readable_ >stream, < _object_ >info) - Emitted for each new file found. `name` contains the form field name. `stream` is a _Readable_ stream containing the file's data. No transformations/conversions (e.g. base64 to raw binary) are done on the file's data. `info` contains the following properties: - - * `filename` - _string_ - If supplied, this contains the file's filename. **WARNING:** You should almost _never_ use this value as-is (especially if you are using `preservePath: true` in your `config`) as it could contain malicious input. You are better off generating your own (safe) filenames, or at the very least using a hash of the filename. - - * `encoding` - _string_ - The file's `'Content-Transfer-Encoding'` value. - - * `mimeType` - _string_ - The file's `'Content-Type'` value. - - **Note:** If you listen for this event, you should always consume the `stream` whether you care about its contents or not (you can simply do `stream.resume();` if you want to discard/skip the contents), otherwise the `'finish'`/`'close'` event will never fire on the busboy parser stream. - However, if you aren't accepting files, you can either simply not listen for the `'file'` event at all or set `limits.files` to `0`, and any/all files will be automatically skipped (these skipped files will still count towards any configured `limits.files` and `limits.parts` limits though). - - **Note:** If a configured `limits.fileSize` limit was reached for a file, `stream` will both have a boolean property `truncated` set to `true` (best checked at the end of the stream) and emit a `'limit'` event to notify you when this happens. - -* **field**(< _string_ >name, < _string_ >value, < _object_ >info) - Emitted for each new non-file field found. `name` contains the form field name. `value` contains the string value of the field. `info` contains the following properties: - - * `nameTruncated` - _boolean_ - Whether `name` was truncated or not (due to a configured `limits.fieldNameSize` limit) - - * `valueTruncated` - _boolean_ - Whether `value` was truncated or not (due to a configured `limits.fieldSize` limit) - - * `encoding` - _string_ - The field's `'Content-Transfer-Encoding'` value. - - * `mimeType` - _string_ - The field's `'Content-Type'` value. - -* **partsLimit**() - Emitted when the configured `limits.parts` limit has been reached. No more `'file'` or `'field'` events will be emitted. - -* **filesLimit**() - Emitted when the configured `limits.files` limit has been reached. No more `'file'` events will be emitted. - -* **fieldsLimit**() - Emitted when the configured `limits.fields` limit has been reached. No more `'field'` events will be emitted. diff --git a/action/node_modules/busboy/bench/bench-multipart-fields-100mb-big.js b/action/node_modules/busboy/bench/bench-multipart-fields-100mb-big.js deleted file mode 100644 index ef15729e..00000000 --- a/action/node_modules/busboy/bench/bench-multipart-fields-100mb-big.js +++ /dev/null @@ -1,149 +0,0 @@ -'use strict'; - -function createMultipartBuffers(boundary, sizes) { - const bufs = []; - for (let i = 0; i < sizes.length; ++i) { - const mb = sizes[i] * 1024 * 1024; - bufs.push(Buffer.from([ - `--${boundary}`, - `content-disposition: form-data; name="field${i + 1}"`, - '', - '0'.repeat(mb), - '', - ].join('\r\n'))); - } - bufs.push(Buffer.from([ - `--${boundary}--`, - '', - ].join('\r\n'))); - return bufs; -} - -const boundary = '-----------------------------168072824752491622650073'; -const buffers = createMultipartBuffers(boundary, [ - 10, - 10, - 10, - 20, - 50, -]); -const calls = { - partBegin: 0, - headerField: 0, - headerValue: 0, - headerEnd: 0, - headersEnd: 0, - partData: 0, - partEnd: 0, - end: 0, -}; - -const moduleName = process.argv[2]; -switch (moduleName) { - case 'busboy': { - const busboy = require('busboy'); - - const parser = busboy({ - limits: { - fieldSizeLimit: Infinity, - }, - headers: { - 'content-type': `multipart/form-data; boundary=${boundary}`, - }, - }); - parser.on('field', (name, val, info) => { - ++calls.partBegin; - ++calls.partData; - ++calls.partEnd; - }).on('close', () => { - ++calls.end; - console.timeEnd(moduleName); - }); - - console.time(moduleName); - for (const buf of buffers) - parser.write(buf); - break; - } - - case 'formidable': { - const { MultipartParser } = require('formidable'); - - const parser = new MultipartParser(); - parser.initWithBoundary(boundary); - parser.on('data', ({ name }) => { - ++calls[name]; - if (name === 'end') - console.timeEnd(moduleName); - }); - - console.time(moduleName); - for (const buf of buffers) - parser.write(buf); - - break; - } - - case 'multiparty': { - const { Readable } = require('stream'); - - const { Form } = require('multiparty'); - - const form = new Form({ - maxFieldsSize: Infinity, - maxFields: Infinity, - maxFilesSize: Infinity, - autoFields: false, - autoFiles: false, - }); - - const req = new Readable({ read: () => {} }); - req.headers = { - 'content-type': `multipart/form-data; boundary=${boundary}`, - }; - - function hijack(name, fn) { - const oldFn = form[name]; - form[name] = function() { - fn(); - return oldFn.apply(this, arguments); - }; - } - - hijack('onParseHeaderField', () => { - ++calls.headerField; - }); - hijack('onParseHeaderValue', () => { - ++calls.headerValue; - }); - hijack('onParsePartBegin', () => { - ++calls.partBegin; - }); - hijack('onParsePartData', () => { - ++calls.partData; - }); - hijack('onParsePartEnd', () => { - ++calls.partEnd; - }); - - form.on('close', () => { - ++calls.end; - console.timeEnd(moduleName); - }).on('part', (p) => p.resume()); - - console.time(moduleName); - form.parse(req); - for (const buf of buffers) - req.push(buf); - req.push(null); - - break; - } - - default: - if (moduleName === undefined) - console.error('Missing parser module name'); - else - console.error(`Invalid parser module name: ${moduleName}`); - process.exit(1); -} diff --git a/action/node_modules/busboy/bench/bench-multipart-fields-100mb-small.js b/action/node_modules/busboy/bench/bench-multipart-fields-100mb-small.js deleted file mode 100644 index f32d421c..00000000 --- a/action/node_modules/busboy/bench/bench-multipart-fields-100mb-small.js +++ /dev/null @@ -1,143 +0,0 @@ -'use strict'; - -function createMultipartBuffers(boundary, sizes) { - const bufs = []; - for (let i = 0; i < sizes.length; ++i) { - const mb = sizes[i] * 1024 * 1024; - bufs.push(Buffer.from([ - `--${boundary}`, - `content-disposition: form-data; name="field${i + 1}"`, - '', - '0'.repeat(mb), - '', - ].join('\r\n'))); - } - bufs.push(Buffer.from([ - `--${boundary}--`, - '', - ].join('\r\n'))); - return bufs; -} - -const boundary = '-----------------------------168072824752491622650073'; -const buffers = createMultipartBuffers(boundary, (new Array(100)).fill(1)); -const calls = { - partBegin: 0, - headerField: 0, - headerValue: 0, - headerEnd: 0, - headersEnd: 0, - partData: 0, - partEnd: 0, - end: 0, -}; - -const moduleName = process.argv[2]; -switch (moduleName) { - case 'busboy': { - const busboy = require('busboy'); - - const parser = busboy({ - limits: { - fieldSizeLimit: Infinity, - }, - headers: { - 'content-type': `multipart/form-data; boundary=${boundary}`, - }, - }); - parser.on('field', (name, val, info) => { - ++calls.partBegin; - ++calls.partData; - ++calls.partEnd; - }).on('close', () => { - ++calls.end; - console.timeEnd(moduleName); - }); - - console.time(moduleName); - for (const buf of buffers) - parser.write(buf); - break; - } - - case 'formidable': { - const { MultipartParser } = require('formidable'); - - const parser = new MultipartParser(); - parser.initWithBoundary(boundary); - parser.on('data', ({ name }) => { - ++calls[name]; - if (name === 'end') - console.timeEnd(moduleName); - }); - - console.time(moduleName); - for (const buf of buffers) - parser.write(buf); - - break; - } - - case 'multiparty': { - const { Readable } = require('stream'); - - const { Form } = require('multiparty'); - - const form = new Form({ - maxFieldsSize: Infinity, - maxFields: Infinity, - maxFilesSize: Infinity, - autoFields: false, - autoFiles: false, - }); - - const req = new Readable({ read: () => {} }); - req.headers = { - 'content-type': `multipart/form-data; boundary=${boundary}`, - }; - - function hijack(name, fn) { - const oldFn = form[name]; - form[name] = function() { - fn(); - return oldFn.apply(this, arguments); - }; - } - - hijack('onParseHeaderField', () => { - ++calls.headerField; - }); - hijack('onParseHeaderValue', () => { - ++calls.headerValue; - }); - hijack('onParsePartBegin', () => { - ++calls.partBegin; - }); - hijack('onParsePartData', () => { - ++calls.partData; - }); - hijack('onParsePartEnd', () => { - ++calls.partEnd; - }); - - form.on('close', () => { - ++calls.end; - console.timeEnd(moduleName); - }).on('part', (p) => p.resume()); - - console.time(moduleName); - form.parse(req); - for (const buf of buffers) - req.push(buf); - req.push(null); - - break; - } - - default: - if (moduleName === undefined) - console.error('Missing parser module name'); - else - console.error(`Invalid parser module name: ${moduleName}`); - process.exit(1); -} diff --git a/action/node_modules/busboy/bench/bench-multipart-files-100mb-big.js b/action/node_modules/busboy/bench/bench-multipart-files-100mb-big.js deleted file mode 100644 index b46bdee0..00000000 --- a/action/node_modules/busboy/bench/bench-multipart-files-100mb-big.js +++ /dev/null @@ -1,154 +0,0 @@ -'use strict'; - -function createMultipartBuffers(boundary, sizes) { - const bufs = []; - for (let i = 0; i < sizes.length; ++i) { - const mb = sizes[i] * 1024 * 1024; - bufs.push(Buffer.from([ - `--${boundary}`, - `content-disposition: form-data; name="file${i + 1}"; ` - + `filename="random${i + 1}.bin"`, - 'content-type: application/octet-stream', - '', - '0'.repeat(mb), - '', - ].join('\r\n'))); - } - bufs.push(Buffer.from([ - `--${boundary}--`, - '', - ].join('\r\n'))); - return bufs; -} - -const boundary = '-----------------------------168072824752491622650073'; -const buffers = createMultipartBuffers(boundary, [ - 10, - 10, - 10, - 20, - 50, -]); -const calls = { - partBegin: 0, - headerField: 0, - headerValue: 0, - headerEnd: 0, - headersEnd: 0, - partData: 0, - partEnd: 0, - end: 0, -}; - -const moduleName = process.argv[2]; -switch (moduleName) { - case 'busboy': { - const busboy = require('busboy'); - - const parser = busboy({ - limits: { - fieldSizeLimit: Infinity, - }, - headers: { - 'content-type': `multipart/form-data; boundary=${boundary}`, - }, - }); - parser.on('file', (name, stream, info) => { - ++calls.partBegin; - stream.on('data', (chunk) => { - ++calls.partData; - }).on('end', () => { - ++calls.partEnd; - }); - }).on('close', () => { - ++calls.end; - console.timeEnd(moduleName); - }); - - console.time(moduleName); - for (const buf of buffers) - parser.write(buf); - break; - } - - case 'formidable': { - const { MultipartParser } = require('formidable'); - - const parser = new MultipartParser(); - parser.initWithBoundary(boundary); - parser.on('data', ({ name }) => { - ++calls[name]; - if (name === 'end') - console.timeEnd(moduleName); - }); - - console.time(moduleName); - for (const buf of buffers) - parser.write(buf); - - break; - } - - case 'multiparty': { - const { Readable } = require('stream'); - - const { Form } = require('multiparty'); - - const form = new Form({ - maxFieldsSize: Infinity, - maxFields: Infinity, - maxFilesSize: Infinity, - autoFields: false, - autoFiles: false, - }); - - const req = new Readable({ read: () => {} }); - req.headers = { - 'content-type': `multipart/form-data; boundary=${boundary}`, - }; - - function hijack(name, fn) { - const oldFn = form[name]; - form[name] = function() { - fn(); - return oldFn.apply(this, arguments); - }; - } - - hijack('onParseHeaderField', () => { - ++calls.headerField; - }); - hijack('onParseHeaderValue', () => { - ++calls.headerValue; - }); - hijack('onParsePartBegin', () => { - ++calls.partBegin; - }); - hijack('onParsePartData', () => { - ++calls.partData; - }); - hijack('onParsePartEnd', () => { - ++calls.partEnd; - }); - - form.on('close', () => { - ++calls.end; - console.timeEnd(moduleName); - }).on('part', (p) => p.resume()); - - console.time(moduleName); - form.parse(req); - for (const buf of buffers) - req.push(buf); - req.push(null); - - break; - } - - default: - if (moduleName === undefined) - console.error('Missing parser module name'); - else - console.error(`Invalid parser module name: ${moduleName}`); - process.exit(1); -} diff --git a/action/node_modules/busboy/bench/bench-multipart-files-100mb-small.js b/action/node_modules/busboy/bench/bench-multipart-files-100mb-small.js deleted file mode 100644 index 46b5dffb..00000000 --- a/action/node_modules/busboy/bench/bench-multipart-files-100mb-small.js +++ /dev/null @@ -1,148 +0,0 @@ -'use strict'; - -function createMultipartBuffers(boundary, sizes) { - const bufs = []; - for (let i = 0; i < sizes.length; ++i) { - const mb = sizes[i] * 1024 * 1024; - bufs.push(Buffer.from([ - `--${boundary}`, - `content-disposition: form-data; name="file${i + 1}"; ` - + `filename="random${i + 1}.bin"`, - 'content-type: application/octet-stream', - '', - '0'.repeat(mb), - '', - ].join('\r\n'))); - } - bufs.push(Buffer.from([ - `--${boundary}--`, - '', - ].join('\r\n'))); - return bufs; -} - -const boundary = '-----------------------------168072824752491622650073'; -const buffers = createMultipartBuffers(boundary, (new Array(100)).fill(1)); -const calls = { - partBegin: 0, - headerField: 0, - headerValue: 0, - headerEnd: 0, - headersEnd: 0, - partData: 0, - partEnd: 0, - end: 0, -}; - -const moduleName = process.argv[2]; -switch (moduleName) { - case 'busboy': { - const busboy = require('busboy'); - - const parser = busboy({ - limits: { - fieldSizeLimit: Infinity, - }, - headers: { - 'content-type': `multipart/form-data; boundary=${boundary}`, - }, - }); - parser.on('file', (name, stream, info) => { - ++calls.partBegin; - stream.on('data', (chunk) => { - ++calls.partData; - }).on('end', () => { - ++calls.partEnd; - }); - }).on('close', () => { - ++calls.end; - console.timeEnd(moduleName); - }); - - console.time(moduleName); - for (const buf of buffers) - parser.write(buf); - break; - } - - case 'formidable': { - const { MultipartParser } = require('formidable'); - - const parser = new MultipartParser(); - parser.initWithBoundary(boundary); - parser.on('data', ({ name }) => { - ++calls[name]; - if (name === 'end') - console.timeEnd(moduleName); - }); - - console.time(moduleName); - for (const buf of buffers) - parser.write(buf); - - break; - } - - case 'multiparty': { - const { Readable } = require('stream'); - - const { Form } = require('multiparty'); - - const form = new Form({ - maxFieldsSize: Infinity, - maxFields: Infinity, - maxFilesSize: Infinity, - autoFields: false, - autoFiles: false, - }); - - const req = new Readable({ read: () => {} }); - req.headers = { - 'content-type': `multipart/form-data; boundary=${boundary}`, - }; - - function hijack(name, fn) { - const oldFn = form[name]; - form[name] = function() { - fn(); - return oldFn.apply(this, arguments); - }; - } - - hijack('onParseHeaderField', () => { - ++calls.headerField; - }); - hijack('onParseHeaderValue', () => { - ++calls.headerValue; - }); - hijack('onParsePartBegin', () => { - ++calls.partBegin; - }); - hijack('onParsePartData', () => { - ++calls.partData; - }); - hijack('onParsePartEnd', () => { - ++calls.partEnd; - }); - - form.on('close', () => { - ++calls.end; - console.timeEnd(moduleName); - }).on('part', (p) => p.resume()); - - console.time(moduleName); - form.parse(req); - for (const buf of buffers) - req.push(buf); - req.push(null); - - break; - } - - default: - if (moduleName === undefined) - console.error('Missing parser module name'); - else - console.error(`Invalid parser module name: ${moduleName}`); - process.exit(1); -} diff --git a/action/node_modules/busboy/bench/bench-urlencoded-fields-100pairs-small.js b/action/node_modules/busboy/bench/bench-urlencoded-fields-100pairs-small.js deleted file mode 100644 index 5c337df2..00000000 --- a/action/node_modules/busboy/bench/bench-urlencoded-fields-100pairs-small.js +++ /dev/null @@ -1,101 +0,0 @@ -'use strict'; - -const buffers = [ - Buffer.from( - (new Array(100)).fill('').map((_, i) => `key${i}=value${i}`).join('&') - ), -]; -const calls = { - field: 0, - end: 0, -}; - -let n = 3e3; - -const moduleName = process.argv[2]; -switch (moduleName) { - case 'busboy': { - const busboy = require('busboy'); - - console.time(moduleName); - (function next() { - const parser = busboy({ - limits: { - fieldSizeLimit: Infinity, - }, - headers: { - 'content-type': 'application/x-www-form-urlencoded; charset=utf-8', - }, - }); - parser.on('field', (name, val, info) => { - ++calls.field; - }).on('close', () => { - ++calls.end; - if (--n === 0) - console.timeEnd(moduleName); - else - process.nextTick(next); - }); - - for (const buf of buffers) - parser.write(buf); - parser.end(); - })(); - break; - } - - case 'formidable': { - const QuerystringParser = - require('formidable/src/parsers/Querystring.js'); - - console.time(moduleName); - (function next() { - const parser = new QuerystringParser(); - parser.on('data', (obj) => { - ++calls.field; - }).on('end', () => { - ++calls.end; - if (--n === 0) - console.timeEnd(moduleName); - else - process.nextTick(next); - }); - - for (const buf of buffers) - parser.write(buf); - parser.end(); - })(); - break; - } - - case 'formidable-streaming': { - const QuerystringParser = - require('formidable/src/parsers/StreamingQuerystring.js'); - - console.time(moduleName); - (function next() { - const parser = new QuerystringParser(); - parser.on('data', (obj) => { - ++calls.field; - }).on('end', () => { - ++calls.end; - if (--n === 0) - console.timeEnd(moduleName); - else - process.nextTick(next); - }); - - for (const buf of buffers) - parser.write(buf); - parser.end(); - })(); - break; - } - - default: - if (moduleName === undefined) - console.error('Missing parser module name'); - else - console.error(`Invalid parser module name: ${moduleName}`); - process.exit(1); -} diff --git a/action/node_modules/busboy/bench/bench-urlencoded-fields-900pairs-small-alt.js b/action/node_modules/busboy/bench/bench-urlencoded-fields-900pairs-small-alt.js deleted file mode 100644 index 1f5645cb..00000000 --- a/action/node_modules/busboy/bench/bench-urlencoded-fields-900pairs-small-alt.js +++ /dev/null @@ -1,84 +0,0 @@ -'use strict'; - -const buffers = [ - Buffer.from( - (new Array(900)).fill('').map((_, i) => `key${i}=value${i}`).join('&') - ), -]; -const calls = { - field: 0, - end: 0, -}; - -const moduleName = process.argv[2]; -switch (moduleName) { - case 'busboy': { - const busboy = require('busboy'); - - console.time(moduleName); - const parser = busboy({ - limits: { - fieldSizeLimit: Infinity, - }, - headers: { - 'content-type': 'application/x-www-form-urlencoded; charset=utf-8', - }, - }); - parser.on('field', (name, val, info) => { - ++calls.field; - }).on('close', () => { - ++calls.end; - console.timeEnd(moduleName); - }); - - for (const buf of buffers) - parser.write(buf); - parser.end(); - break; - } - - case 'formidable': { - const QuerystringParser = - require('formidable/src/parsers/Querystring.js'); - - console.time(moduleName); - const parser = new QuerystringParser(); - parser.on('data', (obj) => { - ++calls.field; - }).on('end', () => { - ++calls.end; - console.timeEnd(moduleName); - }); - - for (const buf of buffers) - parser.write(buf); - parser.end(); - break; - } - - case 'formidable-streaming': { - const QuerystringParser = - require('formidable/src/parsers/StreamingQuerystring.js'); - - console.time(moduleName); - const parser = new QuerystringParser(); - parser.on('data', (obj) => { - ++calls.field; - }).on('end', () => { - ++calls.end; - console.timeEnd(moduleName); - }); - - for (const buf of buffers) - parser.write(buf); - parser.end(); - break; - } - - default: - if (moduleName === undefined) - console.error('Missing parser module name'); - else - console.error(`Invalid parser module name: ${moduleName}`); - process.exit(1); -} diff --git a/action/node_modules/busboy/lib/index.js b/action/node_modules/busboy/lib/index.js deleted file mode 100644 index 873272d9..00000000 --- a/action/node_modules/busboy/lib/index.js +++ /dev/null @@ -1,57 +0,0 @@ -'use strict'; - -const { parseContentType } = require('./utils.js'); - -function getInstance(cfg) { - const headers = cfg.headers; - const conType = parseContentType(headers['content-type']); - if (!conType) - throw new Error('Malformed content type'); - - for (const type of TYPES) { - const matched = type.detect(conType); - if (!matched) - continue; - - const instanceCfg = { - limits: cfg.limits, - headers, - conType, - highWaterMark: undefined, - fileHwm: undefined, - defCharset: undefined, - defParamCharset: undefined, - preservePath: false, - }; - if (cfg.highWaterMark) - instanceCfg.highWaterMark = cfg.highWaterMark; - if (cfg.fileHwm) - instanceCfg.fileHwm = cfg.fileHwm; - instanceCfg.defCharset = cfg.defCharset; - instanceCfg.defParamCharset = cfg.defParamCharset; - instanceCfg.preservePath = cfg.preservePath; - return new type(instanceCfg); - } - - throw new Error(`Unsupported content type: ${headers['content-type']}`); -} - -// Note: types are explicitly listed here for easier bundling -// See: https://github.com/mscdex/busboy/issues/121 -const TYPES = [ - require('./types/multipart'), - require('./types/urlencoded'), -].filter(function(typemod) { return typeof typemod.detect === 'function'; }); - -module.exports = (cfg) => { - if (typeof cfg !== 'object' || cfg === null) - cfg = {}; - - if (typeof cfg.headers !== 'object' - || cfg.headers === null - || typeof cfg.headers['content-type'] !== 'string') { - throw new Error('Missing Content-Type'); - } - - return getInstance(cfg); -}; diff --git a/action/node_modules/busboy/lib/types/multipart.js b/action/node_modules/busboy/lib/types/multipart.js deleted file mode 100644 index cc0d7bb6..00000000 --- a/action/node_modules/busboy/lib/types/multipart.js +++ /dev/null @@ -1,653 +0,0 @@ -'use strict'; - -const { Readable, Writable } = require('stream'); - -const StreamSearch = require('streamsearch'); - -const { - basename, - convertToUTF8, - getDecoder, - parseContentType, - parseDisposition, -} = require('../utils.js'); - -const BUF_CRLF = Buffer.from('\r\n'); -const BUF_CR = Buffer.from('\r'); -const BUF_DASH = Buffer.from('-'); - -function noop() {} - -const MAX_HEADER_PAIRS = 2000; // From node -const MAX_HEADER_SIZE = 16 * 1024; // From node (its default value) - -const HPARSER_NAME = 0; -const HPARSER_PRE_OWS = 1; -const HPARSER_VALUE = 2; -class HeaderParser { - constructor(cb) { - this.header = Object.create(null); - this.pairCount = 0; - this.byteCount = 0; - this.state = HPARSER_NAME; - this.name = ''; - this.value = ''; - this.crlf = 0; - this.cb = cb; - } - - reset() { - this.header = Object.create(null); - this.pairCount = 0; - this.byteCount = 0; - this.state = HPARSER_NAME; - this.name = ''; - this.value = ''; - this.crlf = 0; - } - - push(chunk, pos, end) { - let start = pos; - while (pos < end) { - switch (this.state) { - case HPARSER_NAME: { - let done = false; - for (; pos < end; ++pos) { - if (this.byteCount === MAX_HEADER_SIZE) - return -1; - ++this.byteCount; - const code = chunk[pos]; - if (TOKEN[code] !== 1) { - if (code !== 58/* ':' */) - return -1; - this.name += chunk.latin1Slice(start, pos); - if (this.name.length === 0) - return -1; - ++pos; - done = true; - this.state = HPARSER_PRE_OWS; - break; - } - } - if (!done) { - this.name += chunk.latin1Slice(start, pos); - break; - } - // FALLTHROUGH - } - case HPARSER_PRE_OWS: { - // Skip optional whitespace - let done = false; - for (; pos < end; ++pos) { - if (this.byteCount === MAX_HEADER_SIZE) - return -1; - ++this.byteCount; - const code = chunk[pos]; - if (code !== 32/* ' ' */ && code !== 9/* '\t' */) { - start = pos; - done = true; - this.state = HPARSER_VALUE; - break; - } - } - if (!done) - break; - // FALLTHROUGH - } - case HPARSER_VALUE: - switch (this.crlf) { - case 0: // Nothing yet - for (; pos < end; ++pos) { - if (this.byteCount === MAX_HEADER_SIZE) - return -1; - ++this.byteCount; - const code = chunk[pos]; - if (FIELD_VCHAR[code] !== 1) { - if (code !== 13/* '\r' */) - return -1; - ++this.crlf; - break; - } - } - this.value += chunk.latin1Slice(start, pos++); - break; - case 1: // Received CR - if (this.byteCount === MAX_HEADER_SIZE) - return -1; - ++this.byteCount; - if (chunk[pos++] !== 10/* '\n' */) - return -1; - ++this.crlf; - break; - case 2: { // Received CR LF - if (this.byteCount === MAX_HEADER_SIZE) - return -1; - ++this.byteCount; - const code = chunk[pos]; - if (code === 32/* ' ' */ || code === 9/* '\t' */) { - // Folded value - start = pos; - this.crlf = 0; - } else { - if (++this.pairCount < MAX_HEADER_PAIRS) { - this.name = this.name.toLowerCase(); - if (this.header[this.name] === undefined) - this.header[this.name] = [this.value]; - else - this.header[this.name].push(this.value); - } - if (code === 13/* '\r' */) { - ++this.crlf; - ++pos; - } else { - // Assume start of next header field name - start = pos; - this.crlf = 0; - this.state = HPARSER_NAME; - this.name = ''; - this.value = ''; - } - } - break; - } - case 3: { // Received CR LF CR - if (this.byteCount === MAX_HEADER_SIZE) - return -1; - ++this.byteCount; - if (chunk[pos++] !== 10/* '\n' */) - return -1; - // End of header - const header = this.header; - this.reset(); - this.cb(header); - return pos; - } - } - break; - } - } - - return pos; - } -} - -class FileStream extends Readable { - constructor(opts, owner) { - super(opts); - this.truncated = false; - this._readcb = null; - this.once('end', () => { - // We need to make sure that we call any outstanding _writecb() that is - // associated with this file so that processing of the rest of the form - // can continue. This may not happen if the file stream ends right after - // backpressure kicks in, so we force it here. - this._read(); - if (--owner._fileEndsLeft === 0 && owner._finalcb) { - const cb = owner._finalcb; - owner._finalcb = null; - // Make sure other 'end' event handlers get a chance to be executed - // before busboy's 'finish' event is emitted - process.nextTick(cb); - } - }); - } - _read(n) { - const cb = this._readcb; - if (cb) { - this._readcb = null; - cb(); - } - } -} - -const ignoreData = { - push: (chunk, pos) => {}, - destroy: () => {}, -}; - -function callAndUnsetCb(self, err) { - const cb = self._writecb; - self._writecb = null; - if (err) - self.destroy(err); - else if (cb) - cb(); -} - -function nullDecoder(val, hint) { - return val; -} - -class Multipart extends Writable { - constructor(cfg) { - const streamOpts = { - autoDestroy: true, - emitClose: true, - highWaterMark: (typeof cfg.highWaterMark === 'number' - ? cfg.highWaterMark - : undefined), - }; - super(streamOpts); - - if (!cfg.conType.params || typeof cfg.conType.params.boundary !== 'string') - throw new Error('Multipart: Boundary not found'); - - const boundary = cfg.conType.params.boundary; - const paramDecoder = (typeof cfg.defParamCharset === 'string' - && cfg.defParamCharset - ? getDecoder(cfg.defParamCharset) - : nullDecoder); - const defCharset = (cfg.defCharset || 'utf8'); - const preservePath = cfg.preservePath; - const fileOpts = { - autoDestroy: true, - emitClose: true, - highWaterMark: (typeof cfg.fileHwm === 'number' - ? cfg.fileHwm - : undefined), - }; - - const limits = cfg.limits; - const fieldSizeLimit = (limits && typeof limits.fieldSize === 'number' - ? limits.fieldSize - : 1 * 1024 * 1024); - const fileSizeLimit = (limits && typeof limits.fileSize === 'number' - ? limits.fileSize - : Infinity); - const filesLimit = (limits && typeof limits.files === 'number' - ? limits.files - : Infinity); - const fieldsLimit = (limits && typeof limits.fields === 'number' - ? limits.fields - : Infinity); - const partsLimit = (limits && typeof limits.parts === 'number' - ? limits.parts - : Infinity); - - let parts = -1; // Account for initial boundary - let fields = 0; - let files = 0; - let skipPart = false; - - this._fileEndsLeft = 0; - this._fileStream = undefined; - this._complete = false; - let fileSize = 0; - - let field; - let fieldSize = 0; - let partCharset; - let partEncoding; - let partType; - let partName; - let partTruncated = false; - - let hitFilesLimit = false; - let hitFieldsLimit = false; - - this._hparser = null; - const hparser = new HeaderParser((header) => { - this._hparser = null; - skipPart = false; - - partType = 'text/plain'; - partCharset = defCharset; - partEncoding = '7bit'; - partName = undefined; - partTruncated = false; - - let filename; - if (!header['content-disposition']) { - skipPart = true; - return; - } - - const disp = parseDisposition(header['content-disposition'][0], - paramDecoder); - if (!disp || disp.type !== 'form-data') { - skipPart = true; - return; - } - - if (disp.params) { - if (disp.params.name) - partName = disp.params.name; - - if (disp.params['filename*']) - filename = disp.params['filename*']; - else if (disp.params.filename) - filename = disp.params.filename; - - if (filename !== undefined && !preservePath) - filename = basename(filename); - } - - if (header['content-type']) { - const conType = parseContentType(header['content-type'][0]); - if (conType) { - partType = `${conType.type}/${conType.subtype}`; - if (conType.params && typeof conType.params.charset === 'string') - partCharset = conType.params.charset.toLowerCase(); - } - } - - if (header['content-transfer-encoding']) - partEncoding = header['content-transfer-encoding'][0].toLowerCase(); - - if (partType === 'application/octet-stream' || filename !== undefined) { - // File - - if (files === filesLimit) { - if (!hitFilesLimit) { - hitFilesLimit = true; - this.emit('filesLimit'); - } - skipPart = true; - return; - } - ++files; - - if (this.listenerCount('file') === 0) { - skipPart = true; - return; - } - - fileSize = 0; - this._fileStream = new FileStream(fileOpts, this); - ++this._fileEndsLeft; - this.emit( - 'file', - partName, - this._fileStream, - { filename, - encoding: partEncoding, - mimeType: partType } - ); - } else { - // Non-file - - if (fields === fieldsLimit) { - if (!hitFieldsLimit) { - hitFieldsLimit = true; - this.emit('fieldsLimit'); - } - skipPart = true; - return; - } - ++fields; - - if (this.listenerCount('field') === 0) { - skipPart = true; - return; - } - - field = []; - fieldSize = 0; - } - }); - - let matchPostBoundary = 0; - const ssCb = (isMatch, data, start, end, isDataSafe) => { -retrydata: - while (data) { - if (this._hparser !== null) { - const ret = this._hparser.push(data, start, end); - if (ret === -1) { - this._hparser = null; - hparser.reset(); - this.emit('error', new Error('Malformed part header')); - break; - } - start = ret; - } - - if (start === end) - break; - - if (matchPostBoundary !== 0) { - if (matchPostBoundary === 1) { - switch (data[start]) { - case 45: // '-' - // Try matching '--' after boundary - matchPostBoundary = 2; - ++start; - break; - case 13: // '\r' - // Try matching CR LF before header - matchPostBoundary = 3; - ++start; - break; - default: - matchPostBoundary = 0; - } - if (start === end) - return; - } - - if (matchPostBoundary === 2) { - matchPostBoundary = 0; - if (data[start] === 45/* '-' */) { - // End of multipart data - this._complete = true; - this._bparser = ignoreData; - return; - } - // We saw something other than '-', so put the dash we consumed - // "back" - const writecb = this._writecb; - this._writecb = noop; - ssCb(false, BUF_DASH, 0, 1, false); - this._writecb = writecb; - } else if (matchPostBoundary === 3) { - matchPostBoundary = 0; - if (data[start] === 10/* '\n' */) { - ++start; - if (parts >= partsLimit) - break; - // Prepare the header parser - this._hparser = hparser; - if (start === end) - break; - // Process the remaining data as a header - continue retrydata; - } else { - // We saw something other than LF, so put the CR we consumed - // "back" - const writecb = this._writecb; - this._writecb = noop; - ssCb(false, BUF_CR, 0, 1, false); - this._writecb = writecb; - } - } - } - - if (!skipPart) { - if (this._fileStream) { - let chunk; - const actualLen = Math.min(end - start, fileSizeLimit - fileSize); - if (!isDataSafe) { - chunk = Buffer.allocUnsafe(actualLen); - data.copy(chunk, 0, start, start + actualLen); - } else { - chunk = data.slice(start, start + actualLen); - } - - fileSize += chunk.length; - if (fileSize === fileSizeLimit) { - if (chunk.length > 0) - this._fileStream.push(chunk); - this._fileStream.emit('limit'); - this._fileStream.truncated = true; - skipPart = true; - } else if (!this._fileStream.push(chunk)) { - if (this._writecb) - this._fileStream._readcb = this._writecb; - this._writecb = null; - } - } else if (field !== undefined) { - let chunk; - const actualLen = Math.min( - end - start, - fieldSizeLimit - fieldSize - ); - if (!isDataSafe) { - chunk = Buffer.allocUnsafe(actualLen); - data.copy(chunk, 0, start, start + actualLen); - } else { - chunk = data.slice(start, start + actualLen); - } - - fieldSize += actualLen; - field.push(chunk); - if (fieldSize === fieldSizeLimit) { - skipPart = true; - partTruncated = true; - } - } - } - - break; - } - - if (isMatch) { - matchPostBoundary = 1; - - if (this._fileStream) { - // End the active file stream if the previous part was a file - this._fileStream.push(null); - this._fileStream = null; - } else if (field !== undefined) { - let data; - switch (field.length) { - case 0: - data = ''; - break; - case 1: - data = convertToUTF8(field[0], partCharset, 0); - break; - default: - data = convertToUTF8( - Buffer.concat(field, fieldSize), - partCharset, - 0 - ); - } - field = undefined; - fieldSize = 0; - this.emit( - 'field', - partName, - data, - { nameTruncated: false, - valueTruncated: partTruncated, - encoding: partEncoding, - mimeType: partType } - ); - } - - if (++parts === partsLimit) - this.emit('partsLimit'); - } - }; - this._bparser = new StreamSearch(`\r\n--${boundary}`, ssCb); - - this._writecb = null; - this._finalcb = null; - - // Just in case there is no preamble - this.write(BUF_CRLF); - } - - static detect(conType) { - return (conType.type === 'multipart' && conType.subtype === 'form-data'); - } - - _write(chunk, enc, cb) { - this._writecb = cb; - this._bparser.push(chunk, 0); - if (this._writecb) - callAndUnsetCb(this); - } - - _destroy(err, cb) { - this._hparser = null; - this._bparser = ignoreData; - if (!err) - err = checkEndState(this); - const fileStream = this._fileStream; - if (fileStream) { - this._fileStream = null; - fileStream.destroy(err); - } - cb(err); - } - - _final(cb) { - this._bparser.destroy(); - if (!this._complete) - return cb(new Error('Unexpected end of form')); - if (this._fileEndsLeft) - this._finalcb = finalcb.bind(null, this, cb); - else - finalcb(this, cb); - } -} - -function finalcb(self, cb, err) { - if (err) - return cb(err); - err = checkEndState(self); - cb(err); -} - -function checkEndState(self) { - if (self._hparser) - return new Error('Malformed part header'); - const fileStream = self._fileStream; - if (fileStream) { - self._fileStream = null; - fileStream.destroy(new Error('Unexpected end of file')); - } - if (!self._complete) - return new Error('Unexpected end of form'); -} - -const TOKEN = [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 0, 1, 1, 1, 1, 1, 0, 0,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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -]; - -module.exports = Multipart; diff --git a/action/node_modules/busboy/lib/types/urlencoded.js b/action/node_modules/busboy/lib/types/urlencoded.js deleted file mode 100644 index 5c463a25..00000000 --- a/action/node_modules/busboy/lib/types/urlencoded.js +++ /dev/null @@ -1,350 +0,0 @@ -'use strict'; - -const { Writable } = require('stream'); - -const { getDecoder } = require('../utils.js'); - -class URLEncoded extends Writable { - constructor(cfg) { - const streamOpts = { - autoDestroy: true, - emitClose: true, - highWaterMark: (typeof cfg.highWaterMark === 'number' - ? cfg.highWaterMark - : undefined), - }; - super(streamOpts); - - let charset = (cfg.defCharset || 'utf8'); - if (cfg.conType.params && typeof cfg.conType.params.charset === 'string') - charset = cfg.conType.params.charset; - - this.charset = charset; - - const limits = cfg.limits; - this.fieldSizeLimit = (limits && typeof limits.fieldSize === 'number' - ? limits.fieldSize - : 1 * 1024 * 1024); - this.fieldsLimit = (limits && typeof limits.fields === 'number' - ? limits.fields - : Infinity); - this.fieldNameSizeLimit = ( - limits && typeof limits.fieldNameSize === 'number' - ? limits.fieldNameSize - : 100 - ); - - this._inKey = true; - this._keyTrunc = false; - this._valTrunc = false; - this._bytesKey = 0; - this._bytesVal = 0; - this._fields = 0; - this._key = ''; - this._val = ''; - this._byte = -2; - this._lastPos = 0; - this._encode = 0; - this._decoder = getDecoder(charset); - } - - static detect(conType) { - return (conType.type === 'application' - && conType.subtype === 'x-www-form-urlencoded'); - } - - _write(chunk, enc, cb) { - if (this._fields >= this.fieldsLimit) - return cb(); - - let i = 0; - const len = chunk.length; - this._lastPos = 0; - - // Check if we last ended mid-percent-encoded byte - if (this._byte !== -2) { - i = readPctEnc(this, chunk, i, len); - if (i === -1) - return cb(new Error('Malformed urlencoded form')); - if (i >= len) - return cb(); - if (this._inKey) - ++this._bytesKey; - else - ++this._bytesVal; - } - -main: - while (i < len) { - if (this._inKey) { - // Parsing key - - i = skipKeyBytes(this, chunk, i, len); - - while (i < len) { - switch (chunk[i]) { - case 61: // '=' - if (this._lastPos < i) - this._key += chunk.latin1Slice(this._lastPos, i); - this._lastPos = ++i; - this._key = this._decoder(this._key, this._encode); - this._encode = 0; - this._inKey = false; - continue main; - case 38: // '&' - if (this._lastPos < i) - this._key += chunk.latin1Slice(this._lastPos, i); - this._lastPos = ++i; - this._key = this._decoder(this._key, this._encode); - this._encode = 0; - if (this._bytesKey > 0) { - this.emit( - 'field', - this._key, - '', - { nameTruncated: this._keyTrunc, - valueTruncated: false, - encoding: this.charset, - mimeType: 'text/plain' } - ); - } - this._key = ''; - this._val = ''; - this._keyTrunc = false; - this._valTrunc = false; - this._bytesKey = 0; - this._bytesVal = 0; - if (++this._fields >= this.fieldsLimit) { - this.emit('fieldsLimit'); - return cb(); - } - continue; - case 43: // '+' - if (this._lastPos < i) - this._key += chunk.latin1Slice(this._lastPos, i); - this._key += ' '; - this._lastPos = i + 1; - break; - case 37: // '%' - if (this._encode === 0) - this._encode = 1; - if (this._lastPos < i) - this._key += chunk.latin1Slice(this._lastPos, i); - this._lastPos = i + 1; - this._byte = -1; - i = readPctEnc(this, chunk, i + 1, len); - if (i === -1) - return cb(new Error('Malformed urlencoded form')); - if (i >= len) - return cb(); - ++this._bytesKey; - i = skipKeyBytes(this, chunk, i, len); - continue; - } - ++i; - ++this._bytesKey; - i = skipKeyBytes(this, chunk, i, len); - } - if (this._lastPos < i) - this._key += chunk.latin1Slice(this._lastPos, i); - } else { - // Parsing value - - i = skipValBytes(this, chunk, i, len); - - while (i < len) { - switch (chunk[i]) { - case 38: // '&' - if (this._lastPos < i) - this._val += chunk.latin1Slice(this._lastPos, i); - this._lastPos = ++i; - this._inKey = true; - this._val = this._decoder(this._val, this._encode); - this._encode = 0; - if (this._bytesKey > 0 || this._bytesVal > 0) { - this.emit( - 'field', - this._key, - this._val, - { nameTruncated: this._keyTrunc, - valueTruncated: this._valTrunc, - encoding: this.charset, - mimeType: 'text/plain' } - ); - } - this._key = ''; - this._val = ''; - this._keyTrunc = false; - this._valTrunc = false; - this._bytesKey = 0; - this._bytesVal = 0; - if (++this._fields >= this.fieldsLimit) { - this.emit('fieldsLimit'); - return cb(); - } - continue main; - case 43: // '+' - if (this._lastPos < i) - this._val += chunk.latin1Slice(this._lastPos, i); - this._val += ' '; - this._lastPos = i + 1; - break; - case 37: // '%' - if (this._encode === 0) - this._encode = 1; - if (this._lastPos < i) - this._val += chunk.latin1Slice(this._lastPos, i); - this._lastPos = i + 1; - this._byte = -1; - i = readPctEnc(this, chunk, i + 1, len); - if (i === -1) - return cb(new Error('Malformed urlencoded form')); - if (i >= len) - return cb(); - ++this._bytesVal; - i = skipValBytes(this, chunk, i, len); - continue; - } - ++i; - ++this._bytesVal; - i = skipValBytes(this, chunk, i, len); - } - if (this._lastPos < i) - this._val += chunk.latin1Slice(this._lastPos, i); - } - } - - cb(); - } - - _final(cb) { - if (this._byte !== -2) - return cb(new Error('Malformed urlencoded form')); - if (!this._inKey || this._bytesKey > 0 || this._bytesVal > 0) { - if (this._inKey) - this._key = this._decoder(this._key, this._encode); - else - this._val = this._decoder(this._val, this._encode); - this.emit( - 'field', - this._key, - this._val, - { nameTruncated: this._keyTrunc, - valueTruncated: this._valTrunc, - encoding: this.charset, - mimeType: 'text/plain' } - ); - } - cb(); - } -} - -function readPctEnc(self, chunk, pos, len) { - if (pos >= len) - return len; - - if (self._byte === -1) { - // We saw a '%' but no hex characters yet - const hexUpper = HEX_VALUES[chunk[pos++]]; - if (hexUpper === -1) - return -1; - - if (hexUpper >= 8) - self._encode = 2; // Indicate high bits detected - - if (pos < len) { - // Both hex characters are in this chunk - const hexLower = HEX_VALUES[chunk[pos++]]; - if (hexLower === -1) - return -1; - - if (self._inKey) - self._key += String.fromCharCode((hexUpper << 4) + hexLower); - else - self._val += String.fromCharCode((hexUpper << 4) + hexLower); - - self._byte = -2; - self._lastPos = pos; - } else { - // Only one hex character was available in this chunk - self._byte = hexUpper; - } - } else { - // We saw only one hex character so far - const hexLower = HEX_VALUES[chunk[pos++]]; - if (hexLower === -1) - return -1; - - if (self._inKey) - self._key += String.fromCharCode((self._byte << 4) + hexLower); - else - self._val += String.fromCharCode((self._byte << 4) + hexLower); - - self._byte = -2; - self._lastPos = pos; - } - - return pos; -} - -function skipKeyBytes(self, chunk, pos, len) { - // Skip bytes if we've truncated - if (self._bytesKey > self.fieldNameSizeLimit) { - if (!self._keyTrunc) { - if (self._lastPos < pos) - self._key += chunk.latin1Slice(self._lastPos, pos - 1); - } - self._keyTrunc = true; - for (; pos < len; ++pos) { - const code = chunk[pos]; - if (code === 61/* '=' */ || code === 38/* '&' */) - break; - ++self._bytesKey; - } - self._lastPos = pos; - } - - return pos; -} - -function skipValBytes(self, chunk, pos, len) { - // Skip bytes if we've truncated - if (self._bytesVal > self.fieldSizeLimit) { - if (!self._valTrunc) { - if (self._lastPos < pos) - self._val += chunk.latin1Slice(self._lastPos, pos - 1); - } - self._valTrunc = true; - for (; pos < len; ++pos) { - if (chunk[pos] === 38/* '&' */) - break; - ++self._bytesVal; - } - self._lastPos = pos; - } - - return pos; -} - -/* eslint-disable no-multi-spaces */ -const HEX_VALUES = [ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, - -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -]; -/* eslint-enable no-multi-spaces */ - -module.exports = URLEncoded; diff --git a/action/node_modules/busboy/lib/utils.js b/action/node_modules/busboy/lib/utils.js deleted file mode 100644 index 8274f6c3..00000000 --- a/action/node_modules/busboy/lib/utils.js +++ /dev/null @@ -1,596 +0,0 @@ -'use strict'; - -function parseContentType(str) { - if (str.length === 0) - return; - - const params = Object.create(null); - let i = 0; - - // Parse type - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (TOKEN[code] !== 1) { - if (code !== 47/* '/' */ || i === 0) - return; - break; - } - } - // Check for type without subtype - if (i === str.length) - return; - - const type = str.slice(0, i).toLowerCase(); - - // Parse subtype - const subtypeStart = ++i; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (TOKEN[code] !== 1) { - // Make sure we have a subtype - if (i === subtypeStart) - return; - - if (parseContentTypeParams(str, i, params) === undefined) - return; - break; - } - } - // Make sure we have a subtype - if (i === subtypeStart) - return; - - const subtype = str.slice(subtypeStart, i).toLowerCase(); - - return { type, subtype, params }; -} - -function parseContentTypeParams(str, i, params) { - while (i < str.length) { - // Consume whitespace - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (code !== 32/* ' ' */ && code !== 9/* '\t' */) - break; - } - - // Ended on whitespace - if (i === str.length) - break; - - // Check for malformed parameter - if (str.charCodeAt(i++) !== 59/* ';' */) - return; - - // Consume whitespace - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (code !== 32/* ' ' */ && code !== 9/* '\t' */) - break; - } - - // Ended on whitespace (malformed) - if (i === str.length) - return; - - let name; - const nameStart = i; - // Parse parameter name - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (TOKEN[code] !== 1) { - if (code !== 61/* '=' */) - return; - break; - } - } - - // No value (malformed) - if (i === str.length) - return; - - name = str.slice(nameStart, i); - ++i; // Skip over '=' - - // No value (malformed) - if (i === str.length) - return; - - let value = ''; - let valueStart; - if (str.charCodeAt(i) === 34/* '"' */) { - valueStart = ++i; - let escaping = false; - // Parse quoted value - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (code === 92/* '\\' */) { - if (escaping) { - valueStart = i; - escaping = false; - } else { - value += str.slice(valueStart, i); - escaping = true; - } - continue; - } - if (code === 34/* '"' */) { - if (escaping) { - valueStart = i; - escaping = false; - continue; - } - value += str.slice(valueStart, i); - break; - } - if (escaping) { - valueStart = i - 1; - escaping = false; - } - // Invalid unescaped quoted character (malformed) - if (QDTEXT[code] !== 1) - return; - } - - // No end quote (malformed) - if (i === str.length) - return; - - ++i; // Skip over double quote - } else { - valueStart = i; - // Parse unquoted value - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (TOKEN[code] !== 1) { - // No value (malformed) - if (i === valueStart) - return; - break; - } - } - value = str.slice(valueStart, i); - } - - name = name.toLowerCase(); - if (params[name] === undefined) - params[name] = value; - } - - return params; -} - -function parseDisposition(str, defDecoder) { - if (str.length === 0) - return; - - const params = Object.create(null); - let i = 0; - - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (TOKEN[code] !== 1) { - if (parseDispositionParams(str, i, params, defDecoder) === undefined) - return; - break; - } - } - - const type = str.slice(0, i).toLowerCase(); - - return { type, params }; -} - -function parseDispositionParams(str, i, params, defDecoder) { - while (i < str.length) { - // Consume whitespace - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (code !== 32/* ' ' */ && code !== 9/* '\t' */) - break; - } - - // Ended on whitespace - if (i === str.length) - break; - - // Check for malformed parameter - if (str.charCodeAt(i++) !== 59/* ';' */) - return; - - // Consume whitespace - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (code !== 32/* ' ' */ && code !== 9/* '\t' */) - break; - } - - // Ended on whitespace (malformed) - if (i === str.length) - return; - - let name; - const nameStart = i; - // Parse parameter name - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (TOKEN[code] !== 1) { - if (code === 61/* '=' */) - break; - return; - } - } - - // No value (malformed) - if (i === str.length) - return; - - let value = ''; - let valueStart; - let charset; - //~ let lang; - name = str.slice(nameStart, i); - if (name.charCodeAt(name.length - 1) === 42/* '*' */) { - // Extended value - - const charsetStart = ++i; - // Parse charset name - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (CHARSET[code] !== 1) { - if (code !== 39/* '\'' */) - return; - break; - } - } - - // Incomplete charset (malformed) - if (i === str.length) - return; - - charset = str.slice(charsetStart, i); - ++i; // Skip over the '\'' - - //~ const langStart = ++i; - // Parse language name - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (code === 39/* '\'' */) - break; - } - - // Incomplete language (malformed) - if (i === str.length) - return; - - //~ lang = str.slice(langStart, i); - ++i; // Skip over the '\'' - - // No value (malformed) - if (i === str.length) - return; - - valueStart = i; - - let encode = 0; - // Parse value - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (EXTENDED_VALUE[code] !== 1) { - if (code === 37/* '%' */) { - let hexUpper; - let hexLower; - if (i + 2 < str.length - && (hexUpper = HEX_VALUES[str.charCodeAt(i + 1)]) !== -1 - && (hexLower = HEX_VALUES[str.charCodeAt(i + 2)]) !== -1) { - const byteVal = (hexUpper << 4) + hexLower; - value += str.slice(valueStart, i); - value += String.fromCharCode(byteVal); - i += 2; - valueStart = i + 1; - if (byteVal >= 128) - encode = 2; - else if (encode === 0) - encode = 1; - continue; - } - // '%' disallowed in non-percent encoded contexts (malformed) - return; - } - break; - } - } - - value += str.slice(valueStart, i); - value = convertToUTF8(value, charset, encode); - if (value === undefined) - return; - } else { - // Non-extended value - - ++i; // Skip over '=' - - // No value (malformed) - if (i === str.length) - return; - - if (str.charCodeAt(i) === 34/* '"' */) { - valueStart = ++i; - let escaping = false; - // Parse quoted value - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (code === 92/* '\\' */) { - if (escaping) { - valueStart = i; - escaping = false; - } else { - value += str.slice(valueStart, i); - escaping = true; - } - continue; - } - if (code === 34/* '"' */) { - if (escaping) { - valueStart = i; - escaping = false; - continue; - } - value += str.slice(valueStart, i); - break; - } - if (escaping) { - valueStart = i - 1; - escaping = false; - } - // Invalid unescaped quoted character (malformed) - if (QDTEXT[code] !== 1) - return; - } - - // No end quote (malformed) - if (i === str.length) - return; - - ++i; // Skip over double quote - } else { - valueStart = i; - // Parse unquoted value - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (TOKEN[code] !== 1) { - // No value (malformed) - if (i === valueStart) - return; - break; - } - } - value = str.slice(valueStart, i); - } - - value = defDecoder(value, 2); - if (value === undefined) - return; - } - - name = name.toLowerCase(); - if (params[name] === undefined) - params[name] = value; - } - - return params; -} - -function getDecoder(charset) { - let lc; - while (true) { - switch (charset) { - case 'utf-8': - case 'utf8': - return decoders.utf8; - case 'latin1': - case 'ascii': // TODO: Make these a separate, strict decoder? - case 'us-ascii': - case 'iso-8859-1': - case 'iso8859-1': - case 'iso88591': - case 'iso_8859-1': - case 'windows-1252': - case 'iso_8859-1:1987': - case 'cp1252': - case 'x-cp1252': - return decoders.latin1; - case 'utf16le': - case 'utf-16le': - case 'ucs2': - case 'ucs-2': - return decoders.utf16le; - case 'base64': - return decoders.base64; - default: - if (lc === undefined) { - lc = true; - charset = charset.toLowerCase(); - continue; - } - return decoders.other.bind(charset); - } - } -} - -const decoders = { - utf8: (data, hint) => { - if (data.length === 0) - return ''; - if (typeof data === 'string') { - // If `data` never had any percent-encoded bytes or never had any that - // were outside of the ASCII range, then we can safely just return the - // input since UTF-8 is ASCII compatible - if (hint < 2) - return data; - - data = Buffer.from(data, 'latin1'); - } - return data.utf8Slice(0, data.length); - }, - - latin1: (data, hint) => { - if (data.length === 0) - return ''; - if (typeof data === 'string') - return data; - return data.latin1Slice(0, data.length); - }, - - utf16le: (data, hint) => { - if (data.length === 0) - return ''; - if (typeof data === 'string') - data = Buffer.from(data, 'latin1'); - return data.ucs2Slice(0, data.length); - }, - - base64: (data, hint) => { - if (data.length === 0) - return ''; - if (typeof data === 'string') - data = Buffer.from(data, 'latin1'); - return data.base64Slice(0, data.length); - }, - - other: (data, hint) => { - if (data.length === 0) - return ''; - if (typeof data === 'string') - data = Buffer.from(data, 'latin1'); - try { - const decoder = new TextDecoder(this); - return decoder.decode(data); - } catch {} - }, -}; - -function convertToUTF8(data, charset, hint) { - const decode = getDecoder(charset); - if (decode) - return decode(data, hint); -} - -function basename(path) { - if (typeof path !== 'string') - return ''; - for (let i = path.length - 1; i >= 0; --i) { - switch (path.charCodeAt(i)) { - case 0x2F: // '/' - case 0x5C: // '\' - path = path.slice(i + 1); - return (path === '..' || path === '.' ? '' : path); - } - } - return (path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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -]; - -/* eslint-disable no-multi-spaces */ -const HEX_VALUES = [ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, - -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -]; -/* eslint-enable no-multi-spaces */ - -module.exports = { - basename, - convertToUTF8, - getDecoder, - parseContentType, - parseDisposition, -}; diff --git a/action/node_modules/busboy/package.json b/action/node_modules/busboy/package.json deleted file mode 100644 index ac2577fe..00000000 --- a/action/node_modules/busboy/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ "name": "busboy", - "version": "1.6.0", - "author": "Brian White ", - "description": "A streaming parser for HTML form data for node.js", - "main": "./lib/index.js", - "dependencies": { - "streamsearch": "^1.1.0" - }, - "devDependencies": { - "@mscdex/eslint-config": "^1.1.0", - "eslint": "^7.32.0" - }, - "scripts": { - "test": "node test/test.js", - "lint": "eslint --cache --report-unused-disable-directives --ext=.js .eslintrc.js lib test bench", - "lint:fix": "npm run lint -- --fix" - }, - "engines": { "node": ">=10.16.0" }, - "keywords": [ "uploads", "forms", "multipart", "form-data" ], - "licenses": [ { "type": "MIT", "url": "http://github.com/mscdex/busboy/raw/master/LICENSE" } ], - "repository": { "type": "git", "url": "http://github.com/mscdex/busboy.git" } -} diff --git a/action/node_modules/busboy/test/common.js b/action/node_modules/busboy/test/common.js deleted file mode 100644 index fb82ad81..00000000 --- a/action/node_modules/busboy/test/common.js +++ /dev/null @@ -1,109 +0,0 @@ -'use strict'; - -const assert = require('assert'); -const { inspect } = require('util'); - -const mustCallChecks = []; - -function noop() {} - -function runCallChecks(exitCode) { - if (exitCode !== 0) return; - - const failed = mustCallChecks.filter((context) => { - if ('minimum' in context) { - context.messageSegment = `at least ${context.minimum}`; - return context.actual < context.minimum; - } - context.messageSegment = `exactly ${context.exact}`; - return context.actual !== context.exact; - }); - - failed.forEach((context) => { - console.error('Mismatched %s function calls. Expected %s, actual %d.', - context.name, - context.messageSegment, - context.actual); - console.error(context.stack.split('\n').slice(2).join('\n')); - }); - - if (failed.length) - process.exit(1); -} - -function mustCall(fn, exact) { - return _mustCallInner(fn, exact, 'exact'); -} - -function mustCallAtLeast(fn, minimum) { - return _mustCallInner(fn, minimum, 'minimum'); -} - -function _mustCallInner(fn, criteria = 1, field) { - if (process._exiting) - throw new Error('Cannot use common.mustCall*() in process exit handler'); - - if (typeof fn === 'number') { - criteria = fn; - fn = noop; - } else if (fn === undefined) { - fn = noop; - } - - if (typeof criteria !== 'number') - throw new TypeError(`Invalid ${field} value: ${criteria}`); - - const context = { - [field]: criteria, - actual: 0, - stack: inspect(new Error()), - name: fn.name || '' - }; - - // Add the exit listener only once to avoid listener leak warnings - if (mustCallChecks.length === 0) - process.on('exit', runCallChecks); - - mustCallChecks.push(context); - - function wrapped(...args) { - ++context.actual; - return fn.call(this, ...args); - } - // TODO: remove origFn? - wrapped.origFn = fn; - - return wrapped; -} - -function getCallSite(top) { - const originalStackFormatter = Error.prepareStackTrace; - Error.prepareStackTrace = (err, stack) => - `${stack[0].getFileName()}:${stack[0].getLineNumber()}`; - const err = new Error(); - Error.captureStackTrace(err, top); - // With the V8 Error API, the stack is not formatted until it is accessed - // eslint-disable-next-line no-unused-expressions - err.stack; - Error.prepareStackTrace = originalStackFormatter; - return err.stack; -} - -function mustNotCall(msg) { - const callSite = getCallSite(mustNotCall); - return function mustNotCall(...args) { - args = args.map(inspect).join(', '); - const argsInfo = (args.length > 0 - ? `\ncalled with arguments: ${args}` - : ''); - assert.fail( - `${msg || 'function should not have been called'} at ${callSite}` - + argsInfo); - }; -} - -module.exports = { - mustCall, - mustCallAtLeast, - mustNotCall, -}; diff --git a/action/node_modules/busboy/test/test-types-multipart-charsets.js b/action/node_modules/busboy/test/test-types-multipart-charsets.js deleted file mode 100644 index ed9c38ae..00000000 --- a/action/node_modules/busboy/test/test-types-multipart-charsets.js +++ /dev/null @@ -1,94 +0,0 @@ -'use strict'; - -const assert = require('assert'); -const { inspect } = require('util'); - -const { mustCall } = require(`${__dirname}/common.js`); - -const busboy = require('..'); - -const input = Buffer.from([ - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_0"; filename="テスト.dat"', - 'Content-Type: application/octet-stream', - '', - 'A'.repeat(1023), - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--' -].join('\r\n')); -const boundary = '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k'; -const expected = [ - { type: 'file', - name: 'upload_file_0', - data: Buffer.from('A'.repeat(1023)), - info: { - filename: 'テスト.dat', - encoding: '7bit', - mimeType: 'application/octet-stream', - }, - limited: false, - }, -]; -const bb = busboy({ - defParamCharset: 'utf8', - headers: { - 'content-type': `multipart/form-data; boundary=${boundary}`, - } -}); -const results = []; - -bb.on('field', (name, val, info) => { - results.push({ type: 'field', name, val, info }); -}); - -bb.on('file', (name, stream, info) => { - const data = []; - let nb = 0; - const file = { - type: 'file', - name, - data: null, - info, - limited: false, - }; - results.push(file); - stream.on('data', (d) => { - data.push(d); - nb += d.length; - }).on('limit', () => { - file.limited = true; - }).on('close', () => { - file.data = Buffer.concat(data, nb); - assert.strictEqual(stream.truncated, file.limited); - }).once('error', (err) => { - file.err = err.message; - }); -}); - -bb.on('error', (err) => { - results.push({ error: err.message }); -}); - -bb.on('partsLimit', () => { - results.push('partsLimit'); -}); - -bb.on('filesLimit', () => { - results.push('filesLimit'); -}); - -bb.on('fieldsLimit', () => { - results.push('fieldsLimit'); -}); - -bb.on('close', mustCall(() => { - assert.deepStrictEqual( - results, - expected, - 'Results mismatch.\n' - + `Parsed: ${inspect(results)}\n` - + `Expected: ${inspect(expected)}` - ); -})); - -bb.end(input); diff --git a/action/node_modules/busboy/test/test-types-multipart-stream-pause.js b/action/node_modules/busboy/test/test-types-multipart-stream-pause.js deleted file mode 100644 index df7268a4..00000000 --- a/action/node_modules/busboy/test/test-types-multipart-stream-pause.js +++ /dev/null @@ -1,102 +0,0 @@ -'use strict'; - -const assert = require('assert'); -const { randomFillSync } = require('crypto'); -const { inspect } = require('util'); - -const busboy = require('..'); - -const { mustCall } = require('./common.js'); - -const BOUNDARY = 'u2KxIV5yF1y+xUspOQCCZopaVgeV6Jxihv35XQJmuTx8X3sh'; - -function formDataSection(key, value) { - return Buffer.from( - `\r\n--${BOUNDARY}` - + `\r\nContent-Disposition: form-data; name="${key}"` - + `\r\n\r\n${value}` - ); -} - -function formDataFile(key, filename, contentType) { - const buf = Buffer.allocUnsafe(100000); - return Buffer.concat([ - Buffer.from(`\r\n--${BOUNDARY}\r\n`), - Buffer.from(`Content-Disposition: form-data; name="${key}"` - + `; filename="${filename}"\r\n`), - Buffer.from(`Content-Type: ${contentType}\r\n\r\n`), - randomFillSync(buf) - ]); -} - -const reqChunks = [ - Buffer.concat([ - formDataFile('file', 'file.bin', 'application/octet-stream'), - formDataSection('foo', 'foo value'), - ]), - formDataSection('bar', 'bar value'), - Buffer.from(`\r\n--${BOUNDARY}--\r\n`) -]; -const bb = busboy({ - headers: { - 'content-type': `multipart/form-data; boundary=${BOUNDARY}` - } -}); -const expected = [ - { type: 'file', - name: 'file', - info: { - filename: 'file.bin', - encoding: '7bit', - mimeType: 'application/octet-stream', - }, - }, - { type: 'field', - name: 'foo', - val: 'foo value', - info: { - nameTruncated: false, - valueTruncated: false, - encoding: '7bit', - mimeType: 'text/plain', - }, - }, - { type: 'field', - name: 'bar', - val: 'bar value', - info: { - nameTruncated: false, - valueTruncated: false, - encoding: '7bit', - mimeType: 'text/plain', - }, - }, -]; -const results = []; - -bb.on('field', (name, val, info) => { - results.push({ type: 'field', name, val, info }); -}); - -bb.on('file', (name, stream, info) => { - results.push({ type: 'file', name, info }); - // Simulate a pipe where the destination is pausing (perhaps due to waiting - // for file system write to finish) - setTimeout(() => { - stream.resume(); - }, 10); -}); - -bb.on('close', mustCall(() => { - assert.deepStrictEqual( - results, - expected, - 'Results mismatch.\n' - + `Parsed: ${inspect(results)}\n` - + `Expected: ${inspect(expected)}` - ); -})); - -for (const chunk of reqChunks) - bb.write(chunk); -bb.end(); diff --git a/action/node_modules/busboy/test/test-types-multipart.js b/action/node_modules/busboy/test/test-types-multipart.js deleted file mode 100644 index 9755642a..00000000 --- a/action/node_modules/busboy/test/test-types-multipart.js +++ /dev/null @@ -1,1053 +0,0 @@ -'use strict'; - -const assert = require('assert'); -const { inspect } = require('util'); - -const busboy = require('..'); - -const active = new Map(); - -const tests = [ - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; name="file_name_0"', - '', - 'super alpha file', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; name="file_name_1"', - '', - 'super beta file', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_0"; filename="1k_a.dat"', - 'Content-Type: application/octet-stream', - '', - 'A'.repeat(1023), - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_1"; filename="1k_b.dat"', - 'Content-Type: application/octet-stream', - '', - 'B'.repeat(1023), - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--' - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - expected: [ - { type: 'field', - name: 'file_name_0', - val: 'super alpha file', - info: { - nameTruncated: false, - valueTruncated: false, - encoding: '7bit', - mimeType: 'text/plain', - }, - }, - { type: 'field', - name: 'file_name_1', - val: 'super beta file', - info: { - nameTruncated: false, - valueTruncated: false, - encoding: '7bit', - mimeType: 'text/plain', - }, - }, - { type: 'file', - name: 'upload_file_0', - data: Buffer.from('A'.repeat(1023)), - info: { - filename: '1k_a.dat', - encoding: '7bit', - mimeType: 'application/octet-stream', - }, - limited: false, - }, - { type: 'file', - name: 'upload_file_1', - data: Buffer.from('B'.repeat(1023)), - info: { - filename: '1k_b.dat', - encoding: '7bit', - mimeType: 'application/octet-stream', - }, - limited: false, - }, - ], - what: 'Fields and files' - }, - { source: [ - ['------WebKitFormBoundaryTB2MiQ36fnSJlrhY', - 'Content-Disposition: form-data; name="cont"', - '', - 'some random content', - '------WebKitFormBoundaryTB2MiQ36fnSJlrhY', - 'Content-Disposition: form-data; name="pass"', - '', - 'some random pass', - '------WebKitFormBoundaryTB2MiQ36fnSJlrhY', - 'Content-Disposition: form-data; name=bit', - '', - '2', - '------WebKitFormBoundaryTB2MiQ36fnSJlrhY--' - ].join('\r\n') - ], - boundary: '----WebKitFormBoundaryTB2MiQ36fnSJlrhY', - expected: [ - { type: 'field', - name: 'cont', - val: 'some random content', - info: { - nameTruncated: false, - valueTruncated: false, - encoding: '7bit', - mimeType: 'text/plain', - }, - }, - { type: 'field', - name: 'pass', - val: 'some random pass', - info: { - nameTruncated: false, - valueTruncated: false, - encoding: '7bit', - mimeType: 'text/plain', - }, - }, - { type: 'field', - name: 'bit', - val: '2', - info: { - nameTruncated: false, - valueTruncated: false, - encoding: '7bit', - mimeType: 'text/plain', - }, - }, - ], - what: 'Fields only' - }, - { source: [ - '' - ], - boundary: '----WebKitFormBoundaryTB2MiQ36fnSJlrhY', - expected: [ - { error: 'Unexpected end of form' }, - ], - what: 'No fields and no files' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; name="file_name_0"', - '', - 'super alpha file', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_0"; filename="1k_a.dat"', - 'Content-Type: application/octet-stream', - '', - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--' - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - limits: { - fileSize: 13, - fieldSize: 5 - }, - expected: [ - { type: 'field', - name: 'file_name_0', - val: 'super', - info: { - nameTruncated: false, - valueTruncated: true, - encoding: '7bit', - mimeType: 'text/plain', - }, - }, - { type: 'file', - name: 'upload_file_0', - data: Buffer.from('ABCDEFGHIJKLM'), - info: { - filename: '1k_a.dat', - encoding: '7bit', - mimeType: 'application/octet-stream', - }, - limited: true, - }, - ], - what: 'Fields and files (limits)' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; name="file_name_0"', - '', - 'super alpha file', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_0"; filename="1k_a.dat"', - 'Content-Type: application/octet-stream', - '', - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--' - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - limits: { - files: 0 - }, - expected: [ - { type: 'field', - name: 'file_name_0', - val: 'super alpha file', - info: { - nameTruncated: false, - valueTruncated: false, - encoding: '7bit', - mimeType: 'text/plain', - }, - }, - 'filesLimit', - ], - what: 'Fields and files (limits: 0 files)' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; name="file_name_0"', - '', - 'super alpha file', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; name="file_name_1"', - '', - 'super beta file', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_0"; filename="1k_a.dat"', - 'Content-Type: application/octet-stream', - '', - 'A'.repeat(1023), - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_1"; filename="1k_b.dat"', - 'Content-Type: application/octet-stream', - '', - 'B'.repeat(1023), - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--' - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - expected: [ - { type: 'field', - name: 'file_name_0', - val: 'super alpha file', - info: { - nameTruncated: false, - valueTruncated: false, - encoding: '7bit', - mimeType: 'text/plain', - }, - }, - { type: 'field', - name: 'file_name_1', - val: 'super beta file', - info: { - nameTruncated: false, - valueTruncated: false, - encoding: '7bit', - mimeType: 'text/plain', - }, - }, - ], - events: ['field'], - what: 'Fields and (ignored) files' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_0"; filename="/tmp/1k_a.dat"', - 'Content-Type: application/octet-stream', - '', - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_1"; filename="C:\\files\\1k_b.dat"', - 'Content-Type: application/octet-stream', - '', - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_2"; filename="relative/1k_c.dat"', - 'Content-Type: application/octet-stream', - '', - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--' - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - expected: [ - { type: 'file', - name: 'upload_file_0', - data: Buffer.from('ABCDEFGHIJKLMNOPQRSTUVWXYZ'), - info: { - filename: '1k_a.dat', - encoding: '7bit', - mimeType: 'application/octet-stream', - }, - limited: false, - }, - { type: 'file', - name: 'upload_file_1', - data: Buffer.from('ABCDEFGHIJKLMNOPQRSTUVWXYZ'), - info: { - filename: '1k_b.dat', - encoding: '7bit', - mimeType: 'application/octet-stream', - }, - limited: false, - }, - { type: 'file', - name: 'upload_file_2', - data: Buffer.from('ABCDEFGHIJKLMNOPQRSTUVWXYZ'), - info: { - filename: '1k_c.dat', - encoding: '7bit', - mimeType: 'application/octet-stream', - }, - limited: false, - }, - ], - what: 'Files with filenames containing paths' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_0"; filename="/absolute/1k_a.dat"', - 'Content-Type: application/octet-stream', - '', - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_1"; filename="C:\\absolute\\1k_b.dat"', - 'Content-Type: application/octet-stream', - '', - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_2"; filename="relative/1k_c.dat"', - 'Content-Type: application/octet-stream', - '', - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--' - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - preservePath: true, - expected: [ - { type: 'file', - name: 'upload_file_0', - data: Buffer.from('ABCDEFGHIJKLMNOPQRSTUVWXYZ'), - info: { - filename: '/absolute/1k_a.dat', - encoding: '7bit', - mimeType: 'application/octet-stream', - }, - limited: false, - }, - { type: 'file', - name: 'upload_file_1', - data: Buffer.from('ABCDEFGHIJKLMNOPQRSTUVWXYZ'), - info: { - filename: 'C:\\absolute\\1k_b.dat', - encoding: '7bit', - mimeType: 'application/octet-stream', - }, - limited: false, - }, - { type: 'file', - name: 'upload_file_2', - data: Buffer.from('ABCDEFGHIJKLMNOPQRSTUVWXYZ'), - info: { - filename: 'relative/1k_c.dat', - encoding: '7bit', - mimeType: 'application/octet-stream', - }, - limited: false, - }, - ], - what: 'Paths to be preserved through the preservePath option' - }, - { source: [ - ['------WebKitFormBoundaryTB2MiQ36fnSJlrhY', - 'Content-Disposition: form-data; name="cont"', - 'Content-Type: ', - '', - 'some random content', - '------WebKitFormBoundaryTB2MiQ36fnSJlrhY', - 'Content-Disposition: ', - '', - 'some random pass', - '------WebKitFormBoundaryTB2MiQ36fnSJlrhY--' - ].join('\r\n') - ], - boundary: '----WebKitFormBoundaryTB2MiQ36fnSJlrhY', - expected: [ - { type: 'field', - name: 'cont', - val: 'some random content', - info: { - nameTruncated: false, - valueTruncated: false, - encoding: '7bit', - mimeType: 'text/plain', - }, - }, - ], - what: 'Empty content-type and empty content-disposition' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="file"; filename*=utf-8\'\'n%C3%A4me.txt', - 'Content-Type: application/octet-stream', - '', - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--' - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - expected: [ - { type: 'file', - name: 'file', - data: Buffer.from('ABCDEFGHIJKLMNOPQRSTUVWXYZ'), - info: { - filename: 'näme.txt', - encoding: '7bit', - mimeType: 'application/octet-stream', - }, - limited: false, - }, - ], - what: 'Unicode filenames' - }, - { source: [ - ['--asdasdasdasd\r\n', - 'Content-Type: text/plain\r\n', - 'Content-Disposition: form-data; name="foo"\r\n', - '\r\n', - 'asd\r\n', - '--asdasdasdasd--' - ].join(':)') - ], - boundary: 'asdasdasdasd', - expected: [ - { error: 'Malformed part header' }, - { error: 'Unexpected end of form' }, - ], - what: 'Stopped mid-header' - }, - { source: [ - ['------WebKitFormBoundaryTB2MiQ36fnSJlrhY', - 'Content-Disposition: form-data; name="cont"', - 'Content-Type: application/json', - '', - '{}', - '------WebKitFormBoundaryTB2MiQ36fnSJlrhY--', - ].join('\r\n') - ], - boundary: '----WebKitFormBoundaryTB2MiQ36fnSJlrhY', - expected: [ - { type: 'field', - name: 'cont', - val: '{}', - info: { - nameTruncated: false, - valueTruncated: false, - encoding: '7bit', - mimeType: 'application/json', - }, - }, - ], - what: 'content-type for fields' - }, - { source: [ - '------WebKitFormBoundaryTB2MiQ36fnSJlrhY--', - ], - boundary: '----WebKitFormBoundaryTB2MiQ36fnSJlrhY', - expected: [], - what: 'empty form' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name=upload_file_0; filename="1k_a.dat"', - 'Content-Type: application/octet-stream', - 'Content-Transfer-Encoding: binary', - '', - '', - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - expected: [ - { type: 'file', - name: 'upload_file_0', - data: Buffer.alloc(0), - info: { - filename: '1k_a.dat', - encoding: 'binary', - mimeType: 'application/octet-stream', - }, - limited: false, - err: 'Unexpected end of form', - }, - { error: 'Unexpected end of form' }, - ], - what: 'Stopped mid-file #1' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name=upload_file_0; filename="1k_a.dat"', - 'Content-Type: application/octet-stream', - '', - 'a', - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - expected: [ - { type: 'file', - name: 'upload_file_0', - data: Buffer.from('a'), - info: { - filename: '1k_a.dat', - encoding: '7bit', - mimeType: 'application/octet-stream', - }, - limited: false, - err: 'Unexpected end of form', - }, - { error: 'Unexpected end of form' }, - ], - what: 'Stopped mid-file #2' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_0"; filename="notes.txt"', - 'Content-Type: text/plain; charset=utf8', - '', - 'a', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - expected: [ - { type: 'file', - name: 'upload_file_0', - data: Buffer.from('a'), - info: { - filename: 'notes.txt', - encoding: '7bit', - mimeType: 'text/plain', - }, - limited: false, - }, - ], - what: 'Text file with charset' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_0"; filename="notes.txt"', - 'Content-Type: ', - ' text/plain; charset=utf8', - '', - 'a', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - expected: [ - { type: 'file', - name: 'upload_file_0', - data: Buffer.from('a'), - info: { - filename: 'notes.txt', - encoding: '7bit', - mimeType: 'text/plain', - }, - limited: false, - }, - ], - what: 'Folded header value' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Type: text/plain; charset=utf8', - '', - 'a', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - expected: [], - what: 'No Content-Disposition' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; name="file_name_0"', - '', - 'a'.repeat(64 * 1024), - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_0"; filename="notes.txt"', - 'Content-Type: ', - ' text/plain; charset=utf8', - '', - 'bc', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - limits: { - fieldSize: Infinity, - }, - expected: [ - { type: 'file', - name: 'upload_file_0', - data: Buffer.from('bc'), - info: { - filename: 'notes.txt', - encoding: '7bit', - mimeType: 'text/plain', - }, - limited: false, - }, - ], - events: [ 'file' ], - what: 'Skip field parts if no listener' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; name="file_name_0"', - '', - 'a', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_0"; filename="notes.txt"', - 'Content-Type: ', - ' text/plain; charset=utf8', - '', - 'bc', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - limits: { - parts: 1, - }, - expected: [ - { type: 'field', - name: 'file_name_0', - val: 'a', - info: { - nameTruncated: false, - valueTruncated: false, - encoding: '7bit', - mimeType: 'text/plain', - }, - }, - 'partsLimit', - ], - what: 'Parts limit' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; name="file_name_0"', - '', - 'a', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; name="file_name_1"', - '', - 'b', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - limits: { - fields: 1, - }, - expected: [ - { type: 'field', - name: 'file_name_0', - val: 'a', - info: { - nameTruncated: false, - valueTruncated: false, - encoding: '7bit', - mimeType: 'text/plain', - }, - }, - 'fieldsLimit', - ], - what: 'Fields limit' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_0"; filename="notes.txt"', - 'Content-Type: text/plain; charset=utf8', - '', - 'ab', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_1"; filename="notes2.txt"', - 'Content-Type: text/plain; charset=utf8', - '', - 'cd', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - limits: { - files: 1, - }, - expected: [ - { type: 'file', - name: 'upload_file_0', - data: Buffer.from('ab'), - info: { - filename: 'notes.txt', - encoding: '7bit', - mimeType: 'text/plain', - }, - limited: false, - }, - 'filesLimit', - ], - what: 'Files limit' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + `name="upload_file_0"; filename="${'a'.repeat(64 * 1024)}.txt"`, - 'Content-Type: text/plain; charset=utf8', - '', - 'ab', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_1"; filename="notes2.txt"', - 'Content-Type: text/plain; charset=utf8', - '', - 'cd', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - expected: [ - { error: 'Malformed part header' }, - { type: 'file', - name: 'upload_file_1', - data: Buffer.from('cd'), - info: { - filename: 'notes2.txt', - encoding: '7bit', - mimeType: 'text/plain', - }, - limited: false, - }, - ], - what: 'Oversized part header' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_0"; filename="notes.txt"', - 'Content-Type: text/plain; charset=utf8', - '', - 'a'.repeat(31) + '\r', - ].join('\r\n'), - 'b'.repeat(40), - '\r\n-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - fileHwm: 32, - expected: [ - { type: 'file', - name: 'upload_file_0', - data: Buffer.from('a'.repeat(31) + '\r' + 'b'.repeat(40)), - info: { - filename: 'notes.txt', - encoding: '7bit', - mimeType: 'text/plain', - }, - limited: false, - }, - ], - what: 'Lookbehind data should not stall file streams' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + `name="upload_file_0"; filename="${'a'.repeat(8 * 1024)}.txt"`, - 'Content-Type: text/plain; charset=utf8', - '', - 'ab', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + `name="upload_file_1"; filename="${'b'.repeat(8 * 1024)}.txt"`, - 'Content-Type: text/plain; charset=utf8', - '', - 'cd', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + `name="upload_file_2"; filename="${'c'.repeat(8 * 1024)}.txt"`, - 'Content-Type: text/plain; charset=utf8', - '', - 'ef', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - expected: [ - { type: 'file', - name: 'upload_file_0', - data: Buffer.from('ab'), - info: { - filename: `${'a'.repeat(8 * 1024)}.txt`, - encoding: '7bit', - mimeType: 'text/plain', - }, - limited: false, - }, - { type: 'file', - name: 'upload_file_1', - data: Buffer.from('cd'), - info: { - filename: `${'b'.repeat(8 * 1024)}.txt`, - encoding: '7bit', - mimeType: 'text/plain', - }, - limited: false, - }, - { type: 'file', - name: 'upload_file_2', - data: Buffer.from('ef'), - info: { - filename: `${'c'.repeat(8 * 1024)}.txt`, - encoding: '7bit', - mimeType: 'text/plain', - }, - limited: false, - }, - ], - what: 'Header size limit should be per part' - }, - { source: [ - '\r\n--d1bf46b3-aa33-4061-b28d-6c5ced8b08ee\r\n', - 'Content-Type: application/gzip\r\n' - + 'Content-Encoding: gzip\r\n' - + 'Content-Disposition: form-data; name=batch-1; filename=batch-1' - + '\r\n\r\n', - '\r\n--d1bf46b3-aa33-4061-b28d-6c5ced8b08ee--', - ], - boundary: 'd1bf46b3-aa33-4061-b28d-6c5ced8b08ee', - expected: [ - { type: 'file', - name: 'batch-1', - data: Buffer.alloc(0), - info: { - filename: 'batch-1', - encoding: '7bit', - mimeType: 'application/gzip', - }, - limited: false, - }, - ], - what: 'Empty part' - }, -]; - -for (const test of tests) { - active.set(test, 1); - - const { what, boundary, events, limits, preservePath, fileHwm } = test; - const bb = busboy({ - fileHwm, - limits, - preservePath, - headers: { - 'content-type': `multipart/form-data; boundary=${boundary}`, - } - }); - const results = []; - - if (events === undefined || events.includes('field')) { - bb.on('field', (name, val, info) => { - results.push({ type: 'field', name, val, info }); - }); - } - - if (events === undefined || events.includes('file')) { - bb.on('file', (name, stream, info) => { - const data = []; - let nb = 0; - const file = { - type: 'file', - name, - data: null, - info, - limited: false, - }; - results.push(file); - stream.on('data', (d) => { - data.push(d); - nb += d.length; - }).on('limit', () => { - file.limited = true; - }).on('close', () => { - file.data = Buffer.concat(data, nb); - assert.strictEqual(stream.truncated, file.limited); - }).once('error', (err) => { - file.err = err.message; - }); - }); - } - - bb.on('error', (err) => { - results.push({ error: err.message }); - }); - - bb.on('partsLimit', () => { - results.push('partsLimit'); - }); - - bb.on('filesLimit', () => { - results.push('filesLimit'); - }); - - bb.on('fieldsLimit', () => { - results.push('fieldsLimit'); - }); - - bb.on('close', () => { - active.delete(test); - - assert.deepStrictEqual( - results, - test.expected, - `[${what}] Results mismatch.\n` - + `Parsed: ${inspect(results)}\n` - + `Expected: ${inspect(test.expected)}` - ); - }); - - for (const src of test.source) { - const buf = (typeof src === 'string' ? Buffer.from(src, 'utf8') : src); - bb.write(buf); - } - bb.end(); -} - -// Byte-by-byte versions -for (let test of tests) { - test = { ...test }; - test.what += ' (byte-by-byte)'; - active.set(test, 1); - - const { what, boundary, events, limits, preservePath, fileHwm } = test; - const bb = busboy({ - fileHwm, - limits, - preservePath, - headers: { - 'content-type': `multipart/form-data; boundary=${boundary}`, - } - }); - const results = []; - - if (events === undefined || events.includes('field')) { - bb.on('field', (name, val, info) => { - results.push({ type: 'field', name, val, info }); - }); - } - - if (events === undefined || events.includes('file')) { - bb.on('file', (name, stream, info) => { - const data = []; - let nb = 0; - const file = { - type: 'file', - name, - data: null, - info, - limited: false, - }; - results.push(file); - stream.on('data', (d) => { - data.push(d); - nb += d.length; - }).on('limit', () => { - file.limited = true; - }).on('close', () => { - file.data = Buffer.concat(data, nb); - assert.strictEqual(stream.truncated, file.limited); - }).once('error', (err) => { - file.err = err.message; - }); - }); - } - - bb.on('error', (err) => { - results.push({ error: err.message }); - }); - - bb.on('partsLimit', () => { - results.push('partsLimit'); - }); - - bb.on('filesLimit', () => { - results.push('filesLimit'); - }); - - bb.on('fieldsLimit', () => { - results.push('fieldsLimit'); - }); - - bb.on('close', () => { - active.delete(test); - - assert.deepStrictEqual( - results, - test.expected, - `[${what}] Results mismatch.\n` - + `Parsed: ${inspect(results)}\n` - + `Expected: ${inspect(test.expected)}` - ); - }); - - for (const src of test.source) { - const buf = (typeof src === 'string' ? Buffer.from(src, 'utf8') : src); - for (let i = 0; i < buf.length; ++i) - bb.write(buf.slice(i, i + 1)); - } - bb.end(); -} - -{ - let exception = false; - process.once('uncaughtException', (ex) => { - exception = true; - throw ex; - }); - process.on('exit', () => { - if (exception || active.size === 0) - return; - process.exitCode = 1; - console.error('=========================='); - console.error(`${active.size} test(s) did not finish:`); - console.error('=========================='); - console.error(Array.from(active.keys()).map((v) => v.what).join('\n')); - }); -} diff --git a/action/node_modules/busboy/test/test-types-urlencoded.js b/action/node_modules/busboy/test/test-types-urlencoded.js deleted file mode 100644 index c35962b9..00000000 --- a/action/node_modules/busboy/test/test-types-urlencoded.js +++ /dev/null @@ -1,488 +0,0 @@ -'use strict'; - -const assert = require('assert'); -const { transcode } = require('buffer'); -const { inspect } = require('util'); - -const busboy = require('..'); - -const active = new Map(); - -const tests = [ - { source: ['foo'], - expected: [ - ['foo', - '', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Unassigned value' - }, - { source: ['foo=bar'], - expected: [ - ['foo', - 'bar', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Assigned value' - }, - { source: ['foo&bar=baz'], - expected: [ - ['foo', - '', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ['bar', - 'baz', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Unassigned and assigned value' - }, - { source: ['foo=bar&baz'], - expected: [ - ['foo', - 'bar', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ['baz', - '', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Assigned and unassigned value' - }, - { source: ['foo=bar&baz=bla'], - expected: [ - ['foo', - 'bar', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ['baz', - 'bla', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Two assigned values' - }, - { source: ['foo&bar'], - expected: [ - ['foo', - '', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ['bar', - '', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Two unassigned values' - }, - { source: ['foo&bar&'], - expected: [ - ['foo', - '', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ['bar', - '', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Two unassigned values and ampersand' - }, - { source: ['foo+1=bar+baz%2Bquux'], - expected: [ - ['foo 1', - 'bar baz+quux', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Assigned key and value with (plus) space' - }, - { source: ['foo=bar%20baz%21'], - expected: [ - ['foo', - 'bar baz!', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Assigned value with encoded bytes' - }, - { source: ['foo%20bar=baz%20bla%21'], - expected: [ - ['foo bar', - 'baz bla!', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Assigned value with encoded bytes #2' - }, - { source: ['foo=bar%20baz%21&num=1000'], - expected: [ - ['foo', - 'bar baz!', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ['num', - '1000', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Two assigned values, one with encoded bytes' - }, - { source: [ - Array.from(transcode(Buffer.from('foo'), 'utf8', 'utf16le')).map( - (n) => `%${n.toString(16).padStart(2, '0')}` - ).join(''), - '=', - Array.from(transcode(Buffer.from('😀!'), 'utf8', 'utf16le')).map( - (n) => `%${n.toString(16).padStart(2, '0')}` - ).join(''), - ], - expected: [ - ['foo', - '😀!', - { nameTruncated: false, - valueTruncated: false, - encoding: 'UTF-16LE', - mimeType: 'text/plain' }, - ], - ], - charset: 'UTF-16LE', - what: 'Encoded value with multi-byte charset' - }, - { source: [ - 'foo=<', - Array.from(transcode(Buffer.from('©:^þ'), 'utf8', 'latin1')).map( - (n) => `%${n.toString(16).padStart(2, '0')}` - ).join(''), - ], - expected: [ - ['foo', - '<©:^þ', - { nameTruncated: false, - valueTruncated: false, - encoding: 'ISO-8859-1', - mimeType: 'text/plain' }, - ], - ], - charset: 'ISO-8859-1', - what: 'Encoded value with single-byte, ASCII-compatible, non-UTF8 charset' - }, - { source: ['foo=bar&baz=bla'], - expected: [], - what: 'Limits: zero fields', - limits: { fields: 0 } - }, - { source: ['foo=bar&baz=bla'], - expected: [ - ['foo', - 'bar', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Limits: one field', - limits: { fields: 1 } - }, - { source: ['foo=bar&baz=bla'], - expected: [ - ['foo', - 'bar', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ['baz', - 'bla', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Limits: field part lengths match limits', - limits: { fieldNameSize: 3, fieldSize: 3 } - }, - { source: ['foo=bar&baz=bla'], - expected: [ - ['fo', - 'bar', - { nameTruncated: true, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ['ba', - 'bla', - { nameTruncated: true, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Limits: truncated field name', - limits: { fieldNameSize: 2 } - }, - { source: ['foo=bar&baz=bla'], - expected: [ - ['foo', - 'ba', - { nameTruncated: false, - valueTruncated: true, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ['baz', - 'bl', - { nameTruncated: false, - valueTruncated: true, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Limits: truncated field value', - limits: { fieldSize: 2 } - }, - { source: ['foo=bar&baz=bla'], - expected: [ - ['fo', - 'ba', - { nameTruncated: true, - valueTruncated: true, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ['ba', - 'bl', - { nameTruncated: true, - valueTruncated: true, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Limits: truncated field name and value', - limits: { fieldNameSize: 2, fieldSize: 2 } - }, - { source: ['foo=bar&baz=bla'], - expected: [ - ['fo', - '', - { nameTruncated: true, - valueTruncated: true, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ['ba', - '', - { nameTruncated: true, - valueTruncated: true, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Limits: truncated field name and zero value limit', - limits: { fieldNameSize: 2, fieldSize: 0 } - }, - { source: ['foo=bar&baz=bla'], - expected: [ - ['', - '', - { nameTruncated: true, - valueTruncated: true, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ['', - '', - { nameTruncated: true, - valueTruncated: true, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Limits: truncated zero field name and zero value limit', - limits: { fieldNameSize: 0, fieldSize: 0 } - }, - { source: ['&'], - expected: [], - what: 'Ampersand' - }, - { source: ['&&&&&'], - expected: [], - what: 'Many ampersands' - }, - { source: ['='], - expected: [ - ['', - '', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Assigned value, empty name and value' - }, - { source: [''], - expected: [], - what: 'Nothing' - }, -]; - -for (const test of tests) { - active.set(test, 1); - - const { what } = test; - const charset = test.charset || 'utf-8'; - const bb = busboy({ - limits: test.limits, - headers: { - 'content-type': `application/x-www-form-urlencoded; charset=${charset}`, - }, - }); - const results = []; - - bb.on('field', (key, val, info) => { - results.push([key, val, info]); - }); - - bb.on('file', () => { - throw new Error(`[${what}] Unexpected file`); - }); - - bb.on('close', () => { - active.delete(test); - - assert.deepStrictEqual( - results, - test.expected, - `[${what}] Results mismatch.\n` - + `Parsed: ${inspect(results)}\n` - + `Expected: ${inspect(test.expected)}` - ); - }); - - for (const src of test.source) { - const buf = (typeof src === 'string' ? Buffer.from(src, 'utf8') : src); - bb.write(buf); - } - bb.end(); -} - -// Byte-by-byte versions -for (let test of tests) { - test = { ...test }; - test.what += ' (byte-by-byte)'; - active.set(test, 1); - - const { what } = test; - const charset = test.charset || 'utf-8'; - const bb = busboy({ - limits: test.limits, - headers: { - 'content-type': `application/x-www-form-urlencoded; charset="${charset}"`, - }, - }); - const results = []; - - bb.on('field', (key, val, info) => { - results.push([key, val, info]); - }); - - bb.on('file', () => { - throw new Error(`[${what}] Unexpected file`); - }); - - bb.on('close', () => { - active.delete(test); - - assert.deepStrictEqual( - results, - test.expected, - `[${what}] Results mismatch.\n` - + `Parsed: ${inspect(results)}\n` - + `Expected: ${inspect(test.expected)}` - ); - }); - - for (const src of test.source) { - const buf = (typeof src === 'string' ? Buffer.from(src, 'utf8') : src); - for (let i = 0; i < buf.length; ++i) - bb.write(buf.slice(i, i + 1)); - } - bb.end(); -} - -{ - let exception = false; - process.once('uncaughtException', (ex) => { - exception = true; - throw ex; - }); - process.on('exit', () => { - if (exception || active.size === 0) - return; - process.exitCode = 1; - console.error('=========================='); - console.error(`${active.size} test(s) did not finish:`); - console.error('=========================='); - console.error(Array.from(active.keys()).map((v) => v.what).join('\n')); - }); -} diff --git a/action/node_modules/busboy/test/test.js b/action/node_modules/busboy/test/test.js deleted file mode 100644 index d0380f29..00000000 --- a/action/node_modules/busboy/test/test.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -const { spawnSync } = require('child_process'); -const { readdirSync } = require('fs'); -const { join } = require('path'); - -const files = readdirSync(__dirname).sort(); -for (const filename of files) { - if (filename.startsWith('test-')) { - const path = join(__dirname, filename); - console.log(`> Running ${filename} ...`); - const result = spawnSync(`${process.argv0} ${path}`, { - shell: true, - stdio: 'inherit', - windowsHide: true - }); - if (result.status !== 0) - process.exitCode = 1; - } -} diff --git a/action/node_modules/isexe/.npmignore b/action/node_modules/isexe/.npmignore deleted file mode 100644 index c1cb757a..00000000 --- a/action/node_modules/isexe/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -.nyc_output/ -coverage/ diff --git a/action/node_modules/isexe/LICENSE b/action/node_modules/isexe/LICENSE index 19129e31..c925dbe8 100644 --- a/action/node_modules/isexe/LICENSE +++ b/action/node_modules/isexe/LICENSE @@ -1,6 +1,6 @@ The ISC License -Copyright (c) Isaac Z. Schlueter and Contributors +Copyright (c) 2016-2022 Isaac Z. Schlueter and Contributors Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/action/node_modules/isexe/README.md b/action/node_modules/isexe/README.md index 35769e84..ec7e2bf2 100644 --- a/action/node_modules/isexe/README.md +++ b/action/node_modules/isexe/README.md @@ -7,45 +7,68 @@ Windows. ## USAGE -```javascript -var isexe = require('isexe') -isexe('some-file-name', function (err, isExe) { - if (err) { - console.error('probably file does not exist or something', err) - } else if (isExe) { +```js +import { isexe, sync } from 'isexe' +// or require() works too +// const { isexe } = require('isexe') +isexe('some-file-name').then(isExe => { + if (isExe) { console.error('this thing can be run') } else { console.error('cannot be run') } +}, (err) => { + console.error('probably file doesnt exist or something') }) // same thing but synchronous, throws errors -var isExe = isexe.sync('some-file-name') +isExe = sync('some-file-name') // treat errors as just "not executable" -isexe('maybe-missing-file', { ignoreErrors: true }, callback) -var isExe = isexe.sync('maybe-missing-file', { ignoreErrors: true }) +const isExe = await isexe('maybe-missing-file', { ignoreErrors: true }) +const isExe = sync('maybe-missing-file', { ignoreErrors: true }) ``` ## API -### `isexe(path, [options], [callback])` +### `isexe(path, [options]) => Promise` -Check if the path is executable. If no callback provided, and a -global `Promise` object is available, then a Promise will be returned. +Check if the path is executable. Will raise whatever errors may be raised by `fs.stat`, unless `options.ignoreErrors` is set to true. -### `isexe.sync(path, [options])` +### `sync(path, [options]) => boolean` Same as `isexe` but returns the value and throws any errors raised. +## Platform Specific Implementations + +If for some reason you want to use the implementation for a +specific platform, you can do that. + +```js +import { win32, posix } from 'isexe' +win32.isexe(...) +win32.sync(...) +// etc + +// or: +import { isexe, sync } from 'isexe/posix' +``` + +The default exported implementation will be chosen based on +`process.platform`. + ### Options -* `ignoreErrors` Treat all errors as "no, this is not executable", but - don't raise them. -* `uid` Number to use as the user id -* `gid` Number to use as the group id +```ts +import type IsexeOptions from 'isexe' +``` + +* `ignoreErrors` Treat all errors as "no, this is not + executable", but don't raise them. +* `uid` Number to use as the user id on posix +* `gid` Number to use as the group id on posix * `pathExt` List of path extensions to use instead of `PATHEXT` environment variable on Windows. diff --git a/action/node_modules/isexe/dist/cjs/index.d.ts b/action/node_modules/isexe/dist/cjs/index.d.ts new file mode 100644 index 00000000..223bf781 --- /dev/null +++ b/action/node_modules/isexe/dist/cjs/index.d.ts @@ -0,0 +1,14 @@ +import * as posix from './posix.js'; +import * as win32 from './win32.js'; +export * from './options.js'; +export { win32, posix }; +/** + * Determine whether a path is executable on the current platform. + */ +export declare const isexe: (path: string, options?: import("./options.js").IsexeOptions) => Promise; +/** + * Synchronously determine whether a path is executable on the + * current platform. + */ +export declare const sync: (path: string, options?: import("./options.js").IsexeOptions) => boolean; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/action/node_modules/isexe/dist/cjs/index.d.ts.map b/action/node_modules/isexe/dist/cjs/index.d.ts.map new file mode 100644 index 00000000..c90348ea --- /dev/null +++ b/action/node_modules/isexe/dist/cjs/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;AAKvB;;GAEG;AACH,eAAO,MAAM,KAAK,mFAAa,CAAA;AAC/B;;;GAGG;AACH,eAAO,MAAM,IAAI,0EAAY,CAAA"} \ No newline at end of file diff --git a/action/node_modules/@deno/shim-deno/dist/deno/internal/errorMap.js b/action/node_modules/isexe/dist/cjs/index.js similarity index 56% rename from action/node_modules/@deno/shim-deno/dist/deno/internal/errorMap.js rename to action/node_modules/isexe/dist/cjs/index.js index 6d4afc02..cefcb66b 100644 --- a/action/node_modules/@deno/shim-deno/dist/deno/internal/errorMap.js +++ b/action/node_modules/isexe/dist/cjs/index.js @@ -1,43 +1,46 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const errors = __importStar(require("../stable/variables/errors.js")); -const mapper = (Ctor) => (err) => Object.assign(new Ctor(err.message), { - stack: err.stack, -}); -const map = { - EEXIST: mapper(errors.AlreadyExists), - ENOENT: mapper(errors.NotFound), -}; -const isNodeErr = (e) => { - return e instanceof Error && "code" in e; -}; -function mapError(e) { - var _a; - if (!isNodeErr(e)) - return e; - return ((_a = map[e.code]) === null || _a === void 0 ? void 0 : _a.call(map, e)) || e; -} -exports.default = mapError; +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.sync = exports.isexe = exports.posix = exports.win32 = void 0; +const posix = __importStar(require("./posix.js")); +exports.posix = posix; +const win32 = __importStar(require("./win32.js")); +exports.win32 = win32; +__exportStar(require("./options.js"), exports); +const platform = process.env._ISEXE_TEST_PLATFORM_ || process.platform; +const impl = platform === 'win32' ? win32 : posix; +/** + * Determine whether a path is executable on the current platform. + */ +exports.isexe = impl.isexe; +/** + * Synchronously determine whether a path is executable on the + * current platform. + */ +exports.sync = impl.sync; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/action/node_modules/isexe/dist/cjs/index.js.map b/action/node_modules/isexe/dist/cjs/index.js.map new file mode 100644 index 00000000..30c68b04 --- /dev/null +++ b/action/node_modules/isexe/dist/cjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAmC;AAGnB,sBAAK;AAFrB,kDAAmC;AAE1B,sBAAK;AADd,+CAA4B;AAG5B,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,OAAO,CAAC,QAAQ,CAAA;AACtE,MAAM,IAAI,GAAG,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAA;AAEjD;;GAEG;AACU,QAAA,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;AAC/B;;;GAGG;AACU,QAAA,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA","sourcesContent":["import * as posix from './posix.js'\nimport * as win32 from './win32.js'\nexport * from './options.js'\nexport { win32, posix }\n\nconst platform = process.env._ISEXE_TEST_PLATFORM_ || process.platform\nconst impl = platform === 'win32' ? win32 : posix\n\n/**\n * Determine whether a path is executable on the current platform.\n */\nexport const isexe = impl.isexe\n/**\n * Synchronously determine whether a path is executable on the\n * current platform.\n */\nexport const sync = impl.sync\n"]} \ No newline at end of file diff --git a/action/node_modules/isexe/dist/cjs/options.d.ts b/action/node_modules/isexe/dist/cjs/options.d.ts new file mode 100644 index 00000000..c30a29b3 --- /dev/null +++ b/action/node_modules/isexe/dist/cjs/options.d.ts @@ -0,0 +1,32 @@ +export interface IsexeOptions { + /** + * Ignore errors arising from attempting to get file access status + * Note that EACCES is always ignored, because that just means + * it's not executable. If this is not set, then attempting to check + * the executable-ness of a nonexistent file will raise ENOENT, for + * example. + */ + ignoreErrors?: boolean; + /** + * effective uid when checking executable mode flags on posix + * Defaults to process.getuid() + */ + uid?: number; + /** + * effective gid when checking executable mode flags on posix + * Defaults to process.getgid() + */ + gid?: number; + /** + * effective group ID list to use when checking executable mode flags + * on posix + * Defaults to process.getgroups() + */ + groups?: number[]; + /** + * The ;-delimited path extension list for win32 implementation. + * Defaults to process.env.PATHEXT + */ + pathExt?: string; +} +//# sourceMappingURL=options.d.ts.map \ No newline at end of file diff --git a/action/node_modules/isexe/dist/cjs/options.d.ts.map b/action/node_modules/isexe/dist/cjs/options.d.ts.map new file mode 100644 index 00000000..952afdb4 --- /dev/null +++ b/action/node_modules/isexe/dist/cjs/options.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/options.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IAEtB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IAEjB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB"} \ No newline at end of file diff --git a/action/node_modules/@deno/shim-deno/dist/deno/stable/types.js b/action/node_modules/isexe/dist/cjs/options.js similarity index 64% rename from action/node_modules/@deno/shim-deno/dist/deno/stable/types.js rename to action/node_modules/isexe/dist/cjs/options.js index 7a3499d4..0dfad076 100644 --- a/action/node_modules/@deno/shim-deno/dist/deno/stable/types.js +++ b/action/node_modules/isexe/dist/cjs/options.js @@ -1,3 +1,3 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -/// +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=options.js.map \ No newline at end of file diff --git a/action/node_modules/isexe/dist/cjs/options.js.map b/action/node_modules/isexe/dist/cjs/options.js.map new file mode 100644 index 00000000..27bbeacc --- /dev/null +++ b/action/node_modules/isexe/dist/cjs/options.js.map @@ -0,0 +1 @@ +{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/options.ts"],"names":[],"mappings":"","sourcesContent":["export interface IsexeOptions {\n /**\n * Ignore errors arising from attempting to get file access status\n * Note that EACCES is always ignored, because that just means\n * it's not executable. If this is not set, then attempting to check\n * the executable-ness of a nonexistent file will raise ENOENT, for\n * example.\n */\n ignoreErrors?: boolean\n\n /**\n * effective uid when checking executable mode flags on posix\n * Defaults to process.getuid()\n */\n uid?: number\n\n /**\n * effective gid when checking executable mode flags on posix\n * Defaults to process.getgid()\n */\n gid?: number\n\n /**\n * effective group ID list to use when checking executable mode flags\n * on posix\n * Defaults to process.getgroups()\n */\n groups?: number[]\n\n /**\n * The ;-delimited path extension list for win32 implementation.\n * Defaults to process.env.PATHEXT\n */\n pathExt?: string\n}\n"]} \ No newline at end of file diff --git a/action/node_modules/isexe/dist/cjs/package.json b/action/node_modules/isexe/dist/cjs/package.json new file mode 100644 index 00000000..5bbefffb --- /dev/null +++ b/action/node_modules/isexe/dist/cjs/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/action/node_modules/isexe/dist/cjs/posix.d.ts b/action/node_modules/isexe/dist/cjs/posix.d.ts new file mode 100644 index 00000000..b792ee6a --- /dev/null +++ b/action/node_modules/isexe/dist/cjs/posix.d.ts @@ -0,0 +1,18 @@ +/** + * This is the Posix implementation of isexe, which uses the file + * mode and uid/gid values. + * + * @module + */ +import { IsexeOptions } from './options'; +/** + * Determine whether a path is executable according to the mode and + * current (or specified) user and group IDs. + */ +export declare const isexe: (path: string, options?: IsexeOptions) => Promise; +/** + * Synchronously determine whether a path is executable according to + * the mode and current (or specified) user and group IDs. + */ +export declare const sync: (path: string, options?: IsexeOptions) => boolean; +//# sourceMappingURL=posix.d.ts.map \ No newline at end of file diff --git a/action/node_modules/isexe/dist/cjs/posix.d.ts.map b/action/node_modules/isexe/dist/cjs/posix.d.ts.map new file mode 100644 index 00000000..54df8faa --- /dev/null +++ b/action/node_modules/isexe/dist/cjs/posix.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"posix.d.ts","sourceRoot":"","sources":["../../src/posix.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC;;;GAGG;AACH,eAAO,MAAM,KAAK,SACV,MAAM,YACH,YAAY,KACpB,QAAQ,OAAO,CASjB,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,IAAI,SACT,MAAM,YACH,YAAY,KACpB,OASF,CAAA"} \ No newline at end of file diff --git a/action/node_modules/isexe/dist/cjs/posix.js b/action/node_modules/isexe/dist/cjs/posix.js new file mode 100644 index 00000000..3bc5e79d --- /dev/null +++ b/action/node_modules/isexe/dist/cjs/posix.js @@ -0,0 +1,67 @@ +"use strict"; +/** + * This is the Posix implementation of isexe, which uses the file + * mode and uid/gid values. + * + * @module + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.sync = exports.isexe = void 0; +const fs_1 = require("fs"); +const promises_1 = require("fs/promises"); +/** + * Determine whether a path is executable according to the mode and + * current (or specified) user and group IDs. + */ +const isexe = async (path, options = {}) => { + const { ignoreErrors = false } = options; + try { + return checkStat(await (0, promises_1.stat)(path), options); + } + catch (e) { + const er = e; + if (ignoreErrors || er.code === 'EACCES') + return false; + throw er; + } +}; +exports.isexe = isexe; +/** + * Synchronously determine whether a path is executable according to + * the mode and current (or specified) user and group IDs. + */ +const sync = (path, options = {}) => { + const { ignoreErrors = false } = options; + try { + return checkStat((0, fs_1.statSync)(path), options); + } + catch (e) { + const er = e; + if (ignoreErrors || er.code === 'EACCES') + return false; + throw er; + } +}; +exports.sync = sync; +const checkStat = (stat, options) => stat.isFile() && checkMode(stat, options); +const checkMode = (stat, options) => { + const myUid = options.uid ?? process.getuid?.(); + const myGroups = options.groups ?? process.getgroups?.() ?? []; + const myGid = options.gid ?? process.getgid?.() ?? myGroups[0]; + if (myUid === undefined || myGid === undefined) { + throw new Error('cannot get uid or gid'); + } + const groups = new Set([myGid, ...myGroups]); + const mod = stat.mode; + const uid = stat.uid; + const gid = stat.gid; + const u = parseInt('100', 8); + const g = parseInt('010', 8); + const o = parseInt('001', 8); + const ug = u | g; + return !!(mod & o || + (mod & g && groups.has(gid)) || + (mod & u && uid === myUid) || + (mod & ug && myUid === 0)); +}; +//# sourceMappingURL=posix.js.map \ No newline at end of file diff --git a/action/node_modules/isexe/dist/cjs/posix.js.map b/action/node_modules/isexe/dist/cjs/posix.js.map new file mode 100644 index 00000000..dd1bbf63 --- /dev/null +++ b/action/node_modules/isexe/dist/cjs/posix.js.map @@ -0,0 +1 @@ +{"version":3,"file":"posix.js","sourceRoot":"","sources":["../../src/posix.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,2BAAoC;AACpC,0CAAkC;AAGlC;;;GAGG;AACI,MAAM,KAAK,GAAG,KAAK,EACxB,IAAY,EACZ,UAAwB,EAAE,EACR,EAAE;IACpB,MAAM,EAAE,YAAY,GAAG,KAAK,EAAE,GAAG,OAAO,CAAA;IACxC,IAAI;QACF,OAAO,SAAS,CAAC,MAAM,IAAA,eAAI,EAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAA;KAC5C;IAAC,OAAO,CAAC,EAAE;QACV,MAAM,EAAE,GAAG,CAA0B,CAAA;QACrC,IAAI,YAAY,IAAI,EAAE,CAAC,IAAI,KAAK,QAAQ;YAAE,OAAO,KAAK,CAAA;QACtD,MAAM,EAAE,CAAA;KACT;AACH,CAAC,CAAA;AAZY,QAAA,KAAK,SAYjB;AAED;;;GAGG;AACI,MAAM,IAAI,GAAG,CAClB,IAAY,EACZ,UAAwB,EAAE,EACjB,EAAE;IACX,MAAM,EAAE,YAAY,GAAG,KAAK,EAAE,GAAG,OAAO,CAAA;IACxC,IAAI;QACF,OAAO,SAAS,CAAC,IAAA,aAAQ,EAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAA;K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G,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;IAC5B,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,CAAA;IAEhB,OAAO,CAAC,CAAC,CACP,GAAG,GAAG,CAAC;QACP,CAAC,GAAG,GAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAC5B,CAAC,GAAG,GAAG,CAAC,IAAI,GAAG,KAAK,KAAK,CAAC;QAC1B,CAAC,GAAG,GAAG,EAAE,IAAI,KAAK,KAAK,CAAC,CAAC,CAC1B,CAAA;AACH,CAAC,CAAA","sourcesContent":["/**\n * This is the Posix implementation of isexe, which uses the file\n * mode and uid/gid values.\n *\n * @module\n */\n\nimport { Stats, statSync } from 'fs'\nimport { stat } from 'fs/promises'\nimport { IsexeOptions } from './options'\n\n/**\n * Determine whether a path is executable according to the mode and\n * current (or specified) user and group IDs.\n */\nexport const isexe = async (\n path: string,\n options: IsexeOptions = {}\n): Promise => {\n const { ignoreErrors = false } = options\n try {\n return checkStat(await stat(path), options)\n } catch (e) {\n const er = e as NodeJS.ErrnoException\n if (ignoreErrors || er.code === 'EACCES') return false\n throw er\n }\n}\n\n/**\n * Synchronously determine whether a path is executable according to\n * the mode and current (or specified) user and group IDs.\n */\nexport const sync = (\n path: string,\n options: IsexeOptions = {}\n): boolean => {\n const { ignoreErrors = false } = options\n try {\n return checkStat(statSync(path), options)\n } catch (e) {\n const er = e as NodeJS.ErrnoException\n if (ignoreErrors || er.code === 'EACCES') return false\n throw er\n }\n}\n\nconst checkStat = (stat: Stats, options: IsexeOptions) =>\n stat.isFile() && checkMode(stat, options)\n\nconst checkMode = (stat: Stats, options: IsexeOptions) => {\n const myUid = options.uid ?? process.getuid?.()\n const myGroups = options.groups ?? process.getgroups?.() ?? []\n const myGid = options.gid ?? process.getgid?.() ?? myGroups[0]\n if (myUid === undefined || myGid === undefined) {\n throw new Error('cannot get uid or gid')\n }\n\n const groups = new Set([myGid, ...myGroups])\n\n const mod = stat.mode\n const uid = stat.uid\n const gid = stat.gid\n\n const u = parseInt('100', 8)\n const g = parseInt('010', 8)\n const o = parseInt('001', 8)\n const ug = u | g\n\n return !!(\n mod & o ||\n (mod & g && groups.has(gid)) ||\n (mod & u && uid === myUid) ||\n (mod & ug && myUid === 0)\n )\n}\n"]} \ No newline at end of file diff --git a/action/node_modules/isexe/dist/cjs/win32.d.ts b/action/node_modules/isexe/dist/cjs/win32.d.ts new file mode 100644 index 00000000..e3eeab8d --- /dev/null +++ b/action/node_modules/isexe/dist/cjs/win32.d.ts @@ -0,0 +1,18 @@ +/** + * This is the Windows implementation of isexe, which uses the file + * extension and PATHEXT setting. + * + * @module + */ +import { IsexeOptions } from './options'; +/** + * Determine whether a path is executable based on the file extension + * and PATHEXT environment variable (or specified pathExt option) + */ +export declare const isexe: (path: string, options?: IsexeOptions) => Promise; +/** + * Synchronously determine whether a path is executable based on the file + * extension and PATHEXT environment variable (or specified pathExt option) + */ +export declare const sync: (path: string, options?: IsexeOptions) => boolean; +//# sourceMappingURL=win32.d.ts.map \ No newline at end of file diff --git a/action/node_modules/isexe/dist/cjs/win32.d.ts.map b/action/node_modules/isexe/dist/cjs/win32.d.ts.map new file mode 100644 index 00000000..417cb70e --- /dev/null +++ b/action/node_modules/isexe/dist/cjs/win32.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"win32.d.ts","sourceRoot":"","sources":["../../src/win32.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC;;;GAGG;AACH,eAAO,MAAM,KAAK,SACV,MAAM,YACH,YAAY,KACpB,QAAQ,OAAO,CASjB,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,IAAI,SACT,MAAM,YACH,YAAY,KACpB,OASF,CAAA"} \ No newline at end of file diff --git a/action/node_modules/isexe/dist/cjs/win32.js b/action/node_modules/isexe/dist/cjs/win32.js new file mode 100644 index 00000000..fa7a4d2f --- /dev/null +++ b/action/node_modules/isexe/dist/cjs/win32.js @@ -0,0 +1,62 @@ +"use strict"; +/** + * This is the Windows implementation of isexe, which uses the file + * extension and PATHEXT setting. + * + * @module + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.sync = exports.isexe = void 0; +const fs_1 = require("fs"); +const promises_1 = require("fs/promises"); +/** + * Determine whether a path is executable based on the file extension + * and PATHEXT environment variable (or specified pathExt option) + */ +const isexe = async (path, options = {}) => { + const { ignoreErrors = false } = options; + try { + return checkStat(await (0, promises_1.stat)(path), path, options); + } + catch (e) { + const er = e; + if (ignoreErrors || er.code === 'EACCES') + return false; + throw er; + } +}; +exports.isexe = isexe; +/** + * Synchronously determine whether a path is executable based on the file + * extension and PATHEXT environment variable (or specified pathExt option) + */ +const sync = (path, options = {}) => { + const { ignoreErrors = false } = options; + try { + return checkStat((0, fs_1.statSync)(path), path, options); + } + catch (e) { + const er = e; + if (ignoreErrors || er.code === 'EACCES') + return false; + throw er; + } +}; +exports.sync = sync; +const checkPathExt = (path, options) => { + const { pathExt = process.env.PATHEXT || '' } = options; + const peSplit = pathExt.split(';'); + if (peSplit.indexOf('') !== -1) { + return true; + } + for (let i = 0; i < peSplit.length; i++) { + const p = peSplit[i].toLowerCase(); + const ext = path.substring(path.length - p.length).toLowerCase(); + if (p && ext === p) { + return true; + } + } + return false; +}; +const checkStat = (stat, path, options) => stat.isFile() && checkPathExt(path, options); +//# sourceMappingURL=win32.js.map \ No newline at end of file diff --git a/action/node_modules/isexe/dist/cjs/win32.js.map b/action/node_modules/isexe/dist/cjs/win32.js.map new file mode 100644 index 00000000..13dc77d5 --- /dev/null +++ b/action/node_modules/isexe/dist/cjs/win32.js.map @@ -0,0 +1 @@ +{"version":3,"file":"win32.js","sourceRoot":"","sources":["../../src/win32.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,2BAAoC;AACpC,0CAAkC;AAGlC;;;GAGG;AACI,MAAM,KAAK,GAAG,KAAK,EACxB,IAAY,EACZ,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,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACvC,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAA;QAClC,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAA;QAEhE,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,EAAE;YAClB,OAAO,IAAI,CAAA;SACZ;KACF;IACD,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,CAAC,IAAW,EAAE,IAAY,EAAE,OAAqB,EAAE,EAAE,CACrE,IAAI,CAAC,MAAM,EAAE,IAAI,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA","sourcesContent":["/**\n * This is the Windows implementation of isexe, which uses the file\n * extension and PATHEXT setting.\n *\n * @module\n */\n\nimport { Stats, statSync } from 'fs'\nimport { stat } from 'fs/promises'\nimport { IsexeOptions } from './options'\n\n/**\n * Determine whether a path is executable based on the file extension\n * and PATHEXT environment variable (or specified pathExt option)\n */\nexport const isexe = async (\n path: string,\n options: IsexeOptions = {}\n): Promise => {\n const { ignoreErrors = false } = options\n try {\n return checkStat(await stat(path), path, options)\n } catch (e) {\n const er = e as NodeJS.ErrnoException\n if (ignoreErrors || er.code === 'EACCES') return false\n throw er\n }\n}\n\n/**\n * Synchronously determine whether a path is executable based on the file\n * extension and PATHEXT environment variable (or specified pathExt option)\n */\nexport const sync = (\n path: string,\n options: IsexeOptions = {}\n): boolean => {\n const { ignoreErrors = false } = options\n try {\n return checkStat(statSync(path), path, options)\n } catch (e) {\n const er = e as NodeJS.ErrnoException\n if (ignoreErrors || er.code === 'EACCES') return false\n throw er\n }\n}\n\nconst checkPathExt = (path: string, options: IsexeOptions) => {\n const { pathExt = process.env.PATHEXT || '' } = options\n const peSplit = pathExt.split(';')\n if (peSplit.indexOf('') !== -1) {\n return true\n }\n\n for (let i = 0; i < peSplit.length; i++) {\n const p = peSplit[i].toLowerCase()\n const ext = path.substring(path.length - p.length).toLowerCase()\n\n if (p && ext === p) {\n return true\n }\n }\n return false\n}\n\nconst checkStat = (stat: Stats, path: string, options: IsexeOptions) =>\n stat.isFile() && checkPathExt(path, options)\n"]} \ No newline at end of file diff --git a/action/node_modules/isexe/dist/mjs/index.d.ts b/action/node_modules/isexe/dist/mjs/index.d.ts new file mode 100644 index 00000000..223bf781 --- /dev/null +++ b/action/node_modules/isexe/dist/mjs/index.d.ts @@ -0,0 +1,14 @@ +import * as posix from './posix.js'; +import * as win32 from './win32.js'; +export * from './options.js'; +export { win32, posix }; +/** + * Determine whether a path is executable on the current platform. + */ +export declare const isexe: (path: string, options?: import("./options.js").IsexeOptions) => Promise; +/** + * Synchronously determine whether a path is executable on the + * current platform. + */ +export declare const sync: (path: string, options?: import("./options.js").IsexeOptions) => boolean; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/action/node_modules/isexe/dist/mjs/index.d.ts.map b/action/node_modules/isexe/dist/mjs/index.d.ts.map new file mode 100644 index 00000000..c90348ea --- /dev/null +++ b/action/node_modules/isexe/dist/mjs/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;AAKvB;;GAEG;AACH,eAAO,MAAM,KAAK,mFAAa,CAAA;AAC/B;;;GAGG;AACH,eAAO,MAAM,IAAI,0EAAY,CAAA"} \ No newline at end of file diff --git a/action/node_modules/isexe/dist/mjs/index.js b/action/node_modules/isexe/dist/mjs/index.js new file mode 100644 index 00000000..1e309acd --- /dev/null +++ b/action/node_modules/isexe/dist/mjs/index.js @@ -0,0 +1,16 @@ +import * as posix from './posix.js'; +import * as win32 from './win32.js'; +export * from './options.js'; +export { win32, posix }; +const platform = process.env._ISEXE_TEST_PLATFORM_ || process.platform; +const impl = platform === 'win32' ? win32 : posix; +/** + * Determine whether a path is executable on the current platform. + */ +export const isexe = impl.isexe; +/** + * Synchronously determine whether a path is executable on the + * current platform. + */ +export const sync = impl.sync; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/action/node_modules/isexe/dist/mjs/index.js.map b/action/node_modules/isexe/dist/mjs/index.js.map new file mode 100644 index 00000000..9b9dfe76 --- /dev/null +++ b/action/node_modules/isexe/dist/mjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;AAEvB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,OAAO,CAAC,QAAQ,CAAA;AACtE,MAAM,IAAI,GAAG,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAA;AAEjD;;GAEG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;AAC/B;;;GAGG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA","sourcesContent":["import * as posix from './posix.js'\nimport * as win32 from './win32.js'\nexport * from './options.js'\nexport { win32, posix }\n\nconst platform = process.env._ISEXE_TEST_PLATFORM_ || process.platform\nconst impl = platform === 'win32' ? win32 : posix\n\n/**\n * Determine whether a path is executable on the current platform.\n */\nexport const isexe = impl.isexe\n/**\n * Synchronously determine whether a path is executable on the\n * current platform.\n */\nexport const sync = impl.sync\n"]} \ No newline at end of file diff --git a/action/node_modules/isexe/dist/mjs/options.d.ts b/action/node_modules/isexe/dist/mjs/options.d.ts new file mode 100644 index 00000000..c30a29b3 --- /dev/null +++ b/action/node_modules/isexe/dist/mjs/options.d.ts @@ -0,0 +1,32 @@ +export interface IsexeOptions { + /** + * Ignore errors arising from attempting to get file access status + * Note that EACCES is always ignored, because that just means + * it's not executable. If this is not set, then attempting to check + * the executable-ness of a nonexistent file will raise ENOENT, for + * example. + */ + ignoreErrors?: boolean; + /** + * effective uid when checking executable mode flags on posix + * Defaults to process.getuid() + */ + uid?: number; + /** + * effective gid when checking executable mode flags on posix + * Defaults to process.getgid() + */ + gid?: number; + /** + * effective group ID list to use when checking executable mode flags + * on posix + * Defaults to process.getgroups() + */ + groups?: number[]; + /** + * The ;-delimited path extension list for win32 implementation. + * Defaults to process.env.PATHEXT + */ + pathExt?: string; +} +//# sourceMappingURL=options.d.ts.map \ No newline at end of file diff --git a/action/node_modules/isexe/dist/mjs/options.d.ts.map b/action/node_modules/isexe/dist/mjs/options.d.ts.map new file mode 100644 index 00000000..952afdb4 --- /dev/null +++ b/action/node_modules/isexe/dist/mjs/options.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/options.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IAEtB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IAEjB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB"} \ No newline at end of file diff --git a/action/node_modules/isexe/dist/mjs/options.js b/action/node_modules/isexe/dist/mjs/options.js new file mode 100644 index 00000000..e9ded40b --- /dev/null +++ b/action/node_modules/isexe/dist/mjs/options.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=options.js.map \ No newline at end of file diff --git a/action/node_modules/isexe/dist/mjs/options.js.map b/action/node_modules/isexe/dist/mjs/options.js.map new file mode 100644 index 00000000..27bbeacc --- /dev/null +++ b/action/node_modules/isexe/dist/mjs/options.js.map @@ -0,0 +1 @@ +{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/options.ts"],"names":[],"mappings":"","sourcesContent":["export interface IsexeOptions {\n /**\n * Ignore errors arising from attempting to get file access status\n * Note that EACCES is always ignored, because that just means\n * it's not executable. If this is not set, then attempting to check\n * the executable-ness of a nonexistent file will raise ENOENT, for\n * example.\n */\n ignoreErrors?: boolean\n\n /**\n * effective uid when checking executable mode flags on posix\n * Defaults to process.getuid()\n */\n uid?: number\n\n /**\n * effective gid when checking executable mode flags on posix\n * Defaults to process.getgid()\n */\n gid?: number\n\n /**\n * effective group ID list to use when checking executable mode flags\n * on posix\n * Defaults to process.getgroups()\n */\n groups?: number[]\n\n /**\n * The ;-delimited path extension list for win32 implementation.\n * Defaults to process.env.PATHEXT\n */\n pathExt?: string\n}\n"]} \ No newline at end of file diff --git a/action/node_modules/isexe/dist/mjs/package.json b/action/node_modules/isexe/dist/mjs/package.json new file mode 100644 index 00000000..3dbc1ca5 --- /dev/null +++ b/action/node_modules/isexe/dist/mjs/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/action/node_modules/isexe/dist/mjs/posix.d.ts b/action/node_modules/isexe/dist/mjs/posix.d.ts new file mode 100644 index 00000000..b792ee6a --- /dev/null +++ b/action/node_modules/isexe/dist/mjs/posix.d.ts @@ -0,0 +1,18 @@ +/** + * This is the Posix implementation of isexe, which uses the file + * mode and uid/gid values. + * + * @module + */ +import { IsexeOptions } from './options'; +/** + * Determine whether a path is executable according to the mode and + * current (or specified) user and group IDs. + */ +export declare const isexe: (path: string, options?: IsexeOptions) => Promise; +/** + * Synchronously determine whether a path is executable according to + * the mode and current (or specified) user and group IDs. + */ +export declare const sync: (path: string, options?: IsexeOptions) => boolean; +//# sourceMappingURL=posix.d.ts.map \ No newline at end of file diff --git a/action/node_modules/isexe/dist/mjs/posix.d.ts.map b/action/node_modules/isexe/dist/mjs/posix.d.ts.map new file mode 100644 index 00000000..54df8faa --- /dev/null +++ b/action/node_modules/isexe/dist/mjs/posix.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"posix.d.ts","sourceRoot":"","sources":["../../src/posix.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC;;;GAGG;AACH,eAAO,MAAM,KAAK,SACV,MAAM,YACH,YAAY,KACpB,QAAQ,OAAO,CASjB,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,IAAI,SACT,MAAM,YACH,YAAY,KACpB,OASF,CAAA"} \ No newline at end of file diff --git a/action/node_modules/isexe/dist/mjs/posix.js b/action/node_modules/isexe/dist/mjs/posix.js new file mode 100644 index 00000000..c453776c --- /dev/null +++ b/action/node_modules/isexe/dist/mjs/posix.js @@ -0,0 +1,62 @@ +/** + * This is the Posix implementation of isexe, which uses the file + * mode and uid/gid values. + * + * @module + */ +import { statSync } from 'fs'; +import { stat } from 'fs/promises'; +/** + * Determine whether a path is executable according to the mode and + * current (or specified) user and group IDs. + */ +export const isexe = async (path, options = {}) => { + const { ignoreErrors = false } = options; + try { + return checkStat(await stat(path), options); + } + catch (e) { + const er = e; + if (ignoreErrors || er.code === 'EACCES') + return false; + throw er; + } +}; +/** + * Synchronously determine whether a path is executable according to + * the mode and current (or specified) user and group IDs. + */ +export const sync = (path, options = {}) => { + const { ignoreErrors = false } = options; + try { + return checkStat(statSync(path), options); + } + catch (e) { + const er = e; + if (ignoreErrors || er.code === 'EACCES') + return false; + throw er; + } +}; +const checkStat = (stat, options) => stat.isFile() && checkMode(stat, options); +const checkMode = (stat, options) => { + const myUid = options.uid ?? process.getuid?.(); + const myGroups = options.groups ?? process.getgroups?.() ?? []; + const myGid = options.gid ?? process.getgid?.() ?? myGroups[0]; + if (myUid === undefined || myGid === undefined) { + throw new Error('cannot get uid or gid'); + } + const groups = new Set([myGid, ...myGroups]); + const mod = stat.mode; + const uid = stat.uid; + const gid = stat.gid; + const u = parseInt('100', 8); + const g = parseInt('010', 8); + const o = parseInt('001', 8); + const ug = u | g; + return !!(mod & o || + (mod & g && groups.has(gid)) || + (mod & u && uid === myUid) || + (mod & ug && myUid === 0)); +}; +//# sourceMappingURL=posix.js.map \ No newline at end of file diff --git a/action/node_modules/isexe/dist/mjs/posix.js.map b/action/node_modules/isexe/dist/mjs/posix.js.map new file mode 100644 index 00000000..6e9c2f58 --- /dev/null +++ b/action/node_modules/isexe/dist/mjs/posix.js.map @@ -0,0 +1 @@ +{"version":3,"file":"posix.js","sourceRoot":"","sources":["../../src/posix.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAS,QAAQ,EAAE,MAAM,IAAI,CAAA;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAGlC;;;GAGG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,EACxB,IAAY,EACZ,UAAwB,EAAE,EACR,EAAE;IACpB,MAAM,EAAE,YAAY,GAAG,KAAK,EAAE,GAAG,OAAO,CAAA;IACxC,IAAI;QACF,OAAO,SAAS,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAA;KAC5C;IAAC,OAAO,CAAC,EAAE;QACV,MAAM,EAAE,GAAG,CAA0B,CAAA;QACrC,IAAI,YAAY,IAAI,EAAE,CAAC,IAAI,KAAK,QAAQ;YAAE,OAAO,KAAK,CAAA;QACtD,MAAM,EAAE,CAAA;KACT;AACH,CAAC,CAAA;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAClB,IAAY,EACZ,UAAwB,EAAE,EACjB,EAAE;IACX,MAAM,EAAE,YAAY,GAAG,KAAK,EAAE,GAAG,OAAO,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QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;IAC5B,MAAM,CAAC,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;IAC5B,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,CAAA;IAEhB,OAAO,CAAC,CAAC,CACP,GAAG,GAAG,CAAC;QACP,CAAC,GAAG,GAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAC5B,CAAC,GAAG,GAAG,CAAC,IAAI,GAAG,KAAK,KAAK,CAAC;QAC1B,CAAC,GAAG,GAAG,EAAE,IAAI,KAAK,KAAK,CAAC,CAAC,CAC1B,CAAA;AACH,CAAC,CAAA","sourcesContent":["/**\n * This is the Posix implementation of isexe, which uses the file\n * mode and uid/gid values.\n *\n * @module\n */\n\nimport { Stats, statSync } from 'fs'\nimport { stat } from 'fs/promises'\nimport { IsexeOptions } from './options'\n\n/**\n * Determine whether a path is executable according to the mode and\n * current (or specified) user and group IDs.\n */\nexport const isexe = async (\n path: string,\n options: IsexeOptions = {}\n): Promise => {\n const { ignoreErrors = false } = options\n try {\n return checkStat(await stat(path), options)\n } catch (e) {\n const er = e as NodeJS.ErrnoException\n if (ignoreErrors || er.code === 'EACCES') return false\n throw er\n }\n}\n\n/**\n * Synchronously determine whether a path is executable according to\n * the mode and current (or specified) user and group IDs.\n */\nexport const sync = (\n path: string,\n options: IsexeOptions = {}\n): boolean => {\n const { ignoreErrors = false } = options\n try {\n return checkStat(statSync(path), options)\n } catch (e) {\n const er = e as NodeJS.ErrnoException\n if (ignoreErrors || er.code === 'EACCES') return false\n throw er\n }\n}\n\nconst checkStat = (stat: Stats, options: IsexeOptions) =>\n stat.isFile() && checkMode(stat, options)\n\nconst checkMode = (stat: Stats, options: IsexeOptions) => {\n const myUid = options.uid ?? process.getuid?.()\n const myGroups = options.groups ?? process.getgroups?.() ?? []\n const myGid = options.gid ?? process.getgid?.() ?? myGroups[0]\n if (myUid === undefined || myGid === undefined) {\n throw new Error('cannot get uid or gid')\n }\n\n const groups = new Set([myGid, ...myGroups])\n\n const mod = stat.mode\n const uid = stat.uid\n const gid = stat.gid\n\n const u = parseInt('100', 8)\n const g = parseInt('010', 8)\n const o = parseInt('001', 8)\n const ug = u | g\n\n return !!(\n mod & o ||\n (mod & g && groups.has(gid)) ||\n (mod & u && uid === myUid) ||\n (mod & ug && myUid === 0)\n )\n}\n"]} \ No newline at end of file diff --git a/action/node_modules/isexe/dist/mjs/win32.d.ts b/action/node_modules/isexe/dist/mjs/win32.d.ts new file mode 100644 index 00000000..e3eeab8d --- /dev/null +++ b/action/node_modules/isexe/dist/mjs/win32.d.ts @@ -0,0 +1,18 @@ +/** + * This is the Windows implementation of isexe, which uses the file + * extension and PATHEXT setting. + * + * @module + */ +import { IsexeOptions } from './options'; +/** + * Determine whether a path is executable based on the file extension + * and PATHEXT environment variable (or specified pathExt option) + */ +export declare const isexe: (path: string, options?: IsexeOptions) => Promise; +/** + * Synchronously determine whether a path is executable based on the file + * extension and PATHEXT environment variable (or specified pathExt option) + */ +export declare const sync: (path: string, options?: IsexeOptions) => boolean; +//# sourceMappingURL=win32.d.ts.map \ No newline at end of file diff --git a/action/node_modules/isexe/dist/mjs/win32.d.ts.map b/action/node_modules/isexe/dist/mjs/win32.d.ts.map new file mode 100644 index 00000000..417cb70e --- /dev/null +++ b/action/node_modules/isexe/dist/mjs/win32.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"win32.d.ts","sourceRoot":"","sources":["../../src/win32.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC;;;GAGG;AACH,eAAO,MAAM,KAAK,SACV,MAAM,YACH,YAAY,KACpB,QAAQ,OAAO,CASjB,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,IAAI,SACT,MAAM,YACH,YAAY,KACpB,OASF,CAAA"} \ No newline at end of file diff --git a/action/node_modules/isexe/dist/mjs/win32.js b/action/node_modules/isexe/dist/mjs/win32.js new file mode 100644 index 00000000..a354ee2a --- /dev/null +++ b/action/node_modules/isexe/dist/mjs/win32.js @@ -0,0 +1,57 @@ +/** + * This is the Windows implementation of isexe, which uses the file + * extension and PATHEXT setting. + * + * @module + */ +import { statSync } from 'fs'; +import { stat } from 'fs/promises'; +/** + * Determine whether a path is executable based on the file extension + * and PATHEXT environment variable (or specified pathExt option) + */ +export const isexe = async (path, options = {}) => { + const { ignoreErrors = false } = options; + try { + return checkStat(await stat(path), path, options); + } + catch (e) { + const er = e; + if (ignoreErrors || er.code === 'EACCES') + return false; + throw er; + } +}; +/** + * Synchronously determine whether a path is executable based on the file + * extension and PATHEXT environment variable (or specified pathExt option) + */ +export const sync = (path, options = {}) => { + const { ignoreErrors = false } = options; + try { + return checkStat(statSync(path), path, options); + } + catch (e) { + const er = e; + if (ignoreErrors || er.code === 'EACCES') + return false; + throw er; + } +}; +const checkPathExt = (path, options) => { + const { pathExt = process.env.PATHEXT || '' } = options; + const peSplit = pathExt.split(';'); + if (peSplit.indexOf('') !== -1) { + return true; + } + for (let i = 0; i < peSplit.length; i++) { + const p = peSplit[i].toLowerCase(); + const ext = path.substring(path.length - p.length).toLowerCase(); + if (p && ext === p) { + return true; + } + } + return false; +}; +const checkStat = (stat, path, options) => stat.isFile() && checkPathExt(path, options); +//# sourceMappingURL=win32.js.map \ No newline at end of file diff --git a/action/node_modules/isexe/dist/mjs/win32.js.map b/action/node_modules/isexe/dist/mjs/win32.js.map new file mode 100644 index 00000000..91d82b8d --- /dev/null +++ b/action/node_modules/isexe/dist/mjs/win32.js.map @@ -0,0 +1 @@ +{"version":3,"file":"win32.js","sourceRoot":"","sources":["../../src/win32.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAS,QAAQ,EAAE,MAAM,IAAI,CAAA;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAGlC;;;GAGG;AACH,MAAM,CAAC,MAAM,K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AO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACvC,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAA;QAClC,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAA;QAEhE,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,EAAE;YAClB,OAAO,IAAI,CAAA;SACZ;KACF;IACD,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,CAAC,IAAW,EAAE,IAAY,EAAE,OAAqB,EAAE,EAAE,CACrE,IAAI,CAAC,MAAM,EAAE,IAAI,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA","sourcesContent":["/**\n * This is the Windows implementation of isexe, which uses the file\n * extension and PATHEXT setting.\n *\n * @module\n */\n\nimport { Stats, statSync } from 'fs'\nimport { stat } from 'fs/promises'\nimport { IsexeOptions } from './options'\n\n/**\n * Determine whether a path is executable based on the file extension\n * and PATHEXT environment variable (or specified pathExt option)\n */\nexport const isexe = async (\n path: string,\n options: IsexeOptions = {}\n): Promise => {\n const { ignoreErrors = false } = options\n try {\n return checkStat(await stat(path), path, options)\n } catch (e) {\n const er = e as NodeJS.ErrnoException\n if (ignoreErrors || er.code === 'EACCES') return false\n throw er\n }\n}\n\n/**\n * Synchronously determine whether a path is executable based on the file\n * extension and PATHEXT environment variable (or specified pathExt option)\n */\nexport const sync = (\n path: string,\n options: IsexeOptions = {}\n): boolean => {\n const { ignoreErrors = false } = options\n try {\n return checkStat(statSync(path), path, options)\n } catch (e) {\n const er = e as NodeJS.ErrnoException\n if (ignoreErrors || er.code === 'EACCES') return false\n throw er\n }\n}\n\nconst checkPathExt = (path: string, options: IsexeOptions) => {\n const { pathExt = process.env.PATHEXT || '' } = options\n const peSplit = pathExt.split(';')\n if (peSplit.indexOf('') !== -1) {\n return true\n }\n\n for (let i = 0; i < peSplit.length; i++) {\n const p = peSplit[i].toLowerCase()\n const ext = path.substring(path.length - p.length).toLowerCase()\n\n if (p && ext === p) {\n return true\n }\n }\n return false\n}\n\nconst checkStat = (stat: Stats, path: string, options: IsexeOptions) =>\n stat.isFile() && checkPathExt(path, options)\n"]} \ No newline at end of file diff --git a/action/node_modules/isexe/index.js b/action/node_modules/isexe/index.js deleted file mode 100644 index 553fb32b..00000000 --- a/action/node_modules/isexe/index.js +++ /dev/null @@ -1,57 +0,0 @@ -var fs = require('fs') -var core -if (process.platform === 'win32' || global.TESTING_WINDOWS) { - core = require('./windows.js') -} else { - core = require('./mode.js') -} - -module.exports = isexe -isexe.sync = sync - -function isexe (path, options, cb) { - if (typeof options === 'function') { - cb = options - options = {} - } - - if (!cb) { - if (typeof Promise !== 'function') { - throw new TypeError('callback not provided') - } - - return new Promise(function (resolve, reject) { - isexe(path, options || {}, function (er, is) { - if (er) { - reject(er) - } else { - resolve(is) - } - }) - }) - } - - core(path, options || {}, function (er, is) { - // ignore EACCES because that just means we aren't allowed to run it - if (er) { - if (er.code === 'EACCES' || options && options.ignoreErrors) { - er = null - is = false - } - } - cb(er, is) - }) -} - -function sync (path, options) { - // my kingdom for a filtered catch - try { - return core.sync(path, options || {}) - } catch (er) { - if (options && options.ignoreErrors || er.code === 'EACCES') { - return false - } else { - throw er - } - } -} diff --git a/action/node_modules/isexe/mode.js b/action/node_modules/isexe/mode.js deleted file mode 100644 index 1995ea4a..00000000 --- a/action/node_modules/isexe/mode.js +++ /dev/null @@ -1,41 +0,0 @@ -module.exports = isexe -isexe.sync = sync - -var fs = require('fs') - -function isexe (path, options, cb) { - fs.stat(path, function (er, stat) { - cb(er, er ? false : checkStat(stat, options)) - }) -} - -function sync (path, options) { - return checkStat(fs.statSync(path), options) -} - -function checkStat (stat, options) { - return stat.isFile() && checkMode(stat, options) -} - -function checkMode (stat, options) { - var mod = stat.mode - var uid = stat.uid - var gid = stat.gid - - var myUid = options.uid !== undefined ? - options.uid : process.getuid && process.getuid() - var myGid = options.gid !== undefined ? - options.gid : process.getgid && process.getgid() - - var u = parseInt('100', 8) - var g = parseInt('010', 8) - var o = parseInt('001', 8) - var ug = u | g - - var ret = (mod & o) || - (mod & g) && gid === myGid || - (mod & u) && uid === myUid || - (mod & ug) && myUid === 0 - - return ret -} diff --git a/action/node_modules/isexe/package.json b/action/node_modules/isexe/package.json index e4526894..a0e2cd04 100644 --- a/action/node_modules/isexe/package.json +++ b/action/node_modules/isexe/package.json @@ -1,31 +1,96 @@ { "name": "isexe", - "version": "2.0.0", + "version": "3.1.1", "description": "Minimal module to check if a file is executable.", - "main": "index.js", - "directories": { - "test": "test" + "main": "./dist/cjs/index.js", + "module": "./dist/mjs/index.js", + "types": "./dist/cjs/index.js", + "files": [ + "dist" + ], + "exports": { + ".": { + "import": { + "types": "./dist/mjs/index.d.ts", + "default": "./dist/mjs/index.js" + }, + "require": { + "types": "./dist/cjs/index.d.ts", + "default": "./dist/cjs/index.js" + } + }, + "./posix": { + "import": { + "types": "./dist/mjs/posix.d.ts", + "default": "./dist/mjs/posix.js" + }, + "require": { + "types": "./dist/cjs/posix.d.ts", + "default": "./dist/cjs/posix.js" + } + }, + "./win32": { + "import": { + "types": "./dist/mjs/win32.d.ts", + "default": "./dist/mjs/win32.js" + }, + "require": { + "types": "./dist/cjs/win32.d.ts", + "default": "./dist/cjs/win32.js" + } + }, + "./package.json": "./package.json" }, "devDependencies": { + "@types/node": "^20.4.5", + "@types/tap": "^15.0.8", + "c8": "^8.0.1", "mkdirp": "^0.5.1", + "prettier": "^2.8.8", "rimraf": "^2.5.0", - "tap": "^10.3.0" + "sync-content": "^1.0.2", + "tap": "^16.3.8", + "ts-node": "^10.9.1", + "typedoc": "^0.24.8", + "typescript": "^5.1.6" }, "scripts": { - "test": "tap test/*.js --100", "preversion": "npm test", "postversion": "npm publish", - "postpublish": "git push origin --all; git push origin --tags" + "prepublishOnly": "git push origin --follow-tags", + "prepare": "tsc -p tsconfig/cjs.json && tsc -p tsconfig/esm.json && bash ./scripts/fixup.sh", + "pretest": "npm run prepare", + "presnap": "npm run prepare", + "test": "c8 tap", + "snap": "c8 tap", + "format": "prettier --write . --loglevel warn --ignore-path ../../.prettierignore --cache", + "typedoc": "typedoc --tsconfig tsconfig/esm.json ./src/*.ts" }, "author": "Isaac Z. Schlueter (http://blog.izs.me/)", "license": "ISC", - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/isexe.git" + "tap": { + "coverage": false, + "node-arg": [ + "--enable-source-maps", + "--no-warnings", + "--loader", + "ts-node/esm" + ], + "ts": false }, - "keywords": [], - "bugs": { - "url": "https://github.com/isaacs/isexe/issues" + "prettier": { + "semi": false, + "printWidth": 75, + "tabWidth": 2, + "useTabs": false, + "singleQuote": true, + "jsxSingleQuote": false, + "bracketSameLine": true, + "arrowParens": "avoid", + "endOfLine": "lf" }, - "homepage": "https://github.com/isaacs/isexe#readme" + "repository": "https://github.com/isaacs/isexe", + "engines": { + "node": ">=16" + } } diff --git a/action/node_modules/isexe/test/basic.js b/action/node_modules/isexe/test/basic.js deleted file mode 100644 index d926df64..00000000 --- a/action/node_modules/isexe/test/basic.js +++ /dev/null @@ -1,221 +0,0 @@ -var t = require('tap') -var fs = require('fs') -var path = require('path') -var fixture = path.resolve(__dirname, 'fixtures') -var meow = fixture + '/meow.cat' -var mine = fixture + '/mine.cat' -var ours = fixture + '/ours.cat' -var fail = fixture + '/fail.false' -var noent = fixture + '/enoent.exe' -var mkdirp = require('mkdirp') -var rimraf = require('rimraf') - -var isWindows = process.platform === 'win32' -var hasAccess = typeof fs.access === 'function' -var winSkip = isWindows && 'windows' -var accessSkip = !hasAccess && 'no fs.access function' -var hasPromise = typeof Promise === 'function' -var promiseSkip = !hasPromise && 'no global Promise' - -function reset () { - delete require.cache[require.resolve('../')] - return require('../') -} - -t.test('setup fixtures', function (t) { - rimraf.sync(fixture) - mkdirp.sync(fixture) - fs.writeFileSync(meow, '#!/usr/bin/env cat\nmeow\n') - fs.chmodSync(meow, parseInt('0755', 8)) - fs.writeFileSync(fail, '#!/usr/bin/env false\n') - fs.chmodSync(fail, parseInt('0644', 8)) - fs.writeFileSync(mine, '#!/usr/bin/env cat\nmine\n') - fs.chmodSync(mine, parseInt('0744', 8)) - fs.writeFileSync(ours, '#!/usr/bin/env cat\nours\n') - fs.chmodSync(ours, parseInt('0754', 8)) - t.end() -}) - -t.test('promise', { skip: promiseSkip }, function (t) { - var isexe = reset() - t.test('meow async', function (t) { - isexe(meow).then(function (is) { - t.ok(is) - t.end() - }) - }) - t.test('fail async', function (t) { - isexe(fail).then(function (is) { - t.notOk(is) - t.end() - }) - }) - t.test('noent async', function (t) { - isexe(noent).catch(function (er) { - t.ok(er) - t.end() - }) - }) - t.test('noent ignore async', function (t) { - isexe(noent, { ignoreErrors: true }).then(function (is) { - t.notOk(is) - t.end() - }) - }) - t.end() -}) - -t.test('no promise', function (t) { - global.Promise = null - var isexe = reset() - t.throws('try to meow a promise', function () { - isexe(meow) - }) - t.end() -}) - -t.test('access', { skip: accessSkip || winSkip }, function (t) { - runTest(t) -}) - -t.test('mode', { skip: winSkip }, function (t) { - delete fs.access - delete fs.accessSync - var isexe = reset() - t.ok(isexe.sync(ours, { uid: 0, gid: 0 })) - t.ok(isexe.sync(mine, { uid: 0, gid: 0 })) - runTest(t) -}) - -t.test('windows', function (t) { - global.TESTING_WINDOWS = true - var pathExt = '.EXE;.CAT;.CMD;.COM' - t.test('pathExt option', function (t) { - runTest(t, { pathExt: '.EXE;.CAT;.CMD;.COM' }) - }) - t.test('pathExt env', function (t) { - process.env.PATHEXT = pathExt - runTest(t) - }) - t.test('no pathExt', function (t) { - // with a pathExt of '', any filename is fine. - // so the "fail" one would still pass. - runTest(t, { pathExt: '', skipFail: true }) - }) - t.test('pathext with empty entry', function (t) { - // with a pathExt of '', any filename is fine. - // so the "fail" one would still pass. - runTest(t, { pathExt: ';' + pathExt, skipFail: true }) - }) - t.end() -}) - -t.test('cleanup', function (t) { - rimraf.sync(fixture) - t.end() -}) - -function runTest (t, options) { - var isexe = reset() - - var optionsIgnore = Object.create(options || {}) - optionsIgnore.ignoreErrors = true - - if (!options || !options.skipFail) { - t.notOk(isexe.sync(fail, options)) - } - t.notOk(isexe.sync(noent, optionsIgnore)) - if (!options) { - t.ok(isexe.sync(meow)) - } else { - t.ok(isexe.sync(meow, options)) - } - - t.ok(isexe.sync(mine, options)) - t.ok(isexe.sync(ours, options)) - t.throws(function () { - isexe.sync(noent, options) - }) - - t.test('meow async', function (t) { - if (!options) { - isexe(meow, function (er, is) { - if (er) { - throw er - } - t.ok(is) - t.end() - }) - } else { - isexe(meow, options, function (er, is) { - if (er) { - throw er - } - t.ok(is) - t.end() - }) - } - }) - - t.test('mine async', function (t) { - isexe(mine, options, function (er, is) { - if (er) { - throw er - } - t.ok(is) - t.end() - }) - }) - - t.test('ours async', function (t) { - isexe(ours, options, function (er, is) { - if (er) { - throw er - } - t.ok(is) - t.end() - }) - }) - - if (!options || !options.skipFail) { - t.test('fail async', function (t) { - isexe(fail, options, function (er, is) { - if (er) { - throw er - } - t.notOk(is) - t.end() - }) - }) - } - - t.test('noent async', function (t) { - isexe(noent, options, function (er, is) { - t.ok(er) - t.notOk(is) - t.end() - }) - }) - - t.test('noent ignore async', function (t) { - isexe(noent, optionsIgnore, function (er, is) { - if (er) { - throw er - } - t.notOk(is) - t.end() - }) - }) - - t.test('directory is not executable', function (t) { - isexe(__dirname, options, function (er, is) { - if (er) { - throw er - } - t.notOk(is) - t.end() - }) - }) - - t.end() -} diff --git a/action/node_modules/isexe/windows.js b/action/node_modules/isexe/windows.js deleted file mode 100644 index 34996734..00000000 --- a/action/node_modules/isexe/windows.js +++ /dev/null @@ -1,42 +0,0 @@ -module.exports = isexe -isexe.sync = sync - -var fs = require('fs') - -function checkPathExt (path, options) { - var pathext = options.pathExt !== undefined ? - options.pathExt : process.env.PATHEXT - - if (!pathext) { - return true - } - - pathext = pathext.split(';') - if (pathext.indexOf('') !== -1) { - return true - } - for (var i = 0; i < pathext.length; i++) { - var p = pathext[i].toLowerCase() - if (p && path.substr(-p.length).toLowerCase() === p) { - return true - } - } - return false -} - -function checkStat (stat, path, options) { - if (!stat.isSymbolicLink() && !stat.isFile()) { - return false - } - return checkPathExt(path, options) -} - -function isexe (path, options, cb) { - fs.stat(path, function (er, stat) { - cb(er, er ? false : checkStat(stat, path, options)) - }) -} - -function sync (path, options) { - return checkStat(fs.statSync(path), path, options) -} diff --git a/action/node_modules/streamsearch/.eslintrc.js b/action/node_modules/streamsearch/.eslintrc.js deleted file mode 100644 index be9311d0..00000000 --- a/action/node_modules/streamsearch/.eslintrc.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -module.exports = { - extends: '@mscdex/eslint-config', -}; diff --git a/action/node_modules/streamsearch/.github/workflows/ci.yml b/action/node_modules/streamsearch/.github/workflows/ci.yml deleted file mode 100644 index 29d51782..00000000 --- a/action/node_modules/streamsearch/.github/workflows/ci.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: CI - -on: - pull_request: - push: - branches: [ master ] - -jobs: - tests-linux: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - node-version: [10.x, 12.x, 14.x, 16.x] - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: Install module - run: npm install - - name: Run tests - run: npm test diff --git a/action/node_modules/streamsearch/.github/workflows/lint.yml b/action/node_modules/streamsearch/.github/workflows/lint.yml deleted file mode 100644 index 9f9e1f58..00000000 --- a/action/node_modules/streamsearch/.github/workflows/lint.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: lint - -on: - pull_request: - push: - branches: [ master ] - -env: - NODE_VERSION: 16.x - -jobs: - lint-js: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ env.NODE_VERSION }} - uses: actions/setup-node@v1 - with: - node-version: ${{ env.NODE_VERSION }} - - name: Install ESLint + ESLint configs/plugins - run: npm install --only=dev - - name: Lint files - run: npm run lint diff --git a/action/node_modules/streamsearch/README.md b/action/node_modules/streamsearch/README.md deleted file mode 100644 index c3934d1c..00000000 --- a/action/node_modules/streamsearch/README.md +++ /dev/null @@ -1,95 +0,0 @@ -Description -=========== - -streamsearch is a module for [node.js](http://nodejs.org/) that allows searching a stream using the Boyer-Moore-Horspool algorithm. - -This module is based heavily on the Streaming Boyer-Moore-Horspool C++ implementation by Hongli Lai [here](https://github.com/FooBarWidget/boyer-moore-horspool). - - -Requirements -============ - -* [node.js](http://nodejs.org/) -- v10.0.0 or newer - - -Installation -============ - - npm install streamsearch - -Example -======= - -```js - const { inspect } = require('util'); - - const StreamSearch = require('streamsearch'); - - const needle = Buffer.from('\r\n'); - const ss = new StreamSearch(needle, (isMatch, data, start, end) => { - if (data) - console.log('data: ' + inspect(data.toString('latin1', start, end))); - if (isMatch) - console.log('match!'); - }); - - const chunks = [ - 'foo', - ' bar', - '\r', - '\n', - 'baz, hello\r', - '\n world.', - '\r\n Node.JS rules!!\r\n\r\n', - ]; - for (const chunk of chunks) - ss.push(Buffer.from(chunk)); - - // output: - // - // data: 'foo' - // data: ' bar' - // match! - // data: 'baz, hello' - // match! - // data: ' world.' - // match! - // data: ' Node.JS rules!!' - // match! - // data: '' - // match! -``` - - -API -=== - -Properties ----------- - -* **maxMatches** - < _integer_ > - The maximum number of matches. Defaults to `Infinity`. - -* **matches** - < _integer_ > - The current match count. - - -Functions ---------- - -* **(constructor)**(< _mixed_ >needle, < _function_ >callback) - Creates and returns a new instance for searching for a _Buffer_ or _string_ `needle`. `callback` is called any time there is non-matching data and/or there is a needle match. `callback` will be called with the following arguments: - - 1. `isMatch` - _boolean_ - Indicates whether a match has been found - - 2. `data` - _mixed_ - If set, this contains data that did not match the needle. - - 3. `start` - _integer_ - The index in `data` where the non-matching data begins (inclusive). - - 4. `end` - _integer_ - The index in `data` where the non-matching data ends (exclusive). - - 5. `isSafeData` - _boolean_ - Indicates if it is safe to store a reference to `data` (e.g. as-is or via `data.slice()`) or not, as in some cases `data` may point to a Buffer whose contents change over time. - -* **destroy**() - _(void)_ - Emits any last remaining unmatched data that may still be buffered and then resets internal state. - -* **push**(< _Buffer_ >chunk) - _integer_ - Processes `chunk`, searching for a match. The return value is the last processed index in `chunk` + 1. - -* **reset**() - _(void)_ - Resets internal state. Useful for when you wish to start searching a new/different stream for example. - diff --git a/action/node_modules/streamsearch/lib/sbmh.js b/action/node_modules/streamsearch/lib/sbmh.js deleted file mode 100644 index 510cae26..00000000 --- a/action/node_modules/streamsearch/lib/sbmh.js +++ /dev/null @@ -1,267 +0,0 @@ -'use strict'; -/* - Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation - by Hongli Lai at: https://github.com/FooBarWidget/boyer-moore-horspool -*/ -function memcmp(buf1, pos1, buf2, pos2, num) { - for (let i = 0; i < num; ++i) { - if (buf1[pos1 + i] !== buf2[pos2 + i]) - return false; - } - return true; -} - -class SBMH { - constructor(needle, cb) { - if (typeof cb !== 'function') - throw new Error('Missing match callback'); - - if (typeof needle === 'string') - needle = Buffer.from(needle); - else if (!Buffer.isBuffer(needle)) - throw new Error(`Expected Buffer for needle, got ${typeof needle}`); - - const needleLen = needle.length; - - this.maxMatches = Infinity; - this.matches = 0; - - this._cb = cb; - this._lookbehindSize = 0; - this._needle = needle; - this._bufPos = 0; - - this._lookbehind = Buffer.allocUnsafe(needleLen); - - // Initialize occurrence table. - this._occ = [ - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen - ]; - - // Populate occurrence table with analysis of the needle, ignoring the last - // letter. - if (needleLen > 1) { - for (let i = 0; i < needleLen - 1; ++i) - this._occ[needle[i]] = needleLen - 1 - i; - } - } - - reset() { - this.matches = 0; - this._lookbehindSize = 0; - this._bufPos = 0; - } - - push(chunk, pos) { - let result; - if (!Buffer.isBuffer(chunk)) - chunk = Buffer.from(chunk, 'latin1'); - const chunkLen = chunk.length; - this._bufPos = pos || 0; - while (result !== chunkLen && this.matches < this.maxMatches) - result = feed(this, chunk); - return result; - } - - destroy() { - const lbSize = this._lookbehindSize; - if (lbSize) - this._cb(false, this._lookbehind, 0, lbSize, false); - this.reset(); - } -} - -function feed(self, data) { - const len = data.length; - const needle = self._needle; - const needleLen = needle.length; - - // Positive: points to a position in `data` - // pos == 3 points to data[3] - // Negative: points to a position in the lookbehind buffer - // pos == -2 points to lookbehind[lookbehindSize - 2] - let pos = -self._lookbehindSize; - const lastNeedleCharPos = needleLen - 1; - const lastNeedleChar = needle[lastNeedleCharPos]; - const end = len - needleLen; - const occ = self._occ; - const lookbehind = self._lookbehind; - - if (pos < 0) { - // Lookbehind buffer is not empty. Perform Boyer-Moore-Horspool - // search with character lookup code that considers both the - // lookbehind buffer and the current round's haystack data. - // - // Loop until - // there is a match. - // or until - // we've moved past the position that requires the - // lookbehind buffer. In this case we switch to the - // optimized loop. - // or until - // the character to look at lies outside the haystack. - while (pos < 0 && pos <= end) { - const nextPos = pos + lastNeedleCharPos; - const ch = (nextPos < 0 - ? lookbehind[self._lookbehindSize + nextPos] - : data[nextPos]); - - if (ch === lastNeedleChar - && matchNeedle(self, data, pos, lastNeedleCharPos)) { - self._lookbehindSize = 0; - ++self.matches; - if (pos > -self._lookbehindSize) - self._cb(true, lookbehind, 0, self._lookbehindSize + pos, false); - else - self._cb(true, undefined, 0, 0, true); - - return (self._bufPos = pos + needleLen); - } - - pos += occ[ch]; - } - - // No match. - - // There's too few data for Boyer-Moore-Horspool to run, - // so let's use a different algorithm to skip as much as - // we can. - // Forward pos until - // the trailing part of lookbehind + data - // looks like the beginning of the needle - // or until - // pos == 0 - while (pos < 0 && !matchNeedle(self, data, pos, len - pos)) - ++pos; - - if (pos < 0) { - // Cut off part of the lookbehind buffer that has - // been processed and append the entire haystack - // into it. - const bytesToCutOff = self._lookbehindSize + pos; - - if (bytesToCutOff > 0) { - // The cut off data is guaranteed not to contain the needle. - self._cb(false, lookbehind, 0, bytesToCutOff, false); - } - - self._lookbehindSize -= bytesToCutOff; - lookbehind.copy(lookbehind, 0, bytesToCutOff, self._lookbehindSize); - lookbehind.set(data, self._lookbehindSize); - self._lookbehindSize += len; - - self._bufPos = len; - return len; - } - - // Discard lookbehind buffer. - self._cb(false, lookbehind, 0, self._lookbehindSize, false); - self._lookbehindSize = 0; - } - - pos += self._bufPos; - - const firstNeedleChar = needle[0]; - - // Lookbehind buffer is now empty. Perform Boyer-Moore-Horspool - // search with optimized character lookup code that only considers - // the current round's haystack data. - while (pos <= end) { - const ch = data[pos + lastNeedleCharPos]; - - if (ch === lastNeedleChar - && data[pos] === firstNeedleChar - && memcmp(needle, 0, data, pos, lastNeedleCharPos)) { - ++self.matches; - if (pos > 0) - self._cb(true, data, self._bufPos, pos, true); - else - self._cb(true, undefined, 0, 0, true); - - return (self._bufPos = pos + needleLen); - } - - pos += occ[ch]; - } - - // There was no match. If there's trailing haystack data that we cannot - // match yet using the Boyer-Moore-Horspool algorithm (because the trailing - // data is less than the needle size) then match using a modified - // algorithm that starts matching from the beginning instead of the end. - // Whatever trailing data is left after running this algorithm is added to - // the lookbehind buffer. - while (pos < len) { - if (data[pos] !== firstNeedleChar - || !memcmp(data, pos, needle, 0, len - pos)) { - ++pos; - continue; - } - data.copy(lookbehind, 0, pos, len); - self._lookbehindSize = len - pos; - break; - } - - // Everything until `pos` is guaranteed not to contain needle data. - if (pos > 0) - self._cb(false, data, self._bufPos, pos < len ? pos : len, true); - - self._bufPos = len; - return len; -} - -function matchNeedle(self, data, pos, len) { - const lb = self._lookbehind; - const lbSize = self._lookbehindSize; - const needle = self._needle; - - for (let i = 0; i < len; ++i, ++pos) { - const ch = (pos < 0 ? lb[lbSize + pos] : data[pos]); - if (ch !== needle[i]) - return false; - } - return true; -} - -module.exports = SBMH; diff --git a/action/node_modules/streamsearch/package.json b/action/node_modules/streamsearch/package.json deleted file mode 100644 index 51df8f97..00000000 --- a/action/node_modules/streamsearch/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "streamsearch", - "version": "1.1.0", - "author": "Brian White ", - "description": "Streaming Boyer-Moore-Horspool searching for node.js", - "main": "./lib/sbmh.js", - "engines": { - "node": ">=10.0.0" - }, - "devDependencies": { - "@mscdex/eslint-config": "^1.1.0", - "eslint": "^7.32.0" - }, - "scripts": { - "test": "node test/test.js", - "lint": "eslint --cache --report-unused-disable-directives --ext=.js .eslintrc.js lib test", - "lint:fix": "npm run lint -- --fix" - }, - "keywords": [ - "stream", - "horspool", - "boyer-moore-horspool", - "boyer-moore", - "search" - ], - "licenses": [{ - "type": "MIT", - "url": "http://github.com/mscdex/streamsearch/raw/master/LICENSE" - }], - "repository": { - "type": "git", - "url": "http://github.com/mscdex/streamsearch.git" - } -} diff --git a/action/node_modules/streamsearch/test/test.js b/action/node_modules/streamsearch/test/test.js deleted file mode 100644 index 39a04d7f..00000000 --- a/action/node_modules/streamsearch/test/test.js +++ /dev/null @@ -1,70 +0,0 @@ -'use strict'; - -const assert = require('assert'); - -const StreamSearch = require('../lib/sbmh.js'); - -[ - { - needle: '\r\n', - chunks: [ - 'foo', - ' bar', - '\r', - '\n', - 'baz, hello\r', - '\n world.', - '\r\n Node.JS rules!!\r\n\r\n', - ], - expect: [ - [false, 'foo'], - [false, ' bar'], - [ true, null], - [false, 'baz, hello'], - [ true, null], - [false, ' world.'], - [ true, null], - [ true, ' Node.JS rules!!'], - [ true, ''], - ], - }, - { - needle: '---foobarbaz', - chunks: [ - '---foobarbaz', - 'asdf', - '\r\n', - '---foobarba', - '---foobar', - 'ba', - '\r\n---foobarbaz--\r\n', - ], - expect: [ - [ true, null], - [false, 'asdf'], - [false, '\r\n'], - [false, '---foobarba'], - [false, '---foobarba'], - [ true, '\r\n'], - [false, '--\r\n'], - ], - }, -].forEach((test, i) => { - console.log(`Running test #${i + 1}`); - const { needle, chunks, expect } = test; - - const results = []; - const ss = new StreamSearch(Buffer.from(needle), - (isMatch, data, start, end) => { - if (data) - data = data.toString('latin1', start, end); - else - data = null; - results.push([isMatch, data]); - }); - - for (const chunk of chunks) - ss.push(Buffer.from(chunk)); - - assert.deepStrictEqual(results, expect); -}); diff --git a/action/node_modules/undici/README.md b/action/node_modules/undici/README.md index 475a9c1b..3ba89890 100644 --- a/action/node_modules/undici/README.md +++ b/action/node_modules/undici/README.md @@ -18,30 +18,34 @@ npm i undici ## Benchmarks The benchmark is a simple `hello world` [example](benchmarks/benchmark.js) using a -number of unix sockets (connections) with a pipelining depth of 10 running on Node 16. -The benchmarks below have the [simd](https://github.com/WebAssembly/simd) feature enabled. +number of unix sockets (connections) with a pipelining depth of 10 running on Node 20.6.0. ### Connections 1 + | Tests | Samples | Result | Tolerance | Difference with slowest | |---------------------|---------|---------------|-----------|-------------------------| -| http - no keepalive | 15 | 4.63 req/sec | ± 2.77 % | - | -| http - keepalive | 10 | 4.81 req/sec | ± 2.16 % | + 3.94 % | -| undici - stream | 25 | 62.22 req/sec | ± 2.67 % | + 1244.58 % | -| undici - dispatch | 15 | 64.33 req/sec | ± 2.47 % | + 1290.24 % | -| undici - request | 15 | 66.08 req/sec | ± 2.48 % | + 1327.88 % | -| undici - pipeline | 10 | 66.13 req/sec | ± 1.39 % | + 1329.08 % | +| http - no keepalive | 15 | 5.32 req/sec | ± 2.61 % | - | +| http - keepalive | 10 | 5.35 req/sec | ± 2.47 % | + 0.44 % | +| undici - fetch | 15 | 41.85 req/sec | ± 2.49 % | + 686.04 % | +| undici - pipeline | 40 | 50.36 req/sec | ± 2.77 % | + 845.92 % | +| undici - stream | 15 | 60.58 req/sec | ± 2.75 % | + 1037.72 % | +| undici - request | 10 | 61.19 req/sec | ± 2.60 % | + 1049.24 % | +| undici - dispatch | 20 | 64.84 req/sec | ± 2.81 % | + 1117.81 % | + ### Connections 50 | Tests | Samples | Result | Tolerance | Difference with slowest | |---------------------|---------|------------------|-----------|-------------------------| -| http - no keepalive | 50 | 3546.49 req/sec | ± 2.90 % | - | -| http - keepalive | 15 | 5692.67 req/sec | ± 2.48 % | + 60.52 % | -| undici - pipeline | 25 | 8478.71 req/sec | ± 2.62 % | + 139.07 % | -| undici - request | 20 | 9766.66 req/sec | ± 2.79 % | + 175.39 % | -| undici - stream | 15 | 10109.74 req/sec | ± 2.94 % | + 185.06 % | -| undici - dispatch | 25 | 10949.73 req/sec | ± 2.54 % | + 208.75 % | +| undici - fetch | 30 | 2107.19 req/sec | ± 2.69 % | - | +| http - no keepalive | 10 | 2698.90 req/sec | ± 2.68 % | + 28.08 % | +| http - keepalive | 10 | 4639.49 req/sec | ± 2.55 % | + 120.17 % | +| undici - pipeline | 40 | 6123.33 req/sec | ± 2.97 % | + 190.59 % | +| undici - stream | 50 | 9426.51 req/sec | ± 2.92 % | + 347.35 % | +| undici - request | 10 | 10162.88 req/sec | ± 2.13 % | + 382.29 % | +| undici - dispatch | 50 | 11191.11 req/sec | ± 2.98 % | + 431.09 % | + ## Quick Start @@ -178,10 +182,6 @@ Implements [fetch](https://fetch.spec.whatwg.org/#fetch-method). Only supported on Node 16.8+. -This is [experimental](https://nodejs.org/api/documentation.html#documentation_stability_index) and is not yet fully compliant with the Fetch Standard. -We plan to ship breaking changes to this feature until it is out of experimental. -Help us improve the test coverage by following instructions at [nodejs/undici/#951](https://github.com/nodejs/undici/issues/951). - Basic usage example: ```js @@ -234,9 +234,15 @@ const data = { }, } -await fetch('https://example.com', { body: data, method: 'POST' }) +await fetch('https://example.com', { body: data, method: 'POST', duplex: 'half' }) ``` +#### `request.duplex` + +- half + +In this implementation of fetch, `request.duplex` must be set if `request.body` is `ReadableStream` or `Async Iterables`. And fetch requests are currently always be full duplex. More detail refer to [Fetch Standard.](https://fetch.spec.whatwg.org/#dom-requestinit-duplex) + #### `response.body` Nodejs has two kinds of streams: [web streams](https://nodejs.org/dist/latest-v16.x/docs/api/webstreams.html), which follow the API of the WHATWG web standard found in browsers, and an older Node-specific [streams API](https://nodejs.org/api/stream.html). `response.body` returns a readable web stream. If you would prefer to work with a Node stream you can convert a web stream using `.fromWeb()`. @@ -403,6 +409,18 @@ implementations in Deno and Cloudflare Workers. Refs: https://fetch.spec.whatwg.org/#atomic-http-redirect-handling +## Workarounds + +### Network address family autoselection. + +If you experience problem when connecting to a remote server that is resolved by your DNS servers to a IPv6 (AAAA record) +first, there are chances that your local router or ISP might have problem connecting to IPv6 networks. In that case +undici will throw an error with code `UND_ERR_CONNECT_TIMEOUT`. + +If the target server resolves to both a IPv6 and IPv4 (A records) address and you are using a compatible Node version +(18.3.0 and above), you can fix the problem by providing the `autoSelectFamily` option (support by both `undici.request` +and `undici.Agent`) which will enable the family autoselection algorithm when establishing the connection. + ## Collaborators * [__Daniele Belardi__](https://github.com/dnlup), @@ -418,6 +436,7 @@ Refs: https://fetch.spec.whatwg.org/#atomic-http-redirect-handling * [__Ethan Arrowood__](https://github.com/ethan-arrowood), * [__Matteo Collina__](https://github.com/mcollina), * [__Robert Nagy__](https://github.com/ronag), +* [__Matthew Aitken__](https://github.com/KhafraDev), ## License diff --git a/action/node_modules/undici/docs/api/CacheStorage.md b/action/node_modules/undici/docs/api/CacheStorage.md new file mode 100644 index 00000000..08ee99fa --- /dev/null +++ b/action/node_modules/undici/docs/api/CacheStorage.md @@ -0,0 +1,30 @@ +# CacheStorage + +Undici exposes a W3C spec-compliant implementation of [CacheStorage](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage) and [Cache](https://developer.mozilla.org/en-US/docs/Web/API/Cache). + +## Opening a Cache + +Undici exports a top-level CacheStorage instance. You can open a new Cache, or duplicate a Cache with an existing name, by using `CacheStorage.prototype.open`. If you open a Cache with the same name as an already-existing Cache, its list of cached Responses will be shared between both instances. + +```mjs +import { caches } from 'undici' + +const cache_1 = await caches.open('v1') +const cache_2 = await caches.open('v1') + +// Although .open() creates a new instance, +assert(cache_1 !== cache_2) +// The same Response is matched in both. +assert.deepStrictEqual(await cache_1.match('/req'), await cache_2.match('/req')) +``` + +## Deleting a Cache + +If a Cache is deleted, the cached Responses/Requests can still be used. + +```mjs +const response = await cache_1.match('/req') +await caches.delete('v1') + +await response.text() // the Response's body +``` diff --git a/action/node_modules/undici/docs/api/Client.md b/action/node_modules/undici/docs/api/Client.md index 55526235..b9e26f09 100644 --- a/action/node_modules/undici/docs/api/Client.md +++ b/action/node_modules/undici/docs/api/Client.md @@ -17,16 +17,23 @@ Returns: `Client` ### Parameter: `ClientOptions` -* **bodyTimeout** `number | null` (optional) - Default: `30e3` - The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Defaults to 30 seconds. -* **headersTimeout** `number | null` (optional) - Default: `30e3` - The amount of time the parser will wait to receive the complete HTTP headers while not sending the request. Defaults to 30 seconds. -* **keepAliveMaxTimeout** `number | null` (optional) - Default: `600e3` - The maximum allowed `keepAliveTimeout` when overridden by *keep-alive* hints from the server. Defaults to 10 minutes. -* **keepAliveTimeout** `number | null` (optional) - Default: `4e3` - The timeout after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. See [MDN: HTTP - Headers - Keep-Alive directives](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Keep-Alive#directives) for more details. Defaults to 4 seconds. -* **keepAliveTimeoutThreshold** `number | null` (optional) - Default: `1e3` - A number subtracted from server *keep-alive* hints when overriding `keepAliveTimeout` to account for timing inaccuracies caused by e.g. transport latency. Defaults to 1 second. -* **maxHeaderSize** `number | null` (optional) - Default: `16384` - The maximum length of request headers in bytes. Defaults to 16KiB. +> ⚠️ Warning: The `H2` support is experimental. + +* **bodyTimeout** `number | null` (optional) - Default: `300e3` - The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Defaults to 300 seconds. +* **headersTimeout** `number | null` (optional) - Default: `300e3` - The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers while not sending the request. Defaults to 300 seconds. +* **keepAliveMaxTimeout** `number | null` (optional) - Default: `600e3` - The maximum allowed `keepAliveTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Defaults to 10 minutes. +* **keepAliveTimeout** `number | null` (optional) - Default: `4e3` - The timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. See [MDN: HTTP - Headers - Keep-Alive directives](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Keep-Alive#directives) for more details. Defaults to 4 seconds. +* **keepAliveTimeoutThreshold** `number | null` (optional) - Default: `1e3` - A number of milliseconds subtracted from server *keep-alive* hints when overriding `keepAliveTimeout` to account for timing inaccuracies caused by e.g. transport latency. Defaults to 1 second. +* **maxHeaderSize** `number | null` (optional) - Default: `--max-http-header-size` or `16384` - The maximum length of request headers in bytes. Defaults to Node.js' --max-http-header-size or 16KiB. +* **maxResponseSize** `number | null` (optional) - Default: `-1` - The maximum length of response body in bytes. Set to `-1` to disable. * **pipelining** `number | null` (optional) - Default: `1` - The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Carefully consider your workload and environment before enabling concurrent requests as pipelining may reduce performance if used incorrectly. Pipelining is sensitive to network stack settings as well as head of line blocking caused by e.g. long running requests. Set to `0` to disable keep-alive connections. * **connect** `ConnectOptions | Function | null` (optional) - Default: `null`. * **strictContentLength** `Boolean` (optional) - Default: `true` - Whether to treat request content length mismatches as errors. If true, an error is thrown when the request content-length header doesn't match the length of the request body. * **interceptors** `{ Client: DispatchInterceptor[] }` - Default: `[RedirectInterceptor]` - A list of interceptors that are applied to the dispatch method. Additional logic can be applied (such as, but not limited to: 302 status code handling, authentication, cookies, compression and caching). Note that the behavior of interceptors is Experimental and might change at any given time. +* **autoSelectFamily**: `boolean` (optional) - Default: depends on local Node version, on Node 18.13.0 and above is `false`. Enables a family autodetection algorithm that loosely implements section 5 of [RFC 8305](https://tools.ietf.org/html/rfc8305#section-5). See [here](https://nodejs.org/api/net.html#socketconnectoptions-connectlistener) for more details. This option is ignored if not supported by the current Node version. +* **autoSelectFamilyAttemptTimeout**: `number` - Default: depends on local Node version, on Node 18.13.0 and above is `250`. The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. See [here](https://nodejs.org/api/net.html#socketconnectoptions-connectlistener) for more details. +* **allowH2**: `boolean` - Default: `false`. Enables support for H2 if the server has assigned bigger priority to it through ALPN negotiation. +* **maxConcurrentStreams**: `number` - Default: `100`. Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame. #### Parameter: `ConnectOptions` @@ -35,8 +42,10 @@ Furthermore, the following options can be passed: * **socketPath** `string | null` (optional) - Default: `null` - An IPC endpoint, either Unix domain socket or Windows named pipe. * **maxCachedSessions** `number | null` (optional) - Default: `100` - Maximum number of TLS cached sessions. Use 0 to disable TLS session caching. Default: 100. -* **timeout** `number | null` (optional) - Default `10e3` +* **timeout** `number | null` (optional) - In milliseconds, Default `10e3`. * **servername** `string | null` (optional) +* **keepAlive** `boolean | null` (optional) - Default: `true` - TCP keep-alive enabled +* **keepAliveInitialDelay** `number | null` (optional) - Default: `60000` - TCP keep-alive interval for the socket in milliseconds ### Example - Basic Client instantiation diff --git a/action/node_modules/undici/docs/api/Connector.md b/action/node_modules/undici/docs/api/Connector.md index fe446b46..56821bd6 100644 --- a/action/node_modules/undici/docs/api/Connector.md +++ b/action/node_modules/undici/docs/api/Connector.md @@ -13,8 +13,8 @@ Every Tls option, see [here](https://nodejs.org/api/tls.html#tls_tls_connect_opt Furthermore, the following options can be passed: * **socketPath** `string | null` (optional) - Default: `null` - An IPC endpoint, either Unix domain socket or Windows named pipe. -* **maxCachedSessions** `number | null` (optional) - Default: `100` - Maximum number of TLS cached sessions. Use 0 to disable TLS session caching. Default: 100. -* **timeout** `number | null` (optional) - Default `10e3` +* **maxCachedSessions** `number | null` (optional) - Default: `100` - Maximum number of TLS cached sessions. Use 0 to disable TLS session caching. Default: `100`. +* **timeout** `number | null` (optional) - In milliseconds. Default `10e3`. * **servername** `string | null` (optional) Once you call `buildConnector`, it will return a connector function, which takes the following parameters. @@ -24,8 +24,10 @@ Once you call `buildConnector`, it will return a connector function, which takes * **hostname** `string` (required) * **host** `string` (optional) * **protocol** `string` (required) -* **port** `number` (required) +* **port** `string` (required) * **servername** `string` (optional) +* **localAddress** `string | null` (optional) Local address the socket should connect from. +* **httpSocket** `Socket` (optional) Establish secure connection on a given socket rather than creating a new socket. It can only be sent on TLS update. ### Basic example diff --git a/action/node_modules/undici/docs/api/ContentType.md b/action/node_modules/undici/docs/api/ContentType.md new file mode 100644 index 00000000..2bcc9f71 --- /dev/null +++ b/action/node_modules/undici/docs/api/ContentType.md @@ -0,0 +1,57 @@ +# MIME Type Parsing + +## `MIMEType` interface + +* **type** `string` +* **subtype** `string` +* **parameters** `Map` +* **essence** `string` + +## `parseMIMEType(input)` + +Implements [parse a MIME type](https://mimesniff.spec.whatwg.org/#parse-a-mime-type). + +Parses a MIME type, returning its type, subtype, and any associated parameters. If the parser can't parse an input it returns the string literal `'failure'`. + +```js +import { parseMIMEType } from 'undici' + +parseMIMEType('text/html; charset=gbk') +// { +// type: 'text', +// subtype: 'html', +// parameters: Map(1) { 'charset' => 'gbk' }, +// essence: 'text/html' +// } +``` + +Arguments: + +* **input** `string` + +Returns: `MIMEType|'failure'` + +## `serializeAMimeType(input)` + +Implements [serialize a MIME type](https://mimesniff.spec.whatwg.org/#serialize-a-mime-type). + +Serializes a MIMEType object. + +```js +import { serializeAMimeType } from 'undici' + +serializeAMimeType({ + type: 'text', + subtype: 'html', + parameters: new Map([['charset', 'gbk']]), + essence: 'text/html' +}) +// text/html;charset=gbk + +``` + +Arguments: + +* **mimeType** `MIMEType` + +Returns: `string` diff --git a/action/node_modules/undici/docs/api/Cookies.md b/action/node_modules/undici/docs/api/Cookies.md new file mode 100644 index 00000000..0cad3791 --- /dev/null +++ b/action/node_modules/undici/docs/api/Cookies.md @@ -0,0 +1,101 @@ +# Cookie Handling + +## `Cookie` interface + +* **name** `string` +* **value** `string` +* **expires** `Date|number` (optional) +* **maxAge** `number` (optional) +* **domain** `string` (optional) +* **path** `string` (optional) +* **secure** `boolean` (optional) +* **httpOnly** `boolean` (optional) +* **sameSite** `'String'|'Lax'|'None'` (optional) +* **unparsed** `string[]` (optional) Left over attributes that weren't parsed. + +## `deleteCookie(headers, name[, attributes])` + +Sets the expiry time of the cookie to the unix epoch, causing browsers to delete it when received. + +```js +import { deleteCookie, Headers } from 'undici' + +const headers = new Headers() +deleteCookie(headers, 'name') + +console.log(headers.get('set-cookie')) // name=; Expires=Thu, 01 Jan 1970 00:00:00 GMT +``` + +Arguments: + +* **headers** `Headers` +* **name** `string` +* **attributes** `{ path?: string, domain?: string }` (optional) + +Returns: `void` + +## `getCookies(headers)` + +Parses the `Cookie` header and returns a list of attributes and values. + +```js +import { getCookies, Headers } from 'undici' + +const headers = new Headers({ + cookie: 'get=cookies; and=attributes' +}) + +console.log(getCookies(headers)) // { get: 'cookies', and: 'attributes' } +``` + +Arguments: + +* **headers** `Headers` + +Returns: `Record` + +## `getSetCookies(headers)` + +Parses all `Set-Cookie` headers. + +```js +import { getSetCookies, Headers } from 'undici' + +const headers = new Headers({ 'set-cookie': 'undici=getSetCookies; Secure' }) + +console.log(getSetCookies(headers)) +// [ +// { +// name: 'undici', +// value: 'getSetCookies', +// secure: true +// } +// ] + +``` + +Arguments: + +* **headers** `Headers` + +Returns: `Cookie[]` + +## `setCookie(headers, cookie)` + +Appends a cookie to the `Set-Cookie` header. + +```js +import { setCookie, Headers } from 'undici' + +const headers = new Headers() +setCookie(headers, { name: 'undici', value: 'setCookie' }) + +console.log(headers.get('Set-Cookie')) // undici=setCookie +``` + +Arguments: + +* **headers** `Headers` +* **cookie** `Cookie` + +Returns: `void` diff --git a/action/node_modules/undici/docs/api/DiagnosticsChannel.md b/action/node_modules/undici/docs/api/DiagnosticsChannel.md index 09a7f9a0..0aa0b9a0 100644 --- a/action/node_modules/undici/docs/api/DiagnosticsChannel.md +++ b/action/node_modules/undici/docs/api/DiagnosticsChannel.md @@ -135,3 +135,70 @@ diagnosticsChannel.channel('undici:client:connectError').subscribe(({ error, soc // connector is a function that creates the socket console.log(`Connect failed with ${error.message}`) }) +``` + +## `undici:websocket:open` + +This message is published after the client has successfully connected to a server. + +```js +import diagnosticsChannel from 'diagnostics_channel' + +diagnosticsChannel.channel('undici:websocket:open').subscribe(({ address, protocol, extensions }) => { + console.log(address) // address, family, and port + console.log(protocol) // negotiated subprotocols + console.log(extensions) // negotiated extensions +}) +``` + +## `undici:websocket:close` + +This message is published after the connection has closed. + +```js +import diagnosticsChannel from 'diagnostics_channel' + +diagnosticsChannel.channel('undici:websocket:close').subscribe(({ websocket, code, reason }) => { + console.log(websocket) // the WebSocket object + console.log(code) // the closing status code + console.log(reason) // the closing reason +}) +``` + +## `undici:websocket:socket_error` + +This message is published if the socket experiences an error. + +```js +import diagnosticsChannel from 'diagnostics_channel' + +diagnosticsChannel.channel('undici:websocket:socket_error').subscribe((error) => { + console.log(error) +}) +``` + +## `undici:websocket:ping` + +This message is published after the client receives a ping frame, if the connection is not closing. + +```js +import diagnosticsChannel from 'diagnostics_channel' + +diagnosticsChannel.channel('undici:websocket:ping').subscribe(({ payload }) => { + // a Buffer or undefined, containing the optional application data of the frame + console.log(payload) +}) +``` + +## `undici:websocket:pong` + +This message is published after the client receives a pong frame. + +```js +import diagnosticsChannel from 'diagnostics_channel' + +diagnosticsChannel.channel('undici:websocket:pong').subscribe(({ payload }) => { + // a Buffer or undefined, containing the optional application data of the frame + console.log(payload) +}) +``` diff --git a/action/node_modules/undici/docs/api/DispatchInterceptor.md b/action/node_modules/undici/docs/api/DispatchInterceptor.md index 652b2e86..7dfc260e 100644 --- a/action/node_modules/undici/docs/api/DispatchInterceptor.md +++ b/action/node_modules/undici/docs/api/DispatchInterceptor.md @@ -1,4 +1,4 @@ -#Interface: DispatchInterceptor +# Interface: DispatchInterceptor Extends: `Function` diff --git a/action/node_modules/undici/docs/api/Dispatcher.md b/action/node_modules/undici/docs/api/Dispatcher.md index 25565152..fd463bfe 100644 --- a/action/node_modules/undici/docs/api/Dispatcher.md +++ b/action/node_modules/undici/docs/api/Dispatcher.md @@ -74,7 +74,7 @@ Returns: `void | Promise` - Only returns a `Promise` if no `callbac #### Parameter: `ConnectData` * **statusCode** `number` -* **headers** `http.IncomingHttpHeaders` +* **headers** `Record` * **socket** `stream.Duplex` * **opaque** `unknown` @@ -192,15 +192,17 @@ Returns: `Boolean` - `false` if dispatcher is busy and further dispatch calls wo * **origin** `string | URL` * **path** `string` * **method** `string` +* **reset** `boolean` (optional) - Default: `false` - If `false`, the request will attempt to create a long-living connection by sending the `connection: keep-alive` header,otherwise will attempt to close it immediately after response by sending `connection: close` within the request and closing the socket afterwards. * **body** `string | Buffer | Uint8Array | stream.Readable | Iterable | AsyncIterable | null` (optional) - Default: `null` * **headers** `UndiciHeaders | string[]` (optional) - Default: `null`. * **query** `Record | null` (optional) - Default: `null` - Query string params to be embedded in the request URL. Note that both keys and values of query are encoded using `encodeURIComponent`. If for some reason you need to send them unencoded, embed query params into path directly instead. * **idempotent** `boolean` (optional) - Default: `true` if `method` is `'HEAD'` or `'GET'` - Whether the requests can be safely retried or not. If `false` the request won't be sent until all preceding requests in the pipeline has completed. * **blocking** `boolean` (optional) - Default: `false` - Whether the response is expected to take a long time and would end up blocking the pipeline. When this is set to `true` further pipelining will be avoided on the same connection until headers have been received. * **upgrade** `string | null` (optional) - Default: `null` - Upgrade the request. Should be used to specify the kind of upgrade i.e. `'Websocket'`. -* **bodyTimeout** `number | null` (optional) - The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Defaults to 30 seconds. -* **headersTimeout** `number | null` (optional) - The amount of time the parser will wait to receive the complete HTTP headers while not sending the request. Defaults to 30 seconds. +* **bodyTimeout** `number | null` (optional) - The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Defaults to 300 seconds. +* **headersTimeout** `number | null` (optional) - The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers while not sending the request. Defaults to 300 seconds. * **throwOnError** `boolean` (optional) - Default: `false` - Whether Undici should throw an error upon receiving a 4xx or 5xx response from the server. +* **expectContinue** `boolean` (optional) - Default: `false` - For H2, it appends the expect: 100-continue header, and halts the request body until a 100-continue is received from the remote server #### Parameter: `DispatchHandler` @@ -382,7 +384,7 @@ Extends: [`RequestOptions`](#parameter-requestoptions) #### Parameter: PipelineHandlerData * **statusCode** `number` -* **headers** `IncomingHttpHeaders` +* **headers** `Record` * **opaque** `unknown` * **body** `stream.Readable` * **context** `object` @@ -476,7 +478,7 @@ The `RequestOptions.method` property should not be value `'CONNECT'`. #### Parameter: `ResponseData` * **statusCode** `number` -* **headers** `http.IncomingHttpHeaders` - Note that all header keys are lower-cased, e. g. `content-type`. +* **headers** `Record` - Note that all header keys are lower-cased, e. g. `content-type`. * **body** `stream.Readable` which also implements [the body mixin from the Fetch Standard](https://fetch.spec.whatwg.org/#body-mixin). * **trailers** `Record` - This object starts out as empty and will be mutated to contain trailers after `body` has emitted `'end'`. @@ -630,7 +632,7 @@ try { A faster version of `Dispatcher.request`. This method expects the second argument `factory` to return a [`stream.Writable`](https://nodejs.org/api/stream.html#stream_class_stream_writable) stream which the response will be written to. This improves performance by avoiding creating an intermediate [`stream.Readable`](https://nodejs.org/api/stream.html#stream_readable_streams) stream when the user expects to directly pipe the response body to a [`stream.Writable`](https://nodejs.org/api/stream.html#stream_class_stream_writable) stream. -As demonstrated in [Example 1 - Basic GET stream request](#example-1-basic-get-stream-request), it is recommended to use the `option.opaque` property to avoid creating a closure for the `factory` method. This pattern works well with Node.js Web Frameworks such as [Fastify](https://fastify.io). See [Example 2 - Stream to Fastify Response](#example-2-stream-to-fastify-response) for more details. +As demonstrated in [Example 1 - Basic GET stream request](#example-1---basic-get-stream-request), it is recommended to use the `option.opaque` property to avoid creating a closure for the `factory` method. This pattern works well with Node.js Web Frameworks such as [Fastify](https://fastify.io). See [Example 2 - Stream to Fastify Response](#example-2---stream-to-fastify-response) for more details. Arguments: @@ -643,7 +645,7 @@ Returns: `void | Promise` - Only returns a `Promise` if no `callback #### Parameter: `StreamFactoryData` * **statusCode** `number` -* **headers** `http.IncomingHttpHeaders` +* **headers** `Record` * **opaque** `unknown` * **onInfo** `({statusCode: number, headers: Record}) => void | null` (optional) - Default: `null` - Callback collecting all the info headers (HTTP 100-199) received. @@ -852,9 +854,9 @@ Emitted when dispatcher is no longer busy. ## Parameter: `UndiciHeaders` -* `http.IncomingHttpHeaders | string[] | null` +* `Record | string[] | null` -Header arguments such as `options.headers` in [`Client.dispatch`](Client.md#clientdispatchoptions-handlers) can be specified in two forms; either as an object specified by the `http.IncomingHttpHeaders` type, or an array of strings. An array representation of a header list must have an even length or an `InvalidArgumentError` will be thrown. +Header arguments such as `options.headers` in [`Client.dispatch`](Client.md#clientdispatchoptions-handlers) can be specified in two forms; either as an object specified by the `Record` (`IncomingHttpHeaders`) type, or an array of strings. An array representation of a header list must have an even length or an `InvalidArgumentError` will be thrown. Keys are lowercase and values are not modified. diff --git a/action/node_modules/undici/docs/api/Errors.md b/action/node_modules/undici/docs/api/Errors.md index 6287ddcf..917e45df 100644 --- a/action/node_modules/undici/docs/api/Errors.md +++ b/action/node_modules/undici/docs/api/Errors.md @@ -7,18 +7,25 @@ You can find all the error objects inside the `errors` key. import { errors } from 'undici' ``` -| Error | Error Codes | Description | -| ------------------------------------ | ------------------------------------- | -------------------------------------------------- | -| `InvalidArgumentError` | `UND_ERR_INVALID_ARG` | passed an invalid argument. | -| `InvalidReturnValueError` | `UND_ERR_INVALID_RETURN_VALUE` | returned an invalid value. | -| `RequestAbortedError` | `UND_ERR_ABORTED` | the request has been aborted by the user | -| `ClientDestroyedError` | `UND_ERR_DESTROYED` | trying to use a destroyed client. | -| `ClientClosedError` | `UND_ERR_CLOSED` | trying to use a closed client. | -| `SocketError` | `UND_ERR_SOCKET` | there is an error with the socket. | -| `NotSupportedError` | `UND_ERR_NOT_SUPPORTED` | encountered unsupported functionality. | -| `RequestContentLengthMismatchError` | `UND_ERR_REQ_CONTENT_LENGTH_MISMATCH` | request body does not match content-length header | -| `ResponseContentLengthMismatchError` | `UND_ERR_RES_CONTENT_LENGTH_MISMATCH` | response body does not match content-length header | -| `InformationalError` | `UND_ERR_INFO` | expected error with reason | +| Error | Error Codes | Description | +| ------------------------------------ | ------------------------------------- | ------------------------------------------------------------------------- | +| `UndiciError` | `UND_ERR` | all errors below are extended from `UndiciError`. | +| `ConnectTimeoutError` | `UND_ERR_CONNECT_TIMEOUT` | socket is destroyed due to connect timeout. | +| `HeadersTimeoutError` | `UND_ERR_HEADERS_TIMEOUT` | socket is destroyed due to headers timeout. | +| `HeadersOverflowError` | `UND_ERR_HEADERS_OVERFLOW` | socket is destroyed due to headers' max size being exceeded. | +| `BodyTimeoutError` | `UND_ERR_BODY_TIMEOUT` | socket is destroyed due to body timeout. | +| `ResponseStatusCodeError` | `UND_ERR_RESPONSE_STATUS_CODE` | an error is thrown when `throwOnError` is `true` for status codes >= 400. | +| `InvalidArgumentError` | `UND_ERR_INVALID_ARG` | passed an invalid argument. | +| `InvalidReturnValueError` | `UND_ERR_INVALID_RETURN_VALUE` | returned an invalid value. | +| `RequestAbortedError` | `UND_ERR_ABORTED` | the request has been aborted by the user | +| `ClientDestroyedError` | `UND_ERR_DESTROYED` | trying to use a destroyed client. | +| `ClientClosedError` | `UND_ERR_CLOSED` | trying to use a closed client. | +| `SocketError` | `UND_ERR_SOCKET` | there is an error with the socket. | +| `NotSupportedError` | `UND_ERR_NOT_SUPPORTED` | encountered unsupported functionality. | +| `RequestContentLengthMismatchError` | `UND_ERR_REQ_CONTENT_LENGTH_MISMATCH` | request body does not match content-length header | +| `ResponseContentLengthMismatchError` | `UND_ERR_RES_CONTENT_LENGTH_MISMATCH` | response body does not match content-length header | +| `InformationalError` | `UND_ERR_INFO` | expected error with reason | +| `ResponseExceededMaxSizeError` | `UND_ERR_RES_EXCEEDED_MAX_SIZE` | response body exceed the max size allowed | ### `SocketError` diff --git a/action/node_modules/undici/docs/api/Fetch.md b/action/node_modules/undici/docs/api/Fetch.md new file mode 100644 index 00000000..b5a62422 --- /dev/null +++ b/action/node_modules/undici/docs/api/Fetch.md @@ -0,0 +1,27 @@ +# Fetch + +Undici exposes a fetch() method starts the process of fetching a resource from the network. + +Documentation and examples can be found on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/fetch). + +## File + +This API is implemented as per the standard, you can find documentation on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/File) + +In Node versions v18.13.0 and above and v19.2.0 and above, undici will default to using Node's [File](https://nodejs.org/api/buffer.html#class-file) class. In versions where it's not available, it will default to the undici one. + +## FormData + +This API is implemented as per the standard, you can find documentation on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/FormData) + +## Response + +This API is implemented as per the standard, you can find documentation on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Response) + +## Request + +This API is implemented as per the standard, you can find documentation on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Request) + +## Header + +This API is implemented as per the standard, you can find documentation on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Headers) diff --git a/action/node_modules/undici/docs/api/MockPool.md b/action/node_modules/undici/docs/api/MockPool.md index c86f9a30..96a986f5 100644 --- a/action/node_modules/undici/docs/api/MockPool.md +++ b/action/node_modules/undici/docs/api/MockPool.md @@ -35,7 +35,7 @@ const mockPool = mockAgent.get('http://localhost:3000') ### `MockPool.intercept(options)` -This method defines the interception rules for matching against requests for a MockPool or MockPool. We can intercept multiple times on a single instance. +This method defines the interception rules for matching against requests for a MockPool or MockPool. We can intercept multiple times on a single instance, but each intercept is only used once. For example if you expect to make 2 requests inside a test, you need to call `intercept()` twice. Assuming you use `disableNetConnect()` you will get `MockNotMatchedError` on the second request when you only call `intercept()` once. When defining interception rules, all the rules must pass for a request to be intercepted. If a request is not intercepted, a real request will be attempted. @@ -53,17 +53,18 @@ Returns: `MockInterceptor` corresponding to the input options. ### Parameter: `MockPoolInterceptOptions` -* **path** `string | RegExp | (path: string) => boolean` - a matcher for the HTTP request path. +* **path** `string | RegExp | (path: string) => boolean` - a matcher for the HTTP request path. When a `RegExp` or callback is used, it will match against the request path including all query parameters in alphabetical order. When a `string` is provided, the query parameters can be conveniently specified through the `MockPoolInterceptOptions.query` setting. * **method** `string | RegExp | (method: string) => boolean` - (optional) - a matcher for the HTTP request method. Defaults to `GET`. * **body** `string | RegExp | (body: string) => boolean` - (optional) - a matcher for the HTTP request body. * **headers** `Record boolean`> - (optional) - a matcher for the HTTP request headers. To be intercepted, a request must match all defined headers. Extra headers not defined here may (or may not) be included in the request and do not affect the interception in any way. -* **query** `Record | null` - (optional) - a matcher for the HTTP request query string params. +* **query** `Record | null` - (optional) - a matcher for the HTTP request query string params. Only applies when a `string` was provided for `MockPoolInterceptOptions.path`. ### Return: `MockInterceptor` We can define the behaviour of an intercepted request with the following options. -* **reply** `(statusCode: number, replyData: string | Buffer | object | MockInterceptor.MockResponseDataHandler, responseOptions?: MockResponseOptions) => MockScope` - define a reply for a matching request. You can define this as a callback to read incoming request data. Default for `responseOptions` is `{}`. +* **reply** `(statusCode: number, replyData: string | Buffer | object | MockInterceptor.MockResponseDataHandler, responseOptions?: MockResponseOptions) => MockScope` - define a reply for a matching request. You can define the replyData as a callback to read incoming request data. Default for `responseOptions` is `{}`. +* **reply** `(callback: MockInterceptor.MockReplyOptionsCallback) => MockScope` - define a reply for a matching request, allowing dynamic mocking of all reply options rather than just the data. * **replyWithError** `(error: Error) => MockScope` - define an error for a matching request to throw. * **defaultReplyHeaders** `(headers: Record) => MockInterceptor` - define default headers to be included in subsequent replies. These are in addition to headers on a specific reply. * **defaultReplyTrailers** `(trailers: Record) => MockInterceptor` - define default trailers to be included in subsequent replies. These are in addition to trailers on a specific reply. @@ -456,6 +457,41 @@ const result3 = await request('http://localhost:3000/foo') // Will not match and make attempt a real request ``` +#### Example - Mocked request with path callback + +```js +import { MockAgent, setGlobalDispatcher, request } from 'undici' +import querystring from 'querystring' + +const mockAgent = new MockAgent() +setGlobalDispatcher(mockAgent) + +const mockPool = mockAgent.get('http://localhost:3000') + +const matchPath = requestPath => { + const [pathname, search] = requestPath.split('?') + const requestQuery = querystring.parse(search) + + if (!pathname.startsWith('/foo')) { + return false + } + + if (!Object.keys(requestQuery).includes('foo') || requestQuery.foo !== 'bar') { + return false + } + + return true +} + +mockPool.intercept({ + path: matchPath, + method: 'GET' +}).reply(200, 'foo') + +const result = await request('http://localhost:3000/foo?foo=bar') +// Will match and return mocked data +``` + ### `MockPool.close()` Closes the mock pool and de-registers from associated MockAgent. diff --git a/action/node_modules/undici/docs/api/ProxyAgent.md b/action/node_modules/undici/docs/api/ProxyAgent.md index cbd2dadd..cebfe689 100644 --- a/action/node_modules/undici/docs/api/ProxyAgent.md +++ b/action/node_modules/undici/docs/api/ProxyAgent.md @@ -17,6 +17,11 @@ Returns: `ProxyAgent` Extends: [`AgentOptions`](Agent.md#parameter-agentoptions) * **uri** `string` (required) - It can be passed either by a string or a object containing `uri` as string. +* **token** `string` (optional) - It can be passed by a string of token for authentication. +* **auth** `string` (**deprecated**) - Use token. +* **clientFactory** `(origin: URL, opts: Object) => Dispatcher` (optional) - Default: `(origin, opts) => new Pool(origin, opts)` +* **requestTls** `BuildOptions` (optional) - Options object passed when creating the underlying socket via the connector builder for the request. See [TLS](https://nodejs.org/api/tls.html#tlsconnectoptions-callback). +* **proxyTls** `BuildOptions` (optional) - Options object passed when creating the underlying socket via the connector builder for the proxy server. See [TLS](https://nodejs.org/api/tls.html#tlsconnectoptions-callback). Examples: @@ -74,6 +79,27 @@ for await (const data of body) { } ``` +#### Example - Basic Proxy Request with authentication + +```js +import { setGlobalDispatcher, request, ProxyAgent } from 'undici'; + +const proxyAgent = new ProxyAgent({ + uri: 'my.proxy.server', + // token: 'Bearer xxxx' + token: `Basic ${Buffer.from('username:password').toString('base64')}` +}); +setGlobalDispatcher(proxyAgent); + +const { statusCode, body } = await request('http://localhost:3000/foo'); + +console.log('response received', statusCode); // response received 200 + +for await (const data of body) { + console.log('data', data.toString('utf8')); // data foo +} +``` + ### `ProxyAgent.close()` Closes the proxy agent and waits for registered pools and clients to also close before resolving. diff --git a/action/node_modules/undici/docs/api/RetryHandler.md b/action/node_modules/undici/docs/api/RetryHandler.md new file mode 100644 index 00000000..2323ce47 --- /dev/null +++ b/action/node_modules/undici/docs/api/RetryHandler.md @@ -0,0 +1,108 @@ +# Class: RetryHandler + +Extends: `undici.DispatcherHandlers` + +A handler class that implements the retry logic for a request. + +## `new RetryHandler(dispatchOptions, retryHandlers, [retryOptions])` + +Arguments: + +- **options** `Dispatch.DispatchOptions & RetryOptions` (required) - It is an intersection of `Dispatcher.DispatchOptions` and `RetryOptions`. +- **retryHandlers** `RetryHandlers` (required) - Object containing the `dispatch` to be used on every retry, and `handler` for handling the `dispatch` lifecycle. + +Returns: `retryHandler` + +### Parameter: `Dispatch.DispatchOptions & RetryOptions` + +Extends: [`Dispatch.DispatchOptions`](Dispatcher.md#parameter-dispatchoptions). + +#### `RetryOptions` + +- **retry** `(err: Error, context: RetryContext, callback: (err?: Error | null) => void) => void` (optional) - Function to be called after every retry. It should pass error if no more retries should be performed. +- **maxRetries** `number` (optional) - Maximum number of retries. Default: `5` +- **maxTimeout** `number` (optional) - Maximum number of milliseconds to wait before retrying. Default: `30000` (30 seconds) +- **minTimeout** `number` (optional) - Minimum number of milliseconds to wait before retrying. Default: `500` (half a second) +- **timeoutFactor** `number` (optional) - Factor to multiply the timeout by for each retry attempt. Default: `2` +- **retryAfter** `boolean` (optional) - It enables automatic retry after the `Retry-After` header is received. Default: `true` +- +- **methods** `string[]` (optional) - Array of HTTP methods to retry. Default: `['GET', 'PUT', 'HEAD', 'OPTIONS', 'DELETE']` +- **statusCodes** `number[]` (optional) - Array of HTTP status codes to retry. Default: `[429, 500, 502, 503, 504]` +- **errorCodes** `string[]` (optional) - Array of Error codes to retry. Default: `['ECONNRESET', 'ECONNREFUSED', 'ENOTFOUND', 'ENETDOWN','ENETUNREACH', 'EHOSTDOWN', + +**`RetryContext`** + +- `state`: `RetryState` - Current retry state. It can be mutated. +- `opts`: `Dispatch.DispatchOptions & RetryOptions` - Options passed to the retry handler. + +### Parameter `RetryHandlers` + +- **dispatch** `(options: Dispatch.DispatchOptions, handlers: Dispatch.DispatchHandlers) => Promise` (required) - Dispatch function to be called after every retry. +- **handler** Extends [`Dispatch.DispatchHandlers`](Dispatcher.md#dispatcherdispatchoptions-handler) (required) - Handler function to be called after the request is successful or the retries are exhausted. + +Examples: + +```js +const client = new Client(`http://localhost:${server.address().port}`); +const chunks = []; +const handler = new RetryHandler( + { + ...dispatchOptions, + retryOptions: { + // custom retry function + retry: function (err, state, callback) { + counter++; + + if (err.code && err.code === "UND_ERR_DESTROYED") { + callback(err); + return; + } + + if (err.statusCode === 206) { + callback(err); + return; + } + + setTimeout(() => callback(null), 1000); + }, + }, + }, + { + dispatch: (...args) => { + return client.dispatch(...args); + }, + handler: { + onConnect() {}, + onBodySent() {}, + onHeaders(status, _rawHeaders, resume, _statusMessage) { + // do something with headers + }, + onData(chunk) { + chunks.push(chunk); + return true; + }, + onComplete() {}, + onError() { + // handle error properly + }, + }, + } +); +``` + +#### Example - Basic RetryHandler with defaults + +```js +const client = new Client(`http://localhost:${server.address().port}`); +const handler = new RetryHandler(dispatchOptions, { + dispatch: client.dispatch.bind(client), + handler: { + onConnect() {}, + onBodySent() {}, + onHeaders(status, _rawHeaders, resume, _statusMessage) {}, + onData(chunk) {}, + onComplete() {}, + onError(err) {}, + }, +}); +``` diff --git a/action/node_modules/undici/docs/api/WebSocket.md b/action/node_modules/undici/docs/api/WebSocket.md new file mode 100644 index 00000000..9d374f40 --- /dev/null +++ b/action/node_modules/undici/docs/api/WebSocket.md @@ -0,0 +1,43 @@ +# Class: WebSocket + +> ⚠️ Warning: the WebSocket API is experimental. + +Extends: [`EventTarget`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget) + +The WebSocket object provides a way to manage a WebSocket connection to a server, allowing bidirectional communication. The API follows the [WebSocket spec](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) and [RFC 6455](https://datatracker.ietf.org/doc/html/rfc6455). + +## `new WebSocket(url[, protocol])` + +Arguments: + +* **url** `URL | string` - The url's protocol *must* be `ws` or `wss`. +* **protocol** `string | string[] | WebSocketInit` (optional) - Subprotocol(s) to request the server use, or a [`Dispatcher`](./Dispatcher.md). + +### Example: + +This example will not work in browsers or other platforms that don't allow passing an object. + +```mjs +import { WebSocket, ProxyAgent } from 'undici' + +const proxyAgent = new ProxyAgent('my.proxy.server') + +const ws = new WebSocket('wss://echo.websocket.events', { + dispatcher: proxyAgent, + protocols: ['echo', 'chat'] +}) +``` + +If you do not need a custom Dispatcher, it's recommended to use the following pattern: + +```mjs +import { WebSocket } from 'undici' + +const ws = new WebSocket('wss://echo.websocket.events', ['echo', 'chat']) +``` + +## Read More + +- [MDN - WebSocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) +- [The WebSocket Specification](https://www.rfc-editor.org/rfc/rfc6455) +- [The WHATWG WebSocket Specification](https://websockets.spec.whatwg.org/) diff --git a/action/node_modules/undici/docs/assets/lifecycle-diagram.png b/action/node_modules/undici/docs/assets/lifecycle-diagram.png index 01d1c321..4ef17b5a 100644 Binary files a/action/node_modules/undici/docs/assets/lifecycle-diagram.png and b/action/node_modules/undici/docs/assets/lifecycle-diagram.png differ diff --git a/action/node_modules/undici/index-fetch.js b/action/node_modules/undici/index-fetch.js index 27a44732..ba31a65f 100644 --- a/action/node_modules/undici/index-fetch.js +++ b/action/node_modules/undici/index-fetch.js @@ -1,18 +1,15 @@ 'use strict' -const { getGlobalDispatcher } = require('./lib/global') const fetchImpl = require('./lib/fetch').fetch -module.exports.fetch = async function fetch (resource) { - const dispatcher = (arguments[1] && arguments[1].dispatcher) || getGlobalDispatcher() - try { - return await fetchImpl.apply(dispatcher, arguments) - } catch (err) { +module.exports.fetch = function fetch (resource, init = undefined) { + return fetchImpl(resource, init).catch((err) => { Error.captureStackTrace(err, this) throw err - } + }) } module.exports.FormData = require('./lib/fetch/formdata').FormData module.exports.Headers = require('./lib/fetch/headers').Headers module.exports.Response = require('./lib/fetch/response').Response module.exports.Request = require('./lib/fetch/request').Request +module.exports.WebSocket = require('./lib/websocket/websocket').WebSocket diff --git a/action/node_modules/undici/index.d.ts b/action/node_modules/undici/index.d.ts index 1c8c6e2d..83a786d6 100644 --- a/action/node_modules/undici/index.d.ts +++ b/action/node_modules/undici/index.d.ts @@ -1,51 +1,3 @@ -import Dispatcher = require('./types/dispatcher') -import { setGlobalDispatcher, getGlobalDispatcher } from './types/global-dispatcher' -import { setGlobalOrigin, getGlobalOrigin } from './types/global-origin' -import Pool = require('./types/pool') -import { RedirectHandler, DecoratorHandler } from './types/handlers' - -import BalancedPool = require('./types/balanced-pool') -import Client = require('./types/client') -import buildConnector = require('./types/connector') -import errors = require('./types/errors') -import Agent = require('./types/agent') -import MockClient = require('./types/mock-client') -import MockPool = require('./types/mock-pool') -import MockAgent = require('./types/mock-agent') -import mockErrors = require('./types/mock-errors') -import ProxyAgent = require('./types/proxy-agent') -import { request, pipeline, stream, connect, upgrade } from './types/api' - -export * from './types/fetch' -export * from './types/file' -export * from './types/formdata' -export * from './types/diagnostics-channel' -export { Interceptable } from './types/mock-interceptor' - -export { Dispatcher, BalancedPool, Pool, Client, buildConnector, errors, Agent, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, MockClient, MockPool, MockAgent, mockErrors, ProxyAgent, RedirectHandler, DecoratorHandler } +export * from './types/index' +import Undici from './types/index' export default Undici - -declare namespace Undici { - var Dispatcher: typeof import('./types/dispatcher') - var Pool: typeof import('./types/pool'); - var RedirectHandler: typeof import ('./types/handlers').RedirectHandler - var DecoratorHandler: typeof import ('./types/handlers').DecoratorHandler - var createRedirectInterceptor: typeof import ('./types/interceptors').createRedirectInterceptor - var BalancedPool: typeof import('./types/balanced-pool'); - var Client: typeof import('./types/client'); - var buildConnector: typeof import('./types/connector'); - var errors: typeof import('./types/errors'); - var Agent: typeof import('./types/agent'); - var setGlobalDispatcher: typeof import('./types/global-dispatcher').setGlobalDispatcher; - var getGlobalDispatcher: typeof import('./types/global-dispatcher').getGlobalDispatcher; - var request: typeof import('./types/api').request; - var stream: typeof import('./types/api').stream; - var pipeline: typeof import('./types/api').pipeline; - var connect: typeof import('./types/api').connect; - var upgrade: typeof import('./types/api').upgrade; - var MockClient: typeof import('./types/mock-client'); - var MockPool: typeof import('./types/mock-pool'); - var MockAgent: typeof import('./types/mock-agent'); - var mockErrors: typeof import('./types/mock-errors'); - var fetch: typeof import('./types/fetch').fetch; -} diff --git a/action/node_modules/undici/index.js b/action/node_modules/undici/index.js index 9cde34ae..26302cc8 100644 --- a/action/node_modules/undici/index.js +++ b/action/node_modules/undici/index.js @@ -15,14 +15,19 @@ const MockAgent = require('./lib/mock/mock-agent') const MockPool = require('./lib/mock/mock-pool') const mockErrors = require('./lib/mock/mock-errors') const ProxyAgent = require('./lib/proxy-agent') +const RetryHandler = require('./lib/handler/RetryHandler') const { getGlobalDispatcher, setGlobalDispatcher } = require('./lib/global') const DecoratorHandler = require('./lib/handler/DecoratorHandler') const RedirectHandler = require('./lib/handler/RedirectHandler') const createRedirectInterceptor = require('./lib/interceptor/redirectInterceptor') -const nodeVersion = process.versions.node.split('.') -const nodeMajor = Number(nodeVersion[0]) -const nodeMinor = Number(nodeVersion[1]) +let hasCrypto +try { + require('crypto') + hasCrypto = true +} catch { + hasCrypto = false +} Object.assign(Dispatcher.prototype, api) @@ -32,6 +37,7 @@ module.exports.Pool = Pool module.exports.BalancedPool = BalancedPool module.exports.Agent = Agent module.exports.ProxyAgent = ProxyAgent +module.exports.RetryHandler = RetryHandler module.exports.DecoratorHandler = DecoratorHandler module.exports.RedirectHandler = RedirectHandler @@ -92,17 +98,20 @@ function makeDispatcher (fn) { module.exports.setGlobalDispatcher = setGlobalDispatcher module.exports.getGlobalDispatcher = getGlobalDispatcher -if (nodeMajor > 16 || (nodeMajor === 16 && nodeMinor >= 8)) { +if (util.nodeMajor > 16 || (util.nodeMajor === 16 && util.nodeMinor >= 8)) { let fetchImpl = null module.exports.fetch = async function fetch (resource) { if (!fetchImpl) { fetchImpl = require('./lib/fetch').fetch } - const dispatcher = (arguments[1] && arguments[1].dispatcher) || getGlobalDispatcher() + try { - return await fetchImpl.apply(dispatcher, arguments) + return await fetchImpl(...arguments) } catch (err) { - Error.captureStackTrace(err, this) + if (typeof err === 'object') { + Error.captureStackTrace(err, this) + } + throw err } } @@ -111,11 +120,39 @@ if (nodeMajor > 16 || (nodeMajor === 16 && nodeMinor >= 8)) { module.exports.Request = require('./lib/fetch/request').Request module.exports.FormData = require('./lib/fetch/formdata').FormData module.exports.File = require('./lib/fetch/file').File + module.exports.FileReader = require('./lib/fileapi/filereader').FileReader const { setGlobalOrigin, getGlobalOrigin } = require('./lib/fetch/global') module.exports.setGlobalOrigin = setGlobalOrigin module.exports.getGlobalOrigin = getGlobalOrigin + + const { CacheStorage } = require('./lib/cache/cachestorage') + const { kConstruct } = require('./lib/cache/symbols') + + // Cache & CacheStorage are tightly coupled with fetch. Even if it may run + // in an older version of Node, it doesn't have any use without fetch. + module.exports.caches = new CacheStorage(kConstruct) +} + +if (util.nodeMajor >= 16) { + const { deleteCookie, getCookies, getSetCookies, setCookie } = require('./lib/cookies') + + module.exports.deleteCookie = deleteCookie + module.exports.getCookies = getCookies + module.exports.getSetCookies = getSetCookies + module.exports.setCookie = setCookie + + const { parseMIMEType, serializeAMimeType } = require('./lib/fetch/dataURL') + + module.exports.parseMIMEType = parseMIMEType + module.exports.serializeAMimeType = serializeAMimeType +} + +if (util.nodeMajor >= 18 && hasCrypto) { + const { WebSocket } = require('./lib/websocket/websocket') + + module.exports.WebSocket = WebSocket } module.exports.request = makeDispatcher(api.request) diff --git a/action/node_modules/undici/lib/api/abort-signal.js b/action/node_modules/undici/lib/api/abort-signal.js index 895629aa..2985c1ef 100644 --- a/action/node_modules/undici/lib/api/abort-signal.js +++ b/action/node_modules/undici/lib/api/abort-signal.js @@ -1,3 +1,4 @@ +const { addAbortListener } = require('../core/util') const { RequestAbortedError } = require('../core/errors') const kListener = Symbol('kListener') @@ -29,11 +30,7 @@ function addSignal (self, signal) { abort(self) } - if ('addEventListener' in self[kSignal]) { - self[kSignal].addEventListener('abort', self[kListener]) - } else { - self[kSignal].addListener('abort', self[kListener]) - } + addAbortListener(self[kSignal], self[kListener]) } function removeSignal (self) { diff --git a/action/node_modules/undici/lib/api/api-connect.js b/action/node_modules/undici/lib/api/api-connect.js index 0503b1a2..fd2b6ad9 100644 --- a/action/node_modules/undici/lib/api/api-connect.js +++ b/action/node_modules/undici/lib/api/api-connect.js @@ -1,7 +1,7 @@ 'use strict' -const { InvalidArgumentError, RequestAbortedError, SocketError } = require('../core/errors') const { AsyncResource } = require('async_hooks') +const { InvalidArgumentError, RequestAbortedError, SocketError } = require('../core/errors') const util = require('../core/util') const { addSignal, removeSignal } = require('./abort-signal') @@ -50,7 +50,13 @@ class ConnectHandler extends AsyncResource { removeSignal(this) this.callback = null - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) + + let headers = rawHeaders + // Indicates is an HTTP2Session + if (headers != null) { + headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) + } + this.runInAsyncScope(callback, null, null, { statusCode, headers, diff --git a/action/node_modules/undici/lib/api/api-request.js b/action/node_modules/undici/lib/api/api-request.js index b4674878..d4281ce2 100644 --- a/action/node_modules/undici/lib/api/api-request.js +++ b/action/node_modules/undici/lib/api/api-request.js @@ -3,10 +3,10 @@ const Readable = require('./readable') const { InvalidArgumentError, - RequestAbortedError, - ResponseStatusCodeError + RequestAbortedError } = require('../core/errors') const util = require('../core/util') +const { getResolveErrorBodyCallback } = require('./util') const { AsyncResource } = require('async_hooks') const { addSignal, removeSignal } = require('./abort-signal') @@ -16,13 +16,17 @@ class RequestHandler extends AsyncResource { throw new InvalidArgumentError('invalid opts') } - const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts + const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts try { if (typeof callback !== 'function') { throw new InvalidArgumentError('invalid callback') } + if (highWaterMark && (typeof highWaterMark !== 'number' || highWaterMark < 0)) { + throw new InvalidArgumentError('invalid highWaterMark') + } + if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') } @@ -53,6 +57,7 @@ class RequestHandler extends AsyncResource { this.context = null this.onInfo = onInfo || null this.throwOnError = throwOnError + this.highWaterMark = highWaterMark if (util.isStream(body)) { body.on('error', (err) => { @@ -73,40 +78,38 @@ class RequestHandler extends AsyncResource { } onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const { callback, opaque, abort, context } = this + const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this + + const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) if (statusCode < 200) { if (this.onInfo) { - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) this.onInfo({ statusCode, headers }) } return } - const parsedHeaders = util.parseHeaders(rawHeaders) + const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers const contentType = parsedHeaders['content-type'] - const body = new Readable(resume, abort, contentType) + const body = new Readable({ resume, abort, contentType, highWaterMark }) this.callback = null this.res = body - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - if (callback !== null) { if (this.throwOnError && statusCode >= 400) { this.runInAsyncScope(getResolveErrorBodyCallback, null, { callback, body, contentType, statusCode, statusMessage, headers } ) - return + } else { + this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + trailers: this.trailers, + opaque, + body, + context + }) } - - this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - trailers: this.trailers, - opaque, - body, - context - }) } } @@ -153,33 +156,6 @@ class RequestHandler extends AsyncResource { } } -async function getResolveErrorBodyCallback ({ callback, body, contentType, statusCode, statusMessage, headers }) { - if (statusCode === 204 || !contentType) { - body.dump() - process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers)) - return - } - - try { - if (contentType.startsWith('application/json')) { - const payload = await body.json() - process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers, payload)) - return - } - - if (contentType.startsWith('text/')) { - const payload = await body.text() - process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers, payload)) - return - } - } catch (err) { - // Process in a fallback if error - } - - body.dump() - process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers)) -} - function request (opts, callback) { if (callback === undefined) { return new Promise((resolve, reject) => { @@ -201,3 +177,4 @@ function request (opts, callback) { } module.exports = request +module.exports.RequestHandler = RequestHandler diff --git a/action/node_modules/undici/lib/api/api-stream.js b/action/node_modules/undici/lib/api/api-stream.js index 020fd08c..c571a6f7 100644 --- a/action/node_modules/undici/lib/api/api-stream.js +++ b/action/node_modules/undici/lib/api/api-stream.js @@ -1,12 +1,13 @@ 'use strict' -const { finished } = require('stream') +const { finished, PassThrough } = require('stream') const { InvalidArgumentError, InvalidReturnValueError, RequestAbortedError } = require('../core/errors') const util = require('../core/util') +const { getResolveErrorBodyCallback } = require('./util') const { AsyncResource } = require('async_hooks') const { addSignal, removeSignal } = require('./abort-signal') @@ -16,7 +17,7 @@ class StreamHandler extends AsyncResource { throw new InvalidArgumentError('invalid opts') } - const { signal, method, opaque, body, onInfo, responseHeaders } = opts + const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts try { if (typeof callback !== 'function') { @@ -57,6 +58,7 @@ class StreamHandler extends AsyncResource { this.trailers = null this.body = body this.onInfo = onInfo || null + this.throwOnError = throwOnError || false if (util.isStream(body)) { body.on('error', (err) => { @@ -76,52 +78,71 @@ class StreamHandler extends AsyncResource { this.context = context } - onHeaders (statusCode, rawHeaders, resume) { - const { factory, opaque, context } = this + onHeaders (statusCode, rawHeaders, resume, statusMessage) { + const { factory, opaque, context, callback, responseHeaders } = this + + const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) if (statusCode < 200) { if (this.onInfo) { - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) this.onInfo({ statusCode, headers }) } return } this.factory = null - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - const res = this.runInAsyncScope(factory, null, { - statusCode, - headers, - opaque, - context - }) - if ( - !res || - typeof res.write !== 'function' || - typeof res.end !== 'function' || - typeof res.on !== 'function' - ) { - throw new InvalidReturnValueError('expected Writable') - } + let res - res.on('drain', resume) - // TODO: Avoid finished. It registers an unecessary amount of listeners. - finished(res, { readable: false }, (err) => { - const { callback, res, opaque, trailers, abort } = this + if (this.throwOnError && statusCode >= 400) { + const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers + const contentType = parsedHeaders['content-type'] + res = new PassThrough() - this.res = null - if (err || !res.readable) { - util.destroy(res, err) + this.callback = null + this.runInAsyncScope(getResolveErrorBodyCallback, null, + { callback, body: res, contentType, statusCode, statusMessage, headers } + ) + } else { + if (factory === null) { + return } - this.callback = null - this.runInAsyncScope(callback, null, err || null, { opaque, trailers }) + res = this.runInAsyncScope(factory, null, { + statusCode, + headers, + opaque, + context + }) - if (err) { - abort() + if ( + !res || + typeof res.write !== 'function' || + typeof res.end !== 'function' || + typeof res.on !== 'function' + ) { + throw new InvalidReturnValueError('expected Writable') } - }) + + // TODO: Avoid finished. It registers an unnecessary amount of listeners. + finished(res, { readable: false }, (err) => { + const { callback, res, opaque, trailers, abort } = this + + this.res = null + if (err || !res.readable) { + util.destroy(res, err) + } + + this.callback = null + this.runInAsyncScope(callback, null, err || null, { opaque, trailers }) + + if (err) { + abort() + } + }) + } + + res.on('drain', resume) this.res = res @@ -135,7 +156,7 @@ class StreamHandler extends AsyncResource { onData (chunk) { const { res } = this - return res.write(chunk) + return res ? res.write(chunk) : true } onComplete (trailers) { @@ -143,6 +164,10 @@ class StreamHandler extends AsyncResource { removeSignal(this) + if (!res) { + return + } + this.trailers = util.parseHeaders(trailers) res.end() diff --git a/action/node_modules/undici/lib/api/readable.js b/action/node_modules/undici/lib/api/readable.js index 9c184d14..5269dfae 100644 --- a/action/node_modules/undici/lib/api/readable.js +++ b/action/node_modules/undici/lib/api/readable.js @@ -4,7 +4,7 @@ const assert = require('assert') const { Readable } = require('stream') -const { RequestAbortedError, NotSupportedError } = require('../core/errors') +const { RequestAbortedError, NotSupportedError, InvalidArgumentError } = require('../core/errors') const util = require('../core/util') const { ReadableStreamFrom, toUSVString } = require('../core/util') @@ -16,12 +16,19 @@ const kBody = Symbol('kBody') const kAbort = Symbol('abort') const kContentType = Symbol('kContentType') +const noop = () => {} + module.exports = class BodyReadable extends Readable { - constructor (resume, abort, contentType = '') { + constructor ({ + resume, + abort, + contentType = '', + highWaterMark = 64 * 1024 // Same as nodejs fs streams. + }) { super({ autoDestroy: true, read: resume, - highWaterMark: 64 * 1024 // Same as nodejs fs streams. + highWaterMark }) this._readableState.dataEmitted = false @@ -144,18 +151,50 @@ module.exports = class BodyReadable extends Readable { return this[kBody] } - async dump (opts) { + dump (opts) { let limit = opts && Number.isFinite(opts.limit) ? opts.limit : 262144 - try { - for await (const chunk of this) { - limit -= Buffer.byteLength(chunk) - if (limit < 0) { - return + const signal = opts && opts.signal + + if (signal) { + try { + if (typeof signal !== 'object' || !('aborted' in signal)) { + throw new InvalidArgumentError('signal must be an AbortSignal') } + util.throwIfAborted(signal) + } catch (err) { + return Promise.reject(err) } - } catch { - // Do nothing... } + + if (this.closed) { + return Promise.resolve(null) + } + + return new Promise((resolve, reject) => { + const signalListenerCleanup = signal + ? util.addAbortListener(signal, () => { + this.destroy() + }) + : noop + + this + .on('close', function () { + signalListenerCleanup() + if (signal && signal.aborted) { + reject(signal.reason || Object.assign(new Error('The operation was aborted'), { name: 'AbortError' })) + } else { + resolve(null) + } + }) + .on('error', noop) + .on('data', function (chunk) { + limit -= chunk.length + if (limit <= 0) { + this.destroy() + } + }) + .resume() + }) } } @@ -244,7 +283,7 @@ function consumeEnd (consume) { pos += buf.byteLength } - resolve(dst) + resolve(dst.buffer) } else if (type === 'blob') { if (!Blob) { Blob = require('buffer').Blob diff --git a/action/node_modules/undici/lib/api/util.js b/action/node_modules/undici/lib/api/util.js new file mode 100644 index 00000000..bffd7027 --- /dev/null +++ b/action/node_modules/undici/lib/api/util.js @@ -0,0 +1,46 @@ +const assert = require('assert') +const { + ResponseStatusCodeError +} = require('../core/errors') +const { toUSVString } = require('../core/util') + +async function getResolveErrorBodyCallback ({ callback, body, contentType, statusCode, statusMessage, headers }) { + assert(body) + + let chunks = [] + let limit = 0 + + for await (const chunk of body) { + chunks.push(chunk) + limit += chunk.length + if (limit > 128 * 1024) { + chunks = null + break + } + } + + if (statusCode === 204 || !contentType || !chunks) { + process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers)) + return + } + + try { + if (contentType.startsWith('application/json')) { + const payload = JSON.parse(toUSVString(Buffer.concat(chunks))) + process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers, payload)) + return + } + + if (contentType.startsWith('text/')) { + const payload = toUSVString(Buffer.concat(chunks)) + process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers, payload)) + return + } + } catch (err) { + // Process in a fallback if error + } + + process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers)) +} + +module.exports = { getResolveErrorBodyCallback } diff --git a/action/node_modules/undici/lib/cache/cache.js b/action/node_modules/undici/lib/cache/cache.js new file mode 100644 index 00000000..9b311086 --- /dev/null +++ b/action/node_modules/undici/lib/cache/cache.js @@ -0,0 +1,838 @@ +'use strict' + +const { kConstruct } = require('./symbols') +const { urlEquals, fieldValues: getFieldValues } = require('./util') +const { kEnumerableProperty, isDisturbed } = require('../core/util') +const { kHeadersList } = require('../core/symbols') +const { webidl } = require('../fetch/webidl') +const { Response, cloneResponse } = require('../fetch/response') +const { Request } = require('../fetch/request') +const { kState, kHeaders, kGuard, kRealm } = require('../fetch/symbols') +const { fetching } = require('../fetch/index') +const { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = require('../fetch/util') +const assert = require('assert') +const { getGlobalDispatcher } = require('../global') + +/** + * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation + * @typedef {Object} CacheBatchOperation + * @property {'delete' | 'put'} type + * @property {any} request + * @property {any} response + * @property {import('../../types/cache').CacheQueryOptions} options + */ + +/** + * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list + * @typedef {[any, any][]} requestResponseList + */ + +class Cache { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list + * @type {requestResponseList} + */ + #relevantRequestResponseList + + constructor () { + if (arguments[0] !== kConstruct) { + webidl.illegalConstructor() + } + + this.#relevantRequestResponseList = arguments[1] + } + + async match (request, options = {}) { + webidl.brandCheck(this, Cache) + webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.match' }) + + request = webidl.converters.RequestInfo(request) + options = webidl.converters.CacheQueryOptions(options) + + const p = await this.matchAll(request, options) + + if (p.length === 0) { + return + } + + return p[0] + } + + async matchAll (request = undefined, options = {}) { + webidl.brandCheck(this, Cache) + + if (request !== undefined) request = webidl.converters.RequestInfo(request) + options = webidl.converters.CacheQueryOptions(options) + + // 1. + let r = null + + // 2. + if (request !== undefined) { + if (request instanceof Request) { + // 2.1.1 + r = request[kState] + + // 2.1.2 + if (r.method !== 'GET' && !options.ignoreMethod) { + return [] + } + } else if (typeof request === 'string') { + // 2.2.1 + r = new Request(request)[kState] + } + } + + // 5. + // 5.1 + const responses = [] + + // 5.2 + if (request === undefined) { + // 5.2.1 + for (const requestResponse of this.#relevantRequestResponseList) { + responses.push(requestResponse[1]) + } + } else { // 5.3 + // 5.3.1 + const requestResponses = this.#queryCache(r, options) + + // 5.3.2 + for (const requestResponse of requestResponses) { + responses.push(requestResponse[1]) + } + } + + // 5.4 + // We don't implement CORs so we don't need to loop over the responses, yay! + + // 5.5.1 + const responseList = [] + + // 5.5.2 + for (const response of responses) { + // 5.5.2.1 + const responseObject = new Response(response.body?.source ?? null) + const body = responseObject[kState].body + responseObject[kState] = response + responseObject[kState].body = body + responseObject[kHeaders][kHeadersList] = response.headersList + responseObject[kHeaders][kGuard] = 'immutable' + + responseList.push(responseObject) + } + + // 6. + return Object.freeze(responseList) + } + + async add (request) { + webidl.brandCheck(this, Cache) + webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.add' }) + + request = webidl.converters.RequestInfo(request) + + // 1. + const requests = [request] + + // 2. + const responseArrayPromise = this.addAll(requests) + + // 3. + return await responseArrayPromise + } + + async addAll (requests) { + webidl.brandCheck(this, Cache) + webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.addAll' }) + + requests = webidl.converters['sequence'](requests) + + // 1. + const responsePromises = [] + + // 2. + const requestList = [] + + // 3. + for (const request of requests) { + if (typeof request === 'string') { + continue + } + + // 3.1 + const r = request[kState] + + // 3.2 + if (!urlIsHttpHttpsScheme(r.url) || r.method !== 'GET') { + throw webidl.errors.exception({ + header: 'Cache.addAll', + message: 'Expected http/s scheme when method is not GET.' + }) + } + } + + // 4. + /** @type {ReturnType[]} */ + const fetchControllers = [] + + // 5. + for (const request of requests) { + // 5.1 + const r = new Request(request)[kState] + + // 5.2 + if (!urlIsHttpHttpsScheme(r.url)) { + throw webidl.errors.exception({ + header: 'Cache.addAll', + message: 'Expected http/s scheme.' + }) + } + + // 5.4 + r.initiator = 'fetch' + r.destination = 'subresource' + + // 5.5 + requestList.push(r) + + // 5.6 + const responsePromise = createDeferredPromise() + + // 5.7 + fetchControllers.push(fetching({ + request: r, + dispatcher: getGlobalDispatcher(), + processResponse (response) { + // 1. + if (response.type === 'error' || response.status === 206 || response.status < 200 || response.status > 299) { + responsePromise.reject(webidl.errors.exception({ + header: 'Cache.addAll', + message: 'Received an invalid status code or the request failed.' + })) + } else if (response.headersList.contains('vary')) { // 2. + // 2.1 + const fieldValues = getFieldValues(response.headersList.get('vary')) + + // 2.2 + for (const fieldValue of fieldValues) { + // 2.2.1 + if (fieldValue === '*') { + responsePromise.reject(webidl.errors.exception({ + header: 'Cache.addAll', + message: 'invalid vary field value' + })) + + for (const controller of fetchControllers) { + controller.abort() + } + + return + } + } + } + }, + processResponseEndOfBody (response) { + // 1. + if (response.aborted) { + responsePromise.reject(new DOMException('aborted', 'AbortError')) + return + } + + // 2. + responsePromise.resolve(response) + } + })) + + // 5.8 + responsePromises.push(responsePromise.promise) + } + + // 6. + const p = Promise.all(responsePromises) + + // 7. + const responses = await p + + // 7.1 + const operations = [] + + // 7.2 + let index = 0 + + // 7.3 + for (const response of responses) { + // 7.3.1 + /** @type {CacheBatchOperation} */ + const operation = { + type: 'put', // 7.3.2 + request: requestList[index], // 7.3.3 + response // 7.3.4 + } + + operations.push(operation) // 7.3.5 + + index++ // 7.3.6 + } + + // 7.5 + const cacheJobPromise = createDeferredPromise() + + // 7.6.1 + let errorData = null + + // 7.6.2 + try { + this.#batchCacheOperations(operations) + } catch (e) { + errorData = e + } + + // 7.6.3 + queueMicrotask(() => { + // 7.6.3.1 + if (errorData === null) { + cacheJobPromise.resolve(undefined) + } else { + // 7.6.3.2 + cacheJobPromise.reject(errorData) + } + }) + + // 7.7 + return cacheJobPromise.promise + } + + async put (request, response) { + webidl.brandCheck(this, Cache) + webidl.argumentLengthCheck(arguments, 2, { header: 'Cache.put' }) + + request = webidl.converters.RequestInfo(request) + response = webidl.converters.Response(response) + + // 1. + let innerRequest = null + + // 2. + if (request instanceof Request) { + innerRequest = request[kState] + } else { // 3. + innerRequest = new Request(request)[kState] + } + + // 4. + if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== 'GET') { + throw webidl.errors.exception({ + header: 'Cache.put', + message: 'Expected an http/s scheme when method is not GET' + }) + } + + // 5. + const innerResponse = response[kState] + + // 6. + if (innerResponse.status === 206) { + throw webidl.errors.exception({ + header: 'Cache.put', + message: 'Got 206 status' + }) + } + + // 7. + if (innerResponse.headersList.contains('vary')) { + // 7.1. + const fieldValues = getFieldValues(innerResponse.headersList.get('vary')) + + // 7.2. + for (const fieldValue of fieldValues) { + // 7.2.1 + if (fieldValue === '*') { + throw webidl.errors.exception({ + header: 'Cache.put', + message: 'Got * vary field value' + }) + } + } + } + + // 8. + if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) { + throw webidl.errors.exception({ + header: 'Cache.put', + message: 'Response body is locked or disturbed' + }) + } + + // 9. + const clonedResponse = cloneResponse(innerResponse) + + // 10. + const bodyReadPromise = createDeferredPromise() + + // 11. + if (innerResponse.body != null) { + // 11.1 + const stream = innerResponse.body.stream + + // 11.2 + const reader = stream.getReader() + + // 11.3 + readAllBytes(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject) + } else { + bodyReadPromise.resolve(undefined) + } + + // 12. + /** @type {CacheBatchOperation[]} */ + const operations = [] + + // 13. + /** @type {CacheBatchOperation} */ + const operation = { + type: 'put', // 14. + request: innerRequest, // 15. + response: clonedResponse // 16. + } + + // 17. + operations.push(operation) + + // 19. + const bytes = await bodyReadPromise.promise + + if (clonedResponse.body != null) { + clonedResponse.body.source = bytes + } + + // 19.1 + const cacheJobPromise = createDeferredPromise() + + // 19.2.1 + let errorData = null + + // 19.2.2 + try { + this.#batchCacheOperations(operations) + } catch (e) { + errorData = e + } + + // 19.2.3 + queueMicrotask(() => { + // 19.2.3.1 + if (errorData === null) { + cacheJobPromise.resolve() + } else { // 19.2.3.2 + cacheJobPromise.reject(errorData) + } + }) + + return cacheJobPromise.promise + } + + async delete (request, options = {}) { + webidl.brandCheck(this, Cache) + webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.delete' }) + + request = webidl.converters.RequestInfo(request) + options = webidl.converters.CacheQueryOptions(options) + + /** + * @type {Request} + */ + let r = null + + if (request instanceof Request) { + r = request[kState] + + if (r.method !== 'GET' && !options.ignoreMethod) { + return false + } + } else { + assert(typeof request === 'string') + + r = new Request(request)[kState] + } + + /** @type {CacheBatchOperation[]} */ + const operations = [] + + /** @type {CacheBatchOperation} */ + const operation = { + type: 'delete', + request: r, + options + } + + operations.push(operation) + + const cacheJobPromise = createDeferredPromise() + + let errorData = null + let requestResponses + + try { + requestResponses = this.#batchCacheOperations(operations) + } catch (e) { + errorData = e + } + + queueMicrotask(() => { + if (errorData === null) { + cacheJobPromise.resolve(!!requestResponses?.length) + } else { + cacheJobPromise.reject(errorData) + } + }) + + return cacheJobPromise.promise + } + + /** + * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys + * @param {any} request + * @param {import('../../types/cache').CacheQueryOptions} options + * @returns {readonly Request[]} + */ + async keys (request = undefined, options = {}) { + webidl.brandCheck(this, Cache) + + if (request !== undefined) request = webidl.converters.RequestInfo(request) + options = webidl.converters.CacheQueryOptions(options) + + // 1. + let r = null + + // 2. + if (request !== undefined) { + // 2.1 + if (request instanceof Request) { + // 2.1.1 + r = request[kState] + + // 2.1.2 + if (r.method !== 'GET' && !options.ignoreMethod) { + return [] + } + } else if (typeof request === 'string') { // 2.2 + r = new Request(request)[kState] + } + } + + // 4. + const promise = createDeferredPromise() + + // 5. + // 5.1 + const requests = [] + + // 5.2 + if (request === undefined) { + // 5.2.1 + for (const requestResponse of this.#relevantRequestResponseList) { + // 5.2.1.1 + requests.push(requestResponse[0]) + } + } else { // 5.3 + // 5.3.1 + const requestResponses = this.#queryCache(r, options) + + // 5.3.2 + for (const requestResponse of requestResponses) { + // 5.3.2.1 + requests.push(requestResponse[0]) + } + } + + // 5.4 + queueMicrotask(() => { + // 5.4.1 + const requestList = [] + + // 5.4.2 + for (const request of requests) { + const requestObject = new Request('https://a') + requestObject[kState] = request + requestObject[kHeaders][kHeadersList] = request.headersList + requestObject[kHeaders][kGuard] = 'immutable' + requestObject[kRealm] = request.client + + // 5.4.2.1 + requestList.push(requestObject) + } + + // 5.4.3 + promise.resolve(Object.freeze(requestList)) + }) + + return promise.promise + } + + /** + * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm + * @param {CacheBatchOperation[]} operations + * @returns {requestResponseList} + */ + #batchCacheOperations (operations) { + // 1. + const cache = this.#relevantRequestResponseList + + // 2. + const backupCache = [...cache] + + // 3. + const addedItems = [] + + // 4.1 + const resultList = [] + + try { + // 4.2 + for (const operation of operations) { + // 4.2.1 + if (operation.type !== 'delete' && operation.type !== 'put') { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'operation type does not match "delete" or "put"' + }) + } + + // 4.2.2 + if (operation.type === 'delete' && operation.response != null) { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'delete operation should not have an associated response' + }) + } + + // 4.2.3 + if (this.#queryCache(operation.request, operation.options, addedItems).length) { + throw new DOMException('???', 'InvalidStateError') + } + + // 4.2.4 + let requestResponses + + // 4.2.5 + if (operation.type === 'delete') { + // 4.2.5.1 + requestResponses = this.#queryCache(operation.request, operation.options) + + // TODO: the spec is wrong, this is needed to pass WPTs + if (requestResponses.length === 0) { + return [] + } + + // 4.2.5.2 + for (const requestResponse of requestResponses) { + const idx = cache.indexOf(requestResponse) + assert(idx !== -1) + + // 4.2.5.2.1 + cache.splice(idx, 1) + } + } else if (operation.type === 'put') { // 4.2.6 + // 4.2.6.1 + if (operation.response == null) { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'put operation should have an associated response' + }) + } + + // 4.2.6.2 + const r = operation.request + + // 4.2.6.3 + if (!urlIsHttpHttpsScheme(r.url)) { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'expected http or https scheme' + }) + } + + // 4.2.6.4 + if (r.method !== 'GET') { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'not get method' + }) + } + + // 4.2.6.5 + if (operation.options != null) { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'options must not be defined' + }) + } + + // 4.2.6.6 + requestResponses = this.#queryCache(operation.request) + + // 4.2.6.7 + for (const requestResponse of requestResponses) { + const idx = cache.indexOf(requestResponse) + assert(idx !== -1) + + // 4.2.6.7.1 + cache.splice(idx, 1) + } + + // 4.2.6.8 + cache.push([operation.request, operation.response]) + + // 4.2.6.10 + addedItems.push([operation.request, operation.response]) + } + + // 4.2.7 + resultList.push([operation.request, operation.response]) + } + + // 4.3 + return resultList + } catch (e) { // 5. + // 5.1 + this.#relevantRequestResponseList.length = 0 + + // 5.2 + this.#relevantRequestResponseList = backupCache + + // 5.3 + throw e + } + } + + /** + * @see https://w3c.github.io/ServiceWorker/#query-cache + * @param {any} requestQuery + * @param {import('../../types/cache').CacheQueryOptions} options + * @param {requestResponseList} targetStorage + * @returns {requestResponseList} + */ + #queryCache (requestQuery, options, targetStorage) { + /** @type {requestResponseList} */ + const resultList = [] + + const storage = targetStorage ?? this.#relevantRequestResponseList + + for (const requestResponse of storage) { + const [cachedRequest, cachedResponse] = requestResponse + if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) { + resultList.push(requestResponse) + } + } + + return resultList + } + + /** + * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm + * @param {any} requestQuery + * @param {any} request + * @param {any | null} response + * @param {import('../../types/cache').CacheQueryOptions | undefined} options + * @returns {boolean} + */ + #requestMatchesCachedItem (requestQuery, request, response = null, options) { + // if (options?.ignoreMethod === false && request.method === 'GET') { + // return false + // } + + const queryURL = new URL(requestQuery.url) + + const cachedURL = new URL(request.url) + + if (options?.ignoreSearch) { + cachedURL.search = '' + + queryURL.search = '' + } + + if (!urlEquals(queryURL, cachedURL, true)) { + return false + } + + if ( + response == null || + options?.ignoreVary || + !response.headersList.contains('vary') + ) { + return true + } + + const fieldValues = getFieldValues(response.headersList.get('vary')) + + for (const fieldValue of fieldValues) { + if (fieldValue === '*') { + return false + } + + const requestValue = request.headersList.get(fieldValue) + const queryValue = requestQuery.headersList.get(fieldValue) + + // If one has the header and the other doesn't, or one has + // a different value than the other, return false + if (requestValue !== queryValue) { + return false + } + } + + return true + } +} + +Object.defineProperties(Cache.prototype, { + [Symbol.toStringTag]: { + value: 'Cache', + configurable: true + }, + match: kEnumerableProperty, + matchAll: kEnumerableProperty, + add: kEnumerableProperty, + addAll: kEnumerableProperty, + put: kEnumerableProperty, + delete: kEnumerableProperty, + keys: kEnumerableProperty +}) + +const cacheQueryOptionConverters = [ + { + key: 'ignoreSearch', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'ignoreMethod', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'ignoreVary', + converter: webidl.converters.boolean, + defaultValue: false + } +] + +webidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters) + +webidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([ + ...cacheQueryOptionConverters, + { + key: 'cacheName', + converter: webidl.converters.DOMString + } +]) + +webidl.converters.Response = webidl.interfaceConverter(Response) + +webidl.converters['sequence'] = webidl.sequenceConverter( + webidl.converters.RequestInfo +) + +module.exports = { + Cache +} diff --git a/action/node_modules/undici/lib/cache/cachestorage.js b/action/node_modules/undici/lib/cache/cachestorage.js new file mode 100644 index 00000000..7e7f0cff --- /dev/null +++ b/action/node_modules/undici/lib/cache/cachestorage.js @@ -0,0 +1,144 @@ +'use strict' + +const { kConstruct } = require('./symbols') +const { Cache } = require('./cache') +const { webidl } = require('../fetch/webidl') +const { kEnumerableProperty } = require('../core/util') + +class CacheStorage { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map + * @type {Map} + */ + async has (cacheName) { + webidl.brandCheck(this, CacheStorage) + webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.has' }) + + cacheName = webidl.converters.DOMString(cacheName) + + // 2.1.1 + // 2.2 + return this.#caches.has(cacheName) + } + + /** + * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open + * @param {string} cacheName + * @returns {Promise} + */ + async open (cacheName) { + webidl.brandCheck(this, CacheStorage) + webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.open' }) + + cacheName = webidl.converters.DOMString(cacheName) + + // 2.1 + if (this.#caches.has(cacheName)) { + // await caches.open('v1') !== await caches.open('v1') + + // 2.1.1 + const cache = this.#caches.get(cacheName) + + // 2.1.1.1 + return new Cache(kConstruct, cache) + } + + // 2.2 + const cache = [] + + // 2.3 + this.#caches.set(cacheName, cache) + + // 2.4 + return new Cache(kConstruct, cache) + } + + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete + * @param {string} cacheName + * @returns {Promise} + */ + async delete (cacheName) { + webidl.brandCheck(this, CacheStorage) + webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.delete' }) + + cacheName = webidl.converters.DOMString(cacheName) + + return this.#caches.delete(cacheName) + } + + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys + * @returns {string[]} + */ + async keys () { + webidl.brandCheck(this, CacheStorage) + + // 2.1 + const keys = this.#caches.keys() + + // 2.2 + return [...keys] + } +} + +Object.defineProperties(CacheStorage.prototype, { + [Symbol.toStringTag]: { + value: 'CacheStorage', + configurable: true + }, + match: kEnumerableProperty, + has: kEnumerableProperty, + open: kEnumerableProperty, + delete: kEnumerableProperty, + keys: kEnumerableProperty +}) + +module.exports = { + CacheStorage +} diff --git a/action/node_modules/undici/lib/cache/symbols.js b/action/node_modules/undici/lib/cache/symbols.js new file mode 100644 index 00000000..40448d60 --- /dev/null +++ b/action/node_modules/undici/lib/cache/symbols.js @@ -0,0 +1,5 @@ +'use strict' + +module.exports = { + kConstruct: require('../core/symbols').kConstruct +} diff --git a/action/node_modules/undici/lib/cache/util.js b/action/node_modules/undici/lib/cache/util.js new file mode 100644 index 00000000..44d52b78 --- /dev/null +++ b/action/node_modules/undici/lib/cache/util.js @@ -0,0 +1,49 @@ +'use strict' + +const assert = require('assert') +const { URLSerializer } = require('../fetch/dataURL') +const { isValidHeaderName } = require('../fetch/util') + +/** + * @see https://url.spec.whatwg.org/#concept-url-equals + * @param {URL} A + * @param {URL} B + * @param {boolean | undefined} excludeFragment + * @returns {boolean} + */ +function urlEquals (A, B, excludeFragment = false) { + const serializedA = URLSerializer(A, excludeFragment) + + const serializedB = URLSerializer(B, excludeFragment) + + return serializedA === serializedB +} + +/** + * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262 + * @param {string} header + */ +function fieldValues (header) { + assert(header !== null) + + const values = [] + + for (let value of header.split(',')) { + value = value.trim() + + if (!value.length) { + continue + } else if (!isValidHeaderName(value)) { + continue + } + + values.push(value) + } + + return values +} + +module.exports = { + urlEquals, + fieldValues +} diff --git a/action/node_modules/undici/lib/client.js b/action/node_modules/undici/lib/client.js index 46ec0b99..22cb3903 100644 --- a/action/node_modules/undici/lib/client.js +++ b/action/node_modules/undici/lib/client.js @@ -1,10 +1,15 @@ +// @ts-check + 'use strict' /* global WebAssembly */ const assert = require('assert') const net = require('net') +const http = require('http') +const { pipeline } = require('stream') const util = require('./core/util') +const timers = require('./timers') const Request = require('./core/request') const DispatcherBase = require('./dispatcher-base') const { @@ -17,7 +22,9 @@ const { SocketError, InformationalError, BodyTimeoutError, - HTTPParserError + HTTPParserError, + ResponseExceededMaxSizeError, + ClientDestroyedError } = require('./core/errors') const buildConnector = require('./core/connect') const { @@ -60,9 +67,45 @@ const { kClose, kDestroy, kDispatch, - kInterceptors + kInterceptors, + kLocalAddress, + kMaxResponseSize, + kHTTPConnVersion, + // HTTP2 + kHost, + kHTTP2Session, + kHTTP2SessionState, + kHTTP2BuildRequest, + kHTTP2CopyHeaders, + kHTTP1BuildRequest } = require('./core/symbols') +/** @type {import('http2')} */ +let http2 +try { + http2 = require('http2') +} catch { + // @ts-ignore + http2 = { constants: {} } +} + +const { + constants: { + HTTP2_HEADER_AUTHORITY, + HTTP2_HEADER_METHOD, + HTTP2_HEADER_PATH, + HTTP2_HEADER_SCHEME, + HTTP2_HEADER_CONTENT_LENGTH, + HTTP2_HEADER_EXPECT, + HTTP2_HEADER_STATUS + } +} = http2 + +// Experimental +let h2ExperimentalWarned = false + +const FastBuffer = Buffer[Symbol.species] + const kClosedResolve = Symbol('kClosedResolve') const channels = {} @@ -80,7 +123,15 @@ try { channels.connected = { hasSubscribers: false } } +/** + * @type {import('../types/client').default} + */ class Client extends DispatcherBase { + /** + * + * @param {string|URL} url + * @param {import('../types/client').Client.Options} options + */ constructor (url, { interceptors, maxHeaderSize, @@ -102,7 +153,14 @@ class Client extends DispatcherBase { maxCachedSessions, maxRedirections, connect, - maxRequestsPerClient + maxRequestsPerClient, + localAddress, + maxResponseSize, + autoSelectFamily, + autoSelectFamilyAttemptTimeout, + // h2 + allowH2, + maxConcurrentStreams } = {}) { super() @@ -170,12 +228,38 @@ class Client extends DispatcherBase { throw new InvalidArgumentError('maxRequestsPerClient must be a positive number') } + if (localAddress != null && (typeof localAddress !== 'string' || net.isIP(localAddress) === 0)) { + throw new InvalidArgumentError('localAddress must be valid string IP address') + } + + if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) { + throw new InvalidArgumentError('maxResponseSize must be a positive number') + } + + if ( + autoSelectFamilyAttemptTimeout != null && + (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1) + ) { + throw new InvalidArgumentError('autoSelectFamilyAttemptTimeout must be a positive number') + } + + // h2 + if (allowH2 != null && typeof allowH2 !== 'boolean') { + throw new InvalidArgumentError('allowH2 must be a valid boolean value') + } + + if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== 'number' || maxConcurrentStreams < 1)) { + throw new InvalidArgumentError('maxConcurrentStreams must be a possitive integer, greater than 0') + } + if (typeof connect !== 'function') { connect = buildConnector({ ...tls, maxCachedSessions, + allowH2, socketPath, timeout: connectTimeout, + ...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), ...connect }) } @@ -187,21 +271,35 @@ class Client extends DispatcherBase { this[kConnector] = connect this[kSocket] = null this[kPipelining] = pipelining != null ? pipelining : 1 - this[kMaxHeadersSize] = maxHeaderSize || 16384 + this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600e3 : keepAliveMaxTimeout this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 1e3 : keepAliveTimeoutThreshold this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout] this[kServerName] = null + this[kLocalAddress] = localAddress != null ? localAddress : null this[kResuming] = 0 // 0, idle, 1, scheduled, 2 resuming this[kNeedDrain] = 0 // 0, idle, 1, scheduled, 2 resuming this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}\r\n` - this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 30e3 - this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 30e3 + this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 300e3 + this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 300e3 this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength this[kMaxRedirections] = maxRedirections this[kMaxRequests] = maxRequestsPerClient this[kClosedResolve] = null + this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1 + this[kHTTPConnVersion] = 'h1' + + // HTTP/2 + this[kHTTP2Session] = null + this[kHTTP2SessionState] = !allowH2 + ? null + : { + // streams: null, // Fixed queue of streams - For future support of `push` + openStreams: 0, // Keep track of them to decide wether or not unref the session + maxConcurrentStreams: maxConcurrentStreams != null ? maxConcurrentStreams : 100 // Max peerConcurrentStreams for a Node h2 server + } + this[kHost] = `${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}` // kQueue is built up of 3 sections separated by // the kRunningIdx and kPendingIdx indices. @@ -260,7 +358,9 @@ class Client extends DispatcherBase { [kDispatch] (opts, handler) { const origin = opts.origin || this[kUrl].origin - const request = new Request(origin, opts, handler) + const request = this[kHTTPConnVersion] === 'h2' + ? Request[kHTTP2BuildRequest](origin, opts, handler) + : Request[kHTTP1BuildRequest](origin, opts, handler) this[kQueue].push(request) if (this[kResuming]) { @@ -281,9 +381,11 @@ class Client extends DispatcherBase { } async [kClose] () { + // TODO: for H2 we need to gracefully flush the remaining enqueued + // request and close each stream. return new Promise((resolve) => { if (!this[kSize]) { - this.destroy(resolve) + resolve(null) } else { this[kClosedResolve] = resolve } @@ -300,12 +402,19 @@ class Client extends DispatcherBase { const callback = () => { if (this[kClosedResolve]) { + // TODO (fix): Should we error here with ClientDestroyedError? this[kClosedResolve]() this[kClosedResolve] = null } resolve() } + if (this[kHTTP2Session] != null) { + util.destroy(this[kHTTP2Session], err) + this[kHTTP2Session] = null + this[kHTTP2SessionState] = null + } + if (!this[kSocket]) { queueMicrotask(callback) } else { @@ -317,16 +426,74 @@ class Client extends DispatcherBase { } } +function onHttp2SessionError (err) { + assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') + + this[kSocket][kError] = err + + onError(this[kClient], err) +} + +function onHttp2FrameError (type, code, id) { + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`) + + if (id === 0) { + this[kSocket][kError] = err + onError(this[kClient], err) + } +} + +function onHttp2SessionEnd () { + util.destroy(this, new SocketError('other side closed')) + util.destroy(this[kSocket], new SocketError('other side closed')) +} + +function onHTTP2GoAway (code) { + const client = this[kClient] + const err = new InformationalError(`HTTP/2: "GOAWAY" frame received with code ${code}`) + client[kSocket] = null + client[kHTTP2Session] = null + + if (client.destroyed) { + assert(this[kPending] === 0) + + // Fail entire queue. + const requests = client[kQueue].splice(client[kRunningIdx]) + for (let i = 0; i < requests.length; i++) { + const request = requests[i] + errorRequest(this, request, err) + } + } else if (client[kRunning] > 0) { + // Fail head of pipeline. + const request = client[kQueue][client[kRunningIdx]] + client[kQueue][client[kRunningIdx]++] = null + + errorRequest(client, request, err) + } + + client[kPendingIdx] = client[kRunningIdx] + + assert(client[kRunning] === 0) + + client.emit('disconnect', + client[kUrl], + [client], + err + ) + + resume(client) +} + const constants = require('./llhttp/constants') const createRedirectInterceptor = require('./interceptor/redirectInterceptor') const EMPTY_BUF = Buffer.alloc(0) async function lazyllhttp () { - const llhttpWasmData = process.env.JEST_WORKER_ID ? require('./llhttp/llhttp.wasm.js') : undefined + const llhttpWasmData = process.env.JEST_WORKER_ID ? require('./llhttp/llhttp-wasm.js') : undefined let mod try { - mod = await WebAssembly.compile(Buffer.from(require('./llhttp/llhttp_simd.wasm.js'), 'base64')) + mod = await WebAssembly.compile(Buffer.from(require('./llhttp/llhttp_simd-wasm.js'), 'base64')) } catch (e) { /* istanbul ignore next */ @@ -334,7 +501,7 @@ async function lazyllhttp () { // being enabled, but the occurring of this other error // * https://github.com/emscripten-core/emscripten/issues/11495 // got me to remove that check to avoid breaking Node 12. - mod = await WebAssembly.compile(Buffer.from(llhttpWasmData || require('./llhttp/llhttp.wasm.js'), 'base64')) + mod = await WebAssembly.compile(Buffer.from(llhttpWasmData || require('./llhttp/llhttp-wasm.js'), 'base64')) } return await WebAssembly.instantiate(mod, { @@ -347,9 +514,8 @@ async function lazyllhttp () { }, wasm_on_status: (p, at, len) => { assert.strictEqual(currentParser.ptr, p) - const start = at - currentBufferPtr - const end = start + len - return currentParser.onStatus(currentBufferRef.slice(start, end)) || 0 + const start = at - currentBufferPtr + currentBufferRef.byteOffset + return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 }, wasm_on_message_begin: (p) => { assert.strictEqual(currentParser.ptr, p) @@ -357,15 +523,13 @@ async function lazyllhttp () { }, wasm_on_header_field: (p, at, len) => { assert.strictEqual(currentParser.ptr, p) - const start = at - currentBufferPtr - const end = start + len - return currentParser.onHeaderField(currentBufferRef.slice(start, end)) || 0 + const start = at - currentBufferPtr + currentBufferRef.byteOffset + return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 }, wasm_on_header_value: (p, at, len) => { assert.strictEqual(currentParser.ptr, p) - const start = at - currentBufferPtr - const end = start + len - return currentParser.onHeaderValue(currentBufferRef.slice(start, end)) || 0 + const start = at - currentBufferPtr + currentBufferRef.byteOffset + return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 }, wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { assert.strictEqual(currentParser.ptr, p) @@ -373,9 +537,8 @@ async function lazyllhttp () { }, wasm_on_body: (p, at, len) => { assert.strictEqual(currentParser.ptr, p) - const start = at - currentBufferPtr - const end = start + len - return currentParser.onBody(currentBufferRef.slice(start, end)) || 0 + const start = at - currentBufferPtr + currentBufferRef.byteOffset + return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 }, wasm_on_message_complete: (p) => { assert.strictEqual(currentParser.ptr, p) @@ -389,8 +552,7 @@ async function lazyllhttp () { let llhttpInstance = null let llhttpPromise = lazyllhttp() - .catch(() => { - }) +llhttpPromise.catch() let currentParser = null let currentBufferRef = null @@ -426,14 +588,16 @@ class Parser { this.keepAlive = '' this.contentLength = '' + this.connection = '' + this.maxResponseSize = client[kMaxResponseSize] } setTimeout (value, type) { this.timeoutType = type if (value !== this.timeoutValue) { - clearTimeout(this.timeout) + timers.clearTimeout(this.timeout) if (value) { - this.timeout = setTimeout(onParserTimeout, value, this) + this.timeout = timers.setTimeout(onParserTimeout, value, this) // istanbul ignore else: only for jest if (this.timeout.unref) { this.timeout.unref() @@ -533,7 +697,10 @@ class Parser { /* istanbul ignore else: difficult to make a test case for */ if (ptr) { const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0) - message = Buffer.from(llhttp.memory.buffer, ptr, len).toString() + message = + 'Response does not match the HTTP/1.1 protocol (' + + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + + ')' } throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)) } @@ -542,19 +709,6 @@ class Parser { } } - finish () { - try { - try { - currentParser = this - } finally { - currentParser = null - } - } catch (err) { - /* istanbul ignore next: difficult to make a test case for */ - util.destroy(this.socket, err) - } - } - destroy () { assert(this.ptr != null) assert(currentParser == null) @@ -562,7 +716,7 @@ class Parser { this.llhttp.llhttp_free(this.ptr) this.ptr = null - clearTimeout(this.timeout) + timers.clearTimeout(this.timeout) this.timeout = null this.timeoutValue = null this.timeoutType = null @@ -613,6 +767,8 @@ class Parser { const key = this.headers[len - 2] if (key.length === 10 && key.toString().toLowerCase() === 'keep-alive') { this.keepAlive += buf.toString() + } else if (key.length === 10 && key.toString().toLowerCase() === 'connection') { + this.connection += buf.toString() } else if (key.length === 14 && key.toString().toLowerCase() === 'content-length') { this.contentLength += buf.toString() } @@ -706,7 +862,11 @@ class Parser { assert.strictEqual(this.timeoutType, TIMEOUT_HEADERS) this.statusCode = statusCode - this.shouldKeepAlive = shouldKeepAlive + this.shouldKeepAlive = ( + shouldKeepAlive || + // Override llhttp value which does not allow keepAlive for HEAD. + (request.method === 'HEAD' && !socket[kReset] && this.connection.toLowerCase() === 'keep-alive') + ) if (this.statusCode >= 200) { const bodyTimeout = request.bodyTimeout != null @@ -736,7 +896,7 @@ class Parser { this.headers = [] this.headersSize = 0 - if (shouldKeepAlive && client[kPipelining]) { + if (this.shouldKeepAlive && client[kPipelining]) { const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null if (keepAliveTimeout != null) { @@ -757,16 +917,13 @@ class Parser { socket[kReset] = true } - let pause - try { - pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false - } catch (err) { - util.destroy(socket, err) + const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false + + if (request.aborted) { return -1 } if (request.method === 'HEAD') { - assert(socket[kReset]) return 1 } @@ -783,7 +940,7 @@ class Parser { } onBody (buf) { - const { client, socket, statusCode } = this + const { client, socket, statusCode, maxResponseSize } = this if (socket.destroyed) { return -1 @@ -802,15 +959,15 @@ class Parser { assert(statusCode >= 200) + if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { + util.destroy(socket, new ResponseExceededMaxSizeError()) + return -1 + } + this.bytesRead += buf.length - try { - if (request.onData(buf) === false) { - return constants.ERROR.PAUSED - } - } catch (err) { - util.destroy(socket, err) - return -1 + if (request.onData(buf) === false) { + return constants.ERROR.PAUSED } } @@ -835,6 +992,7 @@ class Parser { this.bytesRead = 0 this.contentLength = '' this.keepAlive = '' + this.connection = '' assert(this.headers.length % 2 === 0) this.headers = [] @@ -850,11 +1008,7 @@ class Parser { return -1 } - try { - request.onComplete(headers) - } catch (err) { - errorRequest(client, request, err) - } + request.onComplete(headers) client[kQueue][client[kRunningIdx]++] = null @@ -905,20 +1059,24 @@ function onParserTimeout (parser) { function onSocketReadable () { const { [kParser]: parser } = this - parser.readMore() + if (parser) { + parser.readMore() + } } function onSocketError (err) { - const { [kParser]: parser } = this + const { [kClient]: client, [kParser]: parser } = this assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') - // On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded - // to the user. - if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so for as a valid response. - parser.finish() - return + if (client[kHTTPConnVersion] !== 'h2') { + // On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded + // to the user. + if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) { + // We treat all incoming data so for as a valid response. + parser.onMessageComplete() + return + } } this[kError] = err @@ -947,22 +1105,31 @@ function onError (client, err) { } function onSocketEnd () { - const { [kParser]: parser } = this + const { [kParser]: parser, [kClient]: client } = this - if (parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so far as a valid response. - parser.finish() - return + if (client[kHTTPConnVersion] !== 'h2') { + if (parser.statusCode && !parser.shouldKeepAlive) { + // We treat all incoming data so far as a valid response. + parser.onMessageComplete() + return + } } util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this))) } function onSocketClose () { - const { [kClient]: client } = this + const { [kClient]: client, [kParser]: parser } = this - this[kParser].destroy() - this[kParser] = null + if (client[kHTTPConnVersion] === 'h1' && parser) { + if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) { + // We treat all incoming data so far as a valid response. + parser.onMessageComplete() + } + + this[kParser].destroy() + this[kParser] = null + } const err = this[kError] || new SocketError('closed', util.getSocketInfo(this)) @@ -1005,7 +1172,7 @@ async function connect (client) { const idx = hostname.indexOf(']') assert(idx !== -1) - const ip = hostname.substr(1, idx - 1) + const ip = hostname.substring(1, idx) assert(net.isIP(ip)) hostname = ip @@ -1020,7 +1187,8 @@ async function connect (client) { hostname, protocol, port, - servername: client[kServerName] + servername: client[kServerName], + localAddress: client[kLocalAddress] }, connector: client[kConnector] }) @@ -1033,7 +1201,8 @@ async function connect (client) { hostname, protocol, port, - servername: client[kServerName] + servername: client[kServerName], + localAddress: client[kLocalAddress] }, (err, socket) => { if (err) { reject(err) @@ -1043,32 +1212,67 @@ async function connect (client) { }) }) - if (!llhttpInstance) { - llhttpInstance = await llhttpPromise - llhttpPromise = null + if (client.destroyed) { + util.destroy(socket.on('error', () => {}), new ClientDestroyedError()) + return } client[kConnecting] = false assert(socket) - client[kSocket] = socket + const isH2 = socket.alpnProtocol === 'h2' + if (isH2) { + if (!h2ExperimentalWarned) { + h2ExperimentalWarned = true + process.emitWarning('H2 support is experimental, expect them to change at any time.', { + code: 'UNDICI-H2' + }) + } + + const session = http2.connect(client[kUrl], { + createConnection: () => socket, + peerMaxConcurrentStreams: client[kHTTP2SessionState].maxConcurrentStreams + }) + + client[kHTTPConnVersion] = 'h2' + session[kClient] = client + session[kSocket] = socket + session.on('error', onHttp2SessionError) + session.on('frameError', onHttp2FrameError) + session.on('end', onHttp2SessionEnd) + session.on('goaway', onHTTP2GoAway) + session.on('close', onSocketClose) + session.unref() + + client[kHTTP2Session] = session + socket[kHTTP2Session] = session + } else { + if (!llhttpInstance) { + llhttpInstance = await llhttpPromise + llhttpPromise = null + } + + socket[kNoRef] = false + socket[kWriting] = false + socket[kReset] = false + socket[kBlocking] = false + socket[kParser] = new Parser(client, socket, llhttpInstance) + } - socket[kNoRef] = false - socket[kWriting] = false - socket[kReset] = false - socket[kBlocking] = false - socket[kError] = null - socket[kParser] = new Parser(client, socket, llhttpInstance) - socket[kClient] = client socket[kCounter] = 0 socket[kMaxRequests] = client[kMaxRequests] + socket[kClient] = client + socket[kError] = null + socket .on('error', onSocketError) .on('readable', onSocketReadable) .on('end', onSocketEnd) .on('close', onSocketClose) + client[kSocket] = socket + if (channels.connected.hasSubscribers) { channels.connected.publish({ connectParams: { @@ -1076,7 +1280,8 @@ async function connect (client) { hostname, protocol, port, - servername: client[kServerName] + servername: client[kServerName], + localAddress: client[kLocalAddress] }, connector: client[kConnector], socket @@ -1084,6 +1289,10 @@ async function connect (client) { } client.emit('connect', client[kUrl], [client]) } catch (err) { + if (client.destroyed) { + return + } + client[kConnecting] = false if (channels.connectError.hasSubscribers) { @@ -1093,7 +1302,8 @@ async function connect (client) { hostname, protocol, port, - servername: client[kServerName] + servername: client[kServerName], + localAddress: client[kLocalAddress] }, connector: client[kConnector], error: err @@ -1145,14 +1355,15 @@ function _resume (client, sync) { return } - if (client.closed && !client[kSize]) { - client.destroy() + if (client[kClosedResolve] && !client[kSize]) { + client[kClosedResolve]() + client[kClosedResolve] = null return } const socket = client[kSocket] - if (socket) { + if (socket && !socket.destroyed && socket.alpnProtocol !== 'h2') { if (client[kSize] === 0) { if (!socket[kNoRef] && socket.unref) { socket.unref() @@ -1217,9 +1428,9 @@ function _resume (client, sync) { return } - if (!socket) { + if (!socket && !client[kHTTP2Session]) { connect(client) - continue + return } if (socket.destroyed || socket[kWriting] || socket[kReset] || socket[kBlocking]) { @@ -1240,23 +1451,7 @@ function _resume (client, sync) { return } - if (util.isStream(request.body) && util.bodyLength(request.body) === 0) { - request.body - .on('data', /* istanbul ignore next */ function () { - /* istanbul ignore next */ - assert(false) - }) - .on('error', function (err) { - errorRequest(client, request, err) - }) - .on('end', function () { - util.destroy(this) - }) - - request.body = null - } - - if (client[kRunning] > 0 && + if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && (util.isStream(request.body) || util.isAsyncIterable(request.body))) { // Request with stream or iterator body can error while other requests // are inflight and indirectly error those as well. @@ -1277,8 +1472,18 @@ function _resume (client, sync) { } } +// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2 +function shouldSendContentLength (method) { + return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT' +} + function write (client, request) { - const { body, method, path, host, upgrade, headers, blocking } = request + if (client[kHTTPConnVersion] === 'h2') { + writeH2(client, client[kHTTP2Session], request) + return + } + + const { body, method, path, host, upgrade, headers, blocking, reset } = request // https://tools.ietf.org/html/rfc7231#section-4.3.1 // https://tools.ietf.org/html/rfc7231#section-4.3.2 @@ -1300,7 +1505,9 @@ function write (client, request) { body.read(0) } - let contentLength = util.bodyLength(body) + const bodyLength = util.bodyLength(body) + + let contentLength = bodyLength if (contentLength === null) { contentLength = request.contentLength @@ -1315,7 +1522,9 @@ function write (client, request) { contentLength = null } - if (request.contentLength !== null && request.contentLength !== contentLength) { + // https://github.com/nodejs/undici/issues/2046 + // A user agent may send a Content-Length header with 0 value, this should be allowed. + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { if (client[kStrictContentLength]) { errorRequest(client, request, new RequestContentLengthMismatchError()) return false @@ -1346,7 +1555,6 @@ function write (client, request) { if (method === 'HEAD') { // https://github.com/mcollina/undici/issues/258 - // Close after a HEAD request to interop with misbehaving servers // that may send a body in the response. @@ -1360,6 +1568,10 @@ function write (client, request) { socket[kReset] = true } + if (reset != null) { + socket[kReset] = reset + } + if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) { socket[kReset] = true } @@ -1378,7 +1590,7 @@ function write (client, request) { if (upgrade) { header += `connection: upgrade\r\nupgrade: ${upgrade}\r\n` - } else if (client[kPipelining]) { + } else if (client[kPipelining] && !socket[kReset]) { header += 'connection: keep-alive\r\n' } else { header += 'connection: close\r\n' @@ -1393,19 +1605,19 @@ function write (client, request) { } /* istanbul ignore else: assertion */ - if (!body) { + if (!body || bodyLength === 0) { if (contentLength === 0) { - socket.write(`${header}content-length: 0\r\n\r\n`, 'ascii') + socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1') } else { assert(contentLength === null, 'no body must not have content length') - socket.write(`${header}\r\n`, 'ascii') + socket.write(`${header}\r\n`, 'latin1') } request.onRequestSent() } else if (util.isBuffer(body)) { assert(contentLength === body.byteLength, 'buffer body must have content length') socket.cork() - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'ascii') + socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') socket.write(body) socket.uncork() request.onBodySent(body) @@ -1430,17 +1642,311 @@ function write (client, request) { return true } -function writeStream ({ body, client, request, socket, contentLength, header, expectsPayload }) { +function writeH2 (client, session, request) { + const { body, method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request + + let headers + if (typeof reqHeaders === 'string') headers = Request[kHTTP2CopyHeaders](reqHeaders.trim()) + else headers = reqHeaders + + if (upgrade) { + errorRequest(client, request, new Error('Upgrade not supported for H2')) + return false + } + + try { + // TODO(HTTP/2): Should we call onConnect immediately or on stream ready event? + request.onConnect((err) => { + if (request.aborted || request.completed) { + return + } + + errorRequest(client, request, err || new RequestAbortedError()) + }) + } catch (err) { + errorRequest(client, request, err) + } + + if (request.aborted) { + return false + } + + /** @type {import('node:http2').ClientHttp2Stream} */ + let stream + const h2State = client[kHTTP2SessionState] + + headers[HTTP2_HEADER_AUTHORITY] = host || client[kHost] + headers[HTTP2_HEADER_METHOD] = method + + if (method === 'CONNECT') { + session.ref() + // we are already connected, streams are pending, first request + // will create a new stream. We trigger a request to create the stream and wait until + // `ready` event is triggered + // We disabled endStream to allow the user to write to the stream + stream = session.request(headers, { endStream: false, signal }) + + if (stream.id && !stream.pending) { + request.onUpgrade(null, null, stream) + ++h2State.openStreams + } else { + stream.once('ready', () => { + request.onUpgrade(null, null, stream) + ++h2State.openStreams + }) + } + + stream.once('close', () => { + h2State.openStreams -= 1 + // TODO(HTTP/2): unref only if current streams count is 0 + if (h2State.openStreams === 0) session.unref() + }) + + return true + } + + // https://tools.ietf.org/html/rfc7540#section-8.3 + // :path and :scheme headers must be omited when sending CONNECT + + headers[HTTP2_HEADER_PATH] = path + headers[HTTP2_HEADER_SCHEME] = 'https' + + // https://tools.ietf.org/html/rfc7231#section-4.3.1 + // https://tools.ietf.org/html/rfc7231#section-4.3.2 + // https://tools.ietf.org/html/rfc7231#section-4.3.5 + + // Sending a payload body on a request that does not + // expect it can cause undefined behavior on some + // servers and corrupt connection state. Do not + // re-use the connection for further requests. + + const expectsPayload = ( + method === 'PUT' || + method === 'POST' || + method === 'PATCH' + ) + + if (body && typeof body.read === 'function') { + // Try to read EOF in order to get length. + body.read(0) + } + + let contentLength = util.bodyLength(body) + + if (contentLength == null) { + contentLength = request.contentLength + } + + if (contentLength === 0 || !expectsPayload) { + // https://tools.ietf.org/html/rfc7230#section-3.3.2 + // A user agent SHOULD NOT send a Content-Length header field when + // the request message does not contain a payload body and the method + // semantics do not anticipate such a body. + + contentLength = null + } + + // https://github.com/nodejs/undici/issues/2046 + // A user agent may send a Content-Length header with 0 value, this should be allowed. + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + errorRequest(client, request, new RequestContentLengthMismatchError()) + return false + } + + process.emitWarning(new RequestContentLengthMismatchError()) + } + + if (contentLength != null) { + assert(body, 'no body must not have content length') + headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}` + } + + session.ref() + + const shouldEndStream = method === 'GET' || method === 'HEAD' + if (expectContinue) { + headers[HTTP2_HEADER_EXPECT] = '100-continue' + stream = session.request(headers, { endStream: shouldEndStream, signal }) + + stream.once('continue', writeBodyH2) + } else { + stream = session.request(headers, { + endStream: shouldEndStream, + signal + }) + writeBodyH2() + } + + // Increment counter as we have new several streams open + ++h2State.openStreams + + stream.once('response', headers => { + const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers + + if (request.onHeaders(Number(statusCode), realHeaders, stream.resume.bind(stream), '') === false) { + stream.pause() + } + }) + + stream.once('end', () => { + request.onComplete([]) + }) + + stream.on('data', (chunk) => { + if (request.onData(chunk) === false) { + stream.pause() + } + }) + + stream.once('close', () => { + h2State.openStreams -= 1 + // TODO(HTTP/2): unref only if current streams count is 0 + if (h2State.openStreams === 0) { + session.unref() + } + }) + + stream.once('error', function (err) { + if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { + h2State.streams -= 1 + util.destroy(stream, err) + } + }) + + stream.once('frameError', (type, code) => { + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`) + errorRequest(client, request, err) + + if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { + h2State.streams -= 1 + util.destroy(stream, err) + } + }) + + // stream.on('aborted', () => { + // // TODO(HTTP/2): Support aborted + // }) + + // stream.on('timeout', () => { + // // TODO(HTTP/2): Support timeout + // }) + + // stream.on('push', headers => { + // // TODO(HTTP/2): Suppor push + // }) + + // stream.on('trailers', headers => { + // // TODO(HTTP/2): Support trailers + // }) + + return true + + function writeBodyH2 () { + /* istanbul ignore else: assertion */ + if (!body) { + request.onRequestSent() + } else if (util.isBuffer(body)) { + assert(contentLength === body.byteLength, 'buffer body must have content length') + stream.cork() + stream.write(body) + stream.uncork() + stream.end() + request.onBodySent(body) + request.onRequestSent() + } else if (util.isBlobLike(body)) { + if (typeof body.stream === 'function') { + writeIterable({ + client, + request, + contentLength, + h2stream: stream, + expectsPayload, + body: body.stream(), + socket: client[kSocket], + header: '' + }) + } else { + writeBlob({ + body, + client, + request, + contentLength, + expectsPayload, + h2stream: stream, + header: '', + socket: client[kSocket] + }) + } + } else if (util.isStream(body)) { + writeStream({ + body, + client, + request, + contentLength, + expectsPayload, + socket: client[kSocket], + h2stream: stream, + header: '' + }) + } else if (util.isIterable(body)) { + writeIterable({ + body, + client, + request, + contentLength, + expectsPayload, + header: '', + h2stream: stream, + socket: client[kSocket] + }) + } else { + assert(false) + } + } +} + +function writeStream ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined') + if (client[kHTTPConnVersion] === 'h2') { + // For HTTP/2, is enough to pipe the stream + const pipe = pipeline( + body, + h2stream, + (err) => { + if (err) { + util.destroy(body, err) + util.destroy(h2stream, err) + } else { + request.onRequestSent() + } + } + ) + + pipe.on('data', onPipeData) + pipe.once('end', () => { + pipe.removeListener('data', onPipeData) + util.destroy(pipe) + }) + + function onPipeData (chunk) { + request.onBodySent(chunk) + } + + return + } + let finished = false const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }) const onData = function (chunk) { - try { - assert(!finished) + if (finished) { + return + } + try { if (!writer.write(chunk) && this.pause) { this.pause() } @@ -1449,14 +1955,20 @@ function writeStream ({ body, client, request, socket, contentLength, header, ex } } const onDrain = function () { - assert(!finished) + if (finished) { + return + } if (body.resume) { body.resume() } } const onAbort = function () { - onFinished(new RequestAbortedError()) + if (finished) { + return + } + const err = new RequestAbortedError() + queueMicrotask(() => onFinished(err)) } const onFinished = function (err) { if (finished) { @@ -1509,9 +2021,10 @@ function writeStream ({ body, client, request, socket, contentLength, header, ex .on('error', onFinished) } -async function writeBlob ({ body, client, request, socket, contentLength, header, expectsPayload }) { +async function writeBlob ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { assert(contentLength === body.size, 'blob body must have content length') + const isH2 = client[kHTTPConnVersion] === 'h2' try { if (contentLength != null && contentLength !== body.size) { throw new RequestContentLengthMismatchError() @@ -1519,10 +2032,16 @@ async function writeBlob ({ body, client, request, socket, contentLength, header const buffer = Buffer.from(await body.arrayBuffer()) - socket.cork() - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'ascii') - socket.write(buffer) - socket.uncork() + if (isH2) { + h2stream.cork() + h2stream.write(buffer) + h2stream.uncork() + } else { + socket.cork() + socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') + socket.write(buffer) + socket.uncork() + } request.onBodySent(buffer) request.onRequestSent() @@ -1533,11 +2052,11 @@ async function writeBlob ({ body, client, request, socket, contentLength, header resume(client) } catch (err) { - util.destroy(socket, err) + util.destroy(isH2 ? h2stream : socket, err) } } -async function writeIterable ({ body, client, request, socket, contentLength, header, expectsPayload }) { +async function writeIterable ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined') let callback = null @@ -1559,6 +2078,37 @@ async function writeIterable ({ body, client, request, socket, contentLength, he } }) + if (client[kHTTPConnVersion] === 'h2') { + h2stream + .on('close', onDrain) + .on('drain', onDrain) + + try { + // It's up to the user to somehow abort the async iterable. + for await (const chunk of body) { + if (socket[kError]) { + throw socket[kError] + } + + const res = h2stream.write(chunk) + request.onBodySent(chunk) + if (!res) { + await waitForDrain() + } + } + } catch (err) { + h2stream.destroy(err) + } finally { + request.onRequestSent() + h2stream.end() + h2stream + .off('close', onDrain) + .off('drain', onDrain) + } + + return + } + socket .on('close', onDrain) .on('drain', onDrain) @@ -1624,26 +2174,30 @@ class AsyncWriter { process.emitWarning(new RequestContentLengthMismatchError()) } + socket.cork() + if (bytesWritten === 0) { if (!expectsPayload) { socket[kReset] = true } if (contentLength === null) { - socket.write(`${header}transfer-encoding: chunked\r\n`, 'ascii') + socket.write(`${header}transfer-encoding: chunked\r\n`, 'latin1') } else { - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'ascii') + socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') } } if (contentLength === null) { - socket.write(`\r\n${len.toString(16)}\r\n`, 'ascii') + socket.write(`\r\n${len.toString(16)}\r\n`, 'latin1') } this.bytesWritten += len const ret = socket.write(chunk) + socket.uncork() + request.onBodySent(chunk) if (!ret) { @@ -1679,12 +2233,12 @@ class AsyncWriter { // no Transfer-Encoding is sent and the request method defines a meaning // for an enclosed payload body. - socket.write(`${header}content-length: 0\r\n\r\n`, 'ascii') + socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1') } else { - socket.write(`${header}\r\n`, 'ascii') + socket.write(`${header}\r\n`, 'latin1') } } else if (contentLength === null) { - socket.write('\r\n0\r\n\r\n', 'ascii') + socket.write('\r\n0\r\n\r\n', 'latin1') } if (contentLength !== null && bytesWritten !== contentLength) { diff --git a/action/node_modules/undici/lib/compat/dispatcher-weakref.js b/action/node_modules/undici/lib/compat/dispatcher-weakref.js index dbca8580..8cb99e21 100644 --- a/action/node_modules/undici/lib/compat/dispatcher-weakref.js +++ b/action/node_modules/undici/lib/compat/dispatcher-weakref.js @@ -22,15 +22,25 @@ class CompatFinalizer { } register (dispatcher, key) { - dispatcher.on('disconnect', () => { - if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) { - this.finalizer(key) - } - }) + if (dispatcher.on) { + dispatcher.on('disconnect', () => { + if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) { + this.finalizer(key) + } + }) + } } } module.exports = function () { + // FIXME: remove workaround when the Node bug is fixed + // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 + if (process.env.NODE_V8_COVERAGE) { + return { + WeakRef: CompatWeakRef, + FinalizationRegistry: CompatFinalizer + } + } return { WeakRef: global.WeakRef || CompatWeakRef, FinalizationRegistry: global.FinalizationRegistry || CompatFinalizer diff --git a/action/node_modules/undici/lib/cookies/constants.js b/action/node_modules/undici/lib/cookies/constants.js new file mode 100644 index 00000000..85f1fec0 --- /dev/null +++ b/action/node_modules/undici/lib/cookies/constants.js @@ -0,0 +1,12 @@ +'use strict' + +// https://wicg.github.io/cookie-store/#cookie-maximum-attribute-value-size +const maxAttributeValueSize = 1024 + +// https://wicg.github.io/cookie-store/#cookie-maximum-name-value-pair-size +const maxNameValuePairSize = 4096 + +module.exports = { + maxAttributeValueSize, + maxNameValuePairSize +} diff --git a/action/node_modules/undici/lib/cookies/index.js b/action/node_modules/undici/lib/cookies/index.js new file mode 100644 index 00000000..c9c1f28e --- /dev/null +++ b/action/node_modules/undici/lib/cookies/index.js @@ -0,0 +1,184 @@ +'use strict' + +const { parseSetCookie } = require('./parse') +const { stringify, getHeadersList } = require('./util') +const { webidl } = require('../fetch/webidl') +const { Headers } = require('../fetch/headers') + +/** + * @typedef {Object} Cookie + * @property {string} name + * @property {string} value + * @property {Date|number|undefined} expires + * @property {number|undefined} maxAge + * @property {string|undefined} domain + * @property {string|undefined} path + * @property {boolean|undefined} secure + * @property {boolean|undefined} httpOnly + * @property {'Strict'|'Lax'|'None'} sameSite + * @property {string[]} unparsed + */ + +/** + * @param {Headers} headers + * @returns {Record} + */ +function getCookies (headers) { + webidl.argumentLengthCheck(arguments, 1, { header: 'getCookies' }) + + webidl.brandCheck(headers, Headers, { strict: false }) + + const cookie = headers.get('cookie') + const out = {} + + if (!cookie) { + return out + } + + for (const piece of cookie.split(';')) { + const [name, ...value] = piece.split('=') + + out[name.trim()] = value.join('=') + } + + return out +} + +/** + * @param {Headers} headers + * @param {string} name + * @param {{ path?: string, domain?: string }|undefined} attributes + * @returns {void} + */ +function deleteCookie (headers, name, attributes) { + webidl.argumentLengthCheck(arguments, 2, { header: 'deleteCookie' }) + + webidl.brandCheck(headers, Headers, { strict: false }) + + name = webidl.converters.DOMString(name) + attributes = webidl.converters.DeleteCookieAttributes(attributes) + + // Matches behavior of + // https://github.com/denoland/deno_std/blob/63827b16330b82489a04614027c33b7904e08be5/http/cookie.ts#L278 + setCookie(headers, { + name, + value: '', + expires: new Date(0), + ...attributes + }) +} + +/** + * @param {Headers} headers + * @returns {Cookie[]} + */ +function getSetCookies (headers) { + webidl.argumentLengthCheck(arguments, 1, { header: 'getSetCookies' }) + + webidl.brandCheck(headers, Headers, { strict: false }) + + const cookies = getHeadersList(headers).cookies + + if (!cookies) { + return [] + } + + // In older versions of undici, cookies is a list of name:value. + return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair)) +} + +/** + * @param {Headers} headers + * @param {Cookie} cookie + * @returns {void} + */ +function setCookie (headers, cookie) { + webidl.argumentLengthCheck(arguments, 2, { header: 'setCookie' }) + + webidl.brandCheck(headers, Headers, { strict: false }) + + cookie = webidl.converters.Cookie(cookie) + + const str = stringify(cookie) + + if (str) { + headers.append('Set-Cookie', stringify(cookie)) + } +} + +webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([ + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: 'path', + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: 'domain', + defaultValue: null + } +]) + +webidl.converters.Cookie = webidl.dictionaryConverter([ + { + converter: webidl.converters.DOMString, + key: 'name' + }, + { + converter: webidl.converters.DOMString, + key: 'value' + }, + { + converter: webidl.nullableConverter((value) => { + if (typeof value === 'number') { + return webidl.converters['unsigned long long'](value) + } + + return new Date(value) + }), + key: 'expires', + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters['long long']), + key: 'maxAge', + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: 'domain', + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: 'path', + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters.boolean), + key: 'secure', + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters.boolean), + key: 'httpOnly', + defaultValue: null + }, + { + converter: webidl.converters.USVString, + key: 'sameSite', + allowedValues: ['Strict', 'Lax', 'None'] + }, + { + converter: webidl.sequenceConverter(webidl.converters.DOMString), + key: 'unparsed', + defaultValue: [] + } +]) + +module.exports = { + getCookies, + deleteCookie, + getSetCookies, + setCookie +} diff --git a/action/node_modules/undici/lib/cookies/parse.js b/action/node_modules/undici/lib/cookies/parse.js new file mode 100644 index 00000000..aae27503 --- /dev/null +++ b/action/node_modules/undici/lib/cookies/parse.js @@ -0,0 +1,317 @@ +'use strict' + +const { maxNameValuePairSize, maxAttributeValueSize } = require('./constants') +const { isCTLExcludingHtab } = require('./util') +const { collectASequenceOfCodePointsFast } = require('../fetch/dataURL') +const assert = require('assert') + +/** + * @description Parses the field-value attributes of a set-cookie header string. + * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 + * @param {string} header + * @returns if the header is invalid, null will be returned + */ +function parseSetCookie (header) { + // 1. If the set-cookie-string contains a %x00-08 / %x0A-1F / %x7F + // character (CTL characters excluding HTAB): Abort these steps and + // ignore the set-cookie-string entirely. + if (isCTLExcludingHtab(header)) { + return null + } + + let nameValuePair = '' + let unparsedAttributes = '' + let name = '' + let value = '' + + // 2. If the set-cookie-string contains a %x3B (";") character: + if (header.includes(';')) { + // 1. The name-value-pair string consists of the characters up to, + // but not including, the first %x3B (";"), and the unparsed- + // attributes consist of the remainder of the set-cookie-string + // (including the %x3B (";") in question). + const position = { position: 0 } + + nameValuePair = collectASequenceOfCodePointsFast(';', header, position) + unparsedAttributes = header.slice(position.position) + } else { + // Otherwise: + + // 1. The name-value-pair string consists of all the characters + // contained in the set-cookie-string, and the unparsed- + // attributes is the empty string. + nameValuePair = header + } + + // 3. If the name-value-pair string lacks a %x3D ("=") character, then + // the name string is empty, and the value string is the value of + // name-value-pair. + if (!nameValuePair.includes('=')) { + value = nameValuePair + } else { + // Otherwise, the name string consists of the characters up to, but + // not including, the first %x3D ("=") character, and the (possibly + // empty) value string consists of the characters after the first + // %x3D ("=") character. + const position = { position: 0 } + name = collectASequenceOfCodePointsFast( + '=', + nameValuePair, + position + ) + value = nameValuePair.slice(position.position + 1) + } + + // 4. Remove any leading or trailing WSP characters from the name + // string and the value string. + name = name.trim() + value = value.trim() + + // 5. If the sum of the lengths of the name string and the value string + // is more than 4096 octets, abort these steps and ignore the set- + // cookie-string entirely. + if (name.length + value.length > maxNameValuePairSize) { + return null + } + + // 6. The cookie-name is the name string, and the cookie-value is the + // value string. + return { + name, value, ...parseUnparsedAttributes(unparsedAttributes) + } +} + +/** + * Parses the remaining attributes of a set-cookie header + * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 + * @param {string} unparsedAttributes + * @param {[Object.]={}} cookieAttributeList + */ +function parseUnparsedAttributes (unparsedAttributes, cookieAttributeList = {}) { + // 1. If the unparsed-attributes string is empty, skip the rest of + // these steps. + if (unparsedAttributes.length === 0) { + return cookieAttributeList + } + + // 2. Discard the first character of the unparsed-attributes (which + // will be a %x3B (";") character). + assert(unparsedAttributes[0] === ';') + unparsedAttributes = unparsedAttributes.slice(1) + + let cookieAv = '' + + // 3. If the remaining unparsed-attributes contains a %x3B (";") + // character: + if (unparsedAttributes.includes(';')) { + // 1. Consume the characters of the unparsed-attributes up to, but + // not including, the first %x3B (";") character. + cookieAv = collectASequenceOfCodePointsFast( + ';', + unparsedAttributes, + { position: 0 } + ) + unparsedAttributes = unparsedAttributes.slice(cookieAv.length) + } else { + // Otherwise: + + // 1. Consume the remainder of the unparsed-attributes. + cookieAv = unparsedAttributes + unparsedAttributes = '' + } + + // Let the cookie-av string be the characters consumed in this step. + + let attributeName = '' + let attributeValue = '' + + // 4. If the cookie-av string contains a %x3D ("=") character: + if (cookieAv.includes('=')) { + // 1. The (possibly empty) attribute-name string consists of the + // characters up to, but not including, the first %x3D ("=") + // character, and the (possibly empty) attribute-value string + // consists of the characters after the first %x3D ("=") + // character. + const position = { position: 0 } + + attributeName = collectASequenceOfCodePointsFast( + '=', + cookieAv, + position + ) + attributeValue = cookieAv.slice(position.position + 1) + } else { + // Otherwise: + + // 1. The attribute-name string consists of the entire cookie-av + // string, and the attribute-value string is empty. + attributeName = cookieAv + } + + // 5. Remove any leading or trailing WSP characters from the attribute- + // name string and the attribute-value string. + attributeName = attributeName.trim() + attributeValue = attributeValue.trim() + + // 6. If the attribute-value is longer than 1024 octets, ignore the + // cookie-av string and return to Step 1 of this algorithm. + if (attributeValue.length > maxAttributeValueSize) { + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) + } + + // 7. Process the attribute-name and attribute-value according to the + // requirements in the following subsections. (Notice that + // attributes with unrecognized attribute-names are ignored.) + const attributeNameLowercase = attributeName.toLowerCase() + + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.1 + // If the attribute-name case-insensitively matches the string + // "Expires", the user agent MUST process the cookie-av as follows. + if (attributeNameLowercase === 'expires') { + // 1. Let the expiry-time be the result of parsing the attribute-value + // as cookie-date (see Section 5.1.1). + const expiryTime = new Date(attributeValue) + + // 2. If the attribute-value failed to parse as a cookie date, ignore + // the cookie-av. + + cookieAttributeList.expires = expiryTime + } else if (attributeNameLowercase === 'max-age') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.2 + // If the attribute-name case-insensitively matches the string "Max- + // Age", the user agent MUST process the cookie-av as follows. + + // 1. If the first character of the attribute-value is not a DIGIT or a + // "-" character, ignore the cookie-av. + const charCode = attributeValue.charCodeAt(0) + + if ((charCode < 48 || charCode > 57) && attributeValue[0] !== '-') { + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) + } + + // 2. If the remainder of attribute-value contains a non-DIGIT + // character, ignore the cookie-av. + if (!/^\d+$/.test(attributeValue)) { + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) + } + + // 3. Let delta-seconds be the attribute-value converted to an integer. + const deltaSeconds = Number(attributeValue) + + // 4. Let cookie-age-limit be the maximum age of the cookie (which + // SHOULD be 400 days or less, see Section 4.1.2.2). + + // 5. Set delta-seconds to the smaller of its present value and cookie- + // age-limit. + // deltaSeconds = Math.min(deltaSeconds * 1000, maxExpiresMs) + + // 6. If delta-seconds is less than or equal to zero (0), let expiry- + // time be the earliest representable date and time. Otherwise, let + // the expiry-time be the current date and time plus delta-seconds + // seconds. + // const expiryTime = deltaSeconds <= 0 ? Date.now() : Date.now() + deltaSeconds + + // 7. Append an attribute to the cookie-attribute-list with an + // attribute-name of Max-Age and an attribute-value of expiry-time. + cookieAttributeList.maxAge = deltaSeconds + } else if (attributeNameLowercase === 'domain') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.3 + // If the attribute-name case-insensitively matches the string "Domain", + // the user agent MUST process the cookie-av as follows. + + // 1. Let cookie-domain be the attribute-value. + let cookieDomain = attributeValue + + // 2. If cookie-domain starts with %x2E ("."), let cookie-domain be + // cookie-domain without its leading %x2E ("."). + if (cookieDomain[0] === '.') { + cookieDomain = cookieDomain.slice(1) + } + + // 3. Convert the cookie-domain to lower case. + cookieDomain = cookieDomain.toLowerCase() + + // 4. Append an attribute to the cookie-attribute-list with an + // attribute-name of Domain and an attribute-value of cookie-domain. + cookieAttributeList.domain = cookieDomain + } else if (attributeNameLowercase === 'path') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.4 + // If the attribute-name case-insensitively matches the string "Path", + // the user agent MUST process the cookie-av as follows. + + // 1. If the attribute-value is empty or if the first character of the + // attribute-value is not %x2F ("/"): + let cookiePath = '' + if (attributeValue.length === 0 || attributeValue[0] !== '/') { + // 1. Let cookie-path be the default-path. + cookiePath = '/' + } else { + // Otherwise: + + // 1. Let cookie-path be the attribute-value. + cookiePath = attributeValue + } + + // 2. Append an attribute to the cookie-attribute-list with an + // attribute-name of Path and an attribute-value of cookie-path. + cookieAttributeList.path = cookiePath + } else if (attributeNameLowercase === 'secure') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.5 + // If the attribute-name case-insensitively matches the string "Secure", + // the user agent MUST append an attribute to the cookie-attribute-list + // with an attribute-name of Secure and an empty attribute-value. + + cookieAttributeList.secure = true + } else if (attributeNameLowercase === 'httponly') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.6 + // If the attribute-name case-insensitively matches the string + // "HttpOnly", the user agent MUST append an attribute to the cookie- + // attribute-list with an attribute-name of HttpOnly and an empty + // attribute-value. + + cookieAttributeList.httpOnly = true + } else if (attributeNameLowercase === 'samesite') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.7 + // If the attribute-name case-insensitively matches the string + // "SameSite", the user agent MUST process the cookie-av as follows: + + // 1. Let enforcement be "Default". + let enforcement = 'Default' + + const attributeValueLowercase = attributeValue.toLowerCase() + // 2. If cookie-av's attribute-value is a case-insensitive match for + // "None", set enforcement to "None". + if (attributeValueLowercase.includes('none')) { + enforcement = 'None' + } + + // 3. If cookie-av's attribute-value is a case-insensitive match for + // "Strict", set enforcement to "Strict". + if (attributeValueLowercase.includes('strict')) { + enforcement = 'Strict' + } + + // 4. If cookie-av's attribute-value is a case-insensitive match for + // "Lax", set enforcement to "Lax". + if (attributeValueLowercase.includes('lax')) { + enforcement = 'Lax' + } + + // 5. Append an attribute to the cookie-attribute-list with an + // attribute-name of "SameSite" and an attribute-value of + // enforcement. + cookieAttributeList.sameSite = enforcement + } else { + cookieAttributeList.unparsed ??= [] + + cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`) + } + + // 8. Return to Step 1 of this algorithm. + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) +} + +module.exports = { + parseSetCookie, + parseUnparsedAttributes +} diff --git a/action/node_modules/undici/lib/cookies/util.js b/action/node_modules/undici/lib/cookies/util.js new file mode 100644 index 00000000..2290329f --- /dev/null +++ b/action/node_modules/undici/lib/cookies/util.js @@ -0,0 +1,291 @@ +'use strict' + +const assert = require('assert') +const { kHeadersList } = require('../core/symbols') + +function isCTLExcludingHtab (value) { + if (value.length === 0) { + return false + } + + for (const char of value) { + const code = char.charCodeAt(0) + + if ( + (code >= 0x00 || code <= 0x08) || + (code >= 0x0A || code <= 0x1F) || + code === 0x7F + ) { + return false + } + } +} + +/** + CHAR = + token = 1* + separators = "(" | ")" | "<" | ">" | "@" + | "," | ";" | ":" | "\" | <"> + | "/" | "[" | "]" | "?" | "=" + | "{" | "}" | SP | HT + * @param {string} name + */ +function validateCookieName (name) { + for (const char of name) { + const code = char.charCodeAt(0) + + if ( + (code <= 0x20 || code > 0x7F) || + char === '(' || + char === ')' || + char === '>' || + char === '<' || + char === '@' || + char === ',' || + char === ';' || + char === ':' || + char === '\\' || + char === '"' || + char === '/' || + char === '[' || + char === ']' || + char === '?' || + char === '=' || + char === '{' || + char === '}' + ) { + throw new Error('Invalid cookie name') + } + } +} + +/** + cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) + cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E + ; US-ASCII characters excluding CTLs, + ; whitespace DQUOTE, comma, semicolon, + ; and backslash + * @param {string} value + */ +function validateCookieValue (value) { + for (const char of value) { + const code = char.charCodeAt(0) + + if ( + code < 0x21 || // exclude CTLs (0-31) + code === 0x22 || + code === 0x2C || + code === 0x3B || + code === 0x5C || + code > 0x7E // non-ascii + ) { + throw new Error('Invalid header value') + } + } +} + +/** + * path-value = + * @param {string} path + */ +function validateCookiePath (path) { + for (const char of path) { + const code = char.charCodeAt(0) + + if (code < 0x21 || char === ';') { + throw new Error('Invalid cookie path') + } + } +} + +/** + * I have no idea why these values aren't allowed to be honest, + * but Deno tests these. - Khafra + * @param {string} domain + */ +function validateCookieDomain (domain) { + if ( + domain.startsWith('-') || + domain.endsWith('.') || + domain.endsWith('-') + ) { + throw new Error('Invalid cookie domain') + } +} + +/** + * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1 + * @param {number|Date} date + IMF-fixdate = day-name "," SP date1 SP time-of-day SP GMT + ; fixed length/zone/capitalization subset of the format + ; see Section 3.3 of [RFC5322] + + day-name = %x4D.6F.6E ; "Mon", case-sensitive + / %x54.75.65 ; "Tue", case-sensitive + / %x57.65.64 ; "Wed", case-sensitive + / %x54.68.75 ; "Thu", case-sensitive + / %x46.72.69 ; "Fri", case-sensitive + / %x53.61.74 ; "Sat", case-sensitive + / %x53.75.6E ; "Sun", case-sensitive + date1 = day SP month SP year + ; e.g., 02 Jun 1982 + + day = 2DIGIT + month = %x4A.61.6E ; "Jan", case-sensitive + / %x46.65.62 ; "Feb", case-sensitive + / %x4D.61.72 ; "Mar", case-sensitive + / %x41.70.72 ; "Apr", case-sensitive + / %x4D.61.79 ; "May", case-sensitive + / %x4A.75.6E ; "Jun", case-sensitive + / %x4A.75.6C ; "Jul", case-sensitive + / %x41.75.67 ; "Aug", case-sensitive + / %x53.65.70 ; "Sep", case-sensitive + / %x4F.63.74 ; "Oct", case-sensitive + / %x4E.6F.76 ; "Nov", case-sensitive + / %x44.65.63 ; "Dec", case-sensitive + year = 4DIGIT + + GMT = %x47.4D.54 ; "GMT", case-sensitive + + time-of-day = hour ":" minute ":" second + ; 00:00:00 - 23:59:60 (leap second) + + hour = 2DIGIT + minute = 2DIGIT + second = 2DIGIT + */ +function toIMFDate (date) { + if (typeof date === 'number') { + date = new Date(date) + } + + const days = [ + 'Sun', 'Mon', 'Tue', 'Wed', + 'Thu', 'Fri', 'Sat' + ] + + const months = [ + 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', + 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' + ] + + const dayName = days[date.getUTCDay()] + const day = date.getUTCDate().toString().padStart(2, '0') + const month = months[date.getUTCMonth()] + const year = date.getUTCFullYear() + const hour = date.getUTCHours().toString().padStart(2, '0') + const minute = date.getUTCMinutes().toString().padStart(2, '0') + const second = date.getUTCSeconds().toString().padStart(2, '0') + + return `${dayName}, ${day} ${month} ${year} ${hour}:${minute}:${second} GMT` +} + +/** + max-age-av = "Max-Age=" non-zero-digit *DIGIT + ; In practice, both expires-av and max-age-av + ; are limited to dates representable by the + ; user agent. + * @param {number} maxAge + */ +function validateCookieMaxAge (maxAge) { + if (maxAge < 0) { + throw new Error('Invalid cookie max-age') + } +} + +/** + * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1 + * @param {import('./index').Cookie} cookie + */ +function stringify (cookie) { + if (cookie.name.length === 0) { + return null + } + + validateCookieName(cookie.name) + validateCookieValue(cookie.value) + + const out = [`${cookie.name}=${cookie.value}`] + + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.1 + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.2 + if (cookie.name.startsWith('__Secure-')) { + cookie.secure = true + } + + if (cookie.name.startsWith('__Host-')) { + cookie.secure = true + cookie.domain = null + cookie.path = '/' + } + + if (cookie.secure) { + out.push('Secure') + } + + if (cookie.httpOnly) { + out.push('HttpOnly') + } + + if (typeof cookie.maxAge === 'number') { + validateCookieMaxAge(cookie.maxAge) + out.push(`Max-Age=${cookie.maxAge}`) + } + + if (cookie.domain) { + validateCookieDomain(cookie.domain) + out.push(`Domain=${cookie.domain}`) + } + + if (cookie.path) { + validateCookiePath(cookie.path) + out.push(`Path=${cookie.path}`) + } + + if (cookie.expires && cookie.expires.toString() !== 'Invalid Date') { + out.push(`Expires=${toIMFDate(cookie.expires)}`) + } + + if (cookie.sameSite) { + out.push(`SameSite=${cookie.sameSite}`) + } + + for (const part of cookie.unparsed) { + if (!part.includes('=')) { + throw new Error('Invalid unparsed') + } + + const [key, ...value] = part.split('=') + + out.push(`${key.trim()}=${value.join('=')}`) + } + + return out.join('; ') +} + +let kHeadersListNode + +function getHeadersList (headers) { + if (headers[kHeadersList]) { + return headers[kHeadersList] + } + + if (!kHeadersListNode) { + kHeadersListNode = Object.getOwnPropertySymbols(headers).find( + (symbol) => symbol.description === 'headers list' + ) + + assert(kHeadersListNode, 'Headers cannot be parsed') + } + + const headersList = headers[kHeadersListNode] + assert(headersList) + + return headersList +} + +module.exports = { + isCTLExcludingHtab, + stringify, + getHeadersList +} diff --git a/action/node_modules/undici/lib/core/connect.js b/action/node_modules/undici/lib/core/connect.js index e9b456f8..33091173 100644 --- a/action/node_modules/undici/lib/core/connect.js +++ b/action/node_modules/undici/lib/core/connect.js @@ -4,6 +4,7 @@ const net = require('net') const assert = require('assert') const util = require('./util') const { InvalidArgumentError, ConnectTimeoutError } = require('./errors') + let tls // include tls conditionally since it is not always available // TODO: session re-use does not wait for the first @@ -11,17 +12,77 @@ let tls // include tls conditionally since it is not always available // resolve the same servername multiple times even when // re-use is enabled. -function buildConnector ({ maxCachedSessions, socketPath, timeout, ...opts }) { +let SessionCache +// FIXME: remove workaround when the Node bug is fixed +// https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 +if (global.FinalizationRegistry && !process.env.NODE_V8_COVERAGE) { + SessionCache = class WeakSessionCache { + constructor (maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions + this._sessionCache = new Map() + this._sessionRegistry = new global.FinalizationRegistry((key) => { + if (this._sessionCache.size < this._maxCachedSessions) { + return + } + + const ref = this._sessionCache.get(key) + if (ref !== undefined && ref.deref() === undefined) { + this._sessionCache.delete(key) + } + }) + } + + get (sessionKey) { + const ref = this._sessionCache.get(sessionKey) + return ref ? ref.deref() : null + } + + set (sessionKey, session) { + if (this._maxCachedSessions === 0) { + return + } + + this._sessionCache.set(sessionKey, new WeakRef(session)) + this._sessionRegistry.register(session, sessionKey) + } + } +} else { + SessionCache = class SimpleSessionCache { + constructor (maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions + this._sessionCache = new Map() + } + + get (sessionKey) { + return this._sessionCache.get(sessionKey) + } + + set (sessionKey, session) { + if (this._maxCachedSessions === 0) { + return + } + + if (this._sessionCache.size >= this._maxCachedSessions) { + // remove the oldest session + const { value: oldestKey } = this._sessionCache.keys().next() + this._sessionCache.delete(oldestKey) + } + + this._sessionCache.set(sessionKey, session) + } + } +} + +function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, ...opts }) { if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { throw new InvalidArgumentError('maxCachedSessions must be a positive integer or zero') } const options = { path: socketPath, ...opts } - const sessionCache = new Map() + const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions) timeout = timeout == null ? 10e3 : timeout - maxCachedSessions = maxCachedSessions == null ? 100 : maxCachedSessions - - return function connect ({ hostname, host, protocol, port, servername, httpSocket }, callback) { + allowH2 = allowH2 != null ? allowH2 : false + return function connect ({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { let socket if (protocol === 'https:') { if (!tls) { @@ -39,6 +100,9 @@ function buildConnector ({ maxCachedSessions, socketPath, timeout, ...opts }) { ...options, servername, session, + localAddress, + // TODO(HTTP/2): Add support for h2c + ALPNProtocols: allowH2 ? ['http/1.1', 'h2'] : ['http/1.1'], socket: httpSocket, // upgrade socket connection port: port || 443, host: hostname @@ -46,35 +110,26 @@ function buildConnector ({ maxCachedSessions, socketPath, timeout, ...opts }) { socket .on('session', function (session) { - // cache is disabled - if (maxCachedSessions === 0) { - return - } - - if (sessionCache.size >= maxCachedSessions) { - // remove the oldest session - const { value: oldestKey } = sessionCache.keys().next() - sessionCache.delete(oldestKey) - } - + // TODO (fix): Can a session become invalid once established? Don't think so? sessionCache.set(sessionKey, session) }) - .on('error', function (err) { - if (sessionKey && err.code !== 'UND_ERR_INFO') { - // TODO (fix): Only delete for session related errors. - sessionCache.delete(sessionKey) - } - }) } else { assert(!httpSocket, 'httpSocket can only be sent on TLS update') socket = net.connect({ highWaterMark: 64 * 1024, // Same as nodejs fs streams. ...options, + localAddress, port: port || 80, host: hostname }) } + // Set TCP keep alive options on the socket here instead of in connect() for the case of assigning the socket + if (options.keepAlive == null || options.keepAlive) { + const keepAliveInitialDelay = options.keepAliveInitialDelay === undefined ? 60e3 : options.keepAliveInitialDelay + socket.setKeepAlive(true, keepAliveInitialDelay) + } + const cancelTimeout = setupTimeout(() => onConnectTimeout(socket), timeout) socket diff --git a/action/node_modules/undici/lib/core/constants.js b/action/node_modules/undici/lib/core/constants.js new file mode 100644 index 00000000..6ec770dd --- /dev/null +++ b/action/node_modules/undici/lib/core/constants.js @@ -0,0 +1,118 @@ +'use strict' + +/** @type {Record} */ +const headerNameLowerCasedRecord = {} + +// https://developer.mozilla.org/docs/Web/HTTP/Headers +const wellknownHeaderNames = [ + 'Accept', + 'Accept-Encoding', + 'Accept-Language', + 'Accept-Ranges', + 'Access-Control-Allow-Credentials', + 'Access-Control-Allow-Headers', + 'Access-Control-Allow-Methods', + 'Access-Control-Allow-Origin', + 'Access-Control-Expose-Headers', + 'Access-Control-Max-Age', + 'Access-Control-Request-Headers', + 'Access-Control-Request-Method', + 'Age', + 'Allow', + 'Alt-Svc', + 'Alt-Used', + 'Authorization', + 'Cache-Control', + 'Clear-Site-Data', + 'Connection', + 'Content-Disposition', + 'Content-Encoding', + 'Content-Language', + 'Content-Length', + 'Content-Location', + 'Content-Range', + 'Content-Security-Policy', + 'Content-Security-Policy-Report-Only', + 'Content-Type', + 'Cookie', + 'Cross-Origin-Embedder-Policy', + 'Cross-Origin-Opener-Policy', + 'Cross-Origin-Resource-Policy', + 'Date', + 'Device-Memory', + 'Downlink', + 'ECT', + 'ETag', + 'Expect', + 'Expect-CT', + 'Expires', + 'Forwarded', + 'From', + 'Host', + 'If-Match', + 'If-Modified-Since', + 'If-None-Match', + 'If-Range', + 'If-Unmodified-Since', + 'Keep-Alive', + 'Last-Modified', + 'Link', + 'Location', + 'Max-Forwards', + 'Origin', + 'Permissions-Policy', + 'Pragma', + 'Proxy-Authenticate', + 'Proxy-Authorization', + 'RTT', + 'Range', + 'Referer', + 'Referrer-Policy', + 'Refresh', + 'Retry-After', + 'Sec-WebSocket-Accept', + 'Sec-WebSocket-Extensions', + 'Sec-WebSocket-Key', + 'Sec-WebSocket-Protocol', + 'Sec-WebSocket-Version', + 'Server', + 'Server-Timing', + 'Service-Worker-Allowed', + 'Service-Worker-Navigation-Preload', + 'Set-Cookie', + 'SourceMap', + 'Strict-Transport-Security', + 'Supports-Loading-Mode', + 'TE', + 'Timing-Allow-Origin', + 'Trailer', + 'Transfer-Encoding', + 'Upgrade', + 'Upgrade-Insecure-Requests', + 'User-Agent', + 'Vary', + 'Via', + 'WWW-Authenticate', + 'X-Content-Type-Options', + 'X-DNS-Prefetch-Control', + 'X-Frame-Options', + 'X-Permitted-Cross-Domain-Policies', + 'X-Powered-By', + 'X-Requested-With', + 'X-XSS-Protection' +] + +for (let i = 0; i < wellknownHeaderNames.length; ++i) { + const key = wellknownHeaderNames[i] + const lowerCasedKey = key.toLowerCase() + headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = + lowerCasedKey +} + +// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. +Object.setPrototypeOf(headerNameLowerCasedRecord, null) + +module.exports = { + wellknownHeaderNames, + headerNameLowerCasedRecord +} diff --git a/action/node_modules/undici/lib/core/errors.js b/action/node_modules/undici/lib/core/errors.js index 1f87dbf5..7af704b4 100644 --- a/action/node_modules/undici/lib/core/errors.js +++ b/action/node_modules/undici/lib/core/errors.js @@ -183,6 +183,29 @@ class HTTPParserError extends Error { } } +class ResponseExceededMaxSizeError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, ResponseExceededMaxSizeError) + this.name = 'ResponseExceededMaxSizeError' + this.message = message || 'Response content exceeded max size' + this.code = 'UND_ERR_RES_EXCEEDED_MAX_SIZE' + } +} + +class RequestRetryError extends UndiciError { + constructor (message, code, { headers, data }) { + super(message) + Error.captureStackTrace(this, RequestRetryError) + this.name = 'RequestRetryError' + this.message = message || 'Request retry error' + this.code = 'UND_ERR_REQ_RETRY' + this.statusCode = code + this.data = data + this.headers = headers + } +} + module.exports = { HTTPParserError, UndiciError, @@ -201,5 +224,7 @@ module.exports = { SocketError, NotSupportedError, ResponseContentLengthMismatchError, - BalancedPoolMissingUpstreamError + BalancedPoolMissingUpstreamError, + ResponseExceededMaxSizeError, + RequestRetryError } diff --git a/action/node_modules/undici/lib/core/request.js b/action/node_modules/undici/lib/core/request.js index b05a16d7..3697e6a3 100644 --- a/action/node_modules/undici/lib/core/request.js +++ b/action/node_modules/undici/lib/core/request.js @@ -5,6 +5,7 @@ const { NotSupportedError } = require('./errors') const assert = require('assert') +const { kHTTP2BuildRequest, kHTTP2CopyHeaders, kHTTP1BuildRequest } = require('./symbols') const util = require('./util') // tokenRegExp and headerCharRegex have been lifted from @@ -34,10 +35,6 @@ const channels = {} let extractBody -const nodeVersion = process.versions.node.split('.') -const nodeMajor = Number(nodeVersion[0]) -const nodeMinor = Number(nodeVersion[1]) - try { const diagnosticsChannel = require('diagnostics_channel') channels.create = diagnosticsChannel.channel('undici:request:create') @@ -65,7 +62,9 @@ class Request { upgrade, headersTimeout, bodyTimeout, - throwOnError + reset, + throwOnError, + expectContinue }, handler) { if (typeof path !== 'string') { throw new InvalidArgumentError('path must be a string') @@ -97,6 +96,14 @@ class Request { throw new InvalidArgumentError('invalid bodyTimeout') } + if (reset != null && typeof reset !== 'boolean') { + throw new InvalidArgumentError('invalid reset') + } + + if (expectContinue != null && typeof expectContinue !== 'boolean') { + throw new InvalidArgumentError('invalid expectContinue') + } + this.headersTimeout = headersTimeout this.bodyTimeout = bodyTimeout @@ -105,10 +112,29 @@ class Request { this.method = method + this.abort = null + if (body == null) { this.body = null } else if (util.isStream(body)) { this.body = body + + const rState = this.body._readableState + if (!rState || !rState.autoDestroy) { + this.endHandler = function autoDestroy () { + util.destroy(this) + } + this.body.on('end', this.endHandler) + } + + this.errorHandler = err => { + if (this.abort) { + this.abort(err) + } else { + this.error = err + } + } + this.body.on('error', this.errorHandler) } else if (util.isBuffer(body)) { this.body = body.byteLength ? body : null } else if (ArrayBuffer.isView(body)) { @@ -139,6 +165,8 @@ class Request { this.blocking = blocking == null ? false : blocking + this.reset = reset == null ? null : reset + this.host = null this.contentLength = null @@ -147,6 +175,9 @@ class Request { this.headers = '' + // Only for H2 + this.expectContinue = expectContinue != null ? expectContinue : false + if (Array.isArray(headers)) { if (headers.length % 2 !== 0) { throw new InvalidArgumentError('headers array must be even') @@ -165,7 +196,7 @@ class Request { } if (util.isFormDataLike(this.body)) { - if (nodeMajor < 16 || (nodeMajor === 16 && nodeMinor < 8)) { + if (util.nodeMajor < 16 || (util.nodeMajor === 16 && util.nodeMinor < 8)) { throw new InvalidArgumentError('Form-Data bodies are only supported in node v16.8 and newer.') } @@ -179,6 +210,7 @@ class Request { this.headers += `content-type: ${contentType}\r\n` } this.body = bodyStream.stream + this.contentLength = bodyStream.length } else if (util.isBlobLike(body) && this.contentType == null && body.type) { this.contentType = body.type this.headers += `content-type: ${body.type}\r\n` @@ -198,9 +230,9 @@ class Request { onBodySent (chunk) { if (this[kHandler].onBodySent) { try { - this[kHandler].onBodySent(chunk) + return this[kHandler].onBodySent(chunk) } catch (err) { - this.onError(err) + this.abort(err) } } } @@ -209,13 +241,26 @@ class Request { if (channels.bodySent.hasSubscribers) { channels.bodySent.publish({ request: this }) } + + if (this[kHandler].onRequestSent) { + try { + return this[kHandler].onRequestSent() + } catch (err) { + this.abort(err) + } + } } onConnect (abort) { assert(!this.aborted) assert(!this.completed) - return this[kHandler].onConnect(abort) + if (this.error) { + abort(this.error) + } else { + this.abort = abort + return this[kHandler].onConnect(abort) + } } onHeaders (statusCode, headers, resume, statusText) { @@ -226,14 +271,23 @@ class Request { channels.headers.publish({ request: this, response: { statusCode, headers, statusText } }) } - return this[kHandler].onHeaders(statusCode, headers, resume, statusText) + try { + return this[kHandler].onHeaders(statusCode, headers, resume, statusText) + } catch (err) { + this.abort(err) + } } onData (chunk) { assert(!this.aborted) assert(!this.completed) - return this[kHandler].onData(chunk) + try { + return this[kHandler].onData(chunk) + } catch (err) { + this.abort(err) + return false + } } onUpgrade (statusCode, headers, socket) { @@ -244,16 +298,26 @@ class Request { } onComplete (trailers) { + this.onFinally() + assert(!this.aborted) this.completed = true if (channels.trailers.hasSubscribers) { channels.trailers.publish({ request: this, trailers }) } - return this[kHandler].onComplete(trailers) + + try { + return this[kHandler].onComplete(trailers) + } catch (err) { + // TODO (fix): This might be a bad idea? + this.onError(err) + } } onError (error) { + this.onFinally() + if (channels.error.hasSubscribers) { channels.error.publish({ request: this, error }) } @@ -262,18 +326,96 @@ class Request { return } this.aborted = true + return this[kHandler].onError(error) } + onFinally () { + if (this.errorHandler) { + this.body.off('error', this.errorHandler) + this.errorHandler = null + } + + if (this.endHandler) { + this.body.off('end', this.endHandler) + this.endHandler = null + } + } + + // TODO: adjust to support H2 addHeader (key, value) { processHeader(this, key, value) return this } + + static [kHTTP1BuildRequest] (origin, opts, handler) { + // TODO: Migrate header parsing here, to make Requests + // HTTP agnostic + return new Request(origin, opts, handler) + } + + static [kHTTP2BuildRequest] (origin, opts, handler) { + const headers = opts.headers + opts = { ...opts, headers: null } + + const request = new Request(origin, opts, handler) + + request.headers = {} + + if (Array.isArray(headers)) { + if (headers.length % 2 !== 0) { + throw new InvalidArgumentError('headers array must be even') + } + for (let i = 0; i < headers.length; i += 2) { + processHeader(request, headers[i], headers[i + 1], true) + } + } else if (headers && typeof headers === 'object') { + const keys = Object.keys(headers) + for (let i = 0; i < keys.length; i++) { + const key = keys[i] + processHeader(request, key, headers[key], true) + } + } else if (headers != null) { + throw new InvalidArgumentError('headers must be an object or an array') + } + + return request + } + + static [kHTTP2CopyHeaders] (raw) { + const rawHeaders = raw.split('\r\n') + const headers = {} + + for (const header of rawHeaders) { + const [key, value] = header.split(': ') + + if (value == null || value.length === 0) continue + + if (headers[key]) headers[key] += `,${value}` + else headers[key] = value + } + + return headers + } } -function processHeader (request, key, val) { +function processHeaderValue (key, val, skipAppend) { if (val && typeof val === 'object') { throw new InvalidArgumentError(`invalid ${key} header`) + } + + val = val != null ? `${val}` : '' + + if (headerCharRegex.exec(val) !== null) { + throw new InvalidArgumentError(`invalid ${key} header`) + } + + return skipAppend ? val : `${key}: ${val}\r\n` +} + +function processHeader (request, key, val, skipAppend = false) { + if (val && (typeof val === 'object' && !Array.isArray(val))) { + throw new InvalidArgumentError(`invalid ${key} header`) } else if (val === undefined) { return } @@ -283,6 +425,9 @@ function processHeader (request, key, val) { key.length === 4 && key.toLowerCase() === 'host' ) { + if (headerCharRegex.exec(val) !== null) { + throw new InvalidArgumentError(`invalid ${key} header`) + } // Consumed by Client request.host = val } else if ( @@ -297,11 +442,11 @@ function processHeader (request, key, val) { } else if ( request.contentType === null && key.length === 12 && - key.toLowerCase() === 'content-type' && - headerCharRegex.exec(val) === null + key.toLowerCase() === 'content-type' ) { request.contentType = val - request.headers += `${key}: ${val}\r\n` + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend) + else request.headers += processHeaderValue(key, val) } else if ( key.length === 17 && key.toLowerCase() === 'transfer-encoding' @@ -311,7 +456,12 @@ function processHeader (request, key, val) { key.length === 10 && key.toLowerCase() === 'connection' ) { - throw new InvalidArgumentError('invalid connection header') + const value = typeof val === 'string' ? val.toLowerCase() : null + if (value !== 'close' && value !== 'keep-alive') { + throw new InvalidArgumentError('invalid connection header') + } else if (value === 'close') { + request.reset = true + } } else if ( key.length === 10 && key.toLowerCase() === 'keep-alive' @@ -329,10 +479,20 @@ function processHeader (request, key, val) { throw new NotSupportedError('expect header not supported') } else if (tokenRegExp.exec(key) === null) { throw new InvalidArgumentError('invalid header key') - } else if (headerCharRegex.exec(val) !== null) { - throw new InvalidArgumentError(`invalid ${key} header`) } else { - request.headers += `${key}: ${val}\r\n` + if (Array.isArray(val)) { + for (let i = 0; i < val.length; i++) { + if (skipAppend) { + if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val[i], skipAppend)}` + else request.headers[key] = processHeaderValue(key, val[i], skipAppend) + } else { + request.headers += processHeaderValue(key, val[i]) + } + } + } else { + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend) + else request.headers += processHeaderValue(key, val) + } } } diff --git a/action/node_modules/undici/lib/core/symbols.js b/action/node_modules/undici/lib/core/symbols.js index 34e4b9fd..68d8566f 100644 --- a/action/node_modules/undici/lib/core/symbols.js +++ b/action/node_modules/undici/lib/core/symbols.js @@ -17,6 +17,7 @@ module.exports = { kHeadersTimeout: Symbol('headers timeout'), kBodyTimeout: Symbol('body timeout'), kServerName: Symbol('server name'), + kLocalAddress: Symbol('local address'), kHost: Symbol('host'), kNoRef: Symbol('no ref'), kBodyUsed: Symbol('used'), @@ -31,7 +32,7 @@ module.exports = { kClosed: Symbol('closed'), kNeedDrain: Symbol('need drain'), kReset: Symbol('reset'), - kDestroyed: Symbol('destroyed'), + kDestroyed: Symbol.for('nodejs.stream.destroyed'), kMaxHeadersSize: Symbol('max headers size'), kRunningIdx: Symbol('running index'), kPendingIdx: Symbol('pending index'), @@ -40,7 +41,7 @@ module.exports = { kClient: Symbol('client'), kParser: Symbol('parser'), kOnDestroyed: Symbol('destroy callbacks'), - kPipelining: Symbol('pipelinig'), + kPipelining: Symbol('pipelining'), kSocket: Symbol('socket'), kHostHeader: Symbol('host header'), kConnector: Symbol('connector'), @@ -49,5 +50,14 @@ module.exports = { kMaxRequests: Symbol('maxRequestsPerClient'), kProxy: Symbol('proxy agent options'), kCounter: Symbol('socket request counter'), - kInterceptors: Symbol('dispatch interceptors') + kInterceptors: Symbol('dispatch interceptors'), + kMaxResponseSize: Symbol('max response size'), + kHTTP2Session: Symbol('http2Session'), + kHTTP2SessionState: Symbol('http2Session state'), + kHTTP2BuildRequest: Symbol('http2 build request'), + kHTTP1BuildRequest: Symbol('http1 build request'), + kHTTP2CopyHeaders: Symbol('http2 copy headers'), + kHTTPConnVersion: Symbol('http connection version'), + kRetryHandlerDefaultRetry: Symbol('retry agent default retry'), + kConstruct: Symbol('constructable') } diff --git a/action/node_modules/undici/lib/core/util.js b/action/node_modules/undici/lib/core/util.js index c2dcf79f..5741650e 100644 --- a/action/node_modules/undici/lib/core/util.js +++ b/action/node_modules/undici/lib/core/util.js @@ -9,11 +9,14 @@ const { InvalidArgumentError } = require('./errors') const { Blob } = require('buffer') const nodeUtil = require('util') const { stringify } = require('querystring') +const { headerNameLowerCasedRecord } = require('./constants') + +const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(v => Number(v)) function nop () {} function isStream (obj) { - return obj && typeof obj.pipe === 'function' + return obj && typeof obj === 'object' && typeof obj.pipe === 'function' && typeof obj.on === 'function' } // based on https://github.com/node-fetch/fetch-blob/blob/8ab587d34080de94140b54f07168451e7d0b655e/index.js#L229-L241 (MIT License) @@ -44,37 +47,43 @@ function buildURL (url, queryParams) { function parseURL (url) { if (typeof url === 'string') { url = new URL(url) + + if (!/^https?:/.test(url.origin || url.protocol)) { + throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') + } + + return url } if (!url || typeof url !== 'object') { - throw new InvalidArgumentError('invalid url') + throw new InvalidArgumentError('Invalid URL: The URL argument must be a non-null object.') } - if (url.port != null && url.port !== '' && !Number.isFinite(parseInt(url.port))) { - throw new InvalidArgumentError('invalid port') + if (!/^https?:/.test(url.origin || url.protocol)) { + throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') } - if (url.path != null && typeof url.path !== 'string') { - throw new InvalidArgumentError('invalid path') - } + if (!(url instanceof URL)) { + if (url.port != null && url.port !== '' && !Number.isFinite(parseInt(url.port))) { + throw new InvalidArgumentError('Invalid URL: port must be a valid integer or a string representation of an integer.') + } - if (url.pathname != null && typeof url.pathname !== 'string') { - throw new InvalidArgumentError('invalid pathname') - } + if (url.path != null && typeof url.path !== 'string') { + throw new InvalidArgumentError('Invalid URL path: the path must be a string or null/undefined.') + } - if (url.hostname != null && typeof url.hostname !== 'string') { - throw new InvalidArgumentError('invalid hostname') - } + if (url.pathname != null && typeof url.pathname !== 'string') { + throw new InvalidArgumentError('Invalid URL pathname: the pathname must be a string or null/undefined.') + } - if (url.origin != null && typeof url.origin !== 'string') { - throw new InvalidArgumentError('invalid origin') - } + if (url.hostname != null && typeof url.hostname !== 'string') { + throw new InvalidArgumentError('Invalid URL hostname: the hostname must be a string or null/undefined.') + } - if (!/^https?:/.test(url.origin || url.protocol)) { - throw new InvalidArgumentError('invalid protocol') - } + if (url.origin != null && typeof url.origin !== 'string') { + throw new InvalidArgumentError('Invalid URL origin: the origin must be a string or null/undefined.') + } - if (!(url instanceof URL)) { const port = url.port != null ? url.port : (url.protocol === 'https:' ? 443 : 80) @@ -117,13 +126,13 @@ function getHostname (host) { const idx = host.indexOf(']') assert(idx !== -1) - return host.substr(1, idx - 1) + return host.substring(1, idx) } const idx = host.indexOf(':') if (idx === -1) return host - return host.substr(0, idx) + return host.substring(0, idx) } // IP addresses are not valid server names per RFC6066 @@ -160,7 +169,7 @@ function bodyLength (body) { return 0 } else if (isStream(body)) { const state = body._readableState - return state && state.ended === true && Number.isFinite(state.length) + return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) ? state.length : null } else if (isBlobLike(body)) { @@ -182,7 +191,7 @@ function isReadableAborted (stream) { } function destroy (stream, err) { - if (!isStream(stream) || isDestroyed(stream)) { + if (stream == null || !isStream(stream) || isDestroyed(stream)) { return } @@ -191,6 +200,7 @@ function destroy (stream, err) { // See: https://github.com/nodejs/node/pull/38505/files stream.socket = null } + stream.destroy(err) } else if (err) { process.nextTick((stream, err) => { @@ -209,29 +219,71 @@ function parseKeepAliveTimeout (val) { return m ? parseInt(m[1], 10) * 1000 : null } +/** + * Retrieves a header name and returns its lowercase value. + * @param {string | Buffer} value Header name + * @returns {string} + */ +function headerNameToString (value) { + return headerNameLowerCasedRecord[value] || value.toLowerCase() +} + function parseHeaders (headers, obj = {}) { + // For H2 support + if (!Array.isArray(headers)) return headers + for (let i = 0; i < headers.length; i += 2) { const key = headers[i].toString().toLowerCase() let val = obj[key] + if (!val) { if (Array.isArray(headers[i + 1])) { - obj[key] = headers[i + 1] + obj[key] = headers[i + 1].map(x => x.toString('utf8')) } else { - obj[key] = headers[i + 1].toString() + obj[key] = headers[i + 1].toString('utf8') } } else { if (!Array.isArray(val)) { val = [val] obj[key] = val } - val.push(headers[i + 1].toString()) + val.push(headers[i + 1].toString('utf8')) } } + + // See https://github.com/nodejs/node/pull/46528 + if ('content-length' in obj && 'content-disposition' in obj) { + obj['content-disposition'] = Buffer.from(obj['content-disposition']).toString('latin1') + } + return obj } function parseRawHeaders (headers) { - return headers.map(header => header.toString()) + const ret = [] + let hasContentLength = false + let contentDispositionIdx = -1 + + for (let n = 0; n < headers.length; n += 2) { + const key = headers[n + 0].toString() + const val = headers[n + 1].toString('utf8') + + if (key.length === 14 && (key === 'content-length' || key.toLowerCase() === 'content-length')) { + ret.push(key, val) + hasContentLength = true + } else if (key.length === 19 && (key === 'content-disposition' || key.toLowerCase() === 'content-disposition')) { + contentDispositionIdx = ret.push(key, val) - 1 + } else { + ret.push(key, val) + } + } + + // See https://github.com/nodejs/node/pull/46528 + if (hasContentLength && contentDispositionIdx !== -1) { + ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString('latin1') + } + + return ret } function isBuffer (buffer) { @@ -317,6 +369,12 @@ function getSocketInfo (socket) { } } +async function * convertIterableToBuffer (iterable) { + for await (const chunk of iterable) { + yield Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk) + } +} + let ReadableStream function ReadableStreamFrom (iterable) { if (!ReadableStream) { @@ -324,8 +382,7 @@ function ReadableStreamFrom (iterable) { } if (ReadableStream.from) { - // https://github.com/whatwg/streams/pull/1083 - return ReadableStream.from(iterable) + return ReadableStream.from(convertIterableToBuffer(iterable)) } let iterator @@ -354,8 +411,73 @@ function ReadableStreamFrom (iterable) { ) } -function isFormDataLike (chunk) { - return chunk && chunk.constructor && chunk.constructor.name === 'FormData' +// The chunk should be a FormData instance and contains +// all the required methods. +function isFormDataLike (object) { + return ( + object && + typeof object === 'object' && + typeof object.append === 'function' && + typeof object.delete === 'function' && + typeof object.get === 'function' && + typeof object.getAll === 'function' && + typeof object.has === 'function' && + typeof object.set === 'function' && + object[Symbol.toStringTag] === 'FormData' + ) +} + +function throwIfAborted (signal) { + if (!signal) { return } + if (typeof signal.throwIfAborted === 'function') { + signal.throwIfAborted() + } else { + if (signal.aborted) { + // DOMException not available < v17.0.0 + const err = new Error('The operation was aborted') + err.name = 'AbortError' + throw err + } + } +} + +function addAbortListener (signal, listener) { + if ('addEventListener' in signal) { + signal.addEventListener('abort', listener, { once: true }) + return () => signal.removeEventListener('abort', listener) + } + signal.addListener('abort', listener) + return () => signal.removeListener('abort', listener) +} + +const hasToWellFormed = !!String.prototype.toWellFormed + +/** + * @param {string} val + */ +function toUSVString (val) { + if (hasToWellFormed) { + return `${val}`.toWellFormed() + } else if (nodeUtil.toUSVString) { + return nodeUtil.toUSVString(val) + } + + return `${val}` +} + +// Parsed accordingly to RFC 9110 +// https://www.rfc-editor.org/rfc/rfc9110#field.content-range +function parseRangeHeader (range) { + if (range == null || range === '') return { start: 0, end: null, size: null } + + const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null + return m + ? { + start: parseInt(m[1]), + end: m[2] ? parseInt(m[2]) : null, + size: m[3] ? parseInt(m[3]) : null + } + : null } const kEnumerableProperty = Object.create(null) @@ -367,7 +489,7 @@ module.exports = { isDisturbed, isErrored, isReadable, - toUSVString: nodeUtil.toUSVString || ((val) => `${val}`), + toUSVString, isReadableAborted, isBlobLike, parseOrigin, @@ -377,6 +499,7 @@ module.exports = { isIterable, isAsyncIterable, isDestroyed, + headerNameToString, parseRawHeaders, parseHeaders, parseKeepAliveTimeout, @@ -388,5 +511,12 @@ module.exports = { validateHandler, getSocketInfo, isFormDataLike, - buildURL + buildURL, + throwIfAborted, + addAbortListener, + parseRangeHeader, + nodeMajor, + nodeMinor, + nodeHasAutoSelectFamily: nodeMajor > 18 || (nodeMajor === 18 && nodeMinor >= 13), + safeHTTPMethods: ['GET', 'HEAD', 'OPTIONS', 'TRACE'] } diff --git a/action/node_modules/undici/lib/dispatcher-base.js b/action/node_modules/undici/lib/dispatcher-base.js index 14a5c0ac..5c0220b5 100644 --- a/action/node_modules/undici/lib/dispatcher-base.js +++ b/action/node_modules/undici/lib/dispatcher-base.js @@ -19,7 +19,7 @@ class DispatcherBase extends Dispatcher { super() this[kDestroyed] = false - this[kOnDestroyed] = [] + this[kOnDestroyed] = null this[kClosed] = false this[kOnClosed] = [] } @@ -127,6 +127,7 @@ class DispatcherBase extends Dispatcher { } this[kDestroyed] = true + this[kOnDestroyed] = this[kOnDestroyed] || [] this[kOnDestroyed].push(callback) const onDestroyed = () => { @@ -167,7 +168,7 @@ class DispatcherBase extends Dispatcher { throw new InvalidArgumentError('opts must be an object.') } - if (this[kDestroyed]) { + if (this[kDestroyed] || this[kOnDestroyed]) { throw new ClientDestroyedError() } diff --git a/action/node_modules/undici/lib/fetch/body.js b/action/node_modules/undici/lib/fetch/body.js index b6dadce0..fd8481b7 100644 --- a/action/node_modules/undici/lib/fetch/body.js +++ b/action/node_modules/undici/lib/fetch/body.js @@ -1,24 +1,33 @@ 'use strict' -const Busboy = require('busboy') +const Busboy = require('@fastify/busboy') const util = require('../core/util') -const { ReadableStreamFrom, toUSVString, isBlobLike } = require('./util') +const { + ReadableStreamFrom, + isBlobLike, + isReadableStreamLike, + readableStreamClose, + createDeferredPromise, + fullyReadBody +} = require('./util') const { FormData } = require('./formdata') const { kState } = require('./symbols') const { webidl } = require('./webidl') -const { DOMException } = require('./constants') -const { Blob } = require('buffer') +const { DOMException, structuredClone } = require('./constants') +const { Blob, File: NativeFile } = require('buffer') const { kBodyUsed } = require('../core/symbols') const assert = require('assert') const { isErrored } = require('../core/util') const { isUint8Array, isArrayBuffer } = require('util/types') -const { File } = require('./file') +const { File: UndiciFile } = require('./file') +const { parseMIMEType, serializeAMimeType } = require('./dataURL') -let ReadableStream +let ReadableStream = globalThis.ReadableStream -async function * blobGen (blob) { - yield * blob.stream() -} +/** @type {globalThis['File']} */ +const File = NativeFile ?? UndiciFile +const textEncoder = new TextEncoder() +const textDecoder = new TextDecoder() // https://fetch.spec.whatwg.org/#concept-bodyinit-extract function extractBody (object, keepalive = false) { @@ -26,26 +35,54 @@ function extractBody (object, keepalive = false) { ReadableStream = require('stream/web').ReadableStream } - // 1. Let stream be object if object is a ReadableStream object. - // Otherwise, let stream be a new ReadableStream, and set up stream. + // 1. Let stream be null. let stream = null - // 2. Let action be null. + // 2. If object is a ReadableStream object, then set stream to object. + if (object instanceof ReadableStream) { + stream = object + } else if (isBlobLike(object)) { + // 3. Otherwise, if object is a Blob object, set stream to the + // result of running object’s get stream. + stream = object.stream() + } else { + // 4. Otherwise, set stream to a new ReadableStream object, and set + // up stream. + stream = new ReadableStream({ + async pull (controller) { + controller.enqueue( + typeof source === 'string' ? textEncoder.encode(source) : source + ) + queueMicrotask(() => readableStreamClose(controller)) + }, + start () {}, + type: undefined + }) + } + + // 5. Assert: stream is a ReadableStream object. + assert(isReadableStreamLike(stream)) + + // 6. Let action be null. let action = null - // 3. Let source be null. + // 7. Let source be null. let source = null - // 4. Let length be null. + // 8. Let length be null. let length = null - // 5. Let Content-Type be null. - let contentType = null + // 9. Let type be null. + let type = null - // 6. Switch on object: - if (object == null) { - // Note: The IDL processor cannot handle this situation. See - // https://crbug.com/335871. + // 10. Switch on object: + if (typeof object === 'string') { + // Set source to the UTF-8 encoding of object. + // Note: setting source to a Uint8Array here breaks some mocking assumptions. + source = object + + // Set type to `text/plain;charset=UTF-8`. + type = 'text/plain;charset=UTF-8' } else if (object instanceof URLSearchParams) { // URLSearchParams @@ -57,8 +94,8 @@ function extractBody (object, keepalive = false) { // Set source to the result of running the application/x-www-form-urlencoded serializer with object’s list. source = object.toString() - // Set Content-Type to `application/x-www-form-urlencoded;charset=UTF-8`. - contentType = 'application/x-www-form-urlencoded;charset=UTF-8' + // Set type to `application/x-www-form-urlencoded;charset=UTF-8`. + type = 'application/x-www-form-urlencoded;charset=UTF-8' } else if (isArrayBuffer(object)) { // BufferSource/ArrayBuffer @@ -70,7 +107,7 @@ function extractBody (object, keepalive = false) { // Set source to a copy of the bytes held by object. source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)) } else if (util.isFormDataLike(object)) { - const boundary = '----formdata-undici-' + Math.random() + const boundary = `----formdata-undici-0${`${Math.floor(Math.random() * 1e11)}`.padStart(11, '0')}` const prefix = `--${boundary}\r\nContent-Disposition: form-data` /*! formdata-polyfill. MIT License. Jimmy Wärting */ @@ -80,52 +117,64 @@ function extractBody (object, keepalive = false) { // Set action to this step: run the multipart/form-data // encoding algorithm, with object’s entry list and UTF-8. - action = async function * (object) { - const enc = new TextEncoder() - - for (const [name, value] of object) { - if (typeof value === 'string') { - yield enc.encode( - prefix + - `; name="${escape(normalizeLinefeeds(name))}"` + - `\r\n\r\n${normalizeLinefeeds(value)}\r\n` - ) + // - This ensures that the body is immutable and can't be changed afterwords + // - That the content-length is calculated in advance. + // - And that all parts are pre-encoded and ready to be sent. + + const blobParts = [] + const rn = new Uint8Array([13, 10]) // '\r\n' + length = 0 + let hasUnknownSizeValue = false + + for (const [name, value] of object) { + if (typeof value === 'string') { + const chunk = textEncoder.encode(prefix + + `; name="${escape(normalizeLinefeeds(name))}"` + + `\r\n\r\n${normalizeLinefeeds(value)}\r\n`) + blobParts.push(chunk) + length += chunk.byteLength + } else { + const chunk = textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + + (value.name ? `; filename="${escape(value.name)}"` : '') + '\r\n' + + `Content-Type: ${ + value.type || 'application/octet-stream' + }\r\n\r\n`) + blobParts.push(chunk, value, rn) + if (typeof value.size === 'number') { + length += chunk.byteLength + value.size + rn.byteLength } else { - yield enc.encode( - prefix + - `; name="${escape(normalizeLinefeeds(name))}"` + - (value.name ? `; filename="${escape(value.name)}"` : '') + - '\r\n' + - `Content-Type: ${ - value.type || 'application/octet-stream' - }\r\n\r\n` - ) - - yield * blobGen(value) - - yield enc.encode('\r\n') + hasUnknownSizeValue = true } } + } - yield enc.encode(`--${boundary}--`) + const chunk = textEncoder.encode(`--${boundary}--`) + blobParts.push(chunk) + length += chunk.byteLength + if (hasUnknownSizeValue) { + length = null } // Set source to object. source = object - // Set length to unclear, see html/6424 for improving this. - // TODO + action = async function * () { + for (const part of blobParts) { + if (part.stream) { + yield * part.stream() + } else { + yield part + } + } + } - // Set Content-Type to `multipart/form-data; boundary=`, + // Set type to `multipart/form-data; boundary=`, // followed by the multipart/form-data boundary string generated // by the multipart/form-data encoding algorithm. - contentType = 'multipart/form-data; boundary=' + boundary + type = 'multipart/form-data; boundary=' + boundary } else if (isBlobLike(object)) { // Blob - // Set action to this step: read object. - action = blobGen - // Set source to object. source = object @@ -133,9 +182,9 @@ function extractBody (object, keepalive = false) { length = object.size // If object’s type attribute is not the empty byte sequence, set - // Content-Type to its value. + // type to its value. if (object.type) { - contentType = object.type + type = object.type } } else if (typeof object[Symbol.asyncIterator] === 'function') { // If keepalive is true, then throw a TypeError. @@ -152,22 +201,15 @@ function extractBody (object, keepalive = false) { stream = object instanceof ReadableStream ? object : ReadableStreamFrom(object) - } else { - // TODO: byte sequence? - // TODO: scalar value string? - // TODO: else? - source = toUSVString(object) - contentType = 'text/plain;charset=UTF-8' } - // 7. If source is a byte sequence, then set action to a + // 11. If source is a byte sequence, then set action to a // step that returns source and length to source’s length. - // TODO: What is a "byte sequence?" if (typeof source === 'string' || util.isBuffer(source)) { length = Buffer.byteLength(source) } - // 8. If action is non-null, then run these steps in in parallel: + // 12. If action is non-null, then run these steps in in parallel: if (action != null) { // Run action. let iterator @@ -194,28 +236,17 @@ function extractBody (object, keepalive = false) { }, async cancel (reason) { await iterator.return() - } - }) - } else if (!stream) { - // TODO: Spec doesn't say anything about this? - stream = new ReadableStream({ - async pull (controller) { - controller.enqueue( - typeof source === 'string' ? new TextEncoder().encode(source) : source - ) - queueMicrotask(() => { - controller.close() - }) - } + }, + type: undefined }) } - // 9. Let body be a body whose stream is stream, source is source, + // 13. Let body be a body whose stream is stream, source is source, // and length is length. const body = { stream, source, length } - // 10. Return body and Content-Type. - return [body, contentType] + // 14. Return (body, type). + return [body, type] } // https://fetch.spec.whatwg.org/#bodyinit-safely-extract @@ -248,13 +279,17 @@ function cloneBody (body) { // 1. Let « out1, out2 » be the result of teeing body’s stream. const [out1, out2] = body.stream.tee() + const out2Clone = structuredClone(out2, { transfer: [out2] }) + // This, for whatever reasons, unrefs out2Clone which allows + // the process to exit by itself. + const [, finalClone] = out2Clone.tee() // 2. Set body’s stream to out1. body.stream = out1 // 3. Return a body whose stream is out2 and other members are copied from body. return { - stream: out2, + stream: finalClone, length: body.length, source: body.source } @@ -291,123 +326,51 @@ function throwIfAborted (state) { function bodyMixinMethods (instance) { const methods = { - async blob () { - if (!(this instanceof instance)) { - throw new TypeError('Illegal invocation') - } - - throwIfAborted(this[kState]) - - const chunks = [] - - for await (const chunk of consumeBody(this[kState].body)) { - if (!isUint8Array(chunk)) { - throw new TypeError('Expected Uint8Array chunk') + blob () { + // The blob() method steps are to return the result of + // running consume body with this and the following step + // given a byte sequence bytes: return a Blob whose + // contents are bytes and whose type attribute is this’s + // MIME type. + return specConsumeBody(this, (bytes) => { + let mimeType = bodyMimeType(this) + + if (mimeType === 'failure') { + mimeType = '' + } else if (mimeType) { + mimeType = serializeAMimeType(mimeType) } - // Assemble one final large blob with Uint8Array's can exhaust memory. - // That's why we create create multiple blob's and using references - chunks.push(new Blob([chunk])) - } - - return new Blob(chunks, { type: this.headers.get('Content-Type') || '' }) + // Return a Blob whose contents are bytes and type attribute + // is mimeType. + return new Blob([bytes], { type: mimeType }) + }, instance) }, - async arrayBuffer () { - if (!(this instanceof instance)) { - throw new TypeError('Illegal invocation') - } - - throwIfAborted(this[kState]) - - const contentLength = this.headers.get('content-length') - const encoded = this.headers.has('content-encoding') - - // if we have content length and no encoding, then we can - // pre allocate the buffer and just read the data into it - if (!encoded && contentLength) { - const buffer = new Uint8Array(contentLength) - let offset = 0 - - for await (const chunk of consumeBody(this[kState].body)) { - if (!isUint8Array(chunk)) { - throw new TypeError('Expected Uint8Array chunk') - } - - buffer.set(chunk, offset) - offset += chunk.length - } - - return buffer.buffer - } - - // if we don't have content length, then we have to allocate 2x the - // size of the body, once for consumed data, and once for the final buffer - - // This could be optimized by using growable ArrayBuffer, but it's not - // implemented yet. https://github.com/tc39/proposal-resizablearraybuffer - - const chunks = [] - let size = 0 - - for await (const chunk of consumeBody(this[kState].body)) { - if (!isUint8Array(chunk)) { - throw new TypeError('Expected Uint8Array chunk') - } - - chunks.push(chunk) - size += chunk.byteLength - } - - const buffer = new Uint8Array(size) - let offset = 0 - - for (const chunk of chunks) { - buffer.set(chunk, offset) - offset += chunk.byteLength - } - - return buffer.buffer + arrayBuffer () { + // The arrayBuffer() method steps are to return the result + // of running consume body with this and the following step + // given a byte sequence bytes: return a new ArrayBuffer + // whose contents are bytes. + return specConsumeBody(this, (bytes) => { + return new Uint8Array(bytes).buffer + }, instance) }, - async text () { - if (!(this instanceof instance)) { - throw new TypeError('Illegal invocation') - } - - throwIfAborted(this[kState]) - - let result = '' - const textDecoder = new TextDecoder() - - for await (const chunk of consumeBody(this[kState].body)) { - if (!isUint8Array(chunk)) { - throw new TypeError('Expected Uint8Array chunk') - } - - result += textDecoder.decode(chunk, { stream: true }) - } - - // flush - result += textDecoder.decode() - - return result + text () { + // The text() method steps are to return the result of running + // consume body with this and UTF-8 decode. + return specConsumeBody(this, utf8DecodeBytes, instance) }, - async json () { - if (!(this instanceof instance)) { - throw new TypeError('Illegal invocation') - } - - throwIfAborted(this[kState]) - - return JSON.parse(await this.text()) + json () { + // The json() method steps are to return the result of running + // consume body with this and parse JSON from bytes. + return specConsumeBody(this, parseJSONFromBytes, instance) }, async formData () { - if (!(this instanceof instance)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, instance) throwIfAborted(this[kState]) @@ -423,20 +386,21 @@ function bodyMixinMethods (instance) { let busboy try { - busboy = Busboy({ headers }) + busboy = new Busboy({ + headers, + preservePath: true + }) } catch (err) { - // Error due to headers: - throw Object.assign(new TypeError(), { cause: err }) + throw new DOMException(`${err}`, 'AbortError') } busboy.on('field', (name, value) => { responseFormData.append(name, value) }) - busboy.on('file', (name, value, info) => { - const { filename, encoding, mimeType } = info + busboy.on('file', (name, value, filename, encoding, mimeType) => { const chunks = [] - if (encoding.toLowerCase() === 'base64') { + if (encoding === 'base64' || encoding.toLowerCase() === 'base64') { let base64chunk = '' value.on('data', (chunk) => { @@ -463,7 +427,7 @@ function bodyMixinMethods (instance) { const busboyResolve = new Promise((resolve, reject) => { busboy.on('finish', resolve) - busboy.on('error', (err) => reject(err)) + busboy.on('error', (err) => reject(new TypeError(err))) }) if (this.body !== null) for await (const chunk of consumeBody(this[kState].body)) busboy.write(chunk) @@ -480,14 +444,16 @@ function bodyMixinMethods (instance) { let text = '' // application/x-www-form-urlencoded parser will keep the BOM. // https://url.spec.whatwg.org/#concept-urlencoded-parser - const textDecoder = new TextDecoder('utf-8', { ignoreBOM: true }) + // Note that streaming decoder is stateful and cannot be reused + const streamingDecoder = new TextDecoder('utf-8', { ignoreBOM: true }) + for await (const chunk of consumeBody(this[kState].body)) { if (!isUint8Array(chunk)) { throw new TypeError('Expected Uint8Array chunk') } - text += textDecoder.decode(chunk, { stream: true }) + text += streamingDecoder.decode(chunk, { stream: true }) } - text += textDecoder.decode() + text += streamingDecoder.decode() entries = new URLSearchParams(text) } catch (err) { // istanbul ignore next: Unclear when new URLSearchParams can fail on a string. @@ -509,7 +475,7 @@ function bodyMixinMethods (instance) { throwIfAborted(this[kState]) // Otherwise, throw a TypeError. - webidl.errors.exception({ + throw webidl.errors.exception({ header: `${instance.name}.formData`, message: 'Could not parse content as FormData.' }) @@ -520,32 +486,115 @@ function bodyMixinMethods (instance) { return methods } -const properties = { - body: { - enumerable: true, - get () { - if (!this || !this[kState]) { - throw new TypeError('Illegal invocation') - } +function mixinBody (prototype) { + Object.assign(prototype.prototype, bodyMixinMethods(prototype)) +} - return this[kState].body ? this[kState].body.stream : null - } - }, - bodyUsed: { - enumerable: true, - get () { - if (!this || !this[kState]) { - throw new TypeError('Illegal invocation') - } +/** + * @see https://fetch.spec.whatwg.org/#concept-body-consume-body + * @param {Response|Request} object + * @param {(value: unknown) => unknown} convertBytesToJSValue + * @param {Response|Request} instance + */ +async function specConsumeBody (object, convertBytesToJSValue, instance) { + webidl.brandCheck(object, instance) + + throwIfAborted(object[kState]) + + // 1. If object is unusable, then return a promise rejected + // with a TypeError. + if (bodyUnusable(object[kState].body)) { + throw new TypeError('Body is unusable') + } - return !!this[kState].body && util.isDisturbed(this[kState].body.stream) + // 2. Let promise be a new promise. + const promise = createDeferredPromise() + + // 3. Let errorSteps given error be to reject promise with error. + const errorSteps = (error) => promise.reject(error) + + // 4. Let successSteps given a byte sequence data be to resolve + // promise with the result of running convertBytesToJSValue + // with data. If that threw an exception, then run errorSteps + // with that exception. + const successSteps = (data) => { + try { + promise.resolve(convertBytesToJSValue(data)) + } catch (e) { + errorSteps(e) } } + + // 5. If object’s body is null, then run successSteps with an + // empty byte sequence. + if (object[kState].body == null) { + successSteps(new Uint8Array()) + return promise.promise + } + + // 6. Otherwise, fully read object’s body given successSteps, + // errorSteps, and object’s relevant global object. + await fullyReadBody(object[kState].body, successSteps, errorSteps) + + // 7. Return promise. + return promise.promise } -function mixinBody (prototype) { - Object.assign(prototype.prototype, bodyMixinMethods(prototype)) - Object.defineProperties(prototype.prototype, properties) +// https://fetch.spec.whatwg.org/#body-unusable +function bodyUnusable (body) { + // An object including the Body interface mixin is + // said to be unusable if its body is non-null and + // its body’s stream is disturbed or locked. + return body != null && (body.stream.locked || util.isDisturbed(body.stream)) +} + +/** + * @see https://encoding.spec.whatwg.org/#utf-8-decode + * @param {Buffer} buffer + */ +function utf8DecodeBytes (buffer) { + if (buffer.length === 0) { + return '' + } + + // 1. Let buffer be the result of peeking three bytes from + // ioQueue, converted to a byte sequence. + + // 2. If buffer is 0xEF 0xBB 0xBF, then read three + // bytes from ioQueue. (Do nothing with those bytes.) + if (buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) { + buffer = buffer.subarray(3) + } + + // 3. Process a queue with an instance of UTF-8’s + // decoder, ioQueue, output, and "replacement". + const output = textDecoder.decode(buffer) + + // 4. Return output. + return output +} + +/** + * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value + * @param {Uint8Array} bytes + */ +function parseJSONFromBytes (bytes) { + return JSON.parse(utf8DecodeBytes(bytes)) +} + +/** + * @see https://fetch.spec.whatwg.org/#concept-body-mime-type + * @param {import('./response').Response|import('./request').Request} object + */ +function bodyMimeType (object) { + const { headersList } = object[kState] + const contentType = headersList.get('content-type') + + if (contentType === null) { + return 'failure' + } + + return parseMIMEType(contentType) } module.exports = { diff --git a/action/node_modules/undici/lib/fetch/constants.js b/action/node_modules/undici/lib/fetch/constants.js index 44a86702..218fcbee 100644 --- a/action/node_modules/undici/lib/fetch/constants.js +++ b/action/node_modules/undici/lib/fetch/constants.js @@ -1,11 +1,28 @@ 'use strict' +const { MessageChannel, receiveMessageOnPort } = require('worker_threads') + const corsSafeListedMethods = ['GET', 'HEAD', 'POST'] +const corsSafeListedMethodsSet = new Set(corsSafeListedMethods) const nullBodyStatus = [101, 204, 205, 304] const redirectStatus = [301, 302, 303, 307, 308] +const redirectStatusSet = new Set(redirectStatus) + +// https://fetch.spec.whatwg.org/#block-bad-port +const badPorts = [ + '1', '7', '9', '11', '13', '15', '17', '19', '20', '21', '22', '23', '25', '37', '42', '43', '53', '69', '77', '79', + '87', '95', '101', '102', '103', '104', '109', '110', '111', '113', '115', '117', '119', '123', '135', '137', + '139', '143', '161', '179', '389', '427', '465', '512', '513', '514', '515', '526', '530', '531', '532', + '540', '548', '554', '556', '563', '587', '601', '636', '989', '990', '993', '995', '1719', '1720', '1723', + '2049', '3659', '4045', '5060', '5061', '6000', '6566', '6665', '6666', '6667', '6668', '6669', '6697', + '10080' +] +const badPortsSet = new Set(badPorts) + +// https://w3c.github.io/webappsec-referrer-policy/#referrer-policies const referrerPolicy = [ '', 'no-referrer', @@ -17,10 +34,12 @@ const referrerPolicy = [ 'strict-origin-when-cross-origin', 'unsafe-url' ] +const referrerPolicySet = new Set(referrerPolicy) const requestRedirect = ['follow', 'manual', 'error'] const safeMethods = ['GET', 'HEAD', 'OPTIONS', 'TRACE'] +const safeMethodsSet = new Set(safeMethods) const requestMode = ['navigate', 'same-origin', 'no-cors', 'cors'] @@ -35,15 +54,27 @@ const requestCache = [ 'only-if-cached' ] +// https://fetch.spec.whatwg.org/#request-body-header-name const requestBodyHeader = [ 'content-encoding', 'content-language', 'content-location', - 'content-type' + 'content-type', + // See https://github.com/nodejs/undici/issues/2021 + // 'Content-Length' is a forbidden header name, which is typically + // removed in the Headers implementation. However, undici doesn't + // filter out headers, so we add it here. + 'content-length' +] + +// https://fetch.spec.whatwg.org/#enumdef-requestduplex +const requestDuplex = [ + 'half' ] // http://fetch.spec.whatwg.org/#forbidden-method const forbiddenMethods = ['CONNECT', 'TRACE', 'TRACK'] +const forbiddenMethodsSet = new Set(forbiddenMethods) const subresource = [ 'audio', @@ -59,6 +90,7 @@ const subresource = [ 'xslt', '' ] +const subresourceSet = new Set(subresource) /** @type {globalThis['DOMException']} */ const DOMException = globalThis.DOMException ?? (() => { @@ -71,8 +103,30 @@ const DOMException = globalThis.DOMException ?? (() => { } })() +let channel + +/** @type {globalThis['structuredClone']} */ +const structuredClone = + globalThis.structuredClone ?? + // https://github.com/nodejs/node/blob/b27ae24dcc4251bad726d9d84baf678d1f707fed/lib/internal/structured_clone.js + // structuredClone was added in v17.0.0, but fetch supports v16.8 + function structuredClone (value, options = undefined) { + if (arguments.length === 0) { + throw new TypeError('missing argument') + } + + if (!channel) { + channel = new MessageChannel() + } + channel.port1.unref() + channel.port2.unref() + channel.port1.postMessage(value, options?.transfer) + return receiveMessageOnPort(channel.port2).message + } + module.exports = { DOMException, + structuredClone, subresource, forbiddenMethods, requestBodyHeader, @@ -84,5 +138,14 @@ module.exports = { redirectStatus, corsSafeListedMethods, nullBodyStatus, - safeMethods + safeMethods, + badPorts, + requestDuplex, + subresourceSet, + badPortsSet, + redirectStatusSet, + corsSafeListedMethodsSet, + safeMethodsSet, + forbiddenMethodsSet, + referrerPolicySet } diff --git a/action/node_modules/undici/lib/fetch/dataURL.js b/action/node_modules/undici/lib/fetch/dataURL.js index 71e5b35b..7b6a6061 100644 --- a/action/node_modules/undici/lib/fetch/dataURL.js +++ b/action/node_modules/undici/lib/fetch/dataURL.js @@ -1,9 +1,19 @@ const assert = require('assert') const { atob } = require('buffer') -const { isValidHTTPToken } = require('./util') +const { isomorphicDecode } = require('./util') const encoder = new TextEncoder() +/** + * @see https://mimesniff.spec.whatwg.org/#http-token-code-point + */ +const HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+-.^_|~A-Za-z0-9]+$/ +const HTTP_WHITESPACE_REGEX = /(\u000A|\u000D|\u0009|\u0020)/ // eslint-disable-line +/** + * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point + */ +const HTTP_QUOTED_STRING_TOKENS = /[\u0009|\u0020-\u007E|\u0080-\u00FF]/ // eslint-disable-line + // https://fetch.spec.whatwg.org/#data-url-processor /** @param {URL} dataURL */ function dataURLProcessor (dataURL) { @@ -24,22 +34,20 @@ function dataURLProcessor (dataURL) { // 5. Let mimeType be the result of collecting a // sequence of code points that are not equal // to U+002C (,), given position. - let mimeType = collectASequenceOfCodePoints( - (char) => char !== ',', + let mimeType = collectASequenceOfCodePointsFast( + ',', input, position ) // 6. Strip leading and trailing ASCII whitespace // from mimeType. - // Note: This will only remove U+0020 SPACE code - // points, if any. // Undici implementation note: we need to store the // length because if the mimetype has spaces removed, // the wrong amount will be sliced from the input in // step #9 const mimeTypeLength = mimeType.length - mimeType = mimeType.replace(/^(\u0020)+|(\u0020)+$/g, '') + mimeType = removeASCIIWhitespace(mimeType, true, true) // 7. If position is past the end of input, then // return failure @@ -54,7 +62,6 @@ function dataURLProcessor (dataURL) { const encodedBody = input.slice(mimeTypeLength + 1) // 10. Let body be the percent-decoding of encodedBody. - /** @type {Uint8Array|string} */ let body = stringPercentDecode(encodedBody) // 11. If mimeType ends with U+003B (;), followed by @@ -62,7 +69,8 @@ function dataURLProcessor (dataURL) { // case-insensitive match for "base64", then: if (/;(\u0020){0,}base64$/i.test(mimeType)) { // 1. Let stringBody be the isomorphic decode of body. - const stringBody = decodeURIComponent(new TextDecoder('utf-8').decode(body)) + const stringBody = isomorphicDecode(body) + // 2. Set body to the forgiving-base64 decode of // stringBody. body = forgivingBase64(stringBody) @@ -111,73 +119,14 @@ function dataURLProcessor (dataURL) { * @param {boolean} excludeFragment */ function URLSerializer (url, excludeFragment = false) { - // 1. Let output be url’s scheme and U+003A (:) concatenated. - let output = url.protocol - - // 2. If url’s host is non-null: - if (url.host.length > 0) { - // 1. Append "//" to output. - output += '//' - - // 2. If url includes credentials, then: - if (url.username.length > 0 || url.password.length > 0) { - // 1. Append url’s username to output. - output += url.username - - // 2. If url’s password is not the empty string, then append U+003A (:), - // followed by url’s password, to output. - if (url.password.length > 0) { - output += ':' + url.password - } - - // 3. Append U+0040 (@) to output. - output += '@' - } - - // 3. Append url’s host, serialized, to output. - output += decodeURIComponent(url.host) - - // 4. If url’s port is non-null, append U+003A (:) followed by url’s port, - // serialized, to output. - if (url.port.length > 0) { - output += ':' + url.port - } - } - - // 3. If url’s host is null, url does not have an opaque path, - // url’s path’s size is greater than 1, and url’s path[0] - // is the empty string, then append U+002F (/) followed by - // U+002E (.) to output. - // Note: This prevents web+demo:/.//not-a-host/ or web+demo:/path/..//not-a-host/, - // when parsed and then serialized, from ending up as web+demo://not-a-host/ - // (they end up as web+demo:/.//not-a-host/). - // Undici implementation note: url's path[0] can never be an - // empty string, so we have to slightly alter what the spec says. - if ( - url.host.length === 0 && - url.pathname.length > 1 && - url.href.slice(url.protocol.length + 1)[0] === '.' - ) { - output += '/.' + if (!excludeFragment) { + return url.href } - // 4. Append the result of URL path serializing url to output. - output += url.pathname + const href = url.href + const hashLength = url.hash.length - // 5. If url’s query is non-null, append U+003F (?), - // followed by url’s query, to output. - if (url.search.length > 0) { - output += url.search - } - - // 6. If exclude fragment is false and url’s fragment is non-null, - // then append U+0023 (#), followed by url’s fragment, to output. - if (excludeFragment === false && url.hash.length > 0) { - output += url.hash - } - - // 7. Return output. - return output + return hashLength === 0 ? href : href.substring(0, href.length - hashLength) } // https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points @@ -204,6 +153,25 @@ function collectASequenceOfCodePoints (condition, input, position) { return result } +/** + * A faster collectASequenceOfCodePoints that only works when comparing a single character. + * @param {string} char + * @param {string} input + * @param {{ position: number }} position + */ +function collectASequenceOfCodePointsFast (char, input, position) { + const idx = input.indexOf(char, position.position) + const start = position.position + + if (idx === -1) { + position.position = input.length + return input.slice(start) + } + + position.position = idx + return input.slice(start, position.position) +} + // https://url.spec.whatwg.org/#string-percent-decode /** @param {string} input */ function stringPercentDecode (input) { @@ -264,7 +232,7 @@ function percentDecode (input) { function parseMIMEType (input) { // 1. Remove any leading and trailing HTTP whitespace // from input. - input = input.trim() + input = removeHTTPWhitespace(input, true, true) // 2. Let position be a position variable for input, // initially pointing at the start of input. @@ -273,8 +241,8 @@ function parseMIMEType (input) { // 3. Let type be the result of collecting a sequence // of code points that are not U+002F (/) from // input, given position. - const type = collectASequenceOfCodePoints( - (char) => char !== '/', + const type = collectASequenceOfCodePointsFast( + '/', input, position ) @@ -282,7 +250,7 @@ function parseMIMEType (input) { // 4. If type is the empty string or does not solely // contain HTTP token code points, then return failure. // https://mimesniff.spec.whatwg.org/#http-token-code-point - if (type.length === 0 || !/^[!#$%&'*+-.^_|~A-z0-9]+$/.test(type)) { + if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { return 'failure' } @@ -298,30 +266,35 @@ function parseMIMEType (input) { // 7. Let subtype be the result of collecting a sequence of // code points that are not U+003B (;) from input, given // position. - let subtype = collectASequenceOfCodePoints( - (char) => char !== ';', + let subtype = collectASequenceOfCodePointsFast( + ';', input, position ) // 8. Remove any trailing HTTP whitespace from subtype. - subtype = subtype.trim() + subtype = removeHTTPWhitespace(subtype, false, true) // 9. If subtype is the empty string or does not solely // contain HTTP token code points, then return failure. - if (subtype.length === 0 || !/^[!#$%&'*+-.^_|~A-z0-9]+$/.test(subtype)) { + if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { return 'failure' } + const typeLowercase = type.toLowerCase() + const subtypeLowercase = subtype.toLowerCase() + // 10. Let mimeType be a new MIME type record whose type // is type, in ASCII lowercase, and subtype is subtype, // in ASCII lowercase. // https://mimesniff.spec.whatwg.org/#mime-type const mimeType = { - type: type.toLowerCase(), - subtype: subtype.toLowerCase(), + type: typeLowercase, + subtype: subtypeLowercase, /** @type {Map} */ - parameters: new Map() + parameters: new Map(), + // https://mimesniff.spec.whatwg.org/#mime-type-essence + essence: `${typeLowercase}/${subtypeLowercase}` } // 11. While position is not past the end of input: @@ -333,7 +306,7 @@ function parseMIMEType (input) { // whitespace from input given position. collectASequenceOfCodePoints( // https://fetch.spec.whatwg.org/#http-whitespace - (char) => /(\u000A|\u000D|\u0009|\u0020)/.test(char), // eslint-disable-line + char => HTTP_WHITESPACE_REGEX.test(char), input, position ) @@ -381,8 +354,8 @@ function parseMIMEType (input) { // 2. Collect a sequence of code points that are not // U+003B (;) from input, given position. - collectASequenceOfCodePoints( - (char) => char !== ';', + collectASequenceOfCodePointsFast( + ';', input, position ) @@ -392,15 +365,14 @@ function parseMIMEType (input) { // 1. Set parameterValue to the result of collecting // a sequence of code points that are not U+003B (;) // from input, given position. - parameterValue = collectASequenceOfCodePoints( - (char) => char !== ';', + parameterValue = collectASequenceOfCodePointsFast( + ';', input, position ) // 2. Remove any trailing HTTP whitespace from parameterValue. - // Note: it says "trailing" whitespace; leading is fine. - parameterValue = parameterValue.trimEnd() + parameterValue = removeHTTPWhitespace(parameterValue, false, true) // 3. If parameterValue is the empty string, then continue. if (parameterValue.length === 0) { @@ -416,9 +388,8 @@ function parseMIMEType (input) { // then set mimeType’s parameters[parameterName] to parameterValue. if ( parameterName.length !== 0 && - /^[!#$%&'*+-.^_|~A-z0-9]+$/.test(parameterName) && - // https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point - !/^(\u0009|\x{0020}-\x{007E}|\x{0080}-\x{00FF})+$/.test(parameterValue) && // eslint-disable-line + HTTP_TOKEN_CODEPOINTS.test(parameterName) && + (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && !mimeType.parameters.has(parameterName) ) { mimeType.parameters.set(parameterName, parameterValue) @@ -552,11 +523,11 @@ function collectAnHTTPQuotedString (input, position, extractValue) { */ function serializeAMimeType (mimeType) { assert(mimeType !== 'failure') - const { type, subtype, parameters } = mimeType + const { parameters, essence } = mimeType // 1. Let serialization be the concatenation of mimeType’s // type, U+002F (/), and mimeType’s subtype. - let serialization = `${type}/${subtype}` + let serialization = essence // 2. For each name → value of mimeType’s parameters: for (let [name, value] of parameters.entries()) { @@ -571,7 +542,7 @@ function serializeAMimeType (mimeType) { // 4. If value does not solely contain HTTP token code // points or value is the empty string, then: - if (!isValidHTTPToken(value)) { + if (!HTTP_TOKEN_CODEPOINTS.test(value)) { // 1. Precede each occurence of U+0022 (") or // U+005C (\) in value with U+005C (\). value = value.replace(/(\\|")/g, '\\$1') @@ -591,10 +562,64 @@ function serializeAMimeType (mimeType) { return serialization } +/** + * @see https://fetch.spec.whatwg.org/#http-whitespace + * @param {string} char + */ +function isHTTPWhiteSpace (char) { + return char === '\r' || char === '\n' || char === '\t' || char === ' ' +} + +/** + * @see https://fetch.spec.whatwg.org/#http-whitespace + * @param {string} str + */ +function removeHTTPWhitespace (str, leading = true, trailing = true) { + let lead = 0 + let trail = str.length - 1 + + if (leading) { + for (; lead < str.length && isHTTPWhiteSpace(str[lead]); lead++); + } + + if (trailing) { + for (; trail > 0 && isHTTPWhiteSpace(str[trail]); trail--); + } + + return str.slice(lead, trail + 1) +} + +/** + * @see https://infra.spec.whatwg.org/#ascii-whitespace + * @param {string} char + */ +function isASCIIWhitespace (char) { + return char === '\r' || char === '\n' || char === '\t' || char === '\f' || char === ' ' +} + +/** + * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace + */ +function removeASCIIWhitespace (str, leading = true, trailing = true) { + let lead = 0 + let trail = str.length - 1 + + if (leading) { + for (; lead < str.length && isASCIIWhitespace(str[lead]); lead++); + } + + if (trailing) { + for (; trail > 0 && isASCIIWhitespace(str[trail]); trail--); + } + + return str.slice(lead, trail + 1) +} + module.exports = { dataURLProcessor, URLSerializer, collectASequenceOfCodePoints, + collectASequenceOfCodePointsFast, stringPercentDecode, parseMIMEType, collectAnHTTPQuotedString, diff --git a/action/node_modules/undici/lib/fetch/file.js b/action/node_modules/undici/lib/fetch/file.js index 2720831c..3133d255 100644 --- a/action/node_modules/undici/lib/fetch/file.js +++ b/action/node_modules/undici/lib/fetch/file.js @@ -1,19 +1,20 @@ 'use strict' -const { Blob } = require('buffer') +const { Blob, File: NativeFile } = require('buffer') const { types } = require('util') const { kState } = require('./symbols') const { isBlobLike } = require('./util') const { webidl } = require('./webidl') +const { parseMIMEType, serializeAMimeType } = require('./dataURL') +const { kEnumerableProperty } = require('../core/util') +const encoder = new TextEncoder() class File extends Blob { constructor (fileBits, fileName, options = {}) { // The File constructor is invoked with two or three parameters, depending // on whether the optional dictionary parameter is used. When the File() // constructor is invoked, user agents must run the following steps: - if (arguments.length < 2) { - throw new TypeError('2 arguments required') - } + webidl.argumentLengthCheck(arguments, 2, { header: 'File constructor' }) fileBits = webidl.converters['sequence'](fileBits) fileName = webidl.converters.USVString(fileName) @@ -34,13 +35,29 @@ class File extends Blob { // outside the range U+0020 to U+007E, then set t to the empty string // and return from these substeps. // 2. Convert every character in t to ASCII lowercase. - // Note: Blob handles both of these steps for us + let t = options.type + let d - // 3. If the lastModified member is provided, let d be set to the - // lastModified dictionary member. If it is not provided, set d to the - // current date and time represented as the number of milliseconds since - // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]). - const d = options.lastModified + // eslint-disable-next-line no-labels + substep: { + if (t) { + t = parseMIMEType(t) + + if (t === 'failure') { + t = '' + // eslint-disable-next-line no-labels + break substep + } + + t = serializeAMimeType(t).toLowerCase() + } + + // 3. If the lastModified member is provided, let d be set to the + // lastModified dictionary member. If it is not provided, set d to the + // current date and time represented as the number of milliseconds since + // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]). + d = options.lastModified + } // 4. Return a new File object F such that: // F refers to the bytes byte sequence. @@ -49,31 +66,30 @@ class File extends Blob { // F.type is set to t. // F.lastModified is set to d. - super(processBlobParts(fileBits, options), { type: options.type }) + super(processBlobParts(fileBits, options), { type: t }) this[kState] = { name: n, - lastModified: d + lastModified: d, + type: t } } get name () { - if (!(this instanceof File)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, File) return this[kState].name } get lastModified () { - if (!(this instanceof File)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, File) return this[kState].lastModified } - get [Symbol.toStringTag] () { - return this.constructor.name + get type () { + webidl.brandCheck(this, File) + + return this[kState].type } } @@ -126,65 +142,49 @@ class FileLike { } stream (...args) { - if (!(this instanceof FileLike)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, FileLike) return this[kState].blobLike.stream(...args) } arrayBuffer (...args) { - if (!(this instanceof FileLike)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, FileLike) return this[kState].blobLike.arrayBuffer(...args) } slice (...args) { - if (!(this instanceof FileLike)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, FileLike) return this[kState].blobLike.slice(...args) } text (...args) { - if (!(this instanceof FileLike)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, FileLike) return this[kState].blobLike.text(...args) } get size () { - if (!(this instanceof FileLike)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, FileLike) return this[kState].blobLike.size } get type () { - if (!(this instanceof FileLike)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, FileLike) return this[kState].blobLike.type } get name () { - if (!(this instanceof FileLike)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, FileLike) return this[kState].name } get lastModified () { - if (!(this instanceof FileLike)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, FileLike) return this[kState].lastModified } @@ -194,6 +194,15 @@ class FileLike { } } +Object.defineProperties(File.prototype, { + [Symbol.toStringTag]: { + value: 'File', + configurable: true + }, + name: kEnumerableProperty, + lastModified: kEnumerableProperty +}) + webidl.converters.Blob = webidl.interfaceConverter(Blob) webidl.converters.BlobPart = function (V, opts) { @@ -202,10 +211,15 @@ webidl.converters.BlobPart = function (V, opts) { return webidl.converters.Blob(V, { strict: false }) } - return webidl.converters.BufferSource(V, opts) - } else { - return webidl.converters.USVString(V, opts) + if ( + ArrayBuffer.isView(V) || + types.isAnyArrayBuffer(V) + ) { + return webidl.converters.BufferSource(V, opts) + } } + + return webidl.converters.USVString(V, opts) } webidl.converters['sequence'] = webidl.sequenceConverter( @@ -267,7 +281,7 @@ function processBlobParts (parts, options) { } // 3. Append the result of UTF-8 encoding s to bytes. - bytes.push(new TextEncoder().encode(s)) + bytes.push(encoder.encode(s)) } else if ( types.isAnyArrayBuffer(element) || types.isTypedArray(element) @@ -316,11 +330,14 @@ function convertLineEndingsNative (s) { // rollup) will warn about circular dependencies. See: // https://github.com/nodejs/undici/issues/1629 function isFileLike (object) { - return object instanceof File || ( - object && - (typeof object.stream === 'function' || - typeof object.arrayBuffer === 'function') && - object[Symbol.toStringTag] === 'File' + return ( + (NativeFile && object instanceof NativeFile) || + object instanceof File || ( + object && + (typeof object.stream === 'function' || + typeof object.arrayBuffer === 'function') && + object[Symbol.toStringTag] === 'File' + ) ) } diff --git a/action/node_modules/undici/lib/fetch/formdata.js b/action/node_modules/undici/lib/fetch/formdata.js index a2c94533..5975e26c 100644 --- a/action/node_modules/undici/lib/fetch/formdata.js +++ b/action/node_modules/undici/lib/fetch/formdata.js @@ -2,20 +2,21 @@ const { isBlobLike, toUSVString, makeIterator } = require('./util') const { kState } = require('./symbols') -const { File, FileLike, isFileLike } = require('./file') +const { File: UndiciFile, FileLike, isFileLike } = require('./file') const { webidl } = require('./webidl') -const { Blob } = require('buffer') +const { Blob, File: NativeFile } = require('buffer') + +/** @type {globalThis['File']} */ +const File = NativeFile ?? UndiciFile // https://xhr.spec.whatwg.org/#formdata class FormData { - static name = 'FormData' - constructor (form) { - if (arguments.length > 0 && form != null) { - webidl.errors.conversionFailed({ + if (form !== undefined) { + throw webidl.errors.conversionFailed({ prefix: 'FormData constructor', argument: 'Argument 1', - types: ['null'] + types: ['undefined'] }) } @@ -23,15 +24,9 @@ class FormData { } append (name, value, filename = undefined) { - if (!(this instanceof FormData)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, FormData) - if (arguments.length < 2) { - throw new TypeError( - `Failed to execute 'append' on 'FormData': 2 arguments required, but only ${arguments.length} present.` - ) - } + webidl.argumentLengthCheck(arguments, 2, { header: 'FormData.append' }) if (arguments.length === 3 && !isBlobLike(value)) { throw new TypeError( @@ -58,40 +53,21 @@ class FormData { } delete (name) { - if (!(this instanceof FormData)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, FormData) - if (arguments.length < 1) { - throw new TypeError( - `Failed to execute 'delete' on 'FormData': 1 arguments required, but only ${arguments.length} present.` - ) - } + webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.delete' }) name = webidl.converters.USVString(name) // The delete(name) method steps are to remove all entries whose name // is name from this’s entry list. - const next = [] - for (const entry of this[kState]) { - if (entry.name !== name) { - next.push(entry) - } - } - - this[kState] = next + this[kState] = this[kState].filter(entry => entry.name !== name) } get (name) { - if (!(this instanceof FormData)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, FormData) - if (arguments.length < 1) { - throw new TypeError( - `Failed to execute 'get' on 'FormData': 1 arguments required, but only ${arguments.length} present.` - ) - } + webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.get' }) name = webidl.converters.USVString(name) @@ -108,15 +84,9 @@ class FormData { } getAll (name) { - if (!(this instanceof FormData)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, FormData) - if (arguments.length < 1) { - throw new TypeError( - `Failed to execute 'getAll' on 'FormData': 1 arguments required, but only ${arguments.length} present.` - ) - } + webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.getAll' }) name = webidl.converters.USVString(name) @@ -130,15 +100,9 @@ class FormData { } has (name) { - if (!(this instanceof FormData)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, FormData) - if (arguments.length < 1) { - throw new TypeError( - `Failed to execute 'has' on 'FormData': 1 arguments required, but only ${arguments.length} present.` - ) - } + webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.has' }) name = webidl.converters.USVString(name) @@ -148,15 +112,9 @@ class FormData { } set (name, value, filename = undefined) { - if (!(this instanceof FormData)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, FormData) - if (arguments.length < 2) { - throw new TypeError( - `Failed to execute 'set' on 'FormData': 2 arguments required, but only ${arguments.length} present.` - ) - } + webidl.argumentLengthCheck(arguments, 2, { header: 'FormData.set' }) if (arguments.length === 3 && !isBlobLike(value)) { throw new TypeError( @@ -196,40 +154,33 @@ class FormData { } } - get [Symbol.toStringTag] () { - return this.constructor.name - } - entries () { - if (!(this instanceof FormData)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, FormData) return makeIterator( - makeIterable(this[kState], 'entries'), - 'FormData' + () => this[kState].map(pair => [pair.name, pair.value]), + 'FormData', + 'key+value' ) } keys () { - if (!(this instanceof FormData)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, FormData) return makeIterator( - makeIterable(this[kState], 'keys'), - 'FormData' + () => this[kState].map(pair => [pair.name, pair.value]), + 'FormData', + 'key' ) } values () { - if (!(this instanceof FormData)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, FormData) return makeIterator( - makeIterable(this[kState], 'values'), - 'FormData' + () => this[kState].map(pair => [pair.name, pair.value]), + 'FormData', + 'value' ) } @@ -238,15 +189,9 @@ class FormData { * @param {unknown} thisArg */ forEach (callbackFn, thisArg = globalThis) { - if (!(this instanceof FormData)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, FormData) - if (arguments.length < 1) { - throw new TypeError( - `Failed to execute 'forEach' on 'FormData': 1 argument required, but only ${arguments.length} present.` - ) - } + webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.forEach' }) if (typeof callbackFn !== 'function') { throw new TypeError( @@ -262,6 +207,13 @@ class FormData { FormData.prototype[Symbol.iterator] = FormData.prototype.entries +Object.defineProperties(FormData.prototype, { + [Symbol.toStringTag]: { + value: 'FormData', + configurable: true + } +}) + /** * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry * @param {string} name @@ -294,9 +246,15 @@ function makeEntry (name, value, filename) { // 2. If filename is given, then set value to a new File object, // representing the same bytes, whose name attribute is filename. if (filename !== undefined) { - value = value instanceof File - ? new File([value], filename, { type: value.type }) - : new FileLike(value, filename, { type: value.type }) + /** @type {FilePropertyBag} */ + const options = { + type: value.type, + lastModified: value.lastModified + } + + value = (NativeFile && value instanceof NativeFile) || value instanceof UndiciFile + ? new File([value], filename, options) + : new FileLike(value, filename, options) } } @@ -304,18 +262,4 @@ function makeEntry (name, value, filename) { return { name, value } } -function * makeIterable (entries, type) { - // The value pairs to iterate over are this’s entry list’s entries - // with the key being the name and the value being the value. - for (const { name, value } of entries) { - if (type === 'entries') { - yield [name, value] - } else if (type === 'values') { - yield value - } else { - yield name - } - } -} - module.exports = { FormData } diff --git a/action/node_modules/undici/lib/fetch/global.js b/action/node_modules/undici/lib/fetch/global.js index 42282acd..1df6f122 100644 --- a/action/node_modules/undici/lib/fetch/global.js +++ b/action/node_modules/undici/lib/fetch/global.js @@ -9,14 +9,6 @@ function getGlobalOrigin () { } function setGlobalOrigin (newOrigin) { - if ( - newOrigin !== undefined && - typeof newOrigin !== 'string' && - !(newOrigin instanceof URL) - ) { - throw new Error('Invalid base url') - } - if (newOrigin === undefined) { Object.defineProperty(globalThis, globalOrigin, { value: undefined, diff --git a/action/node_modules/undici/lib/fetch/headers.js b/action/node_modules/undici/lib/fetch/headers.js index 78f29907..2f1c0be5 100644 --- a/action/node_modules/undici/lib/fetch/headers.js +++ b/action/node_modules/undici/lib/fetch/headers.js @@ -2,7 +2,7 @@ 'use strict' -const { kHeadersList } = require('../core/symbols') +const { kHeadersList, kConstruct } = require('../core/symbols') const { kGuard } = require('./symbols') const { kEnumerableProperty } = require('../core/util') const { @@ -11,10 +11,18 @@ const { isValidHeaderValue } = require('./util') const { webidl } = require('./webidl') +const assert = require('assert') const kHeadersMap = Symbol('headers map') const kHeadersSortedMap = Symbol('headers map sorted') +/** + * @param {number} code + */ +function isHTTPWhiteSpaceCharCode (code) { + return code === 0x00a || code === 0x00d || code === 0x009 || code === 0x020 +} + /** * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize * @param {string} potentialValue @@ -23,10 +31,12 @@ function headerValueNormalize (potentialValue) { // To normalize a byte sequence potentialValue, remove // any leading and trailing HTTP whitespace bytes from // potentialValue. - return potentialValue.replace( - /^[\r\n\t ]+|[\r\n\t ]+$/g, - '' - ) + let i = 0; let j = potentialValue.length + + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i + + return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j) } function fill (headers, object) { @@ -35,28 +45,30 @@ function fill (headers, object) { // 1. If object is a sequence, then for each header in object: // Note: webidl conversion to array has already been done. if (Array.isArray(object)) { - for (const header of object) { + for (let i = 0; i < object.length; ++i) { + const header = object[i] // 1. If header does not contain exactly two items, then throw a TypeError. if (header.length !== 2) { - webidl.errors.exception({ + throw webidl.errors.exception({ header: 'Headers constructor', message: `expected name/value pair to be length 2, found ${header.length}.` }) } // 2. Append (header’s first item, header’s second item) to headers. - headers.append(header[0], header[1]) + appendHeader(headers, header[0], header[1]) } } else if (typeof object === 'object' && object !== null) { // Note: null should throw // 2. Otherwise, object is a record, then for each key → value in object, // append (key, value) to headers - for (const [key, value] of Object.entries(object)) { - headers.append(key, value) + const keys = Object.keys(object) + for (let i = 0; i < keys.length; ++i) { + appendHeader(headers, keys[i], object[keys[i]]) } } else { - webidl.errors.conversionFailed({ + throw webidl.errors.conversionFailed({ prefix: 'Headers constructor', argument: 'Argument 1', types: ['sequence>', 'record'] @@ -64,11 +76,59 @@ function fill (headers, object) { } } +/** + * @see https://fetch.spec.whatwg.org/#concept-headers-append + */ +function appendHeader (headers, name, value) { + // 1. Normalize value. + value = headerValueNormalize(value) + + // 2. If name is not a header name or value is not a + // header value, then throw a TypeError. + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.append', + value: name, + type: 'header name' + }) + } else if (!isValidHeaderValue(value)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.append', + value, + type: 'header value' + }) + } + + // 3. If headers’s guard is "immutable", then throw a TypeError. + // 4. Otherwise, if headers’s guard is "request" and name is a + // forbidden header name, return. + // Note: undici does not implement forbidden header names + if (headers[kGuard] === 'immutable') { + throw new TypeError('immutable') + } else if (headers[kGuard] === 'request-no-cors') { + // 5. Otherwise, if headers’s guard is "request-no-cors": + // TODO + } + + // 6. Otherwise, if headers’s guard is "response" and name is a + // forbidden response-header name, return. + + // 7. Append (name, value) to headers’s header list. + return headers[kHeadersList].append(name, value) + + // 8. If headers’s guard is "request-no-cors", then remove + // privileged no-CORS request headers from headers +} + class HeadersList { + /** @type {[string, string][]|null} */ + cookies = null + constructor (init) { if (init instanceof HeadersList) { this[kHeadersMap] = new Map(init[kHeadersMap]) this[kHeadersSortedMap] = init[kHeadersSortedMap] + this.cookies = init.cookies === null ? null : [...init.cookies] } else { this[kHeadersMap] = new Map(init) this[kHeadersSortedMap] = null @@ -88,6 +148,7 @@ class HeadersList { clear () { this[kHeadersMap].clear() this[kHeadersSortedMap] = null + this.cookies = null } // https://fetch.spec.whatwg.org/#concept-header-list-append @@ -96,27 +157,40 @@ class HeadersList { // 1. If list contains name, then set name to the first such // header’s name. - name = name.toLowerCase() - const exists = this[kHeadersMap].get(name) + const lowercaseName = name.toLowerCase() + const exists = this[kHeadersMap].get(lowercaseName) // 2. Append (name, value) to list. if (exists) { - this[kHeadersMap].set(name, `${exists}, ${value}`) + const delimiter = lowercaseName === 'cookie' ? '; ' : ', ' + this[kHeadersMap].set(lowercaseName, { + name: exists.name, + value: `${exists.value}${delimiter}${value}` + }) } else { - this[kHeadersMap].set(name, `${value}`) + this[kHeadersMap].set(lowercaseName, { name, value }) + } + + if (lowercaseName === 'set-cookie') { + this.cookies ??= [] + this.cookies.push(value) } } // https://fetch.spec.whatwg.org/#concept-header-list-set set (name, value) { this[kHeadersSortedMap] = null - name = name.toLowerCase() + const lowercaseName = name.toLowerCase() + + if (lowercaseName === 'set-cookie') { + this.cookies = [value] + } // 1. If list contains name, then set the value of // the first such header to value and remove the // others. // 2. Otherwise, append header (name, value) to list. - return this[kHeadersMap].set(name, value) + this[kHeadersMap].set(lowercaseName, { name, value }) } // https://fetch.spec.whatwg.org/#concept-header-list-delete @@ -124,49 +198,51 @@ class HeadersList { this[kHeadersSortedMap] = null name = name.toLowerCase() - return this[kHeadersMap].delete(name) + + if (name === 'set-cookie') { + this.cookies = null + } + + this[kHeadersMap].delete(name) } // https://fetch.spec.whatwg.org/#concept-header-list-get get (name) { - name = name.toLowerCase() + const value = this[kHeadersMap].get(name.toLowerCase()) // 1. If list does not contain name, then return null. - if (!this.contains(name)) { - return null - } - // 2. Return the values of all headers in list whose name // is a byte-case-insensitive match for name, // separated from each other by 0x2C 0x20, in order. - return this[kHeadersMap].get(name) ?? null - } - - has (name) { - name = name.toLowerCase() - return this[kHeadersMap].has(name) + return value === undefined ? null : value.value } - keys () { - return this[kHeadersMap].keys() + * [Symbol.iterator] () { + // use the lowercased name + for (const [name, { value }] of this[kHeadersMap]) { + yield [name, value] + } } - values () { - return this[kHeadersMap].values() - } + get entries () { + const headers = {} - entries () { - return this[kHeadersMap].entries() - } + if (this[kHeadersMap].size) { + for (const { name, value } of this[kHeadersMap].values()) { + headers[name] = value + } + } - [Symbol.iterator] () { - return this[kHeadersMap][Symbol.iterator]() + return headers } } // https://fetch.spec.whatwg.org/#headers-class class Headers { constructor (init = undefined) { + if (init === kConstruct) { + return + } this[kHeadersList] = new HeadersList() // The new Headers(init) constructor steps are: @@ -181,81 +257,29 @@ class Headers { } } - get [Symbol.toStringTag] () { - return this.constructor.name - } - // https://fetch.spec.whatwg.org/#dom-headers-append append (name, value) { - if (!(this instanceof Headers)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Headers) - if (arguments.length < 2) { - throw new TypeError( - `Failed to execute 'append' on 'Headers': 2 arguments required, but only ${arguments.length} present.` - ) - } + webidl.argumentLengthCheck(arguments, 2, { header: 'Headers.append' }) name = webidl.converters.ByteString(name) value = webidl.converters.ByteString(value) - // 1. Normalize value. - value = headerValueNormalize(value) - - // 2. If name is not a header name or value is not a - // header value, then throw a TypeError. - if (!isValidHeaderName(name)) { - webidl.errors.invalidArgument({ - prefix: 'Headers.append', - value: name, - type: 'header name' - }) - } else if (!isValidHeaderValue(value)) { - webidl.errors.invalidArgument({ - prefix: 'Headers.append', - value, - type: 'header value' - }) - } - - // 3. If headers’s guard is "immutable", then throw a TypeError. - // 4. Otherwise, if headers’s guard is "request" and name is a - // forbidden header name, return. - // Note: undici does not implement forbidden header names - if (this[kGuard] === 'immutable') { - throw new TypeError('immutable') - } else if (this[kGuard] === 'request-no-cors') { - // 5. Otherwise, if headers’s guard is "request-no-cors": - // TODO - } - - // 6. Otherwise, if headers’s guard is "response" and name is a - // forbidden response-header name, return. - - // 7. Append (name, value) to headers’s header list. - // 8. If headers’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from headers - return this[kHeadersList].append(name, value) + return appendHeader(this, name, value) } // https://fetch.spec.whatwg.org/#dom-headers-delete delete (name) { - if (!(this instanceof Headers)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Headers) - if (arguments.length < 1) { - throw new TypeError( - `Failed to execute 'delete' on 'Headers': 1 argument required, but only ${arguments.length} present.` - ) - } + webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.delete' }) name = webidl.converters.ByteString(name) // 1. If name is not a header name, then throw a TypeError. if (!isValidHeaderName(name)) { - webidl.errors.invalidArgument({ + throw webidl.errors.invalidArgument({ prefix: 'Headers.delete', value: name, type: 'header name' @@ -287,26 +311,20 @@ class Headers { // 7. Delete name from this’s header list. // 8. If this’s guard is "request-no-cors", then remove // privileged no-CORS request headers from this. - return this[kHeadersList].delete(name) + this[kHeadersList].delete(name) } // https://fetch.spec.whatwg.org/#dom-headers-get get (name) { - if (!(this instanceof Headers)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Headers) - if (arguments.length < 1) { - throw new TypeError( - `Failed to execute 'get' on 'Headers': 1 argument required, but only ${arguments.length} present.` - ) - } + webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.get' }) name = webidl.converters.ByteString(name) // 1. If name is not a header name, then throw a TypeError. if (!isValidHeaderName(name)) { - webidl.errors.invalidArgument({ + throw webidl.errors.invalidArgument({ prefix: 'Headers.get', value: name, type: 'header name' @@ -320,21 +338,15 @@ class Headers { // https://fetch.spec.whatwg.org/#dom-headers-has has (name) { - if (!(this instanceof Headers)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Headers) - if (arguments.length < 1) { - throw new TypeError( - `Failed to execute 'has' on 'Headers': 1 argument required, but only ${arguments.length} present.` - ) - } + webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.has' }) name = webidl.converters.ByteString(name) // 1. If name is not a header name, then throw a TypeError. if (!isValidHeaderName(name)) { - webidl.errors.invalidArgument({ + throw webidl.errors.invalidArgument({ prefix: 'Headers.has', value: name, type: 'header name' @@ -348,15 +360,9 @@ class Headers { // https://fetch.spec.whatwg.org/#dom-headers-set set (name, value) { - if (!(this instanceof Headers)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Headers) - if (arguments.length < 2) { - throw new TypeError( - `Failed to execute 'set' on 'Headers': 2 arguments required, but only ${arguments.length} present.` - ) - } + webidl.argumentLengthCheck(arguments, 2, { header: 'Headers.set' }) name = webidl.converters.ByteString(name) value = webidl.converters.ByteString(value) @@ -367,13 +373,13 @@ class Headers { // 2. If name is not a header name or value is not a // header value, then throw a TypeError. if (!isValidHeaderName(name)) { - webidl.errors.invalidArgument({ + throw webidl.errors.invalidArgument({ prefix: 'Headers.set', value: name, type: 'header name' }) } else if (!isValidHeaderValue(value)) { - webidl.errors.invalidArgument({ + throw webidl.errors.invalidArgument({ prefix: 'Headers.set', value, type: 'header value' @@ -398,38 +404,119 @@ class Headers { // 7. Set (name, value) in this’s header list. // 8. If this’s guard is "request-no-cors", then remove // privileged no-CORS request headers from this - return this[kHeadersList].set(name, value) + this[kHeadersList].set(name, value) } + // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie + getSetCookie () { + webidl.brandCheck(this, Headers) + + // 1. If this’s header list does not contain `Set-Cookie`, then return « ». + // 2. Return the values of all headers in this’s header list whose name is + // a byte-case-insensitive match for `Set-Cookie`, in order. + + const list = this[kHeadersList].cookies + + if (list) { + return [...list] + } + + return [] + } + + // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine get [kHeadersSortedMap] () { - if (!this[kHeadersList][kHeadersSortedMap]) { - this[kHeadersList][kHeadersSortedMap] = new Map([...this[kHeadersList]].sort((a, b) => a[0] < b[0] ? -1 : 1)) + if (this[kHeadersList][kHeadersSortedMap]) { + return this[kHeadersList][kHeadersSortedMap] + } + + // 1. Let headers be an empty list of headers with the key being the name + // and value the value. + const headers = [] + + // 2. Let names be the result of convert header names to a sorted-lowercase + // set with all the names of the headers in list. + const names = [...this[kHeadersList]].sort((a, b) => a[0] < b[0] ? -1 : 1) + const cookies = this[kHeadersList].cookies + + // 3. For each name of names: + for (let i = 0; i < names.length; ++i) { + const [name, value] = names[i] + // 1. If name is `set-cookie`, then: + if (name === 'set-cookie') { + // 1. Let values be a list of all values of headers in list whose name + // is a byte-case-insensitive match for name, in order. + + // 2. For each value of values: + // 1. Append (name, value) to headers. + for (let j = 0; j < cookies.length; ++j) { + headers.push([name, cookies[j]]) + } + } else { + // 2. Otherwise: + + // 1. Let value be the result of getting name from list. + + // 2. Assert: value is non-null. + assert(value !== null) + + // 3. Append (name, value) to headers. + headers.push([name, value]) + } } - return this[kHeadersList][kHeadersSortedMap] + + this[kHeadersList][kHeadersSortedMap] = headers + + // 4. Return headers. + return headers } keys () { - if (!(this instanceof Headers)) { - throw new TypeError('Illegal invocation') + webidl.brandCheck(this, Headers) + + if (this[kGuard] === 'immutable') { + const value = this[kHeadersSortedMap] + return makeIterator(() => value, 'Headers', + 'key') } - return makeIterator(this[kHeadersSortedMap].keys(), 'Headers') + return makeIterator( + () => [...this[kHeadersSortedMap].values()], + 'Headers', + 'key' + ) } values () { - if (!(this instanceof Headers)) { - throw new TypeError('Illegal invocation') + webidl.brandCheck(this, Headers) + + if (this[kGuard] === 'immutable') { + const value = this[kHeadersSortedMap] + return makeIterator(() => value, 'Headers', + 'value') } - return makeIterator(this[kHeadersSortedMap].values(), 'Headers') + return makeIterator( + () => [...this[kHeadersSortedMap].values()], + 'Headers', + 'value' + ) } entries () { - if (!(this instanceof Headers)) { - throw new TypeError('Illegal invocation') + webidl.brandCheck(this, Headers) + + if (this[kGuard] === 'immutable') { + const value = this[kHeadersSortedMap] + return makeIterator(() => value, 'Headers', + 'key+value') } - return makeIterator(this[kHeadersSortedMap].entries(), 'Headers') + return makeIterator( + () => [...this[kHeadersSortedMap].values()], + 'Headers', + 'key+value' + ) } /** @@ -437,15 +524,9 @@ class Headers { * @param {unknown} thisArg */ forEach (callbackFn, thisArg = globalThis) { - if (!(this instanceof Headers)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Headers) - if (arguments.length < 1) { - throw new TypeError( - `Failed to execute 'forEach' on 'Headers': 1 argument required, but only ${arguments.length} present.` - ) - } + webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.forEach' }) if (typeof callbackFn !== 'function') { throw new TypeError( @@ -459,9 +540,7 @@ class Headers { } [Symbol.for('nodejs.util.inspect.custom')] () { - if (!(this instanceof Headers)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Headers) return this[kHeadersList] } @@ -475,10 +554,16 @@ Object.defineProperties(Headers.prototype, { get: kEnumerableProperty, has: kEnumerableProperty, set: kEnumerableProperty, + getSetCookie: kEnumerableProperty, keys: kEnumerableProperty, values: kEnumerableProperty, entries: kEnumerableProperty, - forEach: kEnumerableProperty + forEach: kEnumerableProperty, + [Symbol.iterator]: { enumerable: false }, + [Symbol.toStringTag]: { + value: 'Headers', + configurable: true + } }) webidl.converters.HeadersInit = function (V) { @@ -490,7 +575,7 @@ webidl.converters.HeadersInit = function (V) { return webidl.converters['record'](V) } - webidl.errors.conversionFailed({ + throw webidl.errors.conversionFailed({ prefix: 'Headers constructor', argument: 'Argument 1', types: ['sequence>', 'record'] diff --git a/action/node_modules/undici/lib/fetch/index.js b/action/node_modules/undici/lib/fetch/index.js index 663d274f..dea20696 100644 --- a/action/node_modules/undici/lib/fetch/index.js +++ b/action/node_modules/undici/lib/fetch/index.js @@ -35,33 +35,38 @@ const { isCancelled, isAborted, isErrorLike, - fullyReadBody + fullyReadBody, + readableStreamClose, + isomorphicEncode, + urlIsLocal, + urlIsHttpHttpsScheme, + urlHasHttpsScheme } = require('./util') const { kState, kHeaders, kGuard, kRealm } = require('./symbols') const assert = require('assert') -const { safelyExtractBody, extractBody } = require('./body') +const { safelyExtractBody } = require('./body') const { - redirectStatus, + redirectStatusSet, nullBodyStatus, - safeMethods, + safeMethodsSet, requestBodyHeader, - subresource, + subresourceSet, DOMException } = require('./constants') const { kHeadersList } = require('../core/symbols') const EE = require('events') const { Readable, pipeline } = require('stream') -const { isErrored, isReadable } = require('../core/util') +const { addAbortListener, isErrored, isReadable, nodeMajor, nodeMinor } = require('../core/util') const { dataURLProcessor, serializeAMimeType } = require('./dataURL') const { TransformStream } = require('stream/web') +const { getGlobalDispatcher } = require('../global') +const { webidl } = require('./webidl') +const { STATUS_CODES } = require('http') +const GET_OR_HEAD = ['GET', 'HEAD'] /** @type {import('buffer').resolveObjectURL} */ let resolveObjectURL -let ReadableStream - -const nodeVersion = process.versions.node.split('.') -const nodeMajor = Number(nodeVersion[0]) -const nodeMinor = Number(nodeVersion[1]) +let ReadableStream = globalThis.ReadableStream class Fetch extends EE { constructor (dispatcher) { @@ -71,6 +76,12 @@ class Fetch extends EE { this.connection = null this.dump = false this.state = 'ongoing' + // 2 terminated listeners get added per request, + // but only 1 gets removed. If there are 20 redirects, + // 21 listeners will be added. + // See https://github.com/nodejs/undici/issues/1711 + // TODO (fix): Find and fix root cause for leaked listener. + this.setMaxListeners(21) } terminate (reason) { @@ -83,26 +94,36 @@ class Fetch extends EE { this.emit('terminated', reason) } - abort () { + // https://fetch.spec.whatwg.org/#fetch-controller-abort + abort (error) { if (this.state !== 'ongoing') { return } - const reason = new DOMException('The operation was aborted.', 'AbortError') - + // 1. Set controller’s state to "aborted". this.state = 'aborted' - this.connection?.destroy(reason) - this.emit('terminated', reason) + + // 2. Let fallbackError be an "AbortError" DOMException. + // 3. Set error to fallbackError if it is not given. + if (!error) { + error = new DOMException('The operation was aborted.', 'AbortError') + } + + // 4. Let serializedError be StructuredSerialize(error). + // If that threw an exception, catch it, and let + // serializedError be StructuredSerialize(fallbackError). + + // 5. Set controller’s serialized abort reason to serializedError. + this.serializedAbortReason = error + + this.connection?.destroy(error) + this.emit('terminated', error) } } // https://fetch.spec.whatwg.org/#fetch-method -async function fetch (input, init = {}) { - if (arguments.length < 1) { - throw new TypeError( - `Failed to execute 'fetch' on 'Window': 1 argument required, but only ${arguments.length} present.` - ) - } +function fetch (input, init = {}) { + webidl.argumentLengthCheck(arguments, 1, { header: 'globalThis.fetch' }) // 1. Let p be a new promise. const p = createDeferredPromise() @@ -124,8 +145,9 @@ async function fetch (input, init = {}) { // 4. If requestObject’s signal’s aborted flag is set, then: if (requestObject.signal.aborted) { - // 1. Abort fetch with p, request, and null. - abortFetch(p, request, null) + // 1. Abort the fetch() call with p, request, null, and + // requestObject’s signal’s abort reason. + abortFetch(p, request, null, requestObject.signal.reason) // 2. Return p. return p.promise @@ -153,21 +175,22 @@ async function fetch (input, init = {}) { let controller = null // 11. Add the following abort steps to requestObject’s signal: - requestObject.signal.addEventListener( - 'abort', + addAbortListener( + requestObject.signal, () => { // 1. Set locallyAborted to true. locallyAborted = true - // 2. Abort fetch with p, request, and responseObject. - abortFetch(p, request, responseObject) + // 2. Assert: controller is non-null. + assert(controller != null) - // 3. If controller is not null, then abort controller. - if (controller != null) { - controller.abort() - } - }, - { once: true } + // 3. Abort controller with requestObject’s signal’s abort reason. + controller.abort(requestObject.signal.reason) + + // 4. Abort the fetch() call with p, request, responseObject, + // and requestObject’s signal’s abort reason. + abortFetch(p, request, responseObject, requestObject.signal.reason) + } ) // 12. Let handleFetchDone given response response be to finalize and @@ -182,14 +205,20 @@ async function fetch (input, init = {}) { const processResponse = (response) => { // 1. If locallyAborted is true, terminate these substeps. if (locallyAborted) { - return + return Promise.resolve() } - // 2. If response’s aborted flag is set, then abort fetch with p, - // request, and responseObject, and terminate these substeps. + // 2. If response’s aborted flag is set, then: if (response.aborted) { - abortFetch(p, request, responseObject) - return + // 1. Let deserializedError be the result of deserialize a serialized + // abort reason given controller’s serialized abort reason and + // relevantRealm. + + // 2. Abort the fetch() call with p, request, responseObject, and + // deserializedError. + + abortFetch(p, request, responseObject, controller.serializedAbortReason) + return Promise.resolve() } // 3. If response is a network error, then reject p with a TypeError @@ -198,7 +227,7 @@ async function fetch (input, init = {}) { p.reject( Object.assign(new TypeError('fetch failed'), { cause: response.error }) ) - return + return Promise.resolve() } // 4. Set responseObject to the result of creating a Response object, @@ -218,7 +247,7 @@ async function fetch (input, init = {}) { request, processResponseEndOfBody: handleFetchDone, processResponse, - dispatcher: this // undici + dispatcher: init.dispatcher ?? getGlobalDispatcher() // undici }) // 14. Return p. @@ -247,7 +276,7 @@ function finalizeAndReportTiming (response, initiatorType = 'other') { let cacheState = response.cacheState // 6. If originalURL’s scheme is not an HTTP(S) scheme, then return. - if (!/^https?:/.test(originalURL.protocol)) { + if (!urlIsHttpHttpsScheme(originalURL)) { return } @@ -257,7 +286,7 @@ function finalizeAndReportTiming (response, initiatorType = 'other') { } // 8. If response’s timing allow passed flag is not set, then: - if (!timingInfo.timingAllowPassed) { + if (!response.timingAllowPassed) { // 1. Set timingInfo to a the result of creating an opaque timing info for timingInfo. timingInfo = createOpaqueTimingInfo({ startTime: timingInfo.startTime @@ -272,7 +301,7 @@ function finalizeAndReportTiming (response, initiatorType = 'other') { // capability. // TODO: given global’s relevant settings object’s cross-origin isolated // capability? - response.timingInfo.endTime = coarsenedSharedCurrentTime() + timingInfo.endTime = coarsenedSharedCurrentTime() // 10. Set response’s timing info to timingInfo. response.timingInfo = timingInfo @@ -290,20 +319,24 @@ function finalizeAndReportTiming (response, initiatorType = 'other') { // https://w3c.github.io/resource-timing/#dfn-mark-resource-timing function markResourceTiming (timingInfo, originalURL, initiatorType, globalThis, cacheState) { - if (nodeMajor >= 18 && nodeMinor >= 2) { - performance.markResourceTiming(timingInfo, originalURL, initiatorType, globalThis, cacheState) + if (nodeMajor > 18 || (nodeMajor === 18 && nodeMinor >= 2)) { + performance.markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis, cacheState) } } // https://fetch.spec.whatwg.org/#abort-fetch -function abortFetch (p, request, responseObject) { - // 1. Let error be an "AbortError" DOMException. - const error = new DOMException('The operation was aborted.', 'AbortError') +function abortFetch (p, request, responseObject, error) { + // Note: AbortSignal.reason was added in node v17.2.0 + // which would give us an undefined error to reject with. + // Remove this once node v16 is no longer supported. + if (!error) { + error = new DOMException('The operation was aborted.', 'AbortError') + } - // 2. Reject promise with error. + // 1. Reject promise with error. p.reject(error) - // 3. If request’s body is not null and is readable, then cancel request’s + // 2. If request’s body is not null and is readable, then cancel request’s // body with error. if (request.body != null && isReadable(request.body?.stream)) { request.body.stream.cancel(error).catch((err) => { @@ -315,15 +348,15 @@ function abortFetch (p, request, responseObject) { }) } - // 4. If responseObject is null, then return. + // 3. If responseObject is null, then return. if (responseObject == null) { return } - // 5. Let response be responseObject’s response. + // 4. Let response be responseObject’s response. const response = responseObject[kState] - // 6. If response’s body is not null and is readable, then error response’s + // 5. If response’s body is not null and is readable, then error response’s // body with error. if (response.body != null && isReadable(response.body?.stream)) { response.body.stream.cancel(error).catch((err) => { @@ -399,8 +432,8 @@ function fetching ({ crossOriginIsolatedCapability } - // 7. If request’s body is a byte sequence, then set request’s body to the - // first return value of safely extracting request’s body. + // 7. If request’s body is a byte sequence, then set request’s body to + // request’s body as a body. // NOTE: Since fetching is only called from fetch, body should already be // extracted. assert(!request.body || request.body.stream) @@ -442,7 +475,7 @@ function fetching ({ } // 12. If request’s header list does not contain `Accept`, then: - if (!request.headersList.has('accept')) { + if (!request.headersList.contains('accept')) { // 1. Let value be `*/*`. const value = '*/*' @@ -465,7 +498,7 @@ function fetching ({ // 13. If request’s header list does not contain `Accept-Language`, then // user agents should append `Accept-Language`/an appropriate value to // request’s header list. - if (!request.headersList.has('accept-language')) { + if (!request.headersList.contains('accept-language')) { request.headersList.append('accept-language', '*') } @@ -477,7 +510,7 @@ function fetching ({ } // 15. If request is a subresource request, then: - if (subresource.includes(request.destination)) { + if (subresourceSet.has(request.destination)) { // TODO } @@ -501,10 +534,7 @@ async function mainFetch (fetchParams, recursive = false) { // 3. If request’s local-URLs-only flag is set and request’s current URL is // not local, then set response to a network error. - if ( - request.localURLsOnly && - !/^(about|blob|data):/.test(requestCurrentURL(request).protocol) - ) { + if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) { response = makeNetworkError('local URLs only') } @@ -594,7 +624,7 @@ async function mainFetch (fetchParams, recursive = false) { } // request’s current URL’s scheme is not an HTTP(S) scheme - if (!/^https?:/.test(requestCurrentURL(request).protocol)) { + if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) { // Return a network error. return makeNetworkError('URL scheme must be a HTTP(S) scheme') } @@ -688,7 +718,7 @@ async function mainFetch (fetchParams, recursive = false) { response.type === 'opaque' && internalResponse.status === 206 && internalResponse.rangeRequested && - !request.headers.has('range') + !request.headers.contains('range') ) { response = internalResponse = makeNetworkError() } @@ -730,8 +760,7 @@ async function mainFetch (fetchParams, recursive = false) { return } - // 2. Set response’s body to the first return value of safely - // extracting bytes. + // 2. Set response’s body to bytes as a body. response.body = safelyExtractBody(bytes)[0] // 3. Run fetch finale given fetchParams and response. @@ -748,76 +777,77 @@ async function mainFetch (fetchParams, recursive = false) { // https://fetch.spec.whatwg.org/#concept-scheme-fetch // given a fetch params fetchParams -async function schemeFetch (fetchParams) { - // let request be fetchParams’s request +function schemeFetch (fetchParams) { + // Note: since the connection is destroyed on redirect, which sets fetchParams to a + // cancelled state, we do not want this condition to trigger *unless* there have been + // no redirects. See https://github.com/nodejs/undici/issues/1776 + // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. + if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) { + return Promise.resolve(makeAppropriateNetworkError(fetchParams)) + } + + // 2. Let request be fetchParams’s request. const { request } = fetchParams - const { - protocol: scheme, - pathname: path - } = requestCurrentURL(request) + const { protocol: scheme } = requestCurrentURL(request) - // switch on request’s current URL’s scheme, and run the associated steps: + // 3. Switch on request’s current URL’s scheme and run the associated steps: switch (scheme) { case 'about:': { // If request’s current URL’s path is the string "blank", then return a new response // whose status message is `OK`, header list is « (`Content-Type`, `text/html;charset=utf-8`) », - // and body is the empty byte sequence. - if (path === 'blank') { - const resp = makeResponse({ - statusText: 'OK', - headersList: [ - ['content-type', 'text/html;charset=utf-8'] - ] - }) - - resp.urlList = [new URL('about:blank')] - return resp - } + // and body is the empty byte sequence as a body. // Otherwise, return a network error. - return makeNetworkError('invalid path called') + return Promise.resolve(makeNetworkError('about scheme is not supported')) } case 'blob:': { - resolveObjectURL = resolveObjectURL || require('buffer').resolveObjectURL + if (!resolveObjectURL) { + resolveObjectURL = require('buffer').resolveObjectURL + } - // 1. Run these steps, but abort when the ongoing fetch is terminated: - // 1. Let blob be request’s current URL’s blob URL entry’s object. - // https://w3c.github.io/FileAPI/#blob-url-entry - // P.S. Thank God this method is available in node. - const currentURL = requestCurrentURL(request) + // 1. Let blobURLEntry be request’s current URL’s blob URL entry. + const blobURLEntry = requestCurrentURL(request) // https://github.com/web-platform-tests/wpt/blob/7b0ebaccc62b566a1965396e5be7bb2bc06f841f/FileAPI/url/resources/fetch-tests.js#L52-L56 // Buffer.resolveObjectURL does not ignore URL queries. - if (currentURL.search.length !== 0) { - return makeNetworkError('NetworkError when attempting to fetch resource.') + if (blobURLEntry.search.length !== 0) { + return Promise.resolve(makeNetworkError('NetworkError when attempting to fetch resource.')) } - const blob = resolveObjectURL(currentURL.toString()) + const blobURLEntryObject = resolveObjectURL(blobURLEntry.toString()) - // 2. If request’s method is not `GET` or blob is not a Blob object, then return a network error. [FILEAPI] - if (request.method !== 'GET' || !isBlobLike(blob)) { - return makeNetworkError('invalid method') + // 2. If request’s method is not `GET`, blobURLEntry is null, or blobURLEntry’s + // object is not a Blob object, then return a network error. + if (request.method !== 'GET' || !isBlobLike(blobURLEntryObject)) { + return Promise.resolve(makeNetworkError('invalid method')) } - // 3. Let response be a new response whose status message is `OK`. - const response = makeResponse({ statusText: 'OK', urlList: [currentURL] }) + // 3. Let bodyWithType be the result of safely extracting blobURLEntry’s object. + const bodyWithType = safelyExtractBody(blobURLEntryObject) - // 4. Append (`Content-Length`, blob’s size attribute value) to response’s header list. - response.headersList.set('content-length', `${blob.size}`) + // 4. Let body be bodyWithType’s body. + const body = bodyWithType[0] - // 5. Append (`Content-Type`, blob’s type attribute value) to response’s header list. - response.headersList.set('content-type', blob.type) + // 5. Let length be body’s length, serialized and isomorphic encoded. + const length = isomorphicEncode(`${body.length}`) - // 6. Set response’s body to the result of performing the read operation on blob. - // TODO (fix): This needs to read? - response.body = extractBody(blob)[0] + // 6. Let type be bodyWithType’s type if it is non-null; otherwise the empty byte sequence. + const type = bodyWithType[1] ?? '' - // 7. Return response. - return response + // 7. Return a new response whose status message is `OK`, header list is + // « (`Content-Length`, length), (`Content-Type`, type) », and body is body. + const response = makeResponse({ + statusText: 'OK', + headersList: [ + ['content-length', { name: 'Content-Length', value: length }], + ['content-type', { name: 'Content-Type', value: type }] + ] + }) - // 2. If aborted, then return the appropriate network error for fetchParams. - // TODO + response.body = body + + return Promise.resolve(response) } case 'data:': { // 1. Let dataURLStruct be the result of running the @@ -828,7 +858,7 @@ async function schemeFetch (fetchParams) { // 2. If dataURLStruct is failure, then return a // network error. if (dataURLStruct === 'failure') { - return makeNetworkError('failed to fetch the data URL') + return Promise.resolve(makeNetworkError('failed to fetch the data URL')) } // 3. Let mimeType be dataURLStruct’s MIME type, serialized. @@ -836,29 +866,29 @@ async function schemeFetch (fetchParams) { // 4. Return a response whose status message is `OK`, // header list is « (`Content-Type`, mimeType) », - // and body is dataURLStruct’s body. - return makeResponse({ + // and body is dataURLStruct’s body as a body. + return Promise.resolve(makeResponse({ statusText: 'OK', headersList: [ - ['content-type', mimeType] + ['content-type', { name: 'Content-Type', value: mimeType }] ], - body: extractBody(dataURLStruct.body)[0] - }) + body: safelyExtractBody(dataURLStruct.body)[0] + })) } case 'file:': { // For now, unfortunate as it is, file URLs are left as an exercise for the reader. // When in doubt, return a network error. - return makeNetworkError('not implemented... yet...') + return Promise.resolve(makeNetworkError('not implemented... yet...')) } case 'http:': case 'https:': { // Return the result of running HTTP fetch given fetchParams. - return await httpFetch(fetchParams) + return httpFetch(fetchParams) .catch((err) => makeNetworkError(err)) } default: { - return makeNetworkError('unknown scheme') + return Promise.resolve(makeNetworkError('unknown scheme')) } } } @@ -877,7 +907,7 @@ function finalizeResponse (fetchParams, response) { } // https://fetch.spec.whatwg.org/#fetch-finale -async function fetchFinale (fetchParams, response) { +function fetchFinale (fetchParams, response) { // 1. If response is a network error, then: if (response.type === 'error') { // 1. Set response’s URL list to « fetchParams’s request’s URL list[0] ». @@ -930,6 +960,14 @@ async function fetchFinale (fetchParams, response) { start () {}, transform: identityTransformAlgorithm, flush: processResponseEndOfBody + }, { + size () { + return 1 + } + }, { + size () { + return 1 + } }) // 4. Set response’s body to the result of piping response’s body through transformStream. @@ -953,8 +991,9 @@ async function fetchFinale (fetchParams, response) { } else { // 4. Otherwise, fully read response’s body given processBody, processBodyError, // and fetchParams’s task destination. - await fullyReadBody(response.body, processBody, processBodyError) + return fullyReadBody(response.body, processBody, processBodyError) } + return Promise.resolve() } } @@ -1025,7 +1064,7 @@ async function httpFetch (fetchParams) { } // 8. If actualResponse’s status is a redirect status, then: - if (redirectStatus.includes(actualResponse.status)) { + if (redirectStatusSet.has(actualResponse.status)) { // 1. If actualResponse’s status is not 303, request’s body is not null, // and the connection uses HTTP/2, then user agents may, and are even // encouraged to, transmit an RST_STREAM frame. @@ -1062,7 +1101,7 @@ async function httpFetch (fetchParams) { } // https://fetch.spec.whatwg.org/#http-redirect-fetch -async function httpRedirectFetch (fetchParams, response) { +function httpRedirectFetch (fetchParams, response) { // 1. Let request be fetchParams’s request. const request = fetchParams.request @@ -1088,21 +1127,21 @@ async function httpRedirectFetch (fetchParams, response) { } } catch (err) { // 5. If locationURL is failure, then return a network error. - return makeNetworkError(err) + return Promise.resolve(makeNetworkError(err)) } // 6. If locationURL’s scheme is not an HTTP(S) scheme, then return a network // error. - if (!/^https?:/.test(locationURL.protocol)) { - return makeNetworkError('URL scheme must be a HTTP(S) scheme') + if (!urlIsHttpHttpsScheme(locationURL)) { + return Promise.resolve(makeNetworkError('URL scheme must be a HTTP(S) scheme')) } - // 7. If request’s redirect count is twenty, return a network error. + // 7. If request’s redirect count is 20, then return a network error. if (request.redirectCount === 20) { - return makeNetworkError('redirect count exceeded') + return Promise.resolve(makeNetworkError('redirect count exceeded')) } - // 8. Increase request’s redirect count by one. + // 8. Increase request’s redirect count by 1. request.redirectCount += 1 // 9. If request’s mode is "cors", locationURL includes credentials, and @@ -1113,7 +1152,7 @@ async function httpRedirectFetch (fetchParams, response) { (locationURL.username || locationURL.password) && !sameOrigin(request, locationURL) ) { - return makeNetworkError('cross origin not allowed for request mode "cors"') + return Promise.resolve(makeNetworkError('cross origin not allowed for request mode "cors"')) } // 10. If request’s response tainting is "cors" and locationURL includes @@ -1122,9 +1161,9 @@ async function httpRedirectFetch (fetchParams, response) { request.responseTainting === 'cors' && (locationURL.username || locationURL.password) ) { - return makeNetworkError( + return Promise.resolve(makeNetworkError( 'URL cannot contain credentials for request mode "cors"' - ) + )) } // 11. If actualResponse’s status is not 303, request’s body is non-null, @@ -1134,7 +1173,7 @@ async function httpRedirectFetch (fetchParams, response) { request.body != null && request.body.source == null ) { - return makeNetworkError() + return Promise.resolve(makeNetworkError()) } // 12. If one of the following is true @@ -1143,7 +1182,7 @@ async function httpRedirectFetch (fetchParams, response) { if ( ([301, 302].includes(actualResponse.status) && request.method === 'POST') || (actualResponse.status === 303 && - !['GET', 'HEAD'].includes(request.method)) + !GET_OR_HEAD.includes(request.method)) ) { // then: // 1. Set request’s method to `GET` and request’s body to null. @@ -1157,36 +1196,51 @@ async function httpRedirectFetch (fetchParams, response) { } } - // 13. If request’s body is non-null, then set request’s body to the first return + // 13. If request’s current URL’s origin is not same origin with locationURL’s + // origin, then for each headerName of CORS non-wildcard request-header name, + // delete headerName from request’s header list. + if (!sameOrigin(requestCurrentURL(request), locationURL)) { + // https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name + request.headersList.delete('authorization') + + // https://fetch.spec.whatwg.org/#authentication-entries + request.headersList.delete('proxy-authorization', true) + + // "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement. + request.headersList.delete('cookie') + request.headersList.delete('host') + } + + // 14. If request’s body is non-null, then set request’s body to the first return // value of safely extracting request’s body’s source. if (request.body != null) { - assert(request.body.source) + assert(request.body.source != null) request.body = safelyExtractBody(request.body.source)[0] } - // 14. Let timingInfo be fetchParams’s timing info. + // 15. Let timingInfo be fetchParams’s timing info. const timingInfo = fetchParams.timingInfo - // 15. Set timingInfo’s redirect end time and post-redirect start time to the + // 16. Set timingInfo’s redirect end time and post-redirect start time to the // coarsened shared current time given fetchParams’s cross-origin isolated // capability. timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability) - // 16. If timingInfo’s redirect start time is 0, then set timingInfo’s + // 17. If timingInfo’s redirect start time is 0, then set timingInfo’s // redirect start time to timingInfo’s start time. if (timingInfo.redirectStartTime === 0) { timingInfo.redirectStartTime = timingInfo.startTime } - // 17. Append locationURL to request’s URL list. + // 18. Append locationURL to request’s URL list. request.urlList.push(locationURL) - // 18. Invoke set request’s referrer policy on redirect on request and + // 19. Invoke set request’s referrer policy on redirect on request and // actualResponse. setRequestReferrerPolicyOnRedirect(request, actualResponse) - // 19. Return the result of running main fetch given fetchParams and true. + // 20. Return the result of running main fetch given fetchParams and true. return mainFetch(fetchParams, true) } @@ -1263,8 +1317,7 @@ async function httpNetworkOrCacheFetch ( // 7. If contentLength is non-null, then set contentLengthHeaderValue to // contentLength, serialized and isomorphic encoded. if (contentLength != null) { - // TODO: isomorphic encoded - contentLengthHeaderValue = String(contentLength) + contentLengthHeaderValue = isomorphicEncode(`${contentLength}`) } // 8. If contentLengthHeaderValue is non-null, then append @@ -1287,8 +1340,7 @@ async function httpNetworkOrCacheFetch ( // `Referer`/httpRequest’s referrer, serialized and isomorphic encoded, // to httpRequest’s header list. if (httpRequest.referrer instanceof URL) { - // TODO: isomorphic encoded - httpRequest.headersList.append('referer', httpRequest.referrer.href) + httpRequest.headersList.append('referer', isomorphicEncode(httpRequest.referrer.href)) } // 12. Append a request `Origin` header for httpRequest. @@ -1300,8 +1352,8 @@ async function httpNetworkOrCacheFetch ( // 14. If httpRequest’s header list does not contain `User-Agent`, then // user agents should append `User-Agent`/default `User-Agent` value to // httpRequest’s header list. - if (!httpRequest.headersList.has('user-agent')) { - httpRequest.headersList.append('user-agent', 'undici') + if (!httpRequest.headersList.contains('user-agent')) { + httpRequest.headersList.append('user-agent', typeof esbuildDetection === 'undefined' ? 'undici' : 'node') } // 15. If httpRequest’s cache mode is "default" and httpRequest’s header @@ -1310,11 +1362,11 @@ async function httpNetworkOrCacheFetch ( // httpRequest’s cache mode to "no-store". if ( httpRequest.cache === 'default' && - (httpRequest.headersList.has('if-modified-since') || - httpRequest.headersList.has('if-none-match') || - httpRequest.headersList.has('if-unmodified-since') || - httpRequest.headersList.has('if-match') || - httpRequest.headersList.has('if-range')) + (httpRequest.headersList.contains('if-modified-since') || + httpRequest.headersList.contains('if-none-match') || + httpRequest.headersList.contains('if-unmodified-since') || + httpRequest.headersList.contains('if-match') || + httpRequest.headersList.contains('if-range')) ) { httpRequest.cache = 'no-store' } @@ -1326,7 +1378,7 @@ async function httpNetworkOrCacheFetch ( if ( httpRequest.cache === 'no-cache' && !httpRequest.preventNoCacheCacheControlHeaderModification && - !httpRequest.headersList.has('cache-control') + !httpRequest.headersList.contains('cache-control') ) { httpRequest.headersList.append('cache-control', 'max-age=0') } @@ -1335,34 +1387,36 @@ async function httpNetworkOrCacheFetch ( if (httpRequest.cache === 'no-store' || httpRequest.cache === 'reload') { // 1. If httpRequest’s header list does not contain `Pragma`, then append // `Pragma`/`no-cache` to httpRequest’s header list. - if (!httpRequest.headersList.has('pragma')) { + if (!httpRequest.headersList.contains('pragma')) { httpRequest.headersList.append('pragma', 'no-cache') } // 2. If httpRequest’s header list does not contain `Cache-Control`, // then append `Cache-Control`/`no-cache` to httpRequest’s header list. - if (!httpRequest.headersList.has('cache-control')) { + if (!httpRequest.headersList.contains('cache-control')) { httpRequest.headersList.append('cache-control', 'no-cache') } } // 18. If httpRequest’s header list contains `Range`, then append // `Accept-Encoding`/`identity` to httpRequest’s header list. - if (httpRequest.headersList.has('range')) { + if (httpRequest.headersList.contains('range')) { httpRequest.headersList.append('accept-encoding', 'identity') } // 19. Modify httpRequest’s header list per HTTP. Do not append a given // header if httpRequest’s header list contains that header’s name. // TODO: https://github.com/whatwg/fetch/issues/1285#issuecomment-896560129 - if (!httpRequest.headersList.has('accept-encoding')) { - if (/^https:/.test(requestCurrentURL(httpRequest).protocol)) { + if (!httpRequest.headersList.contains('accept-encoding')) { + if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) { httpRequest.headersList.append('accept-encoding', 'br, gzip, deflate') } else { httpRequest.headersList.append('accept-encoding', 'gzip, deflate') } } + httpRequest.headersList.delete('host') + // 20. If includeCredentials is true, then: if (includeCredentials) { // 1. If the user agent is not configured to block cookies for httpRequest @@ -1415,7 +1469,7 @@ async function httpNetworkOrCacheFetch ( // responses in httpCache, as per the "Invalidation" chapter of HTTP // Caching, and set storedResponse to null. [HTTP-CACHING] if ( - !safeMethods.includes(httpRequest.method) && + !safeMethodsSet.has(httpRequest.method) && forwardResponse.status >= 200 && forwardResponse.status <= 399 ) { @@ -1444,7 +1498,7 @@ async function httpNetworkOrCacheFetch ( // 12. If httpRequest’s header list contains `Range`, then set response’s // range-requested flag. - if (httpRequest.headersList.has('range')) { + if (httpRequest.headersList.contains('range')) { response.rangeRequested = true } @@ -1699,12 +1753,17 @@ async function httpNetworkFetch ( } try { - const { body, status, statusText, headersList } = await dispatch({ body: requestBody }) + // socket is only provided for websockets + const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody }) - const iterator = body[Symbol.asyncIterator]() - fetchParams.controller.next = () => iterator.next() + if (socket) { + response = makeResponse({ status, statusText, headersList, socket }) + } else { + const iterator = body[Symbol.asyncIterator]() + fetchParams.controller.next = () => iterator.next() - response = makeResponse({ status, statusText, headersList }) + response = makeResponse({ status, statusText, headersList }) + } } catch (err) { // 10. If aborted, then: if (err.name === 'AbortError') { @@ -1712,7 +1771,7 @@ async function httpNetworkFetch ( fetchParams.controller.connection.destroy() // 2. Return the appropriate network error for fetchParams. - return makeAppropriateNetworkError(fetchParams) + return makeAppropriateNetworkError(fetchParams, err) } return makeNetworkError(err) @@ -1725,9 +1784,9 @@ async function httpNetworkFetch ( } // 12. Let cancelAlgorithm be an algorithm that aborts fetchParams’s - // controller. - const cancelAlgorithm = () => { - fetchParams.controller.abort() + // controller with reason, given reason. + const cancelAlgorithm = (reason) => { + fetchParams.controller.abort(reason) } // 13. Let highWaterMark be a non-negative, non-NaN number, chosen by @@ -1758,7 +1817,12 @@ async function httpNetworkFetch ( await cancelAlgorithm(reason) } }, - { highWaterMark: 0 } + { + highWaterMark: 0, + size () { + return 1 + } + } ) // 17. Run these steps, but abort when the ongoing fetch is terminated: @@ -1792,6 +1856,7 @@ async function httpNetworkFetch ( // 4. Set bytes to the result of handling content codings given // codings and bytes. let bytes + let isFailure try { const { done, value } = await fetchParams.controller.next() @@ -1806,6 +1871,10 @@ async function httpNetworkFetch ( bytes = undefined } else { bytes = err + + // err may be propagated from the result of calling readablestream.cancel, + // which might not be an error. https://github.com/nodejs/undici/issues/2009 + isFailure = true } } @@ -1814,14 +1883,7 @@ async function httpNetworkFetch ( // body is done normally and stream is readable, then close // stream, finalize response for fetchParams and response, and // abort these in-parallel steps. - try { - fetchParams.controller.controller.close() - } catch (err) { - // TODO (fix): How/Why can this happen? Do we have a bug? - if (!/Controller is already closed/.test(err)) { - throw err - } - } + readableStreamClose(fetchParams.controller.controller) finalizeResponse(fetchParams, response) @@ -1832,7 +1894,7 @@ async function httpNetworkFetch ( timingInfo.decodedBodySize += bytes?.byteLength ?? 0 // 6. If bytes is failure, then terminate fetchParams’s controller. - if (isErrorLike(bytes)) { + if (isFailure) { fetchParams.controller.terminate(bytes) return } @@ -1862,10 +1924,13 @@ async function httpNetworkFetch ( // 1. Set response’s aborted flag. response.aborted = true - // 2. If stream is readable, error stream with an "AbortError" DOMException. + // 2. If stream is readable, then error stream with the result of + // deserialize a serialized abort reason given fetchParams’s + // controller’s serialized abort reason and an + // implementation-defined realm. if (isReadable(stream)) { fetchParams.controller.controller.error( - new DOMException('The operation was aborted.', 'AbortError') + fetchParams.controller.serializedAbortReason ) } } else { @@ -1887,16 +1952,18 @@ async function httpNetworkFetch ( async function dispatch ({ body }) { const url = requestCurrentURL(request) - return new Promise((resolve, reject) => fetchParams.controller.dispatcher.dispatch( + /** @type {import('../..').Agent} */ + const agent = fetchParams.controller.dispatcher + + return new Promise((resolve, reject) => agent.dispatch( { path: url.pathname + url.search, origin: url.origin, method: request.method, - body: fetchParams.controller.dispatcher.isMockActive ? request.body && request.body.source : body, - headers: [...request.headersList].flat(), + body: fetchParams.controller.dispatcher.isMockActive ? request.body && (request.body.source || request.body.stream) : body, + headers: request.headersList.entries, maxRedirections: 0, - bodyTimeout: 300_000, - headersTimeout: 300_000 + upgrade: request.mode === 'websocket' ? 'websocket' : undefined }, { body: null, @@ -1923,17 +1990,37 @@ async function httpNetworkFetch ( let location = '' const headers = new Headers() - for (let n = 0; n < headersList.length; n += 2) { - const key = headersList[n + 0].toString('latin1') - const val = headersList[n + 1].toString('latin1') - if (key.toLowerCase() === 'content-encoding') { - codings = val.split(',').map((x) => x.trim()) - } else if (key.toLowerCase() === 'location') { - location = val + // For H2, the headers are a plain JS object + // We distinguish between them and iterate accordingly + if (Array.isArray(headersList)) { + for (let n = 0; n < headersList.length; n += 2) { + const key = headersList[n + 0].toString('latin1') + const val = headersList[n + 1].toString('latin1') + if (key.toLowerCase() === 'content-encoding') { + // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1 + // "All content-coding values are case-insensitive..." + codings = val.toLowerCase().split(',').map((x) => x.trim()) + } else if (key.toLowerCase() === 'location') { + location = val + } + + headers[kHeadersList].append(key, val) } + } else { + const keys = Object.keys(headersList) + for (const key of keys) { + const val = headersList[key] + if (key.toLowerCase() === 'content-encoding') { + // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1 + // "All content-coding values are case-insensitive..." + codings = val.toLowerCase().split(',').map((x) => x.trim()).reverse() + } else if (key.toLowerCase() === 'location') { + location = val + } - headers.append(key, val) + headers[kHeadersList].append(key, val) + } } this.body = new Readable({ read: resume }) @@ -1942,14 +2029,22 @@ async function httpNetworkFetch ( const willFollow = request.redirect === 'follow' && location && - redirectStatus.includes(status) + redirectStatusSet.has(status) // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding if (request.method !== 'HEAD' && request.method !== 'CONNECT' && !nullBodyStatus.includes(status) && !willFollow) { for (const coding of codings) { - if (/(x-)?gzip/.test(coding)) { - decoders.push(zlib.createGunzip()) - } else if (/(x-)?deflate/.test(coding)) { + // https://www.rfc-editor.org/rfc/rfc9112.html#section-7.2 + if (coding === 'x-gzip' || coding === 'gzip') { + decoders.push(zlib.createGunzip({ + // Be less strict when decoding compressed responses, since sometimes + // servers send slightly invalid responses that are still accepted + // by common browsers. + // Always using Z_SYNC_FLUSH is what cURL does. + flush: zlib.constants.Z_SYNC_FLUSH, + finishFlush: zlib.constants.Z_SYNC_FLUSH + })) + } else if (coding === 'deflate') { decoders.push(zlib.createInflate()) } else if (coding === 'br') { decoders.push(zlib.createBrotliDecompress()) @@ -2015,6 +2110,30 @@ async function httpNetworkFetch ( fetchParams.controller.terminate(error) reject(error) + }, + + onUpgrade (status, headersList, socket) { + if (status !== 101) { + return + } + + const headers = new Headers() + + for (let n = 0; n < headersList.length; n += 2) { + const key = headersList[n + 0].toString('latin1') + const val = headersList[n + 1].toString('latin1') + + headers[kHeadersList].append(key, val) + } + + resolve({ + status, + statusText: STATUS_CODES[status], + headersList: headers[kHeadersList], + socket + }) + + return true } } )) diff --git a/action/node_modules/undici/lib/fetch/request.js b/action/node_modules/undici/lib/fetch/request.js index bc0ad3c2..6fe4dff6 100644 --- a/action/node_modules/undici/lib/fetch/request.js +++ b/action/node_modules/undici/lib/fetch/request.js @@ -9,27 +9,32 @@ const util = require('../core/util') const { isValidHTTPToken, sameOrigin, - normalizeMethod + normalizeMethod, + makePolicyContainer, + normalizeMethodRecord } = require('./util') const { - forbiddenMethods, - corsSafeListedMethods, + forbiddenMethodsSet, + corsSafeListedMethodsSet, referrerPolicy, requestRedirect, requestMode, requestCredentials, - requestCache + requestCache, + requestDuplex } = require('./constants') const { kEnumerableProperty } = util const { kHeaders, kSignal, kState, kGuard, kRealm } = require('./symbols') const { webidl } = require('./webidl') const { getGlobalOrigin } = require('./global') -const { kHeadersList } = require('../core/symbols') +const { URLSerializer } = require('./dataURL') +const { kHeadersList, kConstruct } = require('../core/symbols') const assert = require('assert') +const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = require('events') -let TransformStream +let TransformStream = globalThis.TransformStream -const kInit = Symbol('init') +const kAbortController = Symbol('abortController') const requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { signal.removeEventListener('abort', abort) @@ -39,23 +44,23 @@ const requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { class Request { // https://fetch.spec.whatwg.org/#dom-request constructor (input, init = {}) { - if (input === kInit) { + if (input === kConstruct) { return } - if (arguments.length < 1) { - throw new TypeError( - `Failed to construct 'Request': 1 argument required, but only ${arguments.length} present.` - ) - } + webidl.argumentLengthCheck(arguments, 1, { header: 'Request constructor' }) input = webidl.converters.RequestInfo(input) init = webidl.converters.RequestInit(init) - // TODO + // https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object this[kRealm] = { settingsObject: { - baseUrl: getGlobalOrigin() + baseUrl: getGlobalOrigin(), + get origin () { + return this.baseUrl?.origin + }, + policyContainer: makePolicyContainer() } } @@ -124,12 +129,12 @@ class Request { } // 10. If init["window"] exists and is non-null, then throw a TypeError. - if (init.window !== undefined && init.window != null) { + if (init.window != null) { throw new TypeError(`'window' option '${window}' must be null`) } // 11. If init["window"] exists, then set window to "no-window". - if (init.window !== undefined) { + if ('window' in init) { window = 'no-window' } @@ -178,8 +183,10 @@ class Request { urlList: [...request.urlList] }) + const initHasKey = Object.keys(init).length !== 0 + // 13. If init is not empty, then: - if (Object.keys(init).length > 0) { + if (initHasKey) { // 1. If request’s mode is "navigate", then set it to "same-origin". if (request.mode === 'navigate') { request.mode = 'same-origin' @@ -227,14 +234,18 @@ class Request { } // 3. If one of the following is true - // parsedReferrer’s cannot-be-a-base-URL is true, scheme is "about", - // and path contains a single string "client" - // parsedReferrer’s origin is not same origin with origin + // - parsedReferrer’s scheme is "about" and path is the string "client" + // - parsedReferrer’s origin is not same origin with origin // then set request’s referrer to "client". - // TODO - - // 4. Otherwise, set request’s referrer to parsedReferrer. - request.referrer = parsedReferrer + if ( + (parsedReferrer.protocol === 'about:' && parsedReferrer.hostname === 'client') || + (origin && !sameOrigin(parsedReferrer, this[kRealm].settingsObject.baseUrl)) + ) { + request.referrer = 'client' + } else { + // 4. Otherwise, set request’s referrer to parsedReferrer. + request.referrer = parsedReferrer + } } } @@ -242,29 +253,19 @@ class Request { // to it. if (init.referrerPolicy !== undefined) { request.referrerPolicy = init.referrerPolicy - if (!referrerPolicy.includes(request.referrerPolicy)) { - throw new TypeError( - `Failed to construct 'Request': The provided value '${request.referrerPolicy}' is not a valid enum value of type ReferrerPolicy.` - ) - } } // 16. Let mode be init["mode"] if it exists, and fallbackMode otherwise. let mode if (init.mode !== undefined) { mode = init.mode - if (!requestMode.includes(mode)) { - throw new TypeError( - `Failed to construct 'Request': The provided value '${request.mode}' is not a valid enum value of type RequestMode.` - ) - } } else { mode = fallbackMode } // 17. If mode is "navigate", then throw a TypeError. if (mode === 'navigate') { - webidl.errors.exception({ + throw webidl.errors.exception({ header: 'Request constructor', message: 'invalid request mode navigate.' }) @@ -279,21 +280,11 @@ class Request { // to it. if (init.credentials !== undefined) { request.credentials = init.credentials - if (!requestCredentials.includes(request.credentials)) { - throw new TypeError( - `Failed to construct 'Request': The provided value '${request.credentials}' is not a valid enum value of type RequestCredentials.` - ) - } } // 18. If init["cache"] exists, then set request’s cache mode to it. if (init.cache !== undefined) { request.cache = init.cache - if (!requestCache.includes(request.cache)) { - throw new TypeError( - `Failed to construct 'Request': The provided value '${request.cache}' is not a valid enum value of type RequestCache.` - ) - } } // 21. If request’s cache mode is "only-if-cached" and request’s mode is @@ -307,15 +298,10 @@ class Request { // 22. If init["redirect"] exists, then set request’s redirect mode to it. if (init.redirect !== undefined) { request.redirect = init.redirect - if (!requestRedirect.includes(request.redirect)) { - throw new TypeError( - `Failed to construct 'Request': The provided value '${request.redirect}' is not a valid enum value of type RequestRedirect.` - ) - } } // 23. If init["integrity"] exists, then set request’s integrity metadata to it. - if (init.integrity !== undefined && init.integrity != null) { + if (init.integrity != null) { request.integrity = String(init.integrity) } @@ -331,16 +317,16 @@ class Request { // 2. If method is not a method or method is a forbidden method, then // throw a TypeError. - if (!isValidHTTPToken(init.method)) { - throw TypeError(`'${init.method}' is not a valid HTTP method.`) + if (!isValidHTTPToken(method)) { + throw new TypeError(`'${method}' is not a valid HTTP method.`) } - if (forbiddenMethods.indexOf(method.toUpperCase()) !== -1) { - throw TypeError(`'${init.method}' HTTP method is unsupported.`) + if (forbiddenMethodsSet.has(method.toUpperCase())) { + throw new TypeError(`'${method}' HTTP method is unsupported.`) } // 3. Normalize method. - method = normalizeMethod(init.method) + method = normalizeMethodRecord[method] ?? normalizeMethod(method) // 4. Set request’s method to method. request.method = method @@ -356,6 +342,8 @@ class Request { // 28. Set this’s signal to a new AbortSignal object with this’s relevant // Realm. + // TODO: could this be simplified with AbortSignal.any + // (https://dom.spec.whatwg.org/#dom-abortsignal-any) const ac = new AbortController() this[kSignal] = ac.signal this[kSignal][kRealm] = this[kRealm] @@ -375,16 +363,41 @@ class Request { if (signal.aborted) { ac.abort(signal.reason) } else { - const abort = () => ac.abort(signal.reason) - signal.addEventListener('abort', abort, { once: true }) - requestFinalizer.register(this, { signal, abort }) + // Keep a strong ref to ac while request object + // is alive. This is needed to prevent AbortController + // from being prematurely garbage collected. + // See, https://github.com/nodejs/undici/issues/1926. + this[kAbortController] = ac + + const acRef = new WeakRef(ac) + const abort = function () { + const ac = acRef.deref() + if (ac !== undefined) { + ac.abort(this.reason) + } + } + + // Third-party AbortControllers may not work with these. + // See, https://github.com/nodejs/undici/pull/1910#issuecomment-1464495619. + try { + // If the max amount of listeners is equal to the default, increase it + // This is only available in node >= v19.9.0 + if (typeof getMaxListeners === 'function' && getMaxListeners(signal) === defaultMaxListeners) { + setMaxListeners(100, signal) + } else if (getEventListeners(signal, 'abort').length >= defaultMaxListeners) { + setMaxListeners(100, signal) + } + } catch {} + + util.addAbortListener(signal, abort) + requestFinalizer.register(ac, { signal, abort }) } } // 30. Set this’s headers to a new Headers object with this’s relevant // Realm, whose header list is request’s header list and guard is // "request". - this[kHeaders] = new Headers() + this[kHeaders] = new Headers(kConstruct) this[kHeaders][kHeadersList] = request.headersList this[kHeaders][kGuard] = 'request' this[kHeaders][kRealm] = this[kRealm] @@ -393,7 +406,7 @@ class Request { if (mode === 'no-cors') { // 1. If this’s request’s method is not a CORS-safelisted method, // then throw a TypeError. - if (!corsSafeListedMethods.includes(request.method)) { + if (!corsSafeListedMethodsSet.has(request.method)) { throw new TypeError( `'${request.method} is unsupported in no-cors mode.` ) @@ -404,25 +417,25 @@ class Request { } // 32. If init is not empty, then: - if (Object.keys(init).length !== 0) { + if (initHasKey) { + /** @type {HeadersList} */ + const headersList = this[kHeaders][kHeadersList] // 1. Let headers be a copy of this’s headers and its associated header // list. - let headers = new Headers(this[kHeaders]) - // 2. If init["headers"] exists, then set headers to init["headers"]. - if (init.headers !== undefined) { - headers = init.headers - } + const headers = init.headers !== undefined ? init.headers : new HeadersList(headersList) // 3. Empty this’s headers’s header list. - this[kHeaders][kHeadersList].clear() + headersList.clear() // 4. If headers is a Headers object, then for each header in its header // list, append header’s name/header’s value to this’s headers. - if (headers.constructor.name === 'Headers') { + if (headers instanceof HeadersList) { for (const [key, val] of headers) { - this[kHeaders].append(key, val) + headersList.append(key, val) } + // Note: Copy the `set-cookie` meta-data. + headersList.cookies = headers.cookies } else { // 5. Otherwise, fill this’s headers with headers. fillHeaders(this[kHeaders], headers) @@ -437,7 +450,7 @@ class Request { // non-null, and request’s method is `GET` or `HEAD`, then throw a // TypeError. if ( - ((init.body !== undefined && init.body != null) || inputBody != null) && + (init.body != null || inputBody != null) && (request.method === 'GET' || request.method === 'HEAD') ) { throw new TypeError('Request with GET/HEAD method cannot have body.') @@ -447,7 +460,7 @@ class Request { let initBody = null // 36. If init["body"] exists and is non-null, then: - if (init.body !== undefined && init.body != null) { + if (init.body != null) { // 1. Let Content-Type be null. // 2. Set initBody and Content-Type to the result of extracting // init["body"], with keepalive set to request’s keepalive. @@ -460,7 +473,7 @@ class Request { // 3, If Content-Type is non-null and this’s headers’s header list does // not contain `Content-Type`, then append `Content-Type`/Content-Type to // this’s headers. - if (contentType && !this[kHeaders].has('content-type')) { + if (contentType && !this[kHeaders][kHeadersList].contains('content-type')) { this[kHeaders].append('content-type', contentType) } } @@ -472,7 +485,13 @@ class Request { // 38. If inputOrInitBody is non-null and inputOrInitBody’s source is // null, then: if (inputOrInitBody != null && inputOrInitBody.source == null) { - // 1. If this’s request’s mode is neither "same-origin" nor "cors", + // 1. If initBody is non-null and init["duplex"] does not exist, + // then throw a TypeError. + if (initBody != null && init.duplex == null) { + throw new TypeError('RequestInit: duplex option is required when sending a body.') + } + + // 2. If this’s request’s mode is neither "same-origin" nor "cors", // then throw a TypeError. if (request.mode !== 'same-origin' && request.mode !== 'cors') { throw new TypeError( @@ -480,7 +499,7 @@ class Request { ) } - // 2. Set this’s request’s use-CORS-preflight flag. + // 3. Set this’s request’s use-CORS-preflight flag. request.useCORSPreflightFlag = true } @@ -515,15 +534,9 @@ class Request { this[kState].body = finalBody } - get [Symbol.toStringTag] () { - return this.constructor.name - } - // Returns request’s HTTP method, which is "GET" by default. get method () { - if (!(this instanceof Request)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Request) // The method getter steps are to return this’s request’s method. return this[kState].method @@ -531,21 +544,17 @@ class Request { // Returns the URL of request as a string. get url () { - if (!(this instanceof Request)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Request) // The url getter steps are to return this’s request’s URL, serialized. - return this[kState].url.toString() + return URLSerializer(this[kState].url) } // Returns a Headers object consisting of the headers associated with request. // Note that headers added in the network layer by the user agent will not // be accounted for in this object, e.g., the "Host" header. get headers () { - if (!(this instanceof Request)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Request) // The headers getter steps are to return this’s headers. return this[kHeaders] @@ -554,9 +563,7 @@ class Request { // Returns the kind of resource requested by request, e.g., "document" // or "script". get destination () { - if (!(this instanceof Request)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Request) // The destination getter are to return this’s request’s destination. return this[kState].destination @@ -568,9 +575,7 @@ class Request { // during fetching to determine the value of the `Referer` header of the // request being made. get referrer () { - if (!(this instanceof Request)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Request) // 1. If this’s request’s referrer is "no-referrer", then return the // empty string. @@ -592,9 +597,7 @@ class Request { // This is used during fetching to compute the value of the request’s // referrer. get referrerPolicy () { - if (!(this instanceof Request)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Request) // The referrerPolicy getter steps are to return this’s request’s referrer policy. return this[kState].referrerPolicy @@ -604,9 +607,7 @@ class Request { // whether the request will use CORS, or will be restricted to same-origin // URLs. get mode () { - if (!(this instanceof Request)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Request) // The mode getter steps are to return this’s request’s mode. return this[kState].mode @@ -624,9 +625,7 @@ class Request { // which is a string indicating how the request will // interact with the browser’s cache when fetching. get cache () { - if (!(this instanceof Request)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Request) // The cache getter steps are to return this’s request’s cache mode. return this[kState].cache @@ -637,9 +636,7 @@ class Request { // request will be handled during fetching. A request // will follow redirects by default. get redirect () { - if (!(this instanceof Request)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Request) // The redirect getter steps are to return this’s request’s redirect mode. return this[kState].redirect @@ -649,9 +646,7 @@ class Request { // cryptographic hash of the resource being fetched. Its value // consists of multiple hashes separated by whitespace. [SRI] get integrity () { - if (!(this instanceof Request)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Request) // The integrity getter steps are to return this’s request’s integrity // metadata. @@ -661,9 +656,7 @@ class Request { // Returns a boolean indicating whether or not request can outlive the // global in which it was created. get keepalive () { - if (!(this instanceof Request)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Request) // The keepalive getter steps are to return this’s request’s keepalive. return this[kState].keepalive @@ -672,9 +665,7 @@ class Request { // Returns a boolean indicating whether or not request is for a reload // navigation. get isReloadNavigation () { - if (!(this instanceof Request)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Request) // The isReloadNavigation getter steps are to return true if this’s // request’s reload-navigation flag is set; otherwise false. @@ -684,9 +675,7 @@ class Request { // Returns a boolean indicating whether or not request is for a history // navigation (a.k.a. back-foward navigation). get isHistoryNavigation () { - if (!(this instanceof Request)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Request) // The isHistoryNavigation getter steps are to return true if this’s request’s // history-navigation flag is set; otherwise false. @@ -697,19 +686,33 @@ class Request { // object indicating whether or not request has been aborted, and its // abort event handler. get signal () { - if (!(this instanceof Request)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Request) // The signal getter steps are to return this’s signal. return this[kSignal] } + get body () { + webidl.brandCheck(this, Request) + + return this[kState].body ? this[kState].body.stream : null + } + + get bodyUsed () { + webidl.brandCheck(this, Request) + + return !!this[kState].body && util.isDisturbed(this[kState].body.stream) + } + + get duplex () { + webidl.brandCheck(this, Request) + + return 'half' + } + // Returns a clone of request. clone () { - if (!(this instanceof Request)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Request) // 1. If this is unusable, then throw a TypeError. if (this.bodyUsed || this.body?.locked) { @@ -721,10 +724,10 @@ class Request { // 3. Let clonedRequestObject be the result of creating a Request object, // given clonedRequest, this’s headers’s guard, and this’s relevant Realm. - const clonedRequestObject = new Request(kInit) + const clonedRequestObject = new Request(kConstruct) clonedRequestObject[kState] = clonedRequest clonedRequestObject[kRealm] = this[kRealm] - clonedRequestObject[kHeaders] = new Headers() + clonedRequestObject[kHeaders] = new Headers(kConstruct) clonedRequestObject[kHeaders][kHeadersList] = clonedRequest.headersList clonedRequestObject[kHeaders][kGuard] = this[kHeaders][kGuard] clonedRequestObject[kHeaders][kRealm] = this[kHeaders][kRealm] @@ -734,12 +737,11 @@ class Request { if (this.signal.aborted) { ac.abort(this.signal.reason) } else { - this.signal.addEventListener( - 'abort', + util.addAbortListener( + this.signal, () => { ac.abort(this.signal.reason) - }, - { once: true } + } ) } clonedRequestObject[kSignal] = ac.signal @@ -821,7 +823,25 @@ Object.defineProperties(Request.prototype, { headers: kEnumerableProperty, redirect: kEnumerableProperty, clone: kEnumerableProperty, - signal: kEnumerableProperty + signal: kEnumerableProperty, + duplex: kEnumerableProperty, + destination: kEnumerableProperty, + body: kEnumerableProperty, + bodyUsed: kEnumerableProperty, + isHistoryNavigation: kEnumerableProperty, + isReloadNavigation: kEnumerableProperty, + keepalive: kEnumerableProperty, + integrity: kEnumerableProperty, + cache: kEnumerableProperty, + credentials: kEnumerableProperty, + attribute: kEnumerableProperty, + referrerPolicy: kEnumerableProperty, + referrer: kEnumerableProperty, + mode: kEnumerableProperty, + [Symbol.toStringTag]: { + value: 'Request', + configurable: true + } }) webidl.converters.Request = webidl.interfaceConverter( @@ -869,45 +889,31 @@ webidl.converters.RequestInit = webidl.dictionaryConverter([ key: 'referrerPolicy', converter: webidl.converters.DOMString, // https://w3c.github.io/webappsec-referrer-policy/#referrer-policy - allowedValues: [ - '', 'no-referrer', 'no-referrer-when-downgrade', - 'same-origin', 'origin', 'strict-origin', - 'origin-when-cross-origin', 'strict-origin-when-cross-origin', - 'unsafe-url' - ] + allowedValues: referrerPolicy }, { key: 'mode', converter: webidl.converters.DOMString, // https://fetch.spec.whatwg.org/#concept-request-mode - allowedValues: [ - 'same-origin', 'cors', 'no-cors', 'navigate', 'websocket' - ] + allowedValues: requestMode }, { key: 'credentials', converter: webidl.converters.DOMString, // https://fetch.spec.whatwg.org/#requestcredentials - allowedValues: [ - 'omit', 'same-origin', 'include' - ] + allowedValues: requestCredentials }, { key: 'cache', converter: webidl.converters.DOMString, // https://fetch.spec.whatwg.org/#requestcache - allowedValues: [ - 'default', 'no-store', 'reload', 'no-cache', 'force-cache', - 'only-if-cached' - ] + allowedValues: requestCache }, { key: 'redirect', converter: webidl.converters.DOMString, // https://fetch.spec.whatwg.org/#requestredirect - allowedValues: [ - 'follow', 'error', 'manual' - ] + allowedValues: requestRedirect }, { key: 'integrity', @@ -929,6 +935,11 @@ webidl.converters.RequestInit = webidl.dictionaryConverter([ { key: 'window', converter: webidl.converters.any + }, + { + key: 'duplex', + converter: webidl.converters.DOMString, + allowedValues: requestDuplex } ]) diff --git a/action/node_modules/undici/lib/fetch/response.js b/action/node_modules/undici/lib/fetch/response.js index 198beb9c..73386123 100644 --- a/action/node_modules/undici/lib/fetch/response.js +++ b/action/node_modules/undici/lib/fetch/response.js @@ -5,16 +5,16 @@ const { extractBody, cloneBody, mixinBody } = require('./body') const util = require('../core/util') const { kEnumerableProperty } = util const { - responseURL, isValidReasonPhrase, isCancelled, isAborted, isBlobLike, serializeJavascriptValueToJSONString, - isErrorLike + isErrorLike, + isomorphicEncode } = require('./util') const { - redirectStatus, + redirectStatusSet, nullBodyStatus, DOMException } = require('./constants') @@ -22,11 +22,13 @@ const { kState, kHeaders, kGuard, kRealm } = require('./symbols') const { webidl } = require('./webidl') const { FormData } = require('./formdata') const { getGlobalOrigin } = require('./global') -const { kHeadersList } = require('../core/symbols') +const { URLSerializer } = require('./dataURL') +const { kHeadersList, kConstruct } = require('../core/symbols') const assert = require('assert') const { types } = require('util') const ReadableStream = globalThis.ReadableStream || require('stream/web').ReadableStream +const textEncoder = new TextEncoder('utf-8') // https://fetch.spec.whatwg.org/#response-class class Response { @@ -49,18 +51,14 @@ class Response { // https://fetch.spec.whatwg.org/#dom-response-json static json (data, init = {}) { - if (arguments.length === 0) { - throw new TypeError( - 'Failed to execute \'json\' on \'Response\': 1 argument required, but 0 present.' - ) - } + webidl.argumentLengthCheck(arguments, 1, { header: 'Response.json' }) if (init !== null) { init = webidl.converters.ResponseInit(init) } // 1. Let bytes the result of running serialize a JavaScript value to JSON bytes on data. - const bytes = new TextEncoder('utf-8').encode( + const bytes = textEncoder.encode( serializeJavascriptValueToJSONString(data) ) @@ -86,11 +84,7 @@ class Response { static redirect (url, status = 302) { const relevantRealm = { settingsObject: {} } - if (arguments.length < 1) { - throw new TypeError( - `Failed to execute 'redirect' on 'Response': 1 argument required, but only ${arguments.length} present.` - ) - } + webidl.argumentLengthCheck(arguments, 1, { header: 'Response.redirect' }) url = webidl.converters.USVString(url) status = webidl.converters['unsigned short'](status) @@ -109,8 +103,8 @@ class Response { } // 3. If status is not a redirect status, then throw a RangeError. - if (!redirectStatus.includes(status)) { - throw new RangeError('Invalid status code') + if (!redirectStatusSet.has(status)) { + throw new RangeError('Invalid status code ' + status) } // 4. Let responseObject be the result of creating a Response object, @@ -124,8 +118,7 @@ class Response { responseObject[kState].status = status // 6. Let value be parsedURL, serialized and isomorphic encoded. - // TODO: isomorphic encoded? - const value = parsedURL.toString() + const value = isomorphicEncode(URLSerializer(parsedURL)) // 7. Append `Location`/value to responseObject’s response’s header list. responseObject[kState].headersList.append('location', value) @@ -151,7 +144,7 @@ class Response { // 2. Set this’s headers to a new Headers object with this’s relevant // Realm, whose header list is this’s response’s header list and guard // is "response". - this[kHeaders] = new Headers() + this[kHeaders] = new Headers(kConstruct) this[kHeaders][kGuard] = 'response' this[kHeaders][kHeadersList] = this[kState].headersList this[kHeaders][kRealm] = this[kRealm] @@ -169,15 +162,9 @@ class Response { initializeResponse(this, init, bodyWithType) } - get [Symbol.toStringTag] () { - return this.constructor.name - } - // Returns response’s type, e.g., "cors". get type () { - if (!(this instanceof Response)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Response) // The type getter steps are to return this’s response’s type. return this[kState].type @@ -185,32 +172,25 @@ class Response { // Returns response’s URL, if it has one; otherwise the empty string. get url () { - if (!(this instanceof Response)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Response) + + const urlList = this[kState].urlList // The url getter steps are to return the empty string if this’s // response’s URL is null; otherwise this’s response’s URL, // serialized with exclude fragment set to true. - let url = responseURL(this[kState]) + const url = urlList[urlList.length - 1] ?? null - if (url == null) { + if (url === null) { return '' } - if (url.hash) { - url = new URL(url) - url.hash = '' - } - - return url.toString() + return URLSerializer(url, true) } // Returns whether response was obtained through a redirect. get redirected () { - if (!(this instanceof Response)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Response) // The redirected getter steps are to return true if this’s response’s URL // list has more than one item; otherwise false. @@ -219,9 +199,7 @@ class Response { // Returns response’s status. get status () { - if (!(this instanceof Response)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Response) // The status getter steps are to return this’s response’s status. return this[kState].status @@ -229,9 +207,7 @@ class Response { // Returns whether response’s status is an ok status. get ok () { - if (!(this instanceof Response)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Response) // The ok getter steps are to return true if this’s response’s status is an // ok status; otherwise false. @@ -240,9 +216,7 @@ class Response { // Returns response’s status message. get statusText () { - if (!(this instanceof Response)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Response) // The statusText getter steps are to return this’s response’s status // message. @@ -251,23 +225,31 @@ class Response { // Returns response’s headers as Headers. get headers () { - if (!(this instanceof Response)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Response) // The headers getter steps are to return this’s headers. return this[kHeaders] } + get body () { + webidl.brandCheck(this, Response) + + return this[kState].body ? this[kState].body.stream : null + } + + get bodyUsed () { + webidl.brandCheck(this, Response) + + return !!this[kState].body && util.isDisturbed(this[kState].body.stream) + } + // Returns a clone of response. clone () { - if (!(this instanceof Response)) { - throw new TypeError('Illegal invocation') - } + webidl.brandCheck(this, Response) // 1. If this is unusable, then throw a TypeError. if (this.bodyUsed || (this.body && this.body.locked)) { - webidl.errors.exception({ + throw webidl.errors.exception({ header: 'Response.clone', message: 'Body has already been consumed.' }) @@ -299,7 +281,19 @@ Object.defineProperties(Response.prototype, { redirected: kEnumerableProperty, statusText: kEnumerableProperty, headers: kEnumerableProperty, - clone: kEnumerableProperty + clone: kEnumerableProperty, + body: kEnumerableProperty, + bodyUsed: kEnumerableProperty, + [Symbol.toStringTag]: { + value: 'Response', + configurable: true + } +}) + +Object.defineProperties(Response, { + json: kEnumerableProperty, + redirect: kEnumerableProperty, + error: kEnumerableProperty }) // https://fetch.spec.whatwg.org/#concept-response-clone @@ -355,9 +349,7 @@ function makeNetworkError (reason) { status: 0, error: isError ? reason - : new Error(reason ? String(reason) : reason, { - cause: isError ? reason : undefined - }), + : new Error(reason ? String(reason) : reason), aborted: reason && reason.name === 'AbortError' }) } @@ -435,15 +427,15 @@ function filterResponse (response, type) { } // https://fetch.spec.whatwg.org/#appropriate-network-error -function makeAppropriateNetworkError (fetchParams) { +function makeAppropriateNetworkError (fetchParams, err = null) { // 1. Assert: fetchParams is canceled. assert(isCancelled(fetchParams)) // 2. Return an aborted network error if fetchParams is aborted; // otherwise return a network error. return isAborted(fetchParams) - ? makeNetworkError(new DOMException('The operation was aborted.', 'AbortError')) - : makeNetworkError(fetchParams.controller.terminated.reason) + ? makeNetworkError(Object.assign(new DOMException('The operation was aborted.', 'AbortError'), { cause: err })) + : makeNetworkError(Object.assign(new DOMException('Request was cancelled.'), { cause: err })) } // https://whatpr.org/fetch/1392.html#initialize-a-response @@ -476,16 +468,16 @@ function initializeResponse (response, init, body) { // 5. If init["headers"] exists, then fill response’s headers with init["headers"]. if ('headers' in init && init.headers != null) { - fill(response[kState].headersList, init.headers) + fill(response[kHeaders], init.headers) } // 6. If body was given, then: if (body) { // 1. If response's status is a null body status, then throw a TypeError. if (nullBodyStatus.includes(response.status)) { - webidl.errors.exception({ + throw webidl.errors.exception({ header: 'Response constructor', - message: 'Invalid response status code.' + message: 'Invalid response status code ' + response.status }) } @@ -494,7 +486,7 @@ function initializeResponse (response, init, body) { // 3. If body's type is non-null and response's header list does not contain // `Content-Type`, then append (`Content-Type`, body's type) to response's header list. - if (body.type != null && !response[kState].headersList.has('Content-Type')) { + if (body.type != null && !response[kState].headersList.contains('Content-Type')) { response[kState].headersList.append('content-type', body.type) } } @@ -522,11 +514,7 @@ webidl.converters.XMLHttpRequestBodyInit = function (V) { return webidl.converters.Blob(V, { strict: false }) } - if ( - types.isAnyArrayBuffer(V) || - types.isTypedArray(V) || - types.isDataView(V) - ) { + if (types.isArrayBuffer(V) || types.isTypedArray(V) || types.isDataView(V)) { return webidl.converters.BufferSource(V) } @@ -578,5 +566,6 @@ module.exports = { makeResponse, makeAppropriateNetworkError, filterResponse, - Response + Response, + cloneResponse } diff --git a/action/node_modules/undici/lib/fetch/util.js b/action/node_modules/undici/lib/fetch/util.js index 6cf628cc..ede4ec48 100644 --- a/action/node_modules/undici/lib/fetch/util.js +++ b/action/node_modules/undici/lib/fetch/util.js @@ -1,31 +1,26 @@ 'use strict' -const { redirectStatus } = require('./constants') +const { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = require('./constants') +const { getGlobalOrigin } = require('./global') const { performance } = require('perf_hooks') const { isBlobLike, toUSVString, ReadableStreamFrom } = require('../core/util') const assert = require('assert') const { isUint8Array } = require('util/types') +let supportedHashes = [] + // https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable /** @type {import('crypto')|undefined} */ let crypto try { crypto = require('crypto') + const possibleRelevantHashes = ['sha256', 'sha384', 'sha512'] + supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)) +/* c8 ignore next 3 */ } catch { - } -// https://fetch.spec.whatwg.org/#block-bad-port -const badPorts = [ - '1', '7', '9', '11', '13', '15', '17', '19', '20', '21', '22', '23', '25', '37', '42', '43', '53', '69', '77', '79', - '87', '95', '101', '102', '103', '104', '109', '110', '111', '113', '115', '117', '119', '123', '135', '137', - '139', '143', '161', '179', '389', '427', '465', '512', '513', '514', '515', '526', '530', '531', '532', - '540', '548', '554', '556', '563', '587', '601', '636', '989', '990', '993', '995', '1719', '1720', '1723', - '2049', '3659', '4045', '5060', '5061', '6000', '6566', '6665', '6666', '6667', '6668', '6669', '6697', - '10080' -] - function responseURL (response) { // https://fetch.spec.whatwg.org/#responses // A response has an associated URL. It is a pointer to the last URL @@ -38,7 +33,7 @@ function responseURL (response) { // https://fetch.spec.whatwg.org/#concept-response-location-url function responseLocationURL (response, requestFragment) { // 1. If response’s status is not a redirect status, then return null. - if (!redirectStatus.includes(response.status)) { + if (!redirectStatusSet.has(response.status)) { return null } @@ -46,9 +41,11 @@ function responseLocationURL (response, requestFragment) { // `Location` and response’s header list. let location = response.headersList.get('location') - // 3. If location is a value, then set location to the result of parsing - // location with response’s URL. - location = location ? new URL(location, responseURL(response)) : null + // 3. If location is a header value, then set location to the result of + // parsing location with response’s URL. + if (location !== null && isValidHeaderValue(location)) { + location = new URL(location, responseURL(response)) + } // 4. If location is a URL whose fragment is null, then set location’s // fragment to requestFragment. @@ -71,7 +68,7 @@ function requestBadPort (request) { // 2. If url’s scheme is an HTTP(S) scheme and url’s port is a bad port, // then return blocked. - if (/^https?:/.test(url.protocol) && badPorts.includes(url.port)) { + if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { return 'blocked' } @@ -110,59 +107,58 @@ function isValidReasonPhrase (statusText) { return true } -function isTokenChar (c) { - return !( - c >= 0x7f || - c <= 0x20 || - c === '(' || - c === ')' || - c === '<' || - c === '>' || - c === '@' || - c === ',' || - c === ';' || - c === ':' || - c === '\\' || - c === '"' || - c === '/' || - c === '[' || - c === ']' || - c === '?' || - c === '=' || - c === '{' || - c === '}' - ) +/** + * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 + * @param {number} c + */ +function isTokenCharCode (c) { + switch (c) { + case 0x22: + case 0x28: + case 0x29: + case 0x2c: + case 0x2f: + case 0x3a: + case 0x3b: + case 0x3c: + case 0x3d: + case 0x3e: + case 0x3f: + case 0x40: + case 0x5b: + case 0x5c: + case 0x5d: + case 0x7b: + case 0x7d: + // DQUOTE and "(),/:;<=>?@[\]{}" + return false + default: + // VCHAR %x21-7E + return c >= 0x21 && c <= 0x7e + } } -// See RFC 7230, Section 3.2.6. -// https://github.com/chromium/chromium/blob/d7da0240cae77824d1eda25745c4022757499131/third_party/blink/renderer/platform/network/http_parsers.cc#L321 +/** + * @param {string} characters + */ function isValidHTTPToken (characters) { - if (!characters || typeof characters !== 'string') { + if (characters.length === 0) { return false } for (let i = 0; i < characters.length; ++i) { - const c = characters.charCodeAt(i) - if (c > 0x7f || !isTokenChar(c)) { + if (!isTokenCharCode(characters.charCodeAt(i))) { return false } } return true } -// https://fetch.spec.whatwg.org/#header-name -// https://github.com/chromium/chromium/blob/b3d37e6f94f87d59e44662d6078f6a12de845d17/net/http/http_util.cc#L342 +/** + * @see https://fetch.spec.whatwg.org/#header-name + * @param {string} potentialValue + */ function isValidHeaderName (potentialValue) { - if (potentialValue.length === 0) { - return false - } - - for (const char of potentialValue) { - if (!isValidHTTPToken(char)) { - return false - } - } - - return true + return isValidHTTPToken(potentialValue) } /** @@ -200,8 +196,31 @@ function setRequestReferrerPolicyOnRedirect (request, actualResponse) { // 1. Let policy be the result of executing § 8.1 Parse a referrer policy // from a Referrer-Policy header on actualResponse. - // TODO: https://w3c.github.io/webappsec-referrer-policy/#parse-referrer-policy-from-header - const policy = '' + + // 8.1 Parse a referrer policy from a Referrer-Policy header + // 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy` and response’s header list. + const { headersList } = actualResponse + // 2. Let policy be the empty string. + // 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty string, then set policy to token. + // 4. Return policy. + const policyHeader = (headersList.get('referrer-policy') ?? '').split(',') + + // Note: As the referrer-policy can contain multiple policies + // separated by comma, we need to loop through all of them + // and pick the first valid one. + // Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#specify_a_fallback_policy + let policy = '' + if (policyHeader.length > 0) { + // The right-most policy takes precedence. + // The left-most policy is the fallback. + for (let i = policyHeader.length; i !== 0; i--) { + const token = policyHeader[i - 1].trim() + if (referrerPolicyTokens.has(token)) { + policy = token + break + } + } + } // 2. If policy is not the empty string, then set request’s referrer policy to policy. if (policy !== '') { @@ -260,7 +279,7 @@ function appendRequestOriginHeader (request) { // 2. If request’s response tainting is "cors" or request’s mode is "websocket", then append (`Origin`, serializedOrigin) to request’s header list. if (request.responseTainting === 'cors' || request.mode === 'websocket') { if (serializedOrigin) { - request.headersList.append('Origin', serializedOrigin) + request.headersList.append('origin', serializedOrigin) } // 3. Otherwise, if request’s method is neither `GET` nor `HEAD`, then: @@ -275,7 +294,7 @@ function appendRequestOriginHeader (request) { case 'strict-origin': case 'strict-origin-when-cross-origin': // If request’s origin is a tuple origin, its scheme is "https", and request’s current URL’s scheme is not "https", then set serializedOrigin to `null`. - if (/^https:/.test(request.origin) && !/^https:/.test(requestCurrentURL(request))) { + if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) { serializedOrigin = null } break @@ -291,7 +310,7 @@ function appendRequestOriginHeader (request) { if (serializedOrigin) { // 2. Append (`Origin`, serializedOrigin) to request’s header list. - request.headersList.append('Origin', serializedOrigin) + request.headersList.append('origin', serializedOrigin) } } } @@ -320,14 +339,17 @@ function createOpaqueTimingInfo (timingInfo) { // https://html.spec.whatwg.org/multipage/origin.html#policy-container function makePolicyContainer () { - // TODO - return {} + // Note: the fetch spec doesn't make use of embedder policy or CSP list + return { + referrerPolicy: 'strict-origin-when-cross-origin' + } } // https://html.spec.whatwg.org/multipage/origin.html#clone-a-policy-container -function clonePolicyContainer () { - // TODO - return {} +function clonePolicyContainer (policyContainer) { + return { + referrerPolicy: policyContainer.referrerPolicy + } } // https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer @@ -335,104 +357,76 @@ function determineRequestsReferrer (request) { // 1. Let policy be request's referrer policy. const policy = request.referrerPolicy - // Return no-referrer when empty or policy says so - if (policy == null || policy === '' || policy === 'no-referrer') { - return 'no-referrer' - } + // Note: policy cannot (shouldn't) be null or an empty string. + assert(policy) + + // 2. Let environment be request’s client. - // 2. Let environment be the request client - const environment = request.client let referrerSource = null - /** - * 3, Switch on request’s referrer: - "client" - If environment’s global object is a Window object, then - Let document be the associated Document of environment’s global object. - If document’s origin is an opaque origin, return no referrer. - While document is an iframe srcdoc document, - let document be document’s browsing context’s browsing context container’s node document. - Let referrerSource be document’s URL. - - Otherwise, let referrerSource be environment’s creation URL. - - a URL - Let referrerSource be request’s referrer. - */ + // 3. Switch on request’s referrer: if (request.referrer === 'client') { - // Not defined in Node but part of the spec - if (request.client?.globalObject?.constructor?.name === 'Window' ) { // eslint-disable-line - const origin = environment.globalObject.self?.origin ?? environment.globalObject.location?.origin - - // If document’s origin is an opaque origin, return no referrer. - if (origin == null || origin === 'null') return 'no-referrer' - - // Let referrerSource be document’s URL. - referrerSource = new URL(environment.globalObject.location.href) - } else { - // 3(a)(II) If environment's global object is not Window, - // Let referrerSource be environments creationURL - if (environment?.globalObject?.location == null) { - return 'no-referrer' - } + // Note: node isn't a browser and doesn't implement document/iframes, + // so we bypass this step and replace it with our own. + + const globalOrigin = getGlobalOrigin() - referrerSource = new URL(environment.globalObject.location.href) + if (!globalOrigin || globalOrigin.origin === 'null') { + return 'no-referrer' } + + // note: we need to clone it as it's mutated + referrerSource = new URL(globalOrigin) } else if (request.referrer instanceof URL) { - // 3(b) If requests's referrer is a URL instance, then make - // referrerSource be requests's referrer. + // Let referrerSource be request’s referrer. referrerSource = request.referrer - } else { - // If referrerSource neither client nor instance of URL - // then return "no-referrer". - return 'no-referrer' } - const urlProtocol = referrerSource.protocol + // 4. Let request’s referrerURL be the result of stripping referrerSource for + // use as a referrer. + let referrerURL = stripURLForReferrer(referrerSource) - // If url's scheme is a local scheme (i.e. one of "about", "data", "javascript", "file") - // then return "no-referrer". - if ( - urlProtocol === 'about:' || urlProtocol === 'data:' || - urlProtocol === 'blob:' - ) { - return 'no-referrer' + // 5. Let referrerOrigin be the result of stripping referrerSource for use as + // a referrer, with the origin-only flag set to true. + const referrerOrigin = stripURLForReferrer(referrerSource, true) + + // 6. If the result of serializing referrerURL is a string whose length is + // greater than 4096, set referrerURL to referrerOrigin. + if (referrerURL.toString().length > 4096) { + referrerURL = referrerOrigin } - let temp - let referrerOrigin - // 4. Let requests's referrerURL be the result of stripping referrer - // source for use as referrer (using util function, without origin only) - const referrerUrl = (temp = stripURLForReferrer(referrerSource)).length > 4096 - // 5. Let referrerOrigin be the result of stripping referrer - // source for use as referrer (using util function, with originOnly true) - ? (referrerOrigin = stripURLForReferrer(referrerSource, true)) - // 6. If result of seralizing referrerUrl is a string whose length is greater than - // 4096, then set referrerURL to referrerOrigin - : temp - const areSameOrigin = sameOrigin(request, referrerUrl) - const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerUrl) && + const areSameOrigin = sameOrigin(request, referrerURL) + const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(request.url) - // NOTE: How to treat step 7? // 8. Execute the switch statements corresponding to the value of policy: switch (policy) { case 'origin': return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true) - case 'unsafe-url': return referrerUrl + case 'unsafe-url': return referrerURL case 'same-origin': return areSameOrigin ? referrerOrigin : 'no-referrer' case 'origin-when-cross-origin': - return areSameOrigin ? referrerUrl : referrerOrigin - case 'strict-origin-when-cross-origin': - /** - * 1. If the origin of referrerURL and the origin of request’s current URL are the same, - * then return referrerURL. - * 2. If referrerURL is a potentially trustworthy URL and request’s current URL is not a - * potentially trustworthy URL, then return no referrer. - * 3. Return referrerOrigin - */ - if (areSameOrigin) return referrerOrigin - // else return isNonPotentiallyTrustWorthy ? 'no-referrer' : referrerOrigin + return areSameOrigin ? referrerURL : referrerOrigin + case 'strict-origin-when-cross-origin': { + const currentURL = requestCurrentURL(request) + + // 1. If the origin of referrerURL and the origin of request’s current + // URL are the same, then return referrerURL. + if (sameOrigin(referrerURL, currentURL)) { + return referrerURL + } + + // 2. If referrerURL is a potentially trustworthy URL and request’s + // current URL is not a potentially trustworthy URL, then return no + // referrer. + if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) { + return 'no-referrer' + } + + // 3. Return referrerOrigin. + return referrerOrigin + } case 'strict-origin': // eslint-disable-line /** * 1. If referrerURL is a potentially trustworthy URL and @@ -451,15 +445,42 @@ function determineRequestsReferrer (request) { default: // eslint-disable-line return isNonPotentiallyTrustWorthy ? 'no-referrer' : referrerOrigin } +} + +/** + * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url + * @param {URL} url + * @param {boolean|undefined} originOnly + */ +function stripURLForReferrer (url, originOnly) { + // 1. Assert: url is a URL. + assert(url instanceof URL) + + // 2. If url’s scheme is a local scheme, then return no referrer. + if (url.protocol === 'file:' || url.protocol === 'about:' || url.protocol === 'blank:') { + return 'no-referrer' + } + + // 3. Set url’s username to the empty string. + url.username = '' + + // 4. Set url’s password to the empty string. + url.password = '' - function stripURLForReferrer (url, originOnly = false) { - const urlObject = new URL(url.href) - urlObject.username = '' - urlObject.password = '' - urlObject.hash = '' + // 5. Set url’s fragment to null. + url.hash = '' - return originOnly ? urlObject.origin : urlObject.href + // 6. If the origin-only flag is true, then: + if (originOnly) { + // 1. Set url’s path to « the empty string ». + url.pathname = '' + + // 2. Set url’s query to null. + url.search = '' } + + // 7. Return url. + return url } function isURLPotentiallyTrustworthy (url) { @@ -525,17 +546,20 @@ function bytesMatch (bytes, metadataList) { return true } - // 3. If parsedMetadata is the empty set, return true. + // 3. If response is not eligible for integrity validation, return false. + // TODO + + // 4. If parsedMetadata is the empty set, return true. if (parsedMetadata.length === 0) { return true } - // 4. Let metadata be the result of getting the strongest + // 5. Let metadata be the result of getting the strongest // metadata from parsedMetadata. - // Note: this will only work for SHA- algorithms and it's lazy *at best*. - const metadata = parsedMetadata.sort((c, d) => d.algo.localeCompare(c.algo)) + const strongest = getStrongestMetadata(parsedMetadata) + const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest) - // 5. For each item in metadata: + // 6. For each item in metadata: for (const item of metadata) { // 1. Let algorithm be the alg component of item. const algorithm = item.algo @@ -543,26 +567,35 @@ function bytesMatch (bytes, metadataList) { // 2. Let expectedValue be the val component of item. const expectedValue = item.hash + // See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e + // "be liberal with padding". This is annoying, and it's not even in the spec. + // 3. Let actualValue be the result of applying algorithm to bytes. - // Note: "applying algorithm to bytes" converts the result to base64 - const actualValue = crypto.createHash(algorithm).update(bytes).digest('base64') + let actualValue = crypto.createHash(algorithm).update(bytes).digest('base64') + + if (actualValue[actualValue.length - 1] === '=') { + if (actualValue[actualValue.length - 2] === '=') { + actualValue = actualValue.slice(0, -2) + } else { + actualValue = actualValue.slice(0, -1) + } + } // 4. If actualValue is a case-sensitive match for expectedValue, // return true. - if (actualValue === expectedValue) { + if (compareBase64Mixed(actualValue, expectedValue)) { return true } } - // 6. Return false. + // 7. Return false. return false } // https://w3c.github.io/webappsec-subresource-integrity/#grammardef-hash-with-options -// hash-algo is defined in Content Security Policy 2 Section 4.2 -// base64-value is similary defined there -// VCHAR is defined https://www.rfc-editor.org/rfc/rfc5234#appendix-B.1 -const parseHashWithOptions = /((?sha256|sha384|sha512)-(?[A-z0-9+/]{1}.*={1,2}))( +[\x21-\x7e]?)?/i +// https://www.w3.org/TR/CSP2/#source-list-syntax +// https://www.rfc-editor.org/rfc/rfc5234#appendix-B.1 +const parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i /** * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata @@ -576,8 +609,6 @@ function parseMetadata (metadata) { // 2. Let empty be equal to true. let empty = true - const supportedHashes = crypto.getHashes() - // 3. For each token returned by splitting metadata on spaces: for (const token of metadata.split(' ')) { // 1. Set empty to false. @@ -587,7 +618,11 @@ function parseMetadata (metadata) { const parsedToken = parseHashWithOptions.exec(token) // 3. If token does not parse, continue to the next token. - if (parsedToken === null || parsedToken.groups === undefined) { + if ( + parsedToken === null || + parsedToken.groups === undefined || + parsedToken.groups.algo === undefined + ) { // Note: Chromium blocks the request at this point, but Firefox // gives a warning that an invalid integrity was given. The // correct behavior is to ignore these, and subsequently not @@ -596,11 +631,11 @@ function parseMetadata (metadata) { } // 4. Let algorithm be the hash-algo component of token. - const algorithm = parsedToken.groups.algo + const algorithm = parsedToken.groups.algo.toLowerCase() // 5. If algorithm is a hash function recognized by the user // agent, add the parsed token to result. - if (supportedHashes.includes(algorithm.toLowerCase())) { + if (supportedHashes.includes(algorithm)) { result.push(parsedToken.groups) } } @@ -613,6 +648,82 @@ function parseMetadata (metadata) { return result } +/** + * @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList + */ +function getStrongestMetadata (metadataList) { + // Let algorithm be the algo component of the first item in metadataList. + // Can be sha256 + let algorithm = metadataList[0].algo + // If the algorithm is sha512, then it is the strongest + // and we can return immediately + if (algorithm[3] === '5') { + return algorithm + } + + for (let i = 1; i < metadataList.length; ++i) { + const metadata = metadataList[i] + // If the algorithm is sha512, then it is the strongest + // and we can break the loop immediately + if (metadata.algo[3] === '5') { + algorithm = 'sha512' + break + // If the algorithm is sha384, then a potential sha256 or sha384 is ignored + } else if (algorithm[3] === '3') { + continue + // algorithm is sha256, check if algorithm is sha384 and if so, set it as + // the strongest + } else if (metadata.algo[3] === '3') { + algorithm = 'sha384' + } + } + return algorithm +} + +function filterMetadataListByAlgorithm (metadataList, algorithm) { + if (metadataList.length === 1) { + return metadataList + } + + let pos = 0 + for (let i = 0; i < metadataList.length; ++i) { + if (metadataList[i].algo === algorithm) { + metadataList[pos++] = metadataList[i] + } + } + + metadataList.length = pos + + return metadataList +} + +/** + * Compares two base64 strings, allowing for base64url + * in the second string. + * +* @param {string} actualValue always base64 + * @param {string} expectedValue base64 or base64url + * @returns {boolean} + */ +function compareBase64Mixed (actualValue, expectedValue) { + if (actualValue.length !== expectedValue.length) { + return false + } + for (let i = 0; i < actualValue.length; ++i) { + if (actualValue[i] !== expectedValue[i]) { + if ( + (actualValue[i] === '+' && expectedValue[i] === '-') || + (actualValue[i] === '/' && expectedValue[i] === '_') + ) { + continue + } + return false + } + } + + return true +} + // https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request function tryUpgradeRequestToAPotentiallyTrustworthyURL (request) { // TODO @@ -625,7 +736,9 @@ function tryUpgradeRequestToAPotentiallyTrustworthyURL (request) { */ function sameOrigin (A, B) { // 1. If A and B are the same opaque origin, then return true. - // "opaque origin" is an internal value we cannot access, ignore. + if (A.origin === B.origin && A.origin === 'null') { + return true + } // 2. If A and B are both tuple origins and their schemes, // hosts, and port are identical, then return true. @@ -657,11 +770,30 @@ function isCancelled (fetchParams) { fetchParams.controller.state === 'terminated' } -// https://fetch.spec.whatwg.org/#concept-method-normalize +const normalizeMethodRecord = { + delete: 'DELETE', + DELETE: 'DELETE', + get: 'GET', + GET: 'GET', + head: 'HEAD', + HEAD: 'HEAD', + options: 'OPTIONS', + OPTIONS: 'OPTIONS', + post: 'POST', + POST: 'POST', + put: 'PUT', + PUT: 'PUT' +} + +// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. +Object.setPrototypeOf(normalizeMethodRecord, null) + +/** + * @see https://fetch.spec.whatwg.org/#concept-method-normalize + * @param {string} method + */ function normalizeMethod (method) { - return /^(DELETE|GET|HEAD|OPTIONS|POST|PUT)$/i.test(method) - ? method.toUpperCase() - : method + return normalizeMethodRecord[method.toLowerCase()] ?? method } // https://infra.spec.whatwg.org/#serialize-a-javascript-value-to-a-json-string @@ -684,17 +816,61 @@ function serializeJavascriptValueToJSONString (value) { // https://tc39.es/ecma262/#sec-%25iteratorprototype%25-object const esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())) -// https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object -function makeIterator (iterator, name) { +/** + * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object + * @param {() => unknown[]} iterator + * @param {string} name name of the instance + * @param {'key'|'value'|'key+value'} kind + */ +function makeIterator (iterator, name, kind) { + const object = { + index: 0, + kind, + target: iterator + } + const i = { next () { + // 1. Let interface be the interface for which the iterator prototype object exists. + + // 2. Let thisValue be the this value. + + // 3. Let object be ? ToObject(thisValue). + + // 4. If object is a platform object, then perform a security + // check, passing: + + // 5. If object is not a default iterator object for interface, + // then throw a TypeError. if (Object.getPrototypeOf(this) !== i) { throw new TypeError( `'next' called on an object that does not implement interface ${name} Iterator.` ) } - return iterator.next() + // 6. Let index be object’s index. + // 7. Let kind be object’s kind. + // 8. Let values be object’s target's value pairs to iterate over. + const { index, kind, target } = object + const values = target() + + // 9. Let len be the length of values. + const len = values.length + + // 10. If index is greater than or equal to len, then return + // CreateIterResultObject(undefined, true). + if (index >= len) { + return { value: undefined, done: true } + } + + // 11. Let pair be the entry in values at index index. + const pair = values[index] + + // 12. Set object’s index to index + 1. + object.index = index + 1 + + // 13. Return the iterator result for pair and kind. + return iteratorResult(pair, kind) }, // The class string of an iterator prototype object for a given interface is the // result of concatenating the identifier of the interface and the string " Iterator". @@ -708,6 +884,48 @@ function makeIterator (iterator, name) { return Object.setPrototypeOf({}, i) } +// https://webidl.spec.whatwg.org/#iterator-result +function iteratorResult (pair, kind) { + let result + + // 1. Let result be a value determined by the value of kind: + switch (kind) { + case 'key': { + // 1. Let idlKey be pair’s key. + // 2. Let key be the result of converting idlKey to an + // ECMAScript value. + // 3. result is key. + result = pair[0] + break + } + case 'value': { + // 1. Let idlValue be pair’s value. + // 2. Let value be the result of converting idlValue to + // an ECMAScript value. + // 3. result is value. + result = pair[1] + break + } + case 'key+value': { + // 1. Let idlKey be pair’s key. + // 2. Let idlValue be pair’s value. + // 3. Let key be the result of converting idlKey to an + // ECMAScript value. + // 4. Let value be the result of converting idlValue to + // an ECMAScript value. + // 5. Let array be ! ArrayCreate(2). + // 6. Call ! CreateDataProperty(array, "0", key). + // 7. Call ! CreateDataProperty(array, "1", value). + // 8. result is array. + result = pair + break + } + } + + // 2. Return CreateIterResultObject(result, false). + return { value: result, done: false } +} + /** * @see https://fetch.spec.whatwg.org/#body-fully-read */ @@ -715,44 +933,161 @@ async function fullyReadBody (body, processBody, processBodyError) { // 1. If taskDestination is null, then set taskDestination to // the result of starting a new parallel queue. - // 2. Let promise be the result of fully reading body as promise - // given body. + // 2. Let successSteps given a byte sequence bytes be to queue a + // fetch task to run processBody given bytes, with taskDestination. + const successSteps = processBody + + // 3. Let errorSteps be to queue a fetch task to run processBodyError, + // with taskDestination. + const errorSteps = processBodyError + + // 4. Let reader be the result of getting a reader for body’s stream. + // If that threw an exception, then run errorSteps with that + // exception and return. + let reader + try { - /** @type {Uint8Array[]} */ - const chunks = [] - let length = 0 + reader = body.stream.getReader() + } catch (e) { + errorSteps(e) + return + } - const reader = body.stream.getReader() + // 5. Read all bytes from reader, given successSteps and errorSteps. + try { + const result = await readAllBytes(reader) + successSteps(result) + } catch (e) { + errorSteps(e) + } +} - while (true) { - const { done, value } = await reader.read() +/** @type {ReadableStream} */ +let ReadableStream = globalThis.ReadableStream - if (done === true) { - break - } +function isReadableStreamLike (stream) { + if (!ReadableStream) { + ReadableStream = require('stream/web').ReadableStream + } + + return stream instanceof ReadableStream || ( + stream[Symbol.toStringTag] === 'ReadableStream' && + typeof stream.tee === 'function' + ) +} - // read-loop chunk steps - assert(isUint8Array(value)) +const MAXIMUM_ARGUMENT_LENGTH = 65535 - chunks.push(value) - length += value.byteLength - } +/** + * @see https://infra.spec.whatwg.org/#isomorphic-decode + * @param {number[]|Uint8Array} input + */ +function isomorphicDecode (input) { + // 1. To isomorphic decode a byte sequence input, return a string whose code point + // length is equal to input’s length and whose code points have the same values + // as the values of input’s bytes, in the same order. + + if (input.length < MAXIMUM_ARGUMENT_LENGTH) { + return String.fromCharCode(...input) + } - // 3. Let fulfilledSteps given a byte sequence bytes be to queue - // a fetch task to run processBody given bytes, with - // taskDestination. - const fulfilledSteps = (bytes) => queueMicrotask(() => { - processBody(bytes) - }) + return input.reduce((previous, current) => previous + String.fromCharCode(current), '') +} - fulfilledSteps(Buffer.concat(chunks, length)) +/** + * @param {ReadableStreamController} controller + */ +function readableStreamClose (controller) { + try { + controller.close() } catch (err) { - // 4. Let rejectedSteps be to queue a fetch task to run - // processBodyError, with taskDestination. - queueMicrotask(() => processBodyError(err)) + // TODO: add comment explaining why this error occurs. + if (!err.message.includes('Controller is already closed')) { + throw err + } } +} + +/** + * @see https://infra.spec.whatwg.org/#isomorphic-encode + * @param {string} input + */ +function isomorphicEncode (input) { + // 1. Assert: input contains no code points greater than U+00FF. + for (let i = 0; i < input.length; i++) { + assert(input.charCodeAt(i) <= 0xFF) + } + + // 2. Return a byte sequence whose length is equal to input’s code + // point length and whose bytes have the same values as the + // values of input’s code points, in the same order + return input +} + +/** + * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes + * @see https://streams.spec.whatwg.org/#read-loop + * @param {ReadableStreamDefaultReader} reader + */ +async function readAllBytes (reader) { + const bytes = [] + let byteLength = 0 + + while (true) { + const { done, value: chunk } = await reader.read() + + if (done) { + // 1. Call successSteps with bytes. + return Buffer.concat(bytes, byteLength) + } + + // 1. If chunk is not a Uint8Array object, call failureSteps + // with a TypeError and abort these steps. + if (!isUint8Array(chunk)) { + throw new TypeError('Received non-Uint8Array chunk') + } + + // 2. Append the bytes represented by chunk to bytes. + bytes.push(chunk) + byteLength += chunk.length + + // 3. Read-loop given reader, bytes, successSteps, and failureSteps. + } +} + +/** + * @see https://fetch.spec.whatwg.org/#is-local + * @param {URL} url + */ +function urlIsLocal (url) { + assert('protocol' in url) // ensure it's a url object + + const protocol = url.protocol + + return protocol === 'about:' || protocol === 'blob:' || protocol === 'data:' +} + +/** + * @param {string|URL} url + */ +function urlHasHttpsScheme (url) { + if (typeof url === 'string') { + return url.startsWith('https:') + } + + return url.protocol === 'https:' +} + +/** + * @see https://fetch.spec.whatwg.org/#http-scheme + * @param {URL} url + */ +function urlIsHttpHttpsScheme (url) { + assert('protocol' in url) // ensure it's a url object + + const protocol = url.protocol - // 5. React to promise with fulfilledSteps and rejectedSteps. + return protocol === 'http:' || protocol === 'https:' } /** @@ -795,5 +1130,15 @@ module.exports = { hasOwn, isErrorLike, fullyReadBody, - bytesMatch + bytesMatch, + isReadableStreamLike, + readableStreamClose, + isomorphicEncode, + isomorphicDecode, + urlIsLocal, + urlHasHttpsScheme, + urlIsHttpHttpsScheme, + readAllBytes, + normalizeMethodRecord, + parseMetadata } diff --git a/action/node_modules/undici/lib/fetch/webidl.js b/action/node_modules/undici/lib/fetch/webidl.js index 430e657e..6fcf2ab6 100644 --- a/action/node_modules/undici/lib/fetch/webidl.js +++ b/action/node_modules/undici/lib/fetch/webidl.js @@ -3,30 +3,16 @@ const { types } = require('util') const { hasOwn, toUSVString } = require('./util') +/** @type {import('../../types/webidl').Webidl} */ const webidl = {} webidl.converters = {} webidl.util = {} webidl.errors = {} -/** - * - * @param {{ - * header: string - * message: string - * }} message - */ webidl.errors.exception = function (message) { - throw new TypeError(`${message.header}: ${message.message}`) + return new TypeError(`${message.header}: ${message.message}`) } -/** - * Throw an error when conversion from one type to another has failed - * @param {{ - * prefix: string - * argument: string - * types: string[] - * }} context - */ webidl.errors.conversionFailed = function (context) { const plural = context.types.length === 1 ? '' : ' one of' const message = @@ -39,14 +25,6 @@ webidl.errors.conversionFailed = function (context) { }) } -/** - * Throw an error when an invalid argument is provided - * @param {{ - * prefix: string - * value: string - * type: string - * }} context - */ webidl.errors.invalidArgument = function (context) { return webidl.errors.exception({ header: context.prefix, @@ -54,6 +32,32 @@ webidl.errors.invalidArgument = function (context) { }) } +// https://webidl.spec.whatwg.org/#implements +webidl.brandCheck = function (V, I, opts = undefined) { + if (opts?.strict !== false && !(V instanceof I)) { + throw new TypeError('Illegal invocation') + } else { + return V?.[Symbol.toStringTag] === I.prototype[Symbol.toStringTag] + } +} + +webidl.argumentLengthCheck = function ({ length }, min, ctx) { + if (length < min) { + throw webidl.errors.exception({ + message: `${min} argument${min !== 1 ? 's' : ''} required, ` + + `but${length ? ' only' : ''} ${length} found.`, + ...ctx + }) + } +} + +webidl.illegalConstructor = function () { + throw webidl.errors.exception({ + header: 'TypeError', + message: 'Illegal constructor' + }) +} + // https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values webidl.util.Type = function (V) { switch (typeof V) { @@ -113,7 +117,7 @@ webidl.util.ConvertToInt = function (V, bitLength, signedness, opts = {}) { let x = Number(V) // 5. If x is −0, then set x to +0. - if (Object.is(-0, x)) { + if (x === 0) { x = 0 } @@ -126,7 +130,7 @@ webidl.util.ConvertToInt = function (V, bitLength, signedness, opts = {}) { x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY ) { - webidl.errors.exception({ + throw webidl.errors.exception({ header: 'Integer conversion', message: `Could not convert ${V} to an integer.` }) @@ -138,7 +142,7 @@ webidl.util.ConvertToInt = function (V, bitLength, signedness, opts = {}) { // 3. If x < lowerBound or x > upperBound, then // throw a TypeError. if (x < lowerBound || x > upperBound) { - webidl.errors.exception({ + throw webidl.errors.exception({ header: 'Integer conversion', message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` }) @@ -171,7 +175,7 @@ webidl.util.ConvertToInt = function (V, bitLength, signedness, opts = {}) { // 8. If x is NaN, +0, +∞, or −∞, then return +0. if ( Number.isNaN(x) || - Object.is(0, x) || + (x === 0 && Object.is(0, x)) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY ) { @@ -213,7 +217,7 @@ webidl.sequenceConverter = function (converter) { return (V) => { // 1. If Type(V) is not Object, throw a TypeError. if (webidl.util.Type(V) !== 'Object') { - webidl.errors.exception({ + throw webidl.errors.exception({ header: 'Sequence', message: `Value of type ${webidl.util.Type(V)} is not an Object.` }) @@ -229,7 +233,7 @@ webidl.sequenceConverter = function (converter) { method === undefined || typeof method.next !== 'function' ) { - webidl.errors.exception({ + throw webidl.errors.exception({ header: 'Sequence', message: 'Object is not an iterator.' }) @@ -250,37 +254,71 @@ webidl.sequenceConverter = function (converter) { } } +// https://webidl.spec.whatwg.org/#es-to-record webidl.recordConverter = function (keyConverter, valueConverter) { - return (V) => { - const record = {} - const type = webidl.util.Type(V) - - if (type === 'Undefined' || type === 'Null') { - return record - } - - if (type !== 'Object') { - webidl.errors.exception({ + return (O) => { + // 1. If Type(O) is not Object, throw a TypeError. + if (webidl.util.Type(O) !== 'Object') { + throw webidl.errors.exception({ header: 'Record', - message: `Expected ${V} to be an Object type.` + message: `Value of type ${webidl.util.Type(O)} is not an Object.` }) } - for (let [key, value] of Object.entries(V)) { - key = keyConverter(key) - value = valueConverter(value) + // 2. Let result be a new empty instance of record. + const result = {} + + if (!types.isProxy(O)) { + // Object.keys only returns enumerable properties + const keys = Object.keys(O) + + for (const key of keys) { + // 1. Let typedKey be key converted to an IDL value of type K. + const typedKey = keyConverter(key) + + // 2. Let value be ? Get(O, key). + // 3. Let typedValue be value converted to an IDL value of type V. + const typedValue = valueConverter(O[key]) + + // 4. Set result[typedKey] to typedValue. + result[typedKey] = typedValue + } + + // 5. Return result. + return result + } + + // 3. Let keys be ? O.[[OwnPropertyKeys]](). + const keys = Reflect.ownKeys(O) - record[key] = value + // 4. For each key of keys. + for (const key of keys) { + // 1. Let desc be ? O.[[GetOwnProperty]](key). + const desc = Reflect.getOwnPropertyDescriptor(O, key) + + // 2. If desc is not undefined and desc.[[Enumerable]] is true: + if (desc?.enumerable) { + // 1. Let typedKey be key converted to an IDL value of type K. + const typedKey = keyConverter(key) + + // 2. Let value be ? Get(O, key). + // 3. Let typedValue be value converted to an IDL value of type V. + const typedValue = valueConverter(O[key]) + + // 4. Set result[typedKey] to typedValue. + result[typedKey] = typedValue + } } - return record + // 5. Return result. + return result } } webidl.interfaceConverter = function (i) { return (V, opts = {}) => { if (opts.strict !== false && !(V instanceof i)) { - webidl.errors.exception({ + throw webidl.errors.exception({ header: i.name, message: `Expected ${V} to be an instance of ${i.name}.` }) @@ -290,23 +328,15 @@ webidl.interfaceConverter = function (i) { } } -/** - * @param {{ - * key: string, - * defaultValue?: any, - * required?: boolean, - * converter: (...args: unknown[]) => unknown, - * allowedValues?: any[] - * }[]} converters - * @returns - */ webidl.dictionaryConverter = function (converters) { return (dictionary) => { const type = webidl.util.Type(dictionary) const dict = {} - if (type !== 'Null' && type !== 'Undefined' && type !== 'Object') { - webidl.errors.exception({ + if (type === 'Null' || type === 'Undefined') { + return dict + } else if (type !== 'Object') { + throw webidl.errors.exception({ header: 'Dictionary', message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` }) @@ -317,7 +347,7 @@ webidl.dictionaryConverter = function (converters) { if (required === true) { if (!hasOwn(dictionary, key)) { - webidl.errors.exception({ + throw webidl.errors.exception({ header: 'Dictionary', message: `Missing required key "${key}".` }) @@ -343,7 +373,7 @@ webidl.dictionaryConverter = function (converters) { options.allowedValues && !options.allowedValues.includes(value) ) { - webidl.errors.exception({ + throw webidl.errors.exception({ header: 'Dictionary', message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(', ')}.` }) @@ -397,12 +427,10 @@ webidl.converters.ByteString = function (V) { // 2. If the value of any element of x is greater than // 255, then throw a TypeError. for (let index = 0; index < x.length; index++) { - const charCode = x.charCodeAt(index) - - if (charCode > 255) { + if (x.charCodeAt(index) > 255) { throw new TypeError( - 'Cannot convert argument to a ByteString because the character at' + - `index ${index} has a value of ${charCode} which is greater than 255.` + 'Cannot convert argument to a ByteString because the character at ' + + `index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.` ) } } @@ -414,7 +442,6 @@ webidl.converters.ByteString = function (V) { } // https://webidl.spec.whatwg.org/#es-USVString -// TODO: ensure that util.toUSVString follows webidl spec webidl.converters.USVString = toUSVString // https://webidl.spec.whatwg.org/#es-boolean @@ -433,19 +460,39 @@ webidl.converters.any = function (V) { } // https://webidl.spec.whatwg.org/#es-long-long -webidl.converters['long long'] = function (V, opts) { +webidl.converters['long long'] = function (V) { // 1. Let x be ? ConvertToInt(V, 64, "signed"). - const x = webidl.util.ConvertToInt(V, 64, 'signed', opts) + const x = webidl.util.ConvertToInt(V, 64, 'signed') // 2. Return the IDL long long value that represents // the same numeric value as x. return x } +// https://webidl.spec.whatwg.org/#es-unsigned-long-long +webidl.converters['unsigned long long'] = function (V) { + // 1. Let x be ? ConvertToInt(V, 64, "unsigned"). + const x = webidl.util.ConvertToInt(V, 64, 'unsigned') + + // 2. Return the IDL unsigned long long value that + // represents the same numeric value as x. + return x +} + +// https://webidl.spec.whatwg.org/#es-unsigned-long +webidl.converters['unsigned long'] = function (V) { + // 1. Let x be ? ConvertToInt(V, 32, "unsigned"). + const x = webidl.util.ConvertToInt(V, 32, 'unsigned') + + // 2. Return the IDL unsigned long value that + // represents the same numeric value as x. + return x +} + // https://webidl.spec.whatwg.org/#es-unsigned-short -webidl.converters['unsigned short'] = function (V) { +webidl.converters['unsigned short'] = function (V, opts) { // 1. Let x be ? ConvertToInt(V, 16, "unsigned"). - const x = webidl.util.ConvertToInt(V, 16, 'unsigned') + const x = webidl.util.ConvertToInt(V, 16, 'unsigned', opts) // 2. Return the IDL unsigned short value that represents // the same numeric value as x. @@ -463,7 +510,7 @@ webidl.converters.ArrayBuffer = function (V, opts = {}) { webidl.util.Type(V) !== 'Object' || !types.isAnyArrayBuffer(V) ) { - webidl.errors.conversionFailed({ + throw webidl.errors.conversionFailed({ prefix: `${V}`, argument: `${V}`, types: ['ArrayBuffer'] @@ -475,7 +522,7 @@ webidl.converters.ArrayBuffer = function (V, opts = {}) { // IsSharedArrayBuffer(V) is true, then throw a // TypeError. if (opts.allowShared === false && types.isSharedArrayBuffer(V)) { - webidl.errors.exception({ + throw webidl.errors.exception({ header: 'ArrayBuffer', message: 'SharedArrayBuffer is not allowed.' }) @@ -503,7 +550,7 @@ webidl.converters.TypedArray = function (V, T, opts = {}) { !types.isTypedArray(V) || V.constructor.name !== T.name ) { - webidl.errors.conversionFailed({ + throw webidl.errors.conversionFailed({ prefix: `${T.name}`, argument: `${V}`, types: [T.name] @@ -515,7 +562,7 @@ webidl.converters.TypedArray = function (V, T, opts = {}) { // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is // true, then throw a TypeError. if (opts.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { - webidl.errors.exception({ + throw webidl.errors.exception({ header: 'ArrayBuffer', message: 'SharedArrayBuffer is not allowed.' }) @@ -536,7 +583,7 @@ webidl.converters.DataView = function (V, opts = {}) { // 1. If Type(V) is not Object, or V does not have a // [[DataView]] internal slot, then throw a TypeError. if (webidl.util.Type(V) !== 'Object' || !types.isDataView(V)) { - webidl.errors.exception({ + throw webidl.errors.exception({ header: 'DataView', message: 'Object is not a DataView.' }) @@ -547,7 +594,7 @@ webidl.converters.DataView = function (V, opts = {}) { // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is true, // then throw a TypeError. if (opts.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { - webidl.errors.exception({ + throw webidl.errors.exception({ header: 'ArrayBuffer', message: 'SharedArrayBuffer is not allowed.' }) diff --git a/action/node_modules/undici/lib/fileapi/encoding.js b/action/node_modules/undici/lib/fileapi/encoding.js new file mode 100644 index 00000000..1d1d2b65 --- /dev/null +++ b/action/node_modules/undici/lib/fileapi/encoding.js @@ -0,0 +1,290 @@ +'use strict' + +/** + * @see https://encoding.spec.whatwg.org/#concept-encoding-get + * @param {string|undefined} label + */ +function getEncoding (label) { + if (!label) { + return 'failure' + } + + // 1. Remove any leading and trailing ASCII whitespace from label. + // 2. If label is an ASCII case-insensitive match for any of the + // labels listed in the table below, then return the + // corresponding encoding; otherwise return failure. + switch (label.trim().toLowerCase()) { + case 'unicode-1-1-utf-8': + case 'unicode11utf8': + case 'unicode20utf8': + case 'utf-8': + case 'utf8': + case 'x-unicode20utf8': + return 'UTF-8' + case '866': + case 'cp866': + case 'csibm866': + case 'ibm866': + return 'IBM866' + case 'csisolatin2': + case 'iso-8859-2': + case 'iso-ir-101': + case 'iso8859-2': + case 'iso88592': + case 'iso_8859-2': + case 'iso_8859-2:1987': + case 'l2': + case 'latin2': + return 'ISO-8859-2' + case 'csisolatin3': + case 'iso-8859-3': + case 'iso-ir-109': + case 'iso8859-3': + case 'iso88593': + case 'iso_8859-3': + case 'iso_8859-3:1988': + case 'l3': + case 'latin3': + return 'ISO-8859-3' + case 'csisolatin4': + case 'iso-8859-4': + case 'iso-ir-110': + case 'iso8859-4': + case 'iso88594': + case 'iso_8859-4': + case 'iso_8859-4:1988': + case 'l4': + case 'latin4': + return 'ISO-8859-4' + case 'csisolatincyrillic': + case 'cyrillic': + case 'iso-8859-5': + case 'iso-ir-144': + case 'iso8859-5': + case 'iso88595': + case 'iso_8859-5': + case 'iso_8859-5:1988': + return 'ISO-8859-5' + case 'arabic': + case 'asmo-708': + case 'csiso88596e': + case 'csiso88596i': + case 'csisolatinarabic': + case 'ecma-114': + case 'iso-8859-6': + case 'iso-8859-6-e': + case 'iso-8859-6-i': + case 'iso-ir-127': + case 'iso8859-6': + case 'iso88596': + case 'iso_8859-6': + case 'iso_8859-6:1987': + return 'ISO-8859-6' + case 'csisolatingreek': + case 'ecma-118': + case 'elot_928': + case 'greek': + case 'greek8': + case 'iso-8859-7': + case 'iso-ir-126': + case 'iso8859-7': + case 'iso88597': + case 'iso_8859-7': + case 'iso_8859-7:1987': + case 'sun_eu_greek': + return 'ISO-8859-7' + case 'csiso88598e': + case 'csisolatinhebrew': + case 'hebrew': + case 'iso-8859-8': + case 'iso-8859-8-e': + case 'iso-ir-138': + case 'iso8859-8': + case 'iso88598': + case 'iso_8859-8': + case 'iso_8859-8:1988': + case 'visual': + return 'ISO-8859-8' + case 'csiso88598i': + case 'iso-8859-8-i': + case 'logical': + return 'ISO-8859-8-I' + case 'csisolatin6': + case 'iso-8859-10': + case 'iso-ir-157': + case 'iso8859-10': + case 'iso885910': + case 'l6': + case 'latin6': + return 'ISO-8859-10' + case 'iso-8859-13': + case 'iso8859-13': + case 'iso885913': + return 'ISO-8859-13' + case 'iso-8859-14': + case 'iso8859-14': + case 'iso885914': + return 'ISO-8859-14' + case 'csisolatin9': + case 'iso-8859-15': + case 'iso8859-15': + case 'iso885915': + case 'iso_8859-15': + case 'l9': + return 'ISO-8859-15' + case 'iso-8859-16': + return 'ISO-8859-16' + case 'cskoi8r': + case 'koi': + case 'koi8': + case 'koi8-r': + case 'koi8_r': + return 'KOI8-R' + case 'koi8-ru': + case 'koi8-u': + return 'KOI8-U' + case 'csmacintosh': + case 'mac': + case 'macintosh': + case 'x-mac-roman': + return 'macintosh' + case 'iso-8859-11': + case 'iso8859-11': + case 'iso885911': + case 'tis-620': + case 'windows-874': + return 'windows-874' + case 'cp1250': + case 'windows-1250': + case 'x-cp1250': + return 'windows-1250' + case 'cp1251': + case 'windows-1251': + case 'x-cp1251': + return 'windows-1251' + case 'ansi_x3.4-1968': + case 'ascii': + case 'cp1252': + case 'cp819': + case 'csisolatin1': + case 'ibm819': + case 'iso-8859-1': + case 'iso-ir-100': + case 'iso8859-1': + case 'iso88591': + case 'iso_8859-1': + case 'iso_8859-1:1987': + case 'l1': + case 'latin1': + case 'us-ascii': + case 'windows-1252': + case 'x-cp1252': + return 'windows-1252' + case 'cp1253': + case 'windows-1253': + case 'x-cp1253': + return 'windows-1253' + case 'cp1254': + case 'csisolatin5': + case 'iso-8859-9': + case 'iso-ir-148': + case 'iso8859-9': + case 'iso88599': + case 'iso_8859-9': + case 'iso_8859-9:1989': + case 'l5': + case 'latin5': + case 'windows-1254': + case 'x-cp1254': + return 'windows-1254' + case 'cp1255': + case 'windows-1255': + case 'x-cp1255': + return 'windows-1255' + case 'cp1256': + case 'windows-1256': + case 'x-cp1256': + return 'windows-1256' + case 'cp1257': + case 'windows-1257': + case 'x-cp1257': + return 'windows-1257' + case 'cp1258': + case 'windows-1258': + case 'x-cp1258': + return 'windows-1258' + case 'x-mac-cyrillic': + case 'x-mac-ukrainian': + return 'x-mac-cyrillic' + case 'chinese': + case 'csgb2312': + case 'csiso58gb231280': + case 'gb2312': + case 'gb_2312': + case 'gb_2312-80': + case 'gbk': + case 'iso-ir-58': + case 'x-gbk': + return 'GBK' + case 'gb18030': + return 'gb18030' + case 'big5': + case 'big5-hkscs': + case 'cn-big5': + case 'csbig5': + case 'x-x-big5': + return 'Big5' + case 'cseucpkdfmtjapanese': + case 'euc-jp': + case 'x-euc-jp': + return 'EUC-JP' + case 'csiso2022jp': + case 'iso-2022-jp': + return 'ISO-2022-JP' + case 'csshiftjis': + case 'ms932': + case 'ms_kanji': + case 'shift-jis': + case 'shift_jis': + case 'sjis': + case 'windows-31j': + case 'x-sjis': + return 'Shift_JIS' + case 'cseuckr': + case 'csksc56011987': + case 'euc-kr': + case 'iso-ir-149': + case 'korean': + case 'ks_c_5601-1987': + case 'ks_c_5601-1989': + case 'ksc5601': + case 'ksc_5601': + case 'windows-949': + return 'EUC-KR' + case 'csiso2022kr': + case 'hz-gb-2312': + case 'iso-2022-cn': + case 'iso-2022-cn-ext': + case 'iso-2022-kr': + case 'replacement': + return 'replacement' + case 'unicodefffe': + case 'utf-16be': + return 'UTF-16BE' + case 'csunicode': + case 'iso-10646-ucs-2': + case 'ucs-2': + case 'unicode': + case 'unicodefeff': + case 'utf-16': + case 'utf-16le': + return 'UTF-16LE' + case 'x-user-defined': + return 'x-user-defined' + default: return 'failure' + } +} + +module.exports = { + getEncoding +} diff --git a/action/node_modules/undici/lib/fileapi/filereader.js b/action/node_modules/undici/lib/fileapi/filereader.js new file mode 100644 index 00000000..cd36a22f --- /dev/null +++ b/action/node_modules/undici/lib/fileapi/filereader.js @@ -0,0 +1,344 @@ +'use strict' + +const { + staticPropertyDescriptors, + readOperation, + fireAProgressEvent +} = require('./util') +const { + kState, + kError, + kResult, + kEvents, + kAborted +} = require('./symbols') +const { webidl } = require('../fetch/webidl') +const { kEnumerableProperty } = require('../core/util') + +class FileReader extends EventTarget { + constructor () { + super() + + this[kState] = 'empty' + this[kResult] = null + this[kError] = null + this[kEvents] = { + loadend: null, + error: null, + abort: null, + load: null, + progress: null, + loadstart: null + } + } + + /** + * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer + * @param {import('buffer').Blob} blob + */ + readAsArrayBuffer (blob) { + webidl.brandCheck(this, FileReader) + + webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsArrayBuffer' }) + + blob = webidl.converters.Blob(blob, { strict: false }) + + // The readAsArrayBuffer(blob) method, when invoked, + // must initiate a read operation for blob with ArrayBuffer. + readOperation(this, blob, 'ArrayBuffer') + } + + /** + * @see https://w3c.github.io/FileAPI/#readAsBinaryString + * @param {import('buffer').Blob} blob + */ + readAsBinaryString (blob) { + webidl.brandCheck(this, FileReader) + + webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsBinaryString' }) + + blob = webidl.converters.Blob(blob, { strict: false }) + + // The readAsBinaryString(blob) method, when invoked, + // must initiate a read operation for blob with BinaryString. + readOperation(this, blob, 'BinaryString') + } + + /** + * @see https://w3c.github.io/FileAPI/#readAsDataText + * @param {import('buffer').Blob} blob + * @param {string?} encoding + */ + readAsText (blob, encoding = undefined) { + webidl.brandCheck(this, FileReader) + + webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsText' }) + + blob = webidl.converters.Blob(blob, { strict: false }) + + if (encoding !== undefined) { + encoding = webidl.converters.DOMString(encoding) + } + + // The readAsText(blob, encoding) method, when invoked, + // must initiate a read operation for blob with Text and encoding. + readOperation(this, blob, 'Text', encoding) + } + + /** + * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL + * @param {import('buffer').Blob} blob + */ + readAsDataURL (blob) { + webidl.brandCheck(this, FileReader) + + webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsDataURL' }) + + blob = webidl.converters.Blob(blob, { strict: false }) + + // The readAsDataURL(blob) method, when invoked, must + // initiate a read operation for blob with DataURL. + readOperation(this, blob, 'DataURL') + } + + /** + * @see https://w3c.github.io/FileAPI/#dfn-abort + */ + abort () { + // 1. If this's state is "empty" or if this's state is + // "done" set this's result to null and terminate + // this algorithm. + if (this[kState] === 'empty' || this[kState] === 'done') { + this[kResult] = null + return + } + + // 2. If this's state is "loading" set this's state to + // "done" and set this's result to null. + if (this[kState] === 'loading') { + this[kState] = 'done' + this[kResult] = null + } + + // 3. If there are any tasks from this on the file reading + // task source in an affiliated task queue, then remove + // those tasks from that task queue. + this[kAborted] = true + + // 4. Terminate the algorithm for the read method being processed. + // TODO + + // 5. Fire a progress event called abort at this. + fireAProgressEvent('abort', this) + + // 6. If this's state is not "loading", fire a progress + // event called loadend at this. + if (this[kState] !== 'loading') { + fireAProgressEvent('loadend', this) + } + } + + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate + */ + get readyState () { + webidl.brandCheck(this, FileReader) + + switch (this[kState]) { + case 'empty': return this.EMPTY + case 'loading': return this.LOADING + case 'done': return this.DONE + } + } + + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-result + */ + get result () { + webidl.brandCheck(this, FileReader) + + // The result attribute’s getter, when invoked, must return + // this's result. + return this[kResult] + } + + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-error + */ + get error () { + webidl.brandCheck(this, FileReader) + + // The error attribute’s getter, when invoked, must return + // this's error. + return this[kError] + } + + get onloadend () { + webidl.brandCheck(this, FileReader) + + return this[kEvents].loadend + } + + set onloadend (fn) { + webidl.brandCheck(this, FileReader) + + if (this[kEvents].loadend) { + this.removeEventListener('loadend', this[kEvents].loadend) + } + + if (typeof fn === 'function') { + this[kEvents].loadend = fn + this.addEventListener('loadend', fn) + } else { + this[kEvents].loadend = null + } + } + + get onerror () { + webidl.brandCheck(this, FileReader) + + return this[kEvents].error + } + + set onerror (fn) { + webidl.brandCheck(this, FileReader) + + if (this[kEvents].error) { + this.removeEventListener('error', this[kEvents].error) + } + + if (typeof fn === 'function') { + this[kEvents].error = fn + this.addEventListener('error', fn) + } else { + this[kEvents].error = null + } + } + + get onloadstart () { + webidl.brandCheck(this, FileReader) + + return this[kEvents].loadstart + } + + set onloadstart (fn) { + webidl.brandCheck(this, FileReader) + + if (this[kEvents].loadstart) { + this.removeEventListener('loadstart', this[kEvents].loadstart) + } + + if (typeof fn === 'function') { + this[kEvents].loadstart = fn + this.addEventListener('loadstart', fn) + } else { + this[kEvents].loadstart = null + } + } + + get onprogress () { + webidl.brandCheck(this, FileReader) + + return this[kEvents].progress + } + + set onprogress (fn) { + webidl.brandCheck(this, FileReader) + + if (this[kEvents].progress) { + this.removeEventListener('progress', this[kEvents].progress) + } + + if (typeof fn === 'function') { + this[kEvents].progress = fn + this.addEventListener('progress', fn) + } else { + this[kEvents].progress = null + } + } + + get onload () { + webidl.brandCheck(this, FileReader) + + return this[kEvents].load + } + + set onload (fn) { + webidl.brandCheck(this, FileReader) + + if (this[kEvents].load) { + this.removeEventListener('load', this[kEvents].load) + } + + if (typeof fn === 'function') { + this[kEvents].load = fn + this.addEventListener('load', fn) + } else { + this[kEvents].load = null + } + } + + get onabort () { + webidl.brandCheck(this, FileReader) + + return this[kEvents].abort + } + + set onabort (fn) { + webidl.brandCheck(this, FileReader) + + if (this[kEvents].abort) { + this.removeEventListener('abort', this[kEvents].abort) + } + + if (typeof fn === 'function') { + this[kEvents].abort = fn + this.addEventListener('abort', fn) + } else { + this[kEvents].abort = null + } + } +} + +// https://w3c.github.io/FileAPI/#dom-filereader-empty +FileReader.EMPTY = FileReader.prototype.EMPTY = 0 +// https://w3c.github.io/FileAPI/#dom-filereader-loading +FileReader.LOADING = FileReader.prototype.LOADING = 1 +// https://w3c.github.io/FileAPI/#dom-filereader-done +FileReader.DONE = FileReader.prototype.DONE = 2 + +Object.defineProperties(FileReader.prototype, { + EMPTY: staticPropertyDescriptors, + LOADING: staticPropertyDescriptors, + DONE: staticPropertyDescriptors, + readAsArrayBuffer: kEnumerableProperty, + readAsBinaryString: kEnumerableProperty, + readAsText: kEnumerableProperty, + readAsDataURL: kEnumerableProperty, + abort: kEnumerableProperty, + readyState: kEnumerableProperty, + result: kEnumerableProperty, + error: kEnumerableProperty, + onloadstart: kEnumerableProperty, + onprogress: kEnumerableProperty, + onload: kEnumerableProperty, + onabort: kEnumerableProperty, + onerror: kEnumerableProperty, + onloadend: kEnumerableProperty, + [Symbol.toStringTag]: { + value: 'FileReader', + writable: false, + enumerable: false, + configurable: true + } +}) + +Object.defineProperties(FileReader, { + EMPTY: staticPropertyDescriptors, + LOADING: staticPropertyDescriptors, + DONE: staticPropertyDescriptors +}) + +module.exports = { + FileReader +} diff --git a/action/node_modules/undici/lib/fileapi/progressevent.js b/action/node_modules/undici/lib/fileapi/progressevent.js new file mode 100644 index 00000000..778cf224 --- /dev/null +++ b/action/node_modules/undici/lib/fileapi/progressevent.js @@ -0,0 +1,78 @@ +'use strict' + +const { webidl } = require('../fetch/webidl') + +const kState = Symbol('ProgressEvent state') + +/** + * @see https://xhr.spec.whatwg.org/#progressevent + */ +class ProgressEvent extends Event { + constructor (type, eventInitDict = {}) { + type = webidl.converters.DOMString(type) + eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}) + + super(type, eventInitDict) + + this[kState] = { + lengthComputable: eventInitDict.lengthComputable, + loaded: eventInitDict.loaded, + total: eventInitDict.total + } + } + + get lengthComputable () { + webidl.brandCheck(this, ProgressEvent) + + return this[kState].lengthComputable + } + + get loaded () { + webidl.brandCheck(this, ProgressEvent) + + return this[kState].loaded + } + + get total () { + webidl.brandCheck(this, ProgressEvent) + + return this[kState].total + } +} + +webidl.converters.ProgressEventInit = webidl.dictionaryConverter([ + { + key: 'lengthComputable', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'loaded', + converter: webidl.converters['unsigned long long'], + defaultValue: 0 + }, + { + key: 'total', + converter: webidl.converters['unsigned long long'], + defaultValue: 0 + }, + { + key: 'bubbles', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'cancelable', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'composed', + converter: webidl.converters.boolean, + defaultValue: false + } +]) + +module.exports = { + ProgressEvent +} diff --git a/action/node_modules/undici/lib/fileapi/symbols.js b/action/node_modules/undici/lib/fileapi/symbols.js new file mode 100644 index 00000000..dd11746d --- /dev/null +++ b/action/node_modules/undici/lib/fileapi/symbols.js @@ -0,0 +1,10 @@ +'use strict' + +module.exports = { + kState: Symbol('FileReader state'), + kResult: Symbol('FileReader result'), + kError: Symbol('FileReader error'), + kLastProgressEventFired: Symbol('FileReader last progress event fired timestamp'), + kEvents: Symbol('FileReader events'), + kAborted: Symbol('FileReader aborted') +} diff --git a/action/node_modules/undici/lib/fileapi/util.js b/action/node_modules/undici/lib/fileapi/util.js new file mode 100644 index 00000000..1d10899c --- /dev/null +++ b/action/node_modules/undici/lib/fileapi/util.js @@ -0,0 +1,392 @@ +'use strict' + +const { + kState, + kError, + kResult, + kAborted, + kLastProgressEventFired +} = require('./symbols') +const { ProgressEvent } = require('./progressevent') +const { getEncoding } = require('./encoding') +const { DOMException } = require('../fetch/constants') +const { serializeAMimeType, parseMIMEType } = require('../fetch/dataURL') +const { types } = require('util') +const { StringDecoder } = require('string_decoder') +const { btoa } = require('buffer') + +/** @type {PropertyDescriptor} */ +const staticPropertyDescriptors = { + enumerable: true, + writable: false, + configurable: false +} + +/** + * @see https://w3c.github.io/FileAPI/#readOperation + * @param {import('./filereader').FileReader} fr + * @param {import('buffer').Blob} blob + * @param {string} type + * @param {string?} encodingName + */ +function readOperation (fr, blob, type, encodingName) { + // 1. If fr’s state is "loading", throw an InvalidStateError + // DOMException. + if (fr[kState] === 'loading') { + throw new DOMException('Invalid state', 'InvalidStateError') + } + + // 2. Set fr’s state to "loading". + fr[kState] = 'loading' + + // 3. Set fr’s result to null. + fr[kResult] = null + + // 4. Set fr’s error to null. + fr[kError] = null + + // 5. Let stream be the result of calling get stream on blob. + /** @type {import('stream/web').ReadableStream} */ + const stream = blob.stream() + + // 6. Let reader be the result of getting a reader from stream. + const reader = stream.getReader() + + // 7. Let bytes be an empty byte sequence. + /** @type {Uint8Array[]} */ + const bytes = [] + + // 8. Let chunkPromise be the result of reading a chunk from + // stream with reader. + let chunkPromise = reader.read() + + // 9. Let isFirstChunk be true. + let isFirstChunk = true + + // 10. In parallel, while true: + // Note: "In parallel" just means non-blocking + // Note 2: readOperation itself cannot be async as double + // reading the body would then reject the promise, instead + // of throwing an error. + ;(async () => { + while (!fr[kAborted]) { + // 1. Wait for chunkPromise to be fulfilled or rejected. + try { + const { done, value } = await chunkPromise + + // 2. If chunkPromise is fulfilled, and isFirstChunk is + // true, queue a task to fire a progress event called + // loadstart at fr. + if (isFirstChunk && !fr[kAborted]) { + queueMicrotask(() => { + fireAProgressEvent('loadstart', fr) + }) + } + + // 3. Set isFirstChunk to false. + isFirstChunk = false + + // 4. If chunkPromise is fulfilled with an object whose + // done property is false and whose value property is + // a Uint8Array object, run these steps: + if (!done && types.isUint8Array(value)) { + // 1. Let bs be the byte sequence represented by the + // Uint8Array object. + + // 2. Append bs to bytes. + bytes.push(value) + + // 3. If roughly 50ms have passed since these steps + // were last invoked, queue a task to fire a + // progress event called progress at fr. + if ( + ( + fr[kLastProgressEventFired] === undefined || + Date.now() - fr[kLastProgressEventFired] >= 50 + ) && + !fr[kAborted] + ) { + fr[kLastProgressEventFired] = Date.now() + queueMicrotask(() => { + fireAProgressEvent('progress', fr) + }) + } + + // 4. Set chunkPromise to the result of reading a + // chunk from stream with reader. + chunkPromise = reader.read() + } else if (done) { + // 5. Otherwise, if chunkPromise is fulfilled with an + // object whose done property is true, queue a task + // to run the following steps and abort this algorithm: + queueMicrotask(() => { + // 1. Set fr’s state to "done". + fr[kState] = 'done' + + // 2. Let result be the result of package data given + // bytes, type, blob’s type, and encodingName. + try { + const result = packageData(bytes, type, blob.type, encodingName) + + // 4. Else: + + if (fr[kAborted]) { + return + } + + // 1. Set fr’s result to result. + fr[kResult] = result + + // 2. Fire a progress event called load at the fr. + fireAProgressEvent('load', fr) + } catch (error) { + // 3. If package data threw an exception error: + + // 1. Set fr’s error to error. + fr[kError] = error + + // 2. Fire a progress event called error at fr. + fireAProgressEvent('error', fr) + } + + // 5. If fr’s state is not "loading", fire a progress + // event called loadend at the fr. + if (fr[kState] !== 'loading') { + fireAProgressEvent('loadend', fr) + } + }) + + break + } + } catch (error) { + if (fr[kAborted]) { + return + } + + // 6. Otherwise, if chunkPromise is rejected with an + // error error, queue a task to run the following + // steps and abort this algorithm: + queueMicrotask(() => { + // 1. Set fr’s state to "done". + fr[kState] = 'done' + + // 2. Set fr’s error to error. + fr[kError] = error + + // 3. Fire a progress event called error at fr. + fireAProgressEvent('error', fr) + + // 4. If fr’s state is not "loading", fire a progress + // event called loadend at fr. + if (fr[kState] !== 'loading') { + fireAProgressEvent('loadend', fr) + } + }) + + break + } + } + })() +} + +/** + * @see https://w3c.github.io/FileAPI/#fire-a-progress-event + * @see https://dom.spec.whatwg.org/#concept-event-fire + * @param {string} e The name of the event + * @param {import('./filereader').FileReader} reader + */ +function fireAProgressEvent (e, reader) { + // The progress event e does not bubble. e.bubbles must be false + // The progress event e is NOT cancelable. e.cancelable must be false + const event = new ProgressEvent(e, { + bubbles: false, + cancelable: false + }) + + reader.dispatchEvent(event) +} + +/** + * @see https://w3c.github.io/FileAPI/#blob-package-data + * @param {Uint8Array[]} bytes + * @param {string} type + * @param {string?} mimeType + * @param {string?} encodingName + */ +function packageData (bytes, type, mimeType, encodingName) { + // 1. A Blob has an associated package data algorithm, given + // bytes, a type, a optional mimeType, and a optional + // encodingName, which switches on type and runs the + // associated steps: + + switch (type) { + case 'DataURL': { + // 1. Return bytes as a DataURL [RFC2397] subject to + // the considerations below: + // * Use mimeType as part of the Data URL if it is + // available in keeping with the Data URL + // specification [RFC2397]. + // * If mimeType is not available return a Data URL + // without a media-type. [RFC2397]. + + // https://datatracker.ietf.org/doc/html/rfc2397#section-3 + // dataurl := "data:" [ mediatype ] [ ";base64" ] "," data + // mediatype := [ type "/" subtype ] *( ";" parameter ) + // data := *urlchar + // parameter := attribute "=" value + let dataURL = 'data:' + + const parsed = parseMIMEType(mimeType || 'application/octet-stream') + + if (parsed !== 'failure') { + dataURL += serializeAMimeType(parsed) + } + + dataURL += ';base64,' + + const decoder = new StringDecoder('latin1') + + for (const chunk of bytes) { + dataURL += btoa(decoder.write(chunk)) + } + + dataURL += btoa(decoder.end()) + + return dataURL + } + case 'Text': { + // 1. Let encoding be failure + let encoding = 'failure' + + // 2. If the encodingName is present, set encoding to the + // result of getting an encoding from encodingName. + if (encodingName) { + encoding = getEncoding(encodingName) + } + + // 3. If encoding is failure, and mimeType is present: + if (encoding === 'failure' && mimeType) { + // 1. Let type be the result of parse a MIME type + // given mimeType. + const type = parseMIMEType(mimeType) + + // 2. If type is not failure, set encoding to the result + // of getting an encoding from type’s parameters["charset"]. + if (type !== 'failure') { + encoding = getEncoding(type.parameters.get('charset')) + } + } + + // 4. If encoding is failure, then set encoding to UTF-8. + if (encoding === 'failure') { + encoding = 'UTF-8' + } + + // 5. Decode bytes using fallback encoding encoding, and + // return the result. + return decode(bytes, encoding) + } + case 'ArrayBuffer': { + // Return a new ArrayBuffer whose contents are bytes. + const sequence = combineByteSequences(bytes) + + return sequence.buffer + } + case 'BinaryString': { + // Return bytes as a binary string, in which every byte + // is represented by a code unit of equal value [0..255]. + let binaryString = '' + + const decoder = new StringDecoder('latin1') + + for (const chunk of bytes) { + binaryString += decoder.write(chunk) + } + + binaryString += decoder.end() + + return binaryString + } + } +} + +/** + * @see https://encoding.spec.whatwg.org/#decode + * @param {Uint8Array[]} ioQueue + * @param {string} encoding + */ +function decode (ioQueue, encoding) { + const bytes = combineByteSequences(ioQueue) + + // 1. Let BOMEncoding be the result of BOM sniffing ioQueue. + const BOMEncoding = BOMSniffing(bytes) + + let slice = 0 + + // 2. If BOMEncoding is non-null: + if (BOMEncoding !== null) { + // 1. Set encoding to BOMEncoding. + encoding = BOMEncoding + + // 2. Read three bytes from ioQueue, if BOMEncoding is + // UTF-8; otherwise read two bytes. + // (Do nothing with those bytes.) + slice = BOMEncoding === 'UTF-8' ? 3 : 2 + } + + // 3. Process a queue with an instance of encoding’s + // decoder, ioQueue, output, and "replacement". + + // 4. Return output. + + const sliced = bytes.slice(slice) + return new TextDecoder(encoding).decode(sliced) +} + +/** + * @see https://encoding.spec.whatwg.org/#bom-sniff + * @param {Uint8Array} ioQueue + */ +function BOMSniffing (ioQueue) { + // 1. Let BOM be the result of peeking 3 bytes from ioQueue, + // converted to a byte sequence. + const [a, b, c] = ioQueue + + // 2. For each of the rows in the table below, starting with + // the first one and going down, if BOM starts with the + // bytes given in the first column, then return the + // encoding given in the cell in the second column of that + // row. Otherwise, return null. + if (a === 0xEF && b === 0xBB && c === 0xBF) { + return 'UTF-8' + } else if (a === 0xFE && b === 0xFF) { + return 'UTF-16BE' + } else if (a === 0xFF && b === 0xFE) { + return 'UTF-16LE' + } + + return null +} + +/** + * @param {Uint8Array[]} sequences + */ +function combineByteSequences (sequences) { + const size = sequences.reduce((a, b) => { + return a + b.byteLength + }, 0) + + let offset = 0 + + return sequences.reduce((a, b) => { + a.set(b, offset) + offset += b.byteLength + return a + }, new Uint8Array(size)) +} + +module.exports = { + staticPropertyDescriptors, + readOperation, + fireAProgressEvent +} diff --git a/action/node_modules/undici/lib/handler/RedirectHandler.js b/action/node_modules/undici/lib/handler/RedirectHandler.js index 2f726e79..933725fb 100644 --- a/action/node_modules/undici/lib/handler/RedirectHandler.js +++ b/action/node_modules/undici/lib/handler/RedirectHandler.js @@ -109,6 +109,7 @@ class RedirectHandler { this.opts.path = path this.opts.origin = origin this.opts.maxRedirections = 0 + this.opts.query = null // https://tools.ietf.org/html/rfc7231#section-6.4.4 // In case of HTTP 303, always replace method to be either HEAD or GET @@ -183,12 +184,17 @@ function parseLocation (statusCode, headers) { // https://tools.ietf.org/html/rfc7231#section-6.4.4 function shouldRemoveHeader (header, removeContent, unknownOrigin) { - return ( - (header.length === 4 && header.toString().toLowerCase() === 'host') || - (removeContent && header.toString().toLowerCase().indexOf('content-') === 0) || - (unknownOrigin && header.length === 13 && header.toString().toLowerCase() === 'authorization') || - (unknownOrigin && header.length === 6 && header.toString().toLowerCase() === 'cookie') - ) + if (header.length === 4) { + return util.headerNameToString(header) === 'host' + } + if (removeContent && util.headerNameToString(header).startsWith('content-')) { + return true + } + if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { + const name = util.headerNameToString(header) + return name === 'authorization' || name === 'cookie' || name === 'proxy-authorization' + } + return false } // https://tools.ietf.org/html/rfc7231#section-6.4 diff --git a/action/node_modules/undici/lib/handler/RetryHandler.js b/action/node_modules/undici/lib/handler/RetryHandler.js new file mode 100644 index 00000000..37104471 --- /dev/null +++ b/action/node_modules/undici/lib/handler/RetryHandler.js @@ -0,0 +1,336 @@ +const assert = require('assert') + +const { kRetryHandlerDefaultRetry } = require('../core/symbols') +const { RequestRetryError } = require('../core/errors') +const { isDisturbed, parseHeaders, parseRangeHeader } = require('../core/util') + +function calculateRetryAfterHeader (retryAfter) { + const current = Date.now() + const diff = new Date(retryAfter).getTime() - current + + return diff +} + +class RetryHandler { + constructor (opts, handlers) { + const { retryOptions, ...dispatchOpts } = opts + const { + // Retry scoped + retry: retryFn, + maxRetries, + maxTimeout, + minTimeout, + timeoutFactor, + // Response scoped + methods, + errorCodes, + retryAfter, + statusCodes + } = retryOptions ?? {} + + this.dispatch = handlers.dispatch + this.handler = handlers.handler + this.opts = dispatchOpts + this.abort = null + this.aborted = false + this.retryOpts = { + retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry], + retryAfter: retryAfter ?? true, + maxTimeout: maxTimeout ?? 30 * 1000, // 30s, + timeout: minTimeout ?? 500, // .5s + timeoutFactor: timeoutFactor ?? 2, + maxRetries: maxRetries ?? 5, + // What errors we should retry + methods: methods ?? ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'], + // Indicates which errors to retry + statusCodes: statusCodes ?? [500, 502, 503, 504, 429], + // List of errors to retry + errorCodes: errorCodes ?? [ + 'ECONNRESET', + 'ECONNREFUSED', + 'ENOTFOUND', + 'ENETDOWN', + 'ENETUNREACH', + 'EHOSTDOWN', + 'EHOSTUNREACH', + 'EPIPE' + ] + } + + this.retryCount = 0 + this.start = 0 + this.end = null + this.etag = null + this.resume = null + + // Handle possible onConnect duplication + this.handler.onConnect(reason => { + this.aborted = true + if (this.abort) { + this.abort(reason) + } else { + this.reason = reason + } + }) + } + + onRequestSent () { + if (this.handler.onRequestSent) { + this.handler.onRequestSent() + } + } + + onUpgrade (statusCode, headers, socket) { + if (this.handler.onUpgrade) { + this.handler.onUpgrade(statusCode, headers, socket) + } + } + + onConnect (abort) { + if (this.aborted) { + abort(this.reason) + } else { + this.abort = abort + } + } + + onBodySent (chunk) { + if (this.handler.onBodySent) return this.handler.onBodySent(chunk) + } + + static [kRetryHandlerDefaultRetry] (err, { state, opts }, cb) { + const { statusCode, code, headers } = err + const { method, retryOptions } = opts + const { + maxRetries, + timeout, + maxTimeout, + timeoutFactor, + statusCodes, + errorCodes, + methods + } = retryOptions + let { counter, currentTimeout } = state + + currentTimeout = + currentTimeout != null && currentTimeout > 0 ? currentTimeout : timeout + + // Any code that is not a Undici's originated and allowed to retry + if ( + code && + code !== 'UND_ERR_REQ_RETRY' && + code !== 'UND_ERR_SOCKET' && + !errorCodes.includes(code) + ) { + cb(err) + return + } + + // If a set of method are provided and the current method is not in the list + if (Array.isArray(methods) && !methods.includes(method)) { + cb(err) + return + } + + // If a set of status code are provided and the current status code is not in the list + if ( + statusCode != null && + Array.isArray(statusCodes) && + !statusCodes.includes(statusCode) + ) { + cb(err) + return + } + + // If we reached the max number of retries + if (counter > maxRetries) { + cb(err) + return + } + + let retryAfterHeader = headers != null && headers['retry-after'] + if (retryAfterHeader) { + retryAfterHeader = Number(retryAfterHeader) + retryAfterHeader = isNaN(retryAfterHeader) + ? calculateRetryAfterHeader(retryAfterHeader) + : retryAfterHeader * 1e3 // Retry-After is in seconds + } + + const retryTimeout = + retryAfterHeader > 0 + ? Math.min(retryAfterHeader, maxTimeout) + : Math.min(currentTimeout * timeoutFactor ** counter, maxTimeout) + + state.currentTimeout = retryTimeout + + setTimeout(() => cb(null), retryTimeout) + } + + onHeaders (statusCode, rawHeaders, resume, statusMessage) { + const headers = parseHeaders(rawHeaders) + + this.retryCount += 1 + + if (statusCode >= 300) { + this.abort( + new RequestRetryError('Request failed', statusCode, { + headers, + count: this.retryCount + }) + ) + return false + } + + // Checkpoint for resume from where we left it + if (this.resume != null) { + this.resume = null + + if (statusCode !== 206) { + return true + } + + const contentRange = parseRangeHeader(headers['content-range']) + // If no content range + if (!contentRange) { + this.abort( + new RequestRetryError('Content-Range mismatch', statusCode, { + headers, + count: this.retryCount + }) + ) + return false + } + + // Let's start with a weak etag check + if (this.etag != null && this.etag !== headers.etag) { + this.abort( + new RequestRetryError('ETag mismatch', statusCode, { + headers, + count: this.retryCount + }) + ) + return false + } + + const { start, size, end = size } = contentRange + + assert(this.start === start, 'content-range mismatch') + assert(this.end == null || this.end === end, 'content-range mismatch') + + this.resume = resume + return true + } + + if (this.end == null) { + if (statusCode === 206) { + // First time we receive 206 + const range = parseRangeHeader(headers['content-range']) + + if (range == null) { + return this.handler.onHeaders( + statusCode, + rawHeaders, + resume, + statusMessage + ) + } + + const { start, size, end = size } = range + + assert( + start != null && Number.isFinite(start) && this.start !== start, + 'content-range mismatch' + ) + assert(Number.isFinite(start)) + assert( + end != null && Number.isFinite(end) && this.end !== end, + 'invalid content-length' + ) + + this.start = start + this.end = end + } + + // We make our best to checkpoint the body for further range headers + if (this.end == null) { + const contentLength = headers['content-length'] + this.end = contentLength != null ? Number(contentLength) : null + } + + assert(Number.isFinite(this.start)) + assert( + this.end == null || Number.isFinite(this.end), + 'invalid content-length' + ) + + this.resume = resume + this.etag = headers.etag != null ? headers.etag : null + + return this.handler.onHeaders( + statusCode, + rawHeaders, + resume, + statusMessage + ) + } + + const err = new RequestRetryError('Request failed', statusCode, { + headers, + count: this.retryCount + }) + + this.abort(err) + + return false + } + + onData (chunk) { + this.start += chunk.length + + return this.handler.onData(chunk) + } + + onComplete (rawTrailers) { + this.retryCount = 0 + return this.handler.onComplete(rawTrailers) + } + + onError (err) { + if (this.aborted || isDisturbed(this.opts.body)) { + return this.handler.onError(err) + } + + this.retryOpts.retry( + err, + { + state: { counter: this.retryCount++, currentTimeout: this.retryAfter }, + opts: { retryOptions: this.retryOpts, ...this.opts } + }, + onRetry.bind(this) + ) + + function onRetry (err) { + if (err != null || this.aborted || isDisturbed(this.opts.body)) { + return this.handler.onError(err) + } + + if (this.start !== 0) { + this.opts = { + ...this.opts, + headers: { + ...this.opts.headers, + range: `bytes=${this.start}-${this.end ?? ''}` + } + } + } + + try { + this.dispatch(this.opts, this) + } catch (err) { + this.handler.onError(err) + } + } + } +} + +module.exports = RetryHandler diff --git a/action/node_modules/undici/lib/llhttp/llhttp-wasm.js b/action/node_modules/undici/lib/llhttp/llhttp-wasm.js new file mode 100644 index 00000000..ad4682c3 --- /dev/null +++ b/action/node_modules/undici/lib/llhttp/llhttp-wasm.js @@ -0,0 +1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JAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAQDscBAAECAwQFBgcICQoLDA0ODxAREhMU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kcNAEEcIRAM2AMLQgAhESAQIQEgEC0AAEFQag435wHmAQECAwQFBgcIAAAAAAAAAAkKCwwNDgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADxAREhMUAAtBHiEQDL0DC0ICIREM5QELQgMhEQzkAQtCBCERDOMBC0IFIREM4gELQgYhEQzhAQtCByERDOABC0IIIREM3wELQgkhEQzeAQtCCiERDN0BC0ILIREM3AELQgwhEQzbAQtCDSERDNoBC0IOIREM2QELQg8hEQzYAQtCCiERDNcBC0ILIREM1gELQgwhEQzVAQtCDSERDNQBC0IOIREM0wELQg8hEQzSAQtCACERAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAQLQAAQVBqDjflAeQBAAECAwQFBgfmAeYB5gHmAeYB5gHmAQgJCgsMDeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gEODxAREhPmAQtCAiERDOQBC0IDIREM4wELQgQhEQziAQtCBSERDOEBC0IGIREM4AELQgchEQzfAQtCCCERDN4BC0IJIREM3QELQgohEQzcAQtCCyERDNsBC0IMIREM2gELQg0hEQzZAQtCDiERDNgBC0IPIREM1wELQgohEQzWAQtCCyERDNUBC0IMIREM1AELQg0hEQzTAQtCDiERDNIBC0IPIREM0QELIABCACAAKQMgIhEgAiABIhBrrSISfSITIBMgEVYbNwMgIBEgElYiFEUN0gFBHyEQDMADCwJAIAEiASACRg0AIABBiYCAgAA2AgggACABNgIEIAEhAUEkIRAMpwMLQSAhEAy/AwsgACABIhAgAhC+gICAAEF/ag4FtgEAxQIB0QHSAQtBESEQDKQDCyAAQQE6AC8gECEBDLsDCyABIgEgAkcN0gFBJCEQDLsDCyABIg0gAkcNHkHGACEQDLoDCyAAIAEiASACELKAgIAAIhAN1AEgASEBDLUBCyABIhAgAkcNJkHQACEQDLgDCwJAIAEiASACRw0AQSghEAy4AwsgAEEANgIEIABBjICAgAA2AgggACABIAEQsYCA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AE2AhQgAEG5jYCAADYCECAAQRo2AgxBACEQDLQBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxUCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDLMBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDLIBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDLEBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxRCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDLABCyAAQQA2AhwgACABNgIUIABBxoqAgAA2AhAgAEEHNgIMQQAhEAyvAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAyuAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAytAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMTQsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAysAQsgAEEANgIcIAAgATYCFCAAQdyIgIAANgIQIABBBzYCDEEAIRAMqwELIBBBP0cNASABQQFqIQELQQUhEAyQAQtBACEQIABBADYCHCAAIAE2AhQgAEH9koCAADYCECAAQQc2AgwMqAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMpwELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMpgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEYLIABB5QA2AhwgACABNg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YCDCABIAA2AggPC0EfIQICQCAAQf///wdLDQAgAEEIdiICIAJBgP4/akEQdkEIcSICdCIEIARBgOAfakEQdkEEcSIEdCIGIAZBgIAPakEQdkECcSIGdEEPdiACIARyIAZyayICQQF0IAAgAkEVanZBAXFyQRxqIQILIAEgAjYCHCABQgA3AhAgAkECdEG40oCAAGohBAJAAkBBACgCjNCAgAAiBkEBIAJ0IgNxDQAgBCABNgIAQQAgBiADcjYCjNCAgAAgASAENgIYIAEgATYCCCABIAE2AgwMAQsgAEEAQRkgAkEBdmsgAkEfRht0IQIgBCgCACEGAkADQCAGIgQoAgRBeHEgAEYNASACQR12IQYgAkEBdCECIAQgBkEEcWpBEGoiAygCACIGDQALIAMgATYCACABIAQ2AhggASABNgIMIAEgATYCCAwBCyAEKAIIIgAgATYCDCAEIAE2AgggAUEANgIYIAEgBDYCDCABIAA2AggLQQBBACgCqNCAgABBf2oiAUF/IAEbNgKo0ICAAAsLBAAAAAtOAAJAIAANAD8AQRB0DwsCQCAAQf//A3ENACAAQX9MDQACQCAAQRB2QAAiAEF/Rw0AQQBBMDYC+NOAgABBfw8LIABBEHQPCxDKgICAAAAL8gICA38BfgJAIAJFDQAgACABOgAAIAIgAGoiA0F/aiABOgAAIAJBA0kNACAAIAE6AAIgACABOgABIANBfWogAToAACADQX5qIAE6AAAgAkEHSQ0AIAAgAToAAyADQXxqIAE6AAAgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIFayICQSBJDQAgAa1CgYCAgBB+IQYgAyAFaiEBA0AgASAGNwMYIAEgBjcDECABIAY3AwggASAGNwMAIAFBIGohASACQWBqIg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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAIAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABOT1VOQ0VFQ0tPVVRORUNURVRFQ1JJQkVMVVNIRVRFQURTRUFSQ0hSR0VDVElWSVRZTEVOREFSVkVPVElGWVBUSU9OU0NIU0VBWVNUQVRDSEdFT1JESVJFQ1RPUlRSQ0hQQVJBTUVURVJVUkNFQlNDUklCRUFSRE9XTkFDRUlORE5LQ0tVQlNDUklCRUhUVFAvQURUUC8=' diff --git a/action/node_modules/undici/lib/llhttp/llhttp.wasm b/action/node_modules/undici/lib/llhttp/llhttp.wasm index f5128ec5..fe63282c 100755 Binary files a/action/node_modules/undici/lib/llhttp/llhttp.wasm and b/action/node_modules/undici/lib/llhttp/llhttp.wasm differ diff --git a/action/node_modules/undici/lib/llhttp/llhttp.wasm.js b/action/node_modules/undici/lib/llhttp/llhttp.wasm.js deleted file mode 100644 index a6223047..00000000 --- a/action/node_modules/undici/lib/llhttp/llhttp.wasm.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXN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QMcfwN+BX8jgICAgABBEGsiAySAgICAACABIQQgASEFIAEhBiABIQcgASEIIAEhCSABIQogASELIAEhDCABIQ0gASEOIAEhDyABIRAgASERIAEhEiABIRMgASEUIAEhFSABIRYgASEXIAEhGCABIRkgASEaIAEhGyABIRwgASEdAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgACgCHCIeQX9qDrwBtwEBtgECAwQFBgcICQoLDA0ODxDAAb8BERITtQEUFRYXGBkavQG8ARscHR4fICG0AbMBIiOyAbEBJCUmJygpKissLS4vMDEyMzQ1Njc4OTq4ATs8PT4/QEFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaW1xdXl9gYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXp7fH1+f4ABgQGCAYMBhAGFAYYBhwGIAYkBigGLAYwBjQGOAY8BkAGRAZIBkwGUAZUBlgGXAZgBmQGaAZsBnAGdAZ4BnwGgAaEBogGjAaQBpQGmAacBqAGpAaoBqwGsAa0BrgGvAQC5AQtBACEeDK8BC0EPIR4MrgELQQ4hHgytAQtBECEeDKwBC0ERIR4MqwELQRQhHgyqAQtBFSEeDKkBC0EWIR4MqAELQRchHgynA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C0HlACEeIAEiIiACRg2oAiACICJrIAAoAgAiJmohIyAiIQggJiEBA0AgCC0AACABQfCygIAAai0AAEcNugEgAUEFRg24ASABQQFqIQEgCEEBaiIIIAJHDQALIAAgIzYCAAyoAgsCQCABIgggAkcNAEHmACEeDKgCCwJAAkAgCC0AAEG9f2oODAC7AbsBuwG7AbsBuwG7AbsBuwG7AQG7AQsgCEEBaiEBQdQAIR4MmAILIAhBAWohAUHVACEeDJcCC0HnACEeIAEiIiACRg2mAiACICJrIAAoAgAiJmohIyAiIQggJiEBAkADQCAILQAAIAFB7bOAgABqLQAARw25ASABQQJGDQEgAUEBaiEBIAhBAWoiCCACRw0ACyAAICM2AgAMpwILIABBADYCACAiICZrQQNqIQFBECEeDLYBC0HoACEeIAEiIiACRg2lAiACICJrIAAoAgAiJmohIyAiIQggJiEBAkADQCAILQAAIAFB9rKAgABqLQAARw24ASABQQVGDQEgAUEBaiEBIAhBAWoiCCACRw0ACyAAICM2AgAMpgILIABBADYCACAiICZrQQZqIQFBFiEeDLUBC0HpACEeIAEiIiACRg2kAiACICJrIAAoAgAiJmohIyAiIQggJiEBAkADQCAILQAAIAFB/LKAgABqLQAARw23ASABQQNGDQEgAUEBaiEBIAhBAWoiCCACRw0ACyAAICM2AgAMpQILIABBADYCACAiICZrQQRqIQFBBSEeDLQBCwJAIAEiCCACRw0AQeoAIR4MpAILIAgtAABB2QBHDbUBIAhBAWohAUEIIR4MswELAkAgASIIIAJHDQBB6wAhHgyjAgsCQAJAIAgtAABBsn9qDgMAtgEBtgELIAhBAWohAUHZACEeDJMCCyAIQQFqIQFB2gAhHgySAgsCQCABIgggAkcNAEHsACEeDKICCwJAAkAgCC0AAEG4f2oOCAC1AbUBtQG1AbUBtQEBtQELIAhBAWohAUHYACEeDJICCyAIQQFqIQFB2wAhHgyRAgtB7QAhHiABIiIgAkYNoAIgAiAiayAAKAIAIiZqISMgIiEIICYhAQJAA0AgCC0AACABQYCzgIAAai0AAEcNswEgAUECRg0BIAFBAWohASAIQQFqIgggAkcNAAsgACAjNgIADKECC0EAIR4gAEEANgIAICIgJmtBA2ohAQywAQtB7gAhHiABIiIgAkYNnwIgAiAiayAAKAIAIiZqISMgIiEIICYhAQJAA0AgCC0AACABQYOzgIAAai0AAEcNsgEgAUEERg0BIAFBAWohASAIQQFqIgggAkcNAAsgACAjNgIADKACCyAAQQA2AgAgIiAma0EFaiEBQSMhHgyvAQsCQCABIgggAkcNAEHvACEeDJ8CCwJAAkAgCC0AAEG0f2oOCACyAbIBsgGyAbIBsgEBsgELIAhBAWohAUHdACEeDI8CCyAIQQFqIQFB3gAhHgyOAgsCQCABIgggAkcNAEHwACEeDJ4CCyAILQAAQcUARw2vASAIQQFqIQEM3gELQfEAIR4gASIiIAJGDZwCIAIgImsgACgCACImaiEjICIhCCAmIQECQANAIAgtAAAgAUGIs4CAAGotAABHDa8BIAFBA0YNASABQQFqIQEgCEEBaiIIIAJHDQALIAAgIzYCAAydAgsgAEEANgIAICIgJmtBBGohAUEtIR4MrAELQfIAIR4gASIiIAJGDZsCIAIgImsgACgCACImaiEjICIhCCAmIQECQANAIAgtAAAgAUHQs4CAAGotAABHDa4BIAFBCEYNASABQQFqIQEgCEEBaiIIIAJHDQALIAAgIzYCAAycAgsgAEEANgIAICIgJmtBCWohAUEpIR4MqwELAkAgASIBIAJHDQBB8wAhHgybAgtBASEeIAEtAABB3wBHDaoBIAFBAWohAQzcAQtB9AAhHiABIiIgAkYNmQIgAiAiayAAKAIAIiZqISMgIiEIICYhAQNAIAgtAAAgAUGMs4CAAGotAABHDasBIAFBAUYN9wEgAUEBaiEBIAhBAWoiCCACRw0ACyAAICM2AgAMmQILAkAgASIeIAJHDQBB9QAhHgyZAgsgAiAeayAAKAIAIiJqISYgHiEIICIhAQJAA0AgCC0AACABQY6zgIAAai0AAEcNqwEgAUECRg0BIAFBAWohASAIQQFqIgggAkcNAAsgACAmNgIAQfUAIR4MmQILIABBADYCACAeICJrQQNqIQFBAiEeDKgBCwJAIAEi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QAhHgyAAQsgHkE/Rw0BIAFBAWohAQtBBSEeDG4LQQAhHiAAQQA2AhwgACABNgIUIABB04+AgAA2AhAgAEEHNgIMDH0LIAAoAgQhHiAAQQA2AgQCQCAAIB4gARCkgICAACIeDQAgASEBDDQLIABBxAA2AhwgACABNgIUIAAgHjYCDEEAIR4MfAsgACgCBCEeIABBADYCBAJAIAAgHiABEKSAgIAAIh4NACABIQEMNAsgAEHFADYCHCAAIAE2AhQgACAeNgIMQQAhHgx7CyAAKAIEIR4gAEEANgIEAkAgACAeIAEQpICAgAAiHg0AIAEhAQw4CyAAQdAANgIcIAAgATYCFCAAIB42AgxBACEeDHoLIAAoAgQhASAAQQA2AgQCQCAAIAEgIhCkgICAACIBDQAgIiEBDDELIABBxAA2AhwgACAiNgIUIAAgATYCDEEAIR4MeQsgACgCBCEBIABBADYCBAJAIAAgASAiEKSAgIAAIgENACAiIQEMMQsgAEHFADYCHCAAICI2AhQgACABNgIMQQAhHgx4CyAAKAIEIQEgAEEANgIEAkAgACABICIQpICAgAAiAQ0AICIhAQw1CyAAQdAANgIcIAAgIjYCFCAAIAE2AgxBACEeDHcLIABBADYCHCAAICI2AhQgAEHQjICAADYCECAAQQc2AgxBACEeDHYLIABBADYCHCAAIAE2AhQgAEHQjICAADYCECAAQQc2AgxBACEeDHULQQAhHiAAQQA2AhwgACAiNgIUIABBv5SAgAA2AhAgAEEHNgIMDHQLIABBADYCHCAAICI2AhQgAEG/lICAADYCECAAQQc2AgxBACEeDHMLIABBADYCHCAAICI2AhQgAEHUjoCAADYCECAAQQc2AgxBACEeDHILIABBADYCHCAAIAE2AhQgAEHBk4CAADYCECAAQQY2AgxBACEeDHELIABBADYCACAiICZrQQZqIQFBJCEeCyAAIB46ACkgASEBDE4LIABBADYCAAtBACEeIABBADYCHCAAIAg2AhQgAEGklICAADYCECAAQQY2AgwMbQsgACgCBCETIABBADYCBCAAIBMgHhCmgICAACITDQEgHkEBaiETC0GdASEeDFsLIABBqgE2AhwgACATNg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d-wasm.js b/action/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js new file mode 100644 index 00000000..017e247d --- /dev/null +++ b/action/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js @@ -0,0 +1 @@ +module.exports = 'AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUAQQxsbGh0dHBfYWxsb2MADAZtYWxsb2MARgtsbGh0dHBfZnJlZQANBGZyZWUASA9sbGh0dHBfZ2V0X3R5cGUADhVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADxVsbGh0dHBfZ2V0X2h0dHBfbWlub3IAEBFsbGh0dHBfZ2V0X21ldGhvZAARFmxsaHR0cF9nZXRfc3RhdHVzX2NvZGUAEhJsbGh0dHBfZ2V0X3VwZ3JhZGUAEwxsbGh0dHBfcmVzZXQAFA5sbGh0dHBfZXhlY3V0ZQAVFGxsaHR0cF9zZXR0aW5nc19pbml0ABYNbGxodHRwX2ZpbmlzaAAXDGxsaH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AJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ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EEINgIMDLUBCyAQQRVGDXEgAEEANgIcIAAgATYCFCAAQbmNgIAANgIQIABBGjYCDEEAIRAMtAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFQLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMswELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMsgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMsQELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFELIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMsAELIABBADYCHCAAIAE2AhQgAEHGioCAADYCECAAQQc2AgxBACEQDK8BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDK4BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDK0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDKwBCyAAQQA2AhwgACABNgIUIABB3IiAgAA2AhAgAEEHNgIMQQAhEAyrAQsgEEE/Rw0BIAFBAWohAQtBBSEQDJABC0EAIRAgAEEANgIcIAAgATYCFCAAQf2SgIAANgIQIABBBzYCDAyoAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAynAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAymAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAg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YCDCACIAE2AgggASACNgIMIAEgADYCCA8LQR8hAgJAIABB////B0sNACAAQQh2IgIgAkGA/j9qQRB2QQhxIgJ0IgQgBEGA4B9qQRB2QQRxIgR0IgYgBkGAgA9qQRB2QQJxIgZ0QQ92IAIgBHIgBnJrIgJBAXQgACACQRVqdkEBcXJBHGohAgsgASACNgIcIAFCADcCECACQQJ0QbjSgIAAaiEEAkACQEEAKAKM0ICAACIGQQEgAnQiA3ENACAEIAE2AgBBACAGIANyNgKM0ICAACABIAQ2AhggASABNgIIIAEgATYCDAwBCyAAQQBBGSACQQF2ayACQR9GG3QhAiAEKAIAIQYCQANAIAYiBCgCBEF4cSAARg0BIAJBHXYhBiACQQF0IQIgBCAGQQRxakEQaiIDKAIAIgYNAAsgAyABNgIAIAEgBDYCGCABIAE2AgwgASABNgIIDAELIAQoAggiACABNgIMIAQgATYCCCABQQA2AhggASAENgIMIAEgADYCCAtBAEEAKAKo0ICAAEF/aiIBQX8gARs2AqjQgIAACwsEAAAAC04AAkAgAA0APwBBEHQPCwJAIABB//8DcQ0AIABBf0wNAAJAIABBEHZAACIAQX9HDQBBAEEwNgL404CAAEF/DwsgAEEQdA8LEMqAgIAAAAvyAgIDfwF+AkAgAkUNACAAIAE6AAAgAiAAaiIDQX9qIAE6AAAgAkEDSQ0AIAAgAToAAiAAIAE6AAEgA0F9aiABOgAAIANBfmogAToAACACQQdJDQAgACABOgADIANBfGogAToAACACQQlJDQAgAEEAIABrQQNxIgRqIgMgAUH/AXFBgYKECGwiATYCACADIAIgBGtBfHEiBGoiAkF8aiABNgIAIARBCUkNACADIAE2AgggAyABNgIEIAJBeGogATYCACACQXRqIAE2AgAgBEEZSQ0AIAMgATYCGCADIAE2AhQgAyABNgIQIAMgATYCDCACQXBqIAE2AgAgAkFsaiABNgIAIAJBaGogATYCACACQWRqIAE2AgAgBCADQQRxQRhyIgVrIgJBIEkNACABrUKBgICAEH4hBiADIAVqIQEDQCABIAY3AxggASAGNwMQIAEgBjcDCCABI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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAAAAACAAAAAAAAAAAAAAAAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==' diff --git a/action/node_modules/undici/lib/llhttp/llhttp_simd.wasm b/action/node_modules/undici/lib/llhttp/llhttp_simd.wasm index a569ef99..7aa0b55f 100755 Binary files a/action/node_modules/undici/lib/llhttp/llhttp_simd.wasm and b/action/node_modules/undici/lib/llhttp/llhttp_simd.wasm differ diff --git a/action/node_modules/undici/lib/llhttp/llhttp_simd.wasm.js b/action/node_modules/undici/lib/llhttp/llhttp_simd.wasm.js deleted file mode 100644 index 83a9ac9b..00000000 --- a/action/node_modules/undici/lib/llhttp/llhttp_simd.wasm.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'AGFzbQEAAAABMAhgAX8Bf2ADf39/A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IgMNACAAKAIMDwsgACADNgIcQQAhAyAAKAIEIgFFDQAgACABIAIgACgCCBGBgICAAAAiAUUNACAAIAI2AhQgACABNgIMIAEhAwsgAwvTzgEDHH8DfgV/I4CAgIAAQRBrIgMkgICAgAAgASEEIAEhBSABIQYgASEHIAEhCCABIQkgASEKIAEhCyABIQwgASENIAEhDiABIQ8gASEQIAEhESABIRIgASETIAEhFCABIRUgASEWIAEhFyABIRggASEZIAEhGiABIRsgASEcIAEhHQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAAoAhwiHkF/ag68AbcBAbYBAgMEBQYHCAkKCwwNDg8QwAG/ARESE7UBFBUWFxgZGr0BvAEbHB0eHyAhtAGzASIjsgGxASQlJicoKSorLC0uLzAxMjM0NTY3ODk6uAE7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AAYEBggGDAYQBhQGGAYcBiAGJAYoBiwGMAY0BjgGPAZABkQGSAZMBlAGVAZYBlwGYAZkBmgGbAZwBnQGeAZ8BoAGhAaIBowGkAaUBpgGnAagBqQGqAasBrAGt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AbUBtQG1AbUBAbUBCyAIQQFqIQFB2AAhHgySAgsgCEEBaiEBQdsAIR4MkQILQe0AIR4gASIiIAJGDaACIAIgImsgACgCACImaiEjICIhCCAmIQECQANAIAgtAAAgAUGAs4CAAGotAABHDbMBIAFBAkYNASABQQFqIQEgCEEBaiIIIAJHDQALIAAgIzYCAAyhAgtBACEeIABBADYCACAiICZrQQNqIQEMsAELQe4AIR4gASIiIAJGDZ8CIAIgImsgACgCACImaiEjICIhCCAmIQECQANAIAgtAAAgAUGDs4CAAGotAABHDbIBIAFBBEYNASABQQFqIQEgCEEBaiIIIAJHDQALIAAgIzYCAAygAgsgAEEANgIAICIgJmtBBWohAUEjIR4MrwELAkAgASIIIAJHDQBB7wAhHgyfAgsCQAJAIAgtAABBtH9qDggAsgGyAbIBsgGyAbIBAbIBCyAIQQFqIQFB3QAhHgyPAgsgCEEBaiEBQd4AIR4MjgILAkAgASIIIAJHDQBB8AAhHgyeAgsgCC0AAEHFAEcNrwEgCEEBaiEBDN4BC0HxACEeIAEiIiACRg2cAiACICJrIAAoAgAiJmohIyAiIQggJiEBAkADQCAILQAAIAFBiLOAgABqLQAARw2vASABQQNGDQEgAUEBaiEBIAhBAWoiCCACRw0ACyAAICM2AgAMnQILIABBADYCACAiICZrQQRqIQFBLSEeDKwBC0HyACEeIAEiIiACRg2bAiACICJrIAAoAgAiJmohIyAiIQggJiEBAkADQCAILQAAIAFB0LOAgABqLQAARw2uASABQQhGDQEgAUEBaiEBIAhBAWoiCCACRw0ACyAAICM2AgAMnAILIABBADYCACAiICZrQQlqIQFBKSEeDKsBCwJAIAEiASACRw0AQfMAIR4MmwILQQEhHiABLQAAQd8ARw2qASABQQFqIQEM3AELQfQAIR4gASIiIAJGDZkCIAIgImsgACgCACImaiEjICIhCCAmIQEDQCAILQAAIAFBjLOAgABqLQAARw2rASABQQFGDfcBIAFBAWohASAIQQFqIgggAkcNAAsgACAjNgIADJkCCwJAIAEiHiACRw0AQfUAIR4MmQILIAIgHms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UxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRU9SRElSRUNUT1JUUkNIUEFSQU1FVEVSVVJDRUJTQ1JJQkVBUkRPV05BQ0VJTkROS0NLVUJTQ1JJQkVIVFRQL0FEVFAv' diff --git a/action/node_modules/undici/lib/llhttp/wasm_build_env.txt b/action/node_modules/undici/lib/llhttp/wasm_build_env.txt new file mode 100644 index 00000000..5f478b52 --- /dev/null +++ b/action/node_modules/undici/lib/llhttp/wasm_build_env.txt @@ -0,0 +1,32 @@ +alpine-baselayout-data-3.4.0-r0 +musl-1.2.3-r4 +busybox-1.35.0-r29 +busybox-binsh-1.35.0-r29 +alpine-baselayout-3.4.0-r0 +alpine-keys-2.4-r1 +ca-certificates-bundle-20220614-r4 +libcrypto3-3.0.8-r3 +libssl3-3.0.8-r3 +ssl_client-1.35.0-r29 +zlib-1.2.13-r0 +apk-tools-2.12.10-r1 +scanelf-1.3.5-r1 +musl-utils-1.2.3-r4 +libc-utils-0.7.2-r3 +libgcc-12.2.1_git20220924-r4 +libstdc++-12.2.1_git20220924-r4 +libffi-3.4.4-r0 +xz-libs-5.2.9-r0 +libxml2-2.10.4-r0 +zstd-libs-1.5.5-r0 +llvm15-libs-15.0.7-r0 +clang15-libs-15.0.7-r0 +libstdc++-dev-12.2.1_git20220924-r4 +clang15-15.0.7-r0 +lld-libs-15.0.7-r0 +lld-15.0.7-r0 +wasi-libc-0.20220525-r1 +wasi-libcxx-15.0.7-r0 +wasi-libcxxabi-15.0.7-r0 +wasi-compiler-rt-15.0.7-r0 +wasi-sdk-16-r0 diff --git a/action/node_modules/undici/lib/mock/mock-utils.js b/action/node_modules/undici/lib/mock/mock-utils.js index 7d5ca507..42ea185c 100644 --- a/action/node_modules/undici/lib/mock/mock-utils.js +++ b/action/node_modules/undici/lib/mock/mock-utils.js @@ -10,6 +10,11 @@ const { } = require('./mock-symbols') const { buildURL, nop } = require('../core/util') const { STATUS_CODES } = require('http') +const { + types: { + isPromise + } +} = require('util') function matchValue (match, value) { if (typeof match === 'string') { @@ -183,7 +188,11 @@ function buildKey (opts) { } function generateKeyValues (data) { - return Object.entries(data).reduce((keyValuePairs, [key, value]) => [...keyValuePairs, key, value], []) + return Object.entries(data).reduce((keyValuePairs, [key, value]) => [ + ...keyValuePairs, + Buffer.from(`${key}`), + Array.isArray(value) ? value.map(x => Buffer.from(`${x}`)) : Buffer.from(`${value}`) + ], []) } /** @@ -241,14 +250,27 @@ function mockDispatch (opts, handler) { handleReply(this[kDispatches]) } - function handleReply (mockDispatches) { + function handleReply (mockDispatches, _data = data) { // fetch's HeadersList is a 1D string array const optsHeaders = Array.isArray(opts.headers) ? buildHeadersFromArray(opts.headers) : opts.headers - const responseData = getResponseData( - typeof data === 'function' ? data({ ...opts, headers: optsHeaders }) : data - ) + const body = typeof _data === 'function' + ? _data({ ...opts, headers: optsHeaders }) + : _data + + // util.types.isPromise is likely needed for jest. + if (isPromise(body)) { + // If handleReply is asynchronous, throwing an error + // in the callback will reject the promise, rather than + // synchronously throw the error, which breaks some tests. + // Rather, we wait for the callback to resolve if it is a + // promise, and then re-run handleReply with the new body. + body.then((newData) => handleReply(mockDispatches, newData)) + return + } + + const responseData = getResponseData(body) const responseHeaders = generateKeyValues(headers) const responseTrailers = generateKeyValues(trailers) diff --git a/action/node_modules/undici/lib/pool.js b/action/node_modules/undici/lib/pool.js index c1c20dd6..e3cd3399 100644 --- a/action/node_modules/undici/lib/pool.js +++ b/action/node_modules/undici/lib/pool.js @@ -32,6 +32,9 @@ class Pool extends PoolBase { tls, maxCachedSessions, socketPath, + autoSelectFamily, + autoSelectFamilyAttemptTimeout, + allowH2, ...options } = {}) { super() @@ -52,8 +55,10 @@ class Pool extends PoolBase { connect = buildConnector({ ...tls, maxCachedSessions, + allowH2, socketPath, - timeout: connectTimeout == null ? 10e3 : connectTimeout, + timeout: connectTimeout, + ...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), ...connect }) } @@ -63,7 +68,7 @@ class Pool extends PoolBase { : [] this[kConnections] = connections || null this[kUrl] = util.parseOrigin(origin) - this[kOptions] = { ...util.deepClone(options), connect } + this[kOptions] = { ...util.deepClone(options), connect, allowH2 } this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : undefined diff --git a/action/node_modules/undici/lib/proxy-agent.js b/action/node_modules/undici/lib/proxy-agent.js index 716a950f..e3c0f6f3 100644 --- a/action/node_modules/undici/lib/proxy-agent.js +++ b/action/node_modules/undici/lib/proxy-agent.js @@ -3,7 +3,7 @@ const { kProxy, kClose, kDestroy, kInterceptors } = require('./core/symbols') const { URL } = require('url') const Agent = require('./agent') -const Client = require('./client') +const Pool = require('./pool') const DispatcherBase = require('./dispatcher-base') const { InvalidArgumentError, RequestAbortedError } = require('./core/errors') const buildConnector = require('./core/connect') @@ -34,6 +34,10 @@ function buildProxyOptions (opts) { } } +function defaultFactory (origin, opts) { + return new Pool(origin, opts) +} + class ProxyAgent extends DispatcherBase { constructor (opts) { super(opts) @@ -51,20 +55,33 @@ class ProxyAgent extends DispatcherBase { throw new InvalidArgumentError('Proxy opts.uri is mandatory') } + const { clientFactory = defaultFactory } = opts + + if (typeof clientFactory !== 'function') { + throw new InvalidArgumentError('Proxy opts.clientFactory must be a function.') + } + this[kRequestTls] = opts.requestTls this[kProxyTls] = opts.proxyTls - this[kProxyHeaders] = {} + this[kProxyHeaders] = opts.headers || {} - if (opts.auth) { + const resolvedUrl = new URL(opts.uri) + const { origin, port, host, username, password } = resolvedUrl + + if (opts.auth && opts.token) { + throw new InvalidArgumentError('opts.auth cannot be used in combination with opts.token') + } else if (opts.auth) { + /* @deprecated in favour of opts.token */ this[kProxyHeaders]['proxy-authorization'] = `Basic ${opts.auth}` + } else if (opts.token) { + this[kProxyHeaders]['proxy-authorization'] = opts.token + } else if (username && password) { + this[kProxyHeaders]['proxy-authorization'] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString('base64')}` } - const resolvedUrl = new URL(opts.uri) - const { origin, port, host } = resolvedUrl - const connect = buildConnector({ ...opts.proxyTls }) this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }) - this[kClient] = new Client(resolvedUrl, { connect }) + this[kClient] = clientFactory(resolvedUrl, { connect }) this[kAgent] = new Agent({ ...opts, connect: async (opts, callback) => { @@ -85,7 +102,7 @@ class ProxyAgent extends DispatcherBase { }) if (statusCode !== 200) { socket.on('error', () => {}).destroy() - callback(new RequestAbortedError('Proxy response !== 200 when HTTP Tunneling')) + callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)) } if (opts.protocol !== 'https:') { callback(null, socket) diff --git a/action/node_modules/undici/lib/timers.js b/action/node_modules/undici/lib/timers.js new file mode 100644 index 00000000..5782217a --- /dev/null +++ b/action/node_modules/undici/lib/timers.js @@ -0,0 +1,97 @@ +'use strict' + +let fastNow = Date.now() +let fastNowTimeout + +const fastTimers = [] + +function onTimeout () { + fastNow = Date.now() + + let len = fastTimers.length + let idx = 0 + while (idx < len) { + const timer = fastTimers[idx] + + if (timer.state === 0) { + timer.state = fastNow + timer.delay + } else if (timer.state > 0 && fastNow >= timer.state) { + timer.state = -1 + timer.callback(timer.opaque) + } + + if (timer.state === -1) { + timer.state = -2 + if (idx !== len - 1) { + fastTimers[idx] = fastTimers.pop() + } else { + fastTimers.pop() + } + len -= 1 + } else { + idx += 1 + } + } + + if (fastTimers.length > 0) { + refreshTimeout() + } +} + +function refreshTimeout () { + if (fastNowTimeout && fastNowTimeout.refresh) { + fastNowTimeout.refresh() + } else { + clearTimeout(fastNowTimeout) + fastNowTimeout = setTimeout(onTimeout, 1e3) + if (fastNowTimeout.unref) { + fastNowTimeout.unref() + } + } +} + +class Timeout { + constructor (callback, delay, opaque) { + this.callback = callback + this.delay = delay + this.opaque = opaque + + // -2 not in timer list + // -1 in timer list but inactive + // 0 in timer list waiting for time + // > 0 in timer list waiting for time to expire + this.state = -2 + + this.refresh() + } + + refresh () { + if (this.state === -2) { + fastTimers.push(this) + if (!fastNowTimeout || fastTimers.length === 1) { + refreshTimeout() + } + } + + this.state = 0 + } + + clear () { + this.state = -1 + } +} + +module.exports = { + setTimeout (callback, delay, opaque) { + return delay < 1e3 + ? setTimeout(callback, delay, opaque) + : new Timeout(callback, delay, opaque) + }, + clearTimeout (timeout) { + if (timeout instanceof Timeout) { + timeout.clear() + } else { + clearTimeout(timeout) + } + } +} diff --git a/action/node_modules/undici/lib/websocket/connection.js b/action/node_modules/undici/lib/websocket/connection.js new file mode 100644 index 00000000..e0fa6972 --- /dev/null +++ b/action/node_modules/undici/lib/websocket/connection.js @@ -0,0 +1,291 @@ +'use strict' + +const diagnosticsChannel = require('diagnostics_channel') +const { uid, states } = require('./constants') +const { + kReadyState, + kSentClose, + kByteParser, + kReceivedClose +} = require('./symbols') +const { fireEvent, failWebsocketConnection } = require('./util') +const { CloseEvent } = require('./events') +const { makeRequest } = require('../fetch/request') +const { fetching } = require('../fetch/index') +const { Headers } = require('../fetch/headers') +const { getGlobalDispatcher } = require('../global') +const { kHeadersList } = require('../core/symbols') + +const channels = {} +channels.open = diagnosticsChannel.channel('undici:websocket:open') +channels.close = diagnosticsChannel.channel('undici:websocket:close') +channels.socketError = diagnosticsChannel.channel('undici:websocket:socket_error') + +/** @type {import('crypto')} */ +let crypto +try { + crypto = require('crypto') +} catch { + +} + +/** + * @see https://websockets.spec.whatwg.org/#concept-websocket-establish + * @param {URL} url + * @param {string|string[]} protocols + * @param {import('./websocket').WebSocket} ws + * @param {(response: any) => void} onEstablish + * @param {Partial} options + */ +function establishWebSocketConnection (url, protocols, ws, onEstablish, options) { + // 1. Let requestURL be a copy of url, with its scheme set to "http", if url’s + // scheme is "ws", and to "https" otherwise. + const requestURL = url + + requestURL.protocol = url.protocol === 'ws:' ? 'http:' : 'https:' + + // 2. Let request be a new request, whose URL is requestURL, client is client, + // service-workers mode is "none", referrer is "no-referrer", mode is + // "websocket", credentials mode is "include", cache mode is "no-store" , + // and redirect mode is "error". + const request = makeRequest({ + urlList: [requestURL], + serviceWorkers: 'none', + referrer: 'no-referrer', + mode: 'websocket', + credentials: 'include', + cache: 'no-store', + redirect: 'error' + }) + + // Note: undici extension, allow setting custom headers. + if (options.headers) { + const headersList = new Headers(options.headers)[kHeadersList] + + request.headersList = headersList + } + + // 3. Append (`Upgrade`, `websocket`) to request’s header list. + // 4. Append (`Connection`, `Upgrade`) to request’s header list. + // Note: both of these are handled by undici currently. + // https://github.com/nodejs/undici/blob/68c269c4144c446f3f1220951338daef4a6b5ec4/lib/client.js#L1397 + + // 5. Let keyValue be a nonce consisting of a randomly selected + // 16-byte value that has been forgiving-base64-encoded and + // isomorphic encoded. + const keyValue = crypto.randomBytes(16).toString('base64') + + // 6. Append (`Sec-WebSocket-Key`, keyValue) to request’s + // header list. + request.headersList.append('sec-websocket-key', keyValue) + + // 7. Append (`Sec-WebSocket-Version`, `13`) to request’s + // header list. + request.headersList.append('sec-websocket-version', '13') + + // 8. For each protocol in protocols, combine + // (`Sec-WebSocket-Protocol`, protocol) in request’s header + // list. + for (const protocol of protocols) { + request.headersList.append('sec-websocket-protocol', protocol) + } + + // 9. Let permessageDeflate be a user-agent defined + // "permessage-deflate" extension header value. + // https://github.com/mozilla/gecko-dev/blob/ce78234f5e653a5d3916813ff990f053510227bc/netwerk/protocol/websocket/WebSocketChannel.cpp#L2673 + // TODO: enable once permessage-deflate is supported + const permessageDeflate = '' // 'permessage-deflate; 15' + + // 10. Append (`Sec-WebSocket-Extensions`, permessageDeflate) to + // request’s header list. + // request.headersList.append('sec-websocket-extensions', permessageDeflate) + + // 11. Fetch request with useParallelQueue set to true, and + // processResponse given response being these steps: + const controller = fetching({ + request, + useParallelQueue: true, + dispatcher: options.dispatcher ?? getGlobalDispatcher(), + processResponse (response) { + // 1. If response is a network error or its status is not 101, + // fail the WebSocket connection. + if (response.type === 'error' || response.status !== 101) { + failWebsocketConnection(ws, 'Received network error or non-101 status code.') + return + } + + // 2. If protocols is not the empty list and extracting header + // list values given `Sec-WebSocket-Protocol` and response’s + // header list results in null, failure, or the empty byte + // sequence, then fail the WebSocket connection. + if (protocols.length !== 0 && !response.headersList.get('Sec-WebSocket-Protocol')) { + failWebsocketConnection(ws, 'Server did not respond with sent protocols.') + return + } + + // 3. Follow the requirements stated step 2 to step 6, inclusive, + // of the last set of steps in section 4.1 of The WebSocket + // Protocol to validate response. This either results in fail + // the WebSocket connection or the WebSocket connection is + // established. + + // 2. If the response lacks an |Upgrade| header field or the |Upgrade| + // header field contains a value that is not an ASCII case- + // insensitive match for the value "websocket", the client MUST + // _Fail the WebSocket Connection_. + if (response.headersList.get('Upgrade')?.toLowerCase() !== 'websocket') { + failWebsocketConnection(ws, 'Server did not set Upgrade header to "websocket".') + return + } + + // 3. If the response lacks a |Connection| header field or the + // |Connection| header field doesn't contain a token that is an + // ASCII case-insensitive match for the value "Upgrade", the client + // MUST _Fail the WebSocket Connection_. + if (response.headersList.get('Connection')?.toLowerCase() !== 'upgrade') { + failWebsocketConnection(ws, 'Server did not set Connection header to "upgrade".') + return + } + + // 4. If the response lacks a |Sec-WebSocket-Accept| header field or + // the |Sec-WebSocket-Accept| contains a value other than the + // base64-encoded SHA-1 of the concatenation of the |Sec-WebSocket- + // Key| (as a string, not base64-decoded) with the string "258EAFA5- + // E914-47DA-95CA-C5AB0DC85B11" but ignoring any leading and + // trailing whitespace, the client MUST _Fail the WebSocket + // Connection_. + const secWSAccept = response.headersList.get('Sec-WebSocket-Accept') + const digest = crypto.createHash('sha1').update(keyValue + uid).digest('base64') + if (secWSAccept !== digest) { + failWebsocketConnection(ws, 'Incorrect hash received in Sec-WebSocket-Accept header.') + return + } + + // 5. If the response includes a |Sec-WebSocket-Extensions| header + // field and this header field indicates the use of an extension + // that was not present in the client's handshake (the server has + // indicated an extension not requested by the client), the client + // MUST _Fail the WebSocket Connection_. (The parsing of this + // header field to determine which extensions are requested is + // discussed in Section 9.1.) + const secExtension = response.headersList.get('Sec-WebSocket-Extensions') + + if (secExtension !== null && secExtension !== permessageDeflate) { + failWebsocketConnection(ws, 'Received different permessage-deflate than the one set.') + return + } + + // 6. If the response includes a |Sec-WebSocket-Protocol| header field + // and this header field indicates the use of a subprotocol that was + // not present in the client's handshake (the server has indicated a + // subprotocol not requested by the client), the client MUST _Fail + // the WebSocket Connection_. + const secProtocol = response.headersList.get('Sec-WebSocket-Protocol') + + if (secProtocol !== null && secProtocol !== request.headersList.get('Sec-WebSocket-Protocol')) { + failWebsocketConnection(ws, 'Protocol was not set in the opening handshake.') + return + } + + response.socket.on('data', onSocketData) + response.socket.on('close', onSocketClose) + response.socket.on('error', onSocketError) + + if (channels.open.hasSubscribers) { + channels.open.publish({ + address: response.socket.address(), + protocol: secProtocol, + extensions: secExtension + }) + } + + onEstablish(response) + } + }) + + return controller +} + +/** + * @param {Buffer} chunk + */ +function onSocketData (chunk) { + if (!this.ws[kByteParser].write(chunk)) { + this.pause() + } +} + +/** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4 + */ +function onSocketClose () { + const { ws } = this + + // If the TCP connection was closed after the + // WebSocket closing handshake was completed, the WebSocket connection + // is said to have been closed _cleanly_. + const wasClean = ws[kSentClose] && ws[kReceivedClose] + + let code = 1005 + let reason = '' + + const result = ws[kByteParser].closingInfo + + if (result) { + code = result.code ?? 1005 + reason = result.reason + } else if (!ws[kSentClose]) { + // If _The WebSocket + // Connection is Closed_ and no Close control frame was received by the + // endpoint (such as could occur if the underlying transport connection + // is lost), _The WebSocket Connection Close Code_ is considered to be + // 1006. + code = 1006 + } + + // 1. Change the ready state to CLOSED (3). + ws[kReadyState] = states.CLOSED + + // 2. If the user agent was required to fail the WebSocket + // connection, or if the WebSocket connection was closed + // after being flagged as full, fire an event named error + // at the WebSocket object. + // TODO + + // 3. Fire an event named close at the WebSocket object, + // using CloseEvent, with the wasClean attribute + // initialized to true if the connection closed cleanly + // and false otherwise, the code attribute initialized to + // the WebSocket connection close code, and the reason + // attribute initialized to the result of applying UTF-8 + // decode without BOM to the WebSocket connection close + // reason. + fireEvent('close', ws, CloseEvent, { + wasClean, code, reason + }) + + if (channels.close.hasSubscribers) { + channels.close.publish({ + websocket: ws, + code, + reason + }) + } +} + +function onSocketError (error) { + const { ws } = this + + ws[kReadyState] = states.CLOSING + + if (channels.socketError.hasSubscribers) { + channels.socketError.publish(error) + } + + this.destroy() +} + +module.exports = { + establishWebSocketConnection +} diff --git a/action/node_modules/undici/lib/websocket/constants.js b/action/node_modules/undici/lib/websocket/constants.js new file mode 100644 index 00000000..406b8e3e --- /dev/null +++ b/action/node_modules/undici/lib/websocket/constants.js @@ -0,0 +1,51 @@ +'use strict' + +// This is a Globally Unique Identifier unique used +// to validate that the endpoint accepts websocket +// connections. +// See https://www.rfc-editor.org/rfc/rfc6455.html#section-1.3 +const uid = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11' + +/** @type {PropertyDescriptor} */ +const staticPropertyDescriptors = { + enumerable: true, + writable: false, + configurable: false +} + +const states = { + CONNECTING: 0, + OPEN: 1, + CLOSING: 2, + CLOSED: 3 +} + +const opcodes = { + CONTINUATION: 0x0, + TEXT: 0x1, + BINARY: 0x2, + CLOSE: 0x8, + PING: 0x9, + PONG: 0xA +} + +const maxUnsigned16Bit = 2 ** 16 - 1 // 65535 + +const parserStates = { + INFO: 0, + PAYLOADLENGTH_16: 2, + PAYLOADLENGTH_64: 3, + READ_DATA: 4 +} + +const emptyBuffer = Buffer.allocUnsafe(0) + +module.exports = { + uid, + staticPropertyDescriptors, + states, + opcodes, + maxUnsigned16Bit, + parserStates, + emptyBuffer +} diff --git a/action/node_modules/undici/lib/websocket/events.js b/action/node_modules/undici/lib/websocket/events.js new file mode 100644 index 00000000..621a2263 --- /dev/null +++ b/action/node_modules/undici/lib/websocket/events.js @@ -0,0 +1,303 @@ +'use strict' + +const { webidl } = require('../fetch/webidl') +const { kEnumerableProperty } = require('../core/util') +const { MessagePort } = require('worker_threads') + +/** + * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent + */ +class MessageEvent extends Event { + #eventInit + + constructor (type, eventInitDict = {}) { + webidl.argumentLengthCheck(arguments, 1, { header: 'MessageEvent constructor' }) + + type = webidl.converters.DOMString(type) + eventInitDict = webidl.converters.MessageEventInit(eventInitDict) + + super(type, eventInitDict) + + this.#eventInit = eventInitDict + } + + get data () { + webidl.brandCheck(this, MessageEvent) + + return this.#eventInit.data + } + + get origin () { + webidl.brandCheck(this, MessageEvent) + + return this.#eventInit.origin + } + + get lastEventId () { + webidl.brandCheck(this, MessageEvent) + + return this.#eventInit.lastEventId + } + + get source () { + webidl.brandCheck(this, MessageEvent) + + return this.#eventInit.source + } + + get ports () { + webidl.brandCheck(this, MessageEvent) + + if (!Object.isFrozen(this.#eventInit.ports)) { + Object.freeze(this.#eventInit.ports) + } + + return this.#eventInit.ports + } + + initMessageEvent ( + type, + bubbles = false, + cancelable = false, + data = null, + origin = '', + lastEventId = '', + source = null, + ports = [] + ) { + webidl.brandCheck(this, MessageEvent) + + webidl.argumentLengthCheck(arguments, 1, { header: 'MessageEvent.initMessageEvent' }) + + return new MessageEvent(type, { + bubbles, cancelable, data, origin, lastEventId, source, ports + }) + } +} + +/** + * @see https://websockets.spec.whatwg.org/#the-closeevent-interface + */ +class CloseEvent extends Event { + #eventInit + + constructor (type, eventInitDict = {}) { + webidl.argumentLengthCheck(arguments, 1, { header: 'CloseEvent constructor' }) + + type = webidl.converters.DOMString(type) + eventInitDict = webidl.converters.CloseEventInit(eventInitDict) + + super(type, eventInitDict) + + this.#eventInit = eventInitDict + } + + get wasClean () { + webidl.brandCheck(this, CloseEvent) + + return this.#eventInit.wasClean + } + + get code () { + webidl.brandCheck(this, CloseEvent) + + return this.#eventInit.code + } + + get reason () { + webidl.brandCheck(this, CloseEvent) + + return this.#eventInit.reason + } +} + +// https://html.spec.whatwg.org/multipage/webappapis.html#the-errorevent-interface +class ErrorEvent extends Event { + #eventInit + + constructor (type, eventInitDict) { + webidl.argumentLengthCheck(arguments, 1, { header: 'ErrorEvent constructor' }) + + super(type, eventInitDict) + + type = webidl.converters.DOMString(type) + eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}) + + this.#eventInit = eventInitDict + } + + get message () { + webidl.brandCheck(this, ErrorEvent) + + return this.#eventInit.message + } + + get filename () { + webidl.brandCheck(this, ErrorEvent) + + return this.#eventInit.filename + } + + get lineno () { + webidl.brandCheck(this, ErrorEvent) + + return this.#eventInit.lineno + } + + get colno () { + webidl.brandCheck(this, ErrorEvent) + + return this.#eventInit.colno + } + + get error () { + webidl.brandCheck(this, ErrorEvent) + + return this.#eventInit.error + } +} + +Object.defineProperties(MessageEvent.prototype, { + [Symbol.toStringTag]: { + value: 'MessageEvent', + configurable: true + }, + data: kEnumerableProperty, + origin: kEnumerableProperty, + lastEventId: kEnumerableProperty, + source: kEnumerableProperty, + ports: kEnumerableProperty, + initMessageEvent: kEnumerableProperty +}) + +Object.defineProperties(CloseEvent.prototype, { + [Symbol.toStringTag]: { + value: 'CloseEvent', + configurable: true + }, + reason: kEnumerableProperty, + code: kEnumerableProperty, + wasClean: kEnumerableProperty +}) + +Object.defineProperties(ErrorEvent.prototype, { + [Symbol.toStringTag]: { + value: 'ErrorEvent', + configurable: true + }, + message: kEnumerableProperty, + filename: kEnumerableProperty, + lineno: kEnumerableProperty, + colno: kEnumerableProperty, + error: kEnumerableProperty +}) + +webidl.converters.MessagePort = webidl.interfaceConverter(MessagePort) + +webidl.converters['sequence'] = webidl.sequenceConverter( + webidl.converters.MessagePort +) + +const eventInit = [ + { + key: 'bubbles', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'cancelable', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'composed', + converter: webidl.converters.boolean, + defaultValue: false + } +] + +webidl.converters.MessageEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: 'data', + converter: webidl.converters.any, + defaultValue: null + }, + { + key: 'origin', + converter: webidl.converters.USVString, + defaultValue: '' + }, + { + key: 'lastEventId', + converter: webidl.converters.DOMString, + defaultValue: '' + }, + { + key: 'source', + // Node doesn't implement WindowProxy or ServiceWorker, so the only + // valid value for source is a MessagePort. + converter: webidl.nullableConverter(webidl.converters.MessagePort), + defaultValue: null + }, + { + key: 'ports', + converter: webidl.converters['sequence'], + get defaultValue () { + return [] + } + } +]) + +webidl.converters.CloseEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: 'wasClean', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'code', + converter: webidl.converters['unsigned short'], + defaultValue: 0 + }, + { + key: 'reason', + converter: webidl.converters.USVString, + defaultValue: '' + } +]) + +webidl.converters.ErrorEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: 'message', + converter: webidl.converters.DOMString, + defaultValue: '' + }, + { + key: 'filename', + converter: webidl.converters.USVString, + defaultValue: '' + }, + { + key: 'lineno', + converter: webidl.converters['unsigned long'], + defaultValue: 0 + }, + { + key: 'colno', + converter: webidl.converters['unsigned long'], + defaultValue: 0 + }, + { + key: 'error', + converter: webidl.converters.any + } +]) + +module.exports = { + MessageEvent, + CloseEvent, + ErrorEvent +} diff --git a/action/node_modules/undici/lib/websocket/frame.js b/action/node_modules/undici/lib/websocket/frame.js new file mode 100644 index 00000000..d867ad11 --- /dev/null +++ b/action/node_modules/undici/lib/websocket/frame.js @@ -0,0 +1,73 @@ +'use strict' + +const { maxUnsigned16Bit } = require('./constants') + +/** @type {import('crypto')} */ +let crypto +try { + crypto = require('crypto') +} catch { + +} + +class WebsocketFrameSend { + /** + * @param {Buffer|undefined} data + */ + constructor (data) { + this.frameData = data + this.maskKey = crypto.randomBytes(4) + } + + createFrame (opcode) { + const bodyLength = this.frameData?.byteLength ?? 0 + + /** @type {number} */ + let payloadLength = bodyLength // 0-125 + let offset = 6 + + if (bodyLength > maxUnsigned16Bit) { + offset += 8 // payload length is next 8 bytes + payloadLength = 127 + } else if (bodyLength > 125) { + offset += 2 // payload length is next 2 bytes + payloadLength = 126 + } + + const buffer = Buffer.allocUnsafe(bodyLength + offset) + + // Clear first 2 bytes, everything else is overwritten + buffer[0] = buffer[1] = 0 + buffer[0] |= 0x80 // FIN + buffer[0] = (buffer[0] & 0xF0) + opcode // opcode + + /*! ws. MIT License. Einar Otto Stangvik */ + buffer[offset - 4] = this.maskKey[0] + buffer[offset - 3] = this.maskKey[1] + buffer[offset - 2] = this.maskKey[2] + buffer[offset - 1] = this.maskKey[3] + + buffer[1] = payloadLength + + if (payloadLength === 126) { + buffer.writeUInt16BE(bodyLength, 2) + } else if (payloadLength === 127) { + // Clear extended payload length + buffer[2] = buffer[3] = 0 + buffer.writeUIntBE(bodyLength, 4, 6) + } + + buffer[1] |= 0x80 // MASK + + // mask body + for (let i = 0; i < bodyLength; i++) { + buffer[offset + i] = this.frameData[i] ^ this.maskKey[i % 4] + } + + return buffer + } +} + +module.exports = { + WebsocketFrameSend +} diff --git a/action/node_modules/undici/lib/websocket/receiver.js b/action/node_modules/undici/lib/websocket/receiver.js new file mode 100644 index 00000000..bdd2031b --- /dev/null +++ b/action/node_modules/undici/lib/websocket/receiver.js @@ -0,0 +1,344 @@ +'use strict' + +const { Writable } = require('stream') +const diagnosticsChannel = require('diagnostics_channel') +const { parserStates, opcodes, states, emptyBuffer } = require('./constants') +const { kReadyState, kSentClose, kResponse, kReceivedClose } = require('./symbols') +const { isValidStatusCode, failWebsocketConnection, websocketMessageReceived } = require('./util') +const { WebsocketFrameSend } = require('./frame') + +// This code was influenced by ws released under the MIT license. +// Copyright (c) 2011 Einar Otto Stangvik +// Copyright (c) 2013 Arnout Kazemier and contributors +// Copyright (c) 2016 Luigi Pinca and contributors + +const channels = {} +channels.ping = diagnosticsChannel.channel('undici:websocket:ping') +channels.pong = diagnosticsChannel.channel('undici:websocket:pong') + +class ByteParser extends Writable { + #buffers = [] + #byteOffset = 0 + + #state = parserStates.INFO + + #info = {} + #fragments = [] + + constructor (ws) { + super() + + this.ws = ws + } + + /** + * @param {Buffer} chunk + * @param {() => void} callback + */ + _write (chunk, _, callback) { + this.#buffers.push(chunk) + this.#byteOffset += chunk.length + + this.run(callback) + } + + /** + * Runs whenever a new chunk is received. + * Callback is called whenever there are no more chunks buffering, + * or not enough bytes are buffered to parse. + */ + run (callback) { + while (true) { + if (this.#state === parserStates.INFO) { + // If there aren't enough bytes to parse the payload length, etc. + if (this.#byteOffset < 2) { + return callback() + } + + const buffer = this.consume(2) + + this.#info.fin = (buffer[0] & 0x80) !== 0 + this.#info.opcode = buffer[0] & 0x0F + + // If we receive a fragmented message, we use the type of the first + // frame to parse the full message as binary/text, when it's terminated + this.#info.originalOpcode ??= this.#info.opcode + + this.#info.fragmented = !this.#info.fin && this.#info.opcode !== opcodes.CONTINUATION + + if (this.#info.fragmented && this.#info.opcode !== opcodes.BINARY && this.#info.opcode !== opcodes.TEXT) { + // Only text and binary frames can be fragmented + failWebsocketConnection(this.ws, 'Invalid frame type was fragmented.') + return + } + + const payloadLength = buffer[1] & 0x7F + + if (payloadLength <= 125) { + this.#info.payloadLength = payloadLength + this.#state = parserStates.READ_DATA + } else if (payloadLength === 126) { + this.#state = parserStates.PAYLOADLENGTH_16 + } else if (payloadLength === 127) { + this.#state = parserStates.PAYLOADLENGTH_64 + } + + if (this.#info.fragmented && payloadLength > 125) { + // A fragmented frame can't be fragmented itself + failWebsocketConnection(this.ws, 'Fragmented frame exceeded 125 bytes.') + return + } else if ( + (this.#info.opcode === opcodes.PING || + this.#info.opcode === opcodes.PONG || + this.#info.opcode === opcodes.CLOSE) && + payloadLength > 125 + ) { + // Control frames can have a payload length of 125 bytes MAX + failWebsocketConnection(this.ws, 'Payload length for control frame exceeded 125 bytes.') + return + } else if (this.#info.opcode === opcodes.CLOSE) { + if (payloadLength === 1) { + failWebsocketConnection(this.ws, 'Received close frame with a 1-byte body.') + return + } + + const body = this.consume(payloadLength) + + this.#info.closeInfo = this.parseCloseBody(false, body) + + if (!this.ws[kSentClose]) { + // If an endpoint receives a Close frame and did not previously send a + // Close frame, the endpoint MUST send a Close frame in response. (When + // sending a Close frame in response, the endpoint typically echos the + // status code it received.) + const body = Buffer.allocUnsafe(2) + body.writeUInt16BE(this.#info.closeInfo.code, 0) + const closeFrame = new WebsocketFrameSend(body) + + this.ws[kResponse].socket.write( + closeFrame.createFrame(opcodes.CLOSE), + (err) => { + if (!err) { + this.ws[kSentClose] = true + } + } + ) + } + + // Upon either sending or receiving a Close control frame, it is said + // that _The WebSocket Closing Handshake is Started_ and that the + // WebSocket connection is in the CLOSING state. + this.ws[kReadyState] = states.CLOSING + this.ws[kReceivedClose] = true + + this.end() + + return + } else if (this.#info.opcode === opcodes.PING) { + // Upon receipt of a Ping frame, an endpoint MUST send a Pong frame in + // response, unless it already received a Close frame. + // A Pong frame sent in response to a Ping frame must have identical + // "Application data" + + const body = this.consume(payloadLength) + + if (!this.ws[kReceivedClose]) { + const frame = new WebsocketFrameSend(body) + + this.ws[kResponse].socket.write(frame.createFrame(opcodes.PONG)) + + if (channels.ping.hasSubscribers) { + channels.ping.publish({ + payload: body + }) + } + } + + this.#state = parserStates.INFO + + if (this.#byteOffset > 0) { + continue + } else { + callback() + return + } + } else if (this.#info.opcode === opcodes.PONG) { + // A Pong frame MAY be sent unsolicited. This serves as a + // unidirectional heartbeat. A response to an unsolicited Pong frame is + // not expected. + + const body = this.consume(payloadLength) + + if (channels.pong.hasSubscribers) { + channels.pong.publish({ + payload: body + }) + } + + if (this.#byteOffset > 0) { + continue + } else { + callback() + return + } + } + } else if (this.#state === parserStates.PAYLOADLENGTH_16) { + if (this.#byteOffset < 2) { + return callback() + } + + const buffer = this.consume(2) + + this.#info.payloadLength = buffer.readUInt16BE(0) + this.#state = parserStates.READ_DATA + } else if (this.#state === parserStates.PAYLOADLENGTH_64) { + if (this.#byteOffset < 8) { + return callback() + } + + const buffer = this.consume(8) + const upper = buffer.readUInt32BE(0) + + // 2^31 is the maxinimum bytes an arraybuffer can contain + // on 32-bit systems. Although, on 64-bit systems, this is + // 2^53-1 bytes. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length + // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/common/globals.h;drc=1946212ac0100668f14eb9e2843bdd846e510a1e;bpv=1;bpt=1;l=1275 + // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/js-array-buffer.h;l=34;drc=1946212ac0100668f14eb9e2843bdd846e510a1e + if (upper > 2 ** 31 - 1) { + failWebsocketConnection(this.ws, 'Received payload length > 2^31 bytes.') + return + } + + const lower = buffer.readUInt32BE(4) + + this.#info.payloadLength = (upper << 8) + lower + this.#state = parserStates.READ_DATA + } else if (this.#state === parserStates.READ_DATA) { + if (this.#byteOffset < this.#info.payloadLength) { + // If there is still more data in this chunk that needs to be read + return callback() + } else if (this.#byteOffset >= this.#info.payloadLength) { + // If the server sent multiple frames in a single chunk + + const body = this.consume(this.#info.payloadLength) + + this.#fragments.push(body) + + // If the frame is unfragmented, or a fragmented frame was terminated, + // a message was received + if (!this.#info.fragmented || (this.#info.fin && this.#info.opcode === opcodes.CONTINUATION)) { + const fullMessage = Buffer.concat(this.#fragments) + + websocketMessageReceived(this.ws, this.#info.originalOpcode, fullMessage) + + this.#info = {} + this.#fragments.length = 0 + } + + this.#state = parserStates.INFO + } + } + + if (this.#byteOffset > 0) { + continue + } else { + callback() + break + } + } + } + + /** + * Take n bytes from the buffered Buffers + * @param {number} n + * @returns {Buffer|null} + */ + consume (n) { + if (n > this.#byteOffset) { + return null + } else if (n === 0) { + return emptyBuffer + } + + if (this.#buffers[0].length === n) { + this.#byteOffset -= this.#buffers[0].length + return this.#buffers.shift() + } + + const buffer = Buffer.allocUnsafe(n) + let offset = 0 + + while (offset !== n) { + const next = this.#buffers[0] + const { length } = next + + if (length + offset === n) { + buffer.set(this.#buffers.shift(), offset) + break + } else if (length + offset > n) { + buffer.set(next.subarray(0, n - offset), offset) + this.#buffers[0] = next.subarray(n - offset) + break + } else { + buffer.set(this.#buffers.shift(), offset) + offset += next.length + } + } + + this.#byteOffset -= n + + return buffer + } + + parseCloseBody (onlyCode, data) { + // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5 + /** @type {number|undefined} */ + let code + + if (data.length >= 2) { + // _The WebSocket Connection Close Code_ is + // defined as the status code (Section 7.4) contained in the first Close + // control frame received by the application + code = data.readUInt16BE(0) + } + + if (onlyCode) { + if (!isValidStatusCode(code)) { + return null + } + + return { code } + } + + // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.6 + /** @type {Buffer} */ + let reason = data.subarray(2) + + // Remove BOM + if (reason[0] === 0xEF && reason[1] === 0xBB && reason[2] === 0xBF) { + reason = reason.subarray(3) + } + + if (code !== undefined && !isValidStatusCode(code)) { + return null + } + + try { + // TODO: optimize this + reason = new TextDecoder('utf-8', { fatal: true }).decode(reason) + } catch { + return null + } + + return { code, reason } + } + + get closingInfo () { + return this.#info.closeInfo + } +} + +module.exports = { + ByteParser +} diff --git a/action/node_modules/undici/lib/websocket/symbols.js b/action/node_modules/undici/lib/websocket/symbols.js new file mode 100644 index 00000000..11d03e38 --- /dev/null +++ b/action/node_modules/undici/lib/websocket/symbols.js @@ -0,0 +1,12 @@ +'use strict' + +module.exports = { + kWebSocketURL: Symbol('url'), + kReadyState: Symbol('ready state'), + kController: Symbol('controller'), + kResponse: Symbol('response'), + kBinaryType: Symbol('binary type'), + kSentClose: Symbol('sent close'), + kReceivedClose: Symbol('received close'), + kByteParser: Symbol('byte parser') +} diff --git a/action/node_modules/undici/lib/websocket/util.js b/action/node_modules/undici/lib/websocket/util.js new file mode 100644 index 00000000..6c59b2c2 --- /dev/null +++ b/action/node_modules/undici/lib/websocket/util.js @@ -0,0 +1,200 @@ +'use strict' + +const { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = require('./symbols') +const { states, opcodes } = require('./constants') +const { MessageEvent, ErrorEvent } = require('./events') + +/* globals Blob */ + +/** + * @param {import('./websocket').WebSocket} ws + */ +function isEstablished (ws) { + // If the server's response is validated as provided for above, it is + // said that _The WebSocket Connection is Established_ and that the + // WebSocket Connection is in the OPEN state. + return ws[kReadyState] === states.OPEN +} + +/** + * @param {import('./websocket').WebSocket} ws + */ +function isClosing (ws) { + // Upon either sending or receiving a Close control frame, it is said + // that _The WebSocket Closing Handshake is Started_ and that the + // WebSocket connection is in the CLOSING state. + return ws[kReadyState] === states.CLOSING +} + +/** + * @param {import('./websocket').WebSocket} ws + */ +function isClosed (ws) { + return ws[kReadyState] === states.CLOSED +} + +/** + * @see https://dom.spec.whatwg.org/#concept-event-fire + * @param {string} e + * @param {EventTarget} target + * @param {EventInit | undefined} eventInitDict + */ +function fireEvent (e, target, eventConstructor = Event, eventInitDict) { + // 1. If eventConstructor is not given, then let eventConstructor be Event. + + // 2. Let event be the result of creating an event given eventConstructor, + // in the relevant realm of target. + // 3. Initialize event’s type attribute to e. + const event = new eventConstructor(e, eventInitDict) // eslint-disable-line new-cap + + // 4. Initialize any other IDL attributes of event as described in the + // invocation of this algorithm. + + // 5. Return the result of dispatching event at target, with legacy target + // override flag set if set. + target.dispatchEvent(event) +} + +/** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + * @param {import('./websocket').WebSocket} ws + * @param {number} type Opcode + * @param {Buffer} data application data + */ +function websocketMessageReceived (ws, type, data) { + // 1. If ready state is not OPEN (1), then return. + if (ws[kReadyState] !== states.OPEN) { + return + } + + // 2. Let dataForEvent be determined by switching on type and binary type: + let dataForEvent + + if (type === opcodes.TEXT) { + // -> type indicates that the data is Text + // a new DOMString containing data + try { + dataForEvent = new TextDecoder('utf-8', { fatal: true }).decode(data) + } catch { + failWebsocketConnection(ws, 'Received invalid UTF-8 in text frame.') + return + } + } else if (type === opcodes.BINARY) { + if (ws[kBinaryType] === 'blob') { + // -> type indicates that the data is Binary and binary type is "blob" + // a new Blob object, created in the relevant Realm of the WebSocket + // object, that represents data as its raw data + dataForEvent = new Blob([data]) + } else { + // -> type indicates that the data is Binary and binary type is "arraybuffer" + // a new ArrayBuffer object, created in the relevant Realm of the + // WebSocket object, whose contents are data + dataForEvent = new Uint8Array(data).buffer + } + } + + // 3. Fire an event named message at the WebSocket object, using MessageEvent, + // with the origin attribute initialized to the serialization of the WebSocket + // object’s url's origin, and the data attribute initialized to dataForEvent. + fireEvent('message', ws, MessageEvent, { + origin: ws[kWebSocketURL].origin, + data: dataForEvent + }) +} + +/** + * @see https://datatracker.ietf.org/doc/html/rfc6455 + * @see https://datatracker.ietf.org/doc/html/rfc2616 + * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407 + * @param {string} protocol + */ +function isValidSubprotocol (protocol) { + // If present, this value indicates one + // or more comma-separated subprotocol the client wishes to speak, + // ordered by preference. The elements that comprise this value + // MUST be non-empty strings with characters in the range U+0021 to + // U+007E not including separator characters as defined in + // [RFC2616] and MUST all be unique strings. + if (protocol.length === 0) { + return false + } + + for (const char of protocol) { + const code = char.charCodeAt(0) + + if ( + code < 0x21 || + code > 0x7E || + char === '(' || + char === ')' || + char === '<' || + char === '>' || + char === '@' || + char === ',' || + char === ';' || + char === ':' || + char === '\\' || + char === '"' || + char === '/' || + char === '[' || + char === ']' || + char === '?' || + char === '=' || + char === '{' || + char === '}' || + code === 32 || // SP + code === 9 // HT + ) { + return false + } + } + + return true +} + +/** + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4 + * @param {number} code + */ +function isValidStatusCode (code) { + if (code >= 1000 && code < 1015) { + return ( + code !== 1004 && // reserved + code !== 1005 && // "MUST NOT be set as a status code" + code !== 1006 // "MUST NOT be set as a status code" + ) + } + + return code >= 3000 && code <= 4999 +} + +/** + * @param {import('./websocket').WebSocket} ws + * @param {string|undefined} reason + */ +function failWebsocketConnection (ws, reason) { + const { [kController]: controller, [kResponse]: response } = ws + + controller.abort() + + if (response?.socket && !response.socket.destroyed) { + response.socket.destroy() + } + + if (reason) { + fireEvent('error', ws, ErrorEvent, { + error: new Error(reason) + }) + } +} + +module.exports = { + isEstablished, + isClosing, + isClosed, + fireEvent, + isValidSubprotocol, + isValidStatusCode, + failWebsocketConnection, + websocketMessageReceived +} diff --git a/action/node_modules/undici/lib/websocket/websocket.js b/action/node_modules/undici/lib/websocket/websocket.js new file mode 100644 index 00000000..e4aa58f5 --- /dev/null +++ b/action/node_modules/undici/lib/websocket/websocket.js @@ -0,0 +1,641 @@ +'use strict' + +const { webidl } = require('../fetch/webidl') +const { DOMException } = require('../fetch/constants') +const { URLSerializer } = require('../fetch/dataURL') +const { getGlobalOrigin } = require('../fetch/global') +const { staticPropertyDescriptors, states, opcodes, emptyBuffer } = require('./constants') +const { + kWebSocketURL, + kReadyState, + kController, + kBinaryType, + kResponse, + kSentClose, + kByteParser +} = require('./symbols') +const { isEstablished, isClosing, isValidSubprotocol, failWebsocketConnection, fireEvent } = require('./util') +const { establishWebSocketConnection } = require('./connection') +const { WebsocketFrameSend } = require('./frame') +const { ByteParser } = require('./receiver') +const { kEnumerableProperty, isBlobLike } = require('../core/util') +const { getGlobalDispatcher } = require('../global') +const { types } = require('util') + +let experimentalWarned = false + +// https://websockets.spec.whatwg.org/#interface-definition +class WebSocket extends EventTarget { + #events = { + open: null, + error: null, + close: null, + message: null + } + + #bufferedAmount = 0 + #protocol = '' + #extensions = '' + + /** + * @param {string} url + * @param {string|string[]} protocols + */ + constructor (url, protocols = []) { + super() + + webidl.argumentLengthCheck(arguments, 1, { header: 'WebSocket constructor' }) + + if (!experimentalWarned) { + experimentalWarned = true + process.emitWarning('WebSockets are experimental, expect them to change at any time.', { + code: 'UNDICI-WS' + }) + } + + const options = webidl.converters['DOMString or sequence or WebSocketInit'](protocols) + + url = webidl.converters.USVString(url) + protocols = options.protocols + + // 1. Let baseURL be this's relevant settings object's API base URL. + const baseURL = getGlobalOrigin() + + // 1. Let urlRecord be the result of applying the URL parser to url with baseURL. + let urlRecord + + try { + urlRecord = new URL(url, baseURL) + } catch (e) { + // 3. If urlRecord is failure, then throw a "SyntaxError" DOMException. + throw new DOMException(e, 'SyntaxError') + } + + // 4. If urlRecord’s scheme is "http", then set urlRecord’s scheme to "ws". + if (urlRecord.protocol === 'http:') { + urlRecord.protocol = 'ws:' + } else if (urlRecord.protocol === 'https:') { + // 5. Otherwise, if urlRecord’s scheme is "https", set urlRecord’s scheme to "wss". + urlRecord.protocol = 'wss:' + } + + // 6. If urlRecord’s scheme is not "ws" or "wss", then throw a "SyntaxError" DOMException. + if (urlRecord.protocol !== 'ws:' && urlRecord.protocol !== 'wss:') { + throw new DOMException( + `Expected a ws: or wss: protocol, got ${urlRecord.protocol}`, + 'SyntaxError' + ) + } + + // 7. If urlRecord’s fragment is non-null, then throw a "SyntaxError" + // DOMException. + if (urlRecord.hash || urlRecord.href.endsWith('#')) { + throw new DOMException('Got fragment', 'SyntaxError') + } + + // 8. If protocols is a string, set protocols to a sequence consisting + // of just that string. + if (typeof protocols === 'string') { + protocols = [protocols] + } + + // 9. If any of the values in protocols occur more than once or otherwise + // fail to match the requirements for elements that comprise the value + // of `Sec-WebSocket-Protocol` fields as defined by The WebSocket + // protocol, then throw a "SyntaxError" DOMException. + if (protocols.length !== new Set(protocols.map(p => p.toLowerCase())).size) { + throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError') + } + + if (protocols.length > 0 && !protocols.every(p => isValidSubprotocol(p))) { + throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError') + } + + // 10. Set this's url to urlRecord. + this[kWebSocketURL] = new URL(urlRecord.href) + + // 11. Let client be this's relevant settings object. + + // 12. Run this step in parallel: + + // 1. Establish a WebSocket connection given urlRecord, protocols, + // and client. + this[kController] = establishWebSocketConnection( + urlRecord, + protocols, + this, + (response) => this.#onConnectionEstablished(response), + options + ) + + // Each WebSocket object has an associated ready state, which is a + // number representing the state of the connection. Initially it must + // be CONNECTING (0). + this[kReadyState] = WebSocket.CONNECTING + + // The extensions attribute must initially return the empty string. + + // The protocol attribute must initially return the empty string. + + // Each WebSocket object has an associated binary type, which is a + // BinaryType. Initially it must be "blob". + this[kBinaryType] = 'blob' + } + + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-close + * @param {number|undefined} code + * @param {string|undefined} reason + */ + close (code = undefined, reason = undefined) { + webidl.brandCheck(this, WebSocket) + + if (code !== undefined) { + code = webidl.converters['unsigned short'](code, { clamp: true }) + } + + if (reason !== undefined) { + reason = webidl.converters.USVString(reason) + } + + // 1. If code is present, but is neither an integer equal to 1000 nor an + // integer in the range 3000 to 4999, inclusive, throw an + // "InvalidAccessError" DOMException. + if (code !== undefined) { + if (code !== 1000 && (code < 3000 || code > 4999)) { + throw new DOMException('invalid code', 'InvalidAccessError') + } + } + + let reasonByteLength = 0 + + // 2. If reason is present, then run these substeps: + if (reason !== undefined) { + // 1. Let reasonBytes be the result of encoding reason. + // 2. If reasonBytes is longer than 123 bytes, then throw a + // "SyntaxError" DOMException. + reasonByteLength = Buffer.byteLength(reason) + + if (reasonByteLength > 123) { + throw new DOMException( + `Reason must be less than 123 bytes; received ${reasonByteLength}`, + 'SyntaxError' + ) + } + } + + // 3. Run the first matching steps from the following list: + if (this[kReadyState] === WebSocket.CLOSING || this[kReadyState] === WebSocket.CLOSED) { + // If this's ready state is CLOSING (2) or CLOSED (3) + // Do nothing. + } else if (!isEstablished(this)) { + // If the WebSocket connection is not yet established + // Fail the WebSocket connection and set this's ready state + // to CLOSING (2). + failWebsocketConnection(this, 'Connection was closed before it was established.') + this[kReadyState] = WebSocket.CLOSING + } else if (!isClosing(this)) { + // If the WebSocket closing handshake has not yet been started + // Start the WebSocket closing handshake and set this's ready + // state to CLOSING (2). + // - If neither code nor reason is present, the WebSocket Close + // message must not have a body. + // - If code is present, then the status code to use in the + // WebSocket Close message must be the integer given by code. + // - If reason is also present, then reasonBytes must be + // provided in the Close message after the status code. + + const frame = new WebsocketFrameSend() + + // If neither code nor reason is present, the WebSocket Close + // message must not have a body. + + // If code is present, then the status code to use in the + // WebSocket Close message must be the integer given by code. + if (code !== undefined && reason === undefined) { + frame.frameData = Buffer.allocUnsafe(2) + frame.frameData.writeUInt16BE(code, 0) + } else if (code !== undefined && reason !== undefined) { + // If reason is also present, then reasonBytes must be + // provided in the Close message after the status code. + frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength) + frame.frameData.writeUInt16BE(code, 0) + // the body MAY contain UTF-8-encoded data with value /reason/ + frame.frameData.write(reason, 2, 'utf-8') + } else { + frame.frameData = emptyBuffer + } + + /** @type {import('stream').Duplex} */ + const socket = this[kResponse].socket + + socket.write(frame.createFrame(opcodes.CLOSE), (err) => { + if (!err) { + this[kSentClose] = true + } + }) + + // Upon either sending or receiving a Close control frame, it is said + // that _The WebSocket Closing Handshake is Started_ and that the + // WebSocket connection is in the CLOSING state. + this[kReadyState] = states.CLOSING + } else { + // Otherwise + // Set this's ready state to CLOSING (2). + this[kReadyState] = WebSocket.CLOSING + } + } + + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-send + * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data + */ + send (data) { + webidl.brandCheck(this, WebSocket) + + webidl.argumentLengthCheck(arguments, 1, { header: 'WebSocket.send' }) + + data = webidl.converters.WebSocketSendData(data) + + // 1. If this's ready state is CONNECTING, then throw an + // "InvalidStateError" DOMException. + if (this[kReadyState] === WebSocket.CONNECTING) { + throw new DOMException('Sent before connected.', 'InvalidStateError') + } + + // 2. Run the appropriate set of steps from the following list: + // https://datatracker.ietf.org/doc/html/rfc6455#section-6.1 + // https://datatracker.ietf.org/doc/html/rfc6455#section-5.2 + + if (!isEstablished(this) || isClosing(this)) { + return + } + + /** @type {import('stream').Duplex} */ + const socket = this[kResponse].socket + + // If data is a string + if (typeof data === 'string') { + // If the WebSocket connection is established and the WebSocket + // closing handshake has not yet started, then the user agent + // must send a WebSocket Message comprised of the data argument + // using a text frame opcode; if the data cannot be sent, e.g. + // because it would need to be buffered but the buffer is full, + // the user agent must flag the WebSocket as full and then close + // the WebSocket connection. Any invocation of this method with a + // string argument that does not throw an exception must increase + // the bufferedAmount attribute by the number of bytes needed to + // express the argument as UTF-8. + + const value = Buffer.from(data) + const frame = new WebsocketFrameSend(value) + const buffer = frame.createFrame(opcodes.TEXT) + + this.#bufferedAmount += value.byteLength + socket.write(buffer, () => { + this.#bufferedAmount -= value.byteLength + }) + } else if (types.isArrayBuffer(data)) { + // If the WebSocket connection is established, and the WebSocket + // closing handshake has not yet started, then the user agent must + // send a WebSocket Message comprised of data using a binary frame + // opcode; if the data cannot be sent, e.g. because it would need + // to be buffered but the buffer is full, the user agent must flag + // the WebSocket as full and then close the WebSocket connection. + // The data to be sent is the data stored in the buffer described + // by the ArrayBuffer object. Any invocation of this method with an + // ArrayBuffer argument that does not throw an exception must + // increase the bufferedAmount attribute by the length of the + // ArrayBuffer in bytes. + + const value = Buffer.from(data) + const frame = new WebsocketFrameSend(value) + const buffer = frame.createFrame(opcodes.BINARY) + + this.#bufferedAmount += value.byteLength + socket.write(buffer, () => { + this.#bufferedAmount -= value.byteLength + }) + } else if (ArrayBuffer.isView(data)) { + // If the WebSocket connection is established, and the WebSocket + // closing handshake has not yet started, then the user agent must + // send a WebSocket Message comprised of data using a binary frame + // opcode; if the data cannot be sent, e.g. because it would need to + // be buffered but the buffer is full, the user agent must flag the + // WebSocket as full and then close the WebSocket connection. The + // data to be sent is the data stored in the section of the buffer + // described by the ArrayBuffer object that data references. Any + // invocation of this method with this kind of argument that does + // not throw an exception must increase the bufferedAmount attribute + // by the length of data’s buffer in bytes. + + const ab = Buffer.from(data, data.byteOffset, data.byteLength) + + const frame = new WebsocketFrameSend(ab) + const buffer = frame.createFrame(opcodes.BINARY) + + this.#bufferedAmount += ab.byteLength + socket.write(buffer, () => { + this.#bufferedAmount -= ab.byteLength + }) + } else if (isBlobLike(data)) { + // If the WebSocket connection is established, and the WebSocket + // closing handshake has not yet started, then the user agent must + // send a WebSocket Message comprised of data using a binary frame + // opcode; if the data cannot be sent, e.g. because it would need to + // be buffered but the buffer is full, the user agent must flag the + // WebSocket as full and then close the WebSocket connection. The data + // to be sent is the raw data represented by the Blob object. Any + // invocation of this method with a Blob argument that does not throw + // an exception must increase the bufferedAmount attribute by the size + // of the Blob object’s raw data, in bytes. + + const frame = new WebsocketFrameSend() + + data.arrayBuffer().then((ab) => { + const value = Buffer.from(ab) + frame.frameData = value + const buffer = frame.createFrame(opcodes.BINARY) + + this.#bufferedAmount += value.byteLength + socket.write(buffer, () => { + this.#bufferedAmount -= value.byteLength + }) + }) + } + } + + get readyState () { + webidl.brandCheck(this, WebSocket) + + // The readyState getter steps are to return this's ready state. + return this[kReadyState] + } + + get bufferedAmount () { + webidl.brandCheck(this, WebSocket) + + return this.#bufferedAmount + } + + get url () { + webidl.brandCheck(this, WebSocket) + + // The url getter steps are to return this's url, serialized. + return URLSerializer(this[kWebSocketURL]) + } + + get extensions () { + webidl.brandCheck(this, WebSocket) + + return this.#extensions + } + + get protocol () { + webidl.brandCheck(this, WebSocket) + + return this.#protocol + } + + get onopen () { + webidl.brandCheck(this, WebSocket) + + return this.#events.open + } + + set onopen (fn) { + webidl.brandCheck(this, WebSocket) + + if (this.#events.open) { + this.removeEventListener('open', this.#events.open) + } + + if (typeof fn === 'function') { + this.#events.open = fn + this.addEventListener('open', fn) + } else { + this.#events.open = null + } + } + + get onerror () { + webidl.brandCheck(this, WebSocket) + + return this.#events.error + } + + set onerror (fn) { + webidl.brandCheck(this, WebSocket) + + if (this.#events.error) { + this.removeEventListener('error', this.#events.error) + } + + if (typeof fn === 'function') { + this.#events.error = fn + this.addEventListener('error', fn) + } else { + this.#events.error = null + } + } + + get onclose () { + webidl.brandCheck(this, WebSocket) + + return this.#events.close + } + + set onclose (fn) { + webidl.brandCheck(this, WebSocket) + + if (this.#events.close) { + this.removeEventListener('close', this.#events.close) + } + + if (typeof fn === 'function') { + this.#events.close = fn + this.addEventListener('close', fn) + } else { + this.#events.close = null + } + } + + get onmessage () { + webidl.brandCheck(this, WebSocket) + + return this.#events.message + } + + set onmessage (fn) { + webidl.brandCheck(this, WebSocket) + + if (this.#events.message) { + this.removeEventListener('message', this.#events.message) + } + + if (typeof fn === 'function') { + this.#events.message = fn + this.addEventListener('message', fn) + } else { + this.#events.message = null + } + } + + get binaryType () { + webidl.brandCheck(this, WebSocket) + + return this[kBinaryType] + } + + set binaryType (type) { + webidl.brandCheck(this, WebSocket) + + if (type !== 'blob' && type !== 'arraybuffer') { + this[kBinaryType] = 'blob' + } else { + this[kBinaryType] = type + } + } + + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + */ + #onConnectionEstablished (response) { + // processResponse is called when the "response’s header list has been received and initialized." + // once this happens, the connection is open + this[kResponse] = response + + const parser = new ByteParser(this) + parser.on('drain', function onParserDrain () { + this.ws[kResponse].socket.resume() + }) + + response.socket.ws = this + this[kByteParser] = parser + + // 1. Change the ready state to OPEN (1). + this[kReadyState] = states.OPEN + + // 2. Change the extensions attribute’s value to the extensions in use, if + // it is not the null value. + // https://datatracker.ietf.org/doc/html/rfc6455#section-9.1 + const extensions = response.headersList.get('sec-websocket-extensions') + + if (extensions !== null) { + this.#extensions = extensions + } + + // 3. Change the protocol attribute’s value to the subprotocol in use, if + // it is not the null value. + // https://datatracker.ietf.org/doc/html/rfc6455#section-1.9 + const protocol = response.headersList.get('sec-websocket-protocol') + + if (protocol !== null) { + this.#protocol = protocol + } + + // 4. Fire an event named open at the WebSocket object. + fireEvent('open', this) + } +} + +// https://websockets.spec.whatwg.org/#dom-websocket-connecting +WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING +// https://websockets.spec.whatwg.org/#dom-websocket-open +WebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN +// https://websockets.spec.whatwg.org/#dom-websocket-closing +WebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING +// https://websockets.spec.whatwg.org/#dom-websocket-closed +WebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED + +Object.defineProperties(WebSocket.prototype, { + CONNECTING: staticPropertyDescriptors, + OPEN: staticPropertyDescriptors, + CLOSING: staticPropertyDescriptors, + CLOSED: staticPropertyDescriptors, + url: kEnumerableProperty, + readyState: kEnumerableProperty, + bufferedAmount: kEnumerableProperty, + onopen: kEnumerableProperty, + onerror: kEnumerableProperty, + onclose: kEnumerableProperty, + close: kEnumerableProperty, + onmessage: kEnumerableProperty, + binaryType: kEnumerableProperty, + send: kEnumerableProperty, + extensions: kEnumerableProperty, + protocol: kEnumerableProperty, + [Symbol.toStringTag]: { + value: 'WebSocket', + writable: false, + enumerable: false, + configurable: true + } +}) + +Object.defineProperties(WebSocket, { + CONNECTING: staticPropertyDescriptors, + OPEN: staticPropertyDescriptors, + CLOSING: staticPropertyDescriptors, + CLOSED: staticPropertyDescriptors +}) + +webidl.converters['sequence'] = webidl.sequenceConverter( + webidl.converters.DOMString +) + +webidl.converters['DOMString or sequence'] = function (V) { + if (webidl.util.Type(V) === 'Object' && Symbol.iterator in V) { + return webidl.converters['sequence'](V) + } + + return webidl.converters.DOMString(V) +} + +// This implements the propsal made in https://github.com/whatwg/websockets/issues/42 +webidl.converters.WebSocketInit = webidl.dictionaryConverter([ + { + key: 'protocols', + converter: webidl.converters['DOMString or sequence'], + get defaultValue () { + return [] + } + }, + { + key: 'dispatcher', + converter: (V) => V, + get defaultValue () { + return getGlobalDispatcher() + } + }, + { + key: 'headers', + converter: webidl.nullableConverter(webidl.converters.HeadersInit) + } +]) + +webidl.converters['DOMString or sequence or WebSocketInit'] = function (V) { + if (webidl.util.Type(V) === 'Object' && !(Symbol.iterator in V)) { + return webidl.converters.WebSocketInit(V) + } + + return { protocols: webidl.converters['DOMString or sequence'](V) } +} + +webidl.converters.WebSocketSendData = function (V) { + if (webidl.util.Type(V) === 'Object') { + if (isBlobLike(V)) { + return webidl.converters.Blob(V, { strict: false }) + } + + if (ArrayBuffer.isView(V) || types.isAnyArrayBuffer(V)) { + return webidl.converters.BufferSource(V) + } + } + + return webidl.converters.USVString(V) +} + +module.exports = { + WebSocket +} diff --git a/action/node_modules/undici/package.json b/action/node_modules/undici/package.json index 823c48b8..65a2d983 100644 --- a/action/node_modules/undici/package.json +++ b/action/node_modules/undici/package.json @@ -1,6 +1,6 @@ { "name": "undici", - "version": "5.11.0", + "version": "5.28.4", "description": "An HTTP/1.1 client, written from scratch for Node.js", "homepage": "https://undici.nodejs.org", "bugs": { @@ -11,12 +11,41 @@ "url": "git+https://github.com/nodejs/undici.git" }, "license": "MIT", - "author": "Matteo Collina ", "contributors": [ + { + "name": "Daniele Belardi", + "url": "https://github.com/dnlup", + "author": true + }, + { + "name": "Ethan Arrowood", + "url": "https://github.com/ethan-arrowood", + "author": true + }, + { + "name": "Matteo Collina", + "url": "https://github.com/mcollina", + "author": true + }, + { + "name": "Matthew Aitken", + "url": "https://github.com/KhafraDev", + "author": true + }, { "name": "Robert Nagy", "url": "https://github.com/ronag", "author": true + }, + { + "name": "Szymon Marczak", + "url": "https://github.com/szmarczak", + "author": true + }, + { + "name": "Tomas Della Vedova", + "url": "https://github.com/delvedor", + "author": true } ], "keywords": [ @@ -41,64 +70,72 @@ "docs" ], "scripts": { - "build:node": "npx esbuild@0.14.38 index-fetch.js --bundle --platform=node --outfile=undici-fetch.js", - "prebuild:wasm": "docker build -t llhttp_wasm_builder -f build/Dockerfile .", + "build:node": "npx esbuild@0.19.4 index-fetch.js --bundle --platform=node --outfile=undici-fetch.js --define:esbuildDetection=1 --keep-names", + "prebuild:wasm": "node build/wasm.js --prebuild", "build:wasm": "node build/wasm.js --docker", "lint": "standard | snazzy", "lint:fix": "standard --fix | snazzy", - "test": "npm run test:tap && npm run test:node-fetch && npm run test:fetch && npm run test:wpt && npm run test:jest && tsd", - "test:node-fetch": "node scripts/verifyVersion.js 16 || mocha test/node-fetch", - "test:fetch": "node scripts/verifyVersion.js 16 || (npm run build:node && tap test/fetch/*.js && tap test/webidl/*.js)", + "test": "node scripts/generate-pem && npm run test:tap && npm run test:node-fetch && npm run test:fetch && npm run test:cookies && npm run test:wpt && npm run test:websocket && npm run test:jest && npm run test:typescript", + "test:cookies": "node scripts/verifyVersion 16 || tap test/cookie/*.js", + "test:node-fetch": "node scripts/verifyVersion.js 16 || mocha --exit test/node-fetch", + "test:fetch": "node scripts/verifyVersion.js 16 || (npm run build:node && tap --expose-gc test/fetch/*.js && tap test/webidl/*.js)", "test:jest": "node scripts/verifyVersion.js 14 || jest", "test:tap": "tap test/*.js test/diagnostics-channel/*.js", "test:tdd": "tap test/*.js test/diagnostics-channel/*.js -w", - "test:typescript": "tsd", - "test:wpt": "node scripts/verifyVersion 18 || node test/wpt/runner/start.mjs", + "test:typescript": "node scripts/verifyVersion.js 14 || tsd && tsc --skipLibCheck test/imports/undici-import.ts", + "test:websocket": "node scripts/verifyVersion.js 18 || tap test/websocket/*.js", + "test:wpt": "node scripts/verifyVersion 18 || (node test/wpt/start-fetch.mjs && node test/wpt/start-FileAPI.mjs && node test/wpt/start-mimesniff.mjs && node test/wpt/start-xhr.mjs && node test/wpt/start-websockets.mjs)", "coverage": "nyc --reporter=text --reporter=html npm run test", "coverage:ci": "nyc --reporter=lcov npm run test", "bench": "PORT=3042 concurrently -k -s first npm:bench:server npm:bench:run", "bench:server": "node benchmarks/server.js", "prebench:run": "node benchmarks/wait.js", - "bench:run": "CONNECTIONS=1 node --experimental-wasm-simd benchmarks/benchmark.js; CONNECTIONS=50 node --experimental-wasm-simd benchmarks/benchmark.js", + "bench:run": "CONNECTIONS=1 node benchmarks/benchmark.js; CONNECTIONS=50 node benchmarks/benchmark.js", "serve:website": "docsify serve .", "prepare": "husky install", "fuzz": "jsfuzz test/fuzzing/fuzz.js corpus" }, "devDependencies": { - "@sinonjs/fake-timers": "^9.1.2", - "@types/node": "^17.0.45", + "@sinonjs/fake-timers": "^11.1.0", + "@types/node": "^18.0.3", "abort-controller": "^3.0.0", "atomic-sleep": "^1.0.0", "chai": "^4.3.4", "chai-as-promised": "^7.1.1", "chai-iterator": "^3.0.2", "chai-string": "^1.5.0", - "concurrently": "^7.1.0", + "concurrently": "^8.0.1", "cronometro": "^1.0.5", "delay": "^5.0.0", + "dns-packet": "^5.4.0", "docsify-cli": "^4.4.3", + "form-data": "^4.0.0", "formdata-node": "^4.3.1", "https-pem": "^3.0.0", "husky": "^8.0.1", "import-fresh": "^3.3.0", "jest": "^29.0.2", + "jsdom": "^23.0.0", "jsfuzz": "^1.0.15", "mocha": "^10.0.0", + "mockttp": "^3.9.2", "p-timeout": "^3.2.0", "pre-commit": "^1.2.2", "proxy": "^1.0.2", "proxyquire": "^2.1.3", - "semver": "^7.3.5", - "sinon": "^14.0.0", + "semver": "^7.5.4", + "sinon": "^17.0.1", "snazzy": "^9.0.0", "standard": "^17.0.0", "table": "^6.8.0", "tap": "^16.1.0", - "tsd": "^0.24.1", - "wait-on": "^6.0.0" + "tsd": "^0.29.0", + "typescript": "^5.0.2", + "wait-on": "^7.0.1", + "ws": "^8.11.0" }, "engines": { - "node": ">=12.18" + "node": ">=14.0" }, "standard": { "env": [ @@ -107,8 +144,7 @@ "ignore": [ "lib/llhttp/constants.js", "lib/llhttp/utils.js", - "test/wpt/tests", - "test/wpt/runner/resources" + "test/wpt/tests" ] }, "tsd": { @@ -126,6 +162,6 @@ ] }, "dependencies": { - "busboy": "^1.6.0" + "@fastify/busboy": "^2.0.0" } } diff --git a/action/node_modules/undici/types/README.md b/action/node_modules/undici/types/README.md new file mode 100644 index 00000000..20a721c4 --- /dev/null +++ b/action/node_modules/undici/types/README.md @@ -0,0 +1,6 @@ +# undici-types + +This package is a dual-publish of the [undici](https://www.npmjs.com/package/undici) library types. The `undici` package **still contains types**. This package is for users who _only_ need undici types (such as for `@types/node`). It is published alongside every release of `undici`, so you can always use the same version. + +- [GitHub nodejs/undici](https://github.com/nodejs/undici) +- [Undici Documentation](https://undici.nodejs.org/#/) diff --git a/action/node_modules/undici/types/agent.d.ts b/action/node_modules/undici/types/agent.d.ts index c09260b2..58081ce9 100644 --- a/action/node_modules/undici/types/agent.d.ts +++ b/action/node_modules/undici/types/agent.d.ts @@ -1,9 +1,8 @@ import { URL } from 'url' -import Dispatcher = require('./dispatcher') -import Pool = require('./pool') -import {DispatchInterceptor} from "./dispatcher"; +import Pool from './pool' +import Dispatcher from "./dispatcher"; -export = Agent +export default Agent declare class Agent extends Dispatcher{ constructor(opts?: Agent.Options) @@ -18,11 +17,11 @@ declare class Agent extends Dispatcher{ declare namespace Agent { export interface Options extends Pool.Options { /** Default: `(origin, opts) => new Pool(origin, opts)`. */ - factory?(origin: URL, opts: Object): Dispatcher; + factory?(origin: string | URL, opts: Object): Dispatcher; /** Integer. Default: `0` */ maxRedirections?: number; - interceptors?: { Agent?: readonly DispatchInterceptor[] } & Pool.Options["interceptors"] + interceptors?: { Agent?: readonly Dispatcher.DispatchInterceptor[] } & Pool.Options["interceptors"] } export interface DispatchOptions extends Dispatcher.DispatchOptions { diff --git a/action/node_modules/undici/types/api.d.ts b/action/node_modules/undici/types/api.d.ts index 4bc3183e..400341dd 100644 --- a/action/node_modules/undici/types/api.d.ts +++ b/action/node_modules/undici/types/api.d.ts @@ -1,6 +1,6 @@ import { URL, UrlObject } from 'url' import { Duplex } from 'stream' -import Dispatcher = require('./dispatcher') +import Dispatcher from './dispatcher' export { request, diff --git a/action/node_modules/undici/types/balanced-pool.d.ts b/action/node_modules/undici/types/balanced-pool.d.ts index 5a765e15..d1e93758 100644 --- a/action/node_modules/undici/types/balanced-pool.d.ts +++ b/action/node_modules/undici/types/balanced-pool.d.ts @@ -1,15 +1,14 @@ -import Client = require('./client') -import Pool = require('./pool') -import Dispatcher = require('./dispatcher') +import Pool from './pool' +import Dispatcher from './dispatcher' import { URL } from 'url' -export = BalancedPool +export default BalancedPool declare class BalancedPool extends Dispatcher { - constructor(url: string | URL | string[], options?: Pool.Options); + constructor(url: string | string[] | URL | URL[], options?: Pool.Options); - addUpstream(upstream: string): BalancedPool; - removeUpstream(upstream: string): BalancedPool; + addUpstream(upstream: string | URL): BalancedPool; + removeUpstream(upstream: string | URL): BalancedPool; upstreams: Array; /** `true` after `pool.close()` has been called. */ diff --git a/action/node_modules/undici/types/cache.d.ts b/action/node_modules/undici/types/cache.d.ts new file mode 100644 index 00000000..4c333357 --- /dev/null +++ b/action/node_modules/undici/types/cache.d.ts @@ -0,0 +1,36 @@ +import type { RequestInfo, Response, Request } from './fetch' + +export interface CacheStorage { + match (request: RequestInfo, options?: MultiCacheQueryOptions): Promise, + has (cacheName: string): Promise, + open (cacheName: string): Promise, + delete (cacheName: string): Promise, + keys (): Promise +} + +declare const CacheStorage: { + prototype: CacheStorage + new(): CacheStorage +} + +export interface Cache { + match (request: RequestInfo, options?: CacheQueryOptions): Promise, + matchAll (request?: RequestInfo, options?: CacheQueryOptions): Promise, + add (request: RequestInfo): Promise, + addAll (requests: RequestInfo[]): Promise, + put (request: RequestInfo, response: Response): Promise, + delete (request: RequestInfo, options?: CacheQueryOptions): Promise, + keys (request?: RequestInfo, options?: CacheQueryOptions): Promise +} + +export interface CacheQueryOptions { + ignoreSearch?: boolean, + ignoreMethod?: boolean, + ignoreVary?: boolean +} + +export interface MultiCacheQueryOptions extends CacheQueryOptions { + cacheName?: string +} + +export declare const caches: CacheStorage diff --git a/action/node_modules/undici/types/client.d.ts b/action/node_modules/undici/types/client.d.ts index 4932ece3..56e78cc9 100644 --- a/action/node_modules/undici/types/client.d.ts +++ b/action/node_modules/undici/types/client.d.ts @@ -1,13 +1,12 @@ import { URL } from 'url' import { TlsOptions } from 'tls' -import Dispatcher = require('./dispatcher') -import {DispatchInterceptor} from './dispatcher' -import buildConnector, {connector} from "./connector"; +import Dispatcher from './dispatcher' +import buildConnector from "./connector"; -export = Client - -/** A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default. */ -declare class Client extends Dispatcher { +/** + * A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default. + */ +export class Client extends Dispatcher { constructor(url: string | URL, options?: Client.Options); /** Property to get and set the pipelining factor. */ pipelining: number; @@ -17,34 +16,72 @@ declare class Client extends Dispatcher { destroyed: boolean; } -declare namespace Client { +export declare namespace Client { + export interface OptionsInterceptors { + Client: readonly Dispatcher.DispatchInterceptor[]; + } export interface Options { - /** the timeout after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. Default: `4e3` milliseconds (4s). */ - keepAliveTimeout?: number | null; - /** the maximum allowed `idleTimeout` when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */ - keepAliveMaxTimeout?: number | null; - /** A number subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */ - keepAliveTimeoutThreshold?: number | null; + /** TODO */ + interceptors?: OptionsInterceptors; + /** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */ + maxHeaderSize?: number; + /** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). */ + headersTimeout?: number; + /** @deprecated unsupported socketTimeout, use headersTimeout & bodyTimeout instead */ + socketTimeout?: never; + /** @deprecated unsupported requestTimeout, use headersTimeout & bodyTimeout instead */ + requestTimeout?: never; + /** TODO */ + connectTimeout?: number; + /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). */ + bodyTimeout?: number; + /** @deprecated unsupported idleTimeout, use keepAliveTimeout instead */ + idleTimeout?: never; + /** @deprecated unsupported keepAlive, use pipelining=0 instead */ + keepAlive?: never; + /** the timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. Default: `4e3` milliseconds (4s). */ + keepAliveTimeout?: number; + /** @deprecated unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead */ + maxKeepAliveTimeout?: never; + /** the maximum allowed `idleTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */ + keepAliveMaxTimeout?: number; + /** A number of milliseconds subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */ + keepAliveTimeoutThreshold?: number; + /** TODO */ + socketPath?: string; /** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Default: `1`. */ - pipelining?: number | null; - /** **/ - connect?: buildConnector.BuildOptions | connector | null; - /** The maximum length of request headers in bytes. Default: `16384` (16KiB). */ - maxHeaderSize?: number | null; - /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `30e3` milliseconds (30s). */ - bodyTimeout?: number | null; - /** The amount of time the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `30e3` milliseconds (30s). */ - headersTimeout?: number | null; + pipelining?: number; + /** @deprecated use the connect option instead */ + tls?: never; /** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */ strictContentLength?: boolean; - /** @deprecated use the connect option instead */ - tls?: TlsOptions | null; - /** */ + /** TODO */ + maxCachedSessions?: number; + /** TODO */ + maxRedirections?: number; + /** TODO */ + connect?: buildConnector.BuildOptions | buildConnector.connector; + /** TODO */ maxRequestsPerClient?: number; - - interceptors?: {Client: readonly DispatchInterceptor[] | undefined} + /** TODO */ + localAddress?: string; + /** Max response body size in bytes, -1 is disabled */ + maxResponseSize?: number; + /** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */ + autoSelectFamily?: boolean; + /** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */ + autoSelectFamilyAttemptTimeout?: number; + /** + * @description Enables support for H2 if the server has assigned bigger priority to it through ALPN negotiation. + * @default false + */ + allowH2?: boolean; + /** + * @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame. + * @default 100 + */ + maxConcurrentStreams?: number } - export interface SocketInfo { localAddress?: string localPort?: number @@ -55,6 +92,6 @@ declare namespace Client { bytesWritten?: number bytesRead?: number } - - } + +export default Client; diff --git a/action/node_modules/undici/types/connector.d.ts b/action/node_modules/undici/types/connector.d.ts index 9a47f87e..bd924339 100644 --- a/action/node_modules/undici/types/connector.d.ts +++ b/action/node_modules/undici/types/connector.d.ts @@ -1,35 +1,34 @@ -import {TLSSocket, ConnectionOptions} from 'tls' -import {IpcNetConnectOpts, Socket, TcpNetConnectOpts} from 'net' +import { TLSSocket, ConnectionOptions } from 'tls' +import { IpcNetConnectOpts, Socket, TcpNetConnectOpts } from 'net' -export = buildConnector +export default buildConnector declare function buildConnector (options?: buildConnector.BuildOptions): buildConnector.connector declare namespace buildConnector { export type BuildOptions = (ConnectionOptions | TcpNetConnectOpts | IpcNetConnectOpts) & { + allowH2?: boolean; maxCachedSessions?: number | null; socketPath?: string | null; timeout?: number | null; port?: number; + keepAlive?: boolean | null; + keepAliveInitialDelay?: number | null; } export interface Options { hostname: string host?: string protocol: string - port: number + port: string servername?: string + localAddress?: string | null + httpSocket?: Socket } export type Callback = (...args: CallbackArgs) => void type CallbackArgs = [null, Socket | TLSSocket] | [Error, null] - export type connector = connectorAsync | connectorSync - - interface connectorSync { - (options: buildConnector.Options): Socket | TLSSocket - } - - interface connectorAsync { + export interface connector { (options: buildConnector.Options, callback: buildConnector.Callback): void } } diff --git a/action/node_modules/undici/types/content-type.d.ts b/action/node_modules/undici/types/content-type.d.ts new file mode 100644 index 00000000..f2a87f1b --- /dev/null +++ b/action/node_modules/undici/types/content-type.d.ts @@ -0,0 +1,21 @@ +/// + +interface MIMEType { + type: string + subtype: string + parameters: Map + essence: string +} + +/** + * Parse a string to a {@link MIMEType} object. Returns `failure` if the string + * couldn't be parsed. + * @see https://mimesniff.spec.whatwg.org/#parse-a-mime-type + */ +export function parseMIMEType (input: string): 'failure' | MIMEType + +/** + * Convert a MIMEType object to a string. + * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type + */ +export function serializeAMimeType (mimeType: MIMEType): string diff --git a/action/node_modules/undici/types/cookies.d.ts b/action/node_modules/undici/types/cookies.d.ts new file mode 100644 index 00000000..aa38cae4 --- /dev/null +++ b/action/node_modules/undici/types/cookies.d.ts @@ -0,0 +1,28 @@ +/// + +import type { Headers } from './fetch' + +export interface Cookie { + name: string + value: string + expires?: Date | number + maxAge?: number + domain?: string + path?: string + secure?: boolean + httpOnly?: boolean + sameSite?: 'Strict' | 'Lax' | 'None' + unparsed?: string[] +} + +export function deleteCookie ( + headers: Headers, + name: string, + attributes?: { name?: string, domain?: string } +): void + +export function getCookies (headers: Headers): Record + +export function getSetCookies (headers: Headers): Cookie[] + +export function setCookie (headers: Headers, cookie: Cookie): void diff --git a/action/node_modules/undici/types/diagnostics-channel.d.ts b/action/node_modules/undici/types/diagnostics-channel.d.ts index 6c754491..85d44823 100644 --- a/action/node_modules/undici/types/diagnostics-channel.d.ts +++ b/action/node_modules/undici/types/diagnostics-channel.d.ts @@ -1,13 +1,13 @@ import { Socket } from "net"; import { URL } from "url"; -import { connector } from "./connector"; -import { HttpMethod } from "./dispatcher"; +import Connector from "./connector"; +import Dispatcher from "./dispatcher"; declare namespace DiagnosticsChannel { interface Request { origin?: string | URL; completed: boolean; - method?: HttpMethod; + method?: Dispatcher.HttpMethod; path: string; headers: string; addHeader(key: string, value: string): Request; @@ -25,7 +25,7 @@ declare namespace DiagnosticsChannel { port: URL["port"]; servername: string | null; } - type Connector = connector; + type Connector = Connector.connector; export interface RequestCreateMessage { request: Request; } diff --git a/action/node_modules/undici/types/dispatcher.d.ts b/action/node_modules/undici/types/dispatcher.d.ts index cbd558a9..efc53eea 100644 --- a/action/node_modules/undici/types/dispatcher.d.ts +++ b/action/node_modules/undici/types/dispatcher.d.ts @@ -1,15 +1,15 @@ import { URL } from 'url' import { Duplex, Readable, Writable } from 'stream' import { EventEmitter } from 'events' -import { IncomingHttpHeaders } from 'http' import { Blob } from 'buffer' -import type BodyReadable from './readable' +import { IncomingHttpHeaders } from './header' +import BodyReadable from './readable' import { FormData } from './formdata' -import { UndiciError } from './errors' +import Errors from './errors' type AbortSignal = unknown; -export = Dispatcher; +export default Dispatcher /** Dispatcher is the core API used to dispatch requests. */ declare class Dispatcher extends EventEmitter { @@ -39,56 +39,56 @@ declare class Dispatcher extends EventEmitter { destroy(err: Error | null, callback: () => void): void; on(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this; - on(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: UndiciError) => void): this; - on(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: UndiciError) => void): this; + on(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this; + on(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this; on(eventName: 'drain', callback: (origin: URL) => void): this; once(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this; - once(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: UndiciError) => void): this; - once(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: UndiciError) => void): this; + once(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this; + once(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this; once(eventName: 'drain', callback: (origin: URL) => void): this; off(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this; - off(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: UndiciError) => void): this; - off(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: UndiciError) => void): this; + off(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this; + off(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this; off(eventName: 'drain', callback: (origin: URL) => void): this; addListener(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this; - addListener(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: UndiciError) => void): this; - addListener(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: UndiciError) => void): this; + addListener(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this; + addListener(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this; addListener(eventName: 'drain', callback: (origin: URL) => void): this; removeListener(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this; - removeListener(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: UndiciError) => void): this; - removeListener(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: UndiciError) => void): this; + removeListener(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this; + removeListener(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this; removeListener(eventName: 'drain', callback: (origin: URL) => void): this; prependListener(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this; - prependListener(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: UndiciError) => void): this; - prependListener(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: UndiciError) => void): this; + prependListener(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this; + prependListener(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this; prependListener(eventName: 'drain', callback: (origin: URL) => void): this; prependOnceListener(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this; - prependOnceListener(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: UndiciError) => void): this; - prependOnceListener(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: UndiciError) => void): this; + prependOnceListener(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this; + prependOnceListener(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this; prependOnceListener(eventName: 'drain', callback: (origin: URL) => void): this; listeners(eventName: 'connect'): ((origin: URL, targets: readonly Dispatcher[]) => void)[] - listeners(eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: UndiciError) => void)[]; - listeners(eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: UndiciError) => void)[]; + listeners(eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[]; + listeners(eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[]; listeners(eventName: 'drain'): ((origin: URL) => void)[]; rawListeners(eventName: 'connect'): ((origin: URL, targets: readonly Dispatcher[]) => void)[] - rawListeners(eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: UndiciError) => void)[]; - rawListeners(eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: UndiciError) => void)[]; + rawListeners(eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[]; + rawListeners(eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[]; rawListeners(eventName: 'drain'): ((origin: URL) => void)[]; emit(eventName: 'connect', origin: URL, targets: readonly Dispatcher[]): boolean; - emit(eventName: 'disconnect', origin: URL, targets: readonly Dispatcher[], error: UndiciError): boolean; - emit(eventName: 'connectionError', origin: URL, targets: readonly Dispatcher[], error: UndiciError): boolean; + emit(eventName: 'disconnect', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean; + emit(eventName: 'connectionError', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean; emit(eventName: 'drain', origin: URL): boolean; } @@ -105,14 +105,20 @@ declare namespace Dispatcher { query?: Record; /** Whether the requests can be safely retried or not. If `false` the request won't be sent until all preceding requests in the pipeline have completed. Default: `true` if `method` is `HEAD` or `GET`. */ idempotent?: boolean; + /** Whether the response is expected to take a long time and would end up blocking the pipeline. When this is set to `true` further pipelining will be avoided on the same connection until headers have been received. */ + blocking?: boolean; /** Upgrade the request. Should be used to specify the kind of upgrade i.e. `'Websocket'`. Default: `method === 'CONNECT' || null`. */ upgrade?: boolean | string | null; - /** The amount of time the parser will wait to receive the complete HTTP headers. Defaults to 30 seconds. */ + /** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers. Defaults to 300 seconds. */ headersTimeout?: number | null; - /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use 0 to disable it entirely. Defaults to 30 seconds. */ + /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use 0 to disable it entirely. Defaults to 300 seconds. */ bodyTimeout?: number | null; + /** Whether the request should stablish a keep-alive or not. Default `false` */ + reset?: boolean; /** Whether Undici should throw an error upon receiving a 4xx or 5xx response from the server. Defaults to false */ throwOnError?: boolean; + /** For H2, it appends the expect: 100-continue header, and halts the request body until a 100-continue is received from the remote server*/ + expectContinue?: boolean; } export interface ConnectOptions { path: string; @@ -138,6 +144,8 @@ declare namespace Dispatcher { onInfo?: (info: { statusCode: number, headers: Record }) => void; /** Default: `null` */ responseHeader?: 'raw' | null; + /** Default: `64 KiB` */ + highWaterMark?: number; } export interface PipelineOptions extends RequestOptions { /** `true` if the `handler` will return an object stream. Default: `false` */ @@ -203,7 +211,7 @@ declare namespace Dispatcher { /** Invoked when request is upgraded either due to a `Upgrade` header or `CONNECT` method. */ onUpgrade?(statusCode: number, headers: Buffer[] | string[] | null, socket: Duplex): void; /** Invoked when statusCode and headers have been received. May be invoked multiple times due to 1xx informational headers. */ - onHeaders?(statusCode: number, headers: Buffer[] | string[] | null, resume: () => void): boolean; + onHeaders?(statusCode: number, headers: Buffer[] | string[] | null, resume: () => void, statusText: string): boolean; /** Invoked when response payload data is received. */ onData?(chunk: Buffer): boolean; /** Invoked when response payload and trailers have been received and the request has completed. */ @@ -223,7 +231,7 @@ declare namespace Dispatcher { arrayBuffer(): Promise; blob(): Promise; formData(): Promise; - json(): Promise; + json(): Promise; text(): Promise; } diff --git a/action/node_modules/undici/types/errors.d.ts b/action/node_modules/undici/types/errors.d.ts index ab0ecc80..7923ddd9 100644 --- a/action/node_modules/undici/types/errors.d.ts +++ b/action/node_modules/undici/types/errors.d.ts @@ -1,10 +1,19 @@ -import {IncomingHttpHeaders} from "http"; +import { IncomingHttpHeaders } from "./header"; +import Client from './client' -export = Errors -import { SocketInfo } from './client' +export default Errors declare namespace Errors { - export class UndiciError extends Error { } + export class UndiciError extends Error { + name: string; + code: string; + } + + /** Connect timeout error. */ + export class ConnectTimeoutError extends UndiciError { + name: 'ConnectTimeoutError'; + code: 'UND_ERR_CONNECT_TIMEOUT'; + } /** A header exceeds the `headersTimeout` option. */ export class HeadersTimeoutError extends UndiciError { @@ -12,6 +21,12 @@ declare namespace Errors { code: 'UND_ERR_HEADERS_TIMEOUT'; } + /** Headers overflow error. */ + export class HeadersOverflowError extends UndiciError { + name: 'HeadersOverflowError' + code: 'UND_ERR_HEADERS_OVERFLOW' + } + /** A body exceeds the `bodyTimeout` option. */ export class BodyTimeoutError extends UndiciError { name: 'BodyTimeoutError'; @@ -19,6 +34,12 @@ declare namespace Errors { } export class ResponseStatusCodeError extends UndiciError { + constructor ( + message?: string, + statusCode?: number, + headers?: IncomingHttpHeaders | string[] | null, + body?: null | Record | string + ); name: 'ResponseStatusCodeError'; code: 'UND_ERR_RESPONSE_STATUS_CODE'; body: null | Record | string @@ -27,12 +48,6 @@ declare namespace Errors { headers: IncomingHttpHeaders | string[] | null; } - /** A socket exceeds the `socketTimeout` option. */ - export class SocketTimeoutError extends UndiciError { - name: 'SocketTimeoutError'; - code: 'UND_ERR_SOCKET_TIMEOUT'; - } - /** Passed an invalid argument. */ export class InvalidArgumentError extends UndiciError { name: 'InvalidArgumentError'; @@ -40,14 +55,14 @@ declare namespace Errors { } /** Returned an invalid value. */ - export class InvalidReturnError extends UndiciError { - name: 'InvalidReturnError'; + export class InvalidReturnValueError extends UndiciError { + name: 'InvalidReturnValueError'; code: 'UND_ERR_INVALID_RETURN_VALUE'; } /** The request has been aborted by the user. */ export class RequestAbortedError extends UndiciError { - name: 'RequestAbortedError'; + name: 'AbortError'; code: 'UND_ERR_ABORTED'; } @@ -57,12 +72,18 @@ declare namespace Errors { code: 'UND_ERR_INFO'; } - /** Body does not match content-length header. */ + /** Request body length does not match content-length header. */ export class RequestContentLengthMismatchError extends UndiciError { name: 'RequestContentLengthMismatchError'; code: 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH'; } + /** Response body length does not match content-length header. */ + export class ResponseContentLengthMismatchError extends UndiciError { + name: 'ResponseContentLengthMismatchError'; + code: 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH'; + } + /** Trying to use a destroyed client. */ export class ClientDestroyedError extends UndiciError { name: 'ClientDestroyedError'; @@ -79,7 +100,7 @@ declare namespace Errors { export class SocketError extends UndiciError { name: 'SocketError'; code: 'UND_ERR_SOCKET'; - socket: SocketInfo | null + socket: Client.SocketInfo | null } /** Encountered unsupported functionality. */ @@ -87,4 +108,21 @@ declare namespace Errors { name: 'NotSupportedError'; code: 'UND_ERR_NOT_SUPPORTED'; } + + /** No upstream has been added to the BalancedPool. */ + export class BalancedPoolMissingUpstreamError extends UndiciError { + name: 'MissingUpstreamError'; + code: 'UND_ERR_BPL_MISSING_UPSTREAM'; + } + + export class HTTPParserError extends UndiciError { + name: 'HTTPParserError'; + code: string; + } + + /** The response exceed the length allowed. */ + export class ResponseExceededMaxSizeError extends UndiciError { + name: 'ResponseExceededMaxSizeError'; + code: 'UND_ERR_RES_EXCEEDED_MAX_SIZE'; + } } diff --git a/action/node_modules/undici/types/fetch.d.ts b/action/node_modules/undici/types/fetch.d.ts index 87980bed..440f2b00 100644 --- a/action/node_modules/undici/types/fetch.d.ts +++ b/action/node_modules/undici/types/fetch.d.ts @@ -7,7 +7,7 @@ import { URL, URLSearchParams } from 'url' import { ReadableStream } from 'stream/web' import { FormData } from './formdata' -import Dispatcher = require('./dispatcher') +import Dispatcher from './dispatcher' export type RequestInfo = string | URL | Request @@ -59,6 +59,7 @@ export declare class Headers implements SpecIterable<[string, string]> { readonly get: (name: string) => string | null readonly has: (name: string) => boolean readonly set: (name: string, value: string) => void + readonly getSetCookie: () => string[] readonly forEach: ( callbackfn: (value: string, key: string, iterable: Headers) => void, thisArg?: unknown @@ -107,13 +108,14 @@ export interface RequestInit { body?: BodyInit redirect?: RequestRedirect integrity?: string - signal?: AbortSignal + signal?: AbortSignal | null credentials?: RequestCredentials mode?: RequestMode referrer?: string referrerPolicy?: ReferrerPolicy window?: null dispatcher?: Dispatcher + duplex?: RequestDuplex } export type ReferrerPolicy = @@ -131,6 +133,8 @@ export type RequestMode = 'cors' | 'navigate' | 'no-cors' | 'same-origin' export type RequestRedirect = 'error' | 'follow' | 'manual' +export type RequestDuplex = 'half' + export declare class Request implements BodyMixin { constructor (input: RequestInfo, init?: RequestInit) @@ -147,6 +151,7 @@ export declare class Request implements BodyMixin { readonly keepalive: boolean readonly signal: AbortSignal + readonly duplex: RequestDuplex readonly body: ReadableStream | null readonly bodyUsed: boolean diff --git a/action/node_modules/undici/types/filereader.d.ts b/action/node_modules/undici/types/filereader.d.ts new file mode 100644 index 00000000..f05d231b --- /dev/null +++ b/action/node_modules/undici/types/filereader.d.ts @@ -0,0 +1,54 @@ +/// + +import { Blob } from 'buffer' +import { DOMException, Event, EventInit, EventTarget } from './patch' + +export declare class FileReader { + __proto__: EventTarget & FileReader + + constructor () + + readAsArrayBuffer (blob: Blob): void + readAsBinaryString (blob: Blob): void + readAsText (blob: Blob, encoding?: string): void + readAsDataURL (blob: Blob): void + + abort (): void + + static readonly EMPTY = 0 + static readonly LOADING = 1 + static readonly DONE = 2 + + readonly EMPTY = 0 + readonly LOADING = 1 + readonly DONE = 2 + + readonly readyState: number + + readonly result: string | ArrayBuffer | null + + readonly error: DOMException | null + + onloadstart: null | ((this: FileReader, event: ProgressEvent) => void) + onprogress: null | ((this: FileReader, event: ProgressEvent) => void) + onload: null | ((this: FileReader, event: ProgressEvent) => void) + onabort: null | ((this: FileReader, event: ProgressEvent) => void) + onerror: null | ((this: FileReader, event: ProgressEvent) => void) + onloadend: null | ((this: FileReader, event: ProgressEvent) => void) +} + +export interface ProgressEventInit extends EventInit { + lengthComputable?: boolean + loaded?: number + total?: number +} + +export declare class ProgressEvent { + __proto__: Event & ProgressEvent + + constructor (type: string, eventInitDict?: ProgressEventInit) + + readonly lengthComputable: boolean + readonly loaded: number + readonly total: number +} diff --git a/action/node_modules/undici/types/global-dispatcher.d.ts b/action/node_modules/undici/types/global-dispatcher.d.ts index 56abd53d..728f95ce 100644 --- a/action/node_modules/undici/types/global-dispatcher.d.ts +++ b/action/node_modules/undici/types/global-dispatcher.d.ts @@ -1,4 +1,4 @@ -import Dispatcher = require("./dispatcher"); +import Dispatcher from "./dispatcher"; export { getGlobalDispatcher, diff --git a/action/node_modules/undici/types/header.d.ts b/action/node_modules/undici/types/header.d.ts new file mode 100644 index 00000000..bfdb3296 --- /dev/null +++ b/action/node_modules/undici/types/header.d.ts @@ -0,0 +1,4 @@ +/** + * The header type declaration of `undici`. + */ +export type IncomingHttpHeaders = Record; diff --git a/action/node_modules/undici/types/index.d.ts b/action/node_modules/undici/types/index.d.ts new file mode 100644 index 00000000..0ea8bdc2 --- /dev/null +++ b/action/node_modules/undici/types/index.d.ts @@ -0,0 +1,65 @@ +import Dispatcher from'./dispatcher' +import { setGlobalDispatcher, getGlobalDispatcher } from './global-dispatcher' +import { setGlobalOrigin, getGlobalOrigin } from './global-origin' +import Pool from'./pool' +import { RedirectHandler, DecoratorHandler } from './handlers' + +import BalancedPool from './balanced-pool' +import Client from'./client' +import buildConnector from'./connector' +import errors from'./errors' +import Agent from'./agent' +import MockClient from'./mock-client' +import MockPool from'./mock-pool' +import MockAgent from'./mock-agent' +import mockErrors from'./mock-errors' +import ProxyAgent from'./proxy-agent' +import RetryHandler from'./retry-handler' +import { request, pipeline, stream, connect, upgrade } from './api' + +export * from './cookies' +export * from './fetch' +export * from './file' +export * from './filereader' +export * from './formdata' +export * from './diagnostics-channel' +export * from './websocket' +export * from './content-type' +export * from './cache' +export { Interceptable } from './mock-interceptor' + +export { Dispatcher, BalancedPool, Pool, Client, buildConnector, errors, Agent, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, MockClient, MockPool, MockAgent, mockErrors, ProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler } +export default Undici + +declare namespace Undici { + var Dispatcher: typeof import('./dispatcher').default + var Pool: typeof import('./pool').default; + var RedirectHandler: typeof import ('./handlers').RedirectHandler + var DecoratorHandler: typeof import ('./handlers').DecoratorHandler + var RetryHandler: typeof import ('./retry-handler').default + var createRedirectInterceptor: typeof import ('./interceptors').createRedirectInterceptor + var BalancedPool: typeof import('./balanced-pool').default; + var Client: typeof import('./client').default; + var buildConnector: typeof import('./connector').default; + var errors: typeof import('./errors').default; + var Agent: typeof import('./agent').default; + var setGlobalDispatcher: typeof import('./global-dispatcher').setGlobalDispatcher; + var getGlobalDispatcher: typeof import('./global-dispatcher').getGlobalDispatcher; + var request: typeof import('./api').request; + var stream: typeof import('./api').stream; + var pipeline: typeof import('./api').pipeline; + var connect: typeof import('./api').connect; + var upgrade: typeof import('./api').upgrade; + var MockClient: typeof import('./mock-client').default; + var MockPool: typeof import('./mock-pool').default; + var MockAgent: typeof import('./mock-agent').default; + var mockErrors: typeof import('./mock-errors').default; + var fetch: typeof import('./fetch').fetch; + var Headers: typeof import('./fetch').Headers; + var Response: typeof import('./fetch').Response; + var Request: typeof import('./fetch').Request; + var FormData: typeof import('./formdata').FormData; + var File: typeof import('./file').File; + var FileReader: typeof import('./filereader').FileReader; + var caches: typeof import('./cache').caches; +} diff --git a/action/node_modules/undici/types/interceptors.d.ts b/action/node_modules/undici/types/interceptors.d.ts index a920ea98..047ac175 100644 --- a/action/node_modules/undici/types/interceptors.d.ts +++ b/action/node_modules/undici/types/interceptors.d.ts @@ -1,5 +1,5 @@ -import {DispatchInterceptor} from "./dispatcher"; +import Dispatcher from "./dispatcher"; type RedirectInterceptorOpts = { maxRedirections?: number } -export declare function createRedirectInterceptor (opts: RedirectInterceptorOpts): DispatchInterceptor +export declare function createRedirectInterceptor (opts: RedirectInterceptorOpts): Dispatcher.DispatchInterceptor diff --git a/action/node_modules/undici/types/mock-agent.d.ts b/action/node_modules/undici/types/mock-agent.d.ts index 825d2aef..98cd645b 100644 --- a/action/node_modules/undici/types/mock-agent.d.ts +++ b/action/node_modules/undici/types/mock-agent.d.ts @@ -1,9 +1,9 @@ -import Agent = require('./agent') -import Dispatcher = require('./dispatcher') +import Agent from './agent' +import Dispatcher from './dispatcher' import { Interceptable, MockInterceptor } from './mock-interceptor' import MockDispatch = MockInterceptor.MockDispatch; -export = MockAgent +export default MockAgent interface PendingInterceptor extends MockDispatch { origin: string; diff --git a/action/node_modules/undici/types/mock-client.d.ts b/action/node_modules/undici/types/mock-client.d.ts index 9e751f42..51d008cc 100644 --- a/action/node_modules/undici/types/mock-client.d.ts +++ b/action/node_modules/undici/types/mock-client.d.ts @@ -1,9 +1,9 @@ -import Client = require('./client') -import Dispatcher = require('./dispatcher') -import MockAgent = require('./mock-agent') +import Client from './client' +import Dispatcher from './dispatcher' +import MockAgent from './mock-agent' import { MockInterceptor, Interceptable } from './mock-interceptor' -export = MockClient +export default MockClient /** MockClient extends the Client API and allows one to mock requests. */ declare class MockClient extends Client implements Interceptable { diff --git a/action/node_modules/undici/types/mock-errors.d.ts b/action/node_modules/undici/types/mock-errors.d.ts index 31e7ba23..3d9e727d 100644 --- a/action/node_modules/undici/types/mock-errors.d.ts +++ b/action/node_modules/undici/types/mock-errors.d.ts @@ -1,10 +1,10 @@ -import { UndiciError } from './errors' +import Errors from './errors' -export = MockErrors +export default MockErrors declare namespace MockErrors { /** The request does not match any registered mock dispatches. */ - export class MockNotMatchedError extends UndiciError { + export class MockNotMatchedError extends Errors.UndiciError { constructor(message?: string); name: 'MockNotMatchedError'; code: 'UND_MOCK_ERR_MOCK_NOT_MATCHED'; diff --git a/action/node_modules/undici/types/mock-interceptor.d.ts b/action/node_modules/undici/types/mock-interceptor.d.ts index 87eedcd4..6b3961c0 100644 --- a/action/node_modules/undici/types/mock-interceptor.d.ts +++ b/action/node_modules/undici/types/mock-interceptor.d.ts @@ -1,5 +1,5 @@ -import { IncomingHttpHeaders } from 'http' -import Dispatcher = require('./dispatcher'); +import { IncomingHttpHeaders } from './header' +import Dispatcher from './dispatcher'; import { BodyInit, Headers } from './fetch' export { diff --git a/action/node_modules/undici/types/mock-pool.d.ts b/action/node_modules/undici/types/mock-pool.d.ts index d0c90515..39e709aa 100644 --- a/action/node_modules/undici/types/mock-pool.d.ts +++ b/action/node_modules/undici/types/mock-pool.d.ts @@ -1,9 +1,9 @@ -import Pool = require('./pool') -import MockAgent = require('./mock-agent') +import Pool from './pool' +import MockAgent from './mock-agent' import { Interceptable, MockInterceptor } from './mock-interceptor' -import Dispatcher = require('./dispatcher') +import Dispatcher from './dispatcher' -export = MockPool +export default MockPool /** MockPool extends the Pool API and allows one to mock requests. */ declare class MockPool extends Pool implements Interceptable { diff --git a/action/node_modules/undici/types/patch.d.ts b/action/node_modules/undici/types/patch.d.ts new file mode 100644 index 00000000..3871acfe --- /dev/null +++ b/action/node_modules/undici/types/patch.d.ts @@ -0,0 +1,71 @@ +/// + +// See https://github.com/nodejs/undici/issues/1740 + +export type DOMException = typeof globalThis extends { DOMException: infer T } + ? T + : any + +export type EventTarget = typeof globalThis extends { EventTarget: infer T } + ? T + : { + addEventListener( + type: string, + listener: any, + options?: any, + ): void + dispatchEvent(event: Event): boolean + removeEventListener( + type: string, + listener: any, + options?: any | boolean, + ): void + } + +export type Event = typeof globalThis extends { Event: infer T } + ? T + : { + readonly bubbles: boolean + cancelBubble: () => void + readonly cancelable: boolean + readonly composed: boolean + composedPath(): [EventTarget?] + readonly currentTarget: EventTarget | null + readonly defaultPrevented: boolean + readonly eventPhase: 0 | 2 + readonly isTrusted: boolean + preventDefault(): void + returnValue: boolean + readonly srcElement: EventTarget | null + stopImmediatePropagation(): void + stopPropagation(): void + readonly target: EventTarget | null + readonly timeStamp: number + readonly type: string + } + +export interface EventInit { + bubbles?: boolean + cancelable?: boolean + composed?: boolean +} + +export interface EventListenerOptions { + capture?: boolean +} + +export interface AddEventListenerOptions extends EventListenerOptions { + once?: boolean + passive?: boolean + signal?: AbortSignal +} + +export type EventListenerOrEventListenerObject = EventListener | EventListenerObject + +export interface EventListenerObject { + handleEvent (object: Event): void +} + +export interface EventListener { + (evt: Event): void +} diff --git a/action/node_modules/undici/types/pool-stats.d.ts b/action/node_modules/undici/types/pool-stats.d.ts index 807e68f1..8b6d2bff 100644 --- a/action/node_modules/undici/types/pool-stats.d.ts +++ b/action/node_modules/undici/types/pool-stats.d.ts @@ -1,6 +1,6 @@ -import Pool = require("./pool") +import Pool from "./pool" -export = PoolStats +export default PoolStats declare class PoolStats { constructor(pool: Pool); diff --git a/action/node_modules/undici/types/pool.d.ts b/action/node_modules/undici/types/pool.d.ts index 0ef0bc39..7747d482 100644 --- a/action/node_modules/undici/types/pool.d.ts +++ b/action/node_modules/undici/types/pool.d.ts @@ -1,10 +1,9 @@ -import Client = require('./client') -import Dispatcher = require('./dispatcher') -import TPoolStats = require('./pool-stats') +import Client from './client' +import TPoolStats from './pool-stats' import { URL } from 'url' -import {DispatchInterceptor} from "./dispatcher"; +import Dispatcher from "./dispatcher"; -export = Pool +export default Pool declare class Pool extends Dispatcher { constructor(url: string | URL, options?: Pool.Options) @@ -24,6 +23,6 @@ declare namespace Pool { /** The max number of clients to create. `null` if no limit. Default `null`. */ connections?: number | null; - interceptors?: { Pool?: readonly DispatchInterceptor[] } & Client.Options["interceptors"] + interceptors?: { Pool?: readonly Dispatcher.DispatchInterceptor[] } & Client.Options["interceptors"] } } diff --git a/action/node_modules/undici/types/proxy-agent.d.ts b/action/node_modules/undici/types/proxy-agent.d.ts index 30fef450..96b26381 100644 --- a/action/node_modules/undici/types/proxy-agent.d.ts +++ b/action/node_modules/undici/types/proxy-agent.d.ts @@ -1,8 +1,11 @@ -import { TlsOptions } from 'tls' -import Agent = require('./agent') -import Dispatcher = require('./dispatcher') +import Agent from './agent' +import buildConnector from './connector'; +import Client from './client' +import Dispatcher from './dispatcher' +import { IncomingHttpHeaders } from './header' +import Pool from './pool' -export = ProxyAgent +export default ProxyAgent declare class ProxyAgent extends Dispatcher { constructor(options: ProxyAgent.Options | string) @@ -14,8 +17,14 @@ declare class ProxyAgent extends Dispatcher { declare namespace ProxyAgent { export interface Options extends Agent.Options { uri: string; + /** + * @deprecated use opts.token + */ auth?: string; - requestTls?: TlsOptions & { servername?: string }; - proxyTls?: TlsOptions & { servername?: string }; + token?: string; + headers?: IncomingHttpHeaders; + requestTls?: buildConnector.BuildOptions; + proxyTls?: buildConnector.BuildOptions; + clientFactory?(origin: URL, opts: object): Dispatcher; } } diff --git a/action/node_modules/undici/types/readable.d.ts b/action/node_modules/undici/types/readable.d.ts index 0d82ba86..4549a8c8 100644 --- a/action/node_modules/undici/types/readable.d.ts +++ b/action/node_modules/undici/types/readable.d.ts @@ -1,7 +1,7 @@ import { Readable } from "stream"; import { Blob } from 'buffer' -export = BodyReadable +export default BodyReadable declare class BodyReadable extends Readable { constructor( @@ -18,7 +18,7 @@ declare class BodyReadable extends Readable { /** Consumes and returns the body as a JavaScript Object * https://fetch.spec.whatwg.org/#dom-body-json */ - json(): Promise + json(): Promise /** Consumes and returns the body as a Blob * https://fetch.spec.whatwg.org/#dom-body-blob diff --git a/action/node_modules/undici/types/retry-handler.d.ts b/action/node_modules/undici/types/retry-handler.d.ts new file mode 100644 index 00000000..0528eb44 --- /dev/null +++ b/action/node_modules/undici/types/retry-handler.d.ts @@ -0,0 +1,116 @@ +import Dispatcher from "./dispatcher"; + +export default RetryHandler; + +declare class RetryHandler implements Dispatcher.DispatchHandlers { + constructor( + options: Dispatcher.DispatchOptions & { + retryOptions?: RetryHandler.RetryOptions; + }, + retryHandlers: RetryHandler.RetryHandlers + ); +} + +declare namespace RetryHandler { + export type RetryState = { counter: number; currentTimeout: number }; + + export type RetryContext = { + state: RetryState; + opts: Dispatcher.DispatchOptions & { + retryOptions?: RetryHandler.RetryOptions; + }; + } + + export type OnRetryCallback = (result?: Error | null) => void; + + export type RetryCallback = ( + err: Error, + context: { + state: RetryState; + opts: Dispatcher.DispatchOptions & { + retryOptions?: RetryHandler.RetryOptions; + }; + }, + callback: OnRetryCallback + ) => number | null; + + export interface RetryOptions { + /** + * Callback to be invoked on every retry iteration. + * It receives the error, current state of the retry object and the options object + * passed when instantiating the retry handler. + * + * @type {RetryCallback} + * @memberof RetryOptions + */ + retry?: RetryCallback; + /** + * Maximum number of retries to allow. + * + * @type {number} + * @memberof RetryOptions + * @default 5 + */ + maxRetries?: number; + /** + * Max number of milliseconds allow between retries + * + * @type {number} + * @memberof RetryOptions + * @default 30000 + */ + maxTimeout?: number; + /** + * Initial number of milliseconds to wait before retrying for the first time. + * + * @type {number} + * @memberof RetryOptions + * @default 500 + */ + minTimeout?: number; + /** + * Factior to multiply the timeout factor between retries. + * + * @type {number} + * @memberof RetryOptions + * @default 2 + */ + timeoutFactor?: number; + /** + * It enables to automatically infer timeout between retries based on the `Retry-After` header. + * + * @type {boolean} + * @memberof RetryOptions + * @default true + */ + retryAfter?: boolean; + /** + * HTTP methods to retry. + * + * @type {Dispatcher.HttpMethod[]} + * @memberof RetryOptions + * @default ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'], + */ + methods?: Dispatcher.HttpMethod[]; + /** + * Error codes to be retried. e.g. `ECONNRESET`, `ENOTFOUND`, `ETIMEDOUT`, `ECONNREFUSED`, etc. + * + * @type {string[]} + * @default ['ECONNRESET','ECONNREFUSED','ENOTFOUND','ENETDOWN','ENETUNREACH','EHOSTDOWN','EHOSTUNREACH','EPIPE'] + */ + errorCodes?: string[]; + /** + * HTTP status codes to be retried. + * + * @type {number[]} + * @memberof RetryOptions + * @default [500, 502, 503, 504, 429], + */ + statusCodes?: number[]; + } + + export interface RetryHandlers { + dispatch: Dispatcher["dispatch"]; + handler: Dispatcher.DispatchHandlers; + } +} diff --git a/action/node_modules/undici/types/webidl.d.ts b/action/node_modules/undici/types/webidl.d.ts new file mode 100644 index 00000000..40cfe064 --- /dev/null +++ b/action/node_modules/undici/types/webidl.d.ts @@ -0,0 +1,220 @@ +// These types are not exported, and are only used internally + +/** + * Take in an unknown value and return one that is of type T + */ +type Converter = (object: unknown) => T + +type SequenceConverter = (object: unknown) => T[] + +type RecordConverter = (object: unknown) => Record + +interface ConvertToIntOpts { + clamp?: boolean + enforceRange?: boolean +} + +interface WebidlErrors { + exception (opts: { header: string, message: string }): TypeError + /** + * @description Throw an error when conversion from one type to another has failed + */ + conversionFailed (opts: { + prefix: string + argument: string + types: string[] + }): TypeError + /** + * @description Throw an error when an invalid argument is provided + */ + invalidArgument (opts: { + prefix: string + value: string + type: string + }): TypeError +} + +interface WebidlUtil { + /** + * @see https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values + */ + Type (object: unknown): + | 'Undefined' + | 'Boolean' + | 'String' + | 'Symbol' + | 'Number' + | 'BigInt' + | 'Null' + | 'Object' + + /** + * @see https://webidl.spec.whatwg.org/#abstract-opdef-converttoint + */ + ConvertToInt ( + V: unknown, + bitLength: number, + signedness: 'signed' | 'unsigned', + opts?: ConvertToIntOpts + ): number + + /** + * @see https://webidl.spec.whatwg.org/#abstract-opdef-converttoint + */ + IntegerPart (N: number): number +} + +interface WebidlConverters { + /** + * @see https://webidl.spec.whatwg.org/#es-DOMString + */ + DOMString (V: unknown, opts?: { + legacyNullToEmptyString: boolean + }): string + + /** + * @see https://webidl.spec.whatwg.org/#es-ByteString + */ + ByteString (V: unknown): string + + /** + * @see https://webidl.spec.whatwg.org/#es-USVString + */ + USVString (V: unknown): string + + /** + * @see https://webidl.spec.whatwg.org/#es-boolean + */ + boolean (V: unknown): boolean + + /** + * @see https://webidl.spec.whatwg.org/#es-any + */ + any (V: Value): Value + + /** + * @see https://webidl.spec.whatwg.org/#es-long-long + */ + ['long long'] (V: unknown): number + + /** + * @see https://webidl.spec.whatwg.org/#es-unsigned-long-long + */ + ['unsigned long long'] (V: unknown): number + + /** + * @see https://webidl.spec.whatwg.org/#es-unsigned-long + */ + ['unsigned long'] (V: unknown): number + + /** + * @see https://webidl.spec.whatwg.org/#es-unsigned-short + */ + ['unsigned short'] (V: unknown, opts?: ConvertToIntOpts): number + + /** + * @see https://webidl.spec.whatwg.org/#idl-ArrayBuffer + */ + ArrayBuffer (V: unknown): ArrayBufferLike + ArrayBuffer (V: unknown, opts: { allowShared: false }): ArrayBuffer + + /** + * @see https://webidl.spec.whatwg.org/#es-buffer-source-types + */ + TypedArray ( + V: unknown, + TypedArray: NodeJS.TypedArray | ArrayBufferLike + ): NodeJS.TypedArray | ArrayBufferLike + TypedArray ( + V: unknown, + TypedArray: NodeJS.TypedArray | ArrayBufferLike, + opts?: { allowShared: false } + ): NodeJS.TypedArray | ArrayBuffer + + /** + * @see https://webidl.spec.whatwg.org/#es-buffer-source-types + */ + DataView (V: unknown, opts?: { allowShared: boolean }): DataView + + /** + * @see https://webidl.spec.whatwg.org/#BufferSource + */ + BufferSource ( + V: unknown, + opts?: { allowShared: boolean } + ): NodeJS.TypedArray | ArrayBufferLike | DataView + + ['sequence']: SequenceConverter + + ['sequence>']: SequenceConverter + + ['record']: RecordConverter + + [Key: string]: (...args: any[]) => unknown +} + +export interface Webidl { + errors: WebidlErrors + util: WebidlUtil + converters: WebidlConverters + + /** + * @description Performs a brand-check on {@param V} to ensure it is a + * {@param cls} object. + */ + brandCheck (V: unknown, cls: Interface, opts?: { strict?: boolean }): asserts V is Interface + + /** + * @see https://webidl.spec.whatwg.org/#es-sequence + * @description Convert a value, V, to a WebIDL sequence type. + */ + sequenceConverter (C: Converter): SequenceConverter + + illegalConstructor (): never + + /** + * @see https://webidl.spec.whatwg.org/#es-to-record + * @description Convert a value, V, to a WebIDL record type. + */ + recordConverter ( + keyConverter: Converter, + valueConverter: Converter + ): RecordConverter + + /** + * Similar to {@link Webidl.brandCheck} but allows skipping the check if third party + * interfaces are allowed. + */ + interfaceConverter (cls: Interface): ( + V: unknown, + opts?: { strict: boolean } + ) => asserts V is typeof cls + + // TODO(@KhafraDev): a type could likely be implemented that can infer the return type + // from the converters given? + /** + * Converts a value, V, to a WebIDL dictionary types. Allows limiting which keys are + * allowed, values allowed, optional and required keys. Auto converts the value to + * a type given a converter. + */ + dictionaryConverter (converters: { + key: string, + defaultValue?: unknown, + required?: boolean, + converter: (...args: unknown[]) => unknown, + allowedValues?: unknown[] + }[]): (V: unknown) => Record + + /** + * @see https://webidl.spec.whatwg.org/#idl-nullable-type + * @description allows a type, V, to be null + */ + nullableConverter ( + converter: Converter + ): (V: unknown) => ReturnType | null + + argumentLengthCheck (args: { length: number }, min: number, context: { + header: string + message?: string + }): void +} diff --git a/action/node_modules/undici/types/websocket.d.ts b/action/node_modules/undici/types/websocket.d.ts new file mode 100644 index 00000000..15a357d3 --- /dev/null +++ b/action/node_modules/undici/types/websocket.d.ts @@ -0,0 +1,131 @@ +/// + +import type { Blob } from 'buffer' +import type { MessagePort } from 'worker_threads' +import { + EventTarget, + Event, + EventInit, + EventListenerOptions, + AddEventListenerOptions, + EventListenerOrEventListenerObject +} from './patch' +import Dispatcher from './dispatcher' +import { HeadersInit } from './fetch' + +export type BinaryType = 'blob' | 'arraybuffer' + +interface WebSocketEventMap { + close: CloseEvent + error: Event + message: MessageEvent + open: Event +} + +interface WebSocket extends EventTarget { + binaryType: BinaryType + + readonly bufferedAmount: number + readonly extensions: string + + onclose: ((this: WebSocket, ev: WebSocketEventMap['close']) => any) | null + onerror: ((this: WebSocket, ev: WebSocketEventMap['error']) => any) | null + onmessage: ((this: WebSocket, ev: WebSocketEventMap['message']) => any) | null + onopen: ((this: WebSocket, ev: WebSocketEventMap['open']) => any) | null + + readonly protocol: string + readonly readyState: number + readonly url: string + + close(code?: number, reason?: string): void + send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void + + readonly CLOSED: number + readonly CLOSING: number + readonly CONNECTING: number + readonly OPEN: number + + addEventListener( + type: K, + listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, + options?: boolean | AddEventListenerOptions + ): void + addEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | AddEventListenerOptions + ): void + removeEventListener( + type: K, + listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, + options?: boolean | EventListenerOptions + ): void + removeEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | EventListenerOptions + ): void +} + +export declare const WebSocket: { + prototype: WebSocket + new (url: string | URL, protocols?: string | string[] | WebSocketInit): WebSocket + readonly CLOSED: number + readonly CLOSING: number + readonly CONNECTING: number + readonly OPEN: number +} + +interface CloseEventInit extends EventInit { + code?: number + reason?: string + wasClean?: boolean +} + +interface CloseEvent extends Event { + readonly code: number + readonly reason: string + readonly wasClean: boolean +} + +export declare const CloseEvent: { + prototype: CloseEvent + new (type: string, eventInitDict?: CloseEventInit): CloseEvent +} + +interface MessageEventInit extends EventInit { + data?: T + lastEventId?: string + origin?: string + ports?: (typeof MessagePort)[] + source?: typeof MessagePort | null +} + +interface MessageEvent extends Event { + readonly data: T + readonly lastEventId: string + readonly origin: string + readonly ports: ReadonlyArray + readonly source: typeof MessagePort | null + initMessageEvent( + type: string, + bubbles?: boolean, + cancelable?: boolean, + data?: any, + origin?: string, + lastEventId?: string, + source?: typeof MessagePort | null, + ports?: (typeof MessagePort)[] + ): void; +} + +export declare const MessageEvent: { + prototype: MessageEvent + new(type: string, eventInitDict?: MessageEventInit): MessageEvent +} + +interface WebSocketInit { + protocols?: string | string[], + dispatcher?: Dispatcher, + headers?: HeadersInit +} diff --git a/action/node_modules/which/CHANGELOG.md b/action/node_modules/which/CHANGELOG.md deleted file mode 100644 index 7fb1f203..00000000 --- a/action/node_modules/which/CHANGELOG.md +++ /dev/null @@ -1,166 +0,0 @@ -# Changes - - -## 2.0.2 - -* Rename bin to `node-which` - -## 2.0.1 - -* generate changelog and publish on version bump -* enforce 100% test coverage -* Promise interface - -## 2.0.0 - -* Parallel tests, modern JavaScript, and drop support for node < 8 - -## 1.3.1 - -* update deps -* update travis - -## v1.3.0 - -* Add nothrow option to which.sync -* update tap - -## v1.2.14 - -* appveyor: drop node 5 and 0.x -* travis-ci: add node 6, drop 0.x - -## v1.2.13 - -* test: Pass missing option to pass on windows -* update tap -* update isexe to 2.0.0 -* neveragain.tech pledge request - -## v1.2.12 - -* Removed unused require - -## v1.2.11 - -* Prevent changelog script from being included in package - -## v1.2.10 - -* Use env.PATH only, not env.Path - -## v1.2.9 - -* fix for paths starting with ../ -* Remove unused `is-absolute` module - -## v1.2.8 - -* bullet items in changelog that contain (but don't start with) # - -## v1.2.7 - -* strip 'update changelog' changelog entries out of changelog - -## v1.2.6 - -* make the changelog bulleted - -## v1.2.5 - -* make a changelog, and keep it up to date -* don't include tests in package -* Properly handle relative-path executables -* appveyor -* Attach error code to Not Found error -* Make tests pass on Windows - -## v1.2.4 - -* Fix typo - -## v1.2.3 - -* update isexe, fix regression in pathExt handling - -## v1.2.2 - -* update deps, use isexe module, test windows - -## v1.2.1 - -* Sometimes windows PATH entries are quoted -* Fixed a bug in the check for group and user mode bits. This bug was introduced during refactoring for supporting strict mode. -* doc cli - -## v1.2.0 - -* Add support for opt.all and -as cli flags -* test the bin -* update travis -* Allow checking for multiple programs in bin/which -* tap 2 - -## v1.1.2 - -* travis -* Refactored and fixed undefined error on Windows -* Support strict mode - -## v1.1.1 - -* test +g exes against secondary groups, if available -* Use windows exe semantics on cygwin & msys -* cwd should be first in path on win32, not last -* Handle lower-case 'env.Path' on Windows -* Update docs -* use single-quotes - -## v1.1.0 - -* Add tests, depend on is-absolute - -## v1.0.9 - -* which.js: root is allowed to execute files owned by anyone - -## v1.0.8 - -* don't use graceful-fs - -## v1.0.7 - -* add license to package.json - -## v1.0.6 - -* isc license - -## 1.0.5 - -* Awful typo - -## 1.0.4 - -* Test for path absoluteness properly -* win: Allow '' as a pathext if cmd has a . in it - -## 1.0.3 - -* Remove references to execPath -* Make `which.sync()` work on Windows by honoring the PATHEXT variable. -* Make `isExe()` always return true on Windows. -* MIT - -## 1.0.2 - -* Only files can be exes - -## 1.0.1 - -* Respect the PATHEXT env for win32 support -* should 0755 the bin -* binary -* guts -* package -* 1st diff --git a/action/node_modules/which/README.md b/action/node_modules/which/README.md index cd833509..323aaf29 100644 --- a/action/node_modules/which/README.md +++ b/action/node_modules/which/README.md @@ -9,40 +9,37 @@ needed when the PATH changes. ## USAGE ```javascript -var which = require('which') +const which = require('which') // async usage -which('node', function (er, resolvedPath) { - // er is returned if no "node" is found on the PATH - // if it is found, then the absolute path to the exec is returned -}) +// rejects if not found +const resolved = await which('node') -// or promise -which('node').then(resolvedPath => { ... }).catch(er => { ... not found ... }) +// if nothrow option is used, returns null if not found +const resolvedOrNull = await which('node', { nothrow: true }) // sync usage // throws if not found -var resolved = which.sync('node') +const resolved = which.sync('node') // if nothrow option is used, returns null if not found -resolved = which.sync('node', {nothrow: true}) +const resolvedOrNull = which.sync('node', { nothrow: true }) // Pass options to override the PATH and PATHEXT environment vars. -which('node', { path: someOtherPath }, function (er, resolved) { - if (er) - throw er - console.log('found at %j', resolved) -}) +await which('node', { path: someOtherPath, pathExt: somePathExt }) ``` ## CLI USAGE -Same as the BSD `which(1)` binary. +Just like the BSD `which(1)` binary but using `node-which`. ``` -usage: which [-as] program ... +usage: node-which [-as] program ... ``` +You can learn more about why the binary is `node-which` and not `which` +[here](https://github.com/npm/node-which/pull/67) + ## OPTIONS You may pass an options object as the second argument. diff --git a/action/node_modules/which/bin/node-which b/action/node_modules/which/bin/node-which deleted file mode 100755 index 7cee3729..00000000 --- a/action/node_modules/which/bin/node-which +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env node -var which = require("../") -if (process.argv.length < 3) - usage() - -function usage () { - console.error('usage: which [-as] program ...') - process.exit(1) -} - -var all = false -var silent = false -var dashdash = false -var args = process.argv.slice(2).filter(function (arg) { - if (dashdash || !/^-/.test(arg)) - return true - - if (arg === '--') { - dashdash = true - return false - } - - var flags = arg.substr(1).split('') - for (var f = 0; f < flags.length; f++) { - var flag = flags[f] - switch (flag) { - case 's': - silent = true - break - case 'a': - all = true - break - default: - console.error('which: illegal option -- ' + flag) - usage() - } - } - return false -}) - -process.exit(args.reduce(function (pv, current) { - try { - var f = which.sync(current, { all: all }) - if (all) - f = f.join('\n') - if (!silent) - console.log(f) - return pv; - } catch (e) { - return 1; - } -}, 0)) diff --git a/action/node_modules/which/bin/which.js b/action/node_modules/which/bin/which.js new file mode 100755 index 00000000..6df16f21 --- /dev/null +++ b/action/node_modules/which/bin/which.js @@ -0,0 +1,52 @@ +#!/usr/bin/env node + +const which = require('../lib') +const argv = process.argv.slice(2) + +const usage = (err) => { + if (err) { + console.error(`which: ${err}`) + } + console.error('usage: which [-as] program ...') + process.exit(1) +} + +if (!argv.length) { + return usage() +} + +let dashdash = false +const [commands, flags] = argv.reduce((acc, arg) => { + if (dashdash || arg === '--') { + dashdash = true + return acc + } + + if (!/^-/.test(arg)) { + acc[0].push(arg) + return acc + } + + for (const flag of arg.slice(1).split('')) { + if (flag === 's') { + acc[1].silent = true + } else if (flag === 'a') { + acc[1].all = true + } else { + usage(`illegal option -- ${flag}`) + } + } + + return acc +}, [[], {}]) + +for (const command of commands) { + try { + const res = which.sync(command, { all: flags.all }) + if (!flags.silent) { + console.log([].concat(res).join('\n')) + } + } catch (err) { + process.exitCode = 1 + } +} diff --git a/action/node_modules/which/lib/index.js b/action/node_modules/which/lib/index.js new file mode 100644 index 00000000..2fd358ba --- /dev/null +++ b/action/node_modules/which/lib/index.js @@ -0,0 +1,111 @@ +const { isexe, sync: isexeSync } = require('isexe') +const { join, delimiter, sep, posix } = require('path') + +const isWindows = process.platform === 'win32' + +// used to check for slashed in commands passed in. always checks for the posix +// seperator on all platforms, and checks for the current separator when not on +// a posix platform. don't use the isWindows check for this since that is mocked +// in tests but we still need the code to actually work when called. that is also +// why it is ignored from coverage. +/* istanbul ignore next */ +const rSlash = new RegExp(`[${posix.sep}${sep === posix.sep ? '' : sep}]`.replace(/(\\)/g, '\\$1')) +const rRel = new RegExp(`^\\.${rSlash.source}`) + +const getNotFoundError = (cmd) => + Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' }) + +const getPathInfo = (cmd, { + path: optPath = process.env.PATH, + pathExt: optPathExt = process.env.PATHEXT, + delimiter: optDelimiter = delimiter, +}) => { + // If it has a slash, then we don't bother searching the pathenv. + // just check the file itself, and that's it. + const pathEnv = cmd.match(rSlash) ? [''] : [ + // windows always checks the cwd first + ...(isWindows ? [process.cwd()] : []), + ...(optPath || /* istanbul ignore next: very unusual */ '').split(optDelimiter), + ] + + if (isWindows) { + const pathExtExe = optPathExt || + ['.EXE', '.CMD', '.BAT', '.COM'].join(optDelimiter) + const pathExt = pathExtExe.split(optDelimiter).flatMap((item) => [item, item.toLowerCase()]) + if (cmd.includes('.') && pathExt[0] !== '') { + pathExt.unshift('') + } + return { pathEnv, pathExt, pathExtExe } + } + + return { pathEnv, pathExt: [''] } +} + +const getPathPart = (raw, cmd) => { + const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw + const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : '' + return prefix + join(pathPart, cmd) +} + +const which = async (cmd, opt = {}) => { + const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt) + const found = [] + + for (const envPart of pathEnv) { + const p = getPathPart(envPart, cmd) + + for (const ext of pathExt) { + const withExt = p + ext + const is = await isexe(withExt, { pathExt: pathExtExe, ignoreErrors: true }) + if (is) { + if (!opt.all) { + return withExt + } + found.push(withExt) + } + } + } + + if (opt.all && found.length) { + return found + } + + if (opt.nothrow) { + return null + } + + throw getNotFoundError(cmd) +} + +const whichSync = (cmd, opt = {}) => { + const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt) + const found = [] + + for (const pathEnvPart of pathEnv) { + const p = getPathPart(pathEnvPart, cmd) + + for (const ext of pathExt) { + const withExt = p + ext + const is = isexeSync(withExt, { pathExt: pathExtExe, ignoreErrors: true }) + if (is) { + if (!opt.all) { + return withExt + } + found.push(withExt) + } + } + } + + if (opt.all && found.length) { + return found + } + + if (opt.nothrow) { + return null + } + + throw getNotFoundError(cmd) +} + +module.exports = which +which.sync = whichSync diff --git a/action/node_modules/which/package.json b/action/node_modules/which/package.json index 97ad7fba..515bfb22 100644 --- a/action/node_modules/which/package.json +++ b/action/node_modules/which/package.json @@ -1,43 +1,57 @@ { - "author": "Isaac Z. Schlueter (http://blog.izs.me)", + "author": "GitHub Inc.", "name": "which", "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", - "version": "2.0.2", + "version": "4.0.0", "repository": { "type": "git", - "url": "git://github.com/isaacs/node-which.git" + "url": "https://github.com/npm/node-which.git" }, - "main": "which.js", + "main": "lib/index.js", "bin": { - "node-which": "./bin/node-which" + "node-which": "./bin/which.js" }, "license": "ISC", "dependencies": { - "isexe": "^2.0.0" + "isexe": "^3.1.1" }, "devDependencies": { - "mkdirp": "^0.5.0", - "rimraf": "^2.6.2", - "tap": "^14.6.9" + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.18.0", + "tap": "^16.3.0" }, "scripts": { "test": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "prepublish": "npm run changelog", - "prechangelog": "bash gen-changelog.sh", - "changelog": "git add CHANGELOG.md", - "postchangelog": "git commit -m 'update changelog - '${npm_package_version}", - "postpublish": "git push origin --follow-tags" + "lint": "eslint \"**/*.js\"", + "postlint": "template-oss-check", + "template-oss-apply": "template-oss-apply --force", + "lintfix": "npm run lint -- --fix", + "snap": "tap", + "posttest": "npm run lint" }, "files": [ - "which.js", - "bin/node-which" + "bin/", + "lib/" ], "tap": { - "check-coverage": true + "check-coverage": true, + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] }, "engines": { - "node": ">= 8" + "node": "^16.13.0 || >=18.0.0" + }, + "templateOSS": { + "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", + "ciVersions": [ + "16.13.0", + "16.x", + "18.0.0", + "18.x" + ], + "version": "4.18.0", + "publish": "true" } } diff --git a/action/node_modules/which/which.js b/action/node_modules/which/which.js deleted file mode 100644 index 82afffd2..00000000 --- a/action/node_modules/which/which.js +++ /dev/null @@ -1,125 +0,0 @@ -const isWindows = process.platform === 'win32' || - process.env.OSTYPE === 'cygwin' || - process.env.OSTYPE === 'msys' - -const path = require('path') -const COLON = isWindows ? ';' : ':' -const isexe = require('isexe') - -const getNotFoundError = (cmd) => - Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' }) - -const getPathInfo = (cmd, opt) => { - const colon = opt.colon || COLON - - // If it has a slash, then we don't bother searching the pathenv. - // just check the file itself, and that's it. - const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [''] - : ( - [ - // windows always checks the cwd first - ...(isWindows ? [process.cwd()] : []), - ...(opt.path || process.env.PATH || - /* istanbul ignore next: very unusual */ '').split(colon), - ] - ) - const pathExtExe = isWindows - ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM' - : '' - const pathExt = isWindows ? pathExtExe.split(colon) : [''] - - if (isWindows) { - if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') - pathExt.unshift('') - } - - return { - pathEnv, - pathExt, - pathExtExe, - } -} - -const which = (cmd, opt, cb) => { - if (typeof opt === 'function') { - cb = opt - opt = {} - } - if (!opt) - opt = {} - - const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt) - const found = [] - - const step = i => new Promise((resolve, reject) => { - if (i === pathEnv.length) - return opt.all && found.length ? resolve(found) - : reject(getNotFoundError(cmd)) - - const ppRaw = pathEnv[i] - const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw - - const pCmd = path.join(pathPart, cmd) - const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd - : pCmd - - resolve(subStep(p, i, 0)) - }) - - const subStep = (p, i, ii) => new Promise((resolve, reject) => { - if (ii === pathExt.length) - return resolve(step(i + 1)) - const ext = pathExt[ii] - isexe(p + ext, { pathExt: pathExtExe }, (er, is) => { - if (!er && is) { - if (opt.all) - found.push(p + ext) - else - return resolve(p + ext) - } - return resolve(subStep(p, i, ii + 1)) - }) - }) - - return cb ? step(0).then(res => cb(null, res), cb) : step(0) -} - -const whichSync = (cmd, opt) => { - opt = opt || {} - - const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt) - const found = [] - - for (let i = 0; i < pathEnv.length; i ++) { - const ppRaw = pathEnv[i] - const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw - - const pCmd = path.join(pathPart, cmd) - const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd - : pCmd - - for (let j = 0; j < pathExt.length; j ++) { - const cur = p + pathExt[j] - try { - const is = isexe.sync(cur, { pathExt: pathExtExe }) - if (is) { - if (opt.all) - found.push(cur) - else - return cur - } - } catch (ex) {} - } - } - - if (opt.all && found.length) - return found - - if (opt.nothrow) - return null - - throw getNotFoundError(cmd) -} - -module.exports = which -which.sync = whichSync diff --git a/action/package-lock.json b/action/package-lock.json index f25b7f95..0780f883 100644 --- a/action/package-lock.json +++ b/action/package-lock.json @@ -4,10 +4,11 @@ "requires": true, "packages": { "": { + "name": "action", "dependencies": { "@actions/core": "^1.10.0", "@actions/github": "^5.1.1", - "@deno/shim-deno": "^0.10.0", + "@deno/shim-deno": "^0.19.2", "formdata-polyfill": "^4.0.10", "undici": "^5.11.0" } @@ -41,18 +42,26 @@ } }, "node_modules/@deno/shim-deno": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/@deno/shim-deno/-/shim-deno-0.10.0.tgz", - "integrity": "sha512-E7rQ0Hk33V45xQXKEnCxizdSP5C+hhqw1H3xWXsct3kYFWgG93B5gN3LKlyvcxbckt8d67jVa6s+y5duRYawvg==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@deno/shim-deno/-/shim-deno-0.19.2.tgz", + "integrity": "sha512-q3VTHl44ad8T2Tw2SpeAvghdGOjlnLPDNO2cpOxwMrBE/PVas6geWpbpIgrM+czOCH0yejp0yi8OaTuB+NU40Q==", "dependencies": { - "@deno/shim-deno-test": "^0.3.2", - "which": "^2.0.2" + "@deno/shim-deno-test": "^0.5.0", + "which": "^4.0.0" } }, "node_modules/@deno/shim-deno-test": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@deno/shim-deno-test/-/shim-deno-test-0.3.3.tgz", - "integrity": "sha512-Ge0Tnl7zZY0VvEfgsyLhjid8DzI1d0La0dgm+3m0/A8gZXgp5xwlyIyue5e4SCUuVB/3AH/0lun9LcJhhTwmbg==" + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@deno/shim-deno-test/-/shim-deno-test-0.5.0.tgz", + "integrity": "sha512-4nMhecpGlPi0cSzT67L+Tm+GOJqvuk8gqHBziqcUQOarnuIax1z96/gJHCSIz2Z0zhxE6Rzwb3IZXPtFh51j+w==" + }, + "node_modules/@fastify/busboy": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", + "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", + "engines": { + "node": ">=14" + } }, "node_modules/@octokit/auth-token": { "version": "2.5.0", @@ -160,17 +169,6 @@ "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz", "integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ==" }, - "node_modules/busboy": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", - "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", - "dependencies": { - "streamsearch": "^1.1.0" - }, - "engines": { - "node": ">=10.16.0" - } - }, "node_modules/deprecation": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", @@ -218,9 +216,12 @@ } }, "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "engines": { + "node": ">=16" + } }, "node_modules/node-domexception": { "version": "1.0.0", @@ -267,14 +268,6 @@ "wrappy": "1" } }, - "node_modules/streamsearch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", - "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -289,14 +282,14 @@ } }, "node_modules/undici": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.11.0.tgz", - "integrity": "sha512-oWjWJHzFet0Ow4YZBkyiJwiK5vWqEYoH7BINzJAJOLedZ++JpAlCbUktW2GQ2DS2FpKmxD/JMtWUUWl1BtghGw==", + "version": "5.28.4", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", + "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", "dependencies": { - "busboy": "^1.6.0" + "@fastify/busboy": "^2.0.0" }, "engines": { - "node": ">=12.18" + "node": ">=14.0" } }, "node_modules/universal-user-agent": { @@ -335,17 +328,17 @@ } }, "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", "dependencies": { - "isexe": "^2.0.0" + "isexe": "^3.1.1" }, "bin": { - "node-which": "bin/node-which" + "node-which": "bin/which.js" }, "engines": { - "node": ">= 8" + "node": "^16.13.0 || >=18.0.0" } }, "node_modules/wrappy": { @@ -384,18 +377,23 @@ } }, "@deno/shim-deno": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/@deno/shim-deno/-/shim-deno-0.10.0.tgz", - "integrity": "sha512-E7rQ0Hk33V45xQXKEnCxizdSP5C+hhqw1H3xWXsct3kYFWgG93B5gN3LKlyvcxbckt8d67jVa6s+y5duRYawvg==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@deno/shim-deno/-/shim-deno-0.19.2.tgz", + "integrity": "sha512-q3VTHl44ad8T2Tw2SpeAvghdGOjlnLPDNO2cpOxwMrBE/PVas6geWpbpIgrM+czOCH0yejp0yi8OaTuB+NU40Q==", "requires": { - "@deno/shim-deno-test": "^0.3.2", - "which": "^2.0.2" + "@deno/shim-deno-test": "^0.5.0", + "which": "^4.0.0" } }, "@deno/shim-deno-test": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@deno/shim-deno-test/-/shim-deno-test-0.3.3.tgz", - "integrity": "sha512-Ge0Tnl7zZY0VvEfgsyLhjid8DzI1d0La0dgm+3m0/A8gZXgp5xwlyIyue5e4SCUuVB/3AH/0lun9LcJhhTwmbg==" + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@deno/shim-deno-test/-/shim-deno-test-0.5.0.tgz", + "integrity": "sha512-4nMhecpGlPi0cSzT67L+Tm+GOJqvuk8gqHBziqcUQOarnuIax1z96/gJHCSIz2Z0zhxE6Rzwb3IZXPtFh51j+w==" + }, + "@fastify/busboy": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", + "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==" }, "@octokit/auth-token": { "version": "2.5.0", @@ -497,14 +495,6 @@ "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz", "integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ==" }, - "busboy": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", - "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", - "requires": { - "streamsearch": "^1.1.0" - } - }, "deprecation": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", @@ -533,9 +523,9 @@ "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==" }, "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==" }, "node-domexception": { "version": "1.0.0", @@ -558,11 +548,6 @@ "wrappy": "1" } }, - "streamsearch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", - "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==" - }, "tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -574,11 +559,11 @@ "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" }, "undici": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.11.0.tgz", - "integrity": "sha512-oWjWJHzFet0Ow4YZBkyiJwiK5vWqEYoH7BINzJAJOLedZ++JpAlCbUktW2GQ2DS2FpKmxD/JMtWUUWl1BtghGw==", + "version": "5.28.4", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", + "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", "requires": { - "busboy": "^1.6.0" + "@fastify/busboy": "^2.0.0" } }, "universal-user-agent": { @@ -611,11 +596,11 @@ } }, "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", "requires": { - "isexe": "^2.0.0" + "isexe": "^3.1.1" } }, "wrappy": { diff --git a/action/package.json b/action/package.json index 0b0c7e6a..c2303dbf 100644 --- a/action/package.json +++ b/action/package.json @@ -3,7 +3,7 @@ "dependencies": { "@actions/core": "^1.10.0", "@actions/github": "^5.1.1", - "@deno/shim-deno": "^0.10.0", + "@deno/shim-deno": "^0.19.2", "formdata-polyfill": "^4.0.10", "undici": "^5.11.0" } diff --git a/deno.json b/deno.json index 46fde0aa..560e27c7 100644 --- a/deno.json +++ b/deno.json @@ -14,7 +14,7 @@ }, "tasks": { "test": "deno test -A --unstable tests/ src/", - "build-action": "deno bundle ./src/utils/mod.ts > ./action/deps.js", + "build-action": "deno run --allow-read --allow-env ./tools/bundle.ts ./src/utils/mod.ts > ./action/deps.js", "version-match": "deno run --allow-read --allow-env ./tools/version_match.ts" }, "imports": { diff --git a/deno.lock b/deno.lock index 6cb45c0c..7f7ec61c 100644 --- a/deno.lock +++ b/deno.lock @@ -2,35 +2,71 @@ "version": "3", "packages": { "specifiers": { + "jsr:@deno/cache-dir@0.8": "jsr:@deno/cache-dir@0.8.0", + "jsr:@deno/emit@0.43.1": "jsr:@deno/emit@0.43.1", "jsr:@std/assert@0.217": "jsr:@std/assert@0.217.0", "jsr:@std/assert@^0.217.0": "jsr:@std/assert@0.217.0", + "jsr:@std/assert@^0.218.2": "jsr:@std/assert@0.218.2", + "jsr:@std/assert@^0.223.0": "jsr:@std/assert@0.223.0", "jsr:@std/async@0.217": "jsr:@std/async@0.217.0", + "jsr:@std/bytes@^0.218.2": "jsr:@std/bytes@0.218.2", "jsr:@std/dotenv@0.217": "jsr:@std/dotenv@0.217.0", "jsr:@std/encoding@0.217": "jsr:@std/encoding@0.217.0", "jsr:@std/flags@0.217": "jsr:@std/flags@0.217.0", "jsr:@std/flags@0.217.0": "jsr:@std/flags@0.217.0", "jsr:@std/fmt@0.217": "jsr:@std/fmt@0.217.0", "jsr:@std/fmt@^0.217.0": "jsr:@std/fmt@0.217.0", + "jsr:@std/fmt@^0.218.2": "jsr:@std/fmt@0.218.2", + "jsr:@std/fs@^0.218.2": "jsr:@std/fs@0.218.2", + "jsr:@std/io@^0.218.2": "jsr:@std/io@0.218.2", "jsr:@std/json@^0.217.0": "jsr:@std/json@0.217.0", "jsr:@std/jsonc@0.217": "jsr:@std/jsonc@0.217.0", "jsr:@std/path@0.217": "jsr:@std/path@0.217.0", + "jsr:@std/path@1.0.1": "jsr:@std/path@1.0.1", + "jsr:@std/path@^0.218.2": "jsr:@std/path@0.218.2", + "jsr:@std/path@^0.223.0": "jsr:@std/path@0.223.0", "jsr:@std/semver@0.217": "jsr:@std/semver@0.217.0", "jsr:@std/streams@0.217": "jsr:@std/streams@0.217.0", "npm:keychain@1.5.0": "npm:keychain@1.5.0" }, "jsr": { + "@deno/cache-dir@0.8.0": { + "integrity": "e87e80a404958f6350d903e6238b72afb92468378b0b32111f7a1e4916ac7fe7", + "dependencies": [ + "jsr:@std/fmt@^0.218.2", + "jsr:@std/fs@^0.218.2", + "jsr:@std/io@^0.218.2", + "jsr:@std/path@^0.218.2" + ] + }, + "@deno/emit@0.43.1": { + "integrity": "4abb1a899b0126990f764e545341f3be592cae80a86faac8365d8076a24177ac", + "dependencies": [ + "jsr:@deno/cache-dir@0.8", + "jsr:@std/path@^0.223.0" + ] + }, "@std/assert@0.217.0": { "integrity": "c98e279362ca6982d5285c3b89517b757c1e3477ee9f14eb2fdf80a45aaa9642", "dependencies": [ "jsr:@std/fmt@^0.217.0" ] }, + "@std/assert@0.218.2": { + "integrity": "7f0a5a1a8cf86607cd6c2c030584096e1ffad27fc9271429a8cb48cfbdee5eaf" + }, + "@std/assert@0.223.0": { + "integrity": "eb8d6d879d76e1cc431205bd346ed4d88dc051c6366365b1af47034b0670be24" + }, "@std/async@0.217.0": { "integrity": "14dac94f59595e39e519de379c47170d8bbedea253824c4b167108aa943ddb69", "dependencies": [ "jsr:@std/assert@^0.217.0" ] }, + "@std/bytes@0.218.2": { + "integrity": "91fe54b232dcca73856b79a817247f4a651dbb60d51baafafb6408c137241670" + }, "@std/dotenv@0.217.0": { "integrity": "e65cbbf669f482c320b2f94d0a2fc536f1fcd06afdcfa4fde358129a18d1d428" }, @@ -46,6 +82,19 @@ "@std/fmt@0.217.0": { "integrity": "cb99f82500b8da20202fedfa8bb94dd0222e81f0494ed9087de20ee3d8a39a8d" }, + "@std/fmt@0.218.2": { + "integrity": "99526449d2505aa758b6cbef81e7dd471d8b28ec0dcb1491d122b284c548788a" + }, + "@std/fs@0.218.2": { + "integrity": "dd9431453f7282e8c577cc22c9e6d036055a9a980b5549f887d6012969fabcca" + }, + "@std/io@0.218.2": { + "integrity": "c64fbfa087b7c9d4d386c5672f291f607d88cb7d44fc299c20c713e345f2785f", + "dependencies": [ + "jsr:@std/assert@^0.218.2", + "jsr:@std/bytes@^0.218.2" + ] + }, "@std/json@0.217.0": { "integrity": "173f1156d23d11095b6ff7df6266c80e8f83afcd9a6af1731ec301f485806986" }, @@ -62,6 +111,21 @@ "jsr:@std/assert@^0.217.0" ] }, + "@std/path@0.218.2": { + "integrity": "b568fd923d9e53ad76d17c513e7310bda8e755a3e825e6289a0ce536404e2662", + "dependencies": [ + "jsr:@std/assert@^0.218.2" + ] + }, + "@std/path@0.223.0": { + "integrity": "593963402d7e6597f5a6e620931661053572c982fc014000459edc1f93cc3989", + "dependencies": [ + "jsr:@std/assert@^0.223.0" + ] + }, + "@std/path@1.0.1": { + "integrity": "e061ff02c28481ca49e3a14981875c345e9fc7e973190672782cd0ac8af70428" + }, "@std/semver@0.217.0": { "integrity": "c1ba42cdcaacf610f1a62ec2256ab29765a73fede65120214c3acb9c85ed3d35" }, diff --git a/src/utils/mod.ts b/src/utils/mod.ts index 804e8e74..5defdbad 100644 --- a/src/utils/mod.ts +++ b/src/utils/mod.ts @@ -3,7 +3,7 @@ import { semverGreaterThanOrEquals, semverParse } from "../../deps.ts"; export { parseEntrypoint } from "./entrypoint.ts"; export { API, APIError } from "./api.ts"; export { walk } from "./walk.ts"; -export { fromFileUrl, resolve } from "../../deps.ts"; +export { fromFileUrl, normalize, resolve } from "../../deps.ts"; // deno-lint-ignore no-explicit-any export function isTerminal(stream: any) { diff --git a/tools/bundle.ts b/tools/bundle.ts new file mode 100644 index 00000000..29f5fbd9 --- /dev/null +++ b/tools/bundle.ts @@ -0,0 +1,13 @@ +// Copyright 2024 Deno Land Inc. All rights reserved. MIT license. + +import { bundle } from "jsr:@deno/emit@0.43.1"; +import { resolve } from "jsr:@std/path@1.0.1/resolve"; + +const entrypoint = Deno.args[0]; +const resolvedPath = resolve(Deno.cwd(), entrypoint); +const result = await bundle(resolvedPath); +console.log(`// deno-fmt-ignore-file +// deno-lint-ignore-file +// This code was bundled using \`deno task build-action\` and it's not recommended to edit it manually +`); +console.log(result.code);