@nx-go/nx-go
Advanced tools
Comparing version 2.7.0-rc.0 to 2.7.0-rc.1
{ | ||
"name": "@nx-go/nx-go", | ||
"version": "2.7.0-rc.0", | ||
"version": "2.7.0-rc.1", | ||
"main": "src/index.js", | ||
@@ -5,0 +5,0 @@ "generators": "./generators.json", |
@@ -5,3 +5,2 @@ import { ExecutorContext } from '@nrwl/devkit'; | ||
success: boolean; | ||
logs: Buffer; | ||
}>; |
@@ -5,3 +5,2 @@ import { ExecutorContext } from '@nrwl/devkit'; | ||
success: boolean; | ||
logs: Buffer; | ||
}>; |
@@ -5,3 +5,2 @@ import { ExecutorContext } from '@nrwl/devkit'; | ||
success: boolean; | ||
logs: Buffer; | ||
}>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isVersionAfter = exports.getGoVersion = void 0; | ||
const run_go_command_helper_1 = require("./run-go-command.helper"); | ||
const child_process_1 = require("child_process"); | ||
const GO_VERSION_REGEX = /go(?<version>\S+) /; | ||
function getGoVersion() { | ||
const { success, logs } = (0, run_go_command_helper_1.runGoCommand)(null, 'version', []); | ||
if (success) { | ||
return GO_VERSION_REGEX.exec(logs.toString()).groups.version; | ||
const output = (0, child_process_1.execSync)('go version'); | ||
if (output) { | ||
return GO_VERSION_REGEX.exec(output.toString()).groups.version; | ||
} | ||
@@ -11,0 +11,0 @@ else { |
@@ -1,4 +0,3 @@ | ||
/// <reference types="node" /> | ||
import { ExecutorContext } from '@nrwl/devkit'; | ||
export declare function runGoCommand(context: ExecutorContext, command: 'build' | 'fmt' | 'run' | 'test' | 'version', params: string[], options?: { | ||
export declare function runGoCommand(context: ExecutorContext, command: 'build' | 'fmt' | 'run' | 'test', params: string[], options?: { | ||
cwd?: string; | ||
@@ -8,3 +7,2 @@ cmd?: string; | ||
success: boolean; | ||
logs: Buffer; | ||
}; |
@@ -13,8 +13,8 @@ "use strict"; | ||
console.log(`Executing command: ${execute}`); | ||
const logs = (0, child_process_1.execSync)(execute, { cwd }); | ||
return { success: true, logs }; | ||
(0, child_process_1.execSync)(execute, { cwd, stdio: [0, 1, 2] }); | ||
return { success: true }; | ||
} | ||
catch (e) { | ||
console.error(`Failed to execute command: ${execute}`, e); | ||
return { success: false, logs: Buffer.of() }; | ||
return { success: false }; | ||
} | ||
@@ -21,0 +21,0 @@ } |
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
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
58597
863
4