Skip to content

Commit

Permalink
feat: Console
Browse files Browse the repository at this point in the history
  • Loading branch information
VirgilClyne committed Dec 5, 2024
1 parent 0d18d59 commit d23f6c7
Show file tree
Hide file tree
Showing 11 changed files with 315 additions and 345 deletions.
625 changes: 297 additions & 328 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
"node-polyfill-webpack-plugin": "^4.0.0"
},
"dependencies": {
"@nsnanocat/url": "^1.2.3",
"@nsnanocat/util": "^1.6.4",
"@nsnanocat/url": "^1.2.4",
"@nsnanocat/util": "^1.7.5",
"@protobuf-ts/runtime": "^2.9.4",
"crypto-js": "^4.2.0",
"text-encoding": "^0.7.0"
Expand Down
7 changes: 4 additions & 3 deletions src/Composite.Subtitles.response.dev.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { $app, Console, done, fetch, Lodash as _, notification, Storage, wait } from "@nsnanocat/util";
import { Console, done, fetch, Lodash as _ } from "@nsnanocat/util";
import { URL } from "@nsnanocat/url";
import XML from "./XML/XML.mjs";
import VTT from "./WebVTT/WebVTT.mjs";
Expand All @@ -9,6 +9,7 @@ import detectPlatform from "./function/detectPlatform.mjs";
import setCache from "./function/setCache.mjs";
import constructSubtitlesQueue from "./function/constructSubtitlesQueue.mjs";
import Composite from "./class/Composite.mjs";
Console.logLevel = "DEBUG";
/***************** Processing *****************/
// 解构URL
const url = new URL($request.url);
Expand Down Expand Up @@ -190,11 +191,11 @@ Console.info(`FORMAT: ${FORMAT}`);
case "application/grpc+proto":
case "application/octet-stream": {
//Console.debug(`$response.body: ${JSON.stringify($response.body)}`);
let rawBody = $app === "Quantumult X" ? new Uint8Array($response.bodyBytes ?? []) : ($response.body ?? new Uint8Array());
//let rawBody = $app === "Quantumult X" ? new Uint8Array($response.bodyBytes ?? []) : ($response.body ?? new Uint8Array());
//Console.debug(`isBuffer? ${ArrayBuffer.isView(rawBody)}: ${JSON.stringify(rawBody)}`);
// 写入二进制数据
//Console.debug(`rawBody: ${JSON.stringify(rawBody)}`);
$response.body = rawBody;
//$response.body = rawBody;
break;
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/Composite.Subtitles.response.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { $app, Console, done, fetch, Lodash as _, notification, Storage, wait } from "@nsnanocat/util";
import { Console, done, fetch, Lodash as _ } from "@nsnanocat/util";
import { URL } from "@nsnanocat/url";
import XML from "./XML/XML.mjs";
import VTT from "./WebVTT/WebVTT.mjs";
Expand All @@ -9,7 +9,6 @@ import detectPlatform from "./function/detectPlatform.mjs";
import setCache from "./function/setCache.mjs";
import constructSubtitlesQueue from "./function/constructSubtitlesQueue.mjs";
import Composite from "./class/Composite.mjs";
Console.debug = () => {};
/***************** Processing *****************/
// 解构URL
const url = new URL($request.url);
Expand Down
3 changes: 2 additions & 1 deletion src/External.Lyrics.response.dev.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { $app, Console, done, fetch, Lodash as _, notification, Storage, wait } from "@nsnanocat/util";
import { $app, Console, done, fetch, Lodash as _, Storage } from "@nsnanocat/util";
import LRC from "./LRC/LRC.mjs";
import database from "./database/index.mjs";
import setENV from "./function/setENV.mjs";
import detectPlatform from "./function/detectPlatform.mjs";
import setCache from "./function/setCache.mjs";
import { BrowseResponse } from "./protobuf/google/protos/youtube/api/innertube/BrowseResponse.js";
import { ColorLyricsResponse } from "./protobuf/spotify/lyrics/Lyrics.js";
Console.logLevel = "DEBUG";
/***************** Processing *****************/
// 解构URL
const url = new URL($request.url);
Expand Down
3 changes: 1 addition & 2 deletions src/External.Lyrics.response.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { $app, Console, done, fetch, Lodash as _, notification, Storage, wait } from "@nsnanocat/util";
import { $app, Console, done, fetch, Lodash as _, Storage } from "@nsnanocat/util";
import LRC from "./LRC/LRC.mjs";
import database from "./database/index.mjs";
import setENV from "./function/setENV.mjs";
import detectPlatform from "./function/detectPlatform.mjs";
import setCache from "./function/setCache.mjs";
import { BrowseResponse } from "./protobuf/google/protos/youtube/api/innertube/BrowseResponse.js";
import { ColorLyricsResponse } from "./protobuf/spotify/lyrics/Lyrics.js";
Console.debug = () => {};
/***************** Processing *****************/
// 解构URL
const url = new URL($request.url);
Expand Down
3 changes: 2 additions & 1 deletion src/External.Subtitles.response.dev.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { $app, Console, done, fetch, Lodash as _, notification, Storage, wait } from "@nsnanocat/util";
import { Console, done, fetch, Lodash as _ } from "@nsnanocat/util";
import { URL } from "@nsnanocat/url";
import XML from "./XML/XML.mjs";
import VTT from "./WebVTT/WebVTT.mjs";
Expand All @@ -7,6 +7,7 @@ import setENV from "./function/setENV.mjs";
import detectFormat from "./function/detectFormat.mjs";
import detectPlatform from "./function/detectPlatform.mjs";
import Composite from "./function/Composite.mjs";
Console.logLevel = "DEBUG";
/***************** Processing *****************/
// 解构URL
const url = new URL($request.url);
Expand Down
3 changes: 2 additions & 1 deletion src/Manifest.response.dev.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { $app, Console, done, fetch, Lodash as _, notification, Storage, wait } from "@nsnanocat/util";
import { Console, done, fetch, Lodash as _, Storage } from "@nsnanocat/util";
import { URL } from "@nsnanocat/url";
import M3U8 from "./EXTM3U/EXTM3U.mjs";
import AttrList from "./class/AttrList.mjs";
Expand All @@ -9,6 +9,7 @@ import isStandard from "./function/isStandard.mjs";
import detectPlaylist from "./function/detectPlaylist.mjs";
import setCache from "./function/setCache.mjs";
import aPath from "./function/aPath.mjs";
Console.logLevel = "DEBUG";
/***************** Processing *****************/
// 解构URL
const url = new URL($request.url);
Expand Down
3 changes: 1 addition & 2 deletions src/Manifest.response.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { $app, Console, done, fetch, Lodash as _, notification, Storage, wait } from "@nsnanocat/util";
import { Console, done, fetch, Lodash as _, Storage } from "@nsnanocat/util";
import { URL } from "@nsnanocat/url";
import M3U8 from "./EXTM3U/EXTM3U.mjs";
import AttrList from "./class/AttrList.mjs";
Expand All @@ -9,7 +9,6 @@ import isStandard from "./function/isStandard.mjs";
import detectPlaylist from "./function/detectPlaylist.mjs";
import setCache from "./function/setCache.mjs";
import aPath from "./function/aPath.mjs";
Console.debug = () => {};
/***************** Processing *****************/
// 解构URL
const url = new URL($request.url);
Expand Down
3 changes: 2 additions & 1 deletion src/Translate.response.dev.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { $app, Console, done, fetch, Lodash as _, notification, Storage, wait } from "@nsnanocat/util";
import { $app, Console, done, Lodash as _ } from "@nsnanocat/util";
import { URL } from "@nsnanocat/url";
import XML from "./XML/XML.mjs";
import VTT from "./WebVTT/WebVTT.mjs";
Expand All @@ -11,6 +11,7 @@ import Translate from "./class/Translate.mjs";
import { BrowseResponse } from "./protobuf/google/protos/youtube/api/innertube/BrowseResponse.js";
import { ColorLyricsResponse } from "./protobuf/spotify/lyrics/Lyrics.js";
import { WireType, UnknownFieldHandler, reflectionMergePartial, MESSAGE_TYPE, MessageType, BinaryReader, isJsonObject, typeofJsonValue, jsonWriteOptions } from "@protobuf-ts/runtime";
Console.logLevel = "DEBUG";
/***************** Processing *****************/
// 解构URL
const url = new URL($request.url);
Expand Down
3 changes: 1 addition & 2 deletions src/Translate.response.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { $app, Console, done, fetch, Lodash as _, notification, Storage, wait } from "@nsnanocat/util";
import { $app, Console, done, Lodash as _ } from "@nsnanocat/util";
import { URL } from "@nsnanocat/url";
import XML from "./XML/XML.mjs";
import VTT from "./WebVTT/WebVTT.mjs";
Expand All @@ -10,7 +10,6 @@ import setCache from "./function/setCache.mjs";
import Translate from "./class/Translate.mjs";
import { BrowseResponse } from "./protobuf/google/protos/youtube/api/innertube/BrowseResponse.js";
import { ColorLyricsResponse } from "./protobuf/spotify/lyrics/Lyrics.js";
Console.debug = () => {};
/***************** Processing *****************/
// 解构URL
const url = new URL($request.url);
Expand Down

0 comments on commit d23f6c7

Please sign in to comment.