mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-12 12:39:03 +08:00
feat: 兼容 xishang0128/sparkle 的 JavaScript 覆写; ProxyUtils 新增 Buffer, Base64
This commit is contained in:
parent
d2c3956884
commit
b3f6876bbd
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.19.37",
|
"version": "2.19.38",
|
||||||
"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": {
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { Base64 } from 'js-base64';
|
||||||
import { Buffer } from 'buffer';
|
import { Buffer } from 'buffer';
|
||||||
import rs from '@/utils/rs';
|
import rs from '@/utils/rs';
|
||||||
import YAML from '@/utils/yaml';
|
import YAML from '@/utils/yaml';
|
||||||
@ -333,6 +334,8 @@ export const ProxyUtils = {
|
|||||||
downloadFile,
|
downloadFile,
|
||||||
isValidUUID,
|
isValidUUID,
|
||||||
doh,
|
doh,
|
||||||
|
Buffer,
|
||||||
|
Base64,
|
||||||
};
|
};
|
||||||
|
|
||||||
function tryParse(parser, line) {
|
function tryParse(parser, line) {
|
||||||
|
@ -1141,6 +1141,10 @@ function createDynamicFunction(name, script, $arguments, $options) {
|
|||||||
'$httpClient',
|
'$httpClient',
|
||||||
'$notification',
|
'$notification',
|
||||||
'ProxyUtils',
|
'ProxyUtils',
|
||||||
|
'yaml',
|
||||||
|
'Buffer',
|
||||||
|
'b64d',
|
||||||
|
'b64e',
|
||||||
'scriptResourceCache',
|
'scriptResourceCache',
|
||||||
'flowUtils',
|
'flowUtils',
|
||||||
'produceArtifact',
|
'produceArtifact',
|
||||||
@ -1158,6 +1162,10 @@ function createDynamicFunction(name, script, $arguments, $options) {
|
|||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
$notification,
|
$notification,
|
||||||
ProxyUtils,
|
ProxyUtils,
|
||||||
|
ProxyUtils.yaml,
|
||||||
|
ProxyUtils.Buffer,
|
||||||
|
ProxyUtils.Base64.decode,
|
||||||
|
ProxyUtils.Base64.encode,
|
||||||
scriptResourceCache,
|
scriptResourceCache,
|
||||||
flowUtils,
|
flowUtils,
|
||||||
produceArtifact,
|
produceArtifact,
|
||||||
@ -1170,6 +1178,10 @@ function createDynamicFunction(name, script, $arguments, $options) {
|
|||||||
'$substore',
|
'$substore',
|
||||||
'lodash',
|
'lodash',
|
||||||
'ProxyUtils',
|
'ProxyUtils',
|
||||||
|
'yaml',
|
||||||
|
'Buffer',
|
||||||
|
'b64d',
|
||||||
|
'b64e',
|
||||||
'scriptResourceCache',
|
'scriptResourceCache',
|
||||||
'flowUtils',
|
'flowUtils',
|
||||||
'produceArtifact',
|
'produceArtifact',
|
||||||
@ -1181,6 +1193,10 @@ function createDynamicFunction(name, script, $arguments, $options) {
|
|||||||
$,
|
$,
|
||||||
lodash,
|
lodash,
|
||||||
ProxyUtils,
|
ProxyUtils,
|
||||||
|
ProxyUtils.yaml,
|
||||||
|
ProxyUtils.Buffer,
|
||||||
|
ProxyUtils.Base64.decode,
|
||||||
|
ProxyUtils.Base64.encode,
|
||||||
scriptResourceCache,
|
scriptResourceCache,
|
||||||
flowUtils,
|
flowUtils,
|
||||||
produceArtifact,
|
produceArtifact,
|
||||||
|
@ -34,4 +34,6 @@ export default {
|
|||||||
load,
|
load,
|
||||||
safeDump,
|
safeDump,
|
||||||
dump,
|
dump,
|
||||||
|
parse: safeLoad,
|
||||||
|
stringify: safeDump,
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user