grpcmkr-cli
Advanced tools
Comparing version 1.1.2 to 1.1.3
@@ -11,2 +11,3 @@ "use strict"; | ||
const grpc_generate_action_1 = require("../actions/grpc.generate.action"); | ||
const runners_1 = require("../constants/runners"); | ||
const ui_1 = require("../utils/ui"); | ||
@@ -98,3 +99,3 @@ class CreateTemplate { | ||
switch (this.runner) { | ||
case 'npm': | ||
case runners_1.RUNNERS.NPM: | ||
const commandNpm = `cd ${process.cwd()}/${this.nameDir} && npm install && npm run proto:build`; | ||
@@ -114,3 +115,3 @@ child_process_1.default.exec(commandNpm, (error, stdout, stderr) => { | ||
break; | ||
case 'yarn': | ||
case runners_1.RUNNERS.YARN: | ||
const commandYarn = `cd ${process.cwd()}/${this.nameDir} && touch yarn.lock && yarn install && yarn run proto:build`; | ||
@@ -131,2 +132,15 @@ child_process_1.default.exec(commandYarn, (error, stdout, stderr) => { | ||
default: | ||
const commandDef = `cd ${process.cwd()}/${this.nameDir} && npm install && npm run proto:build`; | ||
child_process_1.default.exec(commandDef, (error, stdout, stderr) => { | ||
if (error !== null) { | ||
spinnerFinish.fail(error.message); | ||
resolve(false); | ||
} | ||
setTimeout(() => { | ||
spinnerFinish.succeed(`${ui_1.EMOJIS.ROCKET}Completed work!`); | ||
spinnerFinish.info(`Run cd "${this.nameDir}" and start work ${ui_1.EMOJIS.BEER}`); | ||
spinnerFinish.info(`Remember to create an ".env" file to define your environment variables`); | ||
resolve(true); | ||
}, 1500); | ||
}); | ||
break; | ||
@@ -133,0 +147,0 @@ } |
{ | ||
"name": "grpcmkr-cli", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Grpc CLI for developers", | ||
@@ -5,0 +5,0 @@ "scripts": { |
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
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
28545
595