Skip to content

Commit

Permalink
feat: Console
Browse files Browse the repository at this point in the history
Update CHANGELOG.md
Update request.dev.js
Update README.md
Update request.js
  • Loading branch information
VirgilClyne committed Dec 6, 2024
1 parent 9b27a94 commit 30cbebf
Show file tree
Hide file tree
Showing 22 changed files with 2,613 additions and 350 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ jobs:
token: ${{ secrets.GIST_TOKEN }}
gist_id: fe3c29c45fd096d701ebf5b43f1e76b1
gist_description: " iRingo: 📰 News β"
file_path: dist/scripts/request.js
file_path: dist/request.bundle.js
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "src/utils"]
path = src/utils
url = https://github.com/NanoCat-Me/utils.git
13 changes: 8 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
### 🛠️ Bug Fixes
* 修复 `Surge` 模块内置`参数面板`
* 修复 `Loon` 插件内置`设置面板`
* 修复读取`数据库`不正确的问题
* 修复 `$argument``$persistentStore` 载入顺序颠倒的问题
* 正确顺序为先读取 `$argument` 再读取 `$persistentStore (BoxJs)`
* 即,有相同键名时,`$persistentStore (BoxJs)` 的值会覆盖 `$argument` 的值

### 🔄 Other Changes
* 打包器由 `rollup` 更改为 `rspack`
### 🔣 Dependencies
* 升级了 `@nsnanocat/util`
* `util``submodule` 更改为 `package`
* `$platform` 改为 `$app`
* 使用了全新的 `Console` polyfill
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# News
#  iRingo: 📰 News
67 changes: 67 additions & 0 deletions arguments-builder.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import { defineConfig } from "@iringo/arguments-builder";
export default defineConfig({
output: {
surge: {
path: "./dist/iRingo.News.sgmodule",
transformEgern: {
enable: true,
path: "./dist/iRingo.News.yaml",
},
},
loon: {
path: "./dist/iRingo.News.plugin",
},
customItems: [
{
path: "./dist/iRingo.News.snippet",
template: "./template/quantumultx.handlebars",
},
{
path: "./dist/iRingo.News.stoverride",
template: "./template/stash.handlebars",
},
{
path: "./dist/iRingo.News.srmodule",
template: "./template/shadowrocket.handlebars",
},
],
dts: {
isExported: true,
path: "./src/types.d.ts",
},
boxjsSettings: {
path: "./template/boxjs.settings.json",
scope: "@iRingo.News.Settings",
},
},
args: [
{
key: "CountryCode",
name: "国家或地区代码",
defaultValue: "US",
type: "string",
options: [
{ key: "AUTO", label: "🇺🇳自动(跟随地区检测结果)" },
{ key: "CN", label: "🇨🇳中国大陆" },
{ key: "HK", label: "🇭🇰香港" },
{ key: "TW", label: "🇹🇼台湾" },
{ key: "SG", label: "🇸🇬新加坡" },
{ key: "US", label: "🇺🇸美国" },
{ key: "JP", label: "🇯🇵日本" },
{ key: "AU", label: "🇦🇺澳大利亚" },
{ key: "GB", label: "🇬🇧英国" },
{ key: "KR", label: "🇰🇷韩国" },
{ key: "CA", label: "🇨🇦加拿大" },
{ key: "IE", label: "🇮🇪爱尔兰" },
],
description: "不同国家或地区提供的内容或有差别。",
},
{
key: "NewsPlusUser",
name: "[搜索]显示News+内容",
defaultValue: true,
type: "boolean",
description: "是否显示News+搜索结果。",
},
],
});
14 changes: 1 addition & 13 deletions modkit.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { pluginLoon } from "@iringo/modkit/plugins/loon";
import { pluginStash } from "@iringo/modkit/plugins/stash";
import { pluginSurge } from "@iringo/modkit/plugins/surge";
import { pluginNodePolyfill } from "@rsbuild/plugin-node-polyfill";
import pkg from "./package.json";
import pkg from "./package.json" with { type: "json" };

export default defineConfig({
source: {
Expand Down Expand Up @@ -64,18 +64,6 @@ export default defineConfig({
},
},
arguments: [
{
key: "Switch",
name: "总功能开关",
defaultValue: true,
type: {
default: "boolean",
surge: "exclude",
loon: "exclude",
stash: "exclude",
},
description: "是否启用此APP修改。",
},
{
key: "CountryCode",
name: "国家或地区代码",
Expand Down
12 changes: 0 additions & 12 deletions modkit.dev.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,6 @@ export default defineConfig({
return content;
},
arguments: [
{
key: "Switch",
name: "总功能开关",
defaultValue: true,
type: {
default: "boolean",
surge: "exclude",
loon: "exclude",
stash: "exclude",
},
description: "是否启用此APP修改。",
},
{
key: "CountryCode",
name: "国家或地区代码",
Expand Down
27 changes: 17 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "news",
"version": "3.1.5",
"name": "@nsringo/news",
"organizationName": " iRingo",
"displayName": " iRingo: 📰 News",
"description": "1.自定义解锁News的地区\n2.Coming Soon…",
Expand Down Expand Up @@ -29,20 +28,28 @@
"example": "example"
},
"scripts": {
"dev": "modkit dev -c modkit.dev.config.ts",
"build": "modkit build",
"build:dev": "modkit build -c modkit.dev.config.ts",
"dts": "modkit dts"
"build": "rspack build",
"build:dev": "rspack build -c rspack.dev.config.js --mode=development",
"build:args": "arguments-builder build",
"dts": "arguments-builder dts",
"new dev": "modkit dev -c modkit.dev.config.ts",
"new build": "modkit build",
"new build:dev": "modkit build -c modkit.dev.config.ts",
"new dts": "modkit dts"
},
"browserslist": [
"iOS >= 15"
],
"devDependencies": {
"@iringo/modkit": "^1.3.2",
"@iringo/modkit-plugin-egern": "^1.3.2",
"@rsbuild/plugin-node-polyfill": "^1.2.0"
"@iringo/arguments-builder": "^1.8.5",
"@iringo/modkit": "^1.3.3",
"@iringo/modkit-plugin-egern": "^1.3.3",
"@rsbuild/plugin-node-polyfill": "^1.2.0",
"@rspack/cli": "^1.1.5",
"@rspack/core": "^1.1.5",
"node-polyfill-webpack-plugin": "^4.1.0"
},
"dependencies": {
"@nsnanocat/util": "^1.4.8"
"@nsnanocat/util": "^1.7.5"
}
}
Loading

0 comments on commit 30cbebf

Please sign in to comment.