Skip to content

Commit

Permalink
Get package version dynamically from package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
lafkpages committed Apr 6, 2023
1 parent 213f04f commit b54705c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const { makeConsoleSafe } = require('safe-logging-replit');
makeConsoleSafe(console);

const package = require('./package.json');
const os = require('os');
const osUtils = require('os-utils');
const { WebSocketServer } = require('ws');
Expand Down Expand Up @@ -157,7 +158,7 @@ function startPty(sessionId, chanId, ws, infoCallback) {
NODEVAL_TTY: currentTty || '',
NODEVAL_PID: process.pid,
GOVAL_SESSION: sessionId,
GOVAL_VERSION: 'nodeval-1.0.0',
GOVAL_VERSION: `${package.name}-${package.version}`,
PS1: '\\[\\e[0;1;38;5;33m\\]\\u\\[\\e[0;2m\\]@\\[\\e[0;1;38;5;34m\\]\\h\\[\\e[0;2m\\] - \\[\\e[0;3;38;5;227m\\]\\W\\[\\e[0;2;3m\\]: \\[\\e[0m\\]',
REPL_ID: replId,
REPL_OWNER: username,
Expand Down

0 comments on commit b54705c

Please sign in to comment.