This commit is contained in:
Cris Stringfellow 2021-12-10 17:31:15 +08:00
parent 9478a93729
commit 6c4c787604
3 changed files with 1935 additions and 227 deletions

View File

@ -202,7 +202,6 @@ async function collect({chrome_port:port, mode} = {}) {
} }
Installations.add(targetId); Installations.add(targetId);
} else if ( ConfirmedInstalls.has(sessionId) ) { } else if ( ConfirmedInstalls.has(sessionId) ) {
DEBUG && console.log("Already confirmed install", targetId, url); DEBUG && console.log("Already confirmed install", targetId, url);
} }
@ -218,6 +217,7 @@ async function collect({chrome_port:port, mode} = {}) {
State.Index.set(info.url, info.title); State.Index.set(info.url, info.title);
if ( Installations.has(info.targetId) ) { if ( Installations.has(info.targetId) ) {
console.log('hi');
const sessionId = Sessions.get(info.targetId); const sessionId = Sessions.get(info.targetId);
send("DOM.enable", {}, sessionId); send("DOM.enable", {}, sessionId);
@ -250,7 +250,10 @@ async function collect({chrome_port:port, mode} = {}) {
} }
}); });
} }
Flex.updateAsync(info.url, pageText); //Flex.updateAsync(info.url, pageText).then(r => console.log('Search index update done'));
//Flex.addAsync(info.url, pageText).then(r => console.log('Search index update done'));
const res = Flex.add(info.url, pageText);
console.log(res);
} }
console.log(`Indexed ${info.url} to ${info.title}`); console.log(`Indexed ${info.url} to ${info.title}`);

2142
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,21 +1,22 @@
{ {
"name": "archivist1", "name": "archivist1",
"type": "module",
"version": "1.3.15", "version": "1.3.15",
"description": "Library server and an archivist browser controller.", "description": "Library server and an archivist browser controller.",
"main": "index.js", "main": "app.js",
"module": "app.js", "module": "app.js",
"bin": { "bin": {
"archivist1": "22120.js" "archivist1": "22120.js"
}, },
"scripts": { "scripts": {
"start": "node index.js", "start": "node app.js",
"postinstall": "bash ./build_setup.sh", "postinstall": "bash ./build_setup.sh",
"build": "bash ./compile.sh", "build": "bash ./compile.sh",
"clean": "rm 22120.js *22120.js 22120.???", "clean": "rm 22120.js *22120.js 22120.???",
"pack": "upx 22120.exe && upx 22120.nix && upx 22120.mac && upx 22120.win32.exe && upx 22120.nix32", "pack": "upx 22120.exe && upx 22120.nix && upx 22120.mac && upx 22120.win32.exe && upx 22120.nix32",
"test": "node-dev index.js", "test": "nodemon app.js",
"save": "node-dev index.js 22120 save", "save": "nodemon app.js 22120 save",
"serve": "node-dev index.js 22120 serve" "serve": "nodemon app.js 22120 serve"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@ -42,7 +43,7 @@
}, },
"devDependencies": { "devDependencies": {
"nexe": "latest", "nexe": "latest",
"node-dev": "latest", "nodemon": "^2.0.15",
"npx": "latest", "npx": "latest",
"webpack": "latest", "webpack": "latest",
"webpack-cli": "latest" "webpack-cli": "latest"