这个提交包含在:
2020-04-29 15:52:39 +08:00
父节点 fd156e356e
当前提交 1486c2d7c5
共有 17 个文件被更改,包括 441 次插入 和 100 次删除

1
.gitignore vendored
查看文件

@ -1,6 +1,7 @@
#OnlineAI #OnlineAI
!\Addons\List.json !\Addons\List.json
*.json *.json
!\API\Using\**
!List.json !List.json
!package.json !package.json
!package-lock.json !package-lock.json

22
API/Main.js 普通文件
查看文件

@ -0,0 +1,22 @@
"use strict";
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
var 利刃 = __importStar(require("./Public"));
var Core = __importStar(require("./../Core"));
var Debug = require("./../Debug");
Core.AddListener(function (Connect, Info) {
if (Info.message == "更新利刃" && Debug.add.Interfaces.IsAdmin(Info.user_id)) {
利刃.更新API();
Core.frame.SendMsg(Connect, Info, "[利刃后端]更新成功!");
}
var 利刃Ret = 利刃.核心(Info);
if (利刃Ret != "") {
Core.frame.SendMsg(Connect, Info, 利刃Ret);
}
});

13
API/Main.ts 普通文件
查看文件

@ -0,0 +1,13 @@
import * as 利刃 from "./Public";
import * as Core from "./../Core";
const Debug = require("./../Debug");
Core.AddListener((Connect,Info)=>{
if(Info.message == "更新利刃" && Debug.add.Interfaces.IsAdmin(Info.user_id)){
利刃.更新API();
Core.frame.SendMsg(Connect,Info,"[利刃后端]更新成功!")
}
var 利刃Ret = 利刃.核心(Info);
if(利刃Ret != ""){
Core.frame.SendMsg(Connect,Info,利刃Ret);
}
});

87
API/Public.js 普通文件
查看文件

@ -0,0 +1,87 @@
"use strict";
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
/**
* <利刃后端>
* 介绍:本后端提供了全新的中文编程方式,
*/
var fs = __importStar(require("fs"));
var APIs = [];
var API = {};
API.Base = {
Const: {},
Function: {}
};
API.Config = {
Name: "[USING NAMESPACE]",
Author: "OnlineAi"
};
API.Using = {};
exports.更新API = (function () {
APIs = [];
fs.readdir("./API/Using/", function (err, files) {
for (var i = 0; i < files.length; i++) {
fs.readFile("./API/Using/" + files[i], function (err, data) {
APIs[APIs.length] = JSON.parse(data.toString());
APIs.forEach(function (OAPI) {
Object.keys(OAPI.Base.Const).forEach(function (Keys) {
API.Base.Const[Keys] = OAPI.Base.Const[Keys];
});
Object.keys(OAPI.Base.Function).forEach(function (Keys) {
API.Base.Function[Keys] = OAPI.Base.Function[Keys];
});
Object.keys(OAPI.Using).forEach(function (Keys) {
API.Using[Keys] = OAPI.Using[Keys];
});
});
});
}
});
});
exports.更新API();
exports.解析 = (function (内容, 收到) {
var 返回 = 内容;
var ConstKeys = Object.keys(API.Base.Const);
ConstKeys.forEach(function (Key) {
返回 = 返回.replace(new RegExp("\\[" + Key + "\\]", "g"), eval(API.Base.Const[Key]));
});
var FunctionKeys = Object.keys(API.Base.Function);
// 函数预判
FunctionKeys.forEach(function (Key) {
返回 = 返回.replace(new RegExp("\\[" + Key + " ", "g"), "{" + Key + " ");
});
if (返回.indexOf("[") != -1) {
return "[ERR]DISALLOW CALLING FUNCTIONS OR CONSTS WITHOUT DEFINIE";
}
返回 = 返回.replace(/\{/g, "[");
FunctionKeys.forEach(function (Key) {
var Function = new RegExp("^\\[" + Key + " (.*?)\\]$");
Function.exec(返回.valueOf());
var 处理 = RegExp.$1;
if (处理.indexOf("[") != -1) {
处理 = exports.解析(处理, 收到);
}
返回 = 返回.replace(Function, eval(API.Base.Function[Key] + "(\"" + 处理 + "\",\u6536\u5230)"));
});
return 返回;
});
exports.核心 = (function (收到) {
var 内容 = 收到.message;
var 消息 = "";
Object.keys(API.Using).forEach(function (value) {
if (new RegExp("^" + value + "$").test(内容.valueOf())) {
var 过程 = API.Using[value];
消息 = 过程.Content;
过程.Execute.forEach(function (v, i) {
消息 = 消息.replace(new RegExp("\\{" + i + "\\}", "g"), exports.解析(v, 收到).valueOf());
});
}
});
return 消息;
});

80
API/Public.ts 普通文件
查看文件

@ -0,0 +1,80 @@
/**
* <利刃后端>
* 介绍:本后端提供了全新的中文编程方式,
*/
import * as fs from "fs";
import * as Core from "./../Core"
var APIs:Addons[] = [];
var API:Addons = {} as any;
API.Base = {
Const:{},
Function:{}
}
API.Config = {
Name:"[USING NAMESPACE]",
Author:"OnlineAi"
}
API.Using = {}
export var 更新API = (()=>{
APIs = [];
fs.readdir("./API/Using/",(err,files)=>{
for(var i = 0;i < files.length ; i++){
fs.readFile(`./API/Using/${files[i]}`,(err,data)=>{
APIs[APIs.length] = JSON.parse(data.toString()) as Addons;
APIs.forEach((OAPI)=>{
Object.keys(OAPI.Base.Const).forEach((Keys)=>{
API.Base.Const[Keys] = OAPI.Base.Const[Keys];
});
Object.keys(OAPI.Base.Function).forEach((Keys)=>{
API.Base.Function[Keys] = OAPI.Base.Function[Keys];
})
Object.keys(OAPI.Using).forEach((Keys)=>{
API.Using[Keys] = OAPI.Using[Keys];
})
})
});
}
});
});
更新API();
export var 解析:((内容:String,收到:Core.InfoType)=> String) = ((内容,收到)=>{
var 返回 = 内容;
var ConstKeys = Object.keys(API.Base.Const);
ConstKeys.forEach((Key)=>{
返回 = 返回.replace(new RegExp(`\\[${Key}\\]`,"g"),eval(API.Base.Const[Key]));
});
var FunctionKeys = Object.keys(API.Base.Function);
// 函数预判
FunctionKeys.forEach((Key)=>{
返回 = 返回.replace(new RegExp(`\\[${Key} `,"g"),`{${Key} `);
})
if(返回.indexOf("[")!=-1){
return "[ERR]DISALLOW CALLING FUNCTIONS OR CONSTS WITHOUT DEFINIE"
}
返回 = 返回.replace(/\{/g,"[");
FunctionKeys.forEach((Key)=>{
var Function = new RegExp(`^\\[${Key} (.*?)\\]$`);
Function.exec(返回.valueOf());
var 处理 = RegExp.$1 as String;
if(处理.indexOf("[") != -1){
处理 = 解析(处理,收到);
}
返回 = 返回.replace(Function,eval(`${API.Base.Function[Key]}("${处理}",收到)`));
})
return 返回;
});
export var 核心:((收到:Core.InfoType)=>String) = ((收到:Core.InfoType)=>{
var 内容:String = 收到.message;
var 消息:String = "";
Object.keys(API.Using).forEach((value)=>{
if(new RegExp(`^${value}$`).test(内容.valueOf())){
var 过程 = (API.Using[value] as AddonsUsing)
消息 = 过程.Content;
过程.Execute.forEach((v,i)=>{
消息 = 消息.replace(new RegExp(`\\{${i}\\}`,"g"),解析(v,收到).valueOf());
});
}
})
return 消息;
});

6
API/TestCore.js 普通文件
查看文件

@ -0,0 +1,6 @@
"use strict";
var E = /^\[(.*?)\]$/g;
var S = "[A[BC]]";
E.exec(S);
console.log(RegExp.$1);
console.log(RegExp.$2);

5
API/TestCore.ts 普通文件
查看文件

@ -0,0 +1,5 @@
var E = /^\[(.*?)\]$/g;
var S = "[A[BC]]"
E.exec(S);
console.log(RegExp.$1);
console.log(RegExp.$2);

17
API/lib.d.ts vendored 普通文件
查看文件

@ -0,0 +1,17 @@
declare interface Addons{
Config:AddonsConfig,
Base:AddonsBase,
Using:any;
}
declare interface AddonsConfig{
Name:String,
Author:String
}
declare interface AddonsBase{
Const:any,
Function:any;
}
declare interface AddonsUsing{
Content:String,
Execute:Array<String>;
}

63
API/tsconfig.json 普通文件
查看文件

@ -0,0 +1,63 @@
{
"compilerOptions": {
/* Basic Options */
// "incremental": true, /* Enable incremental compilation */
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
// "lib": [], /* Specify library files to be included in the compilation. */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
// "declaration": true, /* Generates corresponding '.d.ts' file. */
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
// "sourceMap": true, /* Generates corresponding '.map' file. */
// "outFile": "./", /* Concatenate and emit output to single file. */
// "outDir": "./", /* Redirect output structure to the directory. */
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
// "composite": true, /* Enable project compilation */
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
// "removeComments": true, /* Do not emit comments to output. */
// "noEmit": true, /* Do not emit outputs. */
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
/* Strict Type-Checking Options */
"strict": true, /* Enable all strict type-checking options. */
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
// "strictNullChecks": true, /* Enable strict null checks. */
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
/* Additional Checks */
// "noUnusedLocals": true, /* Report errors on unused locals. */
// "noUnusedParameters": true, /* Report errors on unused parameters. */
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
/* Module Resolution Options */
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
// "types": [], /* Type declaration files to be included in compilation. */
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
/* Source Map Options */
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
/* Experimental Options */
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
}
}

查看文件

@ -1,24 +0,0 @@
//Red Alert For OnlineAi Core
import * as Core from "./Core";
import * as fs from "fs";
var CrossGroup: Array<Number> = [];
Core.AddListener((connect, info) => {
console.log(CrossGroup);
console.log(info);
if (info.group_id == undefined) {
return;
};
if (info.message == "abcde") {
CrossGroup[CrossGroup.length] = info.group_id as number;
Core.frame.SendMsg(connect, info, "已开启跨群");
};
var Root = info;
if (true) {
CrossGroup.forEach((value, index) => {
if (value != info.group_id as number && value != 0) {
Root.group_id = value;
Core.frame.SendMsg(connect, Root, `本消息来自群${info.group_id}的${info.user_id}:${info.message}。\\r\\nAi仅供传达。`);
}
});
}
});

查看文件

@ -160,13 +160,13 @@ exports.frame={
exports.frame.SendMsg(connect,info,`当前,Ai在本群处于${exports.frame.ReadSystemConfig("AIEnable")[info.group_id] == true}状态`); exports.frame.SendMsg(connect,info,`当前,Ai在本群处于${exports.frame.ReadSystemConfig("AIEnable")[info.group_id] == true}状态`);
} }
if(info.message == "授权启用Ai服务" &&( info.sender.role == "owner" || info.sender.role == "admin")){ if(info.message == "授权启用Ai服务" &&( info.sender.role == "owner" || info.sender.role == "admin" || require("./Debug.js").add.Interfaces.IsAdmin(info.user_id))){
var AEdata = exports.frame.ReadSystemConfig("AIEnable"); var AEdata = exports.frame.ReadSystemConfig("AIEnable");
AEdata[info.group_id] = true; AEdata[info.group_id] = true;
exports.frame.WriteSystemConfig("AIEnable",AEdata); exports.frame.WriteSystemConfig("AIEnable",AEdata);
exports.frame.SendMsg(connect,info,"已启用Ai"); exports.frame.SendMsg(connect,info,"已启用Ai");
} }
if(info.message == "逆向启用Ai服务" &&( info.sender.role == "owner" || info.sender.role == "admin")){ if(info.message == "逆向启用Ai服务" &&( info.sender.role == "owner" || info.sender.role == "admin" || require("./Debug.js").add.Interfaces.IsAdmin(info.user_id))){
var AEdata = exports.frame.ReadSystemConfig("AIEnable"); var AEdata = exports.frame.ReadSystemConfig("AIEnable");
AEdata[info.group_id] = false; AEdata[info.group_id] = false;
exports.frame.WriteSystemConfig("AIEnable",AEdata); exports.frame.WriteSystemConfig("AIEnable",AEdata);

查看文件

@ -33,5 +33,10 @@
"Allow":true, "Allow":true,
"FindIn":"fs", "FindIn":"fs",
"Path":"./保镖.js" "Path":"./保镖.js"
},
"利刃":{
"Allow":true,
"FindIn":"fs",
"Path":"./API/Main.js"
} }
} }

16
Test.ts
查看文件

@ -1,16 +0,0 @@
import * as Core from "./Core";
var ZExec:((Str:string)=>string) = ((Str)=>{return ""});
((R:RegExpConstructor,Info:Core.InfoType)=>{
if(R.$1.indexOf("则")==-1){
return "行动缺失";
}
var k = R.$1.split("则",2);
console.log(`k:${k}k`);
console.log(`${R.$1}`);
console.log(ZExec(k[0]));
console.log(eval(ZExec(k[1])));
if(eval(ZExec(k[0]))){
console.log(ZExec(k[1]));
return eval(ZExec(k[1]));
};
})(RegExp,new Core.InfoType());

查看文件

@ -22,6 +22,9 @@ ServerWeb.on("listening", () => {
UserSock.on("data", (data) => { UserSock.on("data", (data) => {
if (data.toString().indexOf(" ") != 0) { if (data.toString().indexOf(" ") != 0) {
var path = data.toString().split(" "); var path = data.toString().split(" ");
if (path == undefined) {
return;
}
if (path[1] == "/") { if (path[1] == "/") {
fs.readFile("./WebUI.html", (err, data) => { fs.readFile("./WebUI.html", (err, data) => {
UserSock.write(`HTTP/1.1 200 OK\r\nContent-Length: ${data.length}\r\n\r\n`); UserSock.write(`HTTP/1.1 200 OK\r\nContent-Length: ${data.length}\r\n\r\n`);
@ -99,7 +102,7 @@ ServerWeb.on("listening", () => {
}); });
}); });
}); });
ServerWeb.listen(8081, "0.0.0.0"); ServerWeb.listen(8081, "127.0.0.1");
Core.AddListener((connect, Info) => { Core.AddListener((connect, Info) => {
MessageCount = MessageCount.valueOf() + 1; MessageCount = MessageCount.valueOf() + 1;
}); });

查看文件

@ -13,6 +13,9 @@ ServerWeb.on("listening",()=>{
UserSock.on("data",(data)=>{ UserSock.on("data",(data)=>{
if(data.toString().indexOf(" ")!=0){ if(data.toString().indexOf(" ")!=0){
var path = data.toString().split(" "); var path = data.toString().split(" ");
if(path == undefined){
return;
}
if(path[1]=="/"){ if(path[1]=="/"){
fs.readFile("./WebUI.html",(err,data)=>{ fs.readFile("./WebUI.html",(err,data)=>{
UserSock.write(`HTTP/1.1 200 OK\r\nContent-Length: ${data.length}\r\n\r\n`); UserSock.write(`HTTP/1.1 200 OK\r\nContent-Length: ${data.length}\r\n\r\n`);
@ -83,7 +86,7 @@ ServerWeb.on("listening",()=>{
}) })
}); });
}); });
ServerWeb.listen(8081,"0.0.0.0"); ServerWeb.listen(8081,"127.0.0.1");
Core.AddListener((connect:Core.InfoSocket,Info:Core.InfoType)=>{ Core.AddListener((connect:Core.InfoSocket,Info:Core.InfoType)=>{
MessageCount = MessageCount.valueOf() + 1; MessageCount = MessageCount.valueOf() + 1;
}) })

182
package-lock.json 自动生成的
查看文件

@ -60,6 +60,35 @@
"requires": { "requires": {
"delegates": "^1.0.0", "delegates": "^1.0.0",
"readable-stream": "^2.0.6" "readable-stream": "^2.0.6"
},
"dependencies": {
"readable-stream": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": {
"safe-buffer": "~5.1.0"
}
}
} }
}, },
"asn1": { "asn1": {
@ -127,11 +156,24 @@
"resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz", "resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz",
"integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==" "integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g=="
}, },
"buffer-crc32": {
"version": "0.2.13",
"resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
"integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI="
},
"buffer-from": { "buffer-from": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
"integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A=="
}, },
"bufferutil": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.1.tgz",
"integrity": "sha512-xowrxvpxojqkagPcWRQVXZl0YXhRhAtBEIq3VoER1NH5Mw1n1o0ojdspp+GS2J//2gCVyrzQDApQ4unGF+QOoA==",
"requires": {
"node-gyp-build": "~3.7.0"
}
},
"canvas": { "canvas": {
"version": "2.6.1", "version": "2.6.1",
"resolved": "https://registry.npmjs.org/canvas/-/canvas-2.6.1.tgz", "resolved": "https://registry.npmjs.org/canvas/-/canvas-2.6.1.tgz",
@ -206,6 +248,35 @@
"inherits": "^2.0.3", "inherits": "^2.0.3",
"readable-stream": "^2.2.2", "readable-stream": "^2.2.2",
"typedarray": "^0.0.6" "typedarray": "^0.0.6"
},
"dependencies": {
"readable-stream": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": {
"safe-buffer": "~5.1.0"
}
}
} }
}, },
"console-control-strings": { "console-control-strings": {
@ -335,14 +406,14 @@
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
}, },
"extract-zip": { "extract-zip": {
"version": "1.6.7", "version": "1.7.0",
"resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.7.tgz", "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.7.0.tgz",
"integrity": "sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k=", "integrity": "sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA==",
"requires": { "requires": {
"concat-stream": "1.6.2", "concat-stream": "^1.6.2",
"debug": "2.6.9", "debug": "^2.6.9",
"mkdirp": "0.5.1", "mkdirp": "^0.5.4",
"yauzl": "2.4.1" "yauzl": "^2.10.0"
} }
}, },
"extsprintf": { "extsprintf": {
@ -361,9 +432,9 @@
"integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="
}, },
"fd-slicer": { "fd-slicer": {
"version": "1.0.1", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
"integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=", "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=",
"requires": { "requires": {
"pend": "~1.2.0" "pend": "~1.2.0"
} }
@ -674,9 +745,9 @@
} }
}, },
"minimist": { "minimist": {
"version": "0.0.8", "version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
}, },
"minipass": { "minipass": {
"version": "2.9.0", "version": "2.9.0",
@ -696,11 +767,11 @@
} }
}, },
"mkdirp": { "mkdirp": {
"version": "0.5.1", "version": "0.5.5",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "^1.2.5"
} }
}, },
"ms": { "ms": {
@ -769,6 +840,11 @@
"which": "^1.3.1" "which": "^1.3.1"
} }
}, },
"node-gyp-build": {
"version": "3.7.0",
"resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-3.7.0.tgz",
"integrity": "sha512-L/Eg02Epx6Si2NXmedx+Okg+4UHqmaf3TNcxd50SF9NQGcJaON3AtU++kax69XV7YWz4tUspqZSAsVofhFKG2w=="
},
"node-pre-gyp": { "node-pre-gyp": {
"version": "0.14.0", "version": "0.14.0",
"resolved": "https://registry.npm.taobao.org/node-pre-gyp/download/node-pre-gyp-0.14.0.tgz", "resolved": "https://registry.npm.taobao.org/node-pre-gyp/download/node-pre-gyp-0.14.0.tgz",
@ -958,6 +1034,14 @@
"version": "2.1.2", "version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"ws": {
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz",
"integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==",
"requires": {
"async-limiter": "~1.0.0"
}
} }
} }
}, },
@ -990,24 +1074,13 @@
} }
}, },
"readable-stream": { "readable-stream": {
"version": "2.3.7", "version": "3.6.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
"requires": { "requires": {
"core-util-is": "~1.0.0", "inherits": "^2.0.3",
"inherits": "~2.0.3", "string_decoder": "^1.1.1",
"isarray": "~1.0.0", "util-deprecate": "^1.0.1"
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
},
"dependencies": {
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}
} }
}, },
"rebuild": { "rebuild": {
@ -1125,18 +1198,11 @@
} }
}, },
"string_decoder": { "string_decoder": {
"version": "1.1.1", "version": "1.3.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
"requires": { "requires": {
"safe-buffer": "~5.1.0" "safe-buffer": "~5.2.0"
},
"dependencies": {
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}
} }
}, },
"strip-ansi": { "strip-ansi": {
@ -1225,6 +1291,14 @@
"punycode": "^2.1.0" "punycode": "^2.1.0"
} }
}, },
"utf-8-validate": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.2.tgz",
"integrity": "sha512-SwV++i2gTD5qh2XqaPzBnNX88N6HdyhQrNNRykvcS0QKvItV9u3vPEJr+X5Hhfb1JC0r0e1alL0iB09rY8+nmw==",
"requires": {
"node-gyp-build": "~3.7.0"
}
},
"util-deprecate": { "util-deprecate": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
@ -1284,12 +1358,9 @@
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
}, },
"ws": { "ws": {
"version": "6.2.1", "version": "7.2.5",
"resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", "resolved": "https://registry.npmjs.org/ws/-/ws-7.2.5.tgz",
"integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", "integrity": "sha512-C34cIU4+DB2vMyAbmEKossWq2ZQDr6QEyuuCzWrM9zfw1sGc0mYiJ0UnG9zzNykt49C2Fi34hvr2vssFQRS6EA=="
"requires": {
"async-limiter": "~1.0.0"
}
}, },
"yaeti": { "yaeti": {
"version": "0.0.6", "version": "0.0.6",
@ -1302,11 +1373,12 @@
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
}, },
"yauzl": { "yauzl": {
"version": "2.4.1", "version": "2.10.0",
"resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
"integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=", "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=",
"requires": { "requires": {
"fd-slicer": "~1.0.1" "buffer-crc32": "~0.2.3",
"fd-slicer": "~1.1.0"
} }
} }
} }

查看文件

@ -8,15 +8,19 @@
"@types/puppeteer": "^2.0.1", "@types/puppeteer": "^2.0.1",
"atob": "^2.1.2", "atob": "^2.1.2",
"btoa": "^1.2.1", "btoa": "^1.2.1",
"bufferutil": "^4.0.1",
"canvas": "^2.6.1", "canvas": "^2.6.1",
"gyp": "^0.5.0", "gyp": "^0.5.0",
"iconv-lite": "^0.5.1", "iconv-lite": "^0.5.1",
"node-gyp": "^6.1.0", "node-gyp": "^6.1.0",
"node-pre-gyp": "^0.14.0", "node-pre-gyp": "^0.14.0",
"puppeteer-core": "^2.1.1", "puppeteer-core": "^2.1.1",
"readable-stream": "^3.6.0",
"rebuild": "^0.1.2", "rebuild": "^0.1.2",
"request": "^2.88.2", "request": "^2.88.2",
"websocket": "^1.0.31" "utf-8-validate": "^5.0.2",
"websocket": "^1.0.31",
"ws": "^7.2.5"
}, },
"devDependencies": { "devDependencies": {
"typescript": "^3.8.3" "typescript": "^3.8.3"