diff --git a/docs/frontend_api/FNote.html b/docs/frontend_api/FNote.html index 6ec36690e..770a94b16 100644 --- a/docs/frontend_api/FNote.html +++ b/docs/frontend_api/FNote.html @@ -1168,7 +1168,7 @@
Source:
@@ -1274,7 +1274,7 @@
Source:
@@ -1376,7 +1376,7 @@
Source:
@@ -1550,7 +1550,7 @@
Source:
@@ -1728,7 +1728,7 @@
Source:
@@ -1928,7 +1928,7 @@
Source:
@@ -2107,7 +2107,7 @@
Source:
@@ -2286,7 +2286,7 @@
Source:
@@ -2392,7 +2392,7 @@
Source:
@@ -2496,7 +2496,7 @@
Source:
@@ -2600,7 +2600,7 @@
Source:
@@ -2702,7 +2702,7 @@
Source:
@@ -2804,7 +2804,7 @@
Source:
@@ -2906,7 +2906,7 @@
Source:
@@ -3057,7 +3057,7 @@
Source:
@@ -3212,7 +3212,7 @@
Source:
@@ -3379,7 +3379,7 @@
Source:
@@ -3487,7 +3487,7 @@
Source:
@@ -3589,7 +3589,7 @@
Source:
@@ -3763,7 +3763,7 @@
Source:
@@ -3941,7 +3941,7 @@
Source:
@@ -4141,7 +4141,7 @@
Source:
@@ -4296,7 +4296,7 @@
Source:
@@ -4451,7 +4451,7 @@
Source:
@@ -4618,7 +4618,7 @@
Source:
@@ -4773,7 +4773,7 @@
Source:
@@ -4928,7 +4928,7 @@
Source:
@@ -5095,7 +5095,7 @@
Source:
@@ -5201,7 +5201,7 @@
Source:
@@ -5303,7 +5303,7 @@
Source:
@@ -5405,7 +5405,7 @@
Source:
@@ -5507,7 +5507,7 @@
Source:
@@ -5658,7 +5658,7 @@
Source:
@@ -5813,7 +5813,7 @@
Source:
@@ -5983,7 +5983,7 @@
Source:
@@ -6134,7 +6134,7 @@
Source:
@@ -6301,7 +6301,7 @@
Source:
@@ -6407,7 +6407,7 @@
Source:
@@ -6585,7 +6585,7 @@
Source:
@@ -6691,7 +6691,7 @@
Source:
@@ -6797,7 +6797,7 @@
Source:
@@ -6971,7 +6971,7 @@
Source:
@@ -7077,7 +7077,7 @@
Source:
@@ -7228,7 +7228,7 @@
Source:
@@ -7406,7 +7406,7 @@
Source:
@@ -7561,7 +7561,7 @@
Source:
@@ -7716,7 +7716,7 @@
Source:
@@ -7871,7 +7871,7 @@
Source:
@@ -7979,7 +7979,7 @@
Source:
@@ -8063,7 +8063,7 @@
Source:
@@ -8157,7 +8157,7 @@
Source:
@@ -8263,7 +8263,7 @@
Source:
@@ -8520,7 +8520,7 @@
Source:
diff --git a/docs/frontend_api/entities_fnote.js.html b/docs/frontend_api/entities_fnote.js.html index 99231fa38..2893ad25b 100644 --- a/docs/frontend_api/entities_fnote.js.html +++ b/docs/frontend_api/entities_fnote.js.html @@ -148,10 +148,9 @@ class FNote { } async getContent() { - // we're not caching content since these objects are in froca and as such pretty long-lived - const note = await server.get(`notes/${this.noteId}`); + const blob = await this.getBlob(); - return note.content; + return blob?.content; } async getJsonContent() { diff --git a/package-lock.json b/package-lock.json index bea95ce19..bae0561a4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,11 +11,11 @@ "license": "AGPL-3.0-only", "dependencies": { "@braintree/sanitize-url": "6.0.4", - "@electron/remote": "2.0.10", + "@electron/remote": "2.0.11", "@excalidraw/excalidraw": "0.15.3", "archiver": "5.3.1", "async-mutex": "0.4.0", - "axios": "1.4.0", + "axios": "1.5.0", "better-sqlite3": "8.4.0", "chokidar": "3.5.3", "cls-hooked": "4.2.2", @@ -32,14 +32,14 @@ "escape-html": "1.0.3", "express": "4.18.2", "express-partial-content": "1.0.2", - "express-rate-limit": "6.9.0", + "express-rate-limit": "6.10.0", "express-session": "1.17.3", "fs-extra": "11.1.1", "helmet": "7.0.0", "html": "1.0.0", "html2plaintext": "2.1.4", "http-proxy-agent": "7.0.0", - "https-proxy-agent": "7.0.1", + "https-proxy-agent": "7.0.2", "image-type": "4.1.0", "ini": "3.0.1", "is-animated": "2.0.2", @@ -79,8 +79,8 @@ }, "devDependencies": { "cross-env": "7.0.3", - "electron": "25.7.0", - "electron-builder": "24.6.3", + "electron": "25.8.0", + "electron-builder": "24.6.4", "electron-packager": "17.1.2", "electron-rebuild": "3.2.9", "eslint": "8.48.0", @@ -94,7 +94,7 @@ "jasmine": "5.1.0", "jsdoc": "4.0.2", "jsonc-eslint-parser": "2.3.0", - "lint-staged": "14.0.0", + "lint-staged": "14.0.1", "lorem-ipsum": "2.0.8", "nodemon": "3.0.1", "prettier": "3.0.3", @@ -326,17 +326,17 @@ } }, "node_modules/@electron/remote": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/@electron/remote/-/remote-2.0.10.tgz", - "integrity": "sha512-3SFKKaQXcyWgwmibud+UqJl/XlHOgLcI3fwtB9pNelPSJAcTxocOJrF6FaxBIQaj1+R05Di6xuAswZpXAW7xhA==", + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@electron/remote/-/remote-2.0.11.tgz", + "integrity": "sha512-PYEs7W3GrQNuhgiMHjFEvL5MbAL6C7m1AwSAHGqC+xc33IdP7rcGtJSdTP2eg1ssyB3oI00KwTsiSlsQbAoXpA==", "peerDependencies": { "electron": ">= 13.0.0" } }, "node_modules/@electron/universal": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/@electron/universal/-/universal-1.3.4.tgz", - "integrity": "sha512-BdhBgm2ZBnYyYRLRgOjM5VHkyFItsbggJ0MHycOjKWdFGYwK97ZFXH54dTvUWEfha81vfvwr5On6XBjt99uDcg==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@electron/universal/-/universal-1.4.1.tgz", + "integrity": "sha512-lE/U3UNw1YHuowNbTmKNs9UlS3En3cPgwM5MI+agIgr/B1hSze9NdOP0qn7boZaI9Lph8IDv3/24g9IxnJP7aQ==", "dev": true, "dependencies": { "@electron/asar": "^3.2.1", @@ -1909,15 +1909,15 @@ "dev": true }, "node_modules/app-builder-lib": { - "version": "24.6.3", - "resolved": "https://registry.npmjs.org/app-builder-lib/-/app-builder-lib-24.6.3.tgz", - "integrity": "sha512-++0Zp7vcCHfXMBGVj7luFxpqvMPk5mcWeTuw7OK0xNAaNtYQTTN0d9YfWRsb1MvviTOOhyHeULWz1CaixrdrDg==", + "version": "24.6.4", + "resolved": "https://registry.npmjs.org/app-builder-lib/-/app-builder-lib-24.6.4.tgz", + "integrity": "sha512-m9931WXb83teb32N0rKg+ulbn6+Hl8NV5SUpVDOVz9MWOXfhV6AQtTdftf51zJJvCQnQugGtSqoLvgw6mdF/Rg==", "dev": true, "dependencies": { "@develar/schema-utils": "~2.6.5", - "@electron/notarize": "^1.2.3", - "@electron/osx-sign": "^1.0.4", - "@electron/universal": "1.3.4", + "@electron/notarize": "2.1.0", + "@electron/osx-sign": "1.0.5", + "@electron/universal": "1.4.1", "@malept/flatpak-bundler": "^0.4.0", "@types/fs-extra": "9.0.13", "7zip-bin": "~5.1.1", @@ -1947,6 +1947,35 @@ "node": ">=14.0.0" } }, + "node_modules/app-builder-lib/node_modules/@electron/notarize": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@electron/notarize/-/notarize-2.1.0.tgz", + "integrity": "sha512-Q02xem1D0sg4v437xHgmBLxI2iz/fc0D4K7fiVWHa/AnW8o7D751xyKNXgziA6HrTOme9ul1JfWN5ark8WH1xA==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "fs-extra": "^9.0.1", + "promise-retry": "^2.0.1" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/app-builder-lib/node_modules/@electron/notarize/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/app-builder-lib/node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -2388,9 +2417,9 @@ "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" }, "node_modules/axios": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", - "integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.0.tgz", + "integrity": "sha512-D4DdjDo5CY50Qms0qGQTTw6Q44jl7zRwY7bthds06pUGfChBCTcQs+N743eFWGEd6pRTMd6A+I87aWyFV5wiZQ==", "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -4037,12 +4066,12 @@ } }, "node_modules/dmg-builder": { - "version": "24.6.3", - "resolved": "https://registry.npmjs.org/dmg-builder/-/dmg-builder-24.6.3.tgz", - "integrity": "sha512-O7KNT7OKqtV54fMYUpdlyTOCP5DoPuRMLqMTgxxV2PO8Hj/so6zOl5o8GTs8pdDkeAhJzCFOUNB3BDhgXbUbJg==", + "version": "24.6.4", + "resolved": "https://registry.npmjs.org/dmg-builder/-/dmg-builder-24.6.4.tgz", + "integrity": "sha512-BNcHRc9CWEuI9qt0E655bUBU/j/3wUCYBVKGu1kVpbN5lcUdEJJJeiO0NHK3dgKmra6LUUZlo+mWqc+OCbi0zw==", "dev": true, "dependencies": { - "app-builder-lib": "24.6.3", + "app-builder-lib": "24.6.4", "builder-util": "24.5.0", "builder-util-runtime": "9.2.1", "fs-extra": "^10.1.0", @@ -4247,9 +4276,9 @@ } }, "node_modules/electron": { - "version": "25.7.0", - "resolved": "https://registry.npmjs.org/electron/-/electron-25.7.0.tgz", - "integrity": "sha512-P82EzYZ8k9J21x5syhXV7EkezDmEXwycReXnagfzS0kwepnrlWzq1aDIUWdNvzTdHobky4m/nYcL98qd73mEVA==", + "version": "25.8.0", + "resolved": "https://registry.npmjs.org/electron/-/electron-25.8.0.tgz", + "integrity": "sha512-T3kC1a/3ntSaYMCVVfUUc9v7myPzi6J2GP0Ad/CyfWKDPp054dGyKxb2EEjKnxQQ7wfjsT1JTEdBG04x6ekVBw==", "hasInstallScript": true, "dependencies": { "@electron/get": "^2.0.0", @@ -4264,16 +4293,16 @@ } }, "node_modules/electron-builder": { - "version": "24.6.3", - "resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-24.6.3.tgz", - "integrity": "sha512-O6PqhRXwfxCNTXI4BlhELSeYYO6/tqlxRuy+4+xKBokQvwDDjDgZMMoSgAmanVSCuzjE7MZldI9XYrKFk+EQDw==", + "version": "24.6.4", + "resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-24.6.4.tgz", + "integrity": "sha512-uNWQoU7pE7qOaIQ6CJHpBi44RJFVG8OHRBIadUxrsDJVwLLo8Nma3K/EEtx5/UyWAQYdcK4nVPYKoRqBb20hbA==", "dev": true, "dependencies": { - "app-builder-lib": "24.6.3", + "app-builder-lib": "24.6.4", "builder-util": "24.5.0", "builder-util-runtime": "9.2.1", "chalk": "^4.1.2", - "dmg-builder": "24.6.3", + "dmg-builder": "24.6.4", "fs-extra": "^10.1.0", "is-ci": "^3.0.0", "lazy-val": "^1.0.5", @@ -5607,11 +5636,11 @@ } }, "node_modules/express-rate-limit": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-6.9.0.tgz", - "integrity": "sha512-AnISR3V8qy4gpKM62/TzYdoFO9NV84fBx0POXzTryHU/qGUJBWuVGd+JhbvtVmKBv37t8/afmqdnv16xWoQxag==", + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-6.10.0.tgz", + "integrity": "sha512-CtGn2IyklQnIWpA4pcRaovXkNR8psDQ9Fa0y5u7Yhz5TL74dNsm7oXpfm1HPKUYiNe5w0TPEyNbIrvNVU/xUIg==", "engines": { - "node": ">= 14.0.0" + "node": ">= 14" }, "peerDependencies": { "express": "^4 || ^5" @@ -6925,9 +6954,9 @@ } }, "node_modules/https-proxy-agent": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.1.tgz", - "integrity": "sha512-Eun8zV0kcYS1g19r78osiQLEFIRspRUDd9tIfBCTBPBeMieF/EsJNL8VI3xOIdYRDEkjQnqOYPsZ2DsWsVsFwQ==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", + "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", "dependencies": { "agent-base": "^7.0.2", "debug": "4" @@ -8236,9 +8265,9 @@ } }, "node_modules/lint-staged": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-14.0.0.tgz", - "integrity": "sha512-0tLf0pqZYkar/wu3nTctk4rVIG+d7PanDYv4/IQR4qwdqfQkTDziLRFnqMcLuLBTuUqmcLwsHPD2EjQ18d/oaA==", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-14.0.1.tgz", + "integrity": "sha512-Mw0cL6HXnHN1ag0mN/Dg4g6sr8uf8sn98w2Oc1ECtFto9tvRF7nkXGJRbx8gPlHyoR0pLyBr2lQHbWwmUHe1Sw==", "dev": true, "dependencies": { "chalk": "5.3.0", @@ -13452,15 +13481,15 @@ } }, "@electron/remote": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/@electron/remote/-/remote-2.0.10.tgz", - "integrity": "sha512-3SFKKaQXcyWgwmibud+UqJl/XlHOgLcI3fwtB9pNelPSJAcTxocOJrF6FaxBIQaj1+R05Di6xuAswZpXAW7xhA==", + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@electron/remote/-/remote-2.0.11.tgz", + "integrity": "sha512-PYEs7W3GrQNuhgiMHjFEvL5MbAL6C7m1AwSAHGqC+xc33IdP7rcGtJSdTP2eg1ssyB3oI00KwTsiSlsQbAoXpA==", "requires": {} }, "@electron/universal": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/@electron/universal/-/universal-1.3.4.tgz", - "integrity": "sha512-BdhBgm2ZBnYyYRLRgOjM5VHkyFItsbggJ0MHycOjKWdFGYwK97ZFXH54dTvUWEfha81vfvwr5On6XBjt99uDcg==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@electron/universal/-/universal-1.4.1.tgz", + "integrity": "sha512-lE/U3UNw1YHuowNbTmKNs9UlS3En3cPgwM5MI+agIgr/B1hSze9NdOP0qn7boZaI9Lph8IDv3/24g9IxnJP7aQ==", "dev": true, "requires": { "@electron/asar": "^3.2.1", @@ -14692,15 +14721,15 @@ "dev": true }, "app-builder-lib": { - "version": "24.6.3", - "resolved": "https://registry.npmjs.org/app-builder-lib/-/app-builder-lib-24.6.3.tgz", - "integrity": "sha512-++0Zp7vcCHfXMBGVj7luFxpqvMPk5mcWeTuw7OK0xNAaNtYQTTN0d9YfWRsb1MvviTOOhyHeULWz1CaixrdrDg==", + "version": "24.6.4", + "resolved": "https://registry.npmjs.org/app-builder-lib/-/app-builder-lib-24.6.4.tgz", + "integrity": "sha512-m9931WXb83teb32N0rKg+ulbn6+Hl8NV5SUpVDOVz9MWOXfhV6AQtTdftf51zJJvCQnQugGtSqoLvgw6mdF/Rg==", "dev": true, "requires": { "@develar/schema-utils": "~2.6.5", - "@electron/notarize": "^1.2.3", - "@electron/osx-sign": "^1.0.4", - "@electron/universal": "1.3.4", + "@electron/notarize": "2.1.0", + "@electron/osx-sign": "1.0.5", + "@electron/universal": "1.4.1", "@malept/flatpak-bundler": "^0.4.0", "@types/fs-extra": "9.0.13", "7zip-bin": "~5.1.1", @@ -14727,6 +14756,31 @@ "temp-file": "^3.4.0" }, "dependencies": { + "@electron/notarize": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@electron/notarize/-/notarize-2.1.0.tgz", + "integrity": "sha512-Q02xem1D0sg4v437xHgmBLxI2iz/fc0D4K7fiVWHa/AnW8o7D751xyKNXgziA6HrTOme9ul1JfWN5ark8WH1xA==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "fs-extra": "^9.0.1", + "promise-retry": "^2.0.1" + }, + "dependencies": { + "fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "requires": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + } + } + }, "brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -15071,9 +15125,9 @@ "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" }, "axios": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", - "integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.0.tgz", + "integrity": "sha512-D4DdjDo5CY50Qms0qGQTTw6Q44jl7zRwY7bthds06pUGfChBCTcQs+N743eFWGEd6pRTMd6A+I87aWyFV5wiZQ==", "requires": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -16328,12 +16382,12 @@ } }, "dmg-builder": { - "version": "24.6.3", - "resolved": "https://registry.npmjs.org/dmg-builder/-/dmg-builder-24.6.3.tgz", - "integrity": "sha512-O7KNT7OKqtV54fMYUpdlyTOCP5DoPuRMLqMTgxxV2PO8Hj/so6zOl5o8GTs8pdDkeAhJzCFOUNB3BDhgXbUbJg==", + "version": "24.6.4", + "resolved": "https://registry.npmjs.org/dmg-builder/-/dmg-builder-24.6.4.tgz", + "integrity": "sha512-BNcHRc9CWEuI9qt0E655bUBU/j/3wUCYBVKGu1kVpbN5lcUdEJJJeiO0NHK3dgKmra6LUUZlo+mWqc+OCbi0zw==", "dev": true, "requires": { - "app-builder-lib": "24.6.3", + "app-builder-lib": "24.6.4", "builder-util": "24.5.0", "builder-util-runtime": "9.2.1", "dmg-license": "^1.0.11", @@ -16488,9 +16542,9 @@ } }, "electron": { - "version": "25.7.0", - "resolved": "https://registry.npmjs.org/electron/-/electron-25.7.0.tgz", - "integrity": "sha512-P82EzYZ8k9J21x5syhXV7EkezDmEXwycReXnagfzS0kwepnrlWzq1aDIUWdNvzTdHobky4m/nYcL98qd73mEVA==", + "version": "25.8.0", + "resolved": "https://registry.npmjs.org/electron/-/electron-25.8.0.tgz", + "integrity": "sha512-T3kC1a/3ntSaYMCVVfUUc9v7myPzi6J2GP0Ad/CyfWKDPp054dGyKxb2EEjKnxQQ7wfjsT1JTEdBG04x6ekVBw==", "requires": { "@electron/get": "^2.0.0", "@types/node": "^18.11.18", @@ -16498,16 +16552,16 @@ } }, "electron-builder": { - "version": "24.6.3", - "resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-24.6.3.tgz", - "integrity": "sha512-O6PqhRXwfxCNTXI4BlhELSeYYO6/tqlxRuy+4+xKBokQvwDDjDgZMMoSgAmanVSCuzjE7MZldI9XYrKFk+EQDw==", + "version": "24.6.4", + "resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-24.6.4.tgz", + "integrity": "sha512-uNWQoU7pE7qOaIQ6CJHpBi44RJFVG8OHRBIadUxrsDJVwLLo8Nma3K/EEtx5/UyWAQYdcK4nVPYKoRqBb20hbA==", "dev": true, "requires": { - "app-builder-lib": "24.6.3", + "app-builder-lib": "24.6.4", "builder-util": "24.5.0", "builder-util-runtime": "9.2.1", "chalk": "^4.1.2", - "dmg-builder": "24.6.3", + "dmg-builder": "24.6.4", "fs-extra": "^10.1.0", "is-ci": "^3.0.0", "lazy-val": "^1.0.5", @@ -17545,9 +17599,9 @@ "requires": {} }, "express-rate-limit": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-6.9.0.tgz", - "integrity": "sha512-AnISR3V8qy4gpKM62/TzYdoFO9NV84fBx0POXzTryHU/qGUJBWuVGd+JhbvtVmKBv37t8/afmqdnv16xWoQxag==", + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-6.10.0.tgz", + "integrity": "sha512-CtGn2IyklQnIWpA4pcRaovXkNR8psDQ9Fa0y5u7Yhz5TL74dNsm7oXpfm1HPKUYiNe5w0TPEyNbIrvNVU/xUIg==", "requires": {} }, "express-session": { @@ -18497,9 +18551,9 @@ } }, "https-proxy-agent": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.1.tgz", - "integrity": "sha512-Eun8zV0kcYS1g19r78osiQLEFIRspRUDd9tIfBCTBPBeMieF/EsJNL8VI3xOIdYRDEkjQnqOYPsZ2DsWsVsFwQ==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", + "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", "requires": { "agent-base": "^7.0.2", "debug": "4" @@ -19450,9 +19504,9 @@ } }, "lint-staged": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-14.0.0.tgz", - "integrity": "sha512-0tLf0pqZYkar/wu3nTctk4rVIG+d7PanDYv4/IQR4qwdqfQkTDziLRFnqMcLuLBTuUqmcLwsHPD2EjQ18d/oaA==", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-14.0.1.tgz", + "integrity": "sha512-Mw0cL6HXnHN1ag0mN/Dg4g6sr8uf8sn98w2Oc1ECtFto9tvRF7nkXGJRbx8gPlHyoR0pLyBr2lQHbWwmUHe1Sw==", "dev": true, "requires": { "chalk": "5.3.0", diff --git a/package.json b/package.json index 6b3a4d3bd..f103efe7b 100644 --- a/package.json +++ b/package.json @@ -32,11 +32,11 @@ }, "dependencies": { "@braintree/sanitize-url": "6.0.4", - "@electron/remote": "2.0.10", + "@electron/remote": "2.0.11", "@excalidraw/excalidraw": "0.15.3", "archiver": "5.3.1", "async-mutex": "0.4.0", - "axios": "1.4.0", + "axios": "1.5.0", "better-sqlite3": "8.4.0", "chokidar": "3.5.3", "cls-hooked": "4.2.2", @@ -53,14 +53,14 @@ "escape-html": "1.0.3", "express": "4.18.2", "express-partial-content": "1.0.2", - "express-rate-limit": "6.9.0", + "express-rate-limit": "6.10.0", "express-session": "1.17.3", "fs-extra": "11.1.1", "helmet": "7.0.0", "html": "1.0.0", "html2plaintext": "2.1.4", "http-proxy-agent": "7.0.0", - "https-proxy-agent": "7.0.1", + "https-proxy-agent": "7.0.2", "image-type": "4.1.0", "ini": "3.0.1", "is-animated": "2.0.2", @@ -97,8 +97,8 @@ }, "devDependencies": { "cross-env": "7.0.3", - "electron": "25.7.0", - "electron-builder": "24.6.3", + "electron": "25.8.0", + "electron-builder": "24.6.4", "electron-packager": "17.1.2", "electron-rebuild": "3.2.9", "eslint": "8.48.0", @@ -112,7 +112,7 @@ "jasmine": "5.1.0", "jsdoc": "4.0.2", "jsonc-eslint-parser": "2.3.0", - "lint-staged": "14.0.0", + "lint-staged": "14.0.1", "lorem-ipsum": "2.0.8", "nodemon": "3.0.1", "prettier": "3.0.3", diff --git a/spec/search/parser.spec.js b/spec/search/parser.spec.js index 1d1e49d24..fd1e66437 100644 --- a/spec/search/parser.spec.js +++ b/spec/search/parser.spec.js @@ -36,9 +36,9 @@ describe("Parser", () => { expect(rootExp.constructor.name).toEqual("AndExp"); expect(rootExp.subExpressions[0].constructor.name).toEqual("PropertyComparisonExp"); - expect(rootExp.subExpressions[1].constructor.name).toEqual("OrExp"); - expect(rootExp.subExpressions[1].subExpressions[0].constructor.name).toEqual("NoteFlatTextExp"); - expect(rootExp.subExpressions[1].subExpressions[0].tokens).toEqual(["hello", "hi"]); + expect(rootExp.subExpressions[2].constructor.name).toEqual("OrExp"); + expect(rootExp.subExpressions[2].subExpressions[0].constructor.name).toEqual("NoteFlatTextExp"); + expect(rootExp.subExpressions[2].subExpressions[0].tokens).toEqual(["hello", "hi"]); }); it("fulltext parser with content", () => { @@ -51,9 +51,9 @@ describe("Parser", () => { expect(rootExp.constructor.name).toEqual("AndExp"); assertIsArchived(rootExp.subExpressions[0]); - expect(rootExp.subExpressions[1].constructor.name).toEqual("OrExp"); + expect(rootExp.subExpressions[2].constructor.name).toEqual("OrExp"); - const subs = rootExp.subExpressions[1].subExpressions; + const subs = rootExp.subExpressions[2].subExpressions; expect(subs[0].constructor.name).toEqual("NoteFlatTextExp"); expect(subs[0].tokens).toEqual(["hello", "hi"]); @@ -71,10 +71,10 @@ describe("Parser", () => { expect(rootExp.constructor.name).toEqual("AndExp"); assertIsArchived(rootExp.subExpressions[0]); - expect(rootExp.subExpressions[1].constructor.name).toEqual("LabelComparisonExp"); - expect(rootExp.subExpressions[1].attributeType).toEqual("label"); - expect(rootExp.subExpressions[1].attributeName).toEqual("mylabel"); - expect(rootExp.subExpressions[1].comparator).toBeTruthy(); + expect(rootExp.subExpressions[2].constructor.name).toEqual("LabelComparisonExp"); + expect(rootExp.subExpressions[2].attributeType).toEqual("label"); + expect(rootExp.subExpressions[2].attributeName).toEqual("mylabel"); + expect(rootExp.subExpressions[2].comparator).toBeTruthy(); }); it("simple attribute negation", () => { @@ -86,10 +86,10 @@ describe("Parser", () => { expect(rootExp.constructor.name).toEqual("AndExp"); assertIsArchived(rootExp.subExpressions[0]); - expect(rootExp.subExpressions[1].constructor.name).toEqual("NotExp"); - expect(rootExp.subExpressions[1].subExpression.constructor.name).toEqual("AttributeExistsExp"); - expect(rootExp.subExpressions[1].subExpression.attributeType).toEqual("label"); - expect(rootExp.subExpressions[1].subExpression.attributeName).toEqual("mylabel"); + expect(rootExp.subExpressions[2].constructor.name).toEqual("NotExp"); + expect(rootExp.subExpressions[2].subExpression.constructor.name).toEqual("AttributeExistsExp"); + expect(rootExp.subExpressions[2].subExpression.attributeType).toEqual("label"); + expect(rootExp.subExpressions[2].subExpression.attributeName).toEqual("mylabel"); rootExp = parse({ fulltextTokens: [], @@ -99,10 +99,10 @@ describe("Parser", () => { expect(rootExp.constructor.name).toEqual("AndExp"); assertIsArchived(rootExp.subExpressions[0]); - expect(rootExp.subExpressions[1].constructor.name).toEqual("NotExp"); - expect(rootExp.subExpressions[1].subExpression.constructor.name).toEqual("AttributeExistsExp"); - expect(rootExp.subExpressions[1].subExpression.attributeType).toEqual("relation"); - expect(rootExp.subExpressions[1].subExpression.attributeName).toEqual("myrelation"); + expect(rootExp.subExpressions[2].constructor.name).toEqual("NotExp"); + expect(rootExp.subExpressions[2].subExpression.constructor.name).toEqual("AttributeExistsExp"); + expect(rootExp.subExpressions[2].subExpression.attributeType).toEqual("relation"); + expect(rootExp.subExpressions[2].subExpression.attributeName).toEqual("myrelation"); }); it("simple label AND", () => { @@ -115,8 +115,8 @@ describe("Parser", () => { expect(rootExp.constructor.name).toEqual("AndExp"); assertIsArchived(rootExp.subExpressions[0]); - expect(rootExp.subExpressions[1].constructor.name).toEqual("AndExp"); - const [firstSub, secondSub] = rootExp.subExpressions[1].subExpressions; + expect(rootExp.subExpressions[2].constructor.name).toEqual("AndExp"); + const [firstSub, secondSub] = rootExp.subExpressions[2].subExpressions; expect(firstSub.constructor.name).toEqual("LabelComparisonExp"); expect(firstSub.attributeName).toEqual("first"); @@ -135,8 +135,8 @@ describe("Parser", () => { expect(rootExp.constructor.name).toEqual("AndExp"); assertIsArchived(rootExp.subExpressions[0]); - expect(rootExp.subExpressions[1].constructor.name).toEqual("AndExp"); - const [firstSub, secondSub] = rootExp.subExpressions[1].subExpressions; + expect(rootExp.subExpressions[2].constructor.name).toEqual("AndExp"); + const [firstSub, secondSub] = rootExp.subExpressions[2].subExpressions; expect(firstSub.constructor.name).toEqual("LabelComparisonExp"); expect(firstSub.attributeName).toEqual("first"); @@ -155,8 +155,8 @@ describe("Parser", () => { expect(rootExp.constructor.name).toEqual("AndExp"); assertIsArchived(rootExp.subExpressions[0]); - expect(rootExp.subExpressions[1].constructor.name).toEqual("OrExp"); - const [firstSub, secondSub] = rootExp.subExpressions[1].subExpressions; + expect(rootExp.subExpressions[2].constructor.name).toEqual("OrExp"); + const [firstSub, secondSub] = rootExp.subExpressions[2].subExpressions; expect(firstSub.constructor.name).toEqual("LabelComparisonExp"); expect(firstSub.attributeName).toEqual("first"); @@ -173,17 +173,17 @@ describe("Parser", () => { }); expect(rootExp.constructor.name).toEqual("AndExp"); - const [firstSub, secondSub, thirdSub] = rootExp.subExpressions; + const [firstSub, secondSub, thirdSub, fourth] = rootExp.subExpressions; expect(firstSub.constructor.name).toEqual("PropertyComparisonExp"); expect(firstSub.propertyName).toEqual('isArchived'); - expect(secondSub.constructor.name).toEqual("OrExp"); - expect(secondSub.subExpressions[0].constructor.name).toEqual("NoteFlatTextExp"); - expect(secondSub.subExpressions[0].tokens).toEqual(["hello"]); + expect(thirdSub.constructor.name).toEqual("OrExp"); + expect(thirdSub.subExpressions[0].constructor.name).toEqual("NoteFlatTextExp"); + expect(thirdSub.subExpressions[0].tokens).toEqual(["hello"]); - expect(thirdSub.constructor.name).toEqual("LabelComparisonExp"); - expect(thirdSub.attributeName).toEqual("mylabel"); + expect(fourth.constructor.name).toEqual("LabelComparisonExp"); + expect(fourth.attributeName).toEqual("mylabel"); }); it("label sub-expression", () => { @@ -196,8 +196,8 @@ describe("Parser", () => { expect(rootExp.constructor.name).toEqual("AndExp"); assertIsArchived(rootExp.subExpressions[0]); - expect(rootExp.subExpressions[1].constructor.name).toEqual("OrExp"); - const [firstSub, secondSub] = rootExp.subExpressions[1].subExpressions; + expect(rootExp.subExpressions[2].constructor.name).toEqual("OrExp"); + const [firstSub, secondSub] = rootExp.subExpressions[2].subExpressions; expect(firstSub.constructor.name).toEqual("LabelComparisonExp"); expect(firstSub.attributeName).toEqual("first"); @@ -222,8 +222,8 @@ describe("Parser", () => { expect(rootExp.constructor.name).toEqual("AndExp"); assertIsArchived(rootExp.subExpressions[0]); - expect(rootExp.subExpressions[1].constructor.name).toEqual("AndExp"); - const [firstSub, secondSub, thirdSub] = rootExp.subExpressions[1].subExpressions; + expect(rootExp.subExpressions[2].constructor.name).toEqual("AndExp"); + const [firstSub, secondSub, thirdSub] = rootExp.subExpressions[2].subExpressions; expect(firstSub.constructor.name).toEqual("AttributeExistsExp"); expect(firstSub.attributeName).toEqual("first"); @@ -290,10 +290,11 @@ describe("Invalid expressions", () => { expect(rootExp.constructor.name).toEqual("AndExp"); assertIsArchived(rootExp.subExpressions[0]); - expect(rootExp.subExpressions[1].constructor.name).toEqual("LabelComparisonExp"); - expect(rootExp.subExpressions[1].attributeType).toEqual("label"); - expect(rootExp.subExpressions[1].attributeName).toEqual("first"); - expect(rootExp.subExpressions[1].comparator).toBeTruthy(); + + expect(rootExp.subExpressions[2].constructor.name).toEqual("LabelComparisonExp"); + expect(rootExp.subExpressions[2].attributeType).toEqual("label"); + expect(rootExp.subExpressions[2].attributeName).toEqual("first"); + expect(rootExp.subExpressions[2].comparator).toBeTruthy(); }); it("searching by relation without note property", () => {