@based/cli
Advanced tools
Comparing version 2.4.0 to 2.5.1
@@ -12,3 +12,4 @@ import { Command } from 'commander'; | ||
apiKey?: string; | ||
header: boolean; | ||
}; | ||
export declare const command: (command: Command) => Command; |
@@ -15,2 +15,3 @@ "use strict"; | ||
.option('-k, --api-key <apiKey>', 'Use apiKey from file') | ||
.option('-H, --no-header', "Don't show header so you can chain commands.") | ||
.addOption(new commander_1.Option('-o, --output <output>', 'Output type') | ||
@@ -17,0 +18,0 @@ .choices(['fancy', 'json', 'none']) |
@@ -158,2 +158,3 @@ "use strict"; | ||
spinner && spinner.clear(); | ||
options.debug && (0, tui_1.printError)(err); | ||
if (err.code === 'exists') { | ||
@@ -165,3 +166,2 @@ (0, tui_1.fail)(`Cannot create environment, ${chalk_1.default.blue(config.org + '/' + config.project + '/' + config.env)} already exists`, output, options); | ||
} | ||
options.debug && (0, tui_1.printError)(err); | ||
} | ||
@@ -168,0 +168,0 @@ }; |
@@ -18,5 +18,2 @@ "use strict"; | ||
const chalk_1 = __importDefault(require("chalk")); | ||
readline_1.default.emitKeypressEvents(process.stdin); | ||
if (process.stdin.isTTY) | ||
process.stdin.setRawMode(true); | ||
const logCommand = new commander_1.Command('log') | ||
@@ -27,2 +24,5 @@ .description('Log viewer') | ||
.action(async (options) => { | ||
readline_1.default.emitKeypressEvents(process.stdin); | ||
if (process.stdin.isTTY) | ||
process.stdin.setRawMode(true); | ||
const config = await (0, makeConfig_1.makeConfig)(options); | ||
@@ -29,0 +29,0 @@ (0, tui_1.printHeader)(options, config); |
@@ -104,3 +104,3 @@ "use strict"; | ||
} | ||
else { | ||
else if (!options.nonInteractive) { | ||
; | ||
@@ -173,3 +173,3 @@ ({ name } = await inquirer_1.default.prompt({ | ||
amount: instances, | ||
name, | ||
name: template.name, | ||
args: name ? { name } : {}, | ||
@@ -196,3 +196,6 @@ // TODO: select service | ||
(0, tui_1.printEmptyLine)(); | ||
console.info(tui_1.prefixSuccess + 'Created service ' + chalk_1.default.blue(name) + '.'); | ||
console.info(tui_1.prefixSuccess + | ||
'Created service ' + | ||
chalk_1.default.blue(template.name + (name ? ` (${name})` : '')) + | ||
'.'); | ||
} | ||
@@ -199,0 +202,0 @@ else if (options.output === 'json') { |
@@ -17,11 +17,11 @@ "use strict"; | ||
chalk_1.default.gray('Org: ') + | ||
config.org + | ||
(config.org || chalk_1.default.gray('-')) + | ||
' ' + | ||
chalk_1.default.gray('Project: ') + | ||
config.project + | ||
(config.project || chalk_1.default.gray('-')) + | ||
' ' + | ||
chalk_1.default.gray('Env: ') + | ||
config.env); | ||
(config.env || chalk_1.default.gray('-'))); | ||
}; | ||
exports.printConfig = printConfig; | ||
//# sourceMappingURL=config.js.map |
@@ -31,3 +31,3 @@ "use strict"; | ||
const printHeader = (options, config, action) => { | ||
if (options.output === 'fancy') { | ||
if (options.output === 'fancy' && options.header) { | ||
// @ts-ignore | ||
@@ -34,0 +34,0 @@ (0, exports.printBasedCliLogoWithVersion)(commander_1.program._version); |
{ | ||
"name": "@based/cli", | ||
"version": "2.4.0", | ||
"version": "2.5.1", | ||
"license": "MIT", | ||
@@ -15,3 +15,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@based/client": "2.3.5", | ||
"@based/client": "2.5.0", | ||
"@based/ids": "2.3.5", | ||
@@ -23,3 +23,3 @@ "@based/pretty-date": "^1.0.4", | ||
"@saulx/utils": "^2.2.1", | ||
"chalk": "^5.0.0", | ||
"chalk": "^4.1.2", | ||
"commander": "^8.1.0", | ||
@@ -26,0 +26,0 @@ "cross-fetch": "^3.1.4", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
298950
155
4277
18
+ Added@based/client@2.5.0(transitive)
+ Added@based/get-service@2.4.1(transitive)
+ Added@based/graphql@2.4.1(transitive)
+ Added@based/types@2.4.3(transitive)
- Removed@based/client@2.3.5(transitive)
- Removed@based/get-service@2.3.5(transitive)
- Removed@based/graphql@2.3.5(transitive)
- Removed@based/types@2.3.5(transitive)
- Removedchalk@5.4.1(transitive)
Updated@based/client@2.5.0
Updatedchalk@^4.1.2