mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-11 10:22:13 +00:00
okay
This commit is contained in:
@@ -52,7 +52,7 @@ DreamSeeker.getInstancesByPids = async pids => {
|
||||
}
|
||||
if (pidsToResolve.length > 0) {
|
||||
try {
|
||||
const command = 'netstat -ano | findstr LISTENING';
|
||||
const command = 'netstat -ano | findstr TCP | findstr 0.0.0.0:0';
|
||||
const { stdout } = await promisify(exec)(command, {
|
||||
// Max buffer of 1MB (default is 200KB)
|
||||
maxBuffer: 1024 * 1024,
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
"glob": "^7.1.6",
|
||||
"source-map": "^0.7.3",
|
||||
"stacktrace-parser": "^0.1.10",
|
||||
"ws": "^7.4.3"
|
||||
"ws": "^7.4.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ import { createLogger } from 'common/logging.js';
|
||||
import fs from 'fs';
|
||||
import os from 'os';
|
||||
import { basename } from 'path';
|
||||
import { promisify } from 'util';
|
||||
import { resolveGlob, resolvePath } from './util.js';
|
||||
import { regQuery } from './winreg.js';
|
||||
import { DreamSeeker } from './dreamseeker.js';
|
||||
@@ -68,7 +67,7 @@ export const findCacheRoot = async () => {
|
||||
|
||||
const onCacheRootFound = cacheRoot => {
|
||||
logger.log(`found cache at '${cacheRoot}'`);
|
||||
// Plant dummy
|
||||
// Plant a dummy
|
||||
fs.closeSync(fs.openSync(cacheRoot + '/dummy', 'w'));
|
||||
};
|
||||
|
||||
@@ -93,15 +92,21 @@ export const reloadByondCache = async bundleDir => {
|
||||
for (let cacheDir of cacheDirs) {
|
||||
// Clear garbage
|
||||
const garbage = await resolveGlob(cacheDir, './*.+(bundle|chunk|hot-update).*');
|
||||
for (let file of garbage) {
|
||||
await promisify(fs.unlink)(file);
|
||||
try {
|
||||
for (let file of garbage) {
|
||||
fs.unlinkSync(file);
|
||||
}
|
||||
// Copy assets
|
||||
for (let asset of assets) {
|
||||
const destination = resolvePath(cacheDir, basename(asset));
|
||||
fs.writeFileSync(destination, fs.readFileSync(asset));
|
||||
}
|
||||
logger.log(`copied ${assets.length} files to '${cacheDir}'`);
|
||||
}
|
||||
// Copy assets
|
||||
for (let asset of assets) {
|
||||
const destination = resolvePath(cacheDir, basename(asset));
|
||||
await promisify(fs.copyFile)(asset, destination);
|
||||
catch (err) {
|
||||
logger.error(`failed copying to '${cacheDir}'`);
|
||||
logger.error(err);
|
||||
}
|
||||
logger.log(`copied ${assets.length} files to '${cacheDir}'`);
|
||||
}
|
||||
// Notify dreamseeker
|
||||
const dss = await dssPromise;
|
||||
|
||||
Reference in New Issue
Block a user