"Sketched file variants between dev and build
- only packag.ejson and src/common.js need to change and it's only minor"
This commit is contained in:
parent
51301b9fde
commit
567838b582
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
"name": "archivist1",
|
||||
"version": "2.1.1",
|
||||
"description": "Library server and an archivist browser controller.",
|
||||
"main": "src/app.js",
|
||||
"module": "src/app.js",
|
||||
"bin": {
|
||||
"archivist1": "build/22120.js"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "node src/app.js",
|
||||
"setup": "bash ./scripts/build_setup.sh",
|
||||
"build": "echo 'please run ./scripts/build_setup.sh first (one time only) and then ./scripts/compile.sh'",
|
||||
"clean": "rm -rf build/* bin/*",
|
||||
"test": "nodemon src/app.js",
|
||||
"save": "nodemon src/app.js 22120 save",
|
||||
"serve": "nodemon src/app.js 22120 serve",
|
||||
"lint": "watch -n 5 npx eslint .",
|
||||
"test-hl": "node src/highlighter.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/dosyago/22120.git"
|
||||
},
|
||||
"pkg": {
|
||||
"scripts": "build/*.js",
|
||||
"assets": "public/**/*",
|
||||
"outputPath": "bin"
|
||||
},
|
||||
"keywords": [
|
||||
"archivist",
|
||||
"library"
|
||||
],
|
||||
"author": "@dosy",
|
||||
"license": "AGPL-3.0",
|
||||
"bugs": {
|
||||
"url": "https://github.com/dosyago/22120/issues"
|
||||
},
|
||||
"homepage": "https://github.com/dosyago/22120#readme",
|
||||
"dependencies": {
|
||||
"autosuggest-highlight": "^3.2.0",
|
||||
"chrome-launcher": "latest",
|
||||
"express": "latest",
|
||||
"flexsearch": "^0.7.21",
|
||||
"fz-search": "^1.0.0",
|
||||
"hasha": "latest",
|
||||
"natural": "^5.1.11",
|
||||
"ndx": "^1.0.2",
|
||||
"ndx-query": "^1.0.1",
|
||||
"ndx-serializable": "^1.0.0",
|
||||
"node-fetch": "latest",
|
||||
"ukkonen": "^1.4.0",
|
||||
"ws": "latest"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.4.1",
|
||||
"esm": "^3.2.25",
|
||||
"nexe": "^1.1.6",
|
||||
"nodemon": "latest",
|
||||
"npx": "^3.0.0",
|
||||
"webpack": "latest",
|
||||
"webpack-cli": "latest"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
{
|
||||
"name": "archivist1",
|
||||
"version": "2.1.1",
|
||||
"type": "module",
|
||||
"description": "Library server and an archivist browser controller.",
|
||||
"main": "src/app.js",
|
||||
"module": "src/app.js",
|
||||
"bin": {
|
||||
"archivist1": "build/22120.js"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "node src/app.js",
|
||||
"setup": "bash ./scripts/build_setup.sh",
|
||||
"build": "echo 'please run ./scripts/build_setup.sh first (one time only) and then ./scripts/compile.sh'",
|
||||
"clean": "rm -rf build/* bin/*",
|
||||
"test": "nodemon src/app.js",
|
||||
"save": "nodemon src/app.js 22120 save",
|
||||
"serve": "nodemon src/app.js 22120 serve",
|
||||
"lint": "watch -n 5 npx eslint .",
|
||||
"test-hl": "node src/highlighter.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/dosyago/22120.git"
|
||||
},
|
||||
"pkg": {
|
||||
"scripts": "build/*.js",
|
||||
"assets": "public/**/*",
|
||||
"outputPath": "bin"
|
||||
},
|
||||
"keywords": [
|
||||
"archivist",
|
||||
"library"
|
||||
],
|
||||
"author": "@dosy",
|
||||
"license": "AGPL-3.0",
|
||||
"bugs": {
|
||||
"url": "https://github.com/dosyago/22120/issues"
|
||||
},
|
||||
"homepage": "https://github.com/dosyago/22120#readme",
|
||||
"dependencies": {
|
||||
"autosuggest-highlight": "^3.2.0",
|
||||
"chrome-launcher": "latest",
|
||||
"express": "latest",
|
||||
"flexsearch": "^0.7.21",
|
||||
"fz-search": "^1.0.0",
|
||||
"hasha": "latest",
|
||||
"natural": "^5.1.11",
|
||||
"ndx": "^1.0.2",
|
||||
"ndx-query": "^1.0.1",
|
||||
"ndx-serializable": "^1.0.0",
|
||||
"node-fetch": "latest",
|
||||
"ukkonen": "^1.4.0",
|
||||
"ws": "latest"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.4.1",
|
||||
"esm": "^3.2.25",
|
||||
"nexe": "^1.1.6",
|
||||
"nodemon": "latest",
|
||||
"npx": "^3.0.0",
|
||||
"webpack": "latest",
|
||||
"webpack-cli": "latest"
|
||||
}
|
||||
}
|
|
@ -7,12 +7,10 @@
|
|||
"": {
|
||||
"name": "archivist1",
|
||||
"version": "2.1.1",
|
||||
"hasInstallScript": true,
|
||||
"license": "AGPL-3.0",
|
||||
"dependencies": {
|
||||
"autosuggest-highlight": "^3.2.0",
|
||||
"chrome-launcher": "latest",
|
||||
"esm": "latest",
|
||||
"express": "latest",
|
||||
"flexsearch": "^0.7.21",
|
||||
"fz-search": "^1.0.0",
|
||||
|
@ -26,10 +24,11 @@
|
|||
"ws": "latest"
|
||||
},
|
||||
"bin": {
|
||||
"exlibris": "build/22120.js"
|
||||
"archivist1": "build/22120.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.4.1",
|
||||
"esm": "^3.2.25",
|
||||
"nexe": "^1.1.6",
|
||||
"nodemon": "latest",
|
||||
"npx": "^3.0.0",
|
||||
|
@ -2103,6 +2102,7 @@
|
|||
"version": "3.2.25",
|
||||
"resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz",
|
||||
"integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
|
@ -9491,7 +9491,8 @@
|
|||
"esm": {
|
||||
"version": "3.2.25",
|
||||
"resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz",
|
||||
"integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA=="
|
||||
"integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==",
|
||||
"dev": true
|
||||
},
|
||||
"espree": {
|
||||
"version": "9.2.0",
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
"dependencies": {
|
||||
"autosuggest-highlight": "^3.2.0",
|
||||
"chrome-launcher": "latest",
|
||||
"esm": "latest",
|
||||
"express": "latest",
|
||||
"flexsearch": "^0.7.21",
|
||||
"fz-search": "^1.0.0",
|
||||
|
@ -56,6 +55,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.4.1",
|
||||
"esm": "^3.2.25",
|
||||
"nexe": "^1.1.6",
|
||||
"nodemon": "latest",
|
||||
"npx": "^3.0.0",
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
import path from 'path';
|
||||
//import {fileURLToPath} from 'url';
|
||||
|
||||
export const DEBUG = process.env.DEBUG_22120 || false;
|
||||
export const SHOW_FETCH = false;
|
||||
|
||||
export const CHECK_INTERVAL = 400;
|
||||
export const TEXT_NODE = 3;
|
||||
export const MAX_HIGHLIGHTABLE_LENGTH = 0; /* 0 is no max length for highlight */
|
||||
export const MAX_TITLE_LENGTH = 140;
|
||||
export const MAX_URL_LENGTH = 140;
|
||||
export const MAX_HEAD = 140;
|
||||
|
||||
/* text nodes inside these elements that are ignored */
|
||||
export const FORBIDDEN_TEXT_PARENT = new Set([
|
||||
'STYLE',
|
||||
'SCRIPT',
|
||||
'NOSCRIPT',
|
||||
/* we could remove these last two so as to index them as well */
|
||||
'DATALIST',
|
||||
'OPTION'
|
||||
]);
|
||||
export const ERROR_CODE_SAFE_TO_IGNORE = new Set([
|
||||
-32000, /* message:
|
||||
Can only get response body on requests captured after headers received.
|
||||
* ignore because:
|
||||
seems to only happen when new navigation aborts all
|
||||
pending requests of the unloading page
|
||||
*/
|
||||
-32602, /* message:
|
||||
Invalid InterceptionId.
|
||||
* ignore because:
|
||||
seems to only happen when new navigation aborts all
|
||||
pending requests of the unloading page
|
||||
*/
|
||||
]);
|
||||
|
||||
export const SNIP_CONTEXT = 31;
|
||||
|
||||
export const NO_SANDBOX = process.env.DEBUG_22120 || false;
|
||||
|
||||
//export const APP_ROOT = '.';
|
||||
export const APP_ROOT = __dirname;
|
||||
//export const APP_ROOT = path.dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
export const sleep = ms => new Promise(res => setTimeout(res, ms));
|
||||
|
||||
export function say(o) {
|
||||
console.log(JSON.stringify(o));
|
||||
}
|
||||
|
||||
export function clone(o) {
|
||||
return JSON.parse(JSON.stringify(o));
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
import path from 'path';
|
||||
import {fileURLToPath} from 'url';
|
||||
|
||||
export const DEBUG = process.env.DEBUG_22120 || false;
|
||||
export const SHOW_FETCH = false;
|
||||
|
||||
export const CHECK_INTERVAL = 400;
|
||||
export const TEXT_NODE = 3;
|
||||
export const MAX_HIGHLIGHTABLE_LENGTH = 0; /* 0 is no max length for highlight */
|
||||
export const MAX_TITLE_LENGTH = 140;
|
||||
export const MAX_URL_LENGTH = 140;
|
||||
export const MAX_HEAD = 140;
|
||||
|
||||
/* text nodes inside these elements that are ignored */
|
||||
export const FORBIDDEN_TEXT_PARENT = new Set([
|
||||
'STYLE',
|
||||
'SCRIPT',
|
||||
'NOSCRIPT',
|
||||
/* we could remove these last two so as to index them as well */
|
||||
'DATALIST',
|
||||
'OPTION'
|
||||
]);
|
||||
export const ERROR_CODE_SAFE_TO_IGNORE = new Set([
|
||||
-32000, /* message:
|
||||
Can only get response body on requests captured after headers received.
|
||||
* ignore because:
|
||||
seems to only happen when new navigation aborts all
|
||||
pending requests of the unloading page
|
||||
*/
|
||||
-32602, /* message:
|
||||
Invalid InterceptionId.
|
||||
* ignore because:
|
||||
seems to only happen when new navigation aborts all
|
||||
pending requests of the unloading page
|
||||
*/
|
||||
]);
|
||||
|
||||
export const SNIP_CONTEXT = 31;
|
||||
|
||||
export const NO_SANDBOX = process.env.DEBUG_22120 || false;
|
||||
|
||||
//export const APP_ROOT = '.';
|
||||
//export const APP_ROOT = __dirname;
|
||||
export const APP_ROOT = path.dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
export const sleep = ms => new Promise(res => setTimeout(res, ms));
|
||||
|
||||
export function say(o) {
|
||||
console.log(JSON.stringify(o));
|
||||
}
|
||||
|
||||
export function clone(o) {
|
||||
return JSON.parse(JSON.stringify(o));
|
||||
}
|
Loading…
Reference in New Issue