Skip to content

Commit

Permalink
fix(all): Node version info retrieval automated.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigorodriguez committed Dec 22, 2022
1 parent 59512df commit 9cbd8c1
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions packages/admin.gbapp/services/GBAdminService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import msRestAzure from 'ms-rest-azure';
import Path from 'path';
import PasswordGenerator from 'strict-password-generator';
import crypto from 'crypto';
import Fs from 'fs';

/**
* Services for server administration.
Expand All @@ -72,13 +73,9 @@ export class GBAdminService implements IGBAdminService {
}

public static getNodeVersion () {
return '19.1.0';
const packageJson = urlJoin(process.cwd(), 'package.json');
// tslint:disable-next-line: non-literal-require
// TODO
// const pjson = require(packageJson);

// return pjson.engines.node.replace('=', '');
const pkg = JSON.parse(Fs.readFileSync(packageJson, 'utf8'));
return pkg.engines.node.replace('=', '');
}

public static async getADALTokenFromUsername (username: string, password: string) {
Expand Down

0 comments on commit 9cbd8c1

Please sign in to comment.