Clean up logging and remove excessive styling

This commit is contained in:
2025-06-15 17:49:10 -07:00
parent f3367b22dc
commit dab604463f
4 changed files with 19868 additions and 2378 deletions

View File

@@ -23,7 +23,10 @@ class PaperclipRPC {
if (this.logEvents) { if (this.logEvents) {
this.logStream.write(`${new Date().toISOString()}: ${text}\n`); this.logStream.write(`${new Date().toISOString()}: ${text}\n`);
} }
console.log("PaperclipRPC:", text); // Suppress console logging in production
if (process.env.NODE_ENV === 'development') {
console.log("PaperclipRPC:", text);
}
} }
async _makeRPCCall(method, params = {}) { async _makeRPCCall(method, params = {}) {
@@ -202,20 +205,20 @@ class PaperclipRPC {
} }
startConnection() { startConnection() {
this._writeLog("Starting PaperclipChain RPC connection..."); this._writeLog("Starting PaperclipChain RPC connection");
// Test connection // Test connection
this.getStatus() this.getStatus()
.then(() => { .then(() => {
this._writeLog("Successfully connected to PaperclipChain node"); this._writeLog("Connected to PaperclipChain node");
}) })
.catch((error) => { .catch((error) => {
this._writeLog(`Failed to connect to PaperclipChain node: ${error.message}`); this._writeLog(`Connection failed: ${error.message}`);
}); });
} }
stopConnection() { stopConnection() {
this._writeLog("Stopping PaperclipChain RPC connection..."); this._writeLog("Stopping PaperclipChain RPC connection");
this.isConnected = false; this.isConnected = false;
if (this.logStream) { if (this.logStream) {

18156
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -62,13 +62,12 @@
"adm-zip": "^0.5.10", "adm-zip": "^0.5.10",
"app-root-path": "^3.1.0", "app-root-path": "^3.1.0",
"crypto": "^1.0.1", "crypto": "^1.0.1",
"ed25519": "^0.0.4",
"electron-storage": "^1.0.7", "electron-storage": "^1.0.7",
"fs-extra": "^10.0.1", "fs-extra": "^10.0.1",
"handlebars": "^4.7.7", "handlebars": "^4.7.7",
"moment": "^2.29.4", "moment": "^2.29.4",
"nedb": "^1.8.0", "nedb": "^1.8.0",
"node-fetch": "^3.3.1", "node-fetch": "^2.6.7",
"pull-file-reader": "^1.0.2", "pull-file-reader": "^1.0.2",
"single-instance": "0.0.1", "single-instance": "0.0.1",
"tweetnacl": "^1.0.3", "tweetnacl": "^1.0.3",

4074
yarn.lock

File diff suppressed because it is too large Load Diff