Skip to content

Commit

Permalink
chore: @nsnanocat/util
Browse files Browse the repository at this point in the history
  • Loading branch information
VirgilClyne committed Oct 25, 2024
1 parent 4e7a62d commit dd0aa7e
Show file tree
Hide file tree
Showing 42 changed files with 147 additions and 1,191 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
cache: 'npm'
- name: Install dependencies
run: npm install
env:
NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
- name: Update local package.json version from release tag
if: github.ref_type == 'tag'
uses: BellCubeDev/update-package-version-by-release-tag@v2
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Deploy
on:
push:
# Sequence of patterns matched against refs/heads
branches:
- dev

permissions:
actions: read
contents: read

jobs:
dev:
uses: ./.github/workflows/dev.yml
secrets: inherit
deploy:
needs: dev
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@master
with:
name: artifact
- name: Deploy Composite.Subtitles.response
uses: exuanbo/actions-deploy-gist@main
with:
token: ${{ secrets.GIST_TOKEN }}
gist_id: 92cd6fbcde657fb43c67ed7f2430a994
gist_description: "🍿️ DualSubs: 🎦 Universal β"
file_path: dist/Composite.Subtitles.response.bundle.js
- name: Deploy External.Lyrics.response
uses: exuanbo/actions-deploy-gist@main
with:
token: ${{ secrets.GIST_TOKEN }}
gist_id: 92cd6fbcde657fb43c67ed7f2430a994
gist_description: "🍿️ DualSubs: 🎦 Universal β"
file_path: dist/External.Lyrics.response.bundle.js
- name: Deploy Manifest.response
uses: exuanbo/actions-deploy-gist@main
with:
token: ${{ secrets.GIST_TOKEN }}
gist_id: 92cd6fbcde657fb43c67ed7f2430a994
gist_description: "🍿️ DualSubs: 🎦 Universal β"
file_path: dist/Manifest.response.bundle.js
- name: Deploy Translate.response
uses: exuanbo/actions-deploy-gist@main
with:
token: ${{ secrets.GIST_TOKEN }}
gist_id: 92cd6fbcde657fb43c67ed7f2430a994
gist_description: "🍿️ DualSubs: 🎦 Universal β"
file_path: dist/Translate.response.bundle.js
38 changes: 38 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Dev
on:
workflow_call:
workflow_dispatch:

permissions:
actions: read
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
with:
submodules: recursive
token: ${{ secrets.SUBMODULE_TOKEN }}
ref: dev
- name: Set up Node.js
uses: actions/setup-node@main
with:
node-version: 'latest'
cache: 'npm'
- name: Install dependencies
run: npm install
env:
NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
- name: Build
run: npm run build:dev
- name: Upload artifact
uses: actions/upload-artifact@master
with:
name: artifact
path: |
CHANGELOG.md
rulesets
dist
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,3 @@
[submodule "src/LRC"]
path = src/LRC
url = https://github.com/DualSubs/LRC.git
[submodule "src/utils"]
path = src/utils
url = https://github.com/NanoCat-Me/utils.git
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@nsnanocat:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
### 🛠️ Bug Fixes
* 修复 `Disney+` 中的 `Hulu Hub` 支持
* 修复 `$argument``$persistentStore` 载入顺序颠倒的问题
* 正确顺序为先读取 `$argument` 再读取 `$persistentStore (BoxJs)`
* 即,有相同键名时,`$persistentStore (BoxJs)` 的值会覆盖 `$argument` 的值
1 change: 0 additions & 1 deletion js/Composite.Subtitles.response.js

This file was deleted.

1 change: 0 additions & 1 deletion js/External.Lyrics.response.js

This file was deleted.

1 change: 0 additions & 1 deletion js/Manifest.response.js

This file was deleted.

1 change: 0 additions & 1 deletion js/Translate.response.js

This file was deleted.

175 changes: 0 additions & 175 deletions modules/DualSubs.Universal.beta.sgmodule

This file was deleted.

48 changes: 33 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dualsubs/universal",
"version": "1.5.4",
"version": "1.5.5",
"organizationName": "🍿️ DualSubs",
"displayName": "🍿️ DualSubs: 🔣 Universal",
"description": "流媒体平台字幕增强及双语模块\n如需恢复TV完整支持\n请配合“ iRingo: 📺 TV”使用",
Expand Down Expand Up @@ -39,6 +39,7 @@
],
"devDependencies": {
"@iringo/arguments-builder": "^1.7.8",
"@nsnanocat/util": "^1.3.0",
"@protobuf-ts/plugin": "^2.9.4",
"@protobuf-ts/runtime": "^2.9.4",
"@rspack/cli": "^1.0.11",
Expand Down
2 changes: 1 addition & 1 deletion src/Composite.Subtitles.response.dev.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { $platform, URL, _, Storage, fetch, notification, log, logError, wait, done, getScript, runScript } from "./utils/utils.mjs";
import { $platform, URL, _, Storage, fetch, notification, log, logError, wait, done, getScript, runScript } from "@nsnanocat/util";
import XML from "./XML/XML.mjs";
import VTT from "./WebVTT/WebVTT.mjs";
import database from "./database/index.mjs";
Expand Down
2 changes: 1 addition & 1 deletion src/External.Lyrics.response.dev.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { $platform, URL, _, Storage, fetch, notification, log, logError, wait, done, getScript, runScript } from "./utils/utils.mjs";
import { $platform, URL, _, Storage, fetch, notification, log, logError, wait, done, getScript, runScript } from "@nsnanocat/util";
import LRC from "./LRC/LRC.mjs";
import database from "./database/index.mjs";
import setENV from "./function/setENV.mjs";
Expand Down
2 changes: 1 addition & 1 deletion src/External.Subtitles.response.dev.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { $platform, URL, _, Storage, fetch, notification, log, logError, wait, done, getScript, runScript } from "./utils/utils.mjs";
import { $platform, URL, _, Storage, fetch, notification, log, logError, wait, done, getScript, runScript } from "@nsnanocat/util";
import XML from "./XML/XML.mjs";
import VTT from "./WebVTT/WebVTT.mjs";
import database from "./database/index.mjs";
Expand Down
2 changes: 1 addition & 1 deletion src/Manifest.response.dev.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { $platform, URL, _, Storage, fetch, notification, log, logError, wait, done, getScript, runScript } from "./utils/utils.mjs";
import { $platform, URL, _, Storage, fetch, notification, log, logError, wait, done, getScript, runScript } from "@nsnanocat/util";
import M3U8 from "./EXTM3U/EXTM3U.mjs";
import AttrList from "./class/AttrList.mjs";
import database from "./database/index.mjs";
Expand Down
2 changes: 1 addition & 1 deletion src/Translate.response.dev.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { $platform, URL, _, Storage, fetch, notification, log, logError, wait, done, getScript, runScript } from "./utils/utils.mjs";
import { $platform, URL, _, Storage, fetch, notification, log, logError, wait, done, getScript, runScript } from "@nsnanocat/util";
import XML from "./XML/XML.mjs";
import VTT from "./WebVTT/WebVTT.mjs";
import database from "./database/index.mjs";
Expand Down
2 changes: 1 addition & 1 deletion src/class/AttrList.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { log } from "../utils/utils.mjs";
import { log } from "@nsnanocat/util";
import setOption from "../function/setOption.mjs";
import aPath from "../function/aPath.mjs";

Expand Down
2 changes: 1 addition & 1 deletion src/class/Composite.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { log } from "../utils/utils.mjs";
import { log } from "@nsnanocat/util";

/**
* Composite Subtitles
Expand Down
2 changes: 1 addition & 1 deletion src/class/Translate.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { fetch, log } from "../utils/utils.mjs";
import { fetch, log } from "@nsnanocat/util";
import MD5 from 'crypto-js/md5.js';

export default class Translate {
Expand Down
2 changes: 1 addition & 1 deletion src/function/constructSubtitlesQueue.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { log } from "../utils/utils.mjs";
import { log } from "@nsnanocat/util";

/**
* Construct Subtitles Queue
Expand Down
2 changes: 1 addition & 1 deletion src/function/detectFormat.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { URL, log } from "../utils/utils.mjs";
import { log } from "@nsnanocat/util";

/**
* detect Format
Expand Down
2 changes: 1 addition & 1 deletion src/function/detectPlatform.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { log } from "../utils/utils.mjs";
import { log } from "@nsnanocat/util";

export default function detectPlatform(url) {
log("☑️ Detect Platform", "");
Expand Down
2 changes: 1 addition & 1 deletion src/function/detectPlaylist.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { log } from "../utils/utils.mjs";
import { log } from "@nsnanocat/util";

/**
* detect Format
Expand Down
39 changes: 0 additions & 39 deletions src/function/fetch.mjs

This file was deleted.

2 changes: 1 addition & 1 deletion src/function/isStandard.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import { log } from "../utils/utils.mjs";
import { log } from "@nsnanocat/util";

/**
* is Standard?
Expand Down
2 changes: 1 addition & 1 deletion src/function/setCache.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { log } from "../utils/utils.mjs";
import { log } from "@nsnanocat/util";

/**
* Set Cache
Expand Down
3 changes: 1 addition & 2 deletions src/function/setENV.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import getStorage from '../utils/getStorage.mjs'
import { _, log } from "../utils/utils.mjs";
import { _, getStorage, log } from '@nsnanocat/util'

/**
* Set Environment Variables
Expand Down
2 changes: 1 addition & 1 deletion src/function/setOption.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { log } from "../utils/utils.mjs";
import { log } from "@nsnanocat/util";

/**
* Set DualSubs Subtitle Options
Expand Down
1 change: 0 additions & 1 deletion src/utils
Submodule utils deleted from 40e91e
17 changes: 0 additions & 17 deletions template/archive/plugin/DualSubs.Apple.plugin

This file was deleted.

Loading

0 comments on commit dd0aa7e

Please sign in to comment.