mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-29 01:51:52 +08:00
Housekeeping & Update Reject Hosts
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { basename, extname } from 'node:path';
|
||||
import picocolors from 'picocolors';
|
||||
import wtf from 'wtfnode';
|
||||
|
||||
const SPAN_STATUS_START = 0;
|
||||
const SPAN_STATUS_END = 1;
|
||||
@@ -103,11 +102,10 @@ export function task(importMetaMain: boolean, importMetaPath: string) {
|
||||
|
||||
const dummySpan = createSpan(taskName);
|
||||
if (importMetaMain) {
|
||||
fn(dummySpan).finally(() => {
|
||||
dummySpan.traceChildAsync('dummy', fn).finally(() => {
|
||||
dummySpan.stop();
|
||||
printTraceResult(dummySpan.traceResult);
|
||||
|
||||
console.log(wtf.dump());
|
||||
whyIsNodeRunning();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -120,6 +118,11 @@ export function task(importMetaMain: boolean, importMetaPath: string) {
|
||||
};
|
||||
}
|
||||
|
||||
export async function whyIsNodeRunning() {
|
||||
const mod = await import('why-is-node-running');
|
||||
return mod.default();
|
||||
}
|
||||
|
||||
// const isSpan = (obj: any): obj is Span => {
|
||||
// return typeof obj === 'object' && obj && spanTag in obj;
|
||||
// };
|
||||
|
||||
Reference in New Issue
Block a user