mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2026-04-01 14:13:15 +08:00
feat: 支持输出到 sing-box; 文件脚本支持 ` ; 脚本支持 ProxyUtils.yaml`
This commit is contained in:
@@ -418,12 +418,20 @@ async function produceArtifact({
|
||||
raw.push(file.content);
|
||||
}
|
||||
}
|
||||
let content = (Array.isArray(raw) ? raw : [raw])
|
||||
.flat()
|
||||
const files = (Array.isArray(raw) ? raw : [raw]).flat();
|
||||
const filesContent = files
|
||||
.filter((i) => i != null && i !== '')
|
||||
.join('\n');
|
||||
content = await ProxyUtils.process(content, file.process || []);
|
||||
return content ?? '';
|
||||
|
||||
// apply processors
|
||||
const processed =
|
||||
Array.isArray(file.process) && file.process.length > 0
|
||||
? await ProxyUtils.process(
|
||||
{ $files: files, $content: filesContent },
|
||||
file.process,
|
||||
)
|
||||
: filesContent;
|
||||
return processed?.$content ?? '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user