decord/source/utils/ProcessArgs.tsx

86 lines
2.2 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 4847
// Function ID: 4848
2026-07-29 08:29:29 +00:00
// Name: get
2026-08-24 06:08:38 +00:00
// Dependencies: [4007, 2]
// Module 4847 (get)
import set from "set" /* 2 */;
import setDefault from "set" /* 4007 */;
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
let prototype;
prototype = function ProcessArgs() {
return Object.create(new.target.prototype);
}.prototype;
prototype["get"] = function get() {
if (null == prototype.cached) {
2026-08-24 06:08:38 +00:00
const tmp4 = setDefault;
2026-07-29 08:29:29 +00:00
let mainArgvSync;
if (tmp4 != null) {
const processUtils = tmp4.processUtils;
if (processUtils != null) {
const getMainArgvSync = processUtils.getMainArgvSync;
if (getMainArgvSync != null) {
mainArgvSync = getMainArgvSync();
2026-07-20 16:05:17 +00:00
}
}
}
2026-07-29 08:29:29 +00:00
let tmp5 = null != mainArgvSync;
if (tmp5) {
tmp5 = mainArgvSync.length > 1;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp5) {
mainArgvSync.shift();
}
if (mainArgvSync == null) {
mainArgvSync = [];
}
tmp.cached = mainArgvSync;
}
return prototype.cached;
};
prototype["contains"] = function contains(arg0) {
const value = prototype.get();
return value.includes(arg0);
};
prototype["isEnvVariableTrue"] = function isEnvVariableTrue(DISCORD_DISALLOW_POPUPS) {
2026-08-24 06:08:38 +00:00
if (undefined === setDefault) {
2026-07-29 08:29:29 +00:00
return false;
} else {
2026-08-24 06:08:38 +00:00
const tmpResult = setDefault;
2026-07-29 08:29:29 +00:00
let tmp5;
if (tmpResult != null) {
const _process = tmpResult.process;
if (_process != null) {
const env = _process.env;
if (env != null) {
tmp5 = env[DISCORD_DISALLOW_POPUPS];
2026-07-20 16:05:17 +00:00
}
}
}
2026-07-29 08:29:29 +00:00
if ("1" !== tmp5) {
if ("true" !== tmp5) {
return false;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
return true;
}
2026-08-24 06:08:38 +00:00
const tmp = importDefault;
2026-07-29 08:29:29 +00:00
};
prototype["isDisallowPopupsSet"] = function isDisallowPopupsSet() {
const hasItem = prototype.contains("--disallow-popups");
let tmp2 = !hasItem;
if (!hasItem) {
tmp2 = !prototype.isEnvVariableTrue("DISCORD_DISALLOW_POPUPS");
}
return !tmp2;
};
prototype["isDiscordTestSet"] = function isDiscordTestSet() {
return prototype.isEnvVariableTrue("DISCORD_TEST");
};
prototype["isDiscordGatewayPlaintextSet"] = function isDiscordGatewayPlaintextSet() {
return false;
};
2026-08-24 06:08:38 +00:00
const result = set.fileFinishedImporting("utils/ProcessArgs.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export const ProcessArgs = prototype;