@socketsecurity/lib
Version:
Core utilities and infrastructure for Socket.dev security tools
48 lines (45 loc) • 1.91 kB
JavaScript
;
/**
* Bundled from @socketregistry/is-unicode-supported
* This is a zero-dependency bundle created by esbuild.
*/
;
var __defProp = Object.defineProperty;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
// node_modules/.pnpm/@socketregistry+is-unicode-supported@1.0.5/node_modules/@socketregistry/is-unicode-supported/index.cjs
var require_is_unicode_supported = __commonJS({
"node_modules/.pnpm/@socketregistry+is-unicode-supported@1.0.5/node_modules/@socketregistry/is-unicode-supported/index.cjs"(exports2, module2) {
"use strict";
var _process;
function getProcess() {
if (_process === void 0) {
_process = require("process");
}
return _process;
}
__name(getProcess, "getProcess");
module2.exports = /* @__PURE__ */ __name(function isUnicodeSupported() {
const process = getProcess();
if (process.platform !== "win32") {
return process.env.TERM !== "linux";
}
const { env } = process;
if (
// Windows Terminal.
env.WT_SESSION || // Terminus (<0.2.27).
env.TERMINUS_SUBLIME || // ConEmu and cmder.
env.ConEmuTask === "{cmd::Cmder}"
) {
return true;
}
const { TERM, TERM_PROGRAM } = env;
return TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
}, "isUnicodeSupported");
}
});
// src/external/@socketregistry/is-unicode-supported.js
module.exports = require_is_unicode_supported();