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 b71a22d
Show file tree
Hide file tree
Showing 26 changed files with 139 additions and 246 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}
175 changes: 0 additions & 175 deletions modules/DualSubs.Universal.beta.sgmodule

This file was deleted.

40 changes: 29 additions & 11 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
],
"devDependencies": {
"@iringo/arguments-builder": "^1.7.8",
"@nsnanocat/util": "^1.2.23",
"@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

0 comments on commit b71a22d

Please sign in to comment.