mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-15 20:35:54 +08:00
feat: 文件类型为 mihomo 配置时, 来源可以为无
This commit is contained in:
parent
dd4e0cef68
commit
ebc7173c95
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.16.61",
|
"version": "2.16.62",
|
||||||
"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": {
|
||||||
|
@ -379,7 +379,10 @@ function ScriptOperator(script, targetPlatform, $arguments, source, $options) {
|
|||||||
throw new Error('patch is not an object');
|
throw new Error('patch is not an object');
|
||||||
output.$content = ProxyUtils.yaml.safeDump(
|
output.$content = ProxyUtils.yaml.safeDump(
|
||||||
deepMerge(
|
deepMerge(
|
||||||
config || {
|
config ||
|
||||||
|
(output?.$file?.sourceType === 'none'
|
||||||
|
? {}
|
||||||
|
: {
|
||||||
proxies: await produceArtifact({
|
proxies: await produceArtifact({
|
||||||
type:
|
type:
|
||||||
output?.$file?.sourceType ||
|
output?.$file?.sourceType ||
|
||||||
@ -391,7 +394,7 @@ function ScriptOperator(script, targetPlatform, $arguments, source, $options) {
|
|||||||
'delete-underscore-fields': true,
|
'delete-underscore-fields': true,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
},
|
}),
|
||||||
patch,
|
patch,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -430,7 +433,7 @@ function ScriptOperator(script, targetPlatform, $arguments, source, $options) {
|
|||||||
console.log(e.message ?? e);
|
console.log(e.message ?? e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$content = ProxyUtils.yaml.safeDump(await main(config || {
|
$content = ProxyUtils.yaml.safeDump(await main(config || ($file.sourceType === 'none' ? {} : {
|
||||||
proxies: await produceArtifact({
|
proxies: await produceArtifact({
|
||||||
type: $file.sourceType || 'collection',
|
type: $file.sourceType || 'collection',
|
||||||
name: $file.sourceName,
|
name: $file.sourceName,
|
||||||
@ -440,7 +443,7 @@ function ScriptOperator(script, targetPlatform, $arguments, source, $options) {
|
|||||||
'delete-underscore-fields': true
|
'delete-underscore-fields': true
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
}))
|
})))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
${script}
|
${script}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user