diff options
author | 2023-09-15 16:00:59 -0700 | |
---|---|---|
committer | 2023-09-15 16:00:59 -0700 | |
commit | d976b22c95383c2623b7604ffef0563e5d53ca24 (patch) | |
tree | c0d65386bdd83cd0c35c14ee8e7d1b4269071a24 /src/js/out/InternalModuleRegistryConstants.h | |
parent | 575a85a3fdc8c938743bafbc72c604dea95fbc17 (diff) | |
download | bun-d976b22c95383c2623b7604ffef0563e5d53ca24.tar.gz bun-d976b22c95383c2623b7604ffef0563e5d53ca24.tar.zst bun-d976b22c95383c2623b7604ffef0563e5d53ca24.zip |
Update InternalModuleRegistryConstants.h
Diffstat (limited to 'src/js/out/InternalModuleRegistryConstants.h')
-rw-r--r-- | src/js/out/InternalModuleRegistryConstants.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/js/out/InternalModuleRegistryConstants.h b/src/js/out/InternalModuleRegistryConstants.h index a8a4bfd84..c494e3ea2 100644 --- a/src/js/out/InternalModuleRegistryConstants.h +++ b/src/js/out/InternalModuleRegistryConstants.h @@ -182,7 +182,7 @@ static constexpr ASCIILiteral NodeTraceEventsCode = "(function (){\"use strict\" // // -static constexpr ASCIILiteral NodeTtyCode = "(function (){\"use strict\";// src/js/out/tmp/node/tty.ts\nvar ReadStream = function(fd) {\n if (!(this instanceof ReadStream))\n return new ReadStream(fd);\n if (fd >> 0 !== fd || fd < 0)\n @throwRangeError(\"fd must be a positive integer\");\n const stream = (@getInternalField(@internalModuleRegistry, 19) || @createInternalModuleById(19)).ReadStream.call(this, \"\", {\n fd\n });\n return stream.isRaw = !1, stream.isTTY = isatty(stream.fd), stream;\n}, warnOnDeactivatedColors = function(env) {\n if (warned)\n return;\n let name = \"\";\n if (env.NODE_DISABLE_COLORS !== @undefined)\n name = \"NODE_DISABLE_COLORS\";\n if (env.NO_COLOR !== @undefined) {\n if (name !== \"\")\n name += \"' and '\";\n name += \"NO_COLOR\";\n }\n if (name !== \"\")\n process.emitWarning(`The '${name}' env is ignored due to the 'FORCE_COLOR' env being set.`, \"Warning\"), warned = !0;\n}, WriteStream = function(fd) {\n if (!(this instanceof WriteStream))\n return new WriteStream(fd);\n if (fd >> 0 !== fd || fd < 0)\n @throwRangeError(\"fd must be a positive integer\");\n const stream = (@getInternalField(@internalModuleRegistry, 19) || @createInternalModuleById(19)).WriteStream.call(this, \"\", {\n fd\n });\n if (stream.columns = @undefined, stream.rows = @undefined, stream.isTTY = isatty(stream.fd), stream.isTTY) {\n const windowSizeArray = [0, 0];\n if (_getWindowSize(fd, windowSizeArray) === !0)\n stream.columns = windowSizeArray[0], stream.rows = windowSizeArray[1];\n }\n return stream;\n}, { ttySetMode, isatty, getWindowSize: _getWindowSize } = @lazy(\"tty\");\nObject.defineProperty(ReadStream, \"prototype\", {\n get() {\n const Real = (@getInternalField(@internalModuleRegistry, 19) || @createInternalModuleById(19)).ReadStream.prototype;\n return Object.defineProperty(ReadStream, \"prototype\", { value: Real }), ReadStream.prototype.setRawMode = function(flag) {\n const mode = flag \? 1 : 0, err = ttySetMode(this.fd, mode);\n if (err)\n return this.emit(\"error\", new Error(\"setRawMode failed with errno:\", err)), this;\n return this.isRaw = flag, this;\n }, Real;\n },\n enumerable: !0,\n configurable: !0\n});\nvar COLORS_2 = 1, COLORS_16 = 4, COLORS_256 = 8, COLORS_16m = 24, TERM_ENVS = {\n eterm: COLORS_16,\n cons25: COLORS_16,\n console: COLORS_16,\n cygwin: COLORS_16,\n dtterm: COLORS_16,\n gnome: COLORS_16,\n hurd: COLORS_16,\n jfbterm: COLORS_16,\n konsole: COLORS_16,\n kterm: COLORS_16,\n mlterm: COLORS_16,\n mosh: COLORS_16m,\n putty: COLORS_16,\n st: COLORS_16,\n \"rxvt-unicode-24bit\": COLORS_16m,\n terminator: COLORS_16m\n}, TERM_ENVS_REG_EXP = [/ansi/, /color/, /linux/, /^con[0-9]*x[0-9]/, /^rxvt/, /^screen/, /^xterm/, /^vt100/], warned = !1;\nObject.defineProperty(WriteStream, \"prototype\", {\n get() {\n const Real = (@getInternalField(@internalModuleRegistry, 19) || @createInternalModuleById(19)).WriteStream.prototype;\n Object.defineProperty(WriteStream, \"prototype\", { value: Real }), WriteStream.prototype._refreshSize = function() {\n const oldCols = this.columns, oldRows = this.rows, windowSizeArray = [0, 0];\n if (_getWindowSize(this.fd, windowSizeArray) === !0) {\n if (oldCols !== windowSizeArray[0] || oldRows !== windowSizeArray[1])\n this.columns = windowSizeArray[0], this.rows = windowSizeArray[1], this.emit(\"resize\");\n }\n };\n var readline = @undefined;\n return WriteStream.prototype.clearLine = function(dir, cb) {\n return (readline \?\?= @getInternalField(@internalModuleRegistry, 33) || @createInternalModuleById(33)).clearLine(this, dir, cb);\n }, WriteStream.prototype.clearScreenDown = function(cb) {\n return (readline \?\?= @getInternalField(@internalModuleRegistry, 33) || @createInternalModuleById(33)).clearScreenDown(this, cb);\n }, WriteStream.prototype.cursorTo = function(x, y, cb) {\n return (readline \?\?= @getInternalField(@internalModuleRegistry, 33) || @createInternalModuleById(33)).cursorTo(this, x, y, cb);\n }, WriteStream.prototype.getColorDepth = function(env = process.env) {\n if (env.FORCE_COLOR !== @undefined)\n switch (env.FORCE_COLOR) {\n case \"\":\n case \"1\":\n case \"true\":\n return warnOnDeactivatedColors(env), COLORS_16;\n case \"2\":\n return warnOnDeactivatedColors(env), COLORS_256;\n case \"3\":\n return warnOnDeactivatedColors(env), COLORS_16m;\n default:\n return COLORS_2;\n }\n if (env.NODE_DISABLE_COLORS !== @undefined || env.NO_COLOR !== @undefined || env.TERM === \"dumb\")\n return COLORS_2;\n if (env.TMUX)\n return COLORS_256;\n if (env.CI) {\n if ([\"APPVEYOR\", \"BUILDKITE\", \"CIRCLECI\", \"DRONE\", \"GITHUB_ACTIONS\", \"GITLAB_CI\", \"TRAVIS\"].some((sign) => (sign in env)) || env.CI_NAME === \"codeship\")\n return COLORS_256;\n return COLORS_2;\n }\n if (\"TEAMCITY_VERSION\" in env)\n return /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) !== null \? COLORS_16 : COLORS_2;\n switch (env.TERM_PROGRAM) {\n case \"iTerm.app\":\n if (!env.TERM_PROGRAM_VERSION || /^[0-2]\\./.test(env.TERM_PROGRAM_VERSION))\n return COLORS_256;\n return COLORS_16m;\n case \"HyperTerm\":\n case \"MacTerm\":\n return COLORS_16m;\n case \"Apple_Terminal\":\n return COLORS_256;\n }\n if (env.COLORTERM === \"truecolor\" || env.COLORTERM === \"24bit\")\n return COLORS_16m;\n if (env.TERM) {\n if (/^xterm-256/.test(env.TERM) !== null)\n return COLORS_256;\n const termEnv = env.TERM.toLowerCase();\n if (TERM_ENVS[termEnv])\n return TERM_ENVS[termEnv];\n if (TERM_ENVS_REG_EXP.some((term) => term.test(termEnv)))\n return COLORS_16;\n }\n if (env.COLORTERM)\n return COLORS_16;\n return COLORS_2;\n }, WriteStream.prototype.getWindowSize = function() {\n return [this.columns, this.rows];\n }, WriteStream.prototype.hasColors = function(count, env) {\n if (env === @undefined && (count === @undefined || typeof count === \"object\" && count !== null))\n env = count, count = 16;\n else\n validateInteger(count, \"count\", 2);\n return count <= 2 ** this.getColorDepth(env);\n }, WriteStream.prototype.moveCursor = function(dx, dy, cb) {\n return (readline \?\?= @getInternalField(@internalModuleRegistry, 33) || @createInternalModuleById(33)).moveCursor(this, dx, dy, cb);\n }, Real;\n },\n enumerable: !0,\n configurable: !0\n});\nvar validateInteger = (value, name, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) => {\n if (typeof value !== \"number\")\n throw new ERR_INVALID_ARG_TYPE(name, \"number\", value);\n if (!Number.isInteger(value))\n throw new ERR_OUT_OF_RANGE(name, \"an integer\", value);\n if (value < min || value > max)\n throw new ERR_OUT_OF_RANGE(name, `>= ${min} && <= ${max}`, value);\n};\nreturn { ReadStream, WriteStream, isatty }})\n"_s; +static constexpr ASCIILiteral NodeTtyCode = "(function (){\"use strict\";// src/js/out/tmp/node/tty.ts\nvar ReadStream = function(fd) {\n if (!(this instanceof ReadStream))\n return new ReadStream(fd);\n if (fd >> 0 !== fd || fd < 0)\n @throwRangeError(\"fd must be a positive integer\");\n const stream = (@getInternalField(@internalModuleRegistry, 19) || @createInternalModuleById(19)).ReadStream.call(this, \"\", {\n fd\n });\n return stream.isRaw = !1, stream.isTTY = isatty(stream.fd), stream;\n}, warnOnDeactivatedColors = function(env) {\n if (warned)\n return;\n let name = \"\";\n if (env.NODE_DISABLE_COLORS !== @undefined)\n name = \"NODE_DISABLE_COLORS\";\n if (env.NO_COLOR !== @undefined) {\n if (name !== \"\")\n name += \"' and '\";\n name += \"NO_COLOR\";\n }\n if (name !== \"\")\n process.emitWarning(`The '${name}' env is ignored due to the 'FORCE_COLOR' env being set.`, \"Warning\"), warned = !0;\n}, WriteStream = function(fd) {\n if (!(this instanceof WriteStream))\n return new WriteStream(fd);\n if (fd >> 0 !== fd || fd < 0)\n @throwRangeError(\"fd must be a positive integer\");\n const stream = (@getInternalField(@internalModuleRegistry, 19) || @createInternalModuleById(19)).WriteStream.call(this, \"\", {\n fd\n });\n if (stream.columns = @undefined, stream.rows = @undefined, stream.isTTY = isatty(stream.fd), stream.isTTY) {\n const windowSizeArray = [0, 0];\n if (_getWindowSize(fd, windowSizeArray) === !0)\n stream.columns = windowSizeArray[0], stream.rows = windowSizeArray[1];\n }\n return stream;\n}, { ttySetMode, isatty, getWindowSize: _getWindowSize } = @lazy(\"tty\");\nObject.defineProperty(ReadStream, \"prototype\", {\n get() {\n const Real = (@getInternalField(@internalModuleRegistry, 19) || @createInternalModuleById(19)).ReadStream.prototype;\n return Object.defineProperty(ReadStream, \"prototype\", { value: Real }), ReadStream.prototype.setRawMode = function(flag) {\n const mode = flag \? 1 : 0, err = ttySetMode(this.fd, mode);\n if (err)\n return this.emit(\"error\", new Error(\"setRawMode failed with errno:\", err)), this;\n return this.isRaw = flag, this;\n }, Real;\n },\n enumerable: !0,\n configurable: !0\n});\nvar COLORS_2 = 1, COLORS_16 = 4, COLORS_256 = 8, COLORS_16m = 24, TERM_ENVS = {\n eterm: COLORS_16,\n cons25: COLORS_16,\n console: COLORS_16,\n cygwin: COLORS_16,\n dtterm: COLORS_16,\n gnome: COLORS_16,\n hurd: COLORS_16,\n jfbterm: COLORS_16,\n konsole: COLORS_16,\n kterm: COLORS_16,\n mlterm: COLORS_16,\n mosh: COLORS_16m,\n putty: COLORS_16,\n st: COLORS_16,\n \"rxvt-unicode-24bit\": COLORS_16m,\n terminator: COLORS_16m\n}, TERM_ENVS_REG_EXP = [/ansi/, /color/, /linux/, /^con[0-9]*x[0-9]/, /^rxvt/, /^screen/, /^xterm/, /^vt100/], warned = !1;\nObject.defineProperty(WriteStream, \"prototype\", {\n get() {\n const Real = (@getInternalField(@internalModuleRegistry, 19) || @createInternalModuleById(19)).WriteStream.prototype;\n Object.defineProperty(WriteStream, \"prototype\", { value: Real }), WriteStream.prototype._refreshSize = function() {\n const oldCols = this.columns, oldRows = this.rows, windowSizeArray = [0, 0];\n if (_getWindowSize(this.fd, windowSizeArray) === !0) {\n if (oldCols !== windowSizeArray[0] || oldRows !== windowSizeArray[1])\n this.columns = windowSizeArray[0], this.rows = windowSizeArray[1], this.emit(\"resize\");\n }\n };\n var readline = @undefined;\n return WriteStream.prototype.clearLine = function(dir, cb) {\n return (readline \?\?= @getInternalField(@internalModuleRegistry, 33) || @createInternalModuleById(33)).clearLine(this, dir, cb);\n }, WriteStream.prototype.clearScreenDown = function(cb) {\n return (readline \?\?= @getInternalField(@internalModuleRegistry, 33) || @createInternalModuleById(33)).clearScreenDown(this, cb);\n }, WriteStream.prototype.cursorTo = function(x, y, cb) {\n return (readline \?\?= @getInternalField(@internalModuleRegistry, 33) || @createInternalModuleById(33)).cursorTo(this, x, y, cb);\n }, WriteStream.prototype.getColorDepth = function(env = process.env) {\n if (env.FORCE_COLOR !== @undefined)\n switch (env.FORCE_COLOR) {\n case \"\":\n case \"1\":\n case \"true\":\n return warnOnDeactivatedColors(env), COLORS_16;\n case \"2\":\n return warnOnDeactivatedColors(env), COLORS_256;\n case \"3\":\n return warnOnDeactivatedColors(env), COLORS_16m;\n default:\n return COLORS_2;\n }\n if (env.NODE_DISABLE_COLORS !== @undefined || env.NO_COLOR !== @undefined || env.TERM === \"dumb\")\n return COLORS_2;\n if (env.TMUX)\n return COLORS_256;\n if (env.CI) {\n if ([\"APPVEYOR\", \"BUILDKITE\", \"CIRCLECI\", \"DRONE\", \"GITHUB_ACTIONS\", \"GITLAB_CI\", \"TRAVIS\"].some((sign) => (sign in env)) || env.CI_NAME === \"codeship\")\n return COLORS_256;\n return COLORS_2;\n }\n if (\"TEAMCITY_VERSION\" in env)\n return /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) \? COLORS_16 : COLORS_2;\n switch (env.TERM_PROGRAM) {\n case \"iTerm.app\":\n if (!env.TERM_PROGRAM_VERSION || /^[0-2]\\./.test(env.TERM_PROGRAM_VERSION))\n return COLORS_256;\n return COLORS_16m;\n case \"HyperTerm\":\n case \"MacTerm\":\n return COLORS_16m;\n case \"Apple_Terminal\":\n return COLORS_256;\n }\n if (env.COLORTERM === \"truecolor\" || env.COLORTERM === \"24bit\")\n return COLORS_16m;\n if (env.TERM) {\n if (/^xterm-256/.test(env.TERM) !== null)\n return COLORS_256;\n const termEnv = env.TERM.toLowerCase();\n if (TERM_ENVS[termEnv])\n return TERM_ENVS[termEnv];\n if (TERM_ENVS_REG_EXP.some((term) => term.test(termEnv)))\n return COLORS_16;\n }\n if (env.COLORTERM)\n return COLORS_16;\n return COLORS_2;\n }, WriteStream.prototype.getWindowSize = function() {\n return [this.columns, this.rows];\n }, WriteStream.prototype.hasColors = function(count, env) {\n if (env === @undefined && (count === @undefined || typeof count === \"object\" && count !== null))\n env = count, count = 16;\n else\n validateInteger(count, \"count\", 2);\n return count <= 2 ** this.getColorDepth(env);\n }, WriteStream.prototype.moveCursor = function(dx, dy, cb) {\n return (readline \?\?= @getInternalField(@internalModuleRegistry, 33) || @createInternalModuleById(33)).moveCursor(this, dx, dy, cb);\n }, Real;\n },\n enumerable: !0,\n configurable: !0\n});\nvar validateInteger = (value, name, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) => {\n if (typeof value !== \"number\")\n throw new ERR_INVALID_ARG_TYPE(name, \"number\", value);\n if (!Number.isInteger(value))\n throw new ERR_OUT_OF_RANGE(name, \"an integer\", value);\n if (value < min || value > max)\n throw new ERR_OUT_OF_RANGE(name, `>= ${min} && <= ${max}`, value);\n};\nreturn { ReadStream, WriteStream, isatty }})\n"_s; // // @@ -665,7 +665,7 @@ static constexpr ASCIILiteral NodeTraceEventsCode = "(function (){\"use strict\" // // -static constexpr ASCIILiteral NodeTtyCode = "(function (){\"use strict\";// src/js/out/tmp/node/tty.ts\nvar ReadStream = function(fd) {\n if (!(this instanceof ReadStream))\n return new ReadStream(fd);\n if (fd >> 0 !== fd || fd < 0)\n @throwRangeError(\"fd must be a positive integer\");\n const stream = (@getInternalField(@internalModuleRegistry, 19) || @createInternalModuleById(19)).ReadStream.call(this, \"\", {\n fd\n });\n return stream.isRaw = !1, stream.isTTY = isatty(stream.fd), stream;\n}, warnOnDeactivatedColors = function(env) {\n if (warned)\n return;\n let name = \"\";\n if (env.NODE_DISABLE_COLORS !== @undefined)\n name = \"NODE_DISABLE_COLORS\";\n if (env.NO_COLOR !== @undefined) {\n if (name !== \"\")\n name += \"' and '\";\n name += \"NO_COLOR\";\n }\n if (name !== \"\")\n process.emitWarning(`The '${name}' env is ignored due to the 'FORCE_COLOR' env being set.`, \"Warning\"), warned = !0;\n}, WriteStream = function(fd) {\n if (!(this instanceof WriteStream))\n return new WriteStream(fd);\n if (fd >> 0 !== fd || fd < 0)\n @throwRangeError(\"fd must be a positive integer\");\n const stream = (@getInternalField(@internalModuleRegistry, 19) || @createInternalModuleById(19)).WriteStream.call(this, \"\", {\n fd\n });\n if (stream.columns = @undefined, stream.rows = @undefined, stream.isTTY = isatty(stream.fd), stream.isTTY) {\n const windowSizeArray = [0, 0];\n if (_getWindowSize(fd, windowSizeArray) === !0)\n stream.columns = windowSizeArray[0], stream.rows = windowSizeArray[1];\n }\n return stream;\n}, { ttySetMode, isatty, getWindowSize: _getWindowSize } = @lazy(\"tty\");\nObject.defineProperty(ReadStream, \"prototype\", {\n get() {\n const Real = (@getInternalField(@internalModuleRegistry, 19) || @createInternalModuleById(19)).ReadStream.prototype;\n return Object.defineProperty(ReadStream, \"prototype\", { value: Real }), ReadStream.prototype.setRawMode = function(flag) {\n const mode = flag \? 1 : 0, err = ttySetMode(this.fd, mode);\n if (err)\n return this.emit(\"error\", new Error(\"setRawMode failed with errno:\", err)), this;\n return this.isRaw = flag, this;\n }, Real;\n },\n enumerable: !0,\n configurable: !0\n});\nvar COLORS_2 = 1, COLORS_16 = 4, COLORS_256 = 8, COLORS_16m = 24, TERM_ENVS = {\n eterm: COLORS_16,\n cons25: COLORS_16,\n console: COLORS_16,\n cygwin: COLORS_16,\n dtterm: COLORS_16,\n gnome: COLORS_16,\n hurd: COLORS_16,\n jfbterm: COLORS_16,\n konsole: COLORS_16,\n kterm: COLORS_16,\n mlterm: COLORS_16,\n mosh: COLORS_16m,\n putty: COLORS_16,\n st: COLORS_16,\n \"rxvt-unicode-24bit\": COLORS_16m,\n terminator: COLORS_16m\n}, TERM_ENVS_REG_EXP = [/ansi/, /color/, /linux/, /^con[0-9]*x[0-9]/, /^rxvt/, /^screen/, /^xterm/, /^vt100/], warned = !1;\nObject.defineProperty(WriteStream, \"prototype\", {\n get() {\n const Real = (@getInternalField(@internalModuleRegistry, 19) || @createInternalModuleById(19)).WriteStream.prototype;\n Object.defineProperty(WriteStream, \"prototype\", { value: Real }), WriteStream.prototype._refreshSize = function() {\n const oldCols = this.columns, oldRows = this.rows, windowSizeArray = [0, 0];\n if (_getWindowSize(this.fd, windowSizeArray) === !0) {\n if (oldCols !== windowSizeArray[0] || oldRows !== windowSizeArray[1])\n this.columns = windowSizeArray[0], this.rows = windowSizeArray[1], this.emit(\"resize\");\n }\n };\n var readline = @undefined;\n return WriteStream.prototype.clearLine = function(dir, cb) {\n return (readline \?\?= @getInternalField(@internalModuleRegistry, 33) || @createInternalModuleById(33)).clearLine(this, dir, cb);\n }, WriteStream.prototype.clearScreenDown = function(cb) {\n return (readline \?\?= @getInternalField(@internalModuleRegistry, 33) || @createInternalModuleById(33)).clearScreenDown(this, cb);\n }, WriteStream.prototype.cursorTo = function(x, y, cb) {\n return (readline \?\?= @getInternalField(@internalModuleRegistry, 33) || @createInternalModuleById(33)).cursorTo(this, x, y, cb);\n }, WriteStream.prototype.getColorDepth = function(env = process.env) {\n if (env.FORCE_COLOR !== @undefined)\n switch (env.FORCE_COLOR) {\n case \"\":\n case \"1\":\n case \"true\":\n return warnOnDeactivatedColors(env), COLORS_16;\n case \"2\":\n return warnOnDeactivatedColors(env), COLORS_256;\n case \"3\":\n return warnOnDeactivatedColors(env), COLORS_16m;\n default:\n return COLORS_2;\n }\n if (env.NODE_DISABLE_COLORS !== @undefined || env.NO_COLOR !== @undefined || env.TERM === \"dumb\")\n return COLORS_2;\n if (env.TMUX)\n return COLORS_256;\n if (env.CI) {\n if ([\"APPVEYOR\", \"BUILDKITE\", \"CIRCLECI\", \"DRONE\", \"GITHUB_ACTIONS\", \"GITLAB_CI\", \"TRAVIS\"].some((sign) => (sign in env)) || env.CI_NAME === \"codeship\")\n return COLORS_256;\n return COLORS_2;\n }\n if (\"TEAMCITY_VERSION\" in env)\n return /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) !== null \? COLORS_16 : COLORS_2;\n switch (env.TERM_PROGRAM) {\n case \"iTerm.app\":\n if (!env.TERM_PROGRAM_VERSION || /^[0-2]\\./.test(env.TERM_PROGRAM_VERSION))\n return COLORS_256;\n return COLORS_16m;\n case \"HyperTerm\":\n case \"MacTerm\":\n return COLORS_16m;\n case \"Apple_Terminal\":\n return COLORS_256;\n }\n if (env.COLORTERM === \"truecolor\" || env.COLORTERM === \"24bit\")\n return COLORS_16m;\n if (env.TERM) {\n if (/^xterm-256/.test(env.TERM) !== null)\n return COLORS_256;\n const termEnv = env.TERM.toLowerCase();\n if (TERM_ENVS[termEnv])\n return TERM_ENVS[termEnv];\n if (TERM_ENVS_REG_EXP.some((term) => term.test(termEnv)))\n return COLORS_16;\n }\n if (env.COLORTERM)\n return COLORS_16;\n return COLORS_2;\n }, WriteStream.prototype.getWindowSize = function() {\n return [this.columns, this.rows];\n }, WriteStream.prototype.hasColors = function(count, env) {\n if (env === @undefined && (count === @undefined || typeof count === \"object\" && count !== null))\n env = count, count = 16;\n else\n validateInteger(count, \"count\", 2);\n return count <= 2 ** this.getColorDepth(env);\n }, WriteStream.prototype.moveCursor = function(dx, dy, cb) {\n return (readline \?\?= @getInternalField(@internalModuleRegistry, 33) || @createInternalModuleById(33)).moveCursor(this, dx, dy, cb);\n }, Real;\n },\n enumerable: !0,\n configurable: !0\n});\nvar validateInteger = (value, name, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) => {\n if (typeof value !== \"number\")\n throw new ERR_INVALID_ARG_TYPE(name, \"number\", value);\n if (!Number.isInteger(value))\n throw new ERR_OUT_OF_RANGE(name, \"an integer\", value);\n if (value < min || value > max)\n throw new ERR_OUT_OF_RANGE(name, `>= ${min} && <= ${max}`, value);\n};\nreturn { ReadStream, WriteStream, isatty }})\n"_s; +static constexpr ASCIILiteral NodeTtyCode = "(function (){\"use strict\";// src/js/out/tmp/node/tty.ts\nvar ReadStream = function(fd) {\n if (!(this instanceof ReadStream))\n return new ReadStream(fd);\n if (fd >> 0 !== fd || fd < 0)\n @throwRangeError(\"fd must be a positive integer\");\n const stream = (@getInternalField(@internalModuleRegistry, 19) || @createInternalModuleById(19)).ReadStream.call(this, \"\", {\n fd\n });\n return stream.isRaw = !1, stream.isTTY = isatty(stream.fd), stream;\n}, warnOnDeactivatedColors = function(env) {\n if (warned)\n return;\n let name = \"\";\n if (env.NODE_DISABLE_COLORS !== @undefined)\n name = \"NODE_DISABLE_COLORS\";\n if (env.NO_COLOR !== @undefined) {\n if (name !== \"\")\n name += \"' and '\";\n name += \"NO_COLOR\";\n }\n if (name !== \"\")\n process.emitWarning(`The '${name}' env is ignored due to the 'FORCE_COLOR' env being set.`, \"Warning\"), warned = !0;\n}, WriteStream = function(fd) {\n if (!(this instanceof WriteStream))\n return new WriteStream(fd);\n if (fd >> 0 !== fd || fd < 0)\n @throwRangeError(\"fd must be a positive integer\");\n const stream = (@getInternalField(@internalModuleRegistry, 19) || @createInternalModuleById(19)).WriteStream.call(this, \"\", {\n fd\n });\n if (stream.columns = @undefined, stream.rows = @undefined, stream.isTTY = isatty(stream.fd), stream.isTTY) {\n const windowSizeArray = [0, 0];\n if (_getWindowSize(fd, windowSizeArray) === !0)\n stream.columns = windowSizeArray[0], stream.rows = windowSizeArray[1];\n }\n return stream;\n}, { ttySetMode, isatty, getWindowSize: _getWindowSize } = @lazy(\"tty\");\nObject.defineProperty(ReadStream, \"prototype\", {\n get() {\n const Real = (@getInternalField(@internalModuleRegistry, 19) || @createInternalModuleById(19)).ReadStream.prototype;\n return Object.defineProperty(ReadStream, \"prototype\", { value: Real }), ReadStream.prototype.setRawMode = function(flag) {\n const mode = flag \? 1 : 0, err = ttySetMode(this.fd, mode);\n if (err)\n return this.emit(\"error\", new Error(\"setRawMode failed with errno:\", err)), this;\n return this.isRaw = flag, this;\n }, Real;\n },\n enumerable: !0,\n configurable: !0\n});\nvar COLORS_2 = 1, COLORS_16 = 4, COLORS_256 = 8, COLORS_16m = 24, TERM_ENVS = {\n eterm: COLORS_16,\n cons25: COLORS_16,\n console: COLORS_16,\n cygwin: COLORS_16,\n dtterm: COLORS_16,\n gnome: COLORS_16,\n hurd: COLORS_16,\n jfbterm: COLORS_16,\n konsole: COLORS_16,\n kterm: COLORS_16,\n mlterm: COLORS_16,\n mosh: COLORS_16m,\n putty: COLORS_16,\n st: COLORS_16,\n \"rxvt-unicode-24bit\": COLORS_16m,\n terminator: COLORS_16m\n}, TERM_ENVS_REG_EXP = [/ansi/, /color/, /linux/, /^con[0-9]*x[0-9]/, /^rxvt/, /^screen/, /^xterm/, /^vt100/], warned = !1;\nObject.defineProperty(WriteStream, \"prototype\", {\n get() {\n const Real = (@getInternalField(@internalModuleRegistry, 19) || @createInternalModuleById(19)).WriteStream.prototype;\n Object.defineProperty(WriteStream, \"prototype\", { value: Real }), WriteStream.prototype._refreshSize = function() {\n const oldCols = this.columns, oldRows = this.rows, windowSizeArray = [0, 0];\n if (_getWindowSize(this.fd, windowSizeArray) === !0) {\n if (oldCols !== windowSizeArray[0] || oldRows !== windowSizeArray[1])\n this.columns = windowSizeArray[0], this.rows = windowSizeArray[1], this.emit(\"resize\");\n }\n };\n var readline = @undefined;\n return WriteStream.prototype.clearLine = function(dir, cb) {\n return (readline \?\?= @getInternalField(@internalModuleRegistry, 33) || @createInternalModuleById(33)).clearLine(this, dir, cb);\n }, WriteStream.prototype.clearScreenDown = function(cb) {\n return (readline \?\?= @getInternalField(@internalModuleRegistry, 33) || @createInternalModuleById(33)).clearScreenDown(this, cb);\n }, WriteStream.prototype.cursorTo = function(x, y, cb) {\n return (readline \?\?= @getInternalField(@internalModuleRegistry, 33) || @createInternalModuleById(33)).cursorTo(this, x, y, cb);\n }, WriteStream.prototype.getColorDepth = function(env = process.env) {\n if (env.FORCE_COLOR !== @undefined)\n switch (env.FORCE_COLOR) {\n case \"\":\n case \"1\":\n case \"true\":\n return warnOnDeactivatedColors(env), COLORS_16;\n case \"2\":\n return warnOnDeactivatedColors(env), COLORS_256;\n case \"3\":\n return warnOnDeactivatedColors(env), COLORS_16m;\n default:\n return COLORS_2;\n }\n if (env.NODE_DISABLE_COLORS !== @undefined || env.NO_COLOR !== @undefined || env.TERM === \"dumb\")\n return COLORS_2;\n if (env.TMUX)\n return COLORS_256;\n if (env.CI) {\n if ([\"APPVEYOR\", \"BUILDKITE\", \"CIRCLECI\", \"DRONE\", \"GITHUB_ACTIONS\", \"GITLAB_CI\", \"TRAVIS\"].some((sign) => (sign in env)) || env.CI_NAME === \"codeship\")\n return COLORS_256;\n return COLORS_2;\n }\n if (\"TEAMCITY_VERSION\" in env)\n return /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) \? COLORS_16 : COLORS_2;\n switch (env.TERM_PROGRAM) {\n case \"iTerm.app\":\n if (!env.TERM_PROGRAM_VERSION || /^[0-2]\\./.test(env.TERM_PROGRAM_VERSION))\n return COLORS_256;\n return COLORS_16m;\n case \"HyperTerm\":\n case \"MacTerm\":\n return COLORS_16m;\n case \"Apple_Terminal\":\n return COLORS_256;\n }\n if (env.COLORTERM === \"truecolor\" || env.COLORTERM === \"24bit\")\n return COLORS_16m;\n if (env.TERM) {\n if (/^xterm-256/.test(env.TERM) !== null)\n return COLORS_256;\n const termEnv = env.TERM.toLowerCase();\n if (TERM_ENVS[termEnv])\n return TERM_ENVS[termEnv];\n if (TERM_ENVS_REG_EXP.some((term) => term.test(termEnv)))\n return COLORS_16;\n }\n if (env.COLORTERM)\n return COLORS_16;\n return COLORS_2;\n }, WriteStream.prototype.getWindowSize = function() {\n return [this.columns, this.rows];\n }, WriteStream.prototype.hasColors = function(count, env) {\n if (env === @undefined && (count === @undefined || typeof count === \"object\" && count !== null))\n env = count, count = 16;\n else\n validateInteger(count, \"count\", 2);\n return count <= 2 ** this.getColorDepth(env);\n }, WriteStream.prototype.moveCursor = function(dx, dy, cb) {\n return (readline \?\?= @getInternalField(@internalModuleRegistry, 33) || @createInternalModuleById(33)).moveCursor(this, dx, dy, cb);\n }, Real;\n },\n enumerable: !0,\n configurable: !0\n});\nvar validateInteger = (value, name, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) => {\n if (typeof value !== \"number\")\n throw new ERR_INVALID_ARG_TYPE(name, \"number\", value);\n if (!Number.isInteger(value))\n throw new ERR_OUT_OF_RANGE(name, \"an integer\", value);\n if (value < min || value > max)\n throw new ERR_OUT_OF_RANGE(name, `>= ${min} && <= ${max}`, value);\n};\nreturn { ReadStream, WriteStream, isatty }})\n"_s; // // |