id int64 0 1.29M | original_id stringlengths 32 32 | swhid stringlengths 100 170 | sha1 stringlengths 40 40 | repo_name stringlengths 2 45 | repo_group stringclasses 12
values | filepath stringlengths 5 153 | name stringlengths 1 14.9k | type stringclasses 3
values | code stringlengths 7 2.12M |
|---|---|---|---|---|---|---|---|---|---|
1,289,300 | 16c58031ffaf9dab8c757babdfed6e52 | swh:1:cnt:da0f842e4bcee3c459365b45e12d74512c65f572;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=209-212/ | d376fcb7326d428185a6d0462bcfd5b82cb06b40 | wlbdashboard | wmcs | node_modules/yaml/dist/warnings-793925ce.js | YAMLSet::toString | function | toString(ctx, onComment, onChompKeep) {
if (!ctx) return JSON.stringify(this);
if (this.hasAllNullValues()) return super.toString(ctx, onComment, onChompKeep);else throw new Error('Set items must all have null values');
} |
1,289,301 | 4a2e0ce79b63b8d6c637f86a97f7a3b8 | swh:1:cnt:da0f842e4bcee3c459365b45e12d74512c65f572;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=206-208/ | d376fcb7326d428185a6d0462bcfd5b82cb06b40 | wlbdashboard | wmcs | node_modules/yaml/dist/warnings-793925ce.js | YAMLSet::toJSON | function | toJSON(_, ctx) {
return super.toJSON(_, ctx, Set);
} |
1,289,302 | f44f86f2bfd422b4562aec3a804a4cb7 | swh:1:cnt:da0f842e4bcee3c459365b45e12d74512c65f572;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=312-322/ | d376fcb7326d428185a6d0462bcfd5b82cb06b40 | wlbdashboard | wmcs | node_modules/yaml/dist/warnings-793925ce.js | shouldWarn | function | /* global console, process, YAML_SILENCE_DEPRECATION_WARNINGS, YAML_SILENCE_WARNINGS */
function shouldWarn(deprecation) {
const env = typeof process !== 'undefined' && process.env || {};
if (deprecation) {
if (typeof YAML_SILENCE_DEPRECATION_WARNINGS !== 'undefined') return !YAML_SILENCE_DEPRECATION_WARNINGS;... |
1,289,303 | d9bcda455f9cdf845dddc91512545bad | swh:1:cnt:da0f842e4bcee3c459365b45e12d74512c65f572;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=323-333/ | d376fcb7326d428185a6d0462bcfd5b82cb06b40 | wlbdashboard | wmcs | node_modules/yaml/dist/warnings-793925ce.js | warn | function | function warn(warning, type) {
if (shouldWarn(false)) {
const emit = typeof process !== 'undefined' && process.emitWarning;
// This will throw in Jest if `warning` is an Error instance due to
// https://github.com/facebook/jest/issues/2549
if (emit) emit(warning, type);else {
// eslint-disable-n... |
1,289,304 | 47438ce1850e5a3a359a1237a7c7e43e | swh:1:cnt:da0f842e4bcee3c459365b45e12d74512c65f572;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=341-348/ | d376fcb7326d428185a6d0462bcfd5b82cb06b40 | wlbdashboard | wmcs | node_modules/yaml/dist/warnings-793925ce.js | warnOptionDeprecation | function | function warnOptionDeprecation(name, alternative) {
if (!warned[name] && shouldWarn(true)) {
warned[name] = true;
let msg = `The option '${name}' will be removed in a future release`;
msg += alternative ? `, use '${alternative}' instead.` : '.';
warn(msg, 'DeprecationWarning');
}
} |
1,289,305 | 109a57ae4a7837d5b0114b314f5ad794 | swh:1:cnt:da0f842e4bcee3c459365b45e12d74512c65f572;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=215-219/ | d376fcb7326d428185a6d0462bcfd5b82cb06b40 | wlbdashboard | wmcs | node_modules/yaml/dist/warnings-793925ce.js | parseSet | function | function parseSet(doc, cst) {
const map = resolveSeq.resolveMap(doc, cst);
if (!map.hasAllNullValues()) throw new PlainValue.YAMLSemanticError(cst, 'Set items must all have null values');
return Object.assign(new YAMLSet(), map);
} |
1,289,306 | 283eed3b1933fe9186e9df9134468dc6 | swh:1:cnt:da0f842e4bcee3c459365b45e12d74512c65f572;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=334-339/ | d376fcb7326d428185a6d0462bcfd5b82cb06b40 | wlbdashboard | wmcs | node_modules/yaml/dist/warnings-793925ce.js | warnFileDeprecation | function | function warnFileDeprecation(filename) {
if (shouldWarn(true)) {
const path = filename.replace(/.*yaml[/\\]/i, '').replace(/\.js$/, '').replace(/\\/g, '/');
warn(`The endpoint 'yaml/${path}' will be removed in a future release.`, 'DeprecationWarning');
}
} |
1,289,307 | 4003c66ae13bcd1fea930cab3b465341 | swh:1:cnt:da0f842e4bcee3c459365b45e12d74512c65f572;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=220-224/ | d376fcb7326d428185a6d0462bcfd5b82cb06b40 | wlbdashboard | wmcs | node_modules/yaml/dist/warnings-793925ce.js | createSet | function | function createSet(schema, iterable, ctx) {
const set = new YAMLSet();
for (const value of iterable) set.items.push(schema.createPair(value, null, ctx));
return set;
} |
1,289,308 | 3d85f6410d9d94e73e13c36bcdfbed24 | swh:1:cnt:da0f842e4bcee3c459365b45e12d74512c65f572;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=123-149/ | d376fcb7326d428185a6d0462bcfd5b82cb06b40 | wlbdashboard | wmcs | node_modules/yaml/dist/warnings-793925ce.js | YAMLOMap | type | class YAMLOMap extends resolveSeq.YAMLSeq {
constructor() {
super();
PlainValue._defineProperty(this, "add", resolveSeq.YAMLMap.prototype.add.bind(this));
PlainValue._defineProperty(this, "delete", resolveSeq.YAMLMap.prototype.delete.bind(this));
PlainValue._defineProperty(this, "get", resolveSeq.YAML... |
1,289,309 | 40487550e9194c463dbf1e133e07677f | swh:1:cnt:da0f842e4bcee3c459365b45e12d74512c65f572;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=183-213/ | d376fcb7326d428185a6d0462bcfd5b82cb06b40 | wlbdashboard | wmcs | node_modules/yaml/dist/warnings-793925ce.js | YAMLSet | type | class YAMLSet extends resolveSeq.YAMLMap {
constructor() {
super();
this.tag = YAMLSet.tag;
}
add(key) {
const pair = key instanceof resolveSeq.Pair ? key : new resolveSeq.Pair(key);
const prev = resolveSeq.findPair(this.items, pair.key);
if (!prev) this.items.push(pair);
}
get(key, keepPa... |
1,289,310 | 4e38b0aaae4da5ae3fc74741d09b9bd3 | swh:1:cnt:be5b3aa69f30d65946196e1c79621ca9987e5f36;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=4-50/ | c3351dc1cd4d7fe5346dce76d7e5497d68b886db | wlbdashboard | wmcs | node_modules/yargs/build/lib/argsert.js | argsert | function | function argsert(arg1, arg2, arg3) {
function parseArgs() {
return typeof arg1 === 'object'
? [{ demanded: [], optional: [] }, arg1, arg2]
: [
parseCommand(`cmd ${arg1}`),
arg2,
arg3,
];
}
try {
let position ... |
1,289,311 | 21d2d2b825299cc8afb2432aaad389c5 | swh:1:cnt:be5b3aa69f30d65946196e1c79621ca9987e5f36;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=60-62/ | c3351dc1cd4d7fe5346dce76d7e5497d68b886db | wlbdashboard | wmcs | node_modules/yargs/build/lib/argsert.js | argumentTypeError | function | function argumentTypeError(observedType, allowedTypes, position) {
throw new YError(`Invalid ${positionName[position] || 'manyith'} argument. Expected ${allowedTypes.join(' or ')} but received ${observedType}.`);
} |
1,289,312 | 0effa8dbca5fb695418e47e9a25ca300 | swh:1:cnt:be5b3aa69f30d65946196e1c79621ca9987e5f36;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=51-59/ | c3351dc1cd4d7fe5346dce76d7e5497d68b886db | wlbdashboard | wmcs | node_modules/yargs/build/lib/argsert.js | guessType | function | function guessType(arg) {
if (Array.isArray(arg)) {
return 'array';
}
else if (arg === null) {
return 'null';
}
return typeof arg;
} |
1,289,313 | 576ed177ca0562528c6a86461934b54d | swh:1:cnt:be5b3aa69f30d65946196e1c79621ca9987e5f36;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=5-13/ | c3351dc1cd4d7fe5346dce76d7e5497d68b886db | wlbdashboard | wmcs | node_modules/yargs/build/lib/argsert.js | argsert::parseArgs | function | function parseArgs() {
return typeof arg1 === 'object'
? [{ demanded: [], optional: [] }, arg1, arg2]
: [
parseCommand(`cmd ${arg1}`),
arg2,
arg3,
];
} |
1,289,314 | 52a12236fc0a76e03e0e2fd1153051cc | swh:1:cnt:9a55dae224c4746d3845503d095a2749a1aec826;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=8-360/ | 1407d31c2aea7afea6d1698821242807a46c850f | wlbdashboard | wmcs | node_modules/yargs/build/lib/command.js | command | function | function command(yargs, usage, validation, globalMiddleware = [], shim) {
const self = {};
let handlers = {};
let aliasMap = {};
let defaultCommand;
self.addHandler = function addHandler(cmd, description, builder, handler, commandMiddleware, deprecated) {
let aliases = [];
const midd... |
1,289,315 | c6def792394dac228585c6eaf9fb7788 | swh:1:cnt:9a55dae224c4746d3845503d095a2749a1aec826;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=103-105/ | 1407d31c2aea7afea6d1698821242807a46c850f | wlbdashboard | wmcs | node_modules/yargs/build/lib/command.js | command::commandFromFilename | function | function commandFromFilename(filename) {
return shim.path.basename(filename, shim.path.extname(filename));
} |
1,289,316 | 2cbae947c68bee8547cd9088d48d7fe6 | swh:1:cnt:9a55dae224c4746d3845503d095a2749a1aec826;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=106-113/ | 1407d31c2aea7afea6d1698821242807a46c850f | wlbdashboard | wmcs | node_modules/yargs/build/lib/command.js | command::extractDesc | function | function extractDesc({ describe, description, desc, }) {
for (const test of [describe, description, desc]) {
if (typeof test === 'string' || test === false)
return test;
assertNotStrictEqual(test, true, shim);
}
return false;
} |
1,289,317 | 5111c9f91ac1a9db5c7b71bb76d9b895 | swh:1:cnt:9a55dae224c4746d3845503d095a2749a1aec826;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=97-102/ | 1407d31c2aea7afea6d1698821242807a46c850f | wlbdashboard | wmcs | node_modules/yargs/build/lib/command.js | command::moduleName | function | function moduleName(obj) {
const mod = whichModule(obj);
if (!mod)
throw new Error(`No command name given for module: ${shim.inspect(obj)}`);
return commandFromFilename(mod.filename);
} |
1,289,318 | 1fc751e450a084ee5ea27a86ba6efcd1 | swh:1:cnt:9a55dae224c4746d3845503d095a2749a1aec826;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=211-214/ | 1407d31c2aea7afea6d1698821242807a46c850f | wlbdashboard | wmcs | node_modules/yargs/build/lib/command.js | command::shouldUpdateUsage | function | function shouldUpdateUsage(yargs) {
return (!yargs.getUsageInstance().getUsageDisabled() &&
yargs.getUsageInstance().getUsage().length === 0);
} |
1,289,319 | 775ff53f46477c1516098f659015bd9b | swh:1:cnt:9a55dae224c4746d3845503d095a2749a1aec826;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=215-224/ | 1407d31c2aea7afea6d1698821242807a46c850f | wlbdashboard | wmcs | node_modules/yargs/build/lib/command.js | command::usageFromParentCommandsCommandHandler | function | function usageFromParentCommandsCommandHandler(parentCommands, commandHandler) {
const c = DEFAULT_MARKER.test(commandHandler.original)
? commandHandler.original.replace(DEFAULT_MARKER, '').trim()
: commandHandler.original;
const pc = parentCommands.filter(c => {
retu... |
1,289,320 | c776b144b338714b0c19eca5e7b4f6eb | swh:1:cnt:9a55dae224c4746d3845503d095a2749a1aec826;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=243-260/ | 1407d31c2aea7afea6d1698821242807a46c850f | wlbdashboard | wmcs | node_modules/yargs/build/lib/command.js | command::populatePositionals | function | function populatePositionals(commandHandler, argv, context) {
argv._ = argv._.slice(context.commands.length);
const demanded = commandHandler.demanded.slice(0);
const optional = commandHandler.optional.slice(0);
const positionalMap = {};
validation.positionalCount(demanded.length... |
1,289,321 | 1be50bd1f215e8b09519110766d3fc55 | swh:1:cnt:9a55dae224c4746d3845503d095a2749a1aec826;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=261-270/ | 1407d31c2aea7afea6d1698821242807a46c850f | wlbdashboard | wmcs | node_modules/yargs/build/lib/command.js | command::populatePositional | function | function populatePositional(positional, argv, positionalMap) {
const cmd = positional.cmd[0];
if (positional.variadic) {
positionalMap[cmd] = argv._.splice(0).map(String);
}
else {
if (argv._.length)
positionalMap[cmd] = [String(argv._.shift())];
... |
1,289,322 | e443b61274d4007654264e9dfb29d165 | swh:1:cnt:9a55dae224c4746d3845503d095a2749a1aec826;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=271-312/ | 1407d31c2aea7afea6d1698821242807a46c850f | wlbdashboard | wmcs | node_modules/yargs/build/lib/command.js | command::postProcessPositionals | function | function postProcessPositionals(argv, positionalMap, parseOptions) {
const options = Object.assign({}, yargs.getOptions());
options.default = Object.assign(parseOptions.default, options.default);
for (const key of Object.keys(parseOptions.alias)) {
options.alias[key] = (options.alias... |
1,289,323 | 4f938251f686e92e198a2f6c288c0a6f | swh:1:cnt:9a55dae224c4746d3845503d095a2749a1aec826;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=361-365/ | 1407d31c2aea7afea6d1698821242807a46c850f | wlbdashboard | wmcs | node_modules/yargs/build/lib/command.js | isCommandBuilderDefinition | function | function isCommandBuilderDefinition(builder) {
return (typeof builder === 'object' &&
!!builder.builder &&
typeof builder.handler === 'function');
} |
1,289,324 | efc67b0d3edb0cf1bc1f04c18b505704 | swh:1:cnt:9a55dae224c4746d3845503d095a2749a1aec826;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=366-373/ | 1407d31c2aea7afea6d1698821242807a46c850f | wlbdashboard | wmcs | node_modules/yargs/build/lib/command.js | isCommandAndAliases | function | function isCommandAndAliases(cmd) {
if (cmd.every(c => typeof c === 'string')) {
return true;
}
else {
return false;
}
} |
1,289,325 | 9a5fdfff493d1b8cb2d3e3fd08ed160e | swh:1:cnt:9a55dae224c4746d3845503d095a2749a1aec826;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=374-376/ | 1407d31c2aea7afea6d1698821242807a46c850f | wlbdashboard | wmcs | node_modules/yargs/build/lib/command.js | isCommandBuilderCallback | function | function isCommandBuilderCallback(builder) {
return typeof builder === 'function';
} |
1,289,326 | cfcabca961d63985f2b7c3f4260c42cd | swh:1:cnt:9a55dae224c4746d3845503d095a2749a1aec826;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=377-379/ | 1407d31c2aea7afea6d1698821242807a46c850f | wlbdashboard | wmcs | node_modules/yargs/build/lib/command.js | isCommandBuilderOptionDefinitions | function | function isCommandBuilderOptionDefinitions(builder) {
return typeof builder === 'object';
} |
1,289,327 | 39241559a6b78fa10394286b9a48507f | swh:1:cnt:9a55dae224c4746d3845503d095a2749a1aec826;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=380-382/ | 1407d31c2aea7afea6d1698821242807a46c850f | wlbdashboard | wmcs | node_modules/yargs/build/lib/command.js | isCommandHandlerDefinition | function | function isCommandHandlerDefinition(cmd) {
return typeof cmd === 'object' && !Array.isArray(cmd);
} |
1,289,328 | 6599519da3526087cb08f270d1a0b4ee | swh:1:cnt:1c2e9249a72a8dd6c222c81bf13619df39ddd5a7;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=6-125/ | a1f33b140bbfb17f63539b89ea4593fcd518b285 | wlbdashboard | wmcs | node_modules/yargs/build/lib/completion.js | completion | function | function completion(yargs, usage, command, shim) {
const self = {
completionKey: 'get-yargs-completions',
};
let aliases;
self.setParsed = function setParsed(parsed) {
aliases = parsed.aliases;
};
const zshShell = (shim.getEnv('SHELL') && shim.getEnv('SHELL').indexOf('zsh') !== -... |
1,289,329 | 118a641187e789810fa89c66b525d92f | swh:1:cnt:1c2e9249a72a8dd6c222c81bf13619df39ddd5a7;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=126-128/ | a1f33b140bbfb17f63539b89ea4593fcd518b285 | wlbdashboard | wmcs | node_modules/yargs/build/lib/completion.js | isSyncCompletionFunction | function | function isSyncCompletionFunction(completionFunction) {
return completionFunction.length < 3;
} |
1,289,330 | 7d1747adb066140063d1cf0d2e859485 | swh:1:cnt:1c2e9249a72a8dd6c222c81bf13619df39ddd5a7;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=86-101/ | a1f33b140bbfb17f63539b89ea4593fcd518b285 | wlbdashboard | wmcs | node_modules/yargs/build/lib/completion.js | completion::completeOptionKey | function | function completeOptionKey(key) {
const notInArgs = keyAndAliases.every(val => args.indexOf(`--${val}`) === -1);
if (notInArgs) {
const startsByTwoDashes = (s) => /^--/.test(s);
const isShortOption = (s) => /^[^0-9]$/.test(s);
... |
1,289,331 | 44afb819eebec341b8ff9e9b31e40e89 | swh:1:cnt:1c2e9249a72a8dd6c222c81bf13619df39ddd5a7;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=21-45/ | a1f33b140bbfb17f63539b89ea4593fcd518b285 | wlbdashboard | wmcs | node_modules/yargs/build/lib/completion.js | completion::runCompletionFunction | function | function runCompletionFunction(argv) {
assertNotStrictEqual(completionFunction, null, shim);
if (isSyncCompletionFunction(completionFunction)) {
const result = completionFunction(current, argv);
if (isPromise(result)) {
return result
... |
1,289,332 | 4066ff9fcd362a0560b1d613d01c00f7 | swh:1:cnt:680094cd89dffbabcd90325009b564e46c668545;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=3-21/ | ba91bbc9b4d86bcec735c87a33104110e48905a2 | wlbdashboard | wmcs | node_modules/yargs/build/lib/middleware.js | globalMiddlewareFactory | function | function globalMiddlewareFactory(globalMiddleware, context) {
return function (callback, applyBeforeValidation = false) {
argsert('<array|function> [boolean]', [callback, applyBeforeValidation], arguments.length);
if (Array.isArray(callback)) {
for (let i = 0; i < callback.length; i++) {... |
1,289,333 | 6473d6431aacfa318fbb6f3bc3a6b057 | swh:1:cnt:680094cd89dffbabcd90325009b564e46c668545;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=22-29/ | ba91bbc9b4d86bcec735c87a33104110e48905a2 | wlbdashboard | wmcs | node_modules/yargs/build/lib/middleware.js | commandMiddlewareFactory | function | function commandMiddlewareFactory(commandMiddleware) {
if (!commandMiddleware)
return [];
return commandMiddleware.map(middleware => {
middleware.applyBeforeValidation = false;
return middleware;
});
} |
1,289,334 | e252bc9980c4e505df953ff8484701c0 | swh:1:cnt:680094cd89dffbabcd90325009b564e46c668545;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=30-53/ | ba91bbc9b4d86bcec735c87a33104110e48905a2 | wlbdashboard | wmcs | node_modules/yargs/build/lib/middleware.js | applyMiddleware | function | function applyMiddleware(argv, yargs, middlewares, beforeValidation) {
const beforeValidationError = new Error('middleware cannot return a promise when applyBeforeValidation is true');
return middlewares.reduce((acc, middleware) => {
if (middleware.applyBeforeValidation !== beforeValidation) {
... |
1,289,335 | 770ec0727ba52faaa88050ee14ca2c88 | swh:1:cnt:4989f53102bff7466b12475db98047852d02eabc;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-32/ | a0a6ffeceae42231c8f394fc94a421ca502ced98 | wlbdashboard | wmcs | node_modules/yargs/build/lib/parse-command.js | parseCommand | function | function parseCommand(cmd) {
const extraSpacesStrippedCommand = cmd.replace(/\s{2,}/g, ' ');
const splitCommand = extraSpacesStrippedCommand.split(/\s+(?![^[]*]|[^<]*>)/);
const bregex = /\.*[\][<>]/g;
const firstCommand = splitCommand.shift();
if (!firstCommand)
throw new Error(`No command ... |
1,289,336 | 40eeff460356cd1ba91bca79b57e0bac | swh:1:cnt:ecd1aacad99522c3620720f54bc7be0df02d9b2e;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=5-534/ | c58292143ef4ef9649a5ba4ffe3217aaeb74d39a | wlbdashboard | wmcs | node_modules/yargs/build/lib/usage.js | usage | function | function usage(yargs, y18n, shim) {
const __ = y18n.__;
const self = {};
const fails = [];
self.failFn = function failFn(f) {
fails.push(f);
};
let failMessage = null;
let showHelpOnFail = true;
self.showHelpOnFail = function showHelpOnFailFn(arg1 = true, arg2) {
function... |
1,289,337 | 23c1efc12f246aaf54ecda1508a02684 | swh:1:cnt:ecd1aacad99522c3620720f54bc7be0df02d9b2e;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=382-405/ | c58292143ef4ef9649a5ba4ffe3217aaeb74d39a | wlbdashboard | wmcs | node_modules/yargs/build/lib/usage.js | usage::normalizeAliases | function | function normalizeAliases() {
const demandedOptions = yargs.getDemandedOptions();
const options = yargs.getOptions();
(Object.keys(options.alias) || []).forEach(key => {
options.alias[key].forEach(alias => {
if (descriptions[alias])
self.describe(k... |
1,289,338 | a44d404034f1649a7dde7f816c29db6d | swh:1:cnt:ecd1aacad99522c3620720f54bc7be0df02d9b2e;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=370-381/ | c58292143ef4ef9649a5ba4ffe3217aaeb74d39a | wlbdashboard | wmcs | node_modules/yargs/build/lib/usage.js | usage::maxWidth | function | function maxWidth(table, theWrap, modifier) {
let width = 0;
if (!Array.isArray(table)) {
table = Object.values(table).map(v => [v]);
}
table.forEach(v => {
width = Math.max(shim.stringWidth(modifier ? `${modifier} ${getText(v[0])}` : getText(v[0])) + getIndentati... |
1,289,339 | d975eac65dbacdef255dc05443e132a8 | swh:1:cnt:ecd1aacad99522c3620720f54bc7be0df02d9b2e;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=15-17/ | c58292143ef4ef9649a5ba4ffe3217aaeb74d39a | wlbdashboard | wmcs | node_modules/yargs/build/lib/usage.js | usage::parseFunctionArgs | function | function parseFunctionArgs() {
return typeof arg1 === 'string' ? [true, arg1] : [arg1, arg2];
} |
1,289,340 | 97072a43d1180efa1115fc19af06fea5 | swh:1:cnt:ecd1aacad99522c3620720f54bc7be0df02d9b2e;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=123-129/ | c58292143ef4ef9649a5ba4ffe3217aaeb74d39a | wlbdashboard | wmcs | node_modules/yargs/build/lib/usage.js | usage::getWrap | function | function getWrap() {
if (!wrapSet) {
wrap = windowWidth();
wrapSet = true;
}
return wrap;
} |
1,289,341 | d099964e662df62876f16889ed7c209c | swh:1:cnt:ecd1aacad99522c3620720f54bc7be0df02d9b2e;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=413-426/ | c58292143ef4ef9649a5ba4ffe3217aaeb74d39a | wlbdashboard | wmcs | node_modules/yargs/build/lib/usage.js | usage::addUngroupedKeys | function | function addUngroupedKeys(keys, aliases, groups, defaultGroup) {
let groupedKeys = [];
let toCheck = null;
Object.keys(groups).forEach(group => {
groupedKeys = groupedKeys.concat(groups[group]);
});
keys.forEach(key => {
toCheck = [key].concat(aliases[key]... |
1,289,342 | a9c1e479cca3489479734637b504b08d | swh:1:cnt:ecd1aacad99522c3620720f54bc7be0df02d9b2e;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=427-430/ | c58292143ef4ef9649a5ba4ffe3217aaeb74d39a | wlbdashboard | wmcs | node_modules/yargs/build/lib/usage.js | usage::filterHiddenOptions | function | function filterHiddenOptions(key) {
return (yargs.getOptions().hiddenOptions.indexOf(key) < 0 ||
yargs.parsed.argv[yargs.getOptions().showHiddenOpt]);
} |
1,289,343 | ac6d58100f0177bb4dacc724fcb157d4 | swh:1:cnt:ecd1aacad99522c3620720f54bc7be0df02d9b2e;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=457-477/ | c58292143ef4ef9649a5ba4ffe3217aaeb74d39a | wlbdashboard | wmcs | node_modules/yargs/build/lib/usage.js | usage::defaultString | function | function defaultString(value, defaultDescription) {
let string = `[${__('default:')} `;
if (value === undefined && !defaultDescription)
return null;
if (defaultDescription) {
string += defaultDescription;
}
else {
switch (typeof value) {
... |
1,289,344 | f80a86e1cd86f865e394314ac5bb67e5 | swh:1:cnt:ecd1aacad99522c3620720f54bc7be0df02d9b2e;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=478-486/ | c58292143ef4ef9649a5ba4ffe3217aaeb74d39a | wlbdashboard | wmcs | node_modules/yargs/build/lib/usage.js | usage::windowWidth | function | function windowWidth() {
const maxWidth = 80;
if (shim.process.stdColumns) {
return Math.min(maxWidth, shim.process.stdColumns);
}
else {
return maxWidth;
}
} |
1,289,345 | f2ba3cdfb9db2a1f027f782ae0eac103 | swh:1:cnt:ecd1aacad99522c3620720f54bc7be0df02d9b2e;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=535-537/ | c58292143ef4ef9649a5ba4ffe3217aaeb74d39a | wlbdashboard | wmcs | node_modules/yargs/build/lib/usage.js | isIndentedText | function | function isIndentedText(text) {
return typeof text === 'object';
} |
1,289,346 | 5058eb056f96dded64ec1801cb7b8f41 | swh:1:cnt:ecd1aacad99522c3620720f54bc7be0df02d9b2e;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=538-542/ | c58292143ef4ef9649a5ba4ffe3217aaeb74d39a | wlbdashboard | wmcs | node_modules/yargs/build/lib/usage.js | addIndentation | function | function addIndentation(text, indent) {
return isIndentedText(text)
? { text: text.text, indentation: text.indentation + indent }
: { text, indentation: indent };
} |
1,289,347 | 6c041f80b0c7c70c236782ba60a2cc19 | swh:1:cnt:ecd1aacad99522c3620720f54bc7be0df02d9b2e;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=546-548/ | c58292143ef4ef9649a5ba4ffe3217aaeb74d39a | wlbdashboard | wmcs | node_modules/yargs/build/lib/usage.js | getText | function | function getText(text) {
return isIndentedText(text) ? text.text : text;
} |
1,289,348 | 54475abe82edb7e04dd36538462cf6b9 | swh:1:cnt:ecd1aacad99522c3620720f54bc7be0df02d9b2e;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=543-545/ | c58292143ef4ef9649a5ba4ffe3217aaeb74d39a | wlbdashboard | wmcs | node_modules/yargs/build/lib/usage.js | getIndentation | function | function getIndentation(text) {
return isIndentedText(text) ? text.indentation : 0;
} |
1,289,349 | 6ea95b2375c53557a8a8ca523fd14397 | swh:1:cnt:dd77e075991a63214e31650ca54535e4f3c6cc76;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=6-308/ | b78ee9ec4746bf40cf14246caff3b7e32eb77f37 | wlbdashboard | wmcs | node_modules/yargs/build/lib/validation.js | validation | function | function validation(yargs, usage, y18n, shim) {
const __ = y18n.__;
const __n = y18n.__n;
const self = {};
self.nonOptionCount = function nonOptionCount(argv) {
const demandedCommands = yargs.getDemandedCommands();
const positionalCount = argv._.length + (argv['--'] ? argv['--'].length :... |
1,289,350 | c44b6774bf00cb1c6ffdecc99bb3fd73 | swh:1:cnt:dd77e075991a63214e31650ca54535e4f3c6cc76;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=203-217/ | b78ee9ec4746bf40cf14246caff3b7e32eb77f37 | wlbdashboard | wmcs | node_modules/yargs/build/lib/validation.js | validation::keyExists | function | function keyExists(argv, val) {
const num = Number(val);
val = isNaN(num) ? val : num;
if (typeof val === 'number') {
val = argv._.length >= val;
}
else if (val.match(/^--no-.+/)) {
val = val.match(/^--no-(.+)/)[1];
val = !argv[val];
}
... |
1,289,351 | 6abd66d86184196019774986217de1f2 | swh:1:cnt:741b329b5bd25533fcbd53e06b78ef308d5967f0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=14-17/ | 5082913d6ca56195d58d216c27701f84083b32a1 | wlbdashboard | wmcs | node_modules/yargs/build/lib/yargs-factory.js | YargsWithShim | function | function YargsWithShim(_shim) {
shim = _shim;
return Yargs;
} |
1,289,352 | 5c76b3c10b477049f7085c86c3ebd496 | swh:1:cnt:741b329b5bd25533fcbd53e06b78ef308d5967f0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=176-201/ | 5082913d6ca56195d58d216c27701f84083b32a1 | wlbdashboard | wmcs | node_modules/yargs/build/lib/yargs-factory.js | Yargs::unfreeze | function | function unfreeze() {
const frozen = frozens.pop();
assertNotStrictEqual(frozen, undefined, shim);
let configObjects;
({
options,
configObjects,
exitProcess,
groups,
output,
exitError,
hasOutput,
... |
1,289,353 | ecc7301749b4b089c26d8bfe90cda38f | swh:1:cnt:741b329b5bd25533fcbd53e06b78ef308d5967f0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=154-175/ | 5082913d6ca56195d58d216c27701f84083b32a1 | wlbdashboard | wmcs | node_modules/yargs/build/lib/yargs-factory.js | Yargs::freeze | function | function freeze() {
frozens.push({
options,
configObjects: options.configObjects.slice(0),
exitProcess,
groups,
strict,
strictCommands,
strictOptions,
completionCommand,
output,
exitError,
... |
1,289,354 | 95a2f82c1042288e5a06138693c53ba3 | swh:1:cnt:741b329b5bd25533fcbd53e06b78ef308d5967f0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=247-253/ | 5082913d6ca56195d58d216c27701f84083b32a1 | wlbdashboard | wmcs | node_modules/yargs/build/lib/yargs-factory.js | Yargs::populateParserHintArray | function | function populateParserHintArray(type, keys) {
keys = [].concat(keys);
keys.forEach(key => {
key = sanitizeKey(key);
options[type].push(key);
});
} |
1,289,355 | 0607bfec4962945e8a39f1ca04ed211d | swh:1:cnt:741b329b5bd25533fcbd53e06b78ef308d5967f0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=18-1139/ | 5082913d6ca56195d58d216c27701f84083b32a1 | wlbdashboard | wmcs | node_modules/yargs/build/lib/yargs-factory.js | Yargs | function | function Yargs(processArgs = [], cwd = shim.process.cwd(), parentRequire) {
const self = {};
let command;
let completion = null;
let groups = {};
const globalMiddleware = [];
let output = '';
const preservedGroups = {};
let usage;
let validation;
let handlerFinishCommand = null;
... |
1,289,356 | 9e6518b076097a9cb60ba1943156ddf1 | swh:1:cnt:741b329b5bd25533fcbd53e06b78ef308d5967f0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=290-293/ | 5082913d6ca56195d58d216c27701f84083b32a1 | wlbdashboard | wmcs | node_modules/yargs/build/lib/yargs-factory.js | Yargs::setKey | function | function setKey(key, set) {
populateParserHintSingleValueDictionary(setKey, 'key', key, set);
return self;
} |
1,289,357 | 9108e769593edd9aad80f0b25c1d4596 | swh:1:cnt:741b329b5bd25533fcbd53e06b78ef308d5967f0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=294-298/ | 5082913d6ca56195d58d216c27701f84083b32a1 | wlbdashboard | wmcs | node_modules/yargs/build/lib/yargs-factory.js | Yargs::demandOption | function | function demandOption(keys, msg) {
argsert('<object|string|array> [string]', [keys, msg], arguments.length);
populateParserHintSingleValueDictionary(self.demandOption, 'demandedOptions', keys, msg);
return self;
} |
1,289,358 | 272cafa0cc1ed8ba55948ff64da91ef2 | swh:1:cnt:741b329b5bd25533fcbd53e06b78ef308d5967f0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=305-309/ | 5082913d6ca56195d58d216c27701f84083b32a1 | wlbdashboard | wmcs | node_modules/yargs/build/lib/yargs-factory.js | Yargs::populateParserHintSingleValueDictionary | function | function populateParserHintSingleValueDictionary(builder, type, key, value) {
populateParserHintDictionary(builder, type, key, value, (type, key, value) => {
options[type][key] = value;
});
} |
1,289,359 | eb749044438d84a901edeb1ab169f011 | swh:1:cnt:741b329b5bd25533fcbd53e06b78ef308d5967f0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=310-314/ | 5082913d6ca56195d58d216c27701f84083b32a1 | wlbdashboard | wmcs | node_modules/yargs/build/lib/yargs-factory.js | Yargs::populateParserHintArrayDictionary | function | function populateParserHintArrayDictionary(builder, type, key, value) {
populateParserHintDictionary(builder, type, key, value, (type, key, value) => {
options[type][key] = (options[type][key] || []).concat(value);
});
} |
1,289,360 | 59f3aae4ad0bd9254652701e81da46d8 | swh:1:cnt:741b329b5bd25533fcbd53e06b78ef308d5967f0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=315-329/ | 5082913d6ca56195d58d216c27701f84083b32a1 | wlbdashboard | wmcs | node_modules/yargs/build/lib/yargs-factory.js | Yargs::populateParserHintDictionary | function | function populateParserHintDictionary(builder, type, key, value, singleKeyHandler) {
if (Array.isArray(key)) {
key.forEach(k => {
builder(k, value);
});
}
else if (((key) => typeof key === 'object')(key)) {
for (const k of objectKeys(key)) {
... |
1,289,361 | 45493a7212e4ba53af01cec2d3f5f859 | swh:1:cnt:741b329b5bd25533fcbd53e06b78ef308d5967f0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=918-925/ | 5082913d6ca56195d58d216c27701f84083b32a1 | wlbdashboard | wmcs | node_modules/yargs/build/lib/yargs-factory.js | Yargs::error | function | error(...args) {
if (!self._hasParseCallback())
console.error(...args);
hasOutput = true;
if (output.length)
output += '\n';
output += args.join(' ');
} |
1,289,362 | 085e64bbd45b6811e101980ce58fc22d | swh:1:cnt:741b329b5bd25533fcbd53e06b78ef308d5967f0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=524-548/ | 5082913d6ca56195d58d216c27701f84083b32a1 | wlbdashboard | wmcs | node_modules/yargs/build/lib/yargs-factory.js | Yargs::pkgUp | function | function pkgUp(rootPath) {
const npath = rootPath || '*';
if (pkgs[npath])
return pkgs[npath];
let obj = {};
try {
let startDir = rootPath || shim.mainFilename;
if (!rootPath && shim.path.extname(startDir)) {
startDir = shim.path.dirnam... |
1,289,363 | 0f8ab132bcea24b3fa5adda9ef6e134a | swh:1:cnt:741b329b5bd25533fcbd53e06b78ef308d5967f0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=824-827/ | 5082913d6ca56195d58d216c27701f84083b32a1 | wlbdashboard | wmcs | node_modules/yargs/build/lib/yargs-factory.js | Yargs::guessVersion | function | function guessVersion() {
const obj = pkgUp();
return obj.version || 'unknown';
} |
1,289,364 | 40a8dd06ed919d648b59ae2b5ac84474 | swh:1:cnt:741b329b5bd25533fcbd53e06b78ef308d5967f0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1141-1143/ | 5082913d6ca56195d58d216c27701f84083b32a1 | wlbdashboard | wmcs | node_modules/yargs/build/lib/yargs-factory.js | isYargsInstance | function | function isYargsInstance(y) {
return !!y && typeof y._parseArgs === 'function';
} |
1,289,365 | 4369b2f24c3d603ecb88dd58dfc84ee8 | swh:1:cnt:741b329b5bd25533fcbd53e06b78ef308d5967f0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=330-334/ | 5082913d6ca56195d58d216c27701f84083b32a1 | wlbdashboard | wmcs | node_modules/yargs/build/lib/yargs-factory.js | Yargs::sanitizeKey | function | function sanitizeKey(key) {
if (key === '__proto__')
return '___proto___';
return key;
} |
1,289,366 | 721ef120a39a43902c770a2e616b8180 | swh:1:cnt:741b329b5bd25533fcbd53e06b78ef308d5967f0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1126-1135/ | 5082913d6ca56195d58d216c27701f84083b32a1 | wlbdashboard | wmcs | node_modules/yargs/build/lib/yargs-factory.js | Yargs::guessLocale | function | function guessLocale() {
if (!detectLocale)
return;
const locale = shim.getEnv('LC_ALL') ||
shim.getEnv('LC_MESSAGES') ||
shim.getEnv('LANG') ||
shim.getEnv('LANGUAGE') ||
'en_US';
self.locale(locale.replace(/[.:].*/, ''));
} |
1,289,367 | 72243e75ef5dc6400a46c9361c7c6a02 | swh:1:cnt:741b329b5bd25533fcbd53e06b78ef308d5967f0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=335-349/ | 5082913d6ca56195d58d216c27701f84083b32a1 | wlbdashboard | wmcs | node_modules/yargs/build/lib/yargs-factory.js | Yargs::deleteFromParserHintObject | function | function deleteFromParserHintObject(optionKey) {
objectKeys(options).forEach((hintKey) => {
if (((key) => key === 'configObjects')(hintKey))
return;
const hint = options[hintKey];
if (Array.isArray(hint)) {
if (~hint.indexOf(optionKey))
... |
1,289,368 | 0e1b644b018998253ff84619b4d2c615 | swh:1:cnt:741b329b5bd25533fcbd53e06b78ef308d5967f0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=910-917/ | 5082913d6ca56195d58d216c27701f84083b32a1 | wlbdashboard | wmcs | node_modules/yargs/build/lib/yargs-factory.js | Yargs::log | function | log(...args) {
if (!self._hasParseCallback())
console.log(...args);
hasOutput = true;
if (output.length)
output += '\n';
output += args.join(' ');
} |
1,289,369 | 89f3c3ee1b64dc0a0bea5f1c2da20cad | swh:1:cnt:4cfef75e56ba155d6707642f5453e8d1d040dd04;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-7/ | cd18bfda396d4c2153041c4f944ce2d2de1e42d5 | wlbdashboard | wmcs | node_modules/yargs/build/lib/yerror.js | YError | type | class YError extends Error {
constructor(msg) {
super(msg || 'yargs error');
this.name = 'YError';
Error.captureStackTrace(this, YError);
}
} |
1,289,370 | fd65bd9aa61599f1ce31f4486fccf036 | swh:1:cnt:4cfef75e56ba155d6707642f5453e8d1d040dd04;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=2-6/ | cd18bfda396d4c2153041c4f944ce2d2de1e42d5 | wlbdashboard | wmcs | node_modules/yargs/build/lib/yerror.js | YError::constructor | function | constructor(msg) {
super(msg || 'yargs error');
this.name = 'YError';
Error.captureStackTrace(this, YError);
} |
1,289,371 | 647e073d1656e769eac11bcdad1f44bd | swh:1:cnt:73e1773a26a670272d0c3a9fabff2717b553fdbe;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-3/ | a96f52b42651e857d0b3fd7867bb2aa38c9c06fd | wlbdashboard | wmcs | node_modules/yargs/build/lib/typings/common-types.js | assertNotStrictEqual | function | function assertNotStrictEqual(actual, expected, shim, message) {
shim.assert.notStrictEqual(actual, expected, message);
} |
1,289,372 | c8fc06e2fe433114e1485958c8c525a7 | swh:1:cnt:73e1773a26a670272d0c3a9fabff2717b553fdbe;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=7-9/ | a96f52b42651e857d0b3fd7867bb2aa38c9c06fd | wlbdashboard | wmcs | node_modules/yargs/build/lib/typings/common-types.js | objectKeys | function | function objectKeys(object) {
return Object.keys(object);
} |
1,289,373 | dbbab171a315a49ce7f5a4525a15cf93 | swh:1:cnt:73e1773a26a670272d0c3a9fabff2717b553fdbe;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=4-6/ | a96f52b42651e857d0b3fd7867bb2aa38c9c06fd | wlbdashboard | wmcs | node_modules/yargs/build/lib/typings/common-types.js | assertSingleKey | function | function assertSingleKey(actual, shim) {
shim.assert.strictEqual(typeof actual, 'string');
} |
1,289,374 | 308c4b2842a514d5fb6ea67ac864bcf5 | swh:1:cnt:0e593b4fe6d3d2a6d58a81d1919198d1a6f143aa;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=4-35/ | 604afbffd27f58ed37c1667880d9370796923c31 | wlbdashboard | wmcs | node_modules/yargs/build/lib/utils/apply-extends.js | applyExtends | function | function applyExtends(config, cwd, mergeExtends, _shim) {
shim = _shim;
let defaultConfig = {};
if (Object.prototype.hasOwnProperty.call(config, 'extends')) {
if (typeof config.extends !== 'string')
return defaultConfig;
const isPath = /\.json|\..*rc$/.test(config.extends);
... |
1,289,375 | ca277c7aae48a78ae3a8f6652d87ff09 | swh:1:cnt:0e593b4fe6d3d2a6d58a81d1919198d1a6f143aa;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=41-43/ | 604afbffd27f58ed37c1667880d9370796923c31 | wlbdashboard | wmcs | node_modules/yargs/build/lib/utils/apply-extends.js | getPathToDefaultConfig | function | function getPathToDefaultConfig(cwd, pathToExtend) {
return shim.path.resolve(cwd, pathToExtend);
} |
1,289,376 | 867cf3344a0b9c6915e981bec51bb836 | swh:1:cnt:0e593b4fe6d3d2a6d58a81d1919198d1a6f143aa;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=44-59/ | 604afbffd27f58ed37c1667880d9370796923c31 | wlbdashboard | wmcs | node_modules/yargs/build/lib/utils/apply-extends.js | mergeDeep | function | function mergeDeep(config1, config2) {
const target = {};
function isObject(obj) {
return obj && typeof obj === 'object' && !Array.isArray(obj);
}
Object.assign(target, config1);
for (const key of Object.keys(config2)) {
if (isObject(config2[key]) && isObject(target[key])) {
... |
1,289,377 | 4a8f032be07047964184d074458a6c8e | swh:1:cnt:0e593b4fe6d3d2a6d58a81d1919198d1a6f143aa;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=36-40/ | 604afbffd27f58ed37c1667880d9370796923c31 | wlbdashboard | wmcs | node_modules/yargs/build/lib/utils/apply-extends.js | checkForCircularExtends | function | function checkForCircularExtends(cfgPath) {
if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) {
throw new YError(`Circular extended configurations: '${cfgPath}'.`);
}
} |
1,289,378 | a40b11f813394f119eef6cc7a38dbb65 | swh:1:cnt:0e593b4fe6d3d2a6d58a81d1919198d1a6f143aa;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=46-48/ | 604afbffd27f58ed37c1667880d9370796923c31 | wlbdashboard | wmcs | node_modules/yargs/build/lib/utils/apply-extends.js | mergeDeep::isObject | function | function isObject(obj) {
return obj && typeof obj === 'object' && !Array.isArray(obj);
} |
1,289,379 | 8f3685187dceb5b4649f68e9d628a7d6 | swh:1:cnt:d250c08aaf47c1e104a4ec720a5833242a0c9e26;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-5/ | e5b89644c13cd93cfafae5cbe207e9b351c22be0 | wlbdashboard | wmcs | node_modules/yargs/build/lib/utils/is-promise.js | isPromise | function | function isPromise(maybePromise) {
return (!!maybePromise &&
!!maybePromise.then &&
typeof maybePromise.then === 'function');
} |
1,289,380 | 61cc2c4831fbf4c9ea19766c27b7d69d | swh:1:cnt:068168eb7fb0003ad7cea782ed1e9fd6be828121;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-26/ | b14cf37a859e1fb472773aa36bb67d92fe2031c0 | wlbdashboard | wmcs | node_modules/yargs/build/lib/utils/levenshtein.js | levenshtein | function | function levenshtein(a, b) {
if (a.length === 0)
return b.length;
if (b.length === 0)
return a.length;
const matrix = [];
let i;
for (i = 0; i <= b.length; i++) {
matrix[i] = [i];
}
let j;
for (j = 0; j <= a.length; j++) {
matrix[0][j] = j;
}
for (... |
1,289,381 | 14db858c61440d4dd6d11053d6510e9d | swh:1:cnt:cd68ad2983c063049da26ce1ac731bcbec9017f0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=2-10/ | 58ae8c6f7268728155e3194e1af1225f4622ba16 | wlbdashboard | wmcs | node_modules/yargs/build/lib/utils/obj-filter.js | objFilter | function | function objFilter(original = {}, filter = () => true) {
const obj = {};
objectKeys(original).forEach(key => {
if (filter(key, original[key])) {
obj[key] = original[key];
}
});
return obj;
} |
1,289,382 | 116f1abd4f725ff0372764c0c6b746c0 | swh:1:cnt:74dc9e4c451d0503ec91fd578429887f96f5a449;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-5/ | 97da5b1f0e03e658c2695e75b20ef112eff80b1f | wlbdashboard | wmcs | node_modules/yargs/build/lib/utils/process-argv.js | getProcessArgvBinIndex | function | function getProcessArgvBinIndex() {
if (isBundledElectronApp())
return 0;
return 1;
} |
1,289,383 | 87151a5606342b4649a7fe9972e89551 | swh:1:cnt:74dc9e4c451d0503ec91fd578429887f96f5a449;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=15-17/ | 97da5b1f0e03e658c2695e75b20ef112eff80b1f | wlbdashboard | wmcs | node_modules/yargs/build/lib/utils/process-argv.js | getProcessArgvBin | function | function getProcessArgvBin() {
return process.argv[getProcessArgvBinIndex()];
} |
1,289,384 | 1e9eb6496e1c4c6f6f370b4155e1b4cd | swh:1:cnt:74dc9e4c451d0503ec91fd578429887f96f5a449;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=6-8/ | 97da5b1f0e03e658c2695e75b20ef112eff80b1f | wlbdashboard | wmcs | node_modules/yargs/build/lib/utils/process-argv.js | isBundledElectronApp | function | function isBundledElectronApp() {
return isElectronApp() && !process.defaultApp;
} |
1,289,385 | c8e2f371182ecdde3dc891385bf11121 | swh:1:cnt:74dc9e4c451d0503ec91fd578429887f96f5a449;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=12-14/ | 97da5b1f0e03e658c2695e75b20ef112eff80b1f | wlbdashboard | wmcs | node_modules/yargs/build/lib/utils/process-argv.js | hideBin | function | function hideBin(argv) {
return argv.slice(getProcessArgvBinIndex() + 1);
} |
1,289,386 | 6d37293c4fecd1cf0e54e8a8cdb056f3 | swh:1:cnt:74dc9e4c451d0503ec91fd578429887f96f5a449;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=9-11/ | 97da5b1f0e03e658c2695e75b20ef112eff80b1f | wlbdashboard | wmcs | node_modules/yargs/build/lib/utils/process-argv.js | isElectronApp | function | function isElectronApp() {
return !!process.versions.electron;
} |
1,289,387 | 5f9287ad4364a5d407ade9224d401ce6 | swh:1:cnt:88fb806df36b9f035b55b958776a4e429a8baeaa;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-12/ | 4ef46d54c9d5086dac8d3bd0e0a29d0ccabb3dc8 | wlbdashboard | wmcs | node_modules/yargs/build/lib/utils/set-blocking.js | setBlocking | function | function setBlocking(blocking) {
if (typeof process === 'undefined')
return;
[process.stdout, process.stderr].forEach(_stream => {
const stream = _stream;
if (stream._handle &&
stream.isTTY &&
typeof stream._handle.setBlocking === 'function') {
stream.... |
1,289,388 | 054ac3fbcae4f9ea9869535357a4a6c3 | swh:1:cnt:5974e22689d43f748460b4e103493fe70f7f3841;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-10/ | a902dce431351f1b04841c5bf46f7e3ba1c86901 | wlbdashboard | wmcs | node_modules/yargs/build/lib/utils/which-module.js | whichModule | function | function whichModule(exported) {
if (typeof require === 'undefined')
return null;
for (let i = 0, files = Object.keys(require.cache), mod; i < files.length; i++) {
mod = require.cache[files[i]];
if (mod.exports === exported)
return mod;
}
return null;
} |
1,289,389 | 5255cd5317434650f2a60e3eb80a9427 | swh:1:cnt:4e8bd996e7a97a2c1e9c9fc4919044a171b73918;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=6-35/ | 6286d73d924a9d35b829ab0ecc0535b1afbc042b | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/string-utils.js | camelCase | function | function camelCase(str) {
// Handle the case where an argument is provided as camel case, e.g., fooBar.
// by ensuring that the string isn't already mixed case:
const isCamelCase = str !== str.toLowerCase() && str !== str.toUpperCase();
if (!isCamelCase) {
str = str.toLowerCase();
}
if (... |
1,289,390 | dc7df715edfa46784b7a45cad402cae0 | swh:1:cnt:4e8bd996e7a97a2c1e9c9fc4919044a171b73918;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=52-65/ | 6286d73d924a9d35b829ab0ecc0535b1afbc042b | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/string-utils.js | looksLikeNumber | function | function looksLikeNumber(x) {
if (x === null || x === undefined)
return false;
// if loaded from config, may already be a number.
if (typeof x === 'number')
return true;
// hexadecimal.
if (/^0x[0-9a-f]+$/i.test(x))
return true;
// don't treat 0123 as a number; as it drop... |
1,289,391 | 6fe4517254ef1a128228262332f6da2c | swh:1:cnt:4e8bd996e7a97a2c1e9c9fc4919044a171b73918;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=36-51/ | 6286d73d924a9d35b829ab0ecc0535b1afbc042b | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/string-utils.js | decamelize | function | function decamelize(str, joinString) {
const lowercase = str.toLowerCase();
joinString = joinString || '-';
let notCamelcase = '';
for (let i = 0; i < str.length; i++) {
const chrLower = lowercase.charAt(i);
const chrString = str.charAt(i);
if (chrLower !== chrString && i > 0) {
... |
1,289,392 | 93ba54ac135c2bb4341de5361e0b7625 | swh:1:cnt:5e732efe019ab064effaa667bfe7bf904a5f1cb0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=7-40/ | 9fa3e6da12a52d7e6e0e85a96c4078a64c3f37e9 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/tokenize-arg-string.js | tokenizeArgString | function | function tokenizeArgString(argString) {
if (Array.isArray(argString)) {
return argString.map(e => typeof e !== 'string' ? e + '' : e);
}
argString = argString.trim();
let i = 0;
let prevC = null;
let c = null;
let opening = null;
const args = [];
for (let ii = 0; ii < argStri... |
1,289,393 | a7c92edc6188873c24d06783ff797b0b | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=10-982/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser | type | class YargsParser {
constructor(_mixin) {
mixin = _mixin;
}
parse(argsInput, options) {
const opts = Object.assign({
alias: undefined,
array: undefined,
boolean: undefined,
config: undefined,
configObjects: undefined,
co... |
1,289,394 | 45694d74ec75497802229108fc09f02e | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=639-660/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::setConfigObject | function | // set args from config object.
// it recursively checks nested objects.
function setConfigObject(config, prev) {
Object.keys(config).forEach(function (key) {
const value = config[key];
const fullKey = prev ? prev + '.' + key : key;
// if the v... |
1,289,395 | 3ba7b86d32a41f363614a4ceeb97fb7b | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=720-733/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::applyDefaultsAndAliases | function | function applyDefaultsAndAliases(obj, aliases, defaults, canLog = false) {
Object.keys(defaults).forEach(function (key) {
if (!hasKey(obj, key.split('.'))) {
setKey(obj, key.split('.'), defaults[key]);
if (canLog)
defaulted[key]... |
1,289,396 | 9b28b9b962d8b394e6dc385baaff659c | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=597-638/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::setConfig | function | // set args from config.json file, this should be
// applied last so that defaults can be applied.
function setConfig(argv) {
const configLookup = Object.create(null);
// expand defaults/aliases, in-case any happen to reference
// the config.json file.
app... |
1,289,397 | 40ea4ac2cc7a2fdfc235ca18c200e6ee | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=747-811/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::setKey | function | function setKey(obj, keys, value) {
let o = obj;
if (!configuration['dot-notation'])
keys = [keys.join('.')];
keys.slice(0, -1).forEach(function (key) {
// TODO(bcoe): in the next major version of yargs, switch to
// Object.create(null)... |
1,289,398 | 6a4aa0b47b927f9279edcef9a53d1fb4 | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=955-957/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::isUndefined | function | function isUndefined(num) {
return num === undefined;
} |
1,289,399 | 2a358618111d38075f538dbe988933d1 | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1025-1030/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | increment | function | // this function should only be called when a count is given as an arg
// it is NOT called to set a default value
// thus we can start the count at 1 instead of 0
function increment(orig) {
return orig !== undefined ? orig + 1 : 1;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.