mirror of
https://github.com/UiO-Gaming/infoscreen3.git
synced 2026-11-05 13:56:52 +01:00
prepare 1.7.1: Refactor build process to use nexe and update dependencies
- Updated package.json to replace pkg with nexe for building executables. - Added rebuild-native-node20.js for rebuilding native modules for Node.js 20.18.1. - Introduced test-exe.js to facilitate testing of the generated executable. - Modified webpack.config.cjs to output bundle.cjs and set libraryTarget to commonjs2. - Enhanced profiler plugin for memory usage tracking with simplified output. - Removed unused dependencies and updated existing ones in package.json.
This commit is contained in:
1 parent
dd87a98a10
commit
798c85e70f
13 files changed
+643
-1166
No files matched your search
+61
-62
@@ -1,63 +1,62 @@
|
||||
import 'dotenv/config'
|
||||
import chalk from 'chalk';
|
||||
let lastStamp = "";
|
||||
|
||||
export default {
|
||||
error: function (error, title) {
|
||||
if (title == null) {
|
||||
title = "";
|
||||
}
|
||||
this.log(chalk.bold.red("[Error]" + title) + " " + error);
|
||||
},
|
||||
|
||||
info: function (string, category) {
|
||||
|
||||
this.log(chalk.cyan("[" + (category || "Info") + "] ") + string);
|
||||
},
|
||||
|
||||
debug: function (string) {
|
||||
console.log(chalk.bold.black("[Debug] " + string));
|
||||
},
|
||||
|
||||
success: function (string) {
|
||||
this.log(string + chalk.green(" [Success]"));
|
||||
},
|
||||
|
||||
log: function (string) {
|
||||
if (process.env.DEBUG != "true") return;
|
||||
let now = getDateTime();
|
||||
if (lastStamp != now) {
|
||||
lastStamp = now;
|
||||
now = "\n" + now + "\n"
|
||||
} else {
|
||||
now = "";
|
||||
}
|
||||
|
||||
console.log(now + string);
|
||||
}
|
||||
};
|
||||
|
||||
function getDateTime() {
|
||||
|
||||
var date = new Date();
|
||||
|
||||
var hour = date.getHours();
|
||||
hour = (hour < 10 ? "0" : "") + hour;
|
||||
|
||||
var min = date.getMinutes();
|
||||
min = (min < 10 ? "0" : "") + min;
|
||||
|
||||
var sec = date.getSeconds();
|
||||
sec = (sec < 10 ? "0" : "") + sec;
|
||||
|
||||
var year = date.getFullYear();
|
||||
|
||||
var month = date.getMonth() + 1;
|
||||
month = (month < 10 ? "0" : "") + month;
|
||||
|
||||
var day = date.getDate();
|
||||
day = (day < 10 ? "0" : "") + day;
|
||||
|
||||
return year + "-" + month + "-" + day + " " + hour + ":" + min + ":" + sec;
|
||||
|
||||
import 'dotenv/config'
|
||||
let lastStamp = "";
|
||||
|
||||
export default {
|
||||
error: function (error, title) {
|
||||
if (title == null) {
|
||||
title = "";
|
||||
}
|
||||
this.log("[Error]" + title + " " + error);
|
||||
},
|
||||
|
||||
info: function (string, category) {
|
||||
|
||||
this.log("[" + (category || "Info") + "] " + string);
|
||||
},
|
||||
|
||||
debug: function (string) {
|
||||
console.log("[Debug] " + string);
|
||||
},
|
||||
|
||||
success: function (string) {
|
||||
this.log(string + " [Success]");
|
||||
},
|
||||
|
||||
log: function (string) {
|
||||
if (process.env.DEBUG != "true") return;
|
||||
let now = getDateTime();
|
||||
if (lastStamp != now) {
|
||||
lastStamp = now;
|
||||
now = "\n" + now + "\n"
|
||||
} else {
|
||||
now = "";
|
||||
}
|
||||
|
||||
console.log(now + string);
|
||||
}
|
||||
};
|
||||
|
||||
function getDateTime() {
|
||||
|
||||
var date = new Date();
|
||||
|
||||
var hour = date.getHours();
|
||||
hour = (hour < 10 ? "0" : "") + hour;
|
||||
|
||||
var min = date.getMinutes();
|
||||
min = (min < 10 ? "0" : "") + min;
|
||||
|
||||
var sec = date.getSeconds();
|
||||
sec = (sec < 10 ? "0" : "") + sec;
|
||||
|
||||
var year = date.getFullYear();
|
||||
|
||||
var month = date.getMonth() + 1;
|
||||
month = (month < 10 ? "0" : "") + month;
|
||||
|
||||
var day = date.getDate();
|
||||
day = (day < 10 ? "0" : "") + day;
|
||||
|
||||
return year + "-" + month + "-" + day + " " + hour + ":" + min + ":" + sec;
|
||||
|
||||
}
|
||||
@@ -5,7 +5,6 @@ import admin from './admin.js';
|
||||
import adminLobby from './adminLobby.js';
|
||||
import cli from './cli.js';
|
||||
import _bundleManager from './bundleManager.js';
|
||||
import chalk from 'chalk';
|
||||
import fs from 'fs';
|
||||
|
||||
/**
|
||||
@@ -24,7 +23,7 @@ export default function (pluginManager, io, dispatcher) {
|
||||
/** @type {admin[]} */
|
||||
let adminView = [];
|
||||
|
||||
console.log(chalk.green(">> ") + "InfoScreen3" + chalk.green("<<"));
|
||||
console.log(">> InfoScreen3 <<");
|
||||
cli.log("Checking for write permissions...");
|
||||
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user