mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-12 09:10:35 +08:00
Chore: print build platform info
This commit is contained in:
parent
1b41a5904a
commit
c1fa3c7b96
@ -1,6 +1,5 @@
|
||||
import process from 'node:process';
|
||||
|
||||
console.log('Version:', process.version);
|
||||
import os from 'node:os';
|
||||
|
||||
import { downloadPreviousBuild } from './download-previous-build';
|
||||
import { buildCommon } from './build-common';
|
||||
@ -39,6 +38,26 @@ process.on('unhandledRejection', (reason) => {
|
||||
});
|
||||
|
||||
(async () => {
|
||||
console.log('Version:', process.version);
|
||||
|
||||
console.log(`OS: ${os.type()} ${os.release()} ${os.arch()}`);
|
||||
console.log(`Node.js: ${process.versions.node}`);
|
||||
console.log(`V8: ${process.versions.v8}`);
|
||||
|
||||
const cpus = os.cpus()
|
||||
.map(cpu => cpu.model)
|
||||
.reduce<Record<string, number>>((o, model) => {
|
||||
o[model] = (o[model] || 0) + 1;
|
||||
return o;
|
||||
}, {});
|
||||
|
||||
console.log(`CPU: ${
|
||||
Object.keys(cpus)
|
||||
.map((key) => `${key} x ${cpus[key]}`)
|
||||
.join('\n')
|
||||
}`);
|
||||
console.log(`Memory: ${os.totalmem() / (1024 * 1024)} MiB`);
|
||||
|
||||
const rootSpan = createSpan('root');
|
||||
|
||||
try {
|
||||
|
||||
@ -157,8 +157,6 @@ const processRuleSet = (ruleSet: string[]) => {
|
||||
const dumped = trie.dumpWithMeta();
|
||||
for (let i = 0, len = dumped.length; i < len; i++) {
|
||||
const [originalIndex, flag] = unpack(dumped[i][1]);
|
||||
console.log(dumped[i][0], ruleSet[originalIndex]);
|
||||
|
||||
const type = flag === flagDomain ? 'DOMAIN' : 'DOMAIN-SUFFIX';
|
||||
|
||||
sortMap.push([originalIndex, sortTypeOrder[type]]);
|
||||
|
||||
@ -215,8 +215,6 @@ export const getPhishingDomains = (parentSpan: Span) => parentSpan.traceChild('g
|
||||
}
|
||||
}
|
||||
|
||||
// console.log(domainScoreMap['']);
|
||||
|
||||
return domainArr;
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user