Skip to content

Commit

Permalink
chore: bump package version
Browse files Browse the repository at this point in the history
Update package-lock.json
Update CHANGELOG.md
Update response.dev.js
Update request.dev.js
Update package.json
Update response.js
Update request.js
  • Loading branch information
VirgilClyne committed Nov 26, 2024
1 parent 79c3830 commit 8f858ef
Show file tree
Hide file tree
Showing 9 changed files with 280 additions and 260 deletions.
13 changes: 9 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
### 🛠️ Bug Fixes
* 修复 `Surge` 模块`脚本引擎`设置
* 修复 `Egern` 模块`参数面板`
* 修复 `$argument``$persistentStore` 载入顺序颠倒的问题
* 正确顺序为先读取 `$argument` 再读取 `$persistentStore (BoxJs)`
* 即,有相同键名时,`$persistentStore (BoxJs)` 的值会覆盖 `$argument` 的值

### 🔄 Other Changes
* 加入 `URL` polyfill 以兼容 `tvOS`
### 🔣 Dependencies
* 升级了 `@nsnanocat/url`
* 使用了全新的 `URL``URLSearchParams` polyfill
* 升级了 `@nsnanocat/util`
* `util``submodule` 更改为 `package`
* `$platform` 改为 `$app`
480 changes: 244 additions & 236 deletions package-lock.json

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@biliuniverse/global",
"version": "0.8.9",
"version": "0.8.10",
"organizationName": "🪐 BiliUniverse",
"displayName": "📺 BiliBili: 🌐 Global",
"description": "哔哩哔哩:全球模式\n中国站自动线路及全区搜索",
Expand Down Expand Up @@ -39,7 +39,6 @@
],
"devDependencies": {
"@iringo/arguments-builder": "^1.8.2",
"@nsnanocat/util": "^1.3.6",
"@protobuf-ts/plugin": "^2.9.3",
"@rspack/cli": "^1.0.14",
"@rspack/core": "^1.0.14",
Expand All @@ -48,7 +47,9 @@
"typescript": "^5.5.4"
},
"dependencies": {
"@protobuf-ts/runtime-rpc": "^2.9.3",
"@protobuf-ts/runtime": "^2.9.3"
"@nsnanocat/url": "^1.2.1",
"@nsnanocat/util": "^1.5.2",
"@protobuf-ts/runtime": "^2.9.3",
"@protobuf-ts/runtime-rpc": "^2.9.3"
}
}
1 change: 1 addition & 0 deletions rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ export default defineConfig({
banner: pkg.homepage,
}),
],
devtool: false,
performance: false,
});
1 change: 1 addition & 0 deletions rspack.dev.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@ export default defineConfig({
banner: pkg.homepage,
}),
],
devtool: false,
performance: false,
});
13 changes: 7 additions & 6 deletions src/request.dev.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { $platform, URL, Lodash as _, Storage, fetch, notification, log, logError, wait, done, gRPC } from "@nsnanocat/util";
import { $app, Lodash as _, Storage, fetch, notification, log, logError, wait, done, gRPC } from "@nsnanocat/util";
import { URL } from "@nsnanocat/url";
import database from "./function/database.mjs";
import setENV from "./function/setENV.mjs";
import isResponseAvailability from "./function/isResponseAvailability.mjs";
Expand Down Expand Up @@ -91,7 +92,7 @@ log(`⚠ FORMAT: ${FORMAT}`, "");
case "application/grpc+proto":
case "application/octet-stream": {
//log(`🚧 $request.body: ${JSON.stringify($request.body)}`, "");
let rawBody = $platform === "Quantumult X" ? new Uint8Array($request.bodyBytes ?? []) : ($request.body ?? new Uint8Array());
let rawBody = $app === "Quantumult X" ? new Uint8Array($request.bodyBytes ?? []) : ($request.body ?? new Uint8Array());
//log(`🚧 isBuffer? ${ArrayBuffer.isView(rawBody)}: ${JSON.stringify(rawBody)}`, "");
switch (FORMAT) {
case "application/protobuf":
Expand Down Expand Up @@ -370,7 +371,7 @@ log(`⚠ FORMAT: ${FORMAT}`, "");
log("⚠ 不是 PGC, 跳过", "");
break;
}
switch ($platform) {
switch ($app) {
// 直通模式,不处理,否则无法进http-response
case "Shadowrocket":
case "Quantumult X":
Expand Down Expand Up @@ -403,7 +404,7 @@ log(`⚠ FORMAT: ${FORMAT}`, "");
}
break;
}
switch ($platform) {
switch ($app) {
// 已有指定策略的请求,根据策略fetch
case "Shadowrocket":
case "Quantumult X":
Expand All @@ -418,7 +419,7 @@ log(`⚠ FORMAT: ${FORMAT}`, "");
//log("🚧 finally", `echo $response: ${JSON.stringify($response, null, 2)}`, "");
if ($response.headers?.["Content-Encoding"]) $response.headers["Content-Encoding"] = "identity";
if ($response.headers?.["content-encoding"]) $response.headers["content-encoding"] = "identity";
switch ($platform) {
switch ($app) {
default:
done({ response: $response });
break;
Expand Down Expand Up @@ -475,7 +476,7 @@ async function mutiFetch(request = {}, proxies = {}, locales = []) {
await Promise.allSettled(
locales.map(async locale => {
request.policy = proxies[locale];
if ($platform === "Quantumult X") request.body = undefined;
if ($app === "Quantumult X") request.body = undefined;
responses[locale] = await fetch(request);
}),
);
Expand Down
13 changes: 7 additions & 6 deletions src/request.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { $platform, URL, Lodash as _, Storage, fetch, notification, log, logError, wait, done, gRPC } from "@nsnanocat/util";
import { $app, Lodash as _, Storage, fetch, notification, log, logError, wait, done, gRPC } from "@nsnanocat/util";
import { URL } from "@nsnanocat/url";
import database from "./function/database.mjs";
import setENV from "./function/setENV.mjs";
import isResponseAvailability from "./function/isResponseAvailability.mjs";
Expand Down Expand Up @@ -79,7 +80,7 @@ log(`⚠ FORMAT: ${FORMAT}`, "");
case "application/grpc+proto":
case "application/octet-stream": {
//log(`🚧 $request.body: ${JSON.stringify($request.body)}`, "");
let rawBody = $platform === "Quantumult X" ? new Uint8Array($request.bodyBytes ?? []) : ($request.body ?? new Uint8Array());
let rawBody = $app === "Quantumult X" ? new Uint8Array($request.bodyBytes ?? []) : ($request.body ?? new Uint8Array());
//log(`🚧 isBuffer? ${ArrayBuffer.isView(rawBody)}: ${JSON.stringify(rawBody)}`, "");
switch (FORMAT) {
case "application/protobuf":
Expand Down Expand Up @@ -343,7 +344,7 @@ log(`⚠ FORMAT: ${FORMAT}`, "");
log("⚠ 不是 PGC, 跳过", "");
break;
}
switch ($platform) {
switch ($app) {
// 直通模式,不处理,否则无法进http-response
case "Shadowrocket":
case "Quantumult X":
Expand Down Expand Up @@ -376,7 +377,7 @@ log(`⚠ FORMAT: ${FORMAT}`, "");
}
break;
}
switch ($platform) {
switch ($app) {
// 已有指定策略的请求,根据策略fetch
case "Shadowrocket":
case "Quantumult X":
Expand All @@ -390,7 +391,7 @@ log(`⚠ FORMAT: ${FORMAT}`, "");
case "object": // 有构造回复数据,返回构造的回复数据
if ($response.headers?.["Content-Encoding"]) $response.headers["Content-Encoding"] = "identity";
if ($response.headers?.["content-encoding"]) $response.headers["content-encoding"] = "identity";
switch ($platform) {
switch ($app) {
default:
done({ response: $response });
break;
Expand Down Expand Up @@ -446,7 +447,7 @@ async function mutiFetch(request = {}, proxies = {}, locales = []) {
await Promise.allSettled(
locales.map(async locale => {
request.policy = proxies[locale];
if ($platform === "Quantumult X") request.body = undefined;
if ($app === "Quantumult X") request.body = undefined;
responses[locale] = await fetch(request);
}),
);
Expand Down
5 changes: 3 additions & 2 deletions src/response.dev.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { $platform, URL, Lodash as _, Storage, fetch, notification, log, logError, wait, done, gRPC } from "@nsnanocat/util";
import { $app, Lodash as _, Storage, fetch, notification, log, logError, wait, done, gRPC } from "@nsnanocat/util";
import { URL } from "@nsnanocat/url";
import database from "./function/database.mjs";
import setENV from "./function/setENV.mjs";
import { WireType, UnknownFieldHandler, reflectionMergePartial, MESSAGE_TYPE, MessageType, BinaryReader, isJsonObject, typeofJsonValue, jsonWriteOptions } from "@protobuf-ts/runtime";
Expand Down Expand Up @@ -168,7 +169,7 @@ log(`⚠ FORMAT: ${FORMAT}`, "");
case "application/grpc+proto":
case "application/octet-stream": {
//log(`🚧 $response.body: ${JSON.stringify($response.body)}`, "");
let rawBody = $platform === "Quantumult X" ? new Uint8Array($response.bodyBytes ?? []) : ($response.body ?? new Uint8Array());
let rawBody = $app === "Quantumult X" ? new Uint8Array($response.bodyBytes ?? []) : ($response.body ?? new Uint8Array());
//log(`🚧 isBuffer? ${ArrayBuffer.isView(rawBody)}: ${JSON.stringify(rawBody)}`, "");
switch (FORMAT) {
case "application/protobuf":
Expand Down
5 changes: 3 additions & 2 deletions src/response.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { $platform, URL, Lodash as _, Storage, fetch, notification, log, logError, wait, done, gRPC } from "@nsnanocat/util";
import { $app, Lodash as _, Storage, fetch, notification, log, logError, wait, done, gRPC } from "@nsnanocat/util";
import { URL } from "@nsnanocat/url";
import database from "./function/database.mjs";
import setENV from "./function/setENV.mjs";
import { WireType, UnknownFieldHandler, reflectionMergePartial, MESSAGE_TYPE, MessageType, BinaryReader, isJsonObject, typeofJsonValue, jsonWriteOptions } from "@protobuf-ts/runtime";
Expand Down Expand Up @@ -159,7 +160,7 @@ log(`⚠ FORMAT: ${FORMAT}`, "");
case "application/grpc+proto":
case "application/octet-stream": {
//log(`🚧 $response.body: ${JSON.stringify($response.body)}`, "");
let rawBody = $platform === "Quantumult X" ? new Uint8Array($response.bodyBytes ?? []) : ($response.body ?? new Uint8Array());
let rawBody = $app === "Quantumult X" ? new Uint8Array($response.bodyBytes ?? []) : ($response.body ?? new Uint8Array());
//log(`🚧 isBuffer? ${ArrayBuffer.isView(rawBody)}: ${JSON.stringify(rawBody)}`, "");
switch (FORMAT) {
case "application/protobuf":
Expand Down

0 comments on commit 8f858ef

Please sign in to comment.