mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	sync refactorings, added logging for performance tracking
This commit is contained in:
		
							
								
								
									
										80
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										80
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @@ -864,7 +864,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=" | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
| @@ -1125,7 +1125,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=" | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
| @@ -1159,7 +1159,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=" | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
| @@ -1179,7 +1179,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", | ||||||
| @@ -1439,12 +1439,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=" | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
| @@ -1560,7 +1560,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", | ||||||
| @@ -1660,7 +1660,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", | ||||||
| @@ -1839,7 +1839,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" | ||||||
| @@ -2457,7 +2457,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", | ||||||
| @@ -4209,7 +4209,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=" | ||||||
|     }, |     }, | ||||||
|     "getpass": { |     "getpass": { | ||||||
| @@ -4467,7 +4467,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", | ||||||
| @@ -5081,7 +5081,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", | ||||||
| @@ -5233,7 +5233,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-object": { |     "is-object": { | ||||||
| @@ -5731,7 +5731,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", | ||||||
| @@ -6192,7 +6192,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=" | ||||||
|     }, |     }, | ||||||
|     "minipass": { |     "minipass": { | ||||||
| @@ -6214,7 +6214,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" | ||||||
| @@ -6222,7 +6222,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=" | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
| @@ -6377,7 +6377,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": { | ||||||
| @@ -6413,7 +6413,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": { | ||||||
| @@ -6537,7 +6537,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=" | ||||||
|             } |             } | ||||||
|           } |           } | ||||||
| @@ -6562,7 +6562,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": { | ||||||
| @@ -6619,7 +6619,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", | ||||||
| @@ -6649,7 +6649,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=" | ||||||
|             } |             } | ||||||
|           } |           } | ||||||
| @@ -6689,7 +6689,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": { | ||||||
| @@ -6794,7 +6794,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", | ||||||
| @@ -7151,7 +7151,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": { | ||||||
| @@ -7303,7 +7303,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": { | ||||||
| @@ -7730,7 +7730,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=" | ||||||
|             } |             } | ||||||
|           } |           } | ||||||
| @@ -8014,7 +8014,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=" | ||||||
|             } |             } | ||||||
|           } |           } | ||||||
| @@ -8039,7 +8039,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": { | ||||||
| @@ -8077,7 +8077,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=" | ||||||
|             } |             } | ||||||
|           } |           } | ||||||
| @@ -8129,7 +8129,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", | ||||||
| @@ -8159,7 +8159,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=" | ||||||
|             } |             } | ||||||
|           } |           } | ||||||
| @@ -8341,7 +8341,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", | ||||||
| @@ -8494,7 +8494,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", | ||||||
| @@ -9264,7 +9264,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" | ||||||
| @@ -9289,7 +9289,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", | ||||||
| @@ -9452,7 +9452,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": { | ||||||
| @@ -9471,7 +9471,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", | ||||||
|   | |||||||
| @@ -114,14 +114,22 @@ async function forceNoteSync(req) { | |||||||
| } | } | ||||||
|  |  | ||||||
| async function getChanged(req) { | async function getChanged(req) { | ||||||
|  |     const startTime = Date.now(); | ||||||
|  |  | ||||||
|     const lastSyncId = parseInt(req.query.lastSyncId); |     const lastSyncId = parseInt(req.query.lastSyncId); | ||||||
|  |  | ||||||
|     const syncs = await sql.getRows("SELECT * FROM sync WHERE isSynced = 1 AND id > ? LIMIT 1000", [lastSyncId]); |     const syncs = await sql.getRows("SELECT * FROM sync WHERE isSynced = 1 AND id > ? LIMIT 1000", [lastSyncId]); | ||||||
|  |  | ||||||
|     return { |     const ret = { | ||||||
|         syncs: await syncService.getSyncRecords(syncs), |         syncs: await syncService.getSyncRecords(syncs), | ||||||
|         maxSyncId: await sql.getValue('SELECT MAX(id) FROM sync WHERE isSynced = 1') |         maxSyncId: await sql.getValue('SELECT MAX(id) FROM sync WHERE isSynced = 1') | ||||||
|     }; |     }; | ||||||
|  |  | ||||||
|  |     if (ret.syncs.length > 0) { | ||||||
|  |         log.info(`Returning ${ret.syncs.length} in ${Date.now() - startTime}ms`); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     return ret; | ||||||
| } | } | ||||||
|  |  | ||||||
| async function update(req) { | async function update(req) { | ||||||
|   | |||||||
| @@ -478,8 +478,9 @@ eventService.subscribe([eventService.ENTITY_CHANGED, eventService.ENTITY_DELETED | |||||||
|         const branch = entity; |         const branch = entity; | ||||||
|  |  | ||||||
|         if (branch.isDeleted) { |         if (branch.isDeleted) { | ||||||
|             childToParent[branch.noteId] = childToParent[branch.noteId] || []; |             if (branch.noteId in childToParent) { | ||||||
|                 childToParent[branch.noteId] = childToParent[branch.noteId].filter(noteId => noteId !== branch.parentNoteId); |                 childToParent[branch.noteId] = childToParent[branch.noteId].filter(noteId => noteId !== branch.parentNoteId); | ||||||
|  |             } | ||||||
|  |  | ||||||
|             delete prefixes[branch.noteId + '-' + branch.parentNoteId]; |             delete prefixes[branch.noteId + '-' + branch.parentNoteId]; | ||||||
|             delete childParentToBranchId[branch.noteId + '-' + branch.parentNoteId]; |             delete childParentToBranchId[branch.noteId + '-' + branch.parentNoteId]; | ||||||
|   | |||||||
| @@ -30,13 +30,19 @@ async function generateSourceId() { | |||||||
| } | } | ||||||
|  |  | ||||||
| async function refreshSourceIds() { | async function refreshSourceIds() { | ||||||
|     allSourceIds = await sql.getColumn("SELECT sourceId FROM source_ids ORDER BY utcDateCreated DESC"); |     const sourceIdsArr = await sql.getColumn("SELECT sourceId FROM source_ids ORDER BY utcDateCreated DESC"); | ||||||
|  |  | ||||||
|  |     allSourceIds = {}; | ||||||
|  |  | ||||||
|  |     for (const sourceId of sourceIdsArr) { | ||||||
|  |         allSourceIds[sourceId] = true; | ||||||
|  |     } | ||||||
| } | } | ||||||
|  |  | ||||||
| let allSourceIds = []; | let allSourceIds = {}; | ||||||
|  |  | ||||||
| function isLocalSourceId(srcId) { | function isLocalSourceId(srcId) { | ||||||
|     return allSourceIds.includes(srcId); |     return !!allSourceIds[srcId]; | ||||||
| } | } | ||||||
|  |  | ||||||
| const currentSourceId = createSourceId(); | const currentSourceId = createSourceId(); | ||||||
|   | |||||||
| @@ -130,7 +130,7 @@ async function pullSync(syncContext) { | |||||||
|         const lastSyncedPull = await getLastSyncedPull(); |         const lastSyncedPull = await getLastSyncedPull(); | ||||||
|         const changesUri = '/api/sync/changed?lastSyncId=' + lastSyncedPull; |         const changesUri = '/api/sync/changed?lastSyncId=' + lastSyncedPull; | ||||||
|  |  | ||||||
|         const startDate = new Date(); |         const startDate = Date.now(); | ||||||
|  |  | ||||||
|         const resp = await syncRequest(syncContext, 'GET', changesUri); |         const resp = await syncRequest(syncContext, 'GET', changesUri); | ||||||
|         stats.outstandingPulls = resp.maxSyncId - lastSyncedPull; |         stats.outstandingPulls = resp.maxSyncId - lastSyncedPull; | ||||||
| @@ -145,8 +145,7 @@ async function pullSync(syncContext) { | |||||||
|             break; |             break; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         log.info("Pulled " + rows.length + " changes from " + changesUri + " in " |         log.info(`Pulled ${rows.length} changes from ${changesUri} in ${Date.now() - startDate}ms`); | ||||||
|             + (Date.now() - startDate.getTime()) + "ms"); |  | ||||||
|  |  | ||||||
|         for (const {sync, entity} of rows) { |         for (const {sync, entity} of rows) { | ||||||
|             if (!sourceIdService.isLocalSourceId(sync.sourceId)) { |             if (!sourceIdService.isLocalSourceId(sync.sourceId)) { | ||||||
| @@ -156,7 +155,13 @@ async function pullSync(syncContext) { | |||||||
|                     appliedPulls++; |                     appliedPulls++; | ||||||
|                 } |                 } | ||||||
|  |  | ||||||
|                 await syncUpdateService.updateEntity(sync, entity, syncContext.sourceId); |                 const startTime = Date.now(); | ||||||
|  |  | ||||||
|  |                 const updated = await syncUpdateService.updateEntity(sync, entity, syncContext.sourceId); | ||||||
|  |  | ||||||
|  |                 if (updated) { | ||||||
|  |                     log.info(`Updated ${sync.entityName} ${sync.entityId} in ${Date.now() - startTime}ms`); | ||||||
|  |                 } | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             stats.outstandingPulls = resp.maxSyncId - sync.id; |             stats.outstandingPulls = resp.maxSyncId - sync.id; | ||||||
|   | |||||||
| @@ -6,40 +6,41 @@ const eventService = require('./events'); | |||||||
| async function updateEntity(sync, entity, sourceId) { | async function updateEntity(sync, entity, sourceId) { | ||||||
|     // can be undefined for options with isSynced=false |     // can be undefined for options with isSynced=false | ||||||
|     if (!entity) { |     if (!entity) { | ||||||
|         return; |         return false; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     const {entityName} = sync; |     const {entityName} = sync; | ||||||
|  |     let updated; | ||||||
|  |  | ||||||
|     if (entityName === 'notes') { |     if (entityName === 'notes') { | ||||||
|         await updateNote(entity, sourceId); |         updated = await updateNote(entity, sourceId); | ||||||
|     } |     } | ||||||
|     else if (entityName === 'note_contents') { |     else if (entityName === 'note_contents') { | ||||||
|         await updateNoteContent(entity, sourceId); |         updated = await updateNoteContent(entity, sourceId); | ||||||
|     } |     } | ||||||
|     else if (entityName === 'branches') { |     else if (entityName === 'branches') { | ||||||
|         await updateBranch(entity, sourceId); |         updated = await updateBranch(entity, sourceId); | ||||||
|     } |     } | ||||||
|     else if (entityName === 'note_revisions') { |     else if (entityName === 'note_revisions') { | ||||||
|         await updateNoteRevision(entity, sourceId); |         updated = await updateNoteRevision(entity, sourceId); | ||||||
|     } |     } | ||||||
|     else if (entityName === 'note_revision_contents') { |     else if (entityName === 'note_revision_contents') { | ||||||
|         await updateNoteRevisionContent(entity, sourceId); |         updated = await updateNoteRevisionContent(entity, sourceId); | ||||||
|     } |     } | ||||||
|     else if (entityName === 'note_reordering') { |     else if (entityName === 'note_reordering') { | ||||||
|         await updateNoteReordering(sync.entityId, entity, sourceId); |         updated = await updateNoteReordering(sync.entityId, entity, sourceId); | ||||||
|     } |     } | ||||||
|     else if (entityName === 'options') { |     else if (entityName === 'options') { | ||||||
|         await updateOptions(entity, sourceId); |         updated = await updateOptions(entity, sourceId); | ||||||
|     } |     } | ||||||
|     else if (entityName === 'recent_notes') { |     else if (entityName === 'recent_notes') { | ||||||
|         await updateRecentNotes(entity, sourceId); |         updated = await updateRecentNotes(entity, sourceId); | ||||||
|     } |     } | ||||||
|     else if (entityName === 'attributes') { |     else if (entityName === 'attributes') { | ||||||
|         await updateAttribute(entity, sourceId); |         updated = await updateAttribute(entity, sourceId); | ||||||
|     } |     } | ||||||
|     else if (entityName === 'api_tokens') { |     else if (entityName === 'api_tokens') { | ||||||
|         await updateApiToken(entity, sourceId); |         updated = await updateApiToken(entity, sourceId); | ||||||
|     } |     } | ||||||
|     else { |     else { | ||||||
|         throw new Error(`Unrecognized entity type ${entityName}`); |         throw new Error(`Unrecognized entity type ${entityName}`); | ||||||
| @@ -47,12 +48,15 @@ async function updateEntity(sync, entity, sourceId) { | |||||||
|  |  | ||||||
|     // currently making exception for protected notes and note revisions because here |     // currently making exception for protected notes and note revisions because here | ||||||
|     // the title and content are not available decrypted as listeners would expect |     // the title and content are not available decrypted as listeners would expect | ||||||
|     if (!['notes', 'note_contents', 'note_revisions', 'note_revision_contents'].includes(entityName) || !entity.isProtected) { |     if (updated && | ||||||
|  |         (!['notes', 'note_contents', 'note_revisions', 'note_revision_contents'].includes(entityName) || !entity.isProtected)) { | ||||||
|         await eventService.emit(eventService.ENTITY_SYNCED, { |         await eventService.emit(eventService.ENTITY_SYNCED, { | ||||||
|             entityName, |             entityName, | ||||||
|             entity |             entity | ||||||
|         }); |         }); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     return updated; | ||||||
| } | } | ||||||
|  |  | ||||||
| function shouldWeUpdateEntity(localEntity, remoteEntity) { | function shouldWeUpdateEntity(localEntity, remoteEntity) { | ||||||
| @@ -85,8 +89,10 @@ async function updateNote(remoteEntity, sourceId) { | |||||||
|             await syncTableService.addNoteSync(remoteEntity.noteId, sourceId); |             await syncTableService.addNoteSync(remoteEntity.noteId, sourceId); | ||||||
|         }); |         }); | ||||||
|  |  | ||||||
|         log.info("Update/sync note " + remoteEntity.noteId); |         return true; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     return false; | ||||||
| } | } | ||||||
|  |  | ||||||
| async function updateNoteContent(remoteEntity, sourceId) { | async function updateNoteContent(remoteEntity, sourceId) { | ||||||
| @@ -101,15 +107,17 @@ async function updateNoteContent(remoteEntity, sourceId) { | |||||||
|             await syncTableService.addNoteContentSync(remoteEntity.noteId, sourceId); |             await syncTableService.addNoteContentSync(remoteEntity.noteId, sourceId); | ||||||
|         }); |         }); | ||||||
|  |  | ||||||
|         log.info("Update/sync note content for noteId=" + remoteEntity.noteId); |         return true; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     return false; | ||||||
| } | } | ||||||
|  |  | ||||||
| async function updateBranch(remoteEntity, sourceId) { | async function updateBranch(remoteEntity, sourceId) { | ||||||
|     const localEntity = await sql.getRowOrNull("SELECT * FROM branches WHERE branchId = ?", [remoteEntity.branchId]); |     const localEntity = await sql.getRowOrNull("SELECT * FROM branches WHERE branchId = ?", [remoteEntity.branchId]); | ||||||
|  |  | ||||||
|     await sql.transactional(async () => { |  | ||||||
|     if (shouldWeUpdateEntity(localEntity, remoteEntity)) { |     if (shouldWeUpdateEntity(localEntity, remoteEntity)) { | ||||||
|  |         await sql.transactional(async () => { | ||||||
|             // isExpanded is not synced unless it's a new branch instance |             // isExpanded is not synced unless it's a new branch instance | ||||||
|             // otherwise in case of full new sync we'll get all branches (even root) collapsed. |             // otherwise in case of full new sync we'll get all branches (even root) collapsed. | ||||||
|             if (localEntity) { |             if (localEntity) { | ||||||
| @@ -119,10 +127,12 @@ async function updateBranch(remoteEntity, sourceId) { | |||||||
|             await sql.replace('branches', remoteEntity); |             await sql.replace('branches', remoteEntity); | ||||||
|  |  | ||||||
|             await syncTableService.addBranchSync(remoteEntity.branchId, sourceId); |             await syncTableService.addBranchSync(remoteEntity.branchId, sourceId); | ||||||
|  |  | ||||||
|             log.info("Update/sync branch " + remoteEntity.branchId); |  | ||||||
|         } |  | ||||||
|         }); |         }); | ||||||
|  |  | ||||||
|  |         return true; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     return false; | ||||||
| } | } | ||||||
|  |  | ||||||
| async function updateNoteRevision(remoteEntity, sourceId) { | async function updateNoteRevision(remoteEntity, sourceId) { | ||||||
| @@ -142,17 +152,19 @@ async function updateNoteRevision(remoteEntity, sourceId) { | |||||||
| async function updateNoteRevisionContent(remoteEntity, sourceId) { | async function updateNoteRevisionContent(remoteEntity, sourceId) { | ||||||
|     const localEntity = await sql.getRowOrNull("SELECT * FROM note_revision_contents WHERE noteRevisionId = ?", [remoteEntity.noteRevisionId]); |     const localEntity = await sql.getRowOrNull("SELECT * FROM note_revision_contents WHERE noteRevisionId = ?", [remoteEntity.noteRevisionId]); | ||||||
|  |  | ||||||
|     await sql.transactional(async () => { |  | ||||||
|     if (shouldWeUpdateEntity(localEntity, remoteEntity)) { |     if (shouldWeUpdateEntity(localEntity, remoteEntity)) { | ||||||
|  |         await sql.transactional(async () => { | ||||||
|             remoteEntity.content = remoteEntity.content === null ? null : Buffer.from(remoteEntity.content, 'base64'); |             remoteEntity.content = remoteEntity.content === null ? null : Buffer.from(remoteEntity.content, 'base64'); | ||||||
|  |  | ||||||
|             await sql.replace('note_revision_contents', remoteEntity); |             await sql.replace('note_revision_contents', remoteEntity); | ||||||
|  |  | ||||||
|             await syncTableService.addNoteRevisionContentSync(remoteEntity.noteRevisionId, sourceId); |             await syncTableService.addNoteRevisionContentSync(remoteEntity.noteRevisionId, sourceId); | ||||||
|  |  | ||||||
|             log.info("Update/sync note revision content " + remoteEntity.noteRevisionId); |  | ||||||
|         } |  | ||||||
|         }); |         }); | ||||||
|  |  | ||||||
|  |         return true; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     return false; | ||||||
| } | } | ||||||
|  |  | ||||||
| async function updateNoteReordering(entityId, remote, sourceId) { | async function updateNoteReordering(entityId, remote, sourceId) { | ||||||
| @@ -163,6 +175,8 @@ async function updateNoteReordering(entityId, remote, sourceId) { | |||||||
|  |  | ||||||
|         await syncTableService.addNoteReorderingSync(entityId, sourceId); |         await syncTableService.addNoteReorderingSync(entityId, sourceId); | ||||||
|     }); |     }); | ||||||
|  |  | ||||||
|  |     return true; | ||||||
| } | } | ||||||
|  |  | ||||||
| async function updateOptions(remoteEntity, sourceId) { | async function updateOptions(remoteEntity, sourceId) { | ||||||
| @@ -172,13 +186,17 @@ async function updateOptions(remoteEntity, sourceId) { | |||||||
|         return; |         return; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     await sql.transactional(async () => { |  | ||||||
|     if (shouldWeUpdateEntity(localEntity, remoteEntity)) { |     if (shouldWeUpdateEntity(localEntity, remoteEntity)) { | ||||||
|  |         await sql.transactional(async () => { | ||||||
|             await sql.replace('options', remoteEntity); |             await sql.replace('options', remoteEntity); | ||||||
|  |  | ||||||
|             await syncTableService.addOptionsSync(remoteEntity.name, sourceId, true); |             await syncTableService.addOptionsSync(remoteEntity.name, sourceId, true); | ||||||
|         } |  | ||||||
|         }); |         }); | ||||||
|  |  | ||||||
|  |         return true; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     return false; | ||||||
| } | } | ||||||
|  |  | ||||||
| async function updateRecentNotes(remoteEntity, sourceId) { | async function updateRecentNotes(remoteEntity, sourceId) { | ||||||
| @@ -190,7 +208,11 @@ async function updateRecentNotes(remoteEntity, sourceId) { | |||||||
|  |  | ||||||
|             await syncTableService.addRecentNoteSync(remoteEntity.noteId, sourceId); |             await syncTableService.addRecentNoteSync(remoteEntity.noteId, sourceId); | ||||||
|         }); |         }); | ||||||
|  |  | ||||||
|  |         return true; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     return false; | ||||||
| } | } | ||||||
|  |  | ||||||
| async function updateAttribute(remoteEntity, sourceId) { | async function updateAttribute(remoteEntity, sourceId) { | ||||||
| @@ -203,8 +225,10 @@ async function updateAttribute(remoteEntity, sourceId) { | |||||||
|             await syncTableService.addAttributeSync(remoteEntity.attributeId, sourceId); |             await syncTableService.addAttributeSync(remoteEntity.attributeId, sourceId); | ||||||
|         }); |         }); | ||||||
|  |  | ||||||
|         log.info("Update/sync attribute " + remoteEntity.attributeId); |         return true; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     return false; | ||||||
| } | } | ||||||
|  |  | ||||||
| async function updateApiToken(entity, sourceId) { | async function updateApiToken(entity, sourceId) { | ||||||
| @@ -217,8 +241,10 @@ async function updateApiToken(entity, sourceId) { | |||||||
|             await syncTableService.addApiTokenSync(entity.apiTokenId, sourceId); |             await syncTableService.addApiTokenSync(entity.apiTokenId, sourceId); | ||||||
|         }); |         }); | ||||||
|  |  | ||||||
|         log.info("Update/sync API token " + entity.apiTokenId); |         return true; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     return false; | ||||||
| } | } | ||||||
|  |  | ||||||
| module.exports = { | module.exports = { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user