Update app and tooling
This commit is contained in:
parent
3046531bdd
commit
e620ec7349
4950 changed files with 2975120 additions and 10 deletions
31
node_modules/edge-runtime/dist/cli/help.js
generated
vendored
Normal file
31
node_modules/edge-runtime/dist/cli/help.js
generated
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.help = void 0;
|
||||
const picocolors_1 = require("picocolors");
|
||||
const flags = {
|
||||
eval: 'Evaluate an input script',
|
||||
help: 'Display this message.',
|
||||
listen: 'Run as HTTP server.',
|
||||
port: 'Specify a port to use.',
|
||||
repl: 'Start an interactive session.',
|
||||
};
|
||||
const help = () => `
|
||||
edge-runtime ${(0, picocolors_1.dim)('[<flags>] [input]')}
|
||||
|
||||
${(0, picocolors_1.dim)('Flags:')}
|
||||
|
||||
${getSectionSummary(flags)}
|
||||
`;
|
||||
exports.help = help;
|
||||
function getPadLength(options) {
|
||||
const lengths = Object.keys(options).map((key) => key.length);
|
||||
return Math.max.apply(null, lengths) + 1;
|
||||
}
|
||||
function getSectionSummary(options) {
|
||||
const summaryPadLength = getPadLength(options);
|
||||
const summary = Object.entries(options)
|
||||
.map(([key, description]) => ` --${key.padEnd(summaryPadLength)} ${(0, picocolors_1.dim)(description)}`)
|
||||
.join('\n');
|
||||
return `${summary}`;
|
||||
}
|
||||
//# sourceMappingURL=help.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue