feat: complete platform upgrade - user guide overhaul, unified export dropdowns, 24h agent tracking, HelpTrigger implementation on all pages
This commit is contained in:
1 parent
040ef4d45d
commit
64b5e87341
215 files changed
+7886
-4129
No files matched your search
@@ -148,7 +148,9 @@ async function uploadDirectory(sftp, localDir, remoteDir, options = {}) {
|
||||
if (item.name === '.env.production' || item.name === '.env.local') continue;
|
||||
|
||||
const localItemPath = path.join(localPath, item.name);
|
||||
const remoteItemPath = path.posix.join(CONFIG.remotePath, remoteDir, item.name);
|
||||
// Force forward slashes for remote Linux path compatibility
|
||||
const remoteDirNormalized = remoteDir.replace(/\\/g, '/');
|
||||
const remoteItemPath = path.posix.join(CONFIG.remotePath, remoteDirNormalized, item.name);
|
||||
|
||||
if (item.isDirectory()) {
|
||||
try {
|
||||
@@ -158,7 +160,8 @@ async function uploadDirectory(sftp, localDir, remoteDir, options = {}) {
|
||||
}
|
||||
await uploadDirectory(sftp, path.join(localDir, item.name), path.join(remoteDir, item.name), options);
|
||||
} else {
|
||||
process.stdout.write(` [UP] ${path.join(remoteDir, item.name)} ... `);
|
||||
const displayPath = path.posix.join(remoteDirNormalized, item.name);
|
||||
process.stdout.write(` [UP] ${displayPath} ... `);
|
||||
await sftp.put(localItemPath, remoteItemPath);
|
||||
process.stdout.write('done\n');
|
||||
}
|
||||
|
||||
@@ -1,7 +1,36 @@
|
||||
const net = require('net');
|
||||
const { MongoMemoryServer } = require('mongodb-memory-server');
|
||||
|
||||
function checkPort(port, host) {
|
||||
return new Promise((resolve) => {
|
||||
const socket = new net.Socket();
|
||||
socket.setTimeout(1000);
|
||||
socket.on('connect', () => {
|
||||
socket.destroy();
|
||||
resolve(true);
|
||||
});
|
||||
socket.on('timeout', () => {
|
||||
socket.destroy();
|
||||
resolve(false);
|
||||
});
|
||||
socket.on('error', () => {
|
||||
socket.destroy();
|
||||
resolve(false);
|
||||
});
|
||||
socket.connect(port, host);
|
||||
});
|
||||
}
|
||||
|
||||
async function start() {
|
||||
try {
|
||||
const isLocalMongoRunning = await checkPort(27017, '127.0.0.1') || await checkPort(27017, 'localhost');
|
||||
if (isLocalMongoRunning) {
|
||||
console.log('[MONGO] ℹ️ Local persistent MongoDB is already running on port 27017. Skipping in-memory MongoDB launch.');
|
||||
// Keep process alive so concurrently doesn't show it as exited/failed
|
||||
setInterval(() => {}, 100000);
|
||||
return;
|
||||
}
|
||||
|
||||
const mongod = await MongoMemoryServer.create({
|
||||
instance: {
|
||||
port: 27017,
|
||||
@@ -20,6 +49,7 @@ async function start() {
|
||||
} catch (err) {
|
||||
if (err.code === 'EADDRINUSE' || (err.message && err.message.includes('EADDRINUSE'))) {
|
||||
console.log('[MONGO] ℹ️ Port 27017 is already in use. Skipping in-memory MongoDB launch.');
|
||||
setInterval(() => {}, 100000);
|
||||
} else {
|
||||
console.error('[MONGO] ❌ Error starting MongoMemoryServer:', err.message);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user