mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-21 05:40:29 +08:00
59 lines
2.0 KiB
JavaScript
59 lines
2.0 KiB
JavaScript
'use strict';Object.defineProperty(exports,Symbol.toStringTag,{value:'Module'});const ruleset=require('../../../_virtual/ruleset.cjs'),clash=require('../writing-strategy/clash.cjs'),singbox=require('../writing-strategy/singbox.cjs'),surge=require('../writing-strategy/surge.cjs'),base=require('./base.cjs');var hasRequiredRuleset;
|
|
|
|
function requireRuleset () {
|
|
if (hasRequiredRuleset) return ruleset.__exports;
|
|
hasRequiredRuleset = 1;
|
|
(function (exports) {
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
function _export(target, all) {
|
|
for(var name in all)Object.defineProperty(target, name, {
|
|
enumerable: true,
|
|
get: all[name]
|
|
});
|
|
}
|
|
_export(exports, {
|
|
ClashOnlyRulesetOutput: function() {
|
|
return ClashOnlyRulesetOutput;
|
|
},
|
|
RulesetOutput: function() {
|
|
return RulesetOutput;
|
|
},
|
|
SurgeOnlyRulesetOutput: function() {
|
|
return SurgeOnlyRulesetOutput;
|
|
}
|
|
});
|
|
const _clash = /*@__PURE__*/ clash.__require();
|
|
const _singbox = /*@__PURE__*/ singbox.__require();
|
|
const _surge = /*@__PURE__*/ surge.__require();
|
|
const _base = /*@__PURE__*/ base.__require();
|
|
class RulesetOutput extends _base.FileOutput {
|
|
constructor(span, id, type){
|
|
super(span, id);
|
|
this.strategies = [
|
|
new _surge.SurgeRuleSet(type),
|
|
new _clash.ClashClassicRuleSet(type),
|
|
new _singbox.SingboxSource(type)
|
|
];
|
|
}
|
|
}
|
|
class SurgeOnlyRulesetOutput extends _base.FileOutput {
|
|
constructor(span, id, type, overrideOutputDir){
|
|
super(span, id);
|
|
this.strategies = [
|
|
new _surge.SurgeRuleSet(type, overrideOutputDir)
|
|
];
|
|
}
|
|
}
|
|
class ClashOnlyRulesetOutput extends _base.FileOutput {
|
|
constructor(span, id, type){
|
|
super(span, id);
|
|
this.strategies = [
|
|
new _clash.ClashClassicRuleSet(type)
|
|
];
|
|
}
|
|
}
|
|
} (ruleset.__exports));
|
|
return ruleset.__exports;
|
|
}exports.__require=requireRuleset; |