Skip to content

Commit 2ec5c1a

Browse files
committed
refactor: rspack
1 parent 88cc1c3 commit 2ec5c1a

26 files changed

+7915
-1507
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ jobs:
2323
cache: 'npm'
2424
- name: Install dependencies
2525
run: npm install
26+
env:
27+
NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
2628
- name: Update local package.json version from release tag
2729
if: github.ref_type == 'tag'
2830
uses: BellCubeDev/update-package-version-by-release-tag@v2

.github/workflows/debug.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
cache: 'npm'
2525
- name: Install dependencies
2626
run: npm install
27+
env:
28+
NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
2729
- name: Build
2830
run: npm run build:debug
2931
- name: Upload artifact

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ jobs:
2828
token: ${{ secrets.GIST_TOKEN }}
2929
gist_id: b7524906119fa250bc933cc9a08e939a
3030
gist_description: " iRingo: 📍 GeoServices β"
31-
file_path: dist/request.js
31+
file_path: dist/request.bundle.js
3232
- name: Deploy
3333
uses: exuanbo/actions-deploy-gist@main
3434
with:
3535
token: ${{ secrets.GIST_TOKEN }}
3636
gist_id: b7524906119fa250bc933cc9a08e939a
3737
gist_description: " iRingo: 📍 GeoServices β"
38-
file_path: dist/response.js
38+
file_path: dist/response.bundle.js

.npmrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
registry=https://registry.npmjs.org/
1+
registry=https://registry.npmjs.org/
2+
@nsnanocat:registry=https://npm.pkg.github.com/
3+
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
1+
### 🆕 New Features
2+
3+
4+
### 🔣 Dependencies
5+
* 升级了 `@nsnanocat/util`
6+
* `util``submodule` 更改为 `package`
7+
* `$platform` 改为 `$app`
8+
* 增加了 `@nsnanocat/url`
9+
* 使用了全新的 `URL``URLSearchParams` polyfill
10+
111
### 🔄 Other Changes
2-
* 自动生成模块
12+

arguments-builder.config.ts

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,18 @@ export default defineConfig({
2121
template: "./template/shadowrocket.handlebars",
2222
},
2323
],
24-
dts: { isExported: true, path: "./src/interface.ts" },
24+
dts: { isExported: true, path: "./src/types.d.ts" },
2525
boxjsSettings: {
2626
path: "./template/boxjs.settings.json",
2727
scope: "@iRingo.Maps.Settings",
2828
},
2929
},
3030
args: [
31-
{
32-
defaultValue: true,
33-
description: "是否启用此APP修改",
34-
exclude: ["surge", "loon"],
35-
key: "Switch",
36-
name: "总功能开关",
37-
type: "boolean",
38-
},
3931
{
4032
defaultValue: "CN",
4133
description: "此选项影响“地图”整体配置内容,包括以下的地图功能与服务。",
4234
key: "GeoManifest.Dynamic.Config.CountryCode.default",
43-
name: "[全局 动态配置]资源清单的国家或地区代码",
35+
name: "[全局 动态配置] 资源清单的国家或地区代码",
4436
options: [
4537
{ key: "AUTO", label: "🇺🇳自动(跟随用户当前所在地区)" },
4638
{ key: "CN", label: "🇨🇳中国大陆" },
@@ -61,7 +53,7 @@ export default defineConfig({
6153
defaultValue: "US",
6254
description: "此选项影响 watchOS “地图”整体配置内容,包括以下的地图功能与服务。",
6355
key: "GeoManifest.Dynamic.Config.CountryCode.watchOS",
64-
name: "[watchOS 动态配置]资源清单的国家或地区代码",
56+
name: "[watchOS 动态配置] 资源清单的国家或地区代码",
6557
options: [
6658
{ key: "AUTO", label: "🇺🇳自动(跟随用户当前所在地区)" },
6759
{ key: "CN", label: "🇨🇳中国大陆" },
@@ -83,7 +75,7 @@ export default defineConfig({
8375
description:
8476
"地点数据接口,此选项影响公共指南,兴趣点(POI)与位置信息等功能。",
8577
key: "UrlInfoSet.Dispatcher",
86-
name: "[URL信息集]调度器",
78+
name: "[URL信息集] 调度器",
8779
options: [
8880
{ key: "AUTO", label: "自动(随[动态配置]版本自动选择)" },
8981
{
@@ -99,7 +91,7 @@ export default defineConfig({
9991
defaultValue: "AutoNavi",
10092
description: "导航与ETA服务接口,此选项影响导航与ETA(到达时间)等功能。",
10193
key: "UrlInfoSet.Directions",
102-
name: "[URL信息集]导航与ETA",
94+
name: "[URL信息集] 导航与ETA",
10395
options: [
10496
{ key: "AUTO", label: "自动(随[动态配置]版本自动选择)" },
10597
{ key: "AutoNavi", label: "🧭高德(🇨🇳:高德地图 | 🇺🇳:TomTom)" },
@@ -111,7 +103,7 @@ export default defineConfig({
111103
defaultValue: "Apple",
112104
description: "评分和照片服务接口,此选项影响评分和照片服务以及照片使用。",
113105
key: "UrlInfoSet.RAP",
114-
name: "[URL信息集]评分和照片",
106+
name: "[URL信息集] 评分和照片",
115107
options: [
116108
{ key: "AUTO", label: "自动(随[动态配置]版本自动选择)" },
117109
{ key: "AutoNavi", label: "🧭高德(🇨🇳:🈶️但未开放 | 🇺🇳:🈚️)" },
@@ -124,7 +116,7 @@ export default defineConfig({
124116
description:
125117
"定位漂移修正服务接口,控制定位漂移和🧭指南针与📍坐标的经纬度。",
126118
key: "UrlInfoSet.LocationShift",
127-
name: "[URL信息集]定位漂移",
119+
name: "[URL信息集] 定位漂移",
128120
options: [
129121
{ key: "AUTO", label: "自动(随[动态配置]版本自动选择)" },
130122
{ key: "AutoNavi", label: "🧭高德(🈚️坐标,使用🇨🇳GCJ-02坐标)" },
@@ -136,7 +128,7 @@ export default defineConfig({
136128
defaultValue: "HYBRID",
137129
description: "此选项影响所列位图、影像与模型数据。",
138130
key: "TileSet.Satellite",
139-
name: "[瓦片数据集]卫星图像",
131+
name: "[瓦片数据集] 卫星图像",
140132
options: [
141133
{ key: "AUTO", label: "自动(随[动态配置]版本自动选择)" },
142134
{ key: "HYBRID", label: "混合(🇨🇳:2D较新 | 🇺🇳:主要城市3D)" },
@@ -149,7 +141,7 @@ export default defineConfig({
149141
defaultValue: "XX",
150142
description: "此选项影响飞行俯瞰全球各地的主要地标和城市功能。",
151143
key: "TileSet.Flyover",
152-
name: "[瓦片数据集]飞行俯瞰",
144+
name: "[瓦片数据集] 飞行俯瞰",
153145
options: [
154146
{ key: "AUTO", label: "自动(随[动态配置]版本自动选择)" },
155147
{ key: "CN", label: "🇨🇳Apple(🇨🇳:🈚️ | 🇺🇳:🈚️)" },
@@ -161,7 +153,7 @@ export default defineConfig({
161153
defaultValue: "XX",
162154
description: "此选项影响 360 度全景视角在某些地点四处看看功能。",
163155
key: "TileSet.Munin",
164-
name: "[瓦片数据集]四处看看",
156+
name: "[瓦片数据集] 四处看看",
165157
options: [
166158
{ key: "AUTO", label: "自动(随[动态配置]版本自动选择)" },
167159
{ key: "CN", label: "🇨🇳Apple(🇨🇳:🈚️ | 🇺🇳:🈚️)" },

biome.json

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3+
"files": {
4+
"ignore": [
5+
"**/*.bundle.js"
6+
],
7+
"ignoreUnknown": false
8+
},
9+
"formatter": {
10+
"enabled": true,
11+
"indentStyle": "tab",
12+
"indentWidth": 2,
13+
"lineEnding": "lf",
14+
"lineWidth": 320
15+
},
16+
"javascript": {
17+
"formatter": {
18+
"arrowParentheses": "asNeeded",
19+
"bracketSameLine": true,
20+
"quoteStyle": "double"
21+
}
22+
},
23+
"json": {
24+
"parser": {
25+
"allowComments": true,
26+
"allowTrailingCommas": true
27+
}
28+
},
29+
"linter": {
30+
"enabled": true,
31+
"rules": {
32+
"complexity": {
33+
"noForEach": "off",
34+
"noStaticOnlyClass": "off",
35+
"noUselessSwitchCase": "off",
36+
"useArrowFunction": "info",
37+
"useFlatMap": "off",
38+
"useLiteralKeys": "info"
39+
},
40+
"correctness": {
41+
"noInnerDeclarations": "info",
42+
"noSelfAssign": "off",
43+
"noSwitchDeclarations": "info",
44+
"noUnsafeOptionalChaining": "info"
45+
},
46+
"performance": {
47+
"noDelete": "info"
48+
},
49+
"recommended": true,
50+
"style": {
51+
"noNegationElse": "off",
52+
"noParameterAssign": "off",
53+
"noUselessElse": "off",
54+
"noVar": "info",
55+
"useDefaultParameterLast": "info",
56+
"useForOf": "error",
57+
"useNodejsImportProtocol": "error",
58+
"useNumberNamespace": "error",
59+
"useSingleVarDeclarator": "off"
60+
},
61+
"suspicious": {
62+
"noAssignInExpressions": "info",
63+
"noDoubleEquals": "info",
64+
"noFallthroughSwitchClause": "info",
65+
"noGlobalIsNan": "off",
66+
"useDefaultSwitchClauseLast": "off"
67+
}
68+
}
69+
},
70+
"organizeImports": {
71+
"enabled": true
72+
},
73+
"vcs": {
74+
"clientKind": "git",
75+
"enabled": true,
76+
"useIgnoreFile": true
77+
}
78+
}

0 commit comments

Comments
 (0)