mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	changes in retrieval of initial note tree and then updates
This commit is contained in:
		
							
								
								
									
										90
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										90
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @@ -842,7 +842,7 @@ | |||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "file-type": { |         "file-type": { | ||||||
|           "version": "3.9.0", |           "version": "3.9.0", | ||||||
|           "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", |           "resolved": "http://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", | ||||||
|           "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=" |           "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=" | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
| @@ -1226,7 +1226,7 @@ | |||||||
|         }, |         }, | ||||||
|         "uuid": { |         "uuid": { | ||||||
|           "version": "2.0.3", |           "version": "2.0.3", | ||||||
|           "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz", |           "resolved": "http://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz", | ||||||
|           "integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho=" |           "integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho=" | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
| @@ -1260,7 +1260,7 @@ | |||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "semver": { |         "semver": { | ||||||
|           "version": "4.3.6", |           "version": "4.3.6", | ||||||
|           "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", |           "resolved": "http://registry.npmjs.org/semver/-/semver-4.3.6.tgz", | ||||||
|           "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=" |           "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=" | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
| @@ -1280,7 +1280,7 @@ | |||||||
|     }, |     }, | ||||||
|     "bl": { |     "bl": { | ||||||
|       "version": "1.2.2", |       "version": "1.2.2", | ||||||
|       "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", |       "resolved": "http://registry.npmjs.org/bl/-/bl-1.2.2.tgz", | ||||||
|       "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", |       "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "readable-stream": "^2.3.5", |         "readable-stream": "^2.3.5", | ||||||
| @@ -1465,7 +1465,7 @@ | |||||||
|     }, |     }, | ||||||
|     "buf-compare": { |     "buf-compare": { | ||||||
|       "version": "1.0.1", |       "version": "1.0.1", | ||||||
|       "resolved": "https://registry.npmjs.org/buf-compare/-/buf-compare-1.0.1.tgz", |       "resolved": "http://registry.npmjs.org/buf-compare/-/buf-compare-1.0.1.tgz", | ||||||
|       "integrity": "sha1-/vKNqLgROgoNtEMLC2Rntpcws0o=", |       "integrity": "sha1-/vKNqLgROgoNtEMLC2Rntpcws0o=", | ||||||
|       "dev": true |       "dev": true | ||||||
|     }, |     }, | ||||||
| @@ -1525,12 +1525,12 @@ | |||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "file-type": { |         "file-type": { | ||||||
|           "version": "3.9.0", |           "version": "3.9.0", | ||||||
|           "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", |           "resolved": "http://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", | ||||||
|           "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=" |           "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=" | ||||||
|         }, |         }, | ||||||
|         "uuid": { |         "uuid": { | ||||||
|           "version": "2.0.3", |           "version": "2.0.3", | ||||||
|           "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz", |           "resolved": "http://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz", | ||||||
|           "integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho=" |           "integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho=" | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
| @@ -1619,7 +1619,7 @@ | |||||||
|         }, |         }, | ||||||
|         "readable-stream": { |         "readable-stream": { | ||||||
|           "version": "1.1.14", |           "version": "1.1.14", | ||||||
|           "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", |           "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", | ||||||
|           "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", |           "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", | ||||||
|           "requires": { |           "requires": { | ||||||
|             "core-util-is": "~1.0.0", |             "core-util-is": "~1.0.0", | ||||||
| @@ -1756,7 +1756,7 @@ | |||||||
|     }, |     }, | ||||||
|     "chalk": { |     "chalk": { | ||||||
|       "version": "1.1.3", |       "version": "1.1.3", | ||||||
|       "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", |       "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", | ||||||
|       "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", |       "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "ansi-styles": "^2.2.1", |         "ansi-styles": "^2.2.1", | ||||||
| @@ -2039,7 +2039,7 @@ | |||||||
|     }, |     }, | ||||||
|     "commander": { |     "commander": { | ||||||
|       "version": "2.8.1", |       "version": "2.8.1", | ||||||
|       "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz", |       "resolved": "http://registry.npmjs.org/commander/-/commander-2.8.1.tgz", | ||||||
|       "integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=", |       "integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "graceful-readlink": ">= 1.0.0" |         "graceful-readlink": ">= 1.0.0" | ||||||
| @@ -2751,7 +2751,7 @@ | |||||||
|         }, |         }, | ||||||
|         "readable-stream": { |         "readable-stream": { | ||||||
|           "version": "1.1.14", |           "version": "1.1.14", | ||||||
|           "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", |           "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", | ||||||
|           "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", |           "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", | ||||||
|           "requires": { |           "requires": { | ||||||
|             "core-util-is": "~1.0.0", |             "core-util-is": "~1.0.0", | ||||||
| @@ -4186,7 +4186,7 @@ | |||||||
|         }, |         }, | ||||||
|         "load-json-file": { |         "load-json-file": { | ||||||
|           "version": "2.0.0", |           "version": "2.0.0", | ||||||
|           "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", |           "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", | ||||||
|           "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", |           "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", | ||||||
|           "dev": true, |           "dev": true, | ||||||
|           "requires": { |           "requires": { | ||||||
| @@ -5485,7 +5485,7 @@ | |||||||
|     }, |     }, | ||||||
|     "get-stream": { |     "get-stream": { | ||||||
|       "version": "3.0.0", |       "version": "3.0.0", | ||||||
|       "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", |       "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", | ||||||
|       "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" |       "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" | ||||||
|     }, |     }, | ||||||
|     "get-value": { |     "get-value": { | ||||||
| @@ -5713,7 +5713,7 @@ | |||||||
|     }, |     }, | ||||||
|     "got": { |     "got": { | ||||||
|       "version": "5.7.1", |       "version": "5.7.1", | ||||||
|       "resolved": "https://registry.npmjs.org/got/-/got-5.7.1.tgz", |       "resolved": "http://registry.npmjs.org/got/-/got-5.7.1.tgz", | ||||||
|       "integrity": "sha1-X4FjWmHkplifGAVp6k44FoClHzU=", |       "integrity": "sha1-X4FjWmHkplifGAVp6k44FoClHzU=", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "create-error-class": "^3.0.1", |         "create-error-class": "^3.0.1", | ||||||
| @@ -6566,7 +6566,7 @@ | |||||||
|     }, |     }, | ||||||
|     "into-stream": { |     "into-stream": { | ||||||
|       "version": "3.1.0", |       "version": "3.1.0", | ||||||
|       "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz", |       "resolved": "http://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz", | ||||||
|       "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", |       "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "from2": "^2.1.1", |         "from2": "^2.1.1", | ||||||
| @@ -6802,7 +6802,7 @@ | |||||||
|     }, |     }, | ||||||
|     "is-obj": { |     "is-obj": { | ||||||
|       "version": "1.0.1", |       "version": "1.0.1", | ||||||
|       "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", |       "resolved": "http://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", | ||||||
|       "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" |       "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" | ||||||
|     }, |     }, | ||||||
|     "is-obj-prop": { |     "is-obj-prop": { | ||||||
| @@ -7363,7 +7363,7 @@ | |||||||
|     }, |     }, | ||||||
|     "load-json-file": { |     "load-json-file": { | ||||||
|       "version": "1.1.0", |       "version": "1.1.0", | ||||||
|       "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", |       "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", | ||||||
|       "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", |       "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "graceful-fs": "^4.1.2", |         "graceful-fs": "^4.1.2", | ||||||
| @@ -7846,7 +7846,7 @@ | |||||||
|     }, |     }, | ||||||
|     "minimist": { |     "minimist": { | ||||||
|       "version": "1.2.0", |       "version": "1.2.0", | ||||||
|       "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", |       "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", | ||||||
|       "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" |       "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" | ||||||
|     }, |     }, | ||||||
|     "minimist-options": { |     "minimist-options": { | ||||||
| @@ -7907,7 +7907,7 @@ | |||||||
|     }, |     }, | ||||||
|     "mkdirp": { |     "mkdirp": { | ||||||
|       "version": "0.5.1", |       "version": "0.5.1", | ||||||
|       "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", |       "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", | ||||||
|       "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", |       "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "minimist": "0.0.8" |         "minimist": "0.0.8" | ||||||
| @@ -7915,7 +7915,7 @@ | |||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "minimist": { |         "minimist": { | ||||||
|           "version": "0.0.8", |           "version": "0.0.8", | ||||||
|           "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", |           "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", | ||||||
|           "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" |           "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
| @@ -8070,7 +8070,7 @@ | |||||||
|             }, |             }, | ||||||
|             "get-stream": { |             "get-stream": { | ||||||
|               "version": "3.0.0", |               "version": "3.0.0", | ||||||
|               "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", |               "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", | ||||||
|               "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" |               "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" | ||||||
|             }, |             }, | ||||||
|             "got": { |             "got": { | ||||||
| @@ -8106,7 +8106,7 @@ | |||||||
|             }, |             }, | ||||||
|             "p-cancelable": { |             "p-cancelable": { | ||||||
|               "version": "0.4.1", |               "version": "0.4.1", | ||||||
|               "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz", |               "resolved": "http://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz", | ||||||
|               "integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==" |               "integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==" | ||||||
|             }, |             }, | ||||||
|             "p-event": { |             "p-event": { | ||||||
| @@ -8230,7 +8230,7 @@ | |||||||
|           "dependencies": { |           "dependencies": { | ||||||
|             "file-type": { |             "file-type": { | ||||||
|               "version": "3.9.0", |               "version": "3.9.0", | ||||||
|               "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", |               "resolved": "http://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", | ||||||
|               "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=" |               "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=" | ||||||
|             } |             } | ||||||
|           } |           } | ||||||
| @@ -8255,7 +8255,7 @@ | |||||||
|           "dependencies": { |           "dependencies": { | ||||||
|             "get-stream": { |             "get-stream": { | ||||||
|               "version": "3.0.0", |               "version": "3.0.0", | ||||||
|               "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", |               "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", | ||||||
|               "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" |               "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" | ||||||
|             }, |             }, | ||||||
|             "pify": { |             "pify": { | ||||||
| @@ -8312,7 +8312,7 @@ | |||||||
|         }, |         }, | ||||||
|         "get-stream": { |         "get-stream": { | ||||||
|           "version": "2.3.1", |           "version": "2.3.1", | ||||||
|           "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", |           "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", | ||||||
|           "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", |           "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", | ||||||
|           "requires": { |           "requires": { | ||||||
|             "object-assign": "^4.0.1", |             "object-assign": "^4.0.1", | ||||||
| @@ -8342,7 +8342,7 @@ | |||||||
|           "dependencies": { |           "dependencies": { | ||||||
|             "get-stream": { |             "get-stream": { | ||||||
|               "version": "3.0.0", |               "version": "3.0.0", | ||||||
|               "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", |               "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", | ||||||
|               "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" |               "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" | ||||||
|             } |             } | ||||||
|           } |           } | ||||||
| @@ -8382,7 +8382,7 @@ | |||||||
|         }, |         }, | ||||||
|         "pify": { |         "pify": { | ||||||
|           "version": "2.3.0", |           "version": "2.3.0", | ||||||
|           "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", |           "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", | ||||||
|           "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" |           "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" | ||||||
|         }, |         }, | ||||||
|         "prepend-http": { |         "prepend-http": { | ||||||
| @@ -8514,7 +8514,7 @@ | |||||||
|         }, |         }, | ||||||
|         "readable-stream": { |         "readable-stream": { | ||||||
|           "version": "1.1.14", |           "version": "1.1.14", | ||||||
|           "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", |           "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", | ||||||
|           "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", |           "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", | ||||||
|           "requires": { |           "requires": { | ||||||
|             "core-util-is": "~1.0.0", |             "core-util-is": "~1.0.0", | ||||||
| @@ -8713,7 +8713,7 @@ | |||||||
|         }, |         }, | ||||||
|         "semver": { |         "semver": { | ||||||
|           "version": "5.3.0", |           "version": "5.3.0", | ||||||
|           "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", |           "resolved": "http://registry.npmjs.org/semver/-/semver-5.3.0.tgz", | ||||||
|           "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", |           "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", | ||||||
|           "dev": true |           "dev": true | ||||||
|         } |         } | ||||||
| @@ -9062,7 +9062,7 @@ | |||||||
|     }, |     }, | ||||||
|     "onetime": { |     "onetime": { | ||||||
|       "version": "1.1.0", |       "version": "1.1.0", | ||||||
|       "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", |       "resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", | ||||||
|       "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=" |       "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=" | ||||||
|     }, |     }, | ||||||
|     "open": { |     "open": { | ||||||
| @@ -9195,7 +9195,7 @@ | |||||||
|     }, |     }, | ||||||
|     "os-locale": { |     "os-locale": { | ||||||
|       "version": "1.4.0", |       "version": "1.4.0", | ||||||
|       "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", |       "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", | ||||||
|       "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", |       "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "requires": { |       "requires": { | ||||||
| @@ -9244,7 +9244,7 @@ | |||||||
|     }, |     }, | ||||||
|     "p-is-promise": { |     "p-is-promise": { | ||||||
|       "version": "1.1.0", |       "version": "1.1.0", | ||||||
|       "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz", |       "resolved": "http://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz", | ||||||
|       "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=" |       "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=" | ||||||
|     }, |     }, | ||||||
|     "p-limit": { |     "p-limit": { | ||||||
| @@ -9809,7 +9809,7 @@ | |||||||
|             }, |             }, | ||||||
|             "get-stream": { |             "get-stream": { | ||||||
|               "version": "3.0.0", |               "version": "3.0.0", | ||||||
|               "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", |               "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", | ||||||
|               "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" |               "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" | ||||||
|             } |             } | ||||||
|           } |           } | ||||||
| @@ -10093,7 +10093,7 @@ | |||||||
|           "dependencies": { |           "dependencies": { | ||||||
|             "file-type": { |             "file-type": { | ||||||
|               "version": "3.9.0", |               "version": "3.9.0", | ||||||
|               "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", |               "resolved": "http://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", | ||||||
|               "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=" |               "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=" | ||||||
|             } |             } | ||||||
|           } |           } | ||||||
| @@ -10118,7 +10118,7 @@ | |||||||
|           "dependencies": { |           "dependencies": { | ||||||
|             "get-stream": { |             "get-stream": { | ||||||
|               "version": "3.0.0", |               "version": "3.0.0", | ||||||
|               "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", |               "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", | ||||||
|               "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" |               "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" | ||||||
|             }, |             }, | ||||||
|             "pify": { |             "pify": { | ||||||
| @@ -10156,7 +10156,7 @@ | |||||||
|             }, |             }, | ||||||
|             "get-stream": { |             "get-stream": { | ||||||
|               "version": "3.0.0", |               "version": "3.0.0", | ||||||
|               "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", |               "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", | ||||||
|               "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" |               "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" | ||||||
|             } |             } | ||||||
|           } |           } | ||||||
| @@ -10208,7 +10208,7 @@ | |||||||
|         }, |         }, | ||||||
|         "get-stream": { |         "get-stream": { | ||||||
|           "version": "2.3.1", |           "version": "2.3.1", | ||||||
|           "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", |           "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", | ||||||
|           "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", |           "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", | ||||||
|           "requires": { |           "requires": { | ||||||
|             "object-assign": "^4.0.1", |             "object-assign": "^4.0.1", | ||||||
| @@ -10238,7 +10238,7 @@ | |||||||
|           "dependencies": { |           "dependencies": { | ||||||
|             "get-stream": { |             "get-stream": { | ||||||
|               "version": "3.0.0", |               "version": "3.0.0", | ||||||
|               "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", |               "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", | ||||||
|               "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" |               "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" | ||||||
|             } |             } | ||||||
|           } |           } | ||||||
| @@ -10428,7 +10428,7 @@ | |||||||
|         }, |         }, | ||||||
|         "readable-stream": { |         "readable-stream": { | ||||||
|           "version": "1.1.14", |           "version": "1.1.14", | ||||||
|           "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", |           "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", | ||||||
|           "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", |           "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", | ||||||
|           "dev": true, |           "dev": true, | ||||||
|           "requires": { |           "requires": { | ||||||
| @@ -10521,7 +10521,7 @@ | |||||||
|     }, |     }, | ||||||
|     "query-string": { |     "query-string": { | ||||||
|       "version": "5.1.1", |       "version": "5.1.1", | ||||||
|       "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", |       "resolved": "http://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", | ||||||
|       "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", |       "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "decode-uri-component": "^0.2.0", |         "decode-uri-component": "^0.2.0", | ||||||
| @@ -10667,7 +10667,7 @@ | |||||||
|     }, |     }, | ||||||
|     "readable-stream": { |     "readable-stream": { | ||||||
|       "version": "2.3.6", |       "version": "2.3.6", | ||||||
|       "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", |       "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", | ||||||
|       "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", |       "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "core-util-is": "~1.0.0", |         "core-util-is": "~1.0.0", | ||||||
| @@ -11741,7 +11741,7 @@ | |||||||
|     }, |     }, | ||||||
|     "strip-ansi": { |     "strip-ansi": { | ||||||
|       "version": "3.0.1", |       "version": "3.0.1", | ||||||
|       "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", |       "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", | ||||||
|       "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", |       "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "ansi-regex": "^2.0.0" |         "ansi-regex": "^2.0.0" | ||||||
| @@ -11766,7 +11766,7 @@ | |||||||
|     }, |     }, | ||||||
|     "strip-dirs": { |     "strip-dirs": { | ||||||
|       "version": "1.1.1", |       "version": "1.1.1", | ||||||
|       "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-1.1.1.tgz", |       "resolved": "http://registry.npmjs.org/strip-dirs/-/strip-dirs-1.1.1.tgz", | ||||||
|       "integrity": "sha1-lgu9EoeETzl1pFWKoQOoJV4kVqA=", |       "integrity": "sha1-lgu9EoeETzl1pFWKoQOoJV4kVqA=", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "chalk": "^1.0.0", |         "chalk": "^1.0.0", | ||||||
| @@ -12032,7 +12032,7 @@ | |||||||
|     }, |     }, | ||||||
|     "through": { |     "through": { | ||||||
|       "version": "2.3.8", |       "version": "2.3.8", | ||||||
|       "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", |       "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", | ||||||
|       "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" |       "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" | ||||||
|     }, |     }, | ||||||
|     "through2": { |     "through2": { | ||||||
| @@ -12051,7 +12051,7 @@ | |||||||
|         }, |         }, | ||||||
|         "readable-stream": { |         "readable-stream": { | ||||||
|           "version": "1.0.34", |           "version": "1.0.34", | ||||||
|           "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", |           "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", | ||||||
|           "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", |           "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", | ||||||
|           "requires": { |           "requires": { | ||||||
|             "core-util-is": "~1.0.0", |             "core-util-is": "~1.0.0", | ||||||
|   | |||||||
| @@ -562,7 +562,7 @@ function getHashValueFromAddress() { | |||||||
| async function loadTreeCache() { | async function loadTreeCache() { | ||||||
|     const resp = await server.get('tree'); |     const resp = await server.get('tree'); | ||||||
|  |  | ||||||
|     treeCache.load(resp.notes, resp.branches, resp.relations); |     treeCache.load(resp.notes, resp.branches); | ||||||
| } | } | ||||||
|  |  | ||||||
| async function loadTree() { | async function loadTree() { | ||||||
|   | |||||||
| @@ -13,12 +13,6 @@ class TreeCache { | |||||||
|         this.init(); |         this.init(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     load(noteRows, branchRows, relations) { |  | ||||||
|         this.init(); |  | ||||||
|  |  | ||||||
|         this.addResp(noteRows, branchRows, relations); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     init() { |     init() { | ||||||
|         /** @type {Object.<string, string>} */ |         /** @type {Object.<string, string>} */ | ||||||
|         this.parents = {}; |         this.parents = {}; | ||||||
| @@ -35,7 +29,13 @@ class TreeCache { | |||||||
|         this.branches = {}; |         this.branches = {}; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     addResp(noteRows, branchRows, relations) { |     load(noteRows, branchRows) { | ||||||
|  |         this.init(); | ||||||
|  |  | ||||||
|  |         this.addResp(noteRows, branchRows); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     addResp(noteRows, branchRows) { | ||||||
|         for (const noteRow of noteRows) { |         for (const noteRow of noteRows) { | ||||||
|             const note = new NoteShort(this, noteRow); |             const note = new NoteShort(this, noteRow); | ||||||
|  |  | ||||||
| @@ -47,10 +47,6 @@ class TreeCache { | |||||||
|  |  | ||||||
|             this.addBranch(branch); |             this.addBranch(branch); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         for (const relation of relations) { |  | ||||||
|             this.addBranchRelationship(relation.branchId, relation.childNoteId, relation.parentNoteId); |  | ||||||
|         } |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -75,7 +71,7 @@ class TreeCache { | |||||||
|             delete this.notes[noteId]; |             delete this.notes[noteId]; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         this.addResp(resp.notes, resp.branches, resp.relations); |         this.addResp(resp.notes, resp.branches); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -99,7 +95,7 @@ class TreeCache { | |||||||
|         if (missingNoteIds.length > 0) { |         if (missingNoteIds.length > 0) { | ||||||
|             const resp = await server.post('tree/load', { noteIds: missingNoteIds }); |             const resp = await server.post('tree/load', { noteIds: missingNoteIds }); | ||||||
|  |  | ||||||
|             this.addResp(resp.notes, resp.branches, resp.relations); |             this.addResp(resp.notes, resp.branches); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         return noteIds.map(noteId => { |         return noteIds.map(noteId => { | ||||||
| @@ -168,7 +164,7 @@ class TreeCache { | |||||||
|         if (missingBranchIds.length > 0) { |         if (missingBranchIds.length > 0) { | ||||||
|             const resp = await server.post('tree/load', { branchIds: branchIds }); |             const resp = await server.post('tree/load', { branchIds: branchIds }); | ||||||
|  |  | ||||||
|             this.addResp(resp.notes, resp.branches, resp.relations); |             this.addResp(resp.notes, resp.branches); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         return branchIds.map(branchId => { |         return branchIds.map(branchId => { | ||||||
|   | |||||||
| @@ -7,8 +7,16 @@ const noteCacheService = require('../../services/note_cache'); | |||||||
|  |  | ||||||
| async function getNotes(noteIds) { | async function getNotes(noteIds) { | ||||||
|     const notes = await sql.getManyRows(` |     const notes = await sql.getManyRows(` | ||||||
|       SELECT noteId, title, isProtected, type, mime |       SELECT  | ||||||
|       FROM notes WHERE isDeleted = 0 AND noteId IN (???)`, noteIds); |              noteId,  | ||||||
|  |              title,  | ||||||
|  |              isProtected,  | ||||||
|  |              type,  | ||||||
|  |              mime | ||||||
|  |       FROM  | ||||||
|  |            notes  | ||||||
|  |       WHERE isDeleted = 0  | ||||||
|  |         AND noteId IN (???)`, noteIds); | ||||||
|  |  | ||||||
|     const cssClassLabels = await sql.getManyRows(` |     const cssClassLabels = await sql.getManyRows(` | ||||||
|       SELECT noteId, value FROM attributes WHERE isDeleted = 0 AND type = 'label'  |       SELECT noteId, value FROM attributes WHERE isDeleted = 0 AND type = 'label'  | ||||||
| @@ -40,19 +48,31 @@ async function getNotes(noteIds) { | |||||||
|     return notes; |     return notes; | ||||||
| } | } | ||||||
|  |  | ||||||
| async function getRelations(noteIds) { | async function getNotesAndBranches(noteIds) { | ||||||
|     // we need to fetch both parentNoteId and noteId matches because we can have loaded child |     noteIds = Array.from(new Set(noteIds)); | ||||||
|     // of which only some of the parents has been loaded. |     const notes = await getNotes(noteIds); | ||||||
|     // also now with note hoisting, it is possible to have the note displayed without its parent chain being loaded |  | ||||||
|  |  | ||||||
|     const relations = await sql.getManyRows(`SELECT branchId, noteId AS 'childNoteId', parentNoteId, notePosition FROM branches WHERE isDeleted = 0  |     noteIds = notes.map(n => n.noteId); | ||||||
|          AND (parentNoteId IN (???) OR noteId IN (???))`, noteIds); |  | ||||||
|  |  | ||||||
|     // although we're fetching relations for multiple notes, ordering will stay correct for single note as well - relations are being added into tree cache in the order they were returned |     const branches = await sql.getManyRows(`  | ||||||
|     // cannot use ORDER BY because of usage of getManyRows which is not a single SQL query |         SELECT  | ||||||
|     relations.sort((a, b) => a.notePosition > b.notePosition ? 1 : -1); |             branches.branchId, | ||||||
|  |             branches.noteId, | ||||||
|  |             branches.parentNoteId, | ||||||
|  |             branches.notePosition, | ||||||
|  |             branches.prefix, | ||||||
|  |             branches.isExpanded | ||||||
|  |         FROM branches | ||||||
|  |         WHERE branches.isDeleted = 0 | ||||||
|  |           AND (branches.noteId IN (???) OR parentNoteId IN (???))`, noteIds); | ||||||
|  |  | ||||||
|     return relations; |     // sorting in memory is faster | ||||||
|  |     branches.sort((a, b) => a.notePosition - b.notePosition < 0 ? -1 : 1); | ||||||
|  |  | ||||||
|  |     return { | ||||||
|  |         branches, | ||||||
|  |         notes | ||||||
|  |     }; | ||||||
| } | } | ||||||
|  |  | ||||||
| async function getTree() { | async function getTree() { | ||||||
| @@ -60,7 +80,7 @@ async function getTree() { | |||||||
|  |  | ||||||
|     // we fetch all branches of notes, even if that particular branch isn't visible |     // we fetch all branches of notes, even if that particular branch isn't visible | ||||||
|     // this allows us to e.g. detect and properly display clones |     // this allows us to e.g. detect and properly display clones | ||||||
|     const branches = await sql.getRows(` |     let noteIds = await sql.getColumn(` | ||||||
|         WITH RECURSIVE |         WITH RECURSIVE | ||||||
|             tree(branchId, noteId, isExpanded) AS ( |             tree(branchId, noteId, isExpanded) AS ( | ||||||
|             SELECT branchId, noteId, isExpanded FROM branches WHERE noteId = ?  |             SELECT branchId, noteId, isExpanded FROM branches WHERE noteId = ?  | ||||||
| @@ -69,22 +89,11 @@ async function getTree() { | |||||||
|               JOIN tree ON branches.parentNoteId = tree.noteId |               JOIN tree ON branches.parentNoteId = tree.noteId | ||||||
|               WHERE tree.isExpanded = 1 AND branches.isDeleted = 0 |               WHERE tree.isExpanded = 1 AND branches.isDeleted = 0 | ||||||
|           ) |           ) | ||||||
|         SELECT branches.* FROM tree JOIN branches USING(noteId) WHERE branches.isDeleted = 0 ORDER BY branches.notePosition`, [hoistedNoteId]); |         SELECT noteId FROM tree`, [hoistedNoteId]); | ||||||
|  |  | ||||||
|     // we also want root branch in there because all the paths start with root |     noteIds.push('root'); | ||||||
|     branches.push(await sql.getRow(`SELECT * FROM branches WHERE branchId = 'root'`)); |  | ||||||
|  |  | ||||||
|     const noteIds = Array.from(new Set(branches.map(b => b.noteId))); |     return await getNotesAndBranches(noteIds); | ||||||
|  |  | ||||||
|     const notes = await getNotes(noteIds); |  | ||||||
|  |  | ||||||
|     const relations = await getRelations(noteIds); |  | ||||||
|  |  | ||||||
|     return { |  | ||||||
|         branches, |  | ||||||
|         notes, |  | ||||||
|         relations |  | ||||||
|     }; |  | ||||||
| } | } | ||||||
|  |  | ||||||
| async function load(req) { | async function load(req) { | ||||||
| @@ -96,21 +105,7 @@ async function load(req) { | |||||||
|             .map(note => note.noteId); |             .map(note => note.noteId); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     const branches = (await sql.getManyRows(`SELECT * FROM branches WHERE isDeleted = 0 AND noteId IN (???)`, noteIds)) |     return await getNotesAndBranches(noteIds); | ||||||
|         .concat((await sql.getManyRows(`SELECT * FROM branches WHERE isDeleted = 0 AND parentNoteId IN (???)`, noteIds))); |  | ||||||
|  |  | ||||||
|     // sort branches so they are filled sorted in the cache as well |  | ||||||
|     branches.sort((a, b) => a.notePosition < b.notePosition ? -1 : 1); |  | ||||||
|  |  | ||||||
|     const notes = await getNotes(noteIds); |  | ||||||
|  |  | ||||||
|     const relations = await getRelations(noteIds); |  | ||||||
|  |  | ||||||
|     return { |  | ||||||
|         branches, |  | ||||||
|         notes, |  | ||||||
|         relations |  | ||||||
|     }; |  | ||||||
| } | } | ||||||
|  |  | ||||||
| module.exports = { | module.exports = { | ||||||
|   | |||||||
| @@ -1,4 +1,4 @@ | |||||||
| <div class="note-detail-sidebar" style="width: <%= sidebarWidthPercent %>%; min-width: <%= sidebarMinWidth %>px"> | <div class="note-detail-sidebar hide-toggle" style="width: <%= sidebarWidthPercent %>%; min-width: <%= sidebarMinWidth %>px"> | ||||||
|     <div style="text-align: center; margin-bottom: 10px;"> |     <div style="text-align: center; margin-bottom: 10px;"> | ||||||
|         <button class="hide-sidebar-button" style="background: none; border: none;">hide sidebar <span class="jam jam-chevron-right"></span></button> |         <button class="hide-sidebar-button" style="background: none; border: none;">hide sidebar <span class="jam jam-chevron-right"></span></button> | ||||||
|     </div> |     </div> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user