Skip to content

Commit

Permalink
chroe: Script Example
Browse files Browse the repository at this point in the history
  • Loading branch information
xream committed Jan 14, 2024
1 parent 1d16c78 commit 901d278
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sub-store-front-end",
"version": "2.14.49",
"version": "2.14.50",
"private": true,
"scripts": {
"dev": "vite --host",
Expand Down
15 changes: 9 additions & 6 deletions src/views/editor/components/Script.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,20 @@ function filter(proxies, targetPlatform) {
// $content: '0\\n1'
// produce proxies
let singboxProxies = JSON.parse(await produceArtifact({
// backend version(>2.14.156):
let singboxProxies = await produceArtifact({
type: 'subscription', // type: 'subscription' 或 'collection'
name: 'sub', // subscription name
platform: 'sing-box' // target platform
}))
platform: 'sing-box', // target platform
produceType: 'internal' // 'internal' produces an Array, otherwise produces a String( JSON.parse('JSON String') )
})
let clashMetaProxies = ProxyUtils.yaml.safeLoad(await produceArtifact({
let clashMetaProxies = await produceArtifact({
type: 'subscription',
name: 'sub',
platform: 'ClashMeta'
})).proxies
platform: 'ClashMeta',
produceType: 'internal' // 'internal' produces an Array, otherwise produces a String( ProxyUtils.yaml.safeLoad('YAML String') )
}))
// YAML
$content = ProxyUtils.yaml.safeDump({})
Expand Down

0 comments on commit 901d278

Please sign in to comment.