test
This commit is contained in:
0
.gitignore
vendored
Executable file → Normal file
0
.gitignore
vendored
Executable file → Normal file
0
config.json.example
Executable file → Normal file
0
config.json.example
Executable file → Normal file
0
example_bot/bot.js
Executable file → Normal file
0
example_bot/bot.js
Executable file → Normal file
0
example_bot/node_modules/undici/lib/llhttp/llhttp.wasm
generated
vendored
Executable file → Normal file
0
example_bot/node_modules/undici/lib/llhttp/llhttp.wasm
generated
vendored
Executable file → Normal file
0
example_bot/node_modules/undici/lib/llhttp/llhttp_simd.wasm
generated
vendored
Executable file → Normal file
0
example_bot/node_modules/undici/lib/llhttp/llhttp_simd.wasm
generated
vendored
Executable file → Normal file
0
example_bot/package-lock.json
generated
Executable file → Normal file
0
example_bot/package-lock.json
generated
Executable file → Normal file
0
example_bot/package.json
Executable file → Normal file
0
example_bot/package.json
Executable file → Normal file
0
example_bot/updateCommands.js
Executable file → Normal file
0
example_bot/updateCommands.js
Executable file → Normal file
0
httpdocs/dashboard.html
Executable file → Normal file
0
httpdocs/dashboard.html
Executable file → Normal file
0
httpdocs/login.html
Executable file → Normal file
0
httpdocs/login.html
Executable file → Normal file
0
httpdocs/project.html
Executable file → Normal file
0
httpdocs/project.html
Executable file → Normal file
4
node_modules/.bin/color-support
generated
vendored
4
node_modules/.bin/color-support
generated
vendored
@@ -1 +1,3 @@
|
|||||||
../color-support/bin.js
|
#!/usr/bin/env node
|
||||||
|
var colorSupport = require('./')({alwaysReturn: true })
|
||||||
|
console.log(JSON.stringify(colorSupport, null, 2))
|
||||||
|
|||||||
106
node_modules/.bin/crc32
generated
vendored
106
node_modules/.bin/crc32
generated
vendored
@@ -1 +1,105 @@
|
|||||||
../crc-32/bin/crc32.njs
|
#!/usr/bin/env node
|
||||||
|
/* crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */
|
||||||
|
/* eslint-env node */
|
||||||
|
/* vim: set ts=2 ft=javascript: */
|
||||||
|
/*jshint node:true */
|
||||||
|
|
||||||
|
var X/*:CRC32Module*/;
|
||||||
|
try { X = require('../'); } catch(e) { X = require('crc-32'); }
|
||||||
|
|
||||||
|
function help()/*:number*/ {
|
||||||
|
[
|
||||||
|
"usage: crc32 [options] [filename]",
|
||||||
|
"",
|
||||||
|
"Options:",
|
||||||
|
" -h, --help output usage information",
|
||||||
|
" -V, --version output the version number",
|
||||||
|
" -S, --seed=<n> use integer seed as starting value (rolling CRC)",
|
||||||
|
" -H, --hex-seed=<h> use hex seed as starting value (rolling CRC)",
|
||||||
|
" -d, --signed print result with format `%d` (default)",
|
||||||
|
" -u, --unsigned print result with format `%u`",
|
||||||
|
" -x, --hex print result with format `%0.8x`",
|
||||||
|
" -X, --HEX print result with format `%0.8X`",
|
||||||
|
" -c, --crc32c use CRC32C (Castagnoli)",
|
||||||
|
" -F, --format=<s> use specified printf format",
|
||||||
|
"",
|
||||||
|
"Set filename = '-' or pipe data into crc32 to read from stdin",
|
||||||
|
"Default output mode is signed (-d)",
|
||||||
|
""
|
||||||
|
].forEach(function(l) { console.log(l); });
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
function version()/*:number*/ { console.log(X.version); return 0; }
|
||||||
|
|
||||||
|
var fs = require('fs');
|
||||||
|
try { require('exit-on-epipe'); } catch(e) {}
|
||||||
|
|
||||||
|
function die(msg/*:string*/, ec/*:?number*/)/*:void*/ { console.error(msg); process.exit(ec || 0); }
|
||||||
|
|
||||||
|
var args/*:Array<string>*/ = process.argv.slice(2);
|
||||||
|
var filename/*:string*/ = "";
|
||||||
|
var fmt/*:string*/ = "";
|
||||||
|
var seed = 0, r = 10;
|
||||||
|
|
||||||
|
for(var i = 0; i < args.length; ++i) {
|
||||||
|
var arg = args[i];
|
||||||
|
if(arg.charCodeAt(0) != 45) { if(filename === "") filename = arg; continue; }
|
||||||
|
var m = arg.indexOf("=") == -1 ? arg : arg.substr(0, arg.indexOf("="));
|
||||||
|
switch(m) {
|
||||||
|
case "-": filename = "-"; break;
|
||||||
|
|
||||||
|
case "--help": case "-h": process.exit(help()); break;
|
||||||
|
case "--version": case "-V": process.exit(version()); break;
|
||||||
|
|
||||||
|
case "--crc32c": case "-c": try { X = require('../crc32c'); } catch(e) { X = require('crc-32/crc32c'); } break;
|
||||||
|
|
||||||
|
case "--signed": case "-d": fmt = "%d"; break;
|
||||||
|
case "--unsigned": case "-u": fmt = "%u"; break;
|
||||||
|
case "--hex": case "-x": fmt = "%0.8x"; break;
|
||||||
|
case "--HEX": case "-X": fmt = "%0.8X"; break;
|
||||||
|
case "--format": case "-F":
|
||||||
|
try {
|
||||||
|
require("printj");
|
||||||
|
fmt = ((m!=arg) ? arg.substr(m.length+1) : args[++i])||"";
|
||||||
|
} catch(e) {
|
||||||
|
console.error("The `crc-32` module removed the `printj` dependency for formatting");
|
||||||
|
console.error("Use the `crc32-cli` module instead:");
|
||||||
|
console.error(" $ npx crc32-cli [options] [filename]");
|
||||||
|
} break;
|
||||||
|
|
||||||
|
case "--hex-seed": case "-H": r = 16;
|
||||||
|
/* falls through */
|
||||||
|
case "--seed": case "-S":
|
||||||
|
seed=parseInt((m!=arg) ? arg.substr(m.length+1) : args[++i], r)||0; break;
|
||||||
|
|
||||||
|
default: die("crc32: unrecognized option `" + arg + "'", 22);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!process.stdin.isTTY) filename = filename || "-";
|
||||||
|
if(filename.length===0) die("crc32: must specify a filename ('-' for stdin)",1);
|
||||||
|
|
||||||
|
var crc32 = seed;
|
||||||
|
// $FlowIgnore -- Writable is callable but type sig disagrees
|
||||||
|
var writable = require('stream').Writable();
|
||||||
|
writable._write = function(chunk, e, cb) { crc32 = X.buf(chunk, crc32); cb(); };
|
||||||
|
writable._writev = function(chunks, cb) {
|
||||||
|
chunks.forEach(function(c) { crc32 = X.buf(c.chunk, crc32);});
|
||||||
|
cb();
|
||||||
|
};
|
||||||
|
writable.on('finish', function() {
|
||||||
|
if(fmt === "") console.log(crc32);
|
||||||
|
else try { console.log(require("printj").sprintf(fmt, crc32)); } catch(e) {
|
||||||
|
switch(fmt) {
|
||||||
|
case "%d": console.log(crc32); break;
|
||||||
|
case "%u": console.log(crc32 >>> 0); break;
|
||||||
|
case "%0.8x": console.log((crc32 >>> 0).toString(16).padStart(8, "0").toLowerCase()); break;
|
||||||
|
case "%0.8X": console.log((crc32 >>> 0).toString(16).padStart(8, "0").toUpperCase()); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if(filename === "-") process.stdin.pipe(writable);
|
||||||
|
else if(fs.existsSync(filename)) fs.createReadStream(filename).pipe(writable);
|
||||||
|
else die("crc32: " + filename + ": No such file or directory", 2);
|
||||||
|
|||||||
9
node_modules/.bin/mime
generated
vendored
9
node_modules/.bin/mime
generated
vendored
@@ -1 +1,8 @@
|
|||||||
../mime/cli.js
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
var mime = require('./mime.js');
|
||||||
|
var file = process.argv[2];
|
||||||
|
var type = mime.lookup(file);
|
||||||
|
|
||||||
|
process.stdout.write(type + '\n');
|
||||||
|
|
||||||
|
|||||||
69
node_modules/.bin/mkdirp
generated
vendored
69
node_modules/.bin/mkdirp
generated
vendored
@@ -1 +1,68 @@
|
|||||||
../mkdirp/bin/cmd.js
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
const usage = () => `
|
||||||
|
usage: mkdirp [DIR1,DIR2..] {OPTIONS}
|
||||||
|
|
||||||
|
Create each supplied directory including any necessary parent directories
|
||||||
|
that don't yet exist.
|
||||||
|
|
||||||
|
If the directory already exists, do nothing.
|
||||||
|
|
||||||
|
OPTIONS are:
|
||||||
|
|
||||||
|
-m<mode> If a directory needs to be created, set the mode as an octal
|
||||||
|
--mode=<mode> permission string.
|
||||||
|
|
||||||
|
-v --version Print the mkdirp version number
|
||||||
|
|
||||||
|
-h --help Print this helpful banner
|
||||||
|
|
||||||
|
-p --print Print the first directories created for each path provided
|
||||||
|
|
||||||
|
--manual Use manual implementation, even if native is available
|
||||||
|
`
|
||||||
|
|
||||||
|
const dirs = []
|
||||||
|
const opts = {}
|
||||||
|
let print = false
|
||||||
|
let dashdash = false
|
||||||
|
let manual = false
|
||||||
|
for (const arg of process.argv.slice(2)) {
|
||||||
|
if (dashdash)
|
||||||
|
dirs.push(arg)
|
||||||
|
else if (arg === '--')
|
||||||
|
dashdash = true
|
||||||
|
else if (arg === '--manual')
|
||||||
|
manual = true
|
||||||
|
else if (/^-h/.test(arg) || /^--help/.test(arg)) {
|
||||||
|
console.log(usage())
|
||||||
|
process.exit(0)
|
||||||
|
} else if (arg === '-v' || arg === '--version') {
|
||||||
|
console.log(require('../package.json').version)
|
||||||
|
process.exit(0)
|
||||||
|
} else if (arg === '-p' || arg === '--print') {
|
||||||
|
print = true
|
||||||
|
} else if (/^-m/.test(arg) || /^--mode=/.test(arg)) {
|
||||||
|
const mode = parseInt(arg.replace(/^(-m|--mode=)/, ''), 8)
|
||||||
|
if (isNaN(mode)) {
|
||||||
|
console.error(`invalid mode argument: ${arg}\nMust be an octal number.`)
|
||||||
|
process.exit(1)
|
||||||
|
}
|
||||||
|
opts.mode = mode
|
||||||
|
} else
|
||||||
|
dirs.push(arg)
|
||||||
|
}
|
||||||
|
|
||||||
|
const mkdirp = require('../')
|
||||||
|
const impl = manual ? mkdirp.manual : mkdirp
|
||||||
|
if (dirs.length === 0)
|
||||||
|
console.error(usage())
|
||||||
|
|
||||||
|
Promise.all(dirs.map(dir => impl(dir, opts)))
|
||||||
|
.then(made => print ? made.forEach(m => m && console.log(m)) : null)
|
||||||
|
.catch(er => {
|
||||||
|
console.error(er.message)
|
||||||
|
if (er.code)
|
||||||
|
console.error(' code: ' + er.code)
|
||||||
|
process.exit(1)
|
||||||
|
})
|
||||||
|
|||||||
5
node_modules/.bin/node-pre-gyp
generated
vendored
5
node_modules/.bin/node-pre-gyp
generated
vendored
@@ -1 +1,4 @@
|
|||||||
../@mapbox/node-pre-gyp/bin/node-pre-gyp
|
#!/usr/bin/env node
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
require('../lib/main');
|
||||||
|
|||||||
69
node_modules/.bin/rimraf
generated
vendored
69
node_modules/.bin/rimraf
generated
vendored
@@ -1 +1,68 @@
|
|||||||
../rimraf/bin.js
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
const rimraf = require('./')
|
||||||
|
|
||||||
|
const path = require('path')
|
||||||
|
|
||||||
|
const isRoot = arg => /^(\/|[a-zA-Z]:\\)$/.test(path.resolve(arg))
|
||||||
|
const filterOutRoot = arg => {
|
||||||
|
const ok = preserveRoot === false || !isRoot(arg)
|
||||||
|
if (!ok) {
|
||||||
|
console.error(`refusing to remove ${arg}`)
|
||||||
|
console.error('Set --no-preserve-root to allow this')
|
||||||
|
}
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
let help = false
|
||||||
|
let dashdash = false
|
||||||
|
let noglob = false
|
||||||
|
let preserveRoot = true
|
||||||
|
const args = process.argv.slice(2).filter(arg => {
|
||||||
|
if (dashdash)
|
||||||
|
return !!arg
|
||||||
|
else if (arg === '--')
|
||||||
|
dashdash = true
|
||||||
|
else if (arg === '--no-glob' || arg === '-G')
|
||||||
|
noglob = true
|
||||||
|
else if (arg === '--glob' || arg === '-g')
|
||||||
|
noglob = false
|
||||||
|
else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/))
|
||||||
|
help = true
|
||||||
|
else if (arg === '--preserve-root')
|
||||||
|
preserveRoot = true
|
||||||
|
else if (arg === '--no-preserve-root')
|
||||||
|
preserveRoot = false
|
||||||
|
else
|
||||||
|
return !!arg
|
||||||
|
}).filter(arg => !preserveRoot || filterOutRoot(arg))
|
||||||
|
|
||||||
|
const go = n => {
|
||||||
|
if (n >= args.length)
|
||||||
|
return
|
||||||
|
const options = noglob ? { glob: false } : {}
|
||||||
|
rimraf(args[n], options, er => {
|
||||||
|
if (er)
|
||||||
|
throw er
|
||||||
|
go(n+1)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if (help || args.length === 0) {
|
||||||
|
// If they didn't ask for help, then this is not a "success"
|
||||||
|
const log = help ? console.log : console.error
|
||||||
|
log('Usage: rimraf <path> [<path> ...]')
|
||||||
|
log('')
|
||||||
|
log(' Deletes all files and folders at "path" recursively.')
|
||||||
|
log('')
|
||||||
|
log('Options:')
|
||||||
|
log('')
|
||||||
|
log(' -h, --help Display this usage info')
|
||||||
|
log(' -G, --no-glob Do not expand glob patterns in arguments')
|
||||||
|
log(' -g, --glob Expand glob patterns in arguments (default)')
|
||||||
|
log(' --preserve-root Do not remove \'/\' (default)')
|
||||||
|
log(' --no-preserve-root Do not treat \'/\' specially')
|
||||||
|
log(' -- Stop parsing flags')
|
||||||
|
process.exit(help ? 0 : 1)
|
||||||
|
} else
|
||||||
|
go(0)
|
||||||
|
|||||||
198
node_modules/.bin/semver
generated
vendored
198
node_modules/.bin/semver
generated
vendored
@@ -1 +1,197 @@
|
|||||||
../semver/bin/semver.js
|
#!/usr/bin/env node
|
||||||
|
// Standalone semver comparison program.
|
||||||
|
// Exits successfully and prints matching version(s) if
|
||||||
|
// any supplied version is valid and passes all tests.
|
||||||
|
|
||||||
|
const argv = process.argv.slice(2)
|
||||||
|
|
||||||
|
let versions = []
|
||||||
|
|
||||||
|
const range = []
|
||||||
|
|
||||||
|
let inc = null
|
||||||
|
|
||||||
|
const version = require('../package.json').version
|
||||||
|
|
||||||
|
let loose = false
|
||||||
|
|
||||||
|
let includePrerelease = false
|
||||||
|
|
||||||
|
let coerce = false
|
||||||
|
|
||||||
|
let rtl = false
|
||||||
|
|
||||||
|
let identifier
|
||||||
|
|
||||||
|
let identifierBase
|
||||||
|
|
||||||
|
const semver = require('../')
|
||||||
|
const parseOptions = require('../internal/parse-options')
|
||||||
|
|
||||||
|
let reverse = false
|
||||||
|
|
||||||
|
let options = {}
|
||||||
|
|
||||||
|
const main = () => {
|
||||||
|
if (!argv.length) {
|
||||||
|
return help()
|
||||||
|
}
|
||||||
|
while (argv.length) {
|
||||||
|
let a = argv.shift()
|
||||||
|
const indexOfEqualSign = a.indexOf('=')
|
||||||
|
if (indexOfEqualSign !== -1) {
|
||||||
|
const value = a.slice(indexOfEqualSign + 1)
|
||||||
|
a = a.slice(0, indexOfEqualSign)
|
||||||
|
argv.unshift(value)
|
||||||
|
}
|
||||||
|
switch (a) {
|
||||||
|
case '-rv': case '-rev': case '--rev': case '--reverse':
|
||||||
|
reverse = true
|
||||||
|
break
|
||||||
|
case '-l': case '--loose':
|
||||||
|
loose = true
|
||||||
|
break
|
||||||
|
case '-p': case '--include-prerelease':
|
||||||
|
includePrerelease = true
|
||||||
|
break
|
||||||
|
case '-v': case '--version':
|
||||||
|
versions.push(argv.shift())
|
||||||
|
break
|
||||||
|
case '-i': case '--inc': case '--increment':
|
||||||
|
switch (argv[0]) {
|
||||||
|
case 'major': case 'minor': case 'patch': case 'prerelease':
|
||||||
|
case 'premajor': case 'preminor': case 'prepatch':
|
||||||
|
inc = argv.shift()
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
inc = 'patch'
|
||||||
|
break
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case '--preid':
|
||||||
|
identifier = argv.shift()
|
||||||
|
break
|
||||||
|
case '-r': case '--range':
|
||||||
|
range.push(argv.shift())
|
||||||
|
break
|
||||||
|
case '-n':
|
||||||
|
identifierBase = argv.shift()
|
||||||
|
if (identifierBase === 'false') {
|
||||||
|
identifierBase = false
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case '-c': case '--coerce':
|
||||||
|
coerce = true
|
||||||
|
break
|
||||||
|
case '--rtl':
|
||||||
|
rtl = true
|
||||||
|
break
|
||||||
|
case '--ltr':
|
||||||
|
rtl = false
|
||||||
|
break
|
||||||
|
case '-h': case '--help': case '-?':
|
||||||
|
return help()
|
||||||
|
default:
|
||||||
|
versions.push(a)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
options = parseOptions({ loose, includePrerelease, rtl })
|
||||||
|
|
||||||
|
versions = versions.map((v) => {
|
||||||
|
return coerce ? (semver.coerce(v, options) || { version: v }).version : v
|
||||||
|
}).filter((v) => {
|
||||||
|
return semver.valid(v)
|
||||||
|
})
|
||||||
|
if (!versions.length) {
|
||||||
|
return fail()
|
||||||
|
}
|
||||||
|
if (inc && (versions.length !== 1 || range.length)) {
|
||||||
|
return failInc()
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let i = 0, l = range.length; i < l; i++) {
|
||||||
|
versions = versions.filter((v) => {
|
||||||
|
return semver.satisfies(v, range[i], options)
|
||||||
|
})
|
||||||
|
if (!versions.length) {
|
||||||
|
return fail()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return success(versions)
|
||||||
|
}
|
||||||
|
|
||||||
|
const failInc = () => {
|
||||||
|
console.error('--inc can only be used on a single version with no range')
|
||||||
|
fail()
|
||||||
|
}
|
||||||
|
|
||||||
|
const fail = () => process.exit(1)
|
||||||
|
|
||||||
|
const success = () => {
|
||||||
|
const compare = reverse ? 'rcompare' : 'compare'
|
||||||
|
versions.sort((a, b) => {
|
||||||
|
return semver[compare](a, b, options)
|
||||||
|
}).map((v) => {
|
||||||
|
return semver.clean(v, options)
|
||||||
|
}).map((v) => {
|
||||||
|
return inc ? semver.inc(v, inc, options, identifier, identifierBase) : v
|
||||||
|
}).forEach((v, i, _) => {
|
||||||
|
console.log(v)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const help = () => console.log(
|
||||||
|
`SemVer ${version}
|
||||||
|
|
||||||
|
A JavaScript implementation of the https://semver.org/ specification
|
||||||
|
Copyright Isaac Z. Schlueter
|
||||||
|
|
||||||
|
Usage: semver [options] <version> [<version> [...]]
|
||||||
|
Prints valid versions sorted by SemVer precedence
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-r --range <range>
|
||||||
|
Print versions that match the specified range.
|
||||||
|
|
||||||
|
-i --increment [<level>]
|
||||||
|
Increment a version by the specified level. Level can
|
||||||
|
be one of: major, minor, patch, premajor, preminor,
|
||||||
|
prepatch, or prerelease. Default level is 'patch'.
|
||||||
|
Only one version may be specified.
|
||||||
|
|
||||||
|
--preid <identifier>
|
||||||
|
Identifier to be used to prefix premajor, preminor,
|
||||||
|
prepatch or prerelease version increments.
|
||||||
|
|
||||||
|
-l --loose
|
||||||
|
Interpret versions and ranges loosely
|
||||||
|
|
||||||
|
-p --include-prerelease
|
||||||
|
Always include prerelease versions in range matching
|
||||||
|
|
||||||
|
-c --coerce
|
||||||
|
Coerce a string into SemVer if possible
|
||||||
|
(does not imply --loose)
|
||||||
|
|
||||||
|
--rtl
|
||||||
|
Coerce version strings right to left
|
||||||
|
|
||||||
|
--ltr
|
||||||
|
Coerce version strings left to right (default)
|
||||||
|
|
||||||
|
-n <base>
|
||||||
|
Base number to be used for the prerelease identifier.
|
||||||
|
Can be either 0 or 1, or false to omit the number altogether.
|
||||||
|
Defaults to 0.
|
||||||
|
|
||||||
|
Program exits successfully if any valid version satisfies
|
||||||
|
all supplied ranges, and prints all satisfying versions.
|
||||||
|
|
||||||
|
If no satisfying versions are found, then exits failure.
|
||||||
|
|
||||||
|
Versions are printed in ascending order, so supplying
|
||||||
|
multiple versions to the utility will just sort them.`)
|
||||||
|
|
||||||
|
main()
|
||||||
|
|||||||
0
node_modules/@mapbox/node-pre-gyp/bin/node-pre-gyp
generated
vendored
Executable file → Normal file
0
node_modules/@mapbox/node-pre-gyp/bin/node-pre-gyp
generated
vendored
Executable file → Normal file
55
node_modules/@mapbox/node-pre-gyp/node_modules/.bin/nopt
generated
vendored
55
node_modules/@mapbox/node-pre-gyp/node_modules/.bin/nopt
generated
vendored
@@ -1 +1,54 @@
|
|||||||
../nopt/bin/nopt.js
|
#!/usr/bin/env node
|
||||||
|
var nopt = require("../lib/nopt")
|
||||||
|
, path = require("path")
|
||||||
|
, types = { num: Number
|
||||||
|
, bool: Boolean
|
||||||
|
, help: Boolean
|
||||||
|
, list: Array
|
||||||
|
, "num-list": [Number, Array]
|
||||||
|
, "str-list": [String, Array]
|
||||||
|
, "bool-list": [Boolean, Array]
|
||||||
|
, str: String
|
||||||
|
, clear: Boolean
|
||||||
|
, config: Boolean
|
||||||
|
, length: Number
|
||||||
|
, file: path
|
||||||
|
}
|
||||||
|
, shorthands = { s: [ "--str", "astring" ]
|
||||||
|
, b: [ "--bool" ]
|
||||||
|
, nb: [ "--no-bool" ]
|
||||||
|
, tft: [ "--bool-list", "--no-bool-list", "--bool-list", "true" ]
|
||||||
|
, "?": ["--help"]
|
||||||
|
, h: ["--help"]
|
||||||
|
, H: ["--help"]
|
||||||
|
, n: [ "--num", "125" ]
|
||||||
|
, c: ["--config"]
|
||||||
|
, l: ["--length"]
|
||||||
|
, f: ["--file"]
|
||||||
|
}
|
||||||
|
, parsed = nopt( types
|
||||||
|
, shorthands
|
||||||
|
, process.argv
|
||||||
|
, 2 )
|
||||||
|
|
||||||
|
console.log("parsed", parsed)
|
||||||
|
|
||||||
|
if (parsed.help) {
|
||||||
|
console.log("")
|
||||||
|
console.log("nopt cli tester")
|
||||||
|
console.log("")
|
||||||
|
console.log("types")
|
||||||
|
console.log(Object.keys(types).map(function M (t) {
|
||||||
|
var type = types[t]
|
||||||
|
if (Array.isArray(type)) {
|
||||||
|
return [t, type.map(function (type) { return type.name })]
|
||||||
|
}
|
||||||
|
return [t, type && type.name]
|
||||||
|
}).reduce(function (s, i) {
|
||||||
|
s[i[0]] = i[1]
|
||||||
|
return s
|
||||||
|
}, {}))
|
||||||
|
console.log("")
|
||||||
|
console.log("shorthands")
|
||||||
|
console.log(shorthands)
|
||||||
|
}
|
||||||
|
|||||||
0
node_modules/@mapbox/node-pre-gyp/node_modules/nopt/bin/nopt.js
generated
vendored
Executable file → Normal file
0
node_modules/@mapbox/node-pre-gyp/node_modules/nopt/bin/nopt.js
generated
vendored
Executable file → Normal file
0
node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node
generated
vendored
Executable file → Normal file
0
node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node
generated
vendored
Executable file → Normal file
0
node_modules/bcrypt/test-docker.sh
generated
vendored
Executable file → Normal file
0
node_modules/bcrypt/test-docker.sh
generated
vendored
Executable file → Normal file
0
node_modules/color-support/bin.js
generated
vendored
Executable file → Normal file
0
node_modules/color-support/bin.js
generated
vendored
Executable file → Normal file
0
node_modules/crc-32/bin/crc32.njs
generated
vendored
Executable file → Normal file
0
node_modules/crc-32/bin/crc32.njs
generated
vendored
Executable file → Normal file
175
node_modules/make-dir/node_modules/.bin/semver
generated
vendored
175
node_modules/make-dir/node_modules/.bin/semver
generated
vendored
@@ -1 +1,174 @@
|
|||||||
../semver/bin/semver.js
|
#!/usr/bin/env node
|
||||||
|
// Standalone semver comparison program.
|
||||||
|
// Exits successfully and prints matching version(s) if
|
||||||
|
// any supplied version is valid and passes all tests.
|
||||||
|
|
||||||
|
var argv = process.argv.slice(2)
|
||||||
|
|
||||||
|
var versions = []
|
||||||
|
|
||||||
|
var range = []
|
||||||
|
|
||||||
|
var inc = null
|
||||||
|
|
||||||
|
var version = require('../package.json').version
|
||||||
|
|
||||||
|
var loose = false
|
||||||
|
|
||||||
|
var includePrerelease = false
|
||||||
|
|
||||||
|
var coerce = false
|
||||||
|
|
||||||
|
var rtl = false
|
||||||
|
|
||||||
|
var identifier
|
||||||
|
|
||||||
|
var semver = require('../semver')
|
||||||
|
|
||||||
|
var reverse = false
|
||||||
|
|
||||||
|
var options = {}
|
||||||
|
|
||||||
|
main()
|
||||||
|
|
||||||
|
function main () {
|
||||||
|
if (!argv.length) return help()
|
||||||
|
while (argv.length) {
|
||||||
|
var a = argv.shift()
|
||||||
|
var indexOfEqualSign = a.indexOf('=')
|
||||||
|
if (indexOfEqualSign !== -1) {
|
||||||
|
a = a.slice(0, indexOfEqualSign)
|
||||||
|
argv.unshift(a.slice(indexOfEqualSign + 1))
|
||||||
|
}
|
||||||
|
switch (a) {
|
||||||
|
case '-rv': case '-rev': case '--rev': case '--reverse':
|
||||||
|
reverse = true
|
||||||
|
break
|
||||||
|
case '-l': case '--loose':
|
||||||
|
loose = true
|
||||||
|
break
|
||||||
|
case '-p': case '--include-prerelease':
|
||||||
|
includePrerelease = true
|
||||||
|
break
|
||||||
|
case '-v': case '--version':
|
||||||
|
versions.push(argv.shift())
|
||||||
|
break
|
||||||
|
case '-i': case '--inc': case '--increment':
|
||||||
|
switch (argv[0]) {
|
||||||
|
case 'major': case 'minor': case 'patch': case 'prerelease':
|
||||||
|
case 'premajor': case 'preminor': case 'prepatch':
|
||||||
|
inc = argv.shift()
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
inc = 'patch'
|
||||||
|
break
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case '--preid':
|
||||||
|
identifier = argv.shift()
|
||||||
|
break
|
||||||
|
case '-r': case '--range':
|
||||||
|
range.push(argv.shift())
|
||||||
|
break
|
||||||
|
case '-c': case '--coerce':
|
||||||
|
coerce = true
|
||||||
|
break
|
||||||
|
case '--rtl':
|
||||||
|
rtl = true
|
||||||
|
break
|
||||||
|
case '--ltr':
|
||||||
|
rtl = false
|
||||||
|
break
|
||||||
|
case '-h': case '--help': case '-?':
|
||||||
|
return help()
|
||||||
|
default:
|
||||||
|
versions.push(a)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl }
|
||||||
|
|
||||||
|
versions = versions.map(function (v) {
|
||||||
|
return coerce ? (semver.coerce(v, options) || { version: v }).version : v
|
||||||
|
}).filter(function (v) {
|
||||||
|
return semver.valid(v)
|
||||||
|
})
|
||||||
|
if (!versions.length) return fail()
|
||||||
|
if (inc && (versions.length !== 1 || range.length)) { return failInc() }
|
||||||
|
|
||||||
|
for (var i = 0, l = range.length; i < l; i++) {
|
||||||
|
versions = versions.filter(function (v) {
|
||||||
|
return semver.satisfies(v, range[i], options)
|
||||||
|
})
|
||||||
|
if (!versions.length) return fail()
|
||||||
|
}
|
||||||
|
return success(versions)
|
||||||
|
}
|
||||||
|
|
||||||
|
function failInc () {
|
||||||
|
console.error('--inc can only be used on a single version with no range')
|
||||||
|
fail()
|
||||||
|
}
|
||||||
|
|
||||||
|
function fail () { process.exit(1) }
|
||||||
|
|
||||||
|
function success () {
|
||||||
|
var compare = reverse ? 'rcompare' : 'compare'
|
||||||
|
versions.sort(function (a, b) {
|
||||||
|
return semver[compare](a, b, options)
|
||||||
|
}).map(function (v) {
|
||||||
|
return semver.clean(v, options)
|
||||||
|
}).map(function (v) {
|
||||||
|
return inc ? semver.inc(v, inc, options, identifier) : v
|
||||||
|
}).forEach(function (v, i, _) { console.log(v) })
|
||||||
|
}
|
||||||
|
|
||||||
|
function help () {
|
||||||
|
console.log(['SemVer ' + version,
|
||||||
|
'',
|
||||||
|
'A JavaScript implementation of the https://semver.org/ specification',
|
||||||
|
'Copyright Isaac Z. Schlueter',
|
||||||
|
'',
|
||||||
|
'Usage: semver [options] <version> [<version> [...]]',
|
||||||
|
'Prints valid versions sorted by SemVer precedence',
|
||||||
|
'',
|
||||||
|
'Options:',
|
||||||
|
'-r --range <range>',
|
||||||
|
' Print versions that match the specified range.',
|
||||||
|
'',
|
||||||
|
'-i --increment [<level>]',
|
||||||
|
' Increment a version by the specified level. Level can',
|
||||||
|
' be one of: major, minor, patch, premajor, preminor,',
|
||||||
|
" prepatch, or prerelease. Default level is 'patch'.",
|
||||||
|
' Only one version may be specified.',
|
||||||
|
'',
|
||||||
|
'--preid <identifier>',
|
||||||
|
' Identifier to be used to prefix premajor, preminor,',
|
||||||
|
' prepatch or prerelease version increments.',
|
||||||
|
'',
|
||||||
|
'-l --loose',
|
||||||
|
' Interpret versions and ranges loosely',
|
||||||
|
'',
|
||||||
|
'-p --include-prerelease',
|
||||||
|
' Always include prerelease versions in range matching',
|
||||||
|
'',
|
||||||
|
'-c --coerce',
|
||||||
|
' Coerce a string into SemVer if possible',
|
||||||
|
' (does not imply --loose)',
|
||||||
|
'',
|
||||||
|
'--rtl',
|
||||||
|
' Coerce version strings right to left',
|
||||||
|
'',
|
||||||
|
'--ltr',
|
||||||
|
' Coerce version strings left to right (default)',
|
||||||
|
'',
|
||||||
|
'Program exits successfully if any valid version satisfies',
|
||||||
|
'all supplied ranges, and prints all satisfying versions.',
|
||||||
|
'',
|
||||||
|
'If no satisfying versions are found, then exits failure.',
|
||||||
|
'',
|
||||||
|
'Versions are printed in ascending order, so supplying',
|
||||||
|
'multiple versions to the utility will just sort them.'
|
||||||
|
].join('\n'))
|
||||||
|
}
|
||||||
|
|||||||
0
node_modules/make-dir/node_modules/semver/bin/semver.js
generated
vendored
Executable file → Normal file
0
node_modules/make-dir/node_modules/semver/bin/semver.js
generated
vendored
Executable file → Normal file
0
node_modules/mime/cli.js
generated
vendored
Executable file → Normal file
0
node_modules/mime/cli.js
generated
vendored
Executable file → Normal file
0
node_modules/mime/src/build.js
generated
vendored
Executable file → Normal file
0
node_modules/mime/src/build.js
generated
vendored
Executable file → Normal file
0
node_modules/mkdirp/bin/cmd.js
generated
vendored
Executable file → Normal file
0
node_modules/mkdirp/bin/cmd.js
generated
vendored
Executable file → Normal file
0
node_modules/node-addon-api/tools/conversion.js
generated
vendored
Executable file → Normal file
0
node_modules/node-addon-api/tools/conversion.js
generated
vendored
Executable file → Normal file
0
node_modules/rimraf/bin.js
generated
vendored
Executable file → Normal file
0
node_modules/rimraf/bin.js
generated
vendored
Executable file → Normal file
0
node_modules/semver/bin/semver.js
generated
vendored
Executable file → Normal file
0
node_modules/semver/bin/semver.js
generated
vendored
Executable file → Normal file
0
node_modules/wide-align/LICENSE
generated
vendored
Executable file → Normal file
0
node_modules/wide-align/LICENSE
generated
vendored
Executable file → Normal file
0
node_modules/wide-align/README.md
generated
vendored
Executable file → Normal file
0
node_modules/wide-align/README.md
generated
vendored
Executable file → Normal file
0
node_modules/wide-align/align.js
generated
vendored
Executable file → Normal file
0
node_modules/wide-align/align.js
generated
vendored
Executable file → Normal file
0
node_modules/wide-align/package.json
generated
vendored
Executable file → Normal file
0
node_modules/wide-align/package.json
generated
vendored
Executable file → Normal file
0
package-lock.json
generated
Executable file → Normal file
0
package-lock.json
generated
Executable file → Normal file
0
package.json
Executable file → Normal file
0
package.json
Executable file → Normal file
0
scripts/bots.js
Executable file → Normal file
0
scripts/bots.js
Executable file → Normal file
0
scripts/project.js
Executable file → Normal file
0
scripts/project.js
Executable file → Normal file
0
src/background.png
Executable file → Normal file
0
src/background.png
Executable file → Normal file
|
Before Width: | Height: | Size: 565 KiB After Width: | Height: | Size: 565 KiB |
0
startServer.sh
Executable file → Normal file
0
startServer.sh
Executable file → Normal file
0
styles/dashboard.css
Executable file → Normal file
0
styles/dashboard.css
Executable file → Normal file
0
styles/login.css
Executable file → Normal file
0
styles/login.css
Executable file → Normal file
0
styles/project.css
Executable file → Normal file
0
styles/project.css
Executable file → Normal file
0
styles/public.css
Executable file → Normal file
0
styles/public.css
Executable file → Normal file
Reference in New Issue
Block a user