Refactor: rework tracer

This commit is contained in:
SukkaW
2024-06-08 18:02:39 +08:00
parent f5863d82d1
commit 9a0113bf69
23 changed files with 51 additions and 142 deletions

View File

@@ -26,7 +26,7 @@ const removeNoResolved = (line: string) => line.replace(',no-resolve', '');
/**
* This only generates a simplified version, for under-used users only.
*/
export const buildSSPanelUIMAppProfile = task(import.meta.path, async (span) => {
export const buildSSPanelUIMAppProfile = task(import.meta.main, import.meta.path)(async (span) => {
const [
domesticDomains,
appleCdnDomains,
@@ -115,10 +115,6 @@ export const buildSSPanelUIMAppProfile = task(import.meta.path, async (span) =>
);
});
if (import.meta.main) {
buildSSPanelUIMAppProfile();
}
const isTruthy = <T>(i: T | 0 | '' | false | null | undefined): i is T => !!i;
function generateAppProfile(