@o3r/amaterasu-sdk
Version:
Ama-terasu module for DES SDK generation
38 lines • 1.56 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("@ama-terasu/core");
const create_typescript_command_1 = require("./create-typescript.command");
const name = 'sdk';
module.exports = {
name,
description: 'Commands relative to the SDK generation',
init: (yargs, baseContext) => {
return yargs
.demandCommand()
.command('create', 'Generate new SDK package', (yargsInstance) => yargsInstance
.demandCommand()
.option(core_1.EXTRA_COMMON_OPTIONS.path, {
...core_1.MODULE_OPTIONS.path,
type: 'string',
default: '.',
description: 'Path to the generated package'
})
.command('typescript <name>', 'Generate a typescript SDK package (empty if no specification given)', (yargsInstanceTs) => yargsInstanceTs
.positional('name', {
type: 'string',
description: 'Generated SDK scope name',
demandOption: 'SDK name is mandatory'
})
.option(core_1.EXTRA_COMMON_OPTIONS.yarn, {
...core_1.MODULE_OPTIONS.yarn,
type: 'boolean',
default: true
})
.option('specification', {
type: 'string',
alias: ['S'],
description: 'Path to the specification used to generate the SDK'
}), (options) => (0, create_typescript_command_1.createTypescriptSdk)(baseContext.getContext(options), options)));
}
};
//# sourceMappingURL=index.js.map