UNPKG

@magda/scripts

Version:

Scripts for building, running, and deploying MAGDA

27 lines (25 loc) 824 B
#!/usr/bin/env node import { require } from "@magda/esm-utils"; const pkg = require("../package.json"); import { program } from "commander"; import chalk from "chalk"; program .version(pkg.version) .description( `A tool for creating magda access control data. Version: ${pkg.version}` ) .command("permission", "Create permission") .command("operation", "Create operation") .on("command:*", function (cmds) { if (["permission", "operation"].indexOf(cmds[0]) === -1) { console.error( chalk.red( `Invalid command: ${program.args.join( " " )}\nSee --help for a list of available commands.` ) ); process.exit(1); } }) .parse(process.argv);