fix(all): Node version info retrieval automated.
This commit is contained in:
parent
59512dff81
commit
9cbd8c17de
1 changed files with 3 additions and 6 deletions
|
@ -51,6 +51,7 @@ import msRestAzure from 'ms-rest-azure';
|
||||||
import Path from 'path';
|
import Path from 'path';
|
||||||
import PasswordGenerator from 'strict-password-generator';
|
import PasswordGenerator from 'strict-password-generator';
|
||||||
import crypto from 'crypto';
|
import crypto from 'crypto';
|
||||||
|
import Fs from 'fs';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Services for server administration.
|
* Services for server administration.
|
||||||
|
@ -72,13 +73,9 @@ export class GBAdminService implements IGBAdminService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static getNodeVersion () {
|
public static getNodeVersion () {
|
||||||
return '19.1.0';
|
|
||||||
const packageJson = urlJoin(process.cwd(), 'package.json');
|
const packageJson = urlJoin(process.cwd(), 'package.json');
|
||||||
// tslint:disable-next-line: non-literal-require
|
const pkg = JSON.parse(Fs.readFileSync(packageJson, 'utf8'));
|
||||||
// TODO
|
return pkg.engines.node.replace('=', '');
|
||||||
// const pjson = require(packageJson);
|
|
||||||
|
|
||||||
// return pjson.engines.node.replace('=', '');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async getADALTokenFromUsername (username: string, password: string) {
|
public static async getADALTokenFromUsername (username: string, password: string) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue