system/packages/git-modules/dist/argv.js
2024-07-02 21:56:23 +02:00

29 lines
1.0 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.defaultOptions = exports.sanitize = void 0;
const path = require("path");
const sanitize = (argv) => {
argv = argv;
argv.source = path.resolve(argv.source);
argv.target = path.resolve(argv.target);
argv.profile = argv.profile || '';
argv.filter = argv.filter || '';
argv.verbose = argv.verbose === 'true' ? true : false;
return argv;
};
exports.sanitize = sanitize;
const defaultOptions = (yargs) => {
return yargs.option('target', {
default: process.cwd(),
describe: 'the command to run per module'
}).option('source', {
default: process.cwd(),
describe: 'the source'
}).option('profile', {
describe: 'only use modules which specified that profile'
}).option('filter', {
describe: 'select github or gitlab repositories: --filter=github|gitlab'
});
};
exports.defaultOptions = defaultOptions;
//# sourceMappingURL=argv.js.map