Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
Update package-lock.json
Update response.dev.js
Update request.dev.js
Update package.json
Update response.js
Update request.js
Update .npmrc
  • Loading branch information
VirgilClyne committed Dec 4, 2024
1 parent 31c2726 commit af50515
Show file tree
Hide file tree
Showing 32 changed files with 8,872 additions and 2,230 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,26 @@ jobs:
with:
submodules: recursive
token: ${{ secrets.SUBMODULE_TOKEN }}
ref: ${{github.ref_name}}
- 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: Update local package.json version from release tag
if: github.ref_type == 'tag'
uses: BellCubeDev/update-package-version-by-release-tag@v2
with:
version: ${{ github.ref_name }}
keep-v: "false" # If set to "true", will not remove any 'v' prefix from the version number.
ignore-semver-check: "false" # If set to "true", will not check if the version number is a valid semver version.
- name: Build
if: github.ref_name == 'main' || github.ref_type == 'tag'
run: |
npm run build
npm run build:args
- name: Debug
if: github.ref_name == 'dev' || github.ref_name == 'debug'
run: npm run build:debug
- name: Build scripts
run: npm run build
- name: Generate modules
run: npm run build:args
- name: Upload artifact
uses: actions/upload-artifact@master
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ permissions:
contents: read

jobs:
build:
uses: ./.github/workflows/build.yml
debug:
uses: ./.github/workflows/dev.yml
secrets: inherit
deploy:
needs: build
needs: debug
runs-on: ubuntu-latest
steps:
- name: Download artifact
Expand All @@ -27,11 +27,11 @@ jobs:
token: ${{ secrets.GIST_TOKEN }}
gist_id: fa7b08c6994b555b82b6d22df89f8a31
gist_description: " iRingo: 📺 TV app β"
file_path: dist/request.js
file_path: dist/request.bundle.js
- name: Deploy
uses: exuanbo/actions-deploy-gist@main
with:
token: ${{ secrets.GIST_TOKEN }}
gist_id: fa7b08c6994b555b82b6d22df89f8a31
gist_description: " iRingo: 📺 TV app β"
file_path: dist/response.js
file_path: dist/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

This file was deleted.

3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
registry=https://registry.npmjs.org/
@nsnanocat:registry=https://npm.pkg.github.com/
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
### 🛠️ Bug Fixes
* 修复 `$argument``$persistentStore` 载入顺序颠倒的问题
* 正确顺序为先读取 `$argument` 再读取 `$persistentStore (BoxJs)`
* 即,有相同键名时,`$persistentStore (BoxJs)` 的值会覆盖 `$argument` 的值

### 🔣 Dependencies
* 升级了 `@nsnanocat/util`
* `util``submodule` 更改为 `package`
* `$platform` 改为 `$app`
* 使用了全新的 `Console` polyfill
* 升级了 `@nsnanocat/url`
* 使用了全新的 `URL``URLSearchParams` polyfill

### 🔄 Other Changes
* 自动生成模块
* 打包器由 `rollup` 更改为 `rspack`
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# TV
#  iRingo: 📺 TV app
68 changes: 34 additions & 34 deletions arguments-builder.config.ts
Original file line number Diff line number Diff line change
@@ -1,85 +1,85 @@
import { defineConfig } from "@iringo/arguments-builder";
export default defineConfig({
output: {
surge: { path: "./dist/TV.sgmodule" },
loon: { path: "./dist/TV.plugin" },
surge: {
path: "./dist/iRingo.TV.sgmodule",
transformEgern: {
enable: true,
path: "./dist/iRingo.TV.yaml",
},
},
loon: {
path: "./dist/iRingo.TV.plugin",
},
customItems: [
{
path: "./dist/TV.snippet",
path: "./dist/iRingo.TV.snippet",
template: "./template/quantumultx.handlebars",
},
{
path: "./dist/TV.stoverride",
path: "./dist/iRingo.TV.stoverride",
template: "./template/stash.handlebars",
},
{
path: "./dist/TV.srmodule",
path: "./dist/iRingo.TV.srmodule",
template: "./template/shadowrocket.handlebars",
},
],
dts: { isExported: true, path: "./src/interface.ts" },
dts: { isExported: true, path: "./src/types.d.ts" },
boxjsSettings: {
path: "./template/boxjs.settings.json",
scope: "@iRingo.TV.Settings",
},
},
args: [
{
key: "Switch",
name: "总功能开关",
defaultValue: true,
type: "boolean",
description: "是否启用此APP修改",
exclude: ["surge", "loon"],
},
{
key: "ThirdParty",
name: "启用第三方App与TV app关联功能",
name: "启用第三方 App 与 TV app 关联功能",
defaultValue: false,
type: "boolean",
description: "是否将桌面版/macOS版/app版等平台的TV app转换至iPad版,以启用第三方App与TV app关联功能(如: Disney+,Prime Video等)。",
description: "是否将桌面版/macOS版/app版等平台的 TV app 转换至 iPad 版,以启用第三方 App 与 TV app 关联功能(如: Disney+, Prime Video 等)。",
},
{
key: "HLSUrl",
name: "HTTP实时流(HLS)地址",
name: "[主机名] HTTP实时流(HLS)地址",
defaultValue: "play-edge.itunes.apple.com",
type: "string",
description: "因为FPS服务域名禁止MitM,修改此地址可以分离HLS与FPS的域名,从而恢复对DualSubs的双语字幕支持。",
options: [
{
"key": "",
"label": "OFF(不修改)"
key: "",
label: "OFF(不修改)",
},
{
"key": "play.itunes.apple.com",
"label": "play.itunes.apple.com (不推荐,与播放服务域名重叠)"
key: "play.itunes.apple.com",
label: "play.itunes.apple.com (不推荐,与播放服务域名重叠)",
},
{
"key": "play-edge.itunes.apple.com",
"label": "play-edge.itunes.apple.com (默认)"
}
]
key: "play-edge.itunes.apple.com",
label: "play-edge.itunes.apple.com (默认)",
},
],
},
{
key: "FPSUrl",
name: "FairPlay流(FPS)地址",
name: "[主机名] FairPlay流(FPS)地址",
defaultValue: "play.itunes.apple.com",
type: "string",
description: "因为FPS服务域名禁止MitM,修改此地址可以分离HLS与FPS的域名,从而恢复对DualSubs的双语字幕支持。",
options: [
{
"key": "",
"label": "OFF(不修改)"
key: "",
label: "OFF(不修改)",
},
{
"key": "play.itunes.apple.com",
"label": "play.itunes.apple.com (默认)"
key: "play.itunes.apple.com",
label: "play.itunes.apple.com (默认)",
},
{
"key": "play-edge.itunes.apple.com",
"label": "play-edge.itunes.apple.com (不推荐,与播放服务域名重叠)"
}
]
key: "play-edge.itunes.apple.com",
label: "play-edge.itunes.apple.com (不推荐,与播放服务域名重叠)",
},
],
},
],
});
78 changes: 78 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"files": {
"ignore": [
"**/*.bundle.js"
],
"ignoreUnknown": false
},
"formatter": {
"enabled": true,
"indentStyle": "tab",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 320
},
"javascript": {
"formatter": {
"arrowParentheses": "asNeeded",
"bracketSameLine": true,
"quoteStyle": "double"
}
},
"json": {
"parser": {
"allowComments": true,
"allowTrailingCommas": true
}
},
"linter": {
"enabled": true,
"rules": {
"complexity": {
"noForEach": "off",
"noStaticOnlyClass": "off",
"noUselessSwitchCase": "off",
"useArrowFunction": "info",
"useFlatMap": "off",
"useLiteralKeys": "info"
},
"correctness": {
"noInnerDeclarations": "info",
"noSelfAssign": "off",
"noSwitchDeclarations": "info",
"noUnsafeOptionalChaining": "info"
},
"performance": {
"noDelete": "info"
},
"recommended": true,
"style": {
"noNegationElse": "off",
"noParameterAssign": "off",
"noUselessElse": "off",
"noVar": "info",
"useDefaultParameterLast": "info",
"useForOf": "error",
"useNodejsImportProtocol": "error",
"useNumberNamespace": "error",
"useSingleVarDeclarator": "off"
},
"suspicious": {
"noAssignInExpressions": "info",
"noDoubleEquals": "info",
"noFallthroughSwitchClause": "info",
"noGlobalIsNan": "off",
"useDefaultSwitchClauseLast": "off"
}
}
},
"organizeImports": {
"enabled": true
},
"vcs": {
"clientKind": "git",
"enabled": true,
"useIgnoreFile": true
}
}
Loading

0 comments on commit af50515

Please sign in to comment.