feat: ProxyUtils 中增加 Gist 类; 补充 demo.js 中的示例

This commit is contained in:
xream
2024-05-04 19:25:00 +08:00
parent 2a69fc3acd
commit d43ffe29f8
3 changed files with 40 additions and 1 deletions

View File

@@ -16,6 +16,7 @@ import { FILES_KEY, MODULES_KEY } from '@/constants';
import { findByName } from '@/utils/database';
import { produceArtifact } from '@/restful/sync';
import { getFlag, getISO } from '@/utils/geo';
import Gist from '@/utils/gist';
function preprocess(raw) {
for (const processor of PROXY_PREPROCESSORS) {
@@ -272,6 +273,7 @@ export const ProxyUtils = {
yaml: YAML,
getFlag,
getISO,
Gist,
};
function tryParse(parser, line) {