Skip to content

Commit d23f6c7

Browse files
committed
feat: Console
1 parent 0d18d59 commit d23f6c7

11 files changed

+315
-345
lines changed

package-lock.json

+297-328
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
"node-polyfill-webpack-plugin": "^4.0.0"
4545
},
4646
"dependencies": {
47-
"@nsnanocat/url": "^1.2.3",
48-
"@nsnanocat/util": "^1.6.4",
47+
"@nsnanocat/url": "^1.2.4",
48+
"@nsnanocat/util": "^1.7.5",
4949
"@protobuf-ts/runtime": "^2.9.4",
5050
"crypto-js": "^4.2.0",
5151
"text-encoding": "^0.7.0"

src/Composite.Subtitles.response.dev.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { $app, Console, done, fetch, Lodash as _, notification, Storage, wait } from "@nsnanocat/util";
1+
import { Console, done, fetch, Lodash as _ } from "@nsnanocat/util";
22
import { URL } from "@nsnanocat/url";
33
import XML from "./XML/XML.mjs";
44
import VTT from "./WebVTT/WebVTT.mjs";
@@ -9,6 +9,7 @@ import detectPlatform from "./function/detectPlatform.mjs";
99
import setCache from "./function/setCache.mjs";
1010
import constructSubtitlesQueue from "./function/constructSubtitlesQueue.mjs";
1111
import Composite from "./class/Composite.mjs";
12+
Console.logLevel = "DEBUG";
1213
/***************** Processing *****************/
1314
// 解构URL
1415
const url = new URL($request.url);
@@ -190,11 +191,11 @@ Console.info(`FORMAT: ${FORMAT}`);
190191
case "application/grpc+proto":
191192
case "application/octet-stream": {
192193
//Console.debug(`$response.body: ${JSON.stringify($response.body)}`);
193-
let rawBody = $app === "Quantumult X" ? new Uint8Array($response.bodyBytes ?? []) : ($response.body ?? new Uint8Array());
194+
//let rawBody = $app === "Quantumult X" ? new Uint8Array($response.bodyBytes ?? []) : ($response.body ?? new Uint8Array());
194195
//Console.debug(`isBuffer? ${ArrayBuffer.isView(rawBody)}: ${JSON.stringify(rawBody)}`);
195196
// 写入二进制数据
196197
//Console.debug(`rawBody: ${JSON.stringify(rawBody)}`);
197-
$response.body = rawBody;
198+
//$response.body = rawBody;
198199
break;
199200
}
200201
}

src/Composite.Subtitles.response.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { $app, Console, done, fetch, Lodash as _, notification, Storage, wait } from "@nsnanocat/util";
1+
import { Console, done, fetch, Lodash as _ } from "@nsnanocat/util";
22
import { URL } from "@nsnanocat/url";
33
import XML from "./XML/XML.mjs";
44
import VTT from "./WebVTT/WebVTT.mjs";
@@ -9,7 +9,6 @@ import detectPlatform from "./function/detectPlatform.mjs";
99
import setCache from "./function/setCache.mjs";
1010
import constructSubtitlesQueue from "./function/constructSubtitlesQueue.mjs";
1111
import Composite from "./class/Composite.mjs";
12-
Console.debug = () => {};
1312
/***************** Processing *****************/
1413
// 解构URL
1514
const url = new URL($request.url);

src/External.Lyrics.response.dev.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
import { $app, Console, done, fetch, Lodash as _, notification, Storage, wait } from "@nsnanocat/util";
1+
import { $app, Console, done, fetch, Lodash as _, Storage } from "@nsnanocat/util";
22
import LRC from "./LRC/LRC.mjs";
33
import database from "./database/index.mjs";
44
import setENV from "./function/setENV.mjs";
55
import detectPlatform from "./function/detectPlatform.mjs";
66
import setCache from "./function/setCache.mjs";
77
import { BrowseResponse } from "./protobuf/google/protos/youtube/api/innertube/BrowseResponse.js";
88
import { ColorLyricsResponse } from "./protobuf/spotify/lyrics/Lyrics.js";
9+
Console.logLevel = "DEBUG";
910
/***************** Processing *****************/
1011
// 解构URL
1112
const url = new URL($request.url);

src/External.Lyrics.response.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
import { $app, Console, done, fetch, Lodash as _, notification, Storage, wait } from "@nsnanocat/util";
1+
import { $app, Console, done, fetch, Lodash as _, Storage } from "@nsnanocat/util";
22
import LRC from "./LRC/LRC.mjs";
33
import database from "./database/index.mjs";
44
import setENV from "./function/setENV.mjs";
55
import detectPlatform from "./function/detectPlatform.mjs";
66
import setCache from "./function/setCache.mjs";
77
import { BrowseResponse } from "./protobuf/google/protos/youtube/api/innertube/BrowseResponse.js";
88
import { ColorLyricsResponse } from "./protobuf/spotify/lyrics/Lyrics.js";
9-
Console.debug = () => {};
109
/***************** Processing *****************/
1110
// 解构URL
1211
const url = new URL($request.url);

src/External.Subtitles.response.dev.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { $app, Console, done, fetch, Lodash as _, notification, Storage, wait } from "@nsnanocat/util";
1+
import { Console, done, fetch, Lodash as _ } from "@nsnanocat/util";
22
import { URL } from "@nsnanocat/url";
33
import XML from "./XML/XML.mjs";
44
import VTT from "./WebVTT/WebVTT.mjs";
@@ -7,6 +7,7 @@ import setENV from "./function/setENV.mjs";
77
import detectFormat from "./function/detectFormat.mjs";
88
import detectPlatform from "./function/detectPlatform.mjs";
99
import Composite from "./function/Composite.mjs";
10+
Console.logLevel = "DEBUG";
1011
/***************** Processing *****************/
1112
// 解构URL
1213
const url = new URL($request.url);

src/Manifest.response.dev.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { $app, Console, done, fetch, Lodash as _, notification, Storage, wait } from "@nsnanocat/util";
1+
import { Console, done, fetch, Lodash as _, Storage } from "@nsnanocat/util";
22
import { URL } from "@nsnanocat/url";
33
import M3U8 from "./EXTM3U/EXTM3U.mjs";
44
import AttrList from "./class/AttrList.mjs";
@@ -9,6 +9,7 @@ import isStandard from "./function/isStandard.mjs";
99
import detectPlaylist from "./function/detectPlaylist.mjs";
1010
import setCache from "./function/setCache.mjs";
1111
import aPath from "./function/aPath.mjs";
12+
Console.logLevel = "DEBUG";
1213
/***************** Processing *****************/
1314
// 解构URL
1415
const url = new URL($request.url);

src/Manifest.response.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { $app, Console, done, fetch, Lodash as _, notification, Storage, wait } from "@nsnanocat/util";
1+
import { Console, done, fetch, Lodash as _, Storage } from "@nsnanocat/util";
22
import { URL } from "@nsnanocat/url";
33
import M3U8 from "./EXTM3U/EXTM3U.mjs";
44
import AttrList from "./class/AttrList.mjs";
@@ -9,7 +9,6 @@ import isStandard from "./function/isStandard.mjs";
99
import detectPlaylist from "./function/detectPlaylist.mjs";
1010
import setCache from "./function/setCache.mjs";
1111
import aPath from "./function/aPath.mjs";
12-
Console.debug = () => {};
1312
/***************** Processing *****************/
1413
// 解构URL
1514
const url = new URL($request.url);

src/Translate.response.dev.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { $app, Console, done, fetch, Lodash as _, notification, Storage, wait } from "@nsnanocat/util";
1+
import { $app, Console, done, Lodash as _ } from "@nsnanocat/util";
22
import { URL } from "@nsnanocat/url";
33
import XML from "./XML/XML.mjs";
44
import VTT from "./WebVTT/WebVTT.mjs";
@@ -11,6 +11,7 @@ import Translate from "./class/Translate.mjs";
1111
import { BrowseResponse } from "./protobuf/google/protos/youtube/api/innertube/BrowseResponse.js";
1212
import { ColorLyricsResponse } from "./protobuf/spotify/lyrics/Lyrics.js";
1313
import { WireType, UnknownFieldHandler, reflectionMergePartial, MESSAGE_TYPE, MessageType, BinaryReader, isJsonObject, typeofJsonValue, jsonWriteOptions } from "@protobuf-ts/runtime";
14+
Console.logLevel = "DEBUG";
1415
/***************** Processing *****************/
1516
// 解构URL
1617
const url = new URL($request.url);

src/Translate.response.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { $app, Console, done, fetch, Lodash as _, notification, Storage, wait } from "@nsnanocat/util";
1+
import { $app, Console, done, Lodash as _ } from "@nsnanocat/util";
22
import { URL } from "@nsnanocat/url";
33
import XML from "./XML/XML.mjs";
44
import VTT from "./WebVTT/WebVTT.mjs";
@@ -10,7 +10,6 @@ import setCache from "./function/setCache.mjs";
1010
import Translate from "./class/Translate.mjs";
1111
import { BrowseResponse } from "./protobuf/google/protos/youtube/api/innertube/BrowseResponse.js";
1212
import { ColorLyricsResponse } from "./protobuf/spotify/lyrics/Lyrics.js";
13-
Console.debug = () => {};
1413
/***************** Processing *****************/
1514
// 解构URL
1615
const url = new URL($request.url);

0 commit comments

Comments
 (0)