@@ -379,19 +379,22 @@ function ScriptOperator(script, targetPlatform, $arguments, source, $options) {
379379 throw new Error ( 'patch is not an object' ) ;
380380 output . $content = ProxyUtils . yaml . safeDump (
381381 deepMerge (
382- config || {
383- proxies : await produceArtifact ( {
384- type :
385- output ?. $file ?. sourceType ||
386- 'collection' ,
387- name : output ?. $file ?. sourceName ,
388- platform : 'mihomo' ,
389- produceType : 'internal' ,
390- produceOpts : {
391- 'delete-underscore-fields' : true ,
392- } ,
393- } ) ,
394- } ,
382+ config ||
383+ ( output ?. $file ?. sourceType === 'none'
384+ ? { }
385+ : {
386+ proxies : await produceArtifact ( {
387+ type :
388+ output ?. $file ?. sourceType ||
389+ 'collection' ,
390+ name : output ?. $file ?. sourceName ,
391+ platform : 'mihomo' ,
392+ produceType : 'internal' ,
393+ produceOpts : {
394+ 'delete-underscore-fields' : true ,
395+ } ,
396+ } ) ,
397+ } ) ,
395398 patch ,
396399 ) ,
397400 ) ;
@@ -430,7 +433,7 @@ function ScriptOperator(script, targetPlatform, $arguments, source, $options) {
430433 console.log(e.message ?? e);
431434 }
432435 }
433- $content = ProxyUtils.yaml.safeDump(await main(config || {
436+ $content = ProxyUtils.yaml.safeDump(await main(config || ($file.sourceType === 'none' ? {} : {
434437 proxies: await produceArtifact({
435438 type: $file.sourceType || 'collection',
436439 name: $file.sourceName,
@@ -440,7 +443,7 @@ function ScriptOperator(script, targetPlatform, $arguments, source, $options) {
440443 'delete-underscore-fields': true
441444 }
442445 }),
443- }))
446+ })))
444447 }
445448 } else {
446449 ${ script }
0 commit comments