no version = latest version
This commit is contained in:
parent
589dfec6df
commit
f683dfc2cf
|
@ -3,11 +3,17 @@ const fs = require('fs');
|
|||
const path = require('path');
|
||||
const chalk = require('chalk');
|
||||
|
||||
exports.command = ['execute <language> <language-version> <file> [args..]']
|
||||
exports.command = ['execute <language> <file> [args..]']
|
||||
exports.aliases = ['run']
|
||||
exports.describe = 'Executes file with the specified runner'
|
||||
|
||||
exports.builder = {
|
||||
languageVersion: {
|
||||
string: true,
|
||||
desc: 'Set the version of the language to use',
|
||||
alias: ['l'],
|
||||
default: '*'
|
||||
},
|
||||
stdin: {
|
||||
boolean: true,
|
||||
desc: 'Read input from stdin and pass to executor',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const chalk = require('chalk');
|
||||
|
||||
exports.command = ['install <language> <language-version>']
|
||||
exports.command = ['install <language> [language-version]']
|
||||
exports.aliases = ['i']
|
||||
exports.describe = 'Installs the named package'
|
||||
|
||||
|
@ -14,7 +14,7 @@ const msg_format = {
|
|||
|
||||
exports.handler = async function({axios, language, languageVersion}){
|
||||
try{
|
||||
const install = await axios.post(`/api/v1/packages/${language}/${languageVersion}`)
|
||||
const install = await axios.post(`/api/v1/packages/${language}/${languageVersion || '*'}`)
|
||||
|
||||
console.log(msg_format.color(install.data));
|
||||
}catch({response}){
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const chalk = require('chalk');
|
||||
|
||||
exports.command = ['uninstall <language> <language-version>']
|
||||
exports.command = ['uninstall <language> [language-version]']
|
||||
exports.aliases = ['u']
|
||||
exports.describe = 'Uninstalls the named package'
|
||||
|
||||
|
@ -14,7 +14,7 @@ const msg_format = {
|
|||
|
||||
exports.handler = async function({axios, language, languageVersion}){
|
||||
try{
|
||||
const uninstall = await axios.delete(`/api/v1/packages/${language}/${languageVersion}`)
|
||||
const uninstall = await axios.delete(`/api/v1/packages/${language}/${languageVersion || '*'}`)
|
||||
|
||||
console.log(msg_format.color(uninstall.data));
|
||||
}catch({response}){
|
||||
|
|
Loading…
Reference in New Issue