Skip to content

Commit

Permalink
feat: Console.logLevel
Browse files Browse the repository at this point in the history
Update arguments-builder.config.ts
Update rspack.dev.config.js
Update boxjs.settings.json
Update database.mjs
Update build.yml
Update dev.yml
  • Loading branch information
VirgilClyne committed Dec 10, 2024
1 parent f871c21 commit 616f27b
Show file tree
Hide file tree
Showing 9 changed files with 642 additions and 571 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
2 changes: 2 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
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
Expand Down
23 changes: 18 additions & 5 deletions arguments-builder.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ export default defineConfig({
defaultValue: "AUTO",
type: "string",
boxJsType: "selects",
description:
"当“主语言”字幕存在时,将生成“主语言/副语言(翻译)”与“主语言(外挂)”的字幕或字幕选项。仅当源语言识别不准确时更改此选项。",
description: "当“主语言”字幕存在时,将生成“主语言/副语言(翻译)”与“主语言(外挂)”的字幕或字幕选项。仅当源语言识别不准确时更改此选项。",
options: [
{
key: "AUTO",
Expand Down Expand Up @@ -119,8 +118,7 @@ export default defineConfig({
defaultValue: "ZH",
type: "string",
boxJsType: "selects",
description:
"当“副语言”字幕存在时,将生成“副语言/主语言(官方)”的字幕或字幕选项。",
description: "当“副语言”字幕存在时,将生成“副语言/主语言(官方)”的字幕或字幕选项。",
options: [
{
key: "ZH",
Expand Down Expand Up @@ -223,7 +221,22 @@ export default defineConfig({
name: "[翻译器] 只显示翻译字幕",
defaultValue: false,
type: "boolean",
description: "是否仅显示翻译后的字幕,不显示源语言字幕。",
description: "是否仅显示翻译后字幕,不显示源语言字幕。",
},
{
key: "LogLevel",
name: "[调试] 日志等级",
type: "string",
defaultValue: "WARN",
description: "选择脚本日志的输出等级,低于所选等级的日志将全部输出。",
options: [
{ key: "OFF", label: "关闭" },
{ key: "ERROR", label: "❌ 错误" },
{ key: "WARN", label: "⚠️ 警告" },
{ key: "INFO", label: "ℹ️ 信息" },
{ key: "DEBUG", label: "🅱️ 调试" },
{ key: "ALL", label: "全部" },
],
},
],
});
72 changes: 72 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"$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": 240
},
"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"
},
"recommended": true,
"style": {
"noNegationElse": "off",
"noParameterAssign": "off",
"noUselessElse": "off",
"noVar": "info",
"useDefaultParameterLast": "info",
"useForOf": "error",
"useNodejsImportProtocol": "error",
"useNumberNamespace": "error",
"useSingleVarDeclarator": "off"
},
"suspicious": {
"noAssignInExpressions": "info",
"noFallthroughSwitchClause": "info",
"useDefaultSwitchClauseLast": "off"
}
}
},
"organizeImports": {
"enabled": true
},
"vcs": {
"clientKind": "git",
"enabled": true,
"useIgnoreFile": true
}
}
Loading

0 comments on commit 616f27b

Please sign in to comment.