mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 11:28:59 +08:00
feat: 同步配置支持文件
This commit is contained in:
parent
d0acf49b83
commit
9ae70eca09
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.14.144",
|
"version": "2.14.145",
|
||||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
||||||
"main": "src/main.js",
|
"main": "src/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -4,6 +4,7 @@ import {
|
|||||||
COLLECTIONS_KEY,
|
COLLECTIONS_KEY,
|
||||||
RULES_KEY,
|
RULES_KEY,
|
||||||
SUBS_KEY,
|
SUBS_KEY,
|
||||||
|
FILES_KEY,
|
||||||
} from '@/constants';
|
} from '@/constants';
|
||||||
import { failed, success } from '@/restful/response';
|
import { failed, success } from '@/restful/response';
|
||||||
import { InternalServerError, ResourceNotFoundError } from '@/restful/errors';
|
import { InternalServerError, ResourceNotFoundError } from '@/restful/errors';
|
||||||
@ -327,6 +328,10 @@ async function produceArtifact({
|
|||||||
]);
|
]);
|
||||||
// produce output
|
// produce output
|
||||||
return RuleUtils.produce(rules, platform);
|
return RuleUtils.produce(rules, platform);
|
||||||
|
} else if (type === 'file') {
|
||||||
|
const allFiles = $.read(FILES_KEY);
|
||||||
|
const file = findByName(allFiles, name);
|
||||||
|
return file?.content ?? '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user