Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
preparing 0.59 without ocr/pdf, userguide, note ancillaries
zadam6f7b554cdc67
diff --git a/.gitpod.yml b/.gitpod.ymlindex 360da5b5ff..914a89919d 100644--- a/.gitpod.yml+++ b/.gitpod.yml@@ -2,7 +2,7 @@ image:file: .gitpod.dockerfiletasks:- - before: nvm install 18.14.0 && nvm use 18.14.0+ - before: nvm install 16.19.0 && nvm use 16.19.0init: npm installcommand: npm run start-serverdiff --git a/Dockerfile b/Dockerfileindex d6f47ed03e..c1a425e3f7 100644--- a/Dockerfile+++ b/Dockerfile@@ -1,5 +1,5 @@# !!! Don't try to build this Dockerfile directly, run it through bin/build-docker.sh script !!!-FROM node:18.14.0-alpine+FROM node:16.19.0-alpine# Create app directoryWORKDIR /usr/src/appdiff --git a/bin/build-api-docs.sh b/bin/build-api-docs.shdeleted file mode 100755index 9d6fb61f5d..0000000000--- a/bin/build-api-docs.sh+++ /dev/null@@ -1,16 +0,0 @@-#!/usr/bin/env bash--rm -rf ./tmp/api_docs/backend_api-rm -rf ./tmp/api_docs/frontend_api--./node_modules/.bin/jsdoc -c jsdoc-conf.json -d ./tmp/api_docs/backend_api src/becca/entities/*.js \- src/services/backend_script_api.js src/services/sql.js--./node_modules/.bin/jsdoc -c jsdoc-conf.json -d ./tmp/api_docs/frontend_api src/public/app/entities/*.js \- src/public/app/services/frontend_script_api.js src/public/app/widgets/right_panel_widget.js--rm -rf ./docs/api_docs/backend_api ./docs/api_docs/frontend_api--node src/transform_api_docs.js--rm -rf ./docs/api_docs/fonts ./docs/api_docs/styles ./docs/api_docs/scripts ./docs/api_docs/backend_api/index.html ./docs/api_docs/frontend_api/index.htmldiff --git a/bin/build-server.sh b/bin/build-server.shindex 9173288b04..2c42c91053 100755--- a/bin/build-server.sh+++ b/bin/build-server.sh@@ -1,7 +1,7 @@#!/usr/bin/env bashPKG_DIR=dist/trilium-linux-x64-server-NODE_VERSION=18.14.0+NODE_VERSION=16.19.0if [ "$1" != "DONTCOPY" ]thendiff --git a/bin/copy-trilium.sh b/bin/copy-trilium.shindex 8b87bbd12b..fdcb99a40e 100755--- a/bin/copy-trilium.sh+++ b/bin/copy-trilium.sh@@ -5,7 +5,7 @@ if [[ $# -eq 0 ]] ; thenexit 1fi-n exec 18.14.0 npm run webpack+n exec 16.19.0 npm run webpackDIR=$1@@ -27,7 +27,7 @@ cp -r electron.js $DIR/cp webpack-* $DIR/# run in subshell (so we return to original dir)-(cd $DIR && n exec 18.14.0 npm install --only=prod)+(cd $DIR && n exec 16.19.0 npm install --only=prod)# cleanup of useless files in dependenciesrm -r $DIR/node_modules/image-q/demodiff --git a/bin/tpl/anonymize-database.sql b/bin/tpl/anonymize-database.sqlindex e4d9b71296..fca3b4e53c 100644--- a/bin/tpl/anonymize-database.sql+++ b/bin/tpl/anonymize-database.sql@@ -4,7 +4,6 @@ UPDATE notes SET title = 'title' WHERE title NOT IN ('root', '_hidden', '_share'UPDATE note_contents SET content = 'text' WHERE content IS NOT NULL;UPDATE note_revisions SET title = 'title';UPDATE note_revision_contents SET content = 'text' WHERE content IS NOT NULL;-UPDATE note_ancillary_contents SET content = 'text' WHERE content IS NOT NULL;UPDATE attributes SET name = 'name', value = 'value' WHERE type = 'label' AND name NOT IN('inbox', 'disableVersioning', 'calendarRoot', 'archived', 'excludeFromExport', 'disableInclusion', 'appCss', 'appTheme', 'hidePromotedAttributes', 'readOnly', 'autoReadOnlyDisabled', 'cssClass', 'iconClass', 'keyboardShortcut', 'run', 'runOnInstance', 'runAtHour', 'customRequestHandler', 'customResourceProvider', 'widget', 'noteInfoWidgetDisabled', 'linkMapWidgetDisabled', 'noteRevisionsWidgetDisabled', 'whatLinksHereWidgetDisabled', 'similarNotesWidgetDisabled', 'workspace', 'workspaceIconClass', 'workspaceTabBackgroundColor', 'searchHome', 'workspaceInbox', 'workspaceSearchHome', 'sqlConsoleHome', 'datePattern', 'pageSize', 'viewType', 'mapRootNoteId', 'bookmarkFolder', 'sorted', 'top', 'fullContentWidth', 'shareHiddenFromTree', 'shareAlias', 'shareOmitDefaultCss', 'shareRoot', 'shareDescription', 'internalLink', 'imageLink', 'relationMapLink', 'includeMapLink', 'runOnNoteCreation', 'runOnNoteTitleChange', 'runOnNoteContentChange', 'runOnNoteChange', 'runOnChildNoteCreation', 'runOnAttributeCreation', 'runOnAttributeChange', 'template', 'inherit', 'widget', 'renderNote', 'shareCss', 'shareJs', 'shareFavicon');UPDATE attributes SET name = 'name' WHERE type = 'relation' AND name NOT IN ('inbox', 'disableVersioning', 'calendarRoot', 'archived', 'excludeFromExport', 'disableInclusion', 'appCss', 'appTheme', 'hidePromotedAttributes', 'readOnly', 'autoReadOnlyDisabled', 'cssClass', 'iconClass', 'keyboardShortcut', 'run', 'runOnInstance', 'runAtHour', 'customRequestHandler', 'customResourceProvider', 'widget', 'noteInfoWidgetDisabled', 'linkMapWidgetDisabled', 'noteRevisionsWidgetDisabled', 'whatLinksHereWidgetDisabled', 'similarNotesWidgetDisabled', 'workspace', 'workspaceIconClass', 'workspaceTabBackgroundColor', 'searchHome', 'workspaceInbox', 'workspaceSearchHome', 'sqlConsoleHome', 'datePattern', 'pageSize', 'viewType', 'mapRootNoteId', 'bookmarkFolder', 'sorted', 'top', 'fullContentWidth', 'shareHiddenFromTree', 'shareAlias', 'shareOmitDefaultCss', 'shareRoot', 'shareDescription', 'internalLink', 'imageLink', 'relationMapLink', 'includeMapLink', 'runOnNoteCreation', 'runOnNoteTitleChange', 'runOnNoteContentChange', 'runOnNoteChange', 'runOnChildNoteCreation', 'runOnAttributeCreation', 'runOnAttributeChange', 'template', 'inherit', 'widget', 'renderNote', 'shareCss', 'shareJs', 'shareFavicon');diff --git a/db/migrations/0213__note_ancillaries.sql b/db/migrations/0213__note_ancillaries.sqldeleted file mode 100644index 03cadd8d81..0000000000--- a/db/migrations/0213__note_ancillaries.sql+++ /dev/null@@ -1,20 +0,0 @@-CREATE TABLE IF NOT EXISTS "note_ancillaries"-(- noteAncillaryId TEXT not null primary key,- noteId TEXT not null,- name TEXT not null,- mime TEXT not null,- isProtected INT not null DEFAULT 0,- contentCheckSum TEXT not null,- utcDateModified TEXT not null,- isDeleted INT not null,- `deleteId` TEXT DEFAULT NULL);--CREATE TABLE IF NOT EXISTS "note_ancillary_contents" (`noteAncillaryId` TEXT NOT NULL PRIMARY KEY,- `content` TEXT DEFAULT NULL,- `utcDateModified` TEXT NOT NULL);--CREATE INDEX IDX_note_ancillaries_name- on note_ancillaries (name);-CREATE UNIQUE INDEX IDX_note_ancillaries_noteId_name- on note_ancillaries (noteId, name);diff --git a/db/migrations/0214__migrate_canvas_note_to_ancillary.js b/db/migrations/0214__migrate_canvas_note_to_ancillary.jsdeleted file mode 100644index 44aaaa9390..0000000000--- a/db/migrations/0214__migrate_canvas_note_to_ancillary.js+++ /dev/null@@ -1,39 +0,0 @@-module.exports = async () => {- const cls = require("../../src/services/cls");- const beccaLoader = require("../../src/becca/becca_loader");- const becca = require("../../src/becca/becca");- const log = require("../../src/services/log");-- await cls.init(async () => {- beccaLoader.load();-- for (const note of Object.values(becca.notes)) {- if (note.type !== 'canvas') {- continue;- }-- if (note.isProtected) {- // can't migrate protected notes, but that's not critical.- continue;- }-- const content = note.getContent(true);- let svg;-- try {- const payload = JSON.parse(content);- svg = payload?.svg;-- if (!svg) {- continue;- }- }- catch (e) {- log.info(`Could not create a note ancillary for canvas "${note.noteId}" with error: ${e.message} ${e.stack}`);- continue;- }-- note.saveNoteAncillary('canvasSvg', 'image/svg+xml', svg);- }- });-};diff --git a/db/schema.sql b/db/schema.sqlindex 6537ea720b..01a40c554f 100644--- a/db/schema.sql+++ b/db/schema.sql@@ -112,21 +112,3 @@ CREATE TABLE IF NOT EXISTS "recent_notes"notePath TEXT not null,utcDateCreated TEXT not null);-CREATE TABLE IF NOT EXISTS "note_ancillaries"-(- noteAncillaryId TEXT not null primary key,- noteId TEXT not null,- name TEXT not null,- mime TEXT not null,- isProtected INT not null DEFAULT 0,- contentCheckSum TEXT not null,- utcDateModified TEXT not null,- isDeleted INT not null,- `deleteId` TEXT DEFAULT NULL);-CREATE TABLE IF NOT EXISTS "note_ancillary_contents" (`noteAncillaryId` TEXT NOT NULL PRIMARY KEY,- `content` TEXT DEFAULT NULL,- `utcDateModified` TEXT NOT NULL);-CREATE INDEX IDX_note_ancillaries_name- on note_ancillaries (name);-CREATE UNIQUE INDEX IDX_note_ancillaries_noteId_name- on note_ancillaries (noteId, name);diff --git a/jsdoc-conf.json b/jsdoc-conf.jsonindex 3a20f80156..c0451f5b4f 100644--- a/jsdoc-conf.json+++ b/jsdoc-conf.json@@ -1,8 +1,7 @@{"templates": {"default": {- "includeDate": false,- "outputSourceFiles": false+ "includeDate": false}}}\ No newline at end of filediff --git a/package-lock.json b/package-lock.jsonindex ed191db2f0..72f6edf049 100644--- a/package-lock.json+++ b/package-lock.json@@ -1,12 +1,11 @@{"name": "trilium",- "version": "0.58.7",+ "version": "0.58.8","lockfileVersion": 2,"requires": true,"packages": {"": {- "name": "trilium",- "version": "0.58.7",+ "version": "0.58.8","hasInstallScript": true,"license": "AGPL-3.0-only","dependencies": {@@ -16,8 +15,7 @@"archiver": "5.3.1","async-mutex": "0.4.0","axios": "1.3.3",- "better-sqlite3": "8.1.0",- "canvas": "2.11.0",+ "better-sqlite3": "7.4.5","chokidar": "3.5.3","cls-hooked": "4.2.2","commonmark": "0.30.0",@@ -53,13 +51,12 @@"multer": "1.4.5-lts.1","node-abi": "3.33.0","normalize-strings": "1.1.1",- "ocrad.js": "antimatter15/ocrad.js#master","open": "8.4.1",- "pdfjs-dist": "3.3.122","rand-token": "1.0.1","react": "17.0.2","react-dom": "17.0.2","request": "2.88.2",+ "rimraf": "3.0.2","safe-compare": "1.1.4","sanitize-filename": "1.6.3","sanitize-html": "2.9.0",@@ -81,7 +78,7 @@},"devDependencies": {"cross-env": "7.0.3",- "electron": "23.0.0",+ "electron": "16.2.8","electron-builder": "23.6.0","electron-packager": "17.1.1","electron-rebuild": "3.2.9",@@ -165,6 +162,7 @@"version": "2.0.2","resolved": "https://registry.npmjs.org/@electron/get/-/get-2.0.2.tgz","integrity": "sha512-eFZVFoRXb3GFGd7Ak7W4+6jBl9wBtiZ4AaYOse97ej6mKj5tkyO0dUnUChs1IhJZtx1BENo4/p4WUTXpi6vT+g==",+ "dev": true,"dependencies": {"debug": "^4.1.1","env-paths": "^2.2.0",@@ -185,6 +183,7 @@"version": "8.1.0","resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz","integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",+ "dev": true,"dependencies": {"graceful-fs": "^4.2.0","jsonfile": "^4.0.0",@@ -198,6 +197,7 @@"version": "6.3.0","resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz","integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",+ "dev": true,"bin": {"semver": "bin/semver.js"}@@ -869,6 +869,8 @@"version": "1.0.10","resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.10.tgz","integrity": "sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA==",+ "optional": true,+ "peer": true,"dependencies": {"detect-libc": "^2.0.0","https-proxy-agent": "^5.0.0",@@ -884,20 +886,6 @@"node-pre-gyp": "bin/node-pre-gyp"}},- "node_modules/@mapbox/node-pre-gyp/node_modules/rimraf": {- "version": "3.0.2",- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",- "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",- "dependencies": {- "glob": "^7.1.3"- },- "bin": {- "rimraf": "bin.js"- },- "funding": {- "url": "https://github.com/sponsors/isaacs"- }- },"node_modules/@npmcli/fs": {"version": "2.1.0","resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.0.tgz",@@ -936,25 +924,11 @@"node": ">=10"}},- "node_modules/@npmcli/move-file/node_modules/rimraf": {- "version": "3.0.2",- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",- "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",- "dev": true,- "dependencies": {- "glob": "^7.1.3"- },- "bin": {- "rimraf": "bin.js"- },- "funding": {- "url": "https://github.com/sponsors/isaacs"- }- },"node_modules/@sindresorhus/is": {"version": "4.6.0","resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz","integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==",+ "dev": true,"engines": {"node": ">=10"},@@ -966,6 +940,7 @@"version": "4.0.6","resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz","integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==",+ "dev": true,"dependencies": {"defer-to-connect": "^2.0.0"},@@ -990,6 +965,7 @@"version": "6.0.2","resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.2.tgz","integrity": "sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA==",+ "dev": true,"dependencies": {"@types/http-cache-semantics": "*","@types/keyv": "*",@@ -1054,7 +1030,8 @@"node_modules/@types/http-cache-semantics": {"version": "4.0.1","resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz",- "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ=="+ "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==",+ "dev": true},"node_modules/@types/json-schema": {"version": "7.0.9",@@ -1066,6 +1043,7 @@"version": "3.1.3","resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.3.tgz","integrity": "sha512-FXCJgyyN3ivVgRoml4h94G/p3kY+u/B86La+QptcqJaWtBWtmc6TtkNfS40n9bIvyLteHh7zXOtgbobORKPbDg==",+ "dev": true,"dependencies": {"@types/node": "*"}@@ -1107,7 +1085,8 @@"node_modules/@types/node": {"version": "16.11.46","resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.46.tgz",- "integrity": "sha512-x+sfpb2dMrhCQPL4NAGs64Z9hh0t72aP0dg+PuZidmPr/0Gj5ELQTjD/t46dq3DF/8ZvSHOaIyDIbAsdPshyVQ=="+ "integrity": "sha512-x+sfpb2dMrhCQPL4NAGs64Z9hh0t72aP0dg+PuZidmPr/0Gj5ELQTjD/t46dq3DF/8ZvSHOaIyDIbAsdPshyVQ==",+ "devOptional": true},"node_modules/@types/plist": {"version": "3.0.2",@@ -1124,6 +1103,7 @@"version": "1.0.0","resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz","integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==",+ "dev": true,"dependencies": {"@types/node": "*"}@@ -1154,6 +1134,7 @@"version": "2.9.2","resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.9.2.tgz","integrity": "sha512-8uALY5LTvSuHgloDVUvWP3pIauILm+8/0pDMokuDYIoNsOkSwd5AiHBTSEJjKTDcZr5z8UpgOWZkxBF4iJftoA==",+ "dev": true,"optional": true,"dependencies": {"@types/node": "*"@@ -1375,7 +1356,8 @@"node_modules/abbrev": {"version": "1.1.1","resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",- "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="+ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",+ "devOptional": true},"node_modules/accepts": {"version": "1.3.8",@@ -1492,6 +1474,7 @@"version": "5.0.1","resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz","integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",+ "devOptional": true,"engines": {"node": ">=8"}@@ -1694,7 +1677,8 @@"node_modules/aproba": {"version": "1.2.0","resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",- "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw=="+ "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",+ "devOptional": true},"node_modules/archiver": {"version": "5.3.1",@@ -1755,6 +1739,8 @@"version": "2.0.0","resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz","integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==",+ "optional": true,+ "peer": true,"dependencies": {"delegates": "^1.0.0","readable-stream": "^3.6.0"@@ -1767,6 +1753,8 @@"version": "3.6.0","resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz","integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",+ "optional": true,+ "peer": true,"dependencies": {"inherits": "^2.0.3","string_decoder": "^1.1.1",@@ -1989,13 +1977,14 @@}},"node_modules/better-sqlite3": {- "version": "8.1.0",- "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-8.1.0.tgz",- "integrity": "sha512-p1m09H+Oi8R9TPj810pdNswMFuVgRNgCJEWypp6jlkOgSwMIrNyuj3hW78xEuBRGok5RzeaUW8aBtTWF3l/TQA==",+ "version": "7.4.5",+ "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-7.4.5.tgz",+ "integrity": "sha512-mybC3dgrtJeHkIRGP36tST7wjBlIMgTRAXhhO4bMpPZ17EG23FZxZeFcwKWy6o8mV1SKQFnQNyeAZlQpGrgheQ==","hasInstallScript": true,"dependencies": {"bindings": "^1.5.0",- "prebuild-install": "^7.1.0"+ "prebuild-install": "^7.0.0",+ "tar": "^6.1.11"}},"node_modules/binary-extensions": {@@ -2406,67 +2395,11 @@"node": ">=10"}},- "node_modules/cacache/node_modules/rimraf": {- "version": "3.0.2",- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",- "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",- "dev": true,- "dependencies": {- "glob": "^7.1.3"- },- "bin": {- "rimraf": "bin.js"- },- "funding": {- "url": "https://github.com/sponsors/isaacs"- }- },- "node_modules/cacache/node_modules/rimraf/node_modules/brace-expansion": {- "version": "1.1.11",- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",- "dev": true,- "dependencies": {- "balanced-match": "^1.0.0",- "concat-map": "0.0.1"- }- },- "node_modules/cacache/node_modules/rimraf/node_modules/glob": {- "version": "7.2.3",- "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",- "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",- "dev": true,- "dependencies": {- "fs.realpath": "^1.0.0",- "inflight": "^1.0.4",- "inherits": "2",- "minimatch": "^3.1.1",- "once": "^1.3.0",- "path-is-absolute": "^1.0.0"- },- "engines": {- "node": "*"- },- "funding": {- "url": "https://github.com/sponsors/isaacs"- }- },- "node_modules/cacache/node_modules/rimraf/node_modules/minimatch": {- "version": "3.1.2",- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",- "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",- "dev": true,- "dependencies": {- "brace-expansion": "^1.1.7"- },- "engines": {- "node": "*"- }- },"node_modules/cacheable-lookup": {"version": "5.0.4","resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz","integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==",+ "dev": true,"engines": {"node": ">=10.6.0"}@@ -2475,6 +2408,7 @@"version": "7.0.2","resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz","integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==",+ "dev": true,"dependencies": {"clone-response": "^1.0.2","get-stream": "^5.1.0",@@ -2515,6 +2449,8 @@"resolved": "https://registry.npmjs.org/canvas/-/canvas-2.11.0.tgz","integrity": "sha512-bdTjFexjKJEwtIo0oRx8eD4G2yWoUOXP9lj279jmQ2zMnTQhT8C3512OKz3s+ZOaQlLbE7TuVvRDYDB3Llyy5g==","hasInstallScript": true,+ "optional": true,+ "peer": true,"dependencies": {"@mapbox/node-pre-gyp": "^1.0.0","nan": "^2.17.0",@@ -2528,6 +2464,8 @@"version": "4.2.1","resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz","integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==",+ "optional": true,+ "peer": true,"dependencies": {"mimic-response": "^2.0.0"},@@ -2539,6 +2477,8 @@"version": "2.1.0","resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz","integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==",+ "optional": true,+ "peer": true,"engines": {"node": ">=8"},@@ -2550,6 +2490,8 @@"version": "3.1.1","resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.1.tgz","integrity": "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==",+ "optional": true,+ "peer": true,"dependencies": {"decompress-response": "^4.2.0","once": "^1.3.1",@@ -2823,6 +2765,7 @@"version": "1.1.3","resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz","integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",+ "devOptional": true,"bin": {"color-support": "bin.js"}@@ -2974,10 +2917,27 @@"typedarray": "^0.0.6"}},+ "node_modules/config-chain": {+ "version": "1.1.13",+ "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz",+ "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==",+ "optional": true,+ "dependencies": {+ "ini": "^1.3.4",+ "proto-list": "~1.2.1"+ }+ },+ "node_modules/config-chain/node_modules/ini": {+ "version": "1.3.8",+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",+ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",+ "optional": true+ },"node_modules/console-control-strings": {"version": "1.1.0","resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",- "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4="+ "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",+ "devOptional": true},"node_modules/content-disposition": {"version": "0.5.4",@@ -3383,6 +3343,7 @@"version": "2.0.1","resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz","integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==",+ "dev": true,"engines": {"node": ">=10"}@@ -3422,7 +3383,8 @@"node_modules/delegates": {"version": "1.0.0","resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",- "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o="+ "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",+ "devOptional": true},"node_modules/depd": {"version": "1.1.2",@@ -3656,6 +3618,11 @@"integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==","dev": true},+ "node_modules/duplexer3": {+ "version": "0.1.5",+ "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.5.tgz",+ "integrity": "sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA=="+ },"node_modules/ecc-jsbn": {"version": "0.1.2","resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",@@ -3685,20 +3652,20 @@}},"node_modules/electron": {- "version": "23.0.0",- "resolved": "https://registry.npmjs.org/electron/-/electron-23.0.0.tgz",- "integrity": "sha512-S6hVtTAjauMiiWP9sBVR5RpcUC464cNZ06I2EMUjeZBq+KooS6tLmNsfw0zLpAXDp1qosjlBP3v71NTZ3gd9iA==",+ "version": "16.2.8",+ "resolved": "https://registry.npmjs.org/electron/-/electron-16.2.8.tgz",+ "integrity": "sha512-KSOytY6SPLsh3iCziztqa/WgJyfDOKzCvNqku9gGIqSdT8CqtV66dTU1SOrKZQjRFLxHaF8LbyxUL1vwe4taqw==","hasInstallScript": true,"dependencies": {- "@electron/get": "^2.0.0",- "@types/node": "^16.11.26",- "extract-zip": "^2.0.1"+ "@electron/get": "^1.13.0",+ "@types/node": "^14.6.2",+ "extract-zip": "^1.0.3"},"bin": {"electron": "cli.js"},"engines": {- "node": ">= 12.20.55"+ "node": ">= 8.6"}},"node_modules/electron-builder": {@@ -4291,6 +4258,212 @@"node": ">=8.0.0"}},+ "node_modules/electron/node_modules/@electron/get": {+ "version": "1.14.1",+ "resolved": "https://registry.npmjs.org/@electron/get/-/get-1.14.1.tgz",+ "integrity": "sha512-BrZYyL/6m0ZXz/lDxy/nlVhQz+WF+iPS6qXolEU8atw7h6v1aYkjwJZ63m+bJMBTxDE66X+r2tPS4a/8C82sZw==",+ "dependencies": {+ "debug": "^4.1.1",+ "env-paths": "^2.2.0",+ "fs-extra": "^8.1.0",+ "got": "^9.6.0",+ "progress": "^2.0.3",+ "semver": "^6.2.0",+ "sumchecker": "^3.0.1"+ },+ "engines": {+ "node": ">=8.6"+ },+ "optionalDependencies": {+ "global-agent": "^3.0.0",+ "global-tunnel-ng": "^2.7.1"+ }+ },+ "node_modules/electron/node_modules/@sindresorhus/is": {+ "version": "0.14.0",+ "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz",+ "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==",+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/electron/node_modules/@szmarczak/http-timer": {+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz",+ "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==",+ "dependencies": {+ "defer-to-connect": "^1.0.1"+ },+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/electron/node_modules/@types/node": {+ "version": "14.18.36",+ "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.36.tgz",+ "integrity": "sha512-FXKWbsJ6a1hIrRxv+FoukuHnGTgEzKYGi7kilfMae96AL9UNkPFNWJEEYWzdRI9ooIkbr4AKldyuSTLql06vLQ=="+ },+ "node_modules/electron/node_modules/cacheable-request": {+ "version": "6.1.0",+ "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz",+ "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==",+ "dependencies": {+ "clone-response": "^1.0.2",+ "get-stream": "^5.1.0",+ "http-cache-semantics": "^4.0.0",+ "keyv": "^3.0.0",+ "lowercase-keys": "^2.0.0",+ "normalize-url": "^4.1.0",+ "responselike": "^1.0.2"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/electron/node_modules/decompress-response": {+ "version": "3.3.0",+ "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz",+ "integrity": "sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==",+ "dependencies": {+ "mimic-response": "^1.0.0"+ },+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/electron/node_modules/defer-to-connect": {+ "version": "1.1.3",+ "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz",+ "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ=="+ },+ "node_modules/electron/node_modules/extract-zip": {+ "version": "1.7.0",+ "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.7.0.tgz",+ "integrity": "sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA==",+ "dependencies": {+ "concat-stream": "^1.6.2",+ "debug": "^2.6.9",+ "mkdirp": "^0.5.4",+ "yauzl": "^2.10.0"+ },+ "bin": {+ "extract-zip": "cli.js"+ }+ },+ "node_modules/electron/node_modules/extract-zip/node_modules/debug": {+ "version": "2.6.9",+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",+ "dependencies": {+ "ms": "2.0.0"+ }+ },+ "node_modules/electron/node_modules/fs-extra": {+ "version": "8.1.0",+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",+ "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",+ "dependencies": {+ "graceful-fs": "^4.2.0",+ "jsonfile": "^4.0.0",+ "universalify": "^0.1.0"+ },+ "engines": {+ "node": ">=6 <7 || >=8"+ }+ },+ "node_modules/electron/node_modules/got": {+ "version": "9.6.0",+ "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz",+ "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==",+ "dependencies": {+ "@sindresorhus/is": "^0.14.0",+ "@szmarczak/http-timer": "^1.1.2",+ "cacheable-request": "^6.0.0",+ "decompress-response": "^3.3.0",+ "duplexer3": "^0.1.4",+ "get-stream": "^4.1.0",+ "lowercase-keys": "^1.0.1",+ "mimic-response": "^1.0.1",+ "p-cancelable": "^1.0.0",+ "to-readable-stream": "^1.0.0",+ "url-parse-lax": "^3.0.0"+ },+ "engines": {+ "node": ">=8.6"+ }+ },+ "node_modules/electron/node_modules/got/node_modules/get-stream": {+ "version": "4.1.0",+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",+ "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",+ "dependencies": {+ "pump": "^3.0.0"+ },+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/electron/node_modules/got/node_modules/lowercase-keys": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz",+ "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/electron/node_modules/json-buffer": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz",+ "integrity": "sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ=="+ },+ "node_modules/electron/node_modules/keyv": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz",+ "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==",+ "dependencies": {+ "json-buffer": "3.0.0"+ }+ },+ "node_modules/electron/node_modules/normalize-url": {+ "version": "4.5.1",+ "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz",+ "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/electron/node_modules/p-cancelable": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz",+ "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==",+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/electron/node_modules/responselike": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz",+ "integrity": "sha512-/Fpe5guzJk1gPqdJLJR5u7eG/gNY4nImjbRDaVWVMRhne55TCmj2i9Q+54PBRfatRC8v/rIiv9BN0pMd9OV5EQ==",+ "dependencies": {+ "lowercase-keys": "^1.0.0"+ }+ },+ "node_modules/electron/node_modules/responselike/node_modules/lowercase-keys": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz",+ "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/electron/node_modules/semver": {+ "version": "6.3.0",+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",+ "bin": {+ "semver": "bin/semver.js"+ }+ },"node_modules/emitter-listener": {"version": "1.1.2","resolved": "https://registry.npmjs.org/emitter-listener/-/emitter-listener-1.1.2.tgz",@@ -4302,7 +4475,8 @@"node_modules/emoji-regex": {"version": "8.0.0","resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",+ "devOptional": true},"node_modules/encodeurl": {"version": "1.0.2",@@ -4778,6 +4952,7 @@"version": "2.0.1","resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz","integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==",+ "dev": true,"dependencies": {"debug": "^4.1.1","get-stream": "^5.1.0",@@ -5197,6 +5372,8 @@"version": "3.0.2","resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz","integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==",+ "optional": true,+ "peer": true,"dependencies": {"aproba": "^1.0.3 || ^2.0.0","color-support": "^1.1.2",@@ -5369,6 +5546,21 @@"node": ">=10.0"}},+ "node_modules/global-tunnel-ng": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/global-tunnel-ng/-/global-tunnel-ng-2.7.1.tgz",+ "integrity": "sha512-4s+DyciWBV0eK148wqXxcmVAbFVPqtc3sEtUE/GTQfuU80rySLcMhUmHKSHI7/LDj8q0gDYI1lIhRRB7ieRAqg==",+ "optional": true,+ "dependencies": {+ "encodeurl": "^1.0.2",+ "lodash": "^4.17.10",+ "npm-conf": "^1.1.3",+ "tunnel": "^0.0.6"+ },+ "engines": {+ "node": ">=0.10"+ }+ },"node_modules/globalthis": {"version": "1.0.3","resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz",@@ -5388,6 +5580,7 @@"version": "11.8.6","resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz","integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==",+ "dev": true,"dependencies": {"@sindresorhus/is": "^4.0.0","@szmarczak/http-timer": "^4.0.5",@@ -5485,7 +5678,8 @@"node_modules/has-unicode": {"version": "2.0.1","resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",- "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk="+ "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=",+ "devOptional": true},"node_modules/he": {"version": "1.2.0",@@ -5639,6 +5833,7 @@"version": "1.0.3","resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz","integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==",+ "dev": true,"dependencies": {"quick-lru": "^5.1.1","resolve-alpn": "^1.0.0"@@ -5911,6 +6106,7 @@"version": "3.0.0","resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz","integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",+ "devOptional": true,"engines": {"node": ">=8"}@@ -6335,7 +6531,8 @@"node_modules/json-buffer": {"version": "3.0.1","resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",- "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ=="+ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",+ "dev": true},"node_modules/json-parse-even-better-errors": {"version": "2.3.1",@@ -6415,6 +6612,7 @@"version": "4.5.2","resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.2.tgz","integrity": "sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==",+ "dev": true,"dependencies": {"json-buffer": "3.0.1"}@@ -6693,6 +6891,8 @@"version": "3.1.0","resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz","integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",+ "optional": true,+ "peer": true,"dependencies": {"semver": "^6.0.0"},@@ -6707,6 +6907,8 @@"version": "6.3.0","resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz","integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",+ "optional": true,+ "peer": true,"bin": {"semver": "bin/semver.js"}@@ -7066,7 +7268,9 @@"node_modules/nan": {"version": "2.17.0","resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz",- "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ=="+ "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==",+ "optional": true,+ "peer": true},"node_modules/nanoid": {"version": "3.1.30",@@ -7259,21 +7463,6 @@"node": ">= 6"}},- "node_modules/node-gyp/node_modules/rimraf": {- "version": "3.0.2",- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",- "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",- "dev": true,- "dependencies": {- "glob": "^7.1.3"- },- "bin": {- "rimraf": "bin.js"- },- "funding": {- "url": "https://github.com/sponsors/isaacs"- }- },"node_modules/node-releases": {"version": "2.0.1","resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.1.tgz",@@ -7284,6 +7473,7 @@"version": "5.0.0","resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz","integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==",+ "devOptional": true,"dependencies": {"abbrev": "1"},@@ -7332,6 +7522,7 @@"version": "6.1.0","resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz","integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==",+ "dev": true,"engines": {"node": ">=10"},@@ -7339,10 +7530,34 @@"url": "https://github.com/sponsors/sindresorhus"}},+ "node_modules/npm-conf": {+ "version": "1.1.3",+ "resolved": "https://registry.npmjs.org/npm-conf/-/npm-conf-1.1.3.tgz",+ "integrity": "sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==",+ "optional": true,+ "dependencies": {+ "config-chain": "^1.1.11",+ "pify": "^3.0.0"+ },+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/npm-conf/node_modules/pify": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",+ "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==",+ "optional": true,+ "engines": {+ "node": ">=4"+ }+ },"node_modules/npmlog": {"version": "5.0.1","resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz","integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==",+ "optional": true,+ "peer": true,"dependencies": {"are-we-there-yet": "^2.0.0","console-control-strings": "^1.1.0",@@ -7399,11 +7614,6 @@"node": ">= 0.4"}},- "node_modules/ocrad.js": {- "version": "0.1.0",- "resolved": "git+ssh://[email protected]/antimatter15/ocrad.js.git#41daf0d2c2d0fc46db0633a6c6516af779b9f0bc",- "license": "GPL-3.0"- },"node_modules/omggif": {"version": "1.0.10","resolved": "https://registry.npmjs.org/omggif/-/omggif-1.0.10.tgz",@@ -7535,6 +7745,7 @@"version": "2.1.1","resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz","integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==",+ "dev": true,"engines": {"node": ">=8"}@@ -7736,26 +7947,6 @@"node": ">=4"}},- "node_modules/path2d-polyfill": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/path2d-polyfill/-/path2d-polyfill-2.0.1.tgz",- "integrity": "sha512-ad/3bsalbbWhmBo0D6FZ4RNMwsLsPpL6gnvhuSaU5Vm7b06Kr5ubSltQQ0T7YKsiJQO+g22zJ4dJKNTXIyOXtA==",- "engines": {- "node": ">=8"- }- },- "node_modules/pdfjs-dist": {- "version": "3.3.122",- "resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-3.3.122.tgz",- "integrity": "sha512-98WC09jOq3OuqrmF5+LZfcyzTlGA0sY9ocMBbWZ/H6Pwni7deptxwkNZVLieOz+4nSoTEW25PsfnfOj3ELrHdA==",- "dependencies": {- "path2d-polyfill": "^2.0.1",- "web-streams-polyfill": "^3.2.1"- },- "optionalDependencies": {- "canvas": "^2.11.0"- }- },"node_modules/peek-readable": {"version": "4.1.0","resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-4.1.0.tgz",@@ -7924,6 +8115,14 @@"node": ">= 0.8.0"}},+ "node_modules/prepend-http": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz",+ "integrity": "sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==",+ "engines": {+ "node": ">=4"+ }+ },"node_modules/printj": {"version": "1.1.2","resolved": "https://registry.npmjs.org/printj/-/printj-1.1.2.tgz",@@ -7975,6 +8174,12 @@"node": ">=10"}},+ "node_modules/proto-list": {+ "version": "1.2.4",+ "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz",+ "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==",+ "optional": true+ },"node_modules/proxy-addr": {"version": "2.0.7","resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",@@ -8048,6 +8253,7 @@"version": "5.1.1","resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz","integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==",+ "dev": true,"engines": {"node": ">=10"},@@ -8411,7 +8617,8 @@"node_modules/resolve-alpn": {"version": "1.2.1","resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz",- "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g=="+ "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==",+ "dev": true},"node_modules/resolve-cwd": {"version": "3.0.0",@@ -8438,6 +8645,7 @@"version": "2.0.1","resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz","integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==",+ "dev": true,"dependencies": {"lowercase-keys": "^2.0.0"},@@ -8466,6 +8674,20 @@"node": ">= 4"}},+ "node_modules/rimraf": {+ "version": "3.0.2",+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",+ "dependencies": {+ "glob": "^7.1.3"+ },+ "bin": {+ "rimraf": "bin.js"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },"node_modules/rndm": {"version": "1.2.0","resolved": "https://registry.npmjs.org/rndm/-/rndm-1.2.0.tgz",@@ -8822,7 +9044,8 @@"node_modules/set-blocking": {"version": "2.0.0","resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",- "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="+ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",+ "devOptional": true},"node_modules/setprototypeof": {"version": "1.1.1",@@ -9187,6 +9410,7 @@"version": "4.2.3","resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz","integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",+ "devOptional": true,"dependencies": {"emoji-regex": "^8.0.0","is-fullwidth-code-point": "^3.0.0",@@ -9205,6 +9429,7 @@"version": "6.0.1","resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz","integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",+ "devOptional": true,"dependencies": {"ansi-regex": "^5.0.1"},@@ -9535,27 +9760,21 @@"node": ">=8.17.0"}},- "node_modules/tmp-promise": {- "version": "3.0.2",- "resolved": "https://registry.npmjs.org/tmp-promise/-/tmp-promise-3.0.2.tgz",- "integrity": "sha512-OyCLAKU1HzBjL6Ev3gxUeraJNlbNingmi8IrHHEsYH8LTmEuhvYfqvhn2F/je+mjf4N58UmZ96OMEy1JanSCpA==",- "devOptional": true,- "dependencies": {- "tmp": "^0.2.0"- }- },- "node_modules/tmp/node_modules/rimraf": {- "version": "3.0.2",- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",- "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",- "dependencies": {- "glob": "^7.1.3"- },- "bin": {- "rimraf": "bin.js"- },- "funding": {- "url": "https://github.com/sponsors/isaacs"+ "node_modules/tmp-promise": {+ "version": "3.0.2",+ "resolved": "https://registry.npmjs.org/tmp-promise/-/tmp-promise-3.0.2.tgz",+ "integrity": "sha512-OyCLAKU1HzBjL6Ev3gxUeraJNlbNingmi8IrHHEsYH8LTmEuhvYfqvhn2F/je+mjf4N58UmZ96OMEy1JanSCpA==",+ "devOptional": true,+ "dependencies": {+ "tmp": "^0.2.0"+ }+ },+ "node_modules/to-readable-stream": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz",+ "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==",+ "engines": {+ "node": ">=6"}},"node_modules/to-regex-range": {@@ -9659,6 +9878,15 @@"node": ">=0.6.x"}},+ "node_modules/tunnel": {+ "version": "0.0.6",+ "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",+ "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",+ "optional": true,+ "engines": {+ "node": ">=0.6.11 <=0.7.0 || >=0.7.3"+ }+ },"node_modules/tunnel-agent": {"version": "0.6.0","resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",@@ -9836,6 +10064,17 @@"requires-port": "^1.0.0"}},+ "node_modules/url-parse-lax": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz",+ "integrity": "sha512-NjFKA0DidqPa5ciFcSrXnAltTtzz84ogy+NebPvfEgAck0+TNg4UJ4IN+fB7zRZfbgUf0syOo9MDxFkDSMuFaQ==",+ "dependencies": {+ "prepend-http": "^2.0.0"+ },+ "engines": {+ "node": ">=4"+ }+ },"node_modules/utf8-byte-length": {"version": "1.0.4","resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz",@@ -9935,14 +10174,6 @@"defaults": "^1.0.3"}},- "node_modules/web-streams-polyfill": {- "version": "3.2.1",- "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz",- "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==",- "engines": {- "node": ">= 8"- }- },"node_modules/webidl-conversions": {"version": "7.0.0","resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",@@ -10135,6 +10366,7 @@"version": "1.1.5","resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz","integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==",+ "devOptional": true,"dependencies": {"string-width": "^1.0.2 || 2 || 3 || 4"}@@ -10425,6 +10657,7 @@"version": "2.0.2","resolved": "https://registry.npmjs.org/@electron/get/-/get-2.0.2.tgz","integrity": "sha512-eFZVFoRXb3GFGd7Ak7W4+6jBl9wBtiZ4AaYOse97ej6mKj5tkyO0dUnUChs1IhJZtx1BENo4/p4WUTXpi6vT+g==",+ "dev": true,"requires": {"debug": "^4.1.1","env-paths": "^2.2.0",@@ -10440,6 +10673,7 @@"version": "8.1.0","resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz","integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",+ "dev": true,"requires": {"graceful-fs": "^4.2.0","jsonfile": "^4.0.0",@@ -10449,7 +10683,8 @@"semver": {"version": "6.3.0","resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",+ "dev": true}}},@@ -10959,6 +11194,8 @@"version": "1.0.10","resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.10.tgz","integrity": "sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA==",+ "optional": true,+ "peer": true,"requires": {"detect-libc": "^2.0.0","https-proxy-agent": "^5.0.0",@@ -10969,16 +11206,6 @@"rimraf": "^3.0.2","semver": "^7.3.5","tar": "^6.1.11"- },- "dependencies": {- "rimraf": {- "version": "3.0.2",- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",- "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",- "requires": {- "glob": "^7.1.3"- }- }}},"@npmcli/fs": {@@ -11006,27 +11233,20 @@"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz","integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==","dev": true- },- "rimraf": {- "version": "3.0.2",- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",- "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",- "dev": true,- "requires": {- "glob": "^7.1.3"- }}}},"@sindresorhus/is": {"version": "4.6.0","resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz",- "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw=="+ "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==",+ "dev": true},"@szmarczak/http-timer": {"version": "4.0.6","resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz","integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==",+ "dev": true,"requires": {"defer-to-connect": "^2.0.0"}@@ -11045,6 +11265,7 @@"version": "6.0.2","resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.2.tgz","integrity": "sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA==",+ "dev": true,"requires": {"@types/http-cache-semantics": "*","@types/keyv": "*",@@ -11109,7 +11330,8 @@"@types/http-cache-semantics": {"version": "4.0.1","resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz",- "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ=="+ "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==",+ "dev": true},"@types/json-schema": {"version": "7.0.9",@@ -11121,6 +11343,7 @@"version": "3.1.3","resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.3.tgz","integrity": "sha512-FXCJgyyN3ivVgRoml4h94G/p3kY+u/B86La+QptcqJaWtBWtmc6TtkNfS40n9bIvyLteHh7zXOtgbobORKPbDg==",+ "dev": true,"requires": {"@types/node": "*"}@@ -11162,7 +11385,8 @@"@types/node": {"version": "16.11.46","resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.46.tgz",- "integrity": "sha512-x+sfpb2dMrhCQPL4NAGs64Z9hh0t72aP0dg+PuZidmPr/0Gj5ELQTjD/t46dq3DF/8ZvSHOaIyDIbAsdPshyVQ=="+ "integrity": "sha512-x+sfpb2dMrhCQPL4NAGs64Z9hh0t72aP0dg+PuZidmPr/0Gj5ELQTjD/t46dq3DF/8ZvSHOaIyDIbAsdPshyVQ==",+ "devOptional": true},"@types/plist": {"version": "3.0.2",@@ -11179,6 +11403,7 @@"version": "1.0.0","resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz","integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==",+ "dev": true,"requires": {"@types/node": "*"}@@ -11209,6 +11434,7 @@"version": "2.9.2","resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.9.2.tgz","integrity": "sha512-8uALY5LTvSuHgloDVUvWP3pIauILm+8/0pDMokuDYIoNsOkSwd5AiHBTSEJjKTDcZr5z8UpgOWZkxBF4iJftoA==",+ "dev": true,"optional": true,"requires": {"@types/node": "*"@@ -11407,7 +11633,8 @@"abbrev": {"version": "1.1.1","resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",- "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="+ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",+ "devOptional": true},"accepts": {"version": "1.3.8",@@ -11494,7 +11721,8 @@"ansi-regex": {"version": "5.0.1","resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",- "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",+ "devOptional": true},"ansi-styles": {"version": "4.3.0",@@ -11658,7 +11886,8 @@"aproba": {"version": "1.2.0","resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",- "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw=="+ "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",+ "devOptional": true},"archiver": {"version": "5.3.1",@@ -11712,6 +11941,8 @@"version": "2.0.0","resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz","integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==",+ "optional": true,+ "peer": true,"requires": {"delegates": "^1.0.0","readable-stream": "^3.6.0"@@ -11721,6 +11952,8 @@"version": "3.6.0","resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz","integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",+ "optional": true,+ "peer": true,"requires": {"inherits": "^2.0.3","string_decoder": "^1.1.1",@@ -11895,12 +12128,13 @@}},"better-sqlite3": {- "version": "8.1.0",- "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-8.1.0.tgz",- "integrity": "sha512-p1m09H+Oi8R9TPj810pdNswMFuVgRNgCJEWypp6jlkOgSwMIrNyuj3hW78xEuBRGok5RzeaUW8aBtTWF3l/TQA==",+ "version": "7.4.5",+ "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-7.4.5.tgz",+ "integrity": "sha512-mybC3dgrtJeHkIRGP36tST7wjBlIMgTRAXhhO4bMpPZ17EG23FZxZeFcwKWy6o8mV1SKQFnQNyeAZlQpGrgheQ==","requires": {"bindings": "^1.5.0",- "prebuild-install": "^7.1.0"+ "prebuild-install": "^7.0.0",+ "tar": "^6.1.11"}},"binary-extensions": {@@ -12240,62 +12474,20 @@"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz","integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==","dev": true- },- "rimraf": {- "version": "3.0.2",- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",- "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",- "dev": true,- "requires": {- "glob": "^7.1.3"- },- "dependencies": {- "brace-expansion": {- "version": "1.1.11",- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",- "dev": true,- "requires": {- "balanced-match": "^1.0.0",- "concat-map": "0.0.1"- }- },- "glob": {- "version": "7.2.3",- "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",- "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",- "dev": true,- "requires": {- "fs.realpath": "^1.0.0",- "inflight": "^1.0.4",- "inherits": "2",- "minimatch": "^3.1.1",- "once": "^1.3.0",- "path-is-absolute": "^1.0.0"- }- },- "minimatch": {- "version": "3.1.2",- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",- "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",- "dev": true,- "requires": {- "brace-expansion": "^1.1.7"- }- }- }}}},"cacheable-lookup": {"version": "5.0.4","resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz",- "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA=="+ "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==",+ "dev": true},"cacheable-request": {"version": "7.0.2","resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz","integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==",+ "dev": true,"requires": {"clone-response": "^1.0.2","get-stream": "^5.1.0",@@ -12325,6 +12517,8 @@"version": "2.11.0","resolved": "https://registry.npmjs.org/canvas/-/canvas-2.11.0.tgz","integrity": "sha512-bdTjFexjKJEwtIo0oRx8eD4G2yWoUOXP9lj279jmQ2zMnTQhT8C3512OKz3s+ZOaQlLbE7TuVvRDYDB3Llyy5g==",+ "optional": true,+ "peer": true,"requires": {"@mapbox/node-pre-gyp": "^1.0.0","nan": "^2.17.0",@@ -12335,6 +12529,8 @@"version": "4.2.1","resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz","integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==",+ "optional": true,+ "peer": true,"requires": {"mimic-response": "^2.0.0"}@@ -12342,12 +12538,16 @@"mimic-response": {"version": "2.1.0","resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz",- "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA=="+ "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==",+ "optional": true,+ "peer": true},"simple-get": {"version": "3.1.1","resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.1.tgz","integrity": "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==",+ "optional": true,+ "peer": true,"requires": {"decompress-response": "^4.2.0","once": "^1.3.1",@@ -12555,7 +12755,8 @@"color-support": {"version": "1.1.3","resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",- "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg=="+ "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",+ "devOptional": true},"colorette": {"version": "2.0.16",@@ -12677,10 +12878,29 @@"typedarray": "^0.0.6"}},+ "config-chain": {+ "version": "1.1.13",+ "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz",+ "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==",+ "optional": true,+ "requires": {+ "ini": "^1.3.4",+ "proto-list": "~1.2.1"+ },+ "dependencies": {+ "ini": {+ "version": "1.3.8",+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",+ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",+ "optional": true+ }+ }+ },"console-control-strings": {"version": "1.1.0","resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",- "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4="+ "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",+ "devOptional": true},"content-disposition": {"version": "0.5.4",@@ -12977,7 +13197,8 @@"defer-to-connect": {"version": "2.0.1","resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz",- "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg=="+ "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==",+ "dev": true},"define-lazy-prop": {"version": "2.0.0",@@ -13002,7 +13223,8 @@"delegates": {"version": "1.0.0","resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",- "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o="+ "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",+ "devOptional": true},"depd": {"version": "1.1.2",@@ -13178,6 +13400,11 @@"integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==","dev": true},+ "duplexer3": {+ "version": "0.1.5",+ "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.5.tgz",+ "integrity": "sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA=="+ },"ecc-jsbn": {"version": "0.1.2","resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",@@ -13201,13 +13428,183 @@}},"electron": {- "version": "23.0.0",- "resolved": "https://registry.npmjs.org/electron/-/electron-23.0.0.tgz",- "integrity": "sha512-S6hVtTAjauMiiWP9sBVR5RpcUC464cNZ06I2EMUjeZBq+KooS6tLmNsfw0zLpAXDp1qosjlBP3v71NTZ3gd9iA==",+ "version": "16.2.8",+ "resolved": "https://registry.npmjs.org/electron/-/electron-16.2.8.tgz",+ "integrity": "sha512-KSOytY6SPLsh3iCziztqa/WgJyfDOKzCvNqku9gGIqSdT8CqtV66dTU1SOrKZQjRFLxHaF8LbyxUL1vwe4taqw==","requires": {- "@electron/get": "^2.0.0",- "@types/node": "^16.11.26",- "extract-zip": "^2.0.1"+ "@electron/get": "^1.13.0",+ "@types/node": "^14.6.2",+ "extract-zip": "^1.0.3"+ },+ "dependencies": {+ "@electron/get": {+ "version": "1.14.1",+ "resolved": "https://registry.npmjs.org/@electron/get/-/get-1.14.1.tgz",+ "integrity": "sha512-BrZYyL/6m0ZXz/lDxy/nlVhQz+WF+iPS6qXolEU8atw7h6v1aYkjwJZ63m+bJMBTxDE66X+r2tPS4a/8C82sZw==",+ "requires": {+ "debug": "^4.1.1",+ "env-paths": "^2.2.0",+ "fs-extra": "^8.1.0",+ "global-agent": "^3.0.0",+ "global-tunnel-ng": "^2.7.1",+ "got": "^9.6.0",+ "progress": "^2.0.3",+ "semver": "^6.2.0",+ "sumchecker": "^3.0.1"+ }+ },+ "@sindresorhus/is": {+ "version": "0.14.0",+ "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz",+ "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ=="+ },+ "@szmarczak/http-timer": {+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz",+ "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==",+ "requires": {+ "defer-to-connect": "^1.0.1"+ }+ },+ "@types/node": {+ "version": "14.18.36",+ "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.36.tgz",+ "integrity": "sha512-FXKWbsJ6a1hIrRxv+FoukuHnGTgEzKYGi7kilfMae96AL9UNkPFNWJEEYWzdRI9ooIkbr4AKldyuSTLql06vLQ=="+ },+ "cacheable-request": {+ "version": "6.1.0",+ "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz",+ "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==",+ "requires": {+ "clone-response": "^1.0.2",+ "get-stream": "^5.1.0",+ "http-cache-semantics": "^4.0.0",+ "keyv": "^3.0.0",+ "lowercase-keys": "^2.0.0",+ "normalize-url": "^4.1.0",+ "responselike": "^1.0.2"+ }+ },+ "decompress-response": {+ "version": "3.3.0",+ "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz",+ "integrity": "sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==",+ "requires": {+ "mimic-response": "^1.0.0"+ }+ },+ "defer-to-connect": {+ "version": "1.1.3",+ "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz",+ "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ=="+ },+ "extract-zip": {+ "version": "1.7.0",+ "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.7.0.tgz",+ "integrity": "sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA==",+ "requires": {+ "concat-stream": "^1.6.2",+ "debug": "^2.6.9",+ "mkdirp": "^0.5.4",+ "yauzl": "^2.10.0"+ },+ "dependencies": {+ "debug": {+ "version": "2.6.9",+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",+ "requires": {+ "ms": "2.0.0"+ }+ }+ }+ },+ "fs-extra": {+ "version": "8.1.0",+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",+ "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",+ "requires": {+ "graceful-fs": "^4.2.0",+ "jsonfile": "^4.0.0",+ "universalify": "^0.1.0"+ }+ },+ "got": {+ "version": "9.6.0",+ "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz",+ "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==",+ "requires": {+ "@sindresorhus/is": "^0.14.0",+ "@szmarczak/http-timer": "^1.1.2",+ "cacheable-request": "^6.0.0",+ "decompress-response": "^3.3.0",+ "duplexer3": "^0.1.4",+ "get-stream": "^4.1.0",+ "lowercase-keys": "^1.0.1",+ "mimic-response": "^1.0.1",+ "p-cancelable": "^1.0.0",+ "to-readable-stream": "^1.0.0",+ "url-parse-lax": "^3.0.0"+ },+ "dependencies": {+ "get-stream": {+ "version": "4.1.0",+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",+ "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",+ "requires": {+ "pump": "^3.0.0"+ }+ },+ "lowercase-keys": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz",+ "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA=="+ }+ }+ },+ "json-buffer": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz",+ "integrity": "sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ=="+ },+ "keyv": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz",+ "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==",+ "requires": {+ "json-buffer": "3.0.0"+ }+ },+ "normalize-url": {+ "version": "4.5.1",+ "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz",+ "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA=="+ },+ "p-cancelable": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz",+ "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw=="+ },+ "responselike": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz",+ "integrity": "sha512-/Fpe5guzJk1gPqdJLJR5u7eG/gNY4nImjbRDaVWVMRhne55TCmj2i9Q+54PBRfatRC8v/rIiv9BN0pMd9OV5EQ==",+ "requires": {+ "lowercase-keys": "^1.0.0"+ },+ "dependencies": {+ "lowercase-keys": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz",+ "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA=="+ }+ }+ },+ "semver": {+ "version": "6.3.0",+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="+ }}},"electron-builder": {@@ -13678,7 +14075,8 @@"emoji-regex": {"version": "8.0.0","resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",+ "devOptional": true},"encodeurl": {"version": "1.0.2",@@ -14022,6 +14420,7 @@"version": "2.0.1","resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz","integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==",+ "dev": true,"requires": {"@types/yauzl": "^2.9.1","debug": "^4.1.1",@@ -14353,6 +14752,8 @@"version": "3.0.2","resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz","integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==",+ "optional": true,+ "peer": true,"requires": {"aproba": "^1.0.3 || ^2.0.0","color-support": "^1.1.2",@@ -14494,6 +14895,18 @@"serialize-error": "^7.0.1"}},+ "global-tunnel-ng": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/global-tunnel-ng/-/global-tunnel-ng-2.7.1.tgz",+ "integrity": "sha512-4s+DyciWBV0eK148wqXxcmVAbFVPqtc3sEtUE/GTQfuU80rySLcMhUmHKSHI7/LDj8q0gDYI1lIhRRB7ieRAqg==",+ "optional": true,+ "requires": {+ "encodeurl": "^1.0.2",+ "lodash": "^4.17.10",+ "npm-conf": "^1.1.3",+ "tunnel": "^0.0.6"+ }+ },"globalthis": {"version": "1.0.3","resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz",@@ -14507,6 +14920,7 @@"version": "11.8.6","resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz","integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==",+ "dev": true,"requires": {"@sindresorhus/is": "^4.0.0","@szmarczak/http-timer": "^4.0.5",@@ -14576,7 +14990,8 @@"has-unicode": {"version": "2.0.1","resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",- "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk="+ "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=",+ "devOptional": true},"he": {"version": "1.2.0",@@ -14694,6 +15109,7 @@"version": "1.0.3","resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz","integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==",+ "dev": true,"requires": {"quick-lru": "^5.1.1","resolve-alpn": "^1.0.0"@@ -14889,7 +15305,8 @@"is-fullwidth-code-point": {"version": "3.0.0","resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",+ "devOptional": true},"is-function": {"version": "1.0.2",@@ -15215,7 +15632,8 @@"json-buffer": {"version": "3.0.1","resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",- "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ=="+ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",+ "dev": true},"json-parse-even-better-errors": {"version": "2.3.1",@@ -15283,6 +15701,7 @@"version": "4.5.2","resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.2.tgz","integrity": "sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==",+ "dev": true,"requires": {"json-buffer": "3.0.1"}@@ -15509,6 +15928,8 @@"version": "3.1.0","resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz","integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",+ "optional": true,+ "peer": true,"requires": {"semver": "^6.0.0"},@@ -15516,7 +15937,9 @@"semver": {"version": "6.3.0","resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",+ "optional": true,+ "peer": true}}},@@ -15789,7 +16212,9 @@"nan": {"version": "2.17.0","resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz",- "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ=="+ "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==",+ "optional": true,+ "peer": true},"nanoid": {"version": "3.1.30",@@ -15931,15 +16356,6 @@"string_decoder": "^1.1.1","util-deprecate": "^1.0.1"}- },- "rimraf": {- "version": "3.0.2",- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",- "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",- "dev": true,- "requires": {- "glob": "^7.1.3"- }}}},@@ -15959,6 +16375,7 @@"version": "5.0.0","resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz","integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==",+ "devOptional": true,"requires": {"abbrev": "1"}@@ -15996,12 +16413,33 @@"normalize-url": {"version": "6.1.0","resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz",- "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A=="+ "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==",+ "dev": true+ },+ "npm-conf": {+ "version": "1.1.3",+ "resolved": "https://registry.npmjs.org/npm-conf/-/npm-conf-1.1.3.tgz",+ "integrity": "sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==",+ "optional": true,+ "requires": {+ "config-chain": "^1.1.11",+ "pify": "^3.0.0"+ },+ "dependencies": {+ "pify": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",+ "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==",+ "optional": true+ }+ }},"npmlog": {"version": "5.0.1","resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz","integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==",+ "optional": true,+ "peer": true,"requires": {"are-we-there-yet": "^2.0.0","console-control-strings": "^1.1.0",@@ -16043,10 +16481,6 @@"integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==","optional": true},- "ocrad.js": {- "version": "git+ssh://[email protected]/antimatter15/ocrad.js.git#41daf0d2c2d0fc46db0633a6c6516af779b9f0bc",- "from": "ocrad.js@antimatter15/ocrad.js#master"- },"omggif": {"version": "1.0.10","resolved": "https://registry.npmjs.org/omggif/-/omggif-1.0.10.tgz",@@ -16149,7 +16583,8 @@"p-cancelable": {"version": "2.1.1","resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz",- "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg=="+ "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==",+ "dev": true},"p-limit": {"version": "2.2.1",@@ -16308,21 +16743,6 @@"pify": "^2.0.0"}},- "path2d-polyfill": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/path2d-polyfill/-/path2d-polyfill-2.0.1.tgz",- "integrity": "sha512-ad/3bsalbbWhmBo0D6FZ4RNMwsLsPpL6gnvhuSaU5Vm7b06Kr5ubSltQQ0T7YKsiJQO+g22zJ4dJKNTXIyOXtA=="- },- "pdfjs-dist": {- "version": "3.3.122",- "resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-3.3.122.tgz",- "integrity": "sha512-98WC09jOq3OuqrmF5+LZfcyzTlGA0sY9ocMBbWZ/H6Pwni7deptxwkNZVLieOz+4nSoTEW25PsfnfOj3ELrHdA==",- "requires": {- "canvas": "^2.11.0",- "path2d-polyfill": "^2.0.1",- "web-streams-polyfill": "^3.2.1"- }- },"peek-readable": {"version": "4.1.0","resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-4.1.0.tgz",@@ -16445,6 +16865,11 @@"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz","integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ="},+ "prepend-http": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz",+ "integrity": "sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA=="+ },"printj": {"version": "1.1.2","resolved": "https://registry.npmjs.org/printj/-/printj-1.1.2.tgz",@@ -16481,6 +16906,12 @@"retry": "^0.12.0"}},+ "proto-list": {+ "version": "1.2.4",+ "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz",+ "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==",+ "optional": true+ },"proxy-addr": {"version": "2.0.7","resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",@@ -16538,7 +16969,8 @@"quick-lru": {"version": "5.1.1","resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",- "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA=="+ "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==",+ "dev": true},"rand-token": {"version": "1.0.1",@@ -16831,7 +17263,8 @@"resolve-alpn": {"version": "1.2.1","resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz",- "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g=="+ "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==",+ "dev": true},"resolve-cwd": {"version": "3.0.0",@@ -16852,6 +17285,7 @@"version": "2.0.1","resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz","integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==",+ "dev": true,"requires": {"lowercase-keys": "^2.0.0"}@@ -16871,6 +17305,14 @@"resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz","integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs="},+ "rimraf": {+ "version": "3.0.2",+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",+ "requires": {+ "glob": "^7.1.3"+ }+ },"rndm": {"version": "1.2.0","resolved": "https://registry.npmjs.org/rndm/-/rndm-1.2.0.tgz",@@ -17160,7 +17602,8 @@"set-blocking": {"version": "2.0.0","resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",- "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="+ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",+ "devOptional": true},"setprototypeof": {"version": "1.1.1",@@ -17431,6 +17874,7 @@"version": "4.2.3","resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz","integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",+ "devOptional": true,"requires": {"emoji-regex": "^8.0.0","is-fullwidth-code-point": "^3.0.0",@@ -17446,6 +17890,7 @@"version": "6.0.1","resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz","integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",+ "devOptional": true,"requires": {"ansi-regex": "^5.0.1"}@@ -17681,16 +18126,6 @@"integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==","requires": {"rimraf": "^3.0.0"- },- "dependencies": {- "rimraf": {- "version": "3.0.2",- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",- "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",- "requires": {- "glob": "^7.1.3"- }- }}},"tmp-promise": {@@ -17702,6 +18137,11 @@"tmp": "^0.2.0"}},+ "to-readable-stream": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz",+ "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q=="+ },"to-regex-range": {"version": "5.0.1","resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",@@ -17777,6 +18217,12 @@"resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.6.tgz","integrity": "sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA=="},+ "tunnel": {+ "version": "0.0.6",+ "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",+ "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",+ "optional": true+ },"tunnel-agent": {"version": "0.6.0","resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",@@ -17923,6 +18369,14 @@"requires-port": "^1.0.0"}},+ "url-parse-lax": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz",+ "integrity": "sha512-NjFKA0DidqPa5ciFcSrXnAltTtzz84ogy+NebPvfEgAck0+TNg4UJ4IN+fB7zRZfbgUf0syOo9MDxFkDSMuFaQ==",+ "requires": {+ "prepend-http": "^2.0.0"+ }+ },"utf8-byte-length": {"version": "1.0.4","resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz",@@ -18003,11 +18457,6 @@"defaults": "^1.0.3"}},- "web-streams-polyfill": {- "version": "3.2.1",- "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz",- "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q=="- },"webidl-conversions": {"version": "7.0.0","resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",@@ -18136,6 +18585,7 @@"version": "1.1.5","resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz","integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==",+ "devOptional": true,"requires": {"string-width": "^1.0.2 || 2 || 3 || 4"}diff --git a/package.json b/package.jsonindex 252763cb22..599c24dd13 100644--- a/package.json+++ b/package.json@@ -19,12 +19,14 @@"start-electron-no-dir": "cross-env TRILIUM_ENV=dev TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 electron --inspect=5858 .","switch-server": "rm -rf ./node_modules/better-sqlite3 && npm install","switch-electron": "rm -rf ./node_modules/better-sqlite3 && npm install && ./node_modules/.bin/electron-rebuild",- "build-api-docs": "./bin/build-api-docs.sh",+ "build-backend-docs": "rm -rf ./docs/backend_api && ./node_modules/.bin/jsdoc -c jsdoc-conf.json -d ./docs/backend_api src/becca/entities/*.js src/services/backend_script_api.js src/services/sql.js",+ "build-frontend-docs": "rm -rf ./docs/frontend_api && ./node_modules/.bin/jsdoc -c jsdoc-conf.json -d ./docs/frontend_api src/public/app/entities/*.js src/public/app/services/frontend_script_api.js src/public/app/widgets/collapsible_widget.js",+ "build-docs": "npm run build-backend-docs && npm run build-frontend-docs","webpack": "npx webpack -c webpack-desktop.config.js && npx webpack -c webpack-mobile.config.js && npx webpack -c webpack-setup.config.js","test-jasmine": "jasmine","test-es6": "node -r esm spec-es6/attribute_parser.spec.js ","test": "npm run test-jasmine && npm run test-es6",- "postinstall": "node src-build/fix_pdfjs.js"+ "postinstall": "rimraf ./node_modules/canvas"},"dependencies": {"@braintree/sanitize-url": "6.0.2",@@ -33,8 +35,7 @@"archiver": "5.3.1","async-mutex": "0.4.0","axios": "1.3.3",- "better-sqlite3": "8.1.0",- "canvas": "2.11.0",+ "better-sqlite3": "7.4.5","chokidar": "3.5.3","cls-hooked": "4.2.2","commonmark": "0.30.0",@@ -70,13 +71,12 @@"multer": "1.4.5-lts.1","node-abi": "3.33.0","normalize-strings": "1.1.1",- "ocrad.js": "antimatter15/ocrad.js#master","open": "8.4.1",- "pdfjs-dist": "3.3.122","rand-token": "1.0.1","react": "17.0.2","react-dom": "17.0.2","request": "2.88.2",+ "rimraf": "3.0.2","safe-compare": "1.1.4","sanitize-filename": "1.6.3","sanitize-html": "2.9.0",@@ -95,7 +95,7 @@},"devDependencies": {"cross-env": "7.0.3",- "electron": "23.0.0",+ "electron": "16.2.8","electron-builder": "23.6.0","electron-packager": "17.1.1","electron-rebuild": "3.2.9",diff --git a/spec/search/becca_mocking.js b/spec/search/becca_mocking.jsindex 78a3229bbd..867e22ac6f 100644--- a/spec/search/becca_mocking.js+++ b/spec/search/becca_mocking.js@@ -1,6 +1,6 @@-const Note = require('../../src/becca/entities/bnote');-const Branch = require('../../src/becca/entities/bbranch');-const Attribute = require('../../src/becca/entities/battribute');+const BNote = require('../../src/becca/entities/bnote');+const BBranch = require('../../src/becca/entities/bbranch');+const BAttribute = require('../../src/becca/entities/battribute');const becca = require('../../src/becca/becca');const randtoken = require('rand-token').generator({source: 'crypto'});diff --git a/spec/search/search.spec.js b/spec/search/search.spec.jsindex 5fd196545c..b4ff76c3ab 100644--- a/spec/search/search.spec.js+++ b/spec/search/search.spec.js@@ -1,4 +1,6 @@const searchService = require('../../src/services/search/services/search');+const BNote = require('../../src/becca/entities/bnote');+const BBranch = require('../../src/becca/entities/bbranch');const SearchContext = require('../../src/services/search/search_context');const dateUtils = require('../../src/services/date_utils');const becca = require('../../src/becca/becca');diff --git a/src-build/docs-website/build_docs_website.js b/src-build/docs-website/build_docs_website.jsdeleted file mode 100644index bdcb913c53..0000000000--- a/src-build/docs-website/build_docs_website.js+++ /dev/null@@ -1,129 +0,0 @@-const fs = require("fs-extra");-const utils = require("../../src/services/utils");-const html = require("html");--const SRC_DIR = './src-build/docs-website';-const USER_GUIDE_DIR = './docs/user_guide';-const META_PATH = USER_GUIDE_DIR + '/!!!meta.json';-const WEB_TMP_DIR = './tmp/user_guide_web';-fs.copySync(USER_GUIDE_DIR, WEB_TMP_DIR);--const meta = JSON.parse(readFile(META_PATH));-const rootNoteMeta = meta.files[0];-const noteIdToMeta = {};-createNoteIdToMetaMapping(rootNoteMeta);--addNavigationAndStyle(rootNoteMeta, WEB_TMP_DIR);--fs.writeFileSync(WEB_TMP_DIR + '/main.js', readFile(SRC_DIR + "/main.js"));-fs.writeFileSync(WEB_TMP_DIR + '/main.css', readFile(SRC_DIR + "/main.css"));-fs.cpSync('libraries/ckeditor/ckeditor-content.css' ,WEB_TMP_DIR + '/ckeditor-content.css');--function addNavigationAndStyle(noteMeta, parentDirPath) {- const nav = createNavigation(rootNoteMeta, noteMeta);-- if (noteMeta.dataFileName) {- const filePath = parentDirPath + "/" + noteMeta.dataFileName;-- console.log(`Adding nav to ${filePath}`);-- const content = readFile(filePath);- const depth = noteMeta.notePath.length - 1;- const updatedContent = content- .replaceAll("</head>", `-<link rel="stylesheet" href="${"../".repeat(depth)}main.css">-<link rel="stylesheet" href="${"../".repeat(depth)}ckeditor-content.css">-<script src="${"../".repeat(depth)}main.js"></script>`)- .replaceAll("</body>", nav + "</body>");- const prettified = html.prettyPrint(updatedContent, {indent_size: 2});- fs.writeFileSync(filePath, prettified);- }-- for (const childNoteMeta of noteMeta.children || []) {- addNavigationAndStyle(childNoteMeta, parentDirPath + '/' + noteMeta.dirFileName);- }-}--function createNavigation(rootMeta, sourceMeta) {- function saveNavigationInner(meta, parentNoteId = 'root') {- let html = `<li data-branch-id="${parentNoteId}_${meta.noteId}">`;-- const escapedTitle = utils.escapeHtml(`${meta.prefix ? `${meta.prefix} - ` : ''}${meta.title}`);-- if (meta.dataFileName) {- const targetUrl = getTargetUrl(meta.noteId, sourceMeta);-- html += `<a href="${targetUrl}">${escapedTitle}</a>`;- }- else {- html += escapedTitle;- }-- if (meta.children && meta.children.length > 0) {- html += '<ul>';-- for (const child of meta.children) {- html += saveNavigationInner(child, meta.noteId);- }-- html += '</ul>'- }-- return `${html}</li>`;- }-- return `<nav class="note-tree-nav"><ul>${saveNavigationInner(rootMeta)}</ul></nav>`;-}--function createNoteIdToMetaMapping(noteMeta) {- noteIdToMeta[noteMeta.noteId] = noteMeta;-- for (const childNoteMeta of noteMeta.children || []) {- createNoteIdToMetaMapping(childNoteMeta);- }-}--function getTargetUrl(targetNoteId, sourceMeta) {- const targetMeta = noteIdToMeta[targetNoteId];-- if (!targetMeta) {- throw new Error(`Could not find note meta for noteId '${targetNoteId}'`);- }-- const targetPath = targetMeta.notePath.slice();- const sourcePath = sourceMeta.notePath.slice();-- // > 1 for edge case that targetPath and sourcePath are exact same (link to itself)- while (targetPath.length > 1 && sourcePath.length > 1 && targetPath[0] === sourcePath[0]) {- targetPath.shift();- sourcePath.shift();- }-- let url = "../".repeat(sourcePath.length - 1);-- for (let i = 0; i < targetPath.length - 1; i++) {- const meta = noteIdToMeta[targetPath[i]];-- if (!meta) {- throw new Error(`Cannot resolve note '${targetPath[i]}' from path '${targetPath.toString()}'`);- }-- url += `${encodeURIComponent(meta.dirFileName)}/`;- }-- const targetPathNoteId = targetPath[targetPath.length - 1];- const meta = noteIdToMeta[targetPathNoteId];-- if (!meta) {- throw new Error(`Cannot resolve note '${targetPathNoteId}' from path '${targetPath.toString()}'`);- }-- // link can target note which is only "folder-note" and as such will not have a file in an export- url += encodeURIComponent(meta.dataFileName || meta.dirFileName);-- return url;-}--function readFile(filePath) {- return fs.readFileSync(filePath).toString();-}diff --git a/src-build/docs-website/main.css b/src-build/docs-website/main.cssdeleted file mode 100644index 7ae2ed2183..0000000000--- a/src-build/docs-website/main.css+++ /dev/null@@ -1,45 +0,0 @@-body {- display: flex;- flex-direction: row-reverse;- width: 1100px;- margin: auto;- font-family: 'Lucida Grande', 'Lucida Sans Unicode', arial, sans-serif;-}--.note-tree-nav {- padding-top: 10px;- width: 300px;- margin-right: 20px;- overflow-x: auto;-}--.note-tree-nav ul {- padding-left: 20px;- list-style-type: none;-}--.note-tree-nav ul li {- line-height: 150%;- font-size: 105%;-}--.note-tree-nav > ul > li > a {- font-size: x-large;-}--.note-tree-nav a {- text-decoration: none;-}--.note-tree-nav li span.expander, .note-tree-nav li span.spacer {- width: 1em;- display: inline-block;-}--.note-tree-nav li span.expander {- cursor: pointer;-}--.content {- width: 780px;-}diff --git a/src-build/docs-website/main.js b/src-build/docs-website/main.jsdeleted file mode 100644index 16c04cd58c..0000000000--- a/src-build/docs-website/main.js+++ /dev/null@@ -1,30 +0,0 @@-document.addEventListener('DOMContentLoaded', function () {- for (const li of document.querySelectorAll('.note-tree-nav li')) {- const branchId = li.getAttribute("data-branch-id");- if (branchId.startsWith("root_")) {- // first level is expanded and cannot be collapsed- continue;- }-- const newDiv = document.createElement("span");- const subList = li.querySelector('ul');-- if (subList) {- const toggleVisibility = (show) => {- newDiv.innerHTML = show ? "▾ " : "▸ ";- subList.style.display = show ? 'block' : 'none';-- localStorage.setItem(branchId, show ? "true" : "false");- };-- newDiv.classList.add("expander");- newDiv.addEventListener('click', () => toggleVisibility(subList.style.display === 'none'));-- toggleVisibility(localStorage.getItem(branchId) === "true");- } else {- newDiv.classList.add("spacer");- }-- li.prepend(newDiv);- }-}, false);diff --git a/src-build/fix_pdfjs.js b/src-build/fix_pdfjs.jsdeleted file mode 100644index 7bf78bb304..0000000000--- a/src-build/fix_pdfjs.js+++ /dev/null@@ -1,12 +0,0 @@-const fs = require("fs");--const PACKAGE_JSON_PATH = './node_modules/pdfjs-dist/package.json';--const packageJson = JSON.parse(- fs.readFileSync(PACKAGE_JSON_PATH).toString()-);--// non-legacy build doesn't work on node 16 at least-packageJson.main = "legacy/build/pdf.js";--fs.writeFileSync(PACKAGE_JSON_PATH, JSON.stringify(packageJson, null, 2));\ No newline at end of filediff --git a/src-build/transform_api_docs.js b/src-build/transform_api_docs.jsdeleted file mode 100644index ed944481df..0000000000--- a/src-build/transform_api_docs.js+++ /dev/null@@ -1,260 +0,0 @@-const sanitizeHtml = require('sanitize-html');--const fs = require("fs");-const path = require("path");-const html = require("html");--const TMP_API_DOCS = './tmp/api_docs';-const TMP_FE_DOCS = TMP_API_DOCS + '/frontend_api';-const TMP_BE_DOCS = TMP_API_DOCS + '/backend_api';--const sourceFiles = getFilesRecursively(TMP_API_DOCS);--for (const sourcePath of sourceFiles) {- const content = fs.readFileSync(sourcePath).toString();- const transformedContent = transform(content);- const prettifiedContent = html.prettyPrint(transformedContent, {indent_size: 2});- const filteredContent = prettifiedContent- .replace(/<br \/>Documentation generated by <a href="https:\/\/github.com\/jsdoc\/jsdoc">[^<]+<\/a>/gi, '')- .replace(/JSDoc: (Class|Module): [a-z]+/gi, '');-- const destPath = sourcePath.replaceAll("tmp", "docs");-- fs.mkdirSync(path.dirname(destPath), {recursive: true});- fs.writeFileSync(destPath, filteredContent.trim());-- console.log(destPath);-}--const USER_GUIDE_DIR = './docs/user_guide';-const META_PATH = USER_GUIDE_DIR + '/!!!meta.json';--const meta = JSON.parse(fs.readFileSync(META_PATH).toString());-const rootNoteMeta = meta.files[0];--const {noteMeta: scriptApiDocsRoot, filePath: scriptApiDocsRootFilePath, notePath: scriptApiDocsRootNotePath} =- findNoteMeta(rootNoteMeta, 'Script API', []);-const BE_FILES = ['AbstractBeccaEntity', 'BAttribute', 'BBranch', 'BEtapiToken', 'BNote', 'BNoteRevision', 'BOption', 'BRecentNote', 'module-sql'];--const FE_FILES = ['FNote', 'FAttribute', 'FBranch', 'FNoteComplement'];--scriptApiDocsRoot.dirFileName = scriptApiDocsRoot.dataFileName.substr(0, scriptApiDocsRoot.dataFileName.length - 5);-scriptApiDocsRoot.children = getScriptApiMeta();--fs.writeFileSync(META_PATH, JSON.stringify(meta, null, 2));-const scriptApiDocsRootDir = USER_GUIDE_DIR + scriptApiDocsRootFilePath;--fs.mkdirSync(scriptApiDocsRootDir, {recursive: true});-fs.mkdirSync(scriptApiDocsRootDir + '/BackendScriptApi', {recursive: true});-fs.mkdirSync(scriptApiDocsRootDir + '/FrontendScriptApi', {recursive: true});--const BE_ROOT = scriptApiDocsRootDir + '/BackendScriptApi.html';-const FE_ROOT = scriptApiDocsRootDir + '/FrontendScriptApi.html';--fs.copyFileSync(TMP_BE_DOCS + '/BackendScriptApi.html', BE_ROOT);-fs.copyFileSync(TMP_FE_DOCS + '/FrontendScriptApi.html', FE_ROOT);--for (const file of BE_FILES) {- fs.copyFileSync(TMP_BE_DOCS + '/' + file + '.html', `${scriptApiDocsRootDir}/BackendScriptApi/${file}.html`);-}-rewriteLinks(BE_ROOT, BE_FILES, 'BackendScriptApi');--for (const file of FE_FILES) {- fs.copyFileSync(TMP_FE_DOCS + '/' + file + '.html', `${scriptApiDocsRootDir}/FrontendScriptApi/${file}.html`);-}-rewriteLinks(FE_ROOT, FE_FILES, 'FrontendScriptApi');--fs.rmSync(USER_GUIDE_DIR + '/index.html', {force: true});-fs.rmSync(USER_GUIDE_DIR + '/navigation.html', {force: true});-fs.rmSync(USER_GUIDE_DIR + '/style.css', {force: true});----------function getFilesRecursively(directory) {- const files = [];-- function getFilesRecursivelyInner(directory) {- const filesInDirectory = fs.readdirSync(directory);- for (const file of filesInDirectory) {- const absolute = path.join(directory, file);- if (fs.statSync(absolute).isDirectory()) {- getFilesRecursivelyInner(absolute);- } else if (file.endsWith('.html')) {- files.push(absolute);- }- }- }-- getFilesRecursivelyInner(directory);-- return files;-}--function transform(content) {- const result = sanitizeHtml(content, {- allowedTags: [- 'h4', 'h5', 'h6', 'blockquote', 'p', 'a', 'ul', 'ol',- 'li', 'b', 'i', 'strong', 'em', 'strike', 's', 'del', 'abbr', 'code', 'hr', 'br', 'div',- 'table', 'thead', 'caption', 'tbody', 'tr', 'th', 'td', 'pre', 'section', 'img',- 'figure', 'figcaption', 'span', 'label', 'input',- ],- nonTextTags: [ 'style', 'script', 'textarea', 'option', 'h1', 'h2', 'h3', 'nav' ],- allowedAttributes: {- 'a': [ 'href', 'class', 'data-note-path' ],- 'img': [ 'src' ],- 'section': [ 'class', 'data-note-id' ],- 'figure': [ 'class' ],- 'span': [ 'class', 'style' ],- 'label': [ 'class' ],- 'input': [ 'class', 'type', 'disabled' ],- 'code': [ 'class' ],- 'ul': [ 'class' ],- 'table': [ 'class' ],- 'en-media': [ 'hash' ]- },- allowedSchemes: ['http', 'https', 'ftp', 'mailto', 'data', 'evernote'],- transformTags: {- // 'h5': sanitizeHtml.simpleTransform('strong', {}, false),- 'table': sanitizeHtml.simpleTransform('table', {}, false)- },- });-- return result.replace(/<table>/gi, '<figure class="table"><table>')- .replace(/<\/table>/gi, '</table></figure>')- .replace(/<div><\/div>/gi, '')- .replace(/<h5>/gi, '<p><strong>')- .replace(/<\/h5>/gi, '</strong></p>')- .replace(/<h4>/gi, '<h2>')- .replace(/<\/h4>/gi, '</h2>')- .replace(/<span class="signature-attributes">opt<\/span>/gi, '')- .replace(/<h2>.*new (BackendScriptApi|FrontendScriptApi).*<\/h2>/gi, '')- ;-}--function findNoteMeta(noteMeta, name, notePath) {- if (noteMeta.title === name) {- return {- noteMeta,- filePath: '/' + noteMeta.dirFileName,- notePath- };- }-- for (const childMeta of noteMeta.children || []) {- const ret = findNoteMeta(childMeta, name, [...notePath, childMeta.noteId]);-- if (ret) {- return {- noteMeta: ret.noteMeta,- filePath: '/' + noteMeta.dirFileName + ret.filePath,- notePath: ret.notePath- };- }- }-- return null;-}--function rewriteLinks(rootFilePath, files, dir) {- let content = fs.readFileSync(rootFilePath).toString();-- for (const file of files) {- content = content.replaceAll(`href="${file}.html"`, `href="${dir}/${file}.html"`);- }-- fs.writeFileSync(rootFilePath, content);-}--function createChildren(files, notePath) {- let positionCounter = 0;-- const camelCase = name => {- if (name === 'module-sql') {- return 'moduleSql';- } else if (/[^a-z]+/i.test(name)) {- throw new Error(`Bad name '${name}'`);- }-- return name.charAt(0).toLowerCase() + name.substr(1);- };-- return files.map(file => {- positionCounter += 10;-- const noteId = "_" + camelCase(file);-- return {- "isClone": false,- "noteId": noteId,- "notePath": [- ...notePath,- '_' + camelCase(file)- ],- "title": file,- "notePosition": positionCounter,- "prefix": null,- "isExpanded": false,- "type": "text",- "mime": "text/html",- "attributes": [],- "format": "html",- "dataFileName": file + ".html"- }- });-}--function getScriptApiMeta() {- return [- {- "isClone": false,- "noteId": "_frontendApi",- "notePath": [- ...scriptApiDocsRootNotePath,- "_frontendApi"- ],- "title": "API docs",- "notePosition": 10,- "prefix": null,- "isExpanded": false,- "type": "text",- "mime": "text/html",- "attributes": [],- "format": "html",- "dataFileName": "FrontendScriptApi.html",- "dirFileName": "FrontendScriptApi",- "children": createChildren(FE_FILES, [- ...scriptApiDocsRootNotePath,- "_frontendApi"- ])- },- {- "isClone": false,- "noteId": "_backendApi",- "notePath": [- ...scriptApiDocsRootNotePath,- "_backendApi"- ],- "title": "API docs",- "notePosition": 20,- "prefix": null,- "isExpanded": false,- "type": "text",- "mime": "text/html",- "attributes": [],- "format": "html",- "dataFileName": "BackendScriptApi.html",- "dirFileName": "BackendScriptApi",- "children": createChildren(BE_FILES, [- ...scriptApiDocsRootNotePath,- "_backendApi"- ])- }- ];-}-diff --git a/src/becca/becca.js b/src/becca/becca.jsindex 3f142f35b5..60422e6725 100644--- a/src/becca/becca.js+++ b/src/becca/becca.js@@ -121,14 +121,6 @@ class Becca {return row ? new BNoteRevision(row) : null;}- /** @returns {BNoteAncillary|null} */- getNoteAncillary(noteAncillaryId) {- const row = sql.getRow("SELECT * FROM note_ancillaries WHERE noteAncillaryId = ?", [noteAncillaryId]);-- const BNoteAncillary = require("./entities/bnote_ancillary"); // avoiding circular dependency problems- return row ? new BNoteAncillary(row) : null;- }-/** @returns {BOption|null} */getOption(name) {return this.options[name];@@ -151,8 +143,6 @@ class Becca {if (entityName === 'note_revisions') {return this.getNoteRevision(entityId);- } else if (entityName === 'note_ancillaries') {- return this.getNoteAncillary(entityId);}const camelCaseEntityName = entityName.toLowerCase().replace(/(_[a-z])/g,diff --git a/src/becca/entities/bbranch.js b/src/becca/entities/bbranch.jsindex 06912b9fb6..18b19588cb 100644--- a/src/becca/entities/bbranch.js+++ b/src/becca/entities/bbranch.js@@ -198,10 +198,6 @@ class BBranch extends AbstractBeccaEntity {relation.markAsDeleted(deleteId);}- for (const noteAncillary of note.getNoteAncillaries()) {- noteAncillary.markAsDeleted(deleteId);- }-note.markAsDeleted(deleteId);return true;diff --git a/src/becca/entities/bnote.js b/src/becca/entities/bnote.jsindex daa1374a17..8a752058a0 100644--- a/src/becca/entities/bnote.js+++ b/src/becca/entities/bnote.js@@ -8,7 +8,6 @@ const dateUtils = require('../../services/date_utils');const entityChangesService = require('../../services/entity_changes');const AbstractBeccaEntity = require("./abstract_becca_entity");const BNoteRevision = require("./bnote_revision");-const BNoteAncillary = require("./bnote_ancillary");const TaskContext = require("../../services/task_context");const dayjs = require("dayjs");const utc = require('dayjs/plugin/utc');@@ -19,7 +18,7 @@ const LABEL = 'label';const RELATION = 'relation';/**- * Trilium's main entity which can represent text note, image, code note, file ancillary etc.+ * Trilium's main entity which can represent text note, image, code note, file attachment etc.** @extends AbstractBeccaEntity*/@@ -337,7 +336,7 @@ class BNote extends AbstractBeccaEntity {return this.mime === "application/json";}- /** @returns {boolean} true if this note is JavaScript (code or ancillary) */+ /** @returns {boolean} true if this note is JavaScript (code or attachment) */isJavaScript() {return (this.type === "code" || this.type === "file" || this.type === 'launcher')&& (this.mime.startsWith("application/javascript")@@ -1136,19 +1135,6 @@ class BNote extends AbstractBeccaEntity {.map(row => new BNoteRevision(row));}- /** @returns {BNoteAncillary[]} */- getNoteAncillaries() {- return sql.getRows("SELECT * FROM note_ancillaries WHERE noteId = ? AND isDeleted = 0", [this.noteId])- .map(row => new BNoteAncillary(row));- }-- /** @returns {BNoteAncillary|undefined} */- getNoteAncillaryByName(name) {- return sql.getRows("SELECT * FROM note_ancillaries WHERE noteId = ? AND name = ? AND isDeleted = 0", [this.noteId, name])- .map(row => new BNoteAncillary(row))- [0];- }-/*** @returns {string[][]} - array of notePaths (each represented by array of noteIds constituting the particular note path)*/@@ -1478,31 +1464,6 @@ class BNote extends AbstractBeccaEntity {return noteRevision;}- /**- * @returns {BNoteAncillary}- */- saveNoteAncillary(name, mime, content) {- let noteAncillary = this.getNoteAncillaryByName(name);-- if (noteAncillary- && noteAncillary.mime === mime- && noteAncillary.contentCheckSum === noteAncillary.calculateCheckSum(content)) {-- return noteAncillary; // no change- }-- noteAncillary = new BNoteAncillary({- noteId: this.noteId,- name,- mime,- isProtected: this.isProtected- });-- noteAncillary.setContent(content);-- return noteAncillary;- }-beforeSaving() {super.beforeSaving();diff --git a/src/becca/entities/bnote_ancillary.js b/src/becca/entities/bnote_ancillary.jsdeleted file mode 100644index 6008893910..0000000000--- a/src/becca/entities/bnote_ancillary.js+++ /dev/null@@ -1,161 +0,0 @@-"use strict";--const protectedSessionService = require('../../services/protected_session');-const utils = require('../../services/utils');-const sql = require('../../services/sql');-const dateUtils = require('../../services/date_utils');-const becca = require('../becca');-const entityChangesService = require('../../services/entity_changes');-const AbstractBeccaEntity = require("./abstract_becca_entity");--/**- * NoteAncillary represent data related/attached to the note. Conceptually similar to attributes, but intended for- * larger amounts of data and generally not accessible to the user.- *- * @extends AbstractBeccaEntity- */-class BNoteAncillary extends AbstractBeccaEntity {- static get entityName() { return "note_ancillaries"; }- static get primaryKeyName() { return "noteAncillaryId"; }- static get hashedProperties() { return ["noteAncillaryId", "noteId", "name", "content", "utcDateModified"]; }-- constructor(row) {- super();-- if (!row.noteId) {- throw new Error("'noteId' must be given to initialize a NoteAncillary entity");- }-- if (!row.name) {- throw new Error("'name' must be given to initialize a NoteAncillary entity");- }-- /** @type {string} needs to be set at the initialization time since it's used in the .setContent() */- this.noteAncillaryId = row.noteAncillaryId || `${this.noteId}_${this.name}`;- /** @type {string} */- this.noteId = row.noteId;- /** @type {string} */- this.name = row.name;- /** @type {string} */- this.mime = row.mime;- /** @type {boolean} */- this.isProtected = !!row.isProtected;- /** @type {string} */- this.contentCheckSum = row.contentCheckSum;- /** @type {string} */- this.utcDateModified = row.utcDateModified;- }-- getNote() {- return becca.notes[this.noteId];- }-- /** @returns {boolean} true if the note has string content (not binary) */- isStringNote() {- return utils.isStringNote(this.type, this.mime);- }-- /** @returns {*} */- getContent(silentNotFoundError = false) {- const res = sql.getRow(`SELECT content FROM note_ancillary_contents WHERE noteAncillaryId = ?`, [this.noteAncillaryId]);-- if (!res) {- if (silentNotFoundError) {- return undefined;- }- else {- throw new Error(`Cannot find note ancillary content for noteAncillaryId=${this.noteAncillaryId}`);- }- }-- let content = res.content;-- if (this.isProtected) {- if (protectedSessionService.isProtectedSessionAvailable()) {- content = protectedSessionService.decrypt(content);- }- else {- content = "";- }- }-- if (this.isStringNote()) {- return content === null- ? ""- : content.toString("UTF-8");- }- else {- return content;- }- }-- setContent(content) {- sql.transactional(() => {- this.contentCheckSum = this.calculateCheckSum(content);- this.save(); // also explicitly save note_ancillary to update contentCheckSum-- const pojo = {- noteAncillaryId: this.noteAncillaryId,- content: content,- utcDateModified: dateUtils.utcNowDateTime()- };-- if (this.isProtected) {- if (protectedSessionService.isProtectedSessionAvailable()) {- pojo.content = protectedSessionService.encrypt(pojo.content);- } else {- throw new Error(`Cannot update content of noteAncillaryId=${this.noteAncillaryId} since we're out of protected session.`);- }- }-- sql.upsert("note_ancillary_contents", "noteAncillaryId", pojo);-- entityChangesService.addEntityChange({- entityName: 'note_ancillary_contents',- entityId: this.noteAncillaryId,- hash: this.contentCheckSum,- isErased: false,- utcDateChanged: pojo.utcDateModified,- isSynced: true- });- });- }-- calculateCheckSum(content) {- return utils.hash(`${this.noteAncillaryId}|${content.toString()}`);- }-- beforeSaving() {- if (!this.name.match(/^[a-z0-9]+$/i)) {- throw new Error(`Name must be alphanumerical, "${this.name}" given.`);- }-- this.noteAncillaryId = `${this.noteId}_${this.name}`;-- super.beforeSaving();-- this.utcDateModified = dateUtils.utcNowDateTime();- }-- getPojo() {- return {- noteAncillaryId: this.noteAncillaryId,- noteId: this.noteId,- name: this.name,- mime: this.mime,- isProtected: !!this.isProtected,- contentCheckSum: this.contentCheckSum,- isDeleted: false,- utcDateModified: this.utcDateModified- };- }-- getPojoToSave() {- const pojo = this.getPojo();- delete pojo.content; // not getting persisted-- return pojo;- }-}--module.exports = BNoteAncillary;diff --git a/src/becca/entity_constructor.js b/src/becca/entity_constructor.jsindex 2b2cdf3c79..17f1868544 100644--- a/src/becca/entity_constructor.js+++ b/src/becca/entity_constructor.js@@ -1,6 +1,5 @@const BNote = require('./entities/bnote');const BNoteRevision = require('./entities/bnote_revision');-const BNoteAncillary = require("./entities/bnote_ancillary");const BBranch = require('./entities/bbranch');const BAttribute = require('./entities/battribute');const BRecentNote = require('./entities/brecent_note');@@ -14,8 +13,6 @@ const ENTITY_NAME_TO_ENTITY = {"note_contents": BNote,"note_revisions": BNoteRevision,"note_revision_contents": BNoteRevision,- "note_ancillaries": BNoteAncillary,- "note_ancillary_contents": BNoteAncillary,"recent_notes": BRecentNote,"etapi_tokens": BEtapiToken,"options": BOptiondiff --git a/src/public/app/components/root_command_executor.js b/src/public/app/components/root_command_executor.jsindex 12bf68156e..a3d41e48a2 100644--- a/src/public/app/components/root_command_executor.js+++ b/src/public/app/components/root_command_executor.js@@ -124,12 +124,4 @@ export default class RootCommandExecutor extends Component {await appContext.tabManager.openContextWithNote(notePath, { activate: true, viewMode: 'source' });}}-- async showNoteAncillariesCommand() {- const notePath = appContext.tabManager.getActiveContextNotePath();-- if (notePath) {- await appContext.tabManager.openContextWithNote(notePath, { activate: true, viewMode: 'ancillaries' });- }- }}diff --git a/src/public/app/entities/fnote.js b/src/public/app/entities/fnote.jsindex 950e318a58..7078cecae9 100644--- a/src/public/app/entities/fnote.js+++ b/src/public/app/entities/fnote.js@@ -803,7 +803,7 @@ class FNote {return labels.length > 0 ? labels[0].value : "";}- /** @returns {boolean} true if this note is JavaScript (code or ancillary) */+ /** @returns {boolean} true if this note is JavaScript (code or file) */isJavaScript() {return (this.type === "code" || this.type === "file" || this.type === 'launcher')&& (this.mime.startsWith("application/javascript")diff --git a/src/public/app/services/froca_updater.js b/src/public/app/services/froca_updater.jsindex a858f64eaa..64eb653c06 100644--- a/src/public/app/services/froca_updater.js+++ b/src/public/app/services/froca_updater.js@@ -36,7 +36,7 @@ async function processEntityChanges(entityChanges) {loadResults.addOption(ec.entity.name);}- else if (['etapi_tokens', 'note_ancillaries', 'note_ancillary_contents'].includes(ec.entityName)) {+ else if (['etapi_tokens'].includes(ec.entityName)) {// NOOP}else {diff --git a/src/public/app/widgets/buttons/note_actions.js b/src/public/app/widgets/buttons/note_actions.jsindex b75c118a5f..fb2c199189 100644--- a/src/public/app/widgets/buttons/note_actions.js+++ b/src/public/app/widgets/buttons/note_actions.js@@ -28,7 +28,6 @@ const TPL = `<a data-trigger-command="renderActiveNote" class="dropdown-item render-note-button"><kbd data-command="renderActiveNote"></kbd> Re-render note</a><a data-trigger-command="findInText" class="dropdown-item find-in-text-button">Search in note <kbd data-command="findInText"></a><a data-trigger-command="showNoteSource" class="dropdown-item show-source-button"><kbd data-command="showNoteSource"></kbd> Note source</a>- <a data-trigger-command="showNoteAncillaries" class="dropdown-item"><kbd data-command="showNoteAncillaries"></kbd> Note ancillaries</a><a data-trigger-command="openNoteExternally" class="dropdown-item open-note-externally-button"><kbd data-command="openNoteExternally"></kbd> Open note externally</a><a class="dropdown-item import-files-button">Import files</a><a class="dropdown-item export-note-button">Export note</a>diff --git a/src/public/app/widgets/mermaid.js b/src/public/app/widgets/mermaid.jsindex 2376be7791..d07ce83e0f 100644--- a/src/public/app/widgets/mermaid.js+++ b/src/public/app/widgets/mermaid.js@@ -78,14 +78,6 @@ export default class MermaidWidget extends NoteContextAwareWidget {await this.renderSvg(async renderedSvg => {this.$display.html(renderedSvg);- // not awaiting intentionally- // this is pretty hacky since we update ancillary on render- // but if nothing changed this should not trigger DB write and sync- server.put(`notes/${note.noteId}/ancillaries/mermaidSvg`, {- mime: 'image/svg+xml',- content: renderedSvg- });-await wheelZoomLoaded;this.$display.attr("id", `mermaid-render-${idCounter}`);diff --git a/src/public/app/widgets/note_detail.js b/src/public/app/widgets/note_detail.jsindex 8c2c496957..4dfa9a2d75 100644--- a/src/public/app/widgets/note_detail.js+++ b/src/public/app/widgets/note_detail.js@@ -27,7 +27,6 @@ import NoteMapTypeWidget from "./type_widgets/note_map.js";import WebViewTypeWidget from "./type_widgets/web_view.js";import DocTypeWidget from "./type_widgets/doc.js";import ContentWidgetTypeWidget from "./type_widgets/content_widget.js";-import AncillariesTypeWidget from "./type_widgets/ancillaries.js";const TPL = `<div class="note-detail">@@ -62,8 +61,7 @@ const typeWidgetClasses = {'noteMap': NoteMapTypeWidget,'webView': WebViewTypeWidget,'doc': DocTypeWidget,- 'contentWidget': ContentWidgetTypeWidget,- 'ancillaries': AncillariesTypeWidget+ 'contentWidget': ContentWidgetTypeWidget};export default class NoteDetailWidget extends NoteContextAwareWidget {@@ -191,8 +189,6 @@ export default class NoteDetailWidget extends NoteContextAwareWidget {if (type === 'text' && this.noteContext.viewScope.viewMode === 'source') {type = 'readOnlyCode';- } else if (this.noteContext.viewScope.viewMode === 'ancillaries') {- type = 'ancillaries';} else if (type === 'text' && await this.noteContext.isReadOnly()) {type = 'readOnlyText';} else if ((type === 'code' || type === 'mermaid') && await this.noteContext.isReadOnly()) {diff --git a/src/public/app/widgets/type_widgets/ancillaries.js b/src/public/app/widgets/type_widgets/ancillaries.jsdeleted file mode 100644index a88d39f533..0000000000--- a/src/public/app/widgets/type_widgets/ancillaries.js+++ /dev/null@@ -1,79 +0,0 @@-import TypeWidget from "./type_widget.js";-import server from "../../services/server.js";--const TPL = `-<div class="note-ancillaries note-detail-printable">- <style>- .note-ancillaries {- padding: 15px;- }-- .ancillary-content {- max-height: 400px;- background: var(--accented-background-color);- padding: 10px;- margin-top: 10px;- margin-bottom: 10px;- }-- .ancillary-details th {- padding-left: 10px;- padding-right: 10px;- }- </style>-- <div class="alert alert-info" style="margin: 10px 0 10px 0; padding: 20px;">- Note ancillaries are pieces of data attached to a given note, providing ancillary support.- This view is useful for diagnostics.- </div>-- <div class="note-ancillary-list"></div>-</div>`;--export default class AncillariesTypeWidget extends TypeWidget {- static getType() { return "ancillaries"; }-- doRender() {- this.$widget = $(TPL);- this.$list = this.$widget.find('.note-ancillary-list');-- super.doRender();- }-- async doRefresh(note) {- this.$list.empty();-- const ancillaries = await server.get(`notes/${this.noteId}/ancillaries?includeContent=true`);-- if (ancillaries.length === 0) {- this.$list.html("<strong>This note has no ancillaries.</strong>");-- return;- }-- for (const ancillary of ancillaries) {- this.$list.append(- $('<div class="note-ancillary-wrapper">')- .append(- $('<h4>').append($('<span class="ancillary-name">').text(ancillary.name))- )- .append(- $('<table class="ancillary-details">')- .append(- $('<tr>')- .append($('<th>').text('Length:'))- .append($('<td>').text(ancillary.contentLength))- .append($('<th>').text('MIME:'))- .append($('<td>').text(ancillary.mime))- .append($('<th>').text('Date modified:'))- .append($('<td>').text(ancillary.utcDateModified))- )- )- .append(- $('<pre class="ancillary-content">')- .text(ancillary.content)- )- );- }- }-}\ No newline at end of filediff --git a/src/public/app/widgets/type_widgets/canvas.js b/src/public/app/widgets/type_widgets/canvas.jsindex ac9376c74a..dbe1eba2ed 100644--- a/src/public/app/widgets/type_widgets/canvas.js+++ b/src/public/app/widgets/type_widgets/canvas.js@@ -277,20 +277,15 @@ export default class ExcalidrawTypeWidget extends TypeWidget {})const content = {- elements,- appState,- files: activeFiles+ _meta: "This note has type `canvas`. It uses excalidraw and stores an exported svg alongside.",+ elements, // excalidraw+ appState, // excalidraw+ files: activeFiles, // excalidraw+ svg: svgString, // not needed for excalidraw, used for note_short, content, and image api};return {- content: JSON.stringify(content),- ancillaries: [- {- name: 'canvasSvg',- mime: 'image/svg+xml',- content: svgString- }- ]+ content: JSON.stringify(content)};}diff --git a/src/public/app/widgets/type_widgets/content_widget.js b/src/public/app/widgets/type_widgets/content_widget.jsindex 34577b385f..d81fe550a4 100644--- a/src/public/app/widgets/type_widgets/content_widget.js+++ b/src/public/app/widgets/type_widgets/content_widget.js@@ -28,8 +28,6 @@ import ConsistencyChecksOptions from "./options/advanced/consistency_checks.js";import VacuumDatabaseOptions from "./options/advanced/vacuum_database.js";import DatabaseAnonymizationOptions from "./options/advanced/database_anonymization.js";import BackendLogWidget from "./content/backend_log.js";-import OcrOptions from "./options/images/ocr.js";-import ExtractTextFromPdfOptions from "./options/images/extract_text_from_pdf.js";const TPL = `<div class="note-detail-content-widget note-detail-printable"><style>@@ -70,7 +68,7 @@ const CONTENT_WIDGETS = {CodeAutoReadOnlySizeOptions,CodeMimeTypesOptions],- _optionsImages: [ ImageOptions, OcrOptions, ExtractTextFromPdfOptions ],+ _optionsImages: [ ImageOptions ],_optionsSpellcheck: [ SpellcheckOptions ],_optionsPassword: [ PasswordOptions ],_optionsEtapi: [ EtapiOptions ],diff --git a/src/public/app/widgets/type_widgets/options/images/extract_text_from_pdf.js b/src/public/app/widgets/type_widgets/options/images/extract_text_from_pdf.jsdeleted file mode 100644index 6d046c7998..0000000000--- a/src/public/app/widgets/type_widgets/options/images/extract_text_from_pdf.js+++ /dev/null@@ -1,28 +0,0 @@-import OptionsWidget from "../options_widget.js";--const TPL = `-<div class="options-section">- <h4>Extract text from PDF files</h4>-- <label>- <input class="extract-text-from-pdf" type="checkbox">- Extract text from PDF- </label>-- <p>Text extracted from PDFs will be considered when fulltext searching.</p>-</div>-`;--export default class ExtractTextFromPdfOptions extends OptionsWidget {- doRender() {- this.$widget = $(TPL);-- this.$extractTextFromPdf = this.$widget.find(".extract-text-from-pdf");- this.$extractTextFromPdf.on("change", () =>- this.updateCheckboxOption('extractTextFromPdf', this.$extractTextFromPdf));- }-- optionsLoaded(options) {- this.setCheckboxState(this.$extractTextFromPdf, options.extractTextFromPdf);- }-}diff --git a/src/public/app/widgets/type_widgets/options/images/ocr.js b/src/public/app/widgets/type_widgets/options/images/ocr.jsdeleted file mode 100644index 6492436968..0000000000--- a/src/public/app/widgets/type_widgets/options/images/ocr.js+++ /dev/null@@ -1,28 +0,0 @@-import OptionsWidget from "../options_widget.js";--const TPL = `-<div class="options-section">- <h4>OCR</h4>-- <label>- <input class="ocr-images" type="checkbox">- Extract text from images using OCR- </label>-- <p>Text extracted from images will be considered when fulltext searching.</p>-</div>-`;--export default class OcrOptions extends OptionsWidget {- doRender() {- this.$widget = $(TPL);-- this.$ocrImages = this.$widget.find(".ocr-images");- this.$ocrImages.on("change", () =>- this.updateCheckboxOption('ocrImages', this.$ocrImages));- }-- optionsLoaded(options) {- this.setCheckboxState(this.$ocrImages, options.ocrImages);- }-}diff --git a/src/public/app/widgets/type_widgets/relation_map.js b/src/public/app/widgets/type_widgets/relation_map.jsindex 0c0b2e7307..aa9d68a064 100644--- a/src/public/app/widgets/type_widgets/relation_map.js+++ b/src/public/app/widgets/type_widgets/relation_map.js@@ -587,7 +587,6 @@ export default class RelationMapTypeWidget extends TypeWidget {}getData() {- // TODO: save also image as ancillaryreturn {content: JSON.stringify(this.mapData)};diff --git a/src/public/app/widgets/type_widgets/type_widget.js b/src/public/app/widgets/type_widgets/type_widget.jsindex 41621c7a8d..2d8f2e9fe0 100644--- a/src/public/app/widgets/type_widgets/type_widget.js+++ b/src/public/app/widgets/type_widgets/type_widget.js@@ -39,7 +39,7 @@ export default class TypeWidget extends NoteContextAwareWidget {}/**- * @returns {Promise<Object>|*} promise resolving note data. Note data is an object with content and ancillaries.+ * @returns {Promise<Object>|*} promise resolving note data. Note data is an object with content.*/getData() {}diff --git a/src/routes/api/notes.js b/src/routes/api/notes.jsindex be69c5aa57..2083a98581 100644--- a/src/routes/api/notes.js+++ b/src/routes/api/notes.js@@ -54,10 +54,10 @@ function createNote(req) {}function updateNoteData(req) {- const {content, ancillaries} = req.body;+ const {content} = req.body;const {noteId} = req.params;- return noteService.updateNoteData(noteId, content, ancillaries);+ return noteService.updateNoteData(noteId, content);}function deleteNote(req) {@@ -127,49 +127,6 @@ function setNoteTypeMime(req) {note.save();}-function getNoteAncillaries(req) {- const includeContent = req.query.includeContent === 'true';- const {noteId} = req.params;-- const note = becca.getNote(noteId);-- if (!note) {- throw new NotFoundError(`Note '${noteId}' doesn't exist.`);- }-- const noteAncillaries = note.getNoteAncillaries();-- return noteAncillaries.map(ancillary => {- const pojo = ancillary.getPojo();-- if (includeContent && utils.isStringNote(null, ancillary.mime)) {- pojo.content = ancillary.getContent()?.toString();- pojo.contentLength = pojo.content.length;-- const MAX_ANCILLARY_LENGTH = 1_000_000;-- if (pojo.content.length > MAX_ANCILLARY_LENGTH) {- pojo.content = pojo.content.substring(0, MAX_ANCILLARY_LENGTH);- }- }-- return pojo;- });-}--function saveNoteAncillary(req) {- const {noteId, name} = req.params;- const {mime, content} = req.body;-- const note = becca.getNote(noteId);-- if (!note) {- throw new NotFoundError(`Note '${noteId}' doesn't exist.`);- }-- note.saveNoteAncillary(name, mime, content);-}-function getRelationMap(req) {const {relationMapNoteId, noteIds} = req.body;@@ -383,7 +340,5 @@ module.exports = {eraseDeletedNotesNow,getDeleteNotesPreview,uploadModifiedFile,- forceSaveNoteRevision,- getNoteAncillaries,- saveNoteAncillary+ forceSaveNoteRevision};diff --git a/src/routes/api/options.js b/src/routes/api/options.jsindex dc1007be23..ddb4321ecc 100644--- a/src/routes/api/options.js+++ b/src/routes/api/options.js@@ -61,9 +61,7 @@ const ALLOWED_OPTIONS = new Set(['downloadImagesAutomatically','minTocHeadings','checkForUpdates',- 'disableTray',- 'ocrImages',- 'extractTextFromPdf'+ 'disableTray']);function getOptions() {diff --git a/src/routes/api/sync.js b/src/routes/api/sync.jsindex 3600aa7438..e2947f096c 100644--- a/src/routes/api/sync.js+++ b/src/routes/api/sync.js@@ -114,14 +114,6 @@ function forceNoteSync(req) {entityChangesService.moveEntityChangeToTop('note_revision_contents', noteRevisionId);}- for (const noteAncillaryId of sql.getColumn("SELECT noteAncillaryId FROM note_ancillaries WHERE noteId = ?", [noteId])) {- sql.execute(`UPDATE note_ancillaries SET utcDateModified = ? WHERE noteAncillaryId = ?`, [now, noteAncillaryId]);- entityChangesService.moveEntityChangeToTop('note_ancillaries', noteAncillaryId);-- sql.execute(`UPDATE note_ancillary_contents SET utcDateModified = ? WHERE noteAncillaryId = ?`, [now, noteAncillaryId]);- entityChangesService.moveEntityChangeToTop('note_ancillary_contents', noteAncillaryId);- }-log.info(`Forcing note sync for ${noteId}`);// not awaiting for the job to finish (will probably take a long time)diff --git a/src/routes/routes.js b/src/routes/routes.jsindex b6b5d4e39b..cdca32975f 100644--- a/src/routes/routes.js+++ b/src/routes/routes.js@@ -126,8 +126,6 @@ function register(app) {apiRoute(PUT, '/api/notes/:noteId/sort-children', notesApiRoute.sortChildNotes);apiRoute(PUT, '/api/notes/:noteId/protect/:isProtected', notesApiRoute.protectNote);apiRoute(PUT, '/api/notes/:noteId/type', notesApiRoute.setNoteTypeMime);- apiRoute(GET, '/api/notes/:noteId/ancillaries', notesApiRoute.getNoteAncillaries);- apiRoute(PUT, '/api/notes/:noteId/ancillaries/:name', notesApiRoute.saveNoteAncillary);apiRoute(GET, '/api/notes/:noteId/revisions', noteRevisionsApiRoute.getNoteRevisions);apiRoute(DELETE, '/api/notes/:noteId/revisions', noteRevisionsApiRoute.eraseAllNoteRevisions);apiRoute(GET, '/api/notes/:noteId/revisions/:noteRevisionId', noteRevisionsApiRoute.getNoteRevision);diff --git a/src/services/app_info.js b/src/services/app_info.jsindex 5b7582d610..4a8f501583 100644--- a/src/services/app_info.js+++ b/src/services/app_info.js@@ -4,8 +4,8 @@ const build = require('./build');const packageJson = require('../../package');const {TRILIUM_DATA_DIR} = require('./data_dir');-const APP_DB_VERSION = 214;-const SYNC_VERSION = 30;+const APP_DB_VERSION = 212;+const SYNC_VERSION = 29;const CLIPPER_PROTOCOL_VERSION = "1.0";module.exports = {diff --git a/src/services/cls.js b/src/services/cls.jsindex dec53f5801..33845e2b57 100644--- a/src/services/cls.js+++ b/src/services/cls.js@@ -48,14 +48,6 @@ function isEntityEventsDisabled() {return !!namespace.get('disableEntityEvents');}-function isOcrDisabled() {- return !!namespace.get('disableOcr');-}--function disableOcr() {- namespace.set('disableOcr', true);-}-function getAndClearEntityChangeIds() {const entityChangeIds = namespace.get('entityChangeIds') || [];@@ -101,6 +93,4 @@ module.exports = {getAndClearEntityChangeIds,addEntityChange,ignoreEntityChangeIds,- isOcrDisabled,- disableOcr};diff --git a/src/services/consistency_checks.js b/src/services/consistency_checks.jsindex 6bb6e066dd..3fecf607c9 100644--- a/src/services/consistency_checks.js+++ b/src/services/consistency_checks.js@@ -213,25 +213,6 @@ class ConsistencyChecks {logError(`Relation '${attributeId}' references missing note '${noteId}'`)}});-- this.findAndFixIssues(`- SELECT noteAncillaryId, note_ancillaries.noteId AS noteId- FROM note_ancillaries- LEFT JOIN notes USING (noteId)- WHERE notes.noteId IS NULL- AND note_ancillaries.isDeleted = 0`,- ({noteAncillaryId, noteId}) => {- if (this.autoFix) {- const noteAncillary = becca.getNoteAncillary(noteAncillaryId);- noteAncillary.markAsDeleted();-- this.reloadNeeded = false;-- logFix(`Note ancillary '${noteAncillaryId}' has been deleted since it references missing note '${noteId}'`);- } else {- logError(`Note ancillary '${noteAncillaryId}' references missing note '${noteId}'`);- }- });}findExistencyIssues() {@@ -339,26 +320,6 @@ class ConsistencyChecks {logError(`Duplicate branches for note '${noteId}' and parent '${parentNoteId}'`);}});-- this.findAndFixIssues(`- SELECT noteAncillaryId,- note_ancillaries.noteId AS noteId- FROM note_ancillaries- JOIN notes USING (noteId)- WHERE notes.isDeleted = 1- AND note_ancillaries.isDeleted = 0`,- ({noteAncillaryId, noteId}) => {- if (this.autoFix) {- const noteAncillary = becca.getNoteAncillary(noteAncillaryId);- noteAncillary.markAsDeleted();-- this.reloadNeeded = false;-- logFix(`Note ancillary '${noteAncillaryId}' has been deleted since associated note '${noteId}' is deleted.`);- } else {- logError(`Note ancillary '${noteAncillaryId}' is not deleted even though associated note '${noteId}' is deleted.`)- }- });}findLogicIssues() {@@ -659,8 +620,6 @@ class ConsistencyChecks {this.runEntityChangeChecks("note_contents", "noteId");this.runEntityChangeChecks("note_revisions", "noteRevisionId");this.runEntityChangeChecks("note_revision_contents", "noteRevisionId");- this.runEntityChangeChecks("note_ancillaries", "noteAncillaryId");- this.runEntityChangeChecks("note_ancillary_contents", "noteAncillaryId");this.runEntityChangeChecks("branches", "branchId");this.runEntityChangeChecks("attributes", "attributeId");this.runEntityChangeChecks("etapi_tokens", "etapiTokenId");@@ -756,7 +715,7 @@ class ConsistencyChecks {return `${tableName}: ${count}`;}- const tables = [ "notes", "note_revisions", "note_ancillaries", "branches", "attributes", "etapi_tokens" ];+ const tables = [ "notes", "note_revisions", "branches", "attributes", "etapi_tokens" ];log.info(`Table counts: ${tables.map(tableName => getTableRowCount(tableName)).join(", ")}`);}diff --git a/src/services/entity_changes.js b/src/services/entity_changes.jsindex 2c3991d818..6f9d5034d9 100644--- a/src/services/entity_changes.js+++ b/src/services/entity_changes.js@@ -151,8 +151,6 @@ function fillAllEntityChanges() {fillEntityChanges("branches", "branchId");fillEntityChanges("note_revisions", "noteRevisionId");fillEntityChanges("note_revision_contents", "noteRevisionId");- fillEntityChanges("note_ancillaries", "noteAncillaryId");- fillEntityChanges("note_ancillary_contents", "noteAncillaryId");fillEntityChanges("attributes", "attributeId");fillEntityChanges("etapi_tokens", "etapiTokenId");fillEntityChanges("options", "name", 'isSynced = 1');diff --git a/src/services/export/zip.js b/src/services/export/zip.jsindex b5bbe3cd4c..c58afca9f5 100644--- a/src/services/export/zip.js+++ b/src/services/export/zip.js@@ -170,24 +170,6 @@ async function exportToZip(taskContext, branch, format, res, setHeaders = true)meta.dataFileName = getDataFileName(note.type, note.mime, baseFileName, existingFileNames);}- const ancillaries = note.getNoteAncillaries();-- if (ancillaries.length > 0) {- meta.ancillaries = ancillaries- .filter(ancillary => ["canvasSvg", "mermaidSvg"].includes(ancillary.name))- .map(ancillary => ({-- name: ancillary.name,- mime: ancillary.mime,- dataFileName: getDataFileName(- null,- ancillary.mime,- baseFileName + "_" + ancillary.name,- existingFileNames- )- }));- }-if (childBranches.length > 0) {meta.dirFileName = getUniqueFilename(existingFileNames, baseFileName);meta.children = [];@@ -234,15 +216,8 @@ async function exportToZip(taskContext, branch, format, res, setHeaders = true)const meta = noteIdToMeta[targetPath[targetPath.length - 1]];- // for some note types it's more user-friendly to see the ancillary (if exists) instead of source note- const preferredAncillary = (meta.ancillaries || []).find(ancillary => ['mermaidSvg', 'canvasSvg'].includes(ancillary.name));-- if (preferredAncillary) {- url += encodeURIComponent(preferredAncillary.dataFileName);- } else {- // link can target note which is only "folder-note" and as such will not have a file in an export- url += encodeURIComponent(meta.dataFileName || meta.dirFileName);- }+ // link can target note which is only "folder-note" and as such will not have a file in an export+ url += encodeURIComponent(meta.dataFileName || meta.dirFileName);return url;}@@ -344,16 +319,6 @@ ${markdownContent}`;taskContext.increaseProgressCount();- for (const ancillaryMeta of noteMeta.ancillaries || []) {- const noteAncillary = note.getNoteAncillaryByName(ancillaryMeta.name);- const content = noteAncillary.getContent();-- archive.append(content, {- name: filePathPrefix + ancillaryMeta.dataFileName,- date: dateUtils.parseDateTime(note.utcDateModified)- });- }-if (noteMeta.children && noteMeta.children.length > 0) {const directoryPath = filePathPrefix + noteMeta.dirFileName;diff --git a/src/services/image.js b/src/services/image.jsindex db131f75a4..ac9d9cfd18 100644--- a/src/services/image.js+++ b/src/services/image.js@@ -12,7 +12,6 @@ const sanitizeFilename = require('sanitize-filename');const isSvg = require('is-svg');const isAnimated = require('is-animated');const htmlSanitizer = require("./html_sanitizer");-const textExtractingService = require("./text_extracting");async function processImage(uploadBuffer, originalName, shrinkImageSwitch) {const compressImages = optionService.getOptionBool("compressImages");@@ -83,8 +82,6 @@ function updateImage(noteId, uploadBuffer, originalName) {note.setContent(buffer);});-- runOcr(note, buffer);});}@@ -126,8 +123,6 @@ function saveImage(parentNoteId, uploadBuffer, originalName, shrinkImageSwitch,note.setContent(buffer);});-- textExtractingService.runOcr(note, buffer);});return {diff --git a/src/services/import/zip.js b/src/services/import/zip.jsindex c5949f634e..fea3cfb506 100644--- a/src/services/import/zip.js+++ b/src/services/import/zip.js@@ -14,7 +14,6 @@ const treeService = require("../tree");const yauzl = require("yauzl");const htmlSanitizer = require('../html_sanitizer');const becca = require("../../becca/becca");-const BNoteAncillary = require("../../becca/entities/bnote_ancillary");/*** @param {TaskContext} taskContext@@ -65,7 +64,6 @@ async function importZip(taskContext, fileBuffer, importRootNote) {};let parent;- let ancillaryMeta = false;for (const segment of pathSegments) {if (!cursor || !cursor.children || cursor.children.length === 0) {@@ -74,28 +72,11 @@ async function importZip(taskContext, fileBuffer, importRootNote) {parent = cursor;cursor = parent.children.find(file => file.dataFileName === segment || file.dirFileName === segment);-- if (!cursor) {- for (const file of parent.children) {- for (const ancillary of file.ancillaries || []) {- if (ancillary.dataFileName === segment) {- cursor = file;- ancillaryMeta = ancillary;- break;- }- }-- if (cursor) {- break;- }- }- }}return {parentNoteMeta: parent,- noteMeta: cursor,- ancillaryMeta+ noteMeta: cursor};}@@ -373,7 +354,7 @@ async function importZip(taskContext, fileBuffer, importRootNote) {}function saveNote(filePath, content) {- const {parentNoteMeta, noteMeta, ancillaryMeta} = getMeta(filePath);+ const {parentNoteMeta, noteMeta} = getMeta(filePath);if (noteMeta?.noImport) {return;@@ -381,17 +362,6 @@ async function importZip(taskContext, fileBuffer, importRootNote) {const noteId = getNoteId(noteMeta, filePath);- if (ancillaryMeta) {- const noteAncillary = new BNoteAncillary({- noteId,- name: ancillaryMeta.name,- mime: ancillaryMeta.mime- });-- noteAncillary.setContent(content);- return;- }-const parentNoteId = getParentNoteId(filePath, parentNoteMeta);if (!parentNoteId) {diff --git a/src/services/note_ancillaries.js b/src/services/note_ancillaries.jsdeleted file mode 100644index 9336b14bba..0000000000--- a/src/services/note_ancillaries.js+++ /dev/null@@ -1,37 +0,0 @@-const protectedSession = require("./protected_session");-const log = require("./log");--/**- * @param {BNote} note- */-function protectNoteAncillaries(note) {- for (const noteAncillary of note.getNoteAncillaries()) {- if (note.isProtected !== noteAncillary.isProtected) {- if (!protectedSession.isProtectedSessionAvailable()) {- log.error("Protected session is not available to fix note ancillaries.");-- return;- }-- try {- const content = noteAncillary.getContent();-- noteAncillary.isProtected = note.isProtected;-- // this will force de/encryption- noteAncillary.setContent(content);-- noteAncillary.save();- }- catch (e) {- log.error(`Could not un/protect note ancillary ID = ${noteAncillary.noteAncillaryId}`);-- throw e;- }- }- }-}--module.exports = {- protectNoteAncillaries-}diff --git a/src/services/notes.js b/src/services/notes.jsindex 4d50713134..4ac02e5629 100644--- a/src/services/notes.js+++ b/src/services/notes.js@@ -9,7 +9,6 @@ const protectedSessionService = require('../services/protected_session');const log = require('../services/log');const utils = require('../services/utils');const noteRevisionService = require('../services/note_revisions');-const noteAncillarieservice = require('../services/note_ancillaries');const attributeService = require('../services/attributes');const request = require('./request');const path = require('path');@@ -18,12 +17,10 @@ const becca = require('../becca/becca');const BBranch = require('../becca/entities/bbranch');const BNote = require('../becca/entities/bnote');const BAttribute = require('../becca/entities/battribute');-const BNoteAncillary = require("../becca/entities/bnote_ancillary");const dayjs = require("dayjs");const htmlSanitizer = require("./html_sanitizer");const ValidationError = require("../errors/validation_error");const noteTypesService = require("./note_types");-const textExtractingService = require("./text_extracting");function getNewNotePosition(parentNoteId) {const note = becca.notes[parentNoteId];@@ -302,7 +299,6 @@ function protectNote(note, protect) {}noteRevisionService.protectNoteRevisions(note);- noteAncillarieservice.protectNoteAncillaries(note);}catch (e) {log.error(`Could not un/protect note ID = ${note.noteId}`);@@ -593,7 +589,7 @@ function saveNoteRevisionIfNeeded(note) {}}-function updateNoteData(noteId, content, ancillaries = []) {+function updateNoteData(noteId, content) {const note = becca.getNote(noteId);if (!note.isContentAvailable()) {@@ -605,10 +601,6 @@ function updateNoteData(noteId, content, ancillaries = []) {content = saveLinks(note, content);note.setContent(content);-- for (const {name, mime, content} of ancillaries) {- note.saveNoteAncillary(name, mime, content);- }}/**@@ -675,16 +667,6 @@ function undeleteBranch(branchId, deleteId, taskContext) {new BAttribute(attribute).save({skipValidation: true});}- const noteAncillaries = sql.getRows(`- SELECT * FROM note_ancillaries- WHERE isDeleted = 1- AND deleteId = ?- AND noteId = ?`, [deleteId, note.noteId]);-- for (const noteAncillary of noteAncillaries) {- new BNoteAncillary(noteAncillary).save();- }-const childBranchIds = sql.getColumn(`SELECT branches.branchIdFROM branches@@ -734,8 +716,6 @@ function scanForLinks(note, content) {*/async function asyncPostProcessContent(note, content) {scanForLinks(note, content);- await textExtractingService.runOcr(note, content);- await textExtractingService.extractTextFromPdf(note, content);}function eraseNotes(noteIdsToErase) {@@ -765,11 +745,6 @@ function eraseNotes(noteIdsToErase) {noteRevisionService.eraseNoteRevisions(noteRevisionIdsToErase);- const noteAncillaryIdsToErase = sql.getManyRows(`SELECT noteAncillaryId FROM note_ancillaries WHERE noteId IN (???)`, noteIdsToErase)- .map(row => row.noteAncillaryId);-- eraseNoteAncillaries(noteAncillaryIdsToErase);-log.info(`Erased notes: ${JSON.stringify(noteIdsToErase)}`);}@@ -805,20 +780,6 @@ function eraseAttributes(attributeIdsToErase) {log.info(`Erased attributes: ${JSON.stringify(attributeIdsToErase)}`);}-function eraseNoteAncillaries(noteAncillaryIdsToErase) {- if (noteAncillaryIdsToErase.length === 0) {- return;- }-- log.info(`Removing note ancillaries: ${JSON.stringify(noteAncillaryIdsToErase)}`);-- sql.executeMany(`DELETE FROM note_ancillaries WHERE noteAncillaryId IN (???)`, noteAncillaryIdsToErase);- sql.executeMany(`UPDATE entity_changes SET isErased = 1 WHERE entityName = 'note_ancillaries' AND entityId IN (???)`, noteAncillaryIdsToErase);-- sql.executeMany(`DELETE FROM note_ancillary_contents WHERE noteAncillaryId IN (???)`, noteAncillaryIdsToErase);- sql.executeMany(`UPDATE entity_changes SET isErased = 1 WHERE entityName = 'note_ancillary_contents' AND entityId IN (???)`, noteAncillaryIdsToErase);-}-function eraseDeletedEntities(eraseEntitiesAfterTimeInSeconds = null) {// this is important also so that the erased entity changes are sent to the connected clientssql.transactional(() => {@@ -953,18 +914,6 @@ function duplicateSubtreeInner(origNote, origBranch, newParentNoteId, noteIdMappattr.save();}- for (const noteAncillary of origNote.getNoteAncillaries()) {- const duplNoteAncillary = new BNoteAncillary({- ...noteAncillary,- noteAncillaryId: undefined,- noteId: newNote.noteId- });-- duplNoteAncillary.save();-- duplNoteAncillary.setContent(noteAncillary.getContent());- }-for (const childBranch of origNote.getChildBranches()) {duplicateSubtreeInner(childBranch.getNote(), childBranch, newNote.noteId, noteIdMapping);}diff --git a/src/services/options_init.js b/src/services/options_init.jsindex f7bb7cc80d..40c2b79d5e 100644--- a/src/services/options_init.js+++ b/src/services/options_init.js@@ -90,8 +90,6 @@ const defaultOptions = [{ name: 'checkForUpdates', value: 'true', isSynced: true },{ name: 'disableTray', value: 'false', isSynced: false },{ name: 'userGuideSha256Hash', value: '', isSynced: true },- { name: 'ocrImages', value: 'true', isSynced: true },- { name: 'extractTextFromPdf', value: 'true', isSynced: true },];function initStartupOptions() {diff --git a/src/services/scheduler.js b/src/services/scheduler.jsindex 3ffe16cb62..dfc277377f 100644--- a/src/services/scheduler.js+++ b/src/services/scheduler.js@@ -7,7 +7,6 @@ const sql = require("./sql");const becca = require("../becca/becca");const protectedSessionService = require("../services/protected_session");const hiddenSubtreeService = require("./hidden_subtree");-const helpImportService = require("./user_guide_import");function getRunAtHours(note) {try {@@ -54,8 +53,6 @@ function runNotesWithLabel(runAttrValue) {sqlInit.dbReady.then(() => {cls.init(() => {hiddenSubtreeService.checkHiddenSubtree();-- helpImportService.importUserGuideIfNeeded();});if (!process.env.TRILIUM_SAFE_MODE) {diff --git a/src/services/search/expressions/note_content_fulltext.js b/src/services/search/expressions/note_content_fulltext.jsindex 8c0e801f12..4b1673b6c8 100644--- a/src/services/search/expressions/note_content_fulltext.js+++ b/src/services/search/expressions/note_content_fulltext.js@@ -48,16 +48,6 @@ class NoteContentFulltextExp extends Expression {this.findInText(row, inputNoteSet, resultNoteSet);}- for (const row of sql.iterateRows(`- SELECT noteId, 'plainText' as type, mime, content, isProtected- FROM note_ancillaries JOIN note_ancillary_contents USING (noteAncillaryId)- WHERE name IN ('plainText') AND isDeleted = 0`)) {-- if (!resultNoteSet.hasNoteId(row.noteId)) {- this.findInText(row, inputNoteSet, resultNoteSet);- }- }-return resultNoteSet;}diff --git a/src/services/sync.js b/src/services/sync.jsindex 243266cf62..80adc235f7 100644--- a/src/services/sync.js+++ b/src/services/sync.js@@ -321,7 +321,7 @@ function getEntityChangeRow(entityName, entityId) {throw new Error(`Entity ${entityName} ${entityId} not found.`);}- if (['note_contents', 'note_revision_contents', 'note_ancillary_contents'].includes(entityName) && entity.content !== null) {+ if (['note_contents', 'note_revision_contents'].includes(entityName) && entity.content !== null) {if (typeof entity.content === 'string') {entity.content = Buffer.from(entity.content, 'UTF-8');}diff --git a/src/services/sync_update.js b/src/services/sync_update.jsindex 50fb29a0e5..d650fdb0bc 100644--- a/src/services/sync_update.js+++ b/src/services/sync_update.js@@ -64,7 +64,7 @@ function updateNormalEntity(remoteEntityChange, remoteEntityRow, instanceId) {|| localEntityChange.utcDateChanged < remoteEntityChange.utcDateChanged|| localEntityChange.hash !== remoteEntityChange.hash // sync error, we should still update) {- if (['note_contents', 'note_revision_contents', 'note_ancillary_contents'].includes(remoteEntityChange.entityName)) {+ if (['note_contents', 'note_revision_contents'].includes(remoteEntityChange.entityName)) {remoteEntityRow.content = handleContent(remoteEntityRow.content);}@@ -115,9 +115,7 @@ function eraseEntity(entityChange, instanceId) {"branches","attributes","note_revisions",- "note_revision_contents",- "note_ancillaries",- "note_ancillary_contents"+ "note_revision_contents"];if (!entityNames.includes(entityName)) {diff --git a/src/services/text_extracting.js b/src/services/text_extracting.jsdeleted file mode 100644index fb86a01456..0000000000--- a/src/services/text_extracting.js+++ /dev/null@@ -1,150 +0,0 @@-const Canvas = require("canvas");-const OCRAD = require("ocrad.js");-const log = require("./log");-const optionService = require("./options");-const cls = require("./cls");--function ocrFromByteArray(img) {- // byte array contains raw uncompressed pixel data- // kind: 1 - GRAYSCALE_1BPP (unsupported)- // kind: 2 - RGB_24BPP- // kind: 3 - RGBA_32BPP-- if (!(img.data instanceof Uint8ClampedArray) || ![2, 3].includes(img.kind)) {- return null;- }-- const start = Date.now();- const canvas = new Canvas.createCanvas(img.width, img.height);- const ctx = canvas.getContext('2d');-- const imageData = ctx.createImageData(img.width, img.height);- const imageBytes = imageData.data;-- for (let j = 0, k = 0, jj = img.width * img.height * 4; j < jj;) {- imageBytes[j++] = img.data[k++];- imageBytes[j++] = img.data[k++];- imageBytes[j++] = img.data[k++];- // in case of kind = 2, the alpha channel is missing in source pixels and we'll add it- imageBytes[j++] = img.kind === 2 ? 255 : img.data[k++];- }-- ctx.putImageData(imageData, 0, 0);- const text = OCRAD(canvas);-- log.info(`OCR of ${img.data.length} canvas into ${text.length} chars of text took ${Date.now() - start}ms`);-- return text;-}--async function ocrTextFromPdfImages(pdfjsLib, page, strings) {- const ops = await page.getOperatorList();-- const fns = ops.fnArray;- const args = ops.argsArray;-- for (const arg of args) {- const i = args.indexOf(arg);-- if (fns[i] !== pdfjsLib.OPS.paintXObject && fns[i] !== pdfjsLib.OPS.paintImageXObject) {- continue;- }-- const imgKey = arg[0];- const img = await new Promise((res) => page.objs.get(imgKey, r => res(r)));-- if (!img) {- continue;- }-- const text = ocrFromByteArray(img);-- if (text) {- strings.push(text);- }- }-}--async function extractTextFromPdf(note, buffer) {- if (note.mime !== 'application/pdf' || !optionService.getOptionBool('extractTextFromPdf')) {- return;- }-- try {- const pdfjsLib = require("pdfjs-dist");- const doc = await pdfjsLib.getDocument({data: buffer}).promise;- let strings = [];-- for (let p = 1; p <= doc.numPages; p++) {- const page = await doc.getPage(p);-- const content = await page.getTextContent({- normalizeWhitespace: true,- disableCombineTextItems: false- });-- content.items.forEach(({str}) => strings.push(str));-- try {- if (optionService.getOptionBool('ocrImages') && !cls.isOcrDisabled()) {- await ocrTextFromPdfImages(pdfjsLib, page, strings);- }- }- catch (e) {- log.info(`Could not OCR images from PDF note '${note.noteId}': '${e.message}', stack '${e.stack}'`);- }- }-- strings = strings.filter(str => str?.trim());-- note.saveNoteAncillary('plainText', 'text/plain', strings.join(" "));- }- catch (e) {- log.info(`Extracting text from PDF on note '${note.noteId}' failed with error '${e.message}', stack ${e.stack}`);- }-}--async function ocrTextFromBuffer(buffer) {- // buffer is expected to contain an image in JPEG, PNG etc.- const start = Date.now();-- const img = await new Promise((res, rej) => {- const img = new Canvas.Image();- img.onload = () => res(img);- img.onerror = err => rej(new Error("Can't load the image " + err));- img.src = buffer;- });-- const canvas = new Canvas.createCanvas(img.width, img.height);- const ctx = canvas.getContext('2d');- ctx.drawImage(img, 0, 0, img.width, img.height);-- const plainText = OCRAD(canvas);-- log.info(`OCR of ${buffer.byteLength} image bytes into ${plainText.length} chars of text took ${Date.now() - start}ms`);- return plainText;-}--async function runOcr(note, buffer) {- if (!note.isImage()- || !optionService.getOptionBool('ocrImages')- || cls.isOcrDisabled()- || buffer.length === 0- ) {- return;- }-- try {- const plainText = await ocrTextFromBuffer(buffer);-- note.saveNoteAncillary('plainText', 'text/plain', plainText);- }- catch (e) {- log.error(`OCR on note '${note.noteId}' failed with error '${e.message}', stack ${e.stack}`);- }-}--module.exports = {- runOcr,- extractTextFromPdf-};diff --git a/src/services/user_guide_import.js b/src/services/user_guide_import.jsdeleted file mode 100644index baee9b5fca..0000000000--- a/src/services/user_guide_import.js+++ /dev/null@@ -1,498 +0,0 @@-"use strict"--const becca = require("../becca/becca");-const fs = require("fs").promises;-const BAttribute = require('../becca/entities/battribute');-const utils = require('./utils');-const log = require('./log');-const noteService = require('./notes');-const attributeService = require('./attributes');-const BBranch = require('../becca/entities/bbranch');-const path = require('path');-const yauzl = require("yauzl");-const htmlSanitizer = require('./html_sanitizer');-const sql = require('./sql');-const options = require('./options');-const cls = require('./cls');-const {USER_GUIDE_ZIP_DIR} = require('./resource_dir');--async function importUserGuideIfNeeded() {- const userGuideSha256HashInDb = options.getOption('userGuideSha256Hash');- let userGuideSha256HashInFile = await fs.readFile(USER_GUIDE_ZIP_DIR + "/user-guide.zip.sha256");-- if (!userGuideSha256HashInFile || userGuideSha256HashInFile.byteLength < 64) {- return;- }-- userGuideSha256HashInFile = userGuideSha256HashInFile.toString().substr(0, 64);-- if (userGuideSha256HashInDb === userGuideSha256HashInFile) {- // user guide ZIP file has been already imported and is up-to-date- return;- }-- const hiddenRoot = becca.getNote("_hidden");- const data = await fs.readFile(USER_GUIDE_ZIP_DIR + "/user-guide.zip", "binary");-- cls.disableOcr(); // no OCR needed for user guide images-- await importZip(Buffer.from(data, 'binary'), hiddenRoot);-- options.setOption('userGuideSha256Hash', userGuideSha256HashInFile);-}--async function importZip(fileBuffer, importRootNote) {- // maps from original noteId (in ZIP file) to newly generated noteId- const noteIdMap = {};- const attributes = [];- let metaFile = null;-- function getNewNoteId(origNoteId) {- if (origNoteId === 'root' || origNoteId.startsWith("_")) {- // these "named" noteIds don't differ between Trilium instances- return origNoteId;- }-- if (!noteIdMap[origNoteId]) {- noteIdMap[origNoteId] = utils.newEntityId();- }-- return noteIdMap[origNoteId];- }-- function getMeta(filePath) {- const pathSegments = filePath.split(/[\/\\]/g);-- let cursor = {- isImportRoot: true,- children: metaFile.files- };-- let parent;-- for (const segment of pathSegments) {- if (!cursor || !cursor.children || cursor.children.length === 0) {- throw new Error(`Note meta for '${filePath}' not found.`);- }-- parent = cursor;- cursor = cursor.children.find(file => file.dataFileName === segment || file.dirFileName === segment);- }-- return {- parentNoteMeta: parent,- noteMeta: cursor- };- }-- function getParentNoteId(filePath, parentNoteMeta) {- return parentNoteMeta.isImportRoot ? importRootNote.noteId : getNewNoteId(parentNoteMeta.noteId);- }-- function getNoteId(noteMeta) {- let userGuideNoteId;// = noteMeta.attributes?.find(attr => attr.type === 'label' && attr.name === 'helpNoteId')?.value;-- userGuideNoteId = '_userGuide' + noteMeta.title.replace(/[^a-z0-9]/ig, '');-- if (noteMeta.title.trim() === 'User Guide') {- userGuideNoteId = '_userGuide';- }-- const noteId = userGuideNoteId || noteMeta.noteId;- noteIdMap[noteMeta.noteId] = noteId;-- return noteId;- }-- function saveAttributes(note, noteMeta) {- if (!noteMeta) {- return;- }-- for (const attr of noteMeta.attributes) {- attr.noteId = note.noteId;-- if (attr.type === 'label-definition') {- attr.type = 'label';- attr.name = `label:${attr.name}`;- }- else if (attr.type === 'relation-definition') {- attr.type = 'label';- attr.name = `relation:${attr.name}`;- }-- if (!attributeService.isAttributeType(attr.type)) {- log.error(`Unrecognized attribute type ${attr.type}`);- continue;- }-- if (attr.type === 'relation' && ['internalLink', 'imageLink', 'relationMapLink', 'includeNoteLink'].includes(attr.name)) {- // these relations are created automatically and as such don't need to be duplicated in the import- continue;- }-- if (attr.type === 'relation') {- attr.value = getNewNoteId(attr.value);- }-- attributes.push(attr);- }- }-- function saveDirectory(filePath) {- const { parentNoteMeta, noteMeta } = getMeta(filePath);-- const noteId = getNoteId(noteMeta);- const parentNoteId = getParentNoteId(filePath, parentNoteMeta);-- let note = becca.getNote(noteId);-- if (note) {- return;- }-- ({note} = noteService.createNewNote({- parentNoteId: parentNoteId,- title: noteMeta.title,- content: '',- noteId: noteId,- type: noteMeta.type,- mime: noteMeta.mime,- prefix: noteMeta.prefix,- isExpanded: noteMeta.isExpanded,- notePosition: noteMeta.notePosition,- isProtected: false,- ignoreForbiddenParents: true- }));-- saveAttributes(note, noteMeta);-- return noteId;- }-- function getNoteIdFromRelativeUrl(url, filePath) {- while (url.startsWith("./")) {- url = url.substr(2);- }-- let absUrl = path.dirname(filePath);-- while (url.startsWith("../")) {- absUrl = path.dirname(absUrl);-- url = url.substr(3);- }-- if (absUrl === '.') {- absUrl = '';- }-- absUrl += `${absUrl.length > 0 ? '/' : ''}${url}`;-- const {noteMeta} = getMeta(absUrl);- const targetNoteId = getNoteId(noteMeta);- return targetNoteId;- }-- function processTextNoteContent(content, filePath, noteMeta) {- function isUrlAbsolute(url) {- return /^(?:[a-z]+:)?\/\//i.test(url);- }-- content = content.replace(/<h1>([^<]*)<\/h1>/gi, (match, text) => {- if (noteMeta.title.trim() === text.trim()) {- return ""; // remove whole H1 tag- } else {- return `<h2>${text}</h2>`;- }- });-- content = htmlSanitizer.sanitize(content);-- content = content.replace(/<html.*<body[^>]*>/gis, "");- content = content.replace(/<\/body>.*<\/html>/gis, "");-- content = content.replace(/src="([^"]*)"/g, (match, url) => {- try {- url = decodeURIComponent(url);- } catch (e) {- log.error(`Cannot parse image URL '${url}', keeping original (${e}).`);- return `src="${url}"`;- }-- if (isUrlAbsolute(url) || url.startsWith("/")) {- return match;- }-- const targetNoteId = getNoteIdFromRelativeUrl(url, filePath);-- return `src="api/images/${targetNoteId}/${path.basename(url)}"`;- });-- content = content.replace(/href="([^"]*)"/g, (match, url) => {- try {- url = decodeURIComponent(url);- } catch (e) {- log.error(`Cannot parse link URL '${url}', keeping original (${e}).`);- return `href="${url}"`;- }-- if (url.startsWith('#') // already a note path (probably)- || isUrlAbsolute(url)) {- return match;- }-- const targetNoteId = getNoteIdFromRelativeUrl(url, filePath);-- return `href="#root/${targetNoteId}"`;- });-- content = content.replace(/data-note-path="([^"]*)"/g, (match, notePath) => {- const noteId = notePath.split("/").pop();-- let targetNoteId;-- if (noteId === 'root' || noteId.startsWith("_")) { // named noteIds stay identical across instances- targetNoteId = noteId;- } else {- targetNoteId = noteIdMap[noteId];- }-- return `data-note-path="root/${targetNoteId}"`;- });-- if (noteMeta) {- const includeNoteLinks = (noteMeta.attributes || [])- .filter(attr => attr.type === 'relation' && attr.name === 'includeNoteLink');-- for (const link of includeNoteLinks) {- // no need to escape the regexp find string since it's a noteId which doesn't contain any special characters- content = content.replace(new RegExp(link.value, "g"), getNewNoteId(link.value));- }- }- return content;- }-- function processNoteContent(noteMeta, type, mime, content, filePath) {- if (type === 'text') {- content = processTextNoteContent(content, filePath, noteMeta);- }-- if (type === 'relationMap') {- const relationMapLinks = (noteMeta.attributes || [])- .filter(attr => attr.type === 'relation' && attr.name === 'relationMapLink');-- // this will replace relation map links- for (const link of relationMapLinks) {- // no need to escape the regexp find string since it's a noteId which doesn't contain any special characters- content = content.replace(new RegExp(link.value, "g"), getNewNoteId(link.value));- }- }-- return content;- }-- function saveNote(filePath, content) {- const {parentNoteMeta, noteMeta} = getMeta(filePath);-- if (noteMeta?.noImport) {- return;- }-- const noteId = getNoteId(noteMeta);- const parentNoteId = getParentNoteId(filePath, parentNoteMeta);-- if (!parentNoteId) {- throw new Error(`Cannot find parentNoteId for ${filePath}`);- }-- if (noteMeta?.isClone) {- if (!becca.getBranchFromChildAndParent(noteId, parentNoteId)) {- new BBranch({- noteId,- parentNoteId,- isExpanded: noteMeta.isExpanded,- prefix: noteMeta.prefix,- notePosition: noteMeta.notePosition- }).save();- }-- return;- }-- let {type, mime} = noteMeta;-- if (type !== 'file' && type !== 'image') {- content = content.toString("UTF-8");- }-- content = processNoteContent(noteMeta, type, mime, content, filePath);-- let note = becca.getNote(noteId);-- if (note) {- // only skeleton was created because of altered order of cloned notes in ZIP, we need to update- // https://github.com/zadam/trilium/issues/2440- if (note.type === undefined) {- note.type = type;- note.mime = mime;- note.title = noteMeta.title;- note.isProtected = false;- note.save();- }-- note.setContent(content);-- if (!becca.getBranchFromChildAndParent(noteId, parentNoteId)) {- new BBranch({- noteId,- parentNoteId,- isExpanded: noteMeta.isExpanded,- prefix: noteMeta.prefix,- notePosition: noteMeta.notePosition- }).save();- }- }- else {- ({note} = noteService.createNewNote({- parentNoteId: parentNoteId,- title: noteMeta.title,- content: content,- noteId,- type,- mime,- prefix: noteMeta.prefix,- isExpanded: noteMeta.isExpanded,- notePosition: noteMeta.notePosition,- isProtected: false,- ignoreForbiddenParents: true- }));-- saveAttributes(note, noteMeta);- }- }-- const entries = [];-- await readZipFile(fileBuffer, async (zipfile, entry) => {- const filePath = normalizeFilePath(entry.fileName);-- if (/\/$/.test(entry.fileName)) {- entries.push({- type: 'directory',- filePath- });- }- else {- entries.push({- type: 'file',- filePath,- content: await readContent(zipfile, entry)- });- }-- zipfile.readEntry();- });-- metaFile = JSON.parse(entries.find(entry => entry.type === 'file' && entry.filePath === '!!!meta.json').content);-- sql.transactional(() => {- deleteUserGuideSubtree();-- for (const {type, filePath, content} of entries) {- if (type === 'directory') {- saveDirectory(filePath);- } else if (type === 'file') {- if (filePath === '!!!meta.json') {- continue;- }-- saveNote(filePath, content);- } else {- throw new Error(`Unknown type ${type}`)- }- }- });-- // we're saving attributes and links only now so that all relation and link target notes- // are already in the database (we don't want to have "broken" relations, not even transitionally)- for (const attr of attributes) {- if (attr.type !== 'relation' || attr.value in becca.notes) {- new BAttribute(attr).save();- }- else {- log.info(`Relation not imported since the target note doesn't exist: ${JSON.stringify(attr)}`);- }- }-}--/**- * This is a special implementation of deleting the subtree, because we want to preserve the links to the user guide pages- * and clones.- */-function deleteUserGuideSubtree() {- const DELETE_ID = 'user-guide';-- function remove(branch) {- branch.markAsDeleted(DELETE_ID);-- const note = becca.getNote(branch.noteId);-- for (const branch of note.getChildBranches()) {- remove(branch);- }-- note.getOwnedAttributes().forEach(attr => attr.markAsDeleted(DELETE_ID));-- note.markAsDeleted(DELETE_ID)- }-- remove(becca.getBranchFromChildAndParent('_userGuide', '_hidden'));-}--/** @returns {string} path without leading or trailing slash and backslashes converted to forward ones */-function normalizeFilePath(filePath) {- filePath = filePath.replace(/\\/g, "/");-- if (filePath.startsWith("/")) {- filePath = filePath.substr(1);- }-- if (filePath.endsWith("/")) {- filePath = filePath.substr(0, filePath.length - 1);- }-- return filePath;-}--function streamToBuffer(stream) {- const chunks = [];- stream.on('data', chunk => chunks.push(chunk));-- return new Promise((res, rej) => stream.on('end', () => res(Buffer.concat(chunks))));-}--function readContent(zipfile, entry) {- return new Promise((res, rej) => {- zipfile.openReadStream(entry, function(err, readStream) {- if (err) rej(err);-- streamToBuffer(readStream).then(res);- });- });-}--function readZipFile(buffer, processEntryCallback) {- return new Promise((res, rej) => {- yauzl.fromBuffer(buffer, {lazyEntries: true, validateEntrySizes: false}, function(err, zipfile) {- if (err) throw err;- zipfile.readEntry();- zipfile.on("entry", entry => processEntryCallback(zipfile, entry));- zipfile.on("end", res);- });- });-}--module.exports = {- importUserGuideIfNeeded-};