mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 13:39:01 +01:00 
			
		
		
		
	Merge remote-tracking branch 'origin/stable'
This commit is contained in:
		
						commit
						753c181979
					
				
							
								
								
									
										4
									
								
								.idea/dataSources.xml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								.idea/dataSources.xml
									
									
									
										generated
									
									
									
								
							@ -1,11 +1,11 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
<project version="4">
 | 
					<project version="4">
 | 
				
			||||||
  <component name="DataSourceManagerImpl" format="xml" multifile-model="true">
 | 
					  <component name="DataSourceManagerImpl" format="xml" multifile-model="true">
 | 
				
			||||||
    <data-source source="LOCAL" name="SQLite - document.db" uuid="d0fd879f-1e1d-4d5c-9c21-0e5cf9ab2976">
 | 
					    <data-source source="LOCAL" name="document.db" uuid="b0b03187-36c8-4ec1-bdab-fd4273cd692e">
 | 
				
			||||||
      <driver-ref>sqlite.xerial</driver-ref>
 | 
					      <driver-ref>sqlite.xerial</driver-ref>
 | 
				
			||||||
      <synchronize>true</synchronize>
 | 
					      <synchronize>true</synchronize>
 | 
				
			||||||
      <jdbc-driver>org.sqlite.JDBC</jdbc-driver>
 | 
					      <jdbc-driver>org.sqlite.JDBC</jdbc-driver>
 | 
				
			||||||
      <jdbc-url>jdbc:sqlite:$PROJECT_DIR$/../trilium-data/document.db</jdbc-url>
 | 
					      <jdbc-url>jdbc:sqlite:$USER_HOME$/trilium-data/document.db</jdbc-url>
 | 
				
			||||||
    </data-source>
 | 
					    </data-source>
 | 
				
			||||||
  </component>
 | 
					  </component>
 | 
				
			||||||
</project>
 | 
					</project>
 | 
				
			||||||
							
								
								
									
										88
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										88
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@ -1,6 +1,6 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  "name": "trilium",
 | 
					  "name": "trilium",
 | 
				
			||||||
  "version": "0.42.1",
 | 
					  "version": "0.42.2",
 | 
				
			||||||
  "lockfileVersion": 1,
 | 
					  "lockfileVersion": 1,
 | 
				
			||||||
  "requires": true,
 | 
					  "requires": true,
 | 
				
			||||||
  "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
@ -1263,7 +1263,7 @@
 | 
				
			|||||||
      "dependencies": {
 | 
					      "dependencies": {
 | 
				
			||||||
        "file-type": {
 | 
					        "file-type": {
 | 
				
			||||||
          "version": "3.9.0",
 | 
					          "version": "3.9.0",
 | 
				
			||||||
          "resolved": "http://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz",
 | 
					          "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz",
 | 
				
			||||||
          "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek="
 | 
					          "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek="
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
@ -1539,7 +1539,7 @@
 | 
				
			|||||||
        },
 | 
					        },
 | 
				
			||||||
        "uuid": {
 | 
					        "uuid": {
 | 
				
			||||||
          "version": "2.0.3",
 | 
					          "version": "2.0.3",
 | 
				
			||||||
          "resolved": "http://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz",
 | 
					          "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz",
 | 
				
			||||||
          "integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho="
 | 
					          "integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho="
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
@ -1573,7 +1573,7 @@
 | 
				
			|||||||
      "dependencies": {
 | 
					      "dependencies": {
 | 
				
			||||||
        "semver": {
 | 
					        "semver": {
 | 
				
			||||||
          "version": "4.3.6",
 | 
					          "version": "4.3.6",
 | 
				
			||||||
          "resolved": "http://registry.npmjs.org/semver/-/semver-4.3.6.tgz",
 | 
					          "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz",
 | 
				
			||||||
          "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto="
 | 
					          "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto="
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
@ -1593,7 +1593,7 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    "bl": {
 | 
					    "bl": {
 | 
				
			||||||
      "version": "1.2.2",
 | 
					      "version": "1.2.2",
 | 
				
			||||||
      "resolved": "http://registry.npmjs.org/bl/-/bl-1.2.2.tgz",
 | 
					      "resolved": "https://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",
 | 
				
			||||||
@ -1853,12 +1853,12 @@
 | 
				
			|||||||
      "dependencies": {
 | 
					      "dependencies": {
 | 
				
			||||||
        "file-type": {
 | 
					        "file-type": {
 | 
				
			||||||
          "version": "3.9.0",
 | 
					          "version": "3.9.0",
 | 
				
			||||||
          "resolved": "http://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz",
 | 
					          "resolved": "https://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": "http://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz",
 | 
					          "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz",
 | 
				
			||||||
          "integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho="
 | 
					          "integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho="
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
@ -1973,7 +1973,7 @@
 | 
				
			|||||||
        },
 | 
					        },
 | 
				
			||||||
        "readable-stream": {
 | 
					        "readable-stream": {
 | 
				
			||||||
          "version": "1.1.14",
 | 
					          "version": "1.1.14",
 | 
				
			||||||
          "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
 | 
					          "resolved": "https://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",
 | 
				
			||||||
@ -2148,7 +2148,7 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    "chalk": {
 | 
					    "chalk": {
 | 
				
			||||||
      "version": "1.1.3",
 | 
					      "version": "1.1.3",
 | 
				
			||||||
      "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
 | 
					      "resolved": "https://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",
 | 
				
			||||||
@ -2465,7 +2465,7 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    "commander": {
 | 
					    "commander": {
 | 
				
			||||||
      "version": "2.8.1",
 | 
					      "version": "2.8.1",
 | 
				
			||||||
      "resolved": "http://registry.npmjs.org/commander/-/commander-2.8.1.tgz",
 | 
					      "resolved": "https://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"
 | 
				
			||||||
@ -3128,7 +3128,7 @@
 | 
				
			|||||||
        },
 | 
					        },
 | 
				
			||||||
        "readable-stream": {
 | 
					        "readable-stream": {
 | 
				
			||||||
          "version": "1.1.14",
 | 
					          "version": "1.1.14",
 | 
				
			||||||
          "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
 | 
					          "resolved": "https://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",
 | 
				
			||||||
@ -3345,9 +3345,9 @@
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "electron": {
 | 
					    "electron": {
 | 
				
			||||||
      "version": "9.0.0-beta.24",
 | 
					      "version": "9.0.0",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/electron/-/electron-9.0.0-beta.24.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/electron/-/electron-9.0.0.tgz",
 | 
				
			||||||
      "integrity": "sha512-25L3XMqm/1CCaV5CgU5ZkhKXw9830WeipJrTW0+VC5XTKp/3xHwhxyQ5G1kQnOTJd7IGwOamvw237D6e1YKnng==",
 | 
					      "integrity": "sha512-JsaSQNPh+XDYkLj8APtVKTtvpb86KIG57W5OOss4TNrn8L3isC9LsCITwfnVmGIXHhvX6oY/weCtN5hAAytjVg==",
 | 
				
			||||||
      "dev": true,
 | 
					      "dev": true,
 | 
				
			||||||
      "requires": {
 | 
					      "requires": {
 | 
				
			||||||
        "@electron/get": "^1.0.1",
 | 
					        "@electron/get": "^1.0.1",
 | 
				
			||||||
@ -4957,7 +4957,7 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    "get-stream": {
 | 
					    "get-stream": {
 | 
				
			||||||
      "version": "3.0.0",
 | 
					      "version": "3.0.0",
 | 
				
			||||||
      "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
 | 
				
			||||||
      "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
 | 
					      "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "getpass": {
 | 
					    "getpass": {
 | 
				
			||||||
@ -5221,7 +5221,7 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    "got": {
 | 
					    "got": {
 | 
				
			||||||
      "version": "5.7.1",
 | 
					      "version": "5.7.1",
 | 
				
			||||||
      "resolved": "http://registry.npmjs.org/got/-/got-5.7.1.tgz",
 | 
					      "resolved": "https://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",
 | 
				
			||||||
@ -5869,7 +5869,7 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    "into-stream": {
 | 
					    "into-stream": {
 | 
				
			||||||
      "version": "3.1.0",
 | 
					      "version": "3.1.0",
 | 
				
			||||||
      "resolved": "http://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz",
 | 
					      "resolved": "https://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",
 | 
				
			||||||
@ -6021,7 +6021,7 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    "is-obj": {
 | 
					    "is-obj": {
 | 
				
			||||||
      "version": "1.0.1",
 | 
					      "version": "1.0.1",
 | 
				
			||||||
      "resolved": "http://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
 | 
				
			||||||
      "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8="
 | 
					      "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8="
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "is-object": {
 | 
					    "is-object": {
 | 
				
			||||||
@ -6621,7 +6621,7 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    "load-json-file": {
 | 
					    "load-json-file": {
 | 
				
			||||||
      "version": "1.1.0",
 | 
					      "version": "1.1.0",
 | 
				
			||||||
      "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
 | 
					      "resolved": "https://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",
 | 
				
			||||||
@ -7130,7 +7130,7 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    "minimist": {
 | 
					    "minimist": {
 | 
				
			||||||
      "version": "1.2.0",
 | 
					      "version": "1.2.0",
 | 
				
			||||||
      "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
 | 
				
			||||||
      "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
 | 
					      "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "minipass": {
 | 
					    "minipass": {
 | 
				
			||||||
@ -7230,7 +7230,7 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    "mkdirp": {
 | 
					    "mkdirp": {
 | 
				
			||||||
      "version": "0.5.1",
 | 
					      "version": "0.5.1",
 | 
				
			||||||
      "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
 | 
					      "resolved": "https://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"
 | 
				
			||||||
@ -7238,7 +7238,7 @@
 | 
				
			|||||||
      "dependencies": {
 | 
					      "dependencies": {
 | 
				
			||||||
        "minimist": {
 | 
					        "minimist": {
 | 
				
			||||||
          "version": "0.0.8",
 | 
					          "version": "0.0.8",
 | 
				
			||||||
          "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
 | 
					          "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
 | 
				
			||||||
          "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
 | 
					          "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
@ -7432,7 +7432,7 @@
 | 
				
			|||||||
            },
 | 
					            },
 | 
				
			||||||
            "get-stream": {
 | 
					            "get-stream": {
 | 
				
			||||||
              "version": "3.0.0",
 | 
					              "version": "3.0.0",
 | 
				
			||||||
              "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
 | 
					              "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
 | 
				
			||||||
              "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
 | 
					              "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            "got": {
 | 
					            "got": {
 | 
				
			||||||
@ -7468,7 +7468,7 @@
 | 
				
			|||||||
            },
 | 
					            },
 | 
				
			||||||
            "p-cancelable": {
 | 
					            "p-cancelable": {
 | 
				
			||||||
              "version": "0.4.1",
 | 
					              "version": "0.4.1",
 | 
				
			||||||
              "resolved": "http://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz",
 | 
					              "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz",
 | 
				
			||||||
              "integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ=="
 | 
					              "integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ=="
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            "p-event": {
 | 
					            "p-event": {
 | 
				
			||||||
@ -7592,7 +7592,7 @@
 | 
				
			|||||||
          "dependencies": {
 | 
					          "dependencies": {
 | 
				
			||||||
            "file-type": {
 | 
					            "file-type": {
 | 
				
			||||||
              "version": "3.9.0",
 | 
					              "version": "3.9.0",
 | 
				
			||||||
              "resolved": "http://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz",
 | 
					              "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz",
 | 
				
			||||||
              "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek="
 | 
					              "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek="
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
@ -7617,7 +7617,7 @@
 | 
				
			|||||||
          "dependencies": {
 | 
					          "dependencies": {
 | 
				
			||||||
            "get-stream": {
 | 
					            "get-stream": {
 | 
				
			||||||
              "version": "3.0.0",
 | 
					              "version": "3.0.0",
 | 
				
			||||||
              "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
 | 
					              "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
 | 
				
			||||||
              "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
 | 
					              "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            "pify": {
 | 
					            "pify": {
 | 
				
			||||||
@ -7674,7 +7674,7 @@
 | 
				
			|||||||
        },
 | 
					        },
 | 
				
			||||||
        "get-stream": {
 | 
					        "get-stream": {
 | 
				
			||||||
          "version": "2.3.1",
 | 
					          "version": "2.3.1",
 | 
				
			||||||
          "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz",
 | 
					          "resolved": "https://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",
 | 
				
			||||||
@ -7704,7 +7704,7 @@
 | 
				
			|||||||
          "dependencies": {
 | 
					          "dependencies": {
 | 
				
			||||||
            "get-stream": {
 | 
					            "get-stream": {
 | 
				
			||||||
              "version": "3.0.0",
 | 
					              "version": "3.0.0",
 | 
				
			||||||
              "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
 | 
					              "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
 | 
				
			||||||
              "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
 | 
					              "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
@ -7744,7 +7744,7 @@
 | 
				
			|||||||
        },
 | 
					        },
 | 
				
			||||||
        "pify": {
 | 
					        "pify": {
 | 
				
			||||||
          "version": "2.3.0",
 | 
					          "version": "2.3.0",
 | 
				
			||||||
          "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
 | 
					          "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
 | 
				
			||||||
          "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
 | 
					          "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        "prepend-http": {
 | 
					        "prepend-http": {
 | 
				
			||||||
@ -7849,7 +7849,7 @@
 | 
				
			|||||||
        },
 | 
					        },
 | 
				
			||||||
        "readable-stream": {
 | 
					        "readable-stream": {
 | 
				
			||||||
          "version": "1.1.14",
 | 
					          "version": "1.1.14",
 | 
				
			||||||
          "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
 | 
					          "resolved": "https://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",
 | 
				
			||||||
@ -8227,7 +8227,7 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    "onetime": {
 | 
					    "onetime": {
 | 
				
			||||||
      "version": "1.1.0",
 | 
					      "version": "1.1.0",
 | 
				
			||||||
      "resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz",
 | 
				
			||||||
      "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k="
 | 
					      "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k="
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "open": {
 | 
					    "open": {
 | 
				
			||||||
@ -8379,7 +8379,7 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    "p-is-promise": {
 | 
					    "p-is-promise": {
 | 
				
			||||||
      "version": "1.1.0",
 | 
					      "version": "1.1.0",
 | 
				
			||||||
      "resolved": "http://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz",
 | 
				
			||||||
      "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4="
 | 
					      "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4="
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "p-limit": {
 | 
					    "p-limit": {
 | 
				
			||||||
@ -8860,7 +8860,7 @@
 | 
				
			|||||||
            },
 | 
					            },
 | 
				
			||||||
            "get-stream": {
 | 
					            "get-stream": {
 | 
				
			||||||
              "version": "3.0.0",
 | 
					              "version": "3.0.0",
 | 
				
			||||||
              "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
 | 
					              "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
 | 
				
			||||||
              "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
 | 
					              "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
@ -9144,7 +9144,7 @@
 | 
				
			|||||||
          "dependencies": {
 | 
					          "dependencies": {
 | 
				
			||||||
            "file-type": {
 | 
					            "file-type": {
 | 
				
			||||||
              "version": "3.9.0",
 | 
					              "version": "3.9.0",
 | 
				
			||||||
              "resolved": "http://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz",
 | 
					              "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz",
 | 
				
			||||||
              "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek="
 | 
					              "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek="
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
@ -9169,7 +9169,7 @@
 | 
				
			|||||||
          "dependencies": {
 | 
					          "dependencies": {
 | 
				
			||||||
            "get-stream": {
 | 
					            "get-stream": {
 | 
				
			||||||
              "version": "3.0.0",
 | 
					              "version": "3.0.0",
 | 
				
			||||||
              "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
 | 
					              "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
 | 
				
			||||||
              "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
 | 
					              "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            "pify": {
 | 
					            "pify": {
 | 
				
			||||||
@ -9207,7 +9207,7 @@
 | 
				
			|||||||
            },
 | 
					            },
 | 
				
			||||||
            "get-stream": {
 | 
					            "get-stream": {
 | 
				
			||||||
              "version": "3.0.0",
 | 
					              "version": "3.0.0",
 | 
				
			||||||
              "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
 | 
					              "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
 | 
				
			||||||
              "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
 | 
					              "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
@ -9259,7 +9259,7 @@
 | 
				
			|||||||
        },
 | 
					        },
 | 
				
			||||||
        "get-stream": {
 | 
					        "get-stream": {
 | 
				
			||||||
          "version": "2.3.1",
 | 
					          "version": "2.3.1",
 | 
				
			||||||
          "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz",
 | 
					          "resolved": "https://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",
 | 
				
			||||||
@ -9289,7 +9289,7 @@
 | 
				
			|||||||
          "dependencies": {
 | 
					          "dependencies": {
 | 
				
			||||||
            "get-stream": {
 | 
					            "get-stream": {
 | 
				
			||||||
              "version": "3.0.0",
 | 
					              "version": "3.0.0",
 | 
				
			||||||
              "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
 | 
					              "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
 | 
				
			||||||
              "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
 | 
					              "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
@ -9477,7 +9477,7 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    "query-string": {
 | 
					    "query-string": {
 | 
				
			||||||
      "version": "5.1.1",
 | 
					      "version": "5.1.1",
 | 
				
			||||||
      "resolved": "http://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz",
 | 
					      "resolved": "https://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",
 | 
				
			||||||
@ -9616,7 +9616,7 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    "readable-stream": {
 | 
					    "readable-stream": {
 | 
				
			||||||
      "version": "2.3.6",
 | 
					      "version": "2.3.6",
 | 
				
			||||||
      "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
 | 
					      "resolved": "https://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",
 | 
				
			||||||
@ -10484,7 +10484,7 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    "strip-ansi": {
 | 
					    "strip-ansi": {
 | 
				
			||||||
      "version": "3.0.1",
 | 
					      "version": "3.0.1",
 | 
				
			||||||
      "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
 | 
					      "resolved": "https://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"
 | 
				
			||||||
@ -10509,7 +10509,7 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    "strip-dirs": {
 | 
					    "strip-dirs": {
 | 
				
			||||||
      "version": "1.1.1",
 | 
					      "version": "1.1.1",
 | 
				
			||||||
      "resolved": "http://registry.npmjs.org/strip-dirs/-/strip-dirs-1.1.1.tgz",
 | 
					      "resolved": "https://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",
 | 
				
			||||||
@ -10767,7 +10767,7 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    "through": {
 | 
					    "through": {
 | 
				
			||||||
      "version": "2.3.8",
 | 
					      "version": "2.3.8",
 | 
				
			||||||
      "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
 | 
				
			||||||
      "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU="
 | 
					      "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU="
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "through2": {
 | 
					    "through2": {
 | 
				
			||||||
@ -10786,7 +10786,7 @@
 | 
				
			|||||||
        },
 | 
					        },
 | 
				
			||||||
        "readable-stream": {
 | 
					        "readable-stream": {
 | 
				
			||||||
          "version": "1.0.34",
 | 
					          "version": "1.0.34",
 | 
				
			||||||
          "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
 | 
					          "resolved": "https://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",
 | 
				
			||||||
 | 
				
			|||||||
@ -2,7 +2,7 @@
 | 
				
			|||||||
  "name": "trilium",
 | 
					  "name": "trilium",
 | 
				
			||||||
  "productName": "Trilium Notes",
 | 
					  "productName": "Trilium Notes",
 | 
				
			||||||
  "description": "Trilium Notes",
 | 
					  "description": "Trilium Notes",
 | 
				
			||||||
  "version": "0.42.2",
 | 
					  "version": "0.42.3",
 | 
				
			||||||
  "license": "AGPL-3.0-only",
 | 
					  "license": "AGPL-3.0-only",
 | 
				
			||||||
  "main": "electron.js",
 | 
					  "main": "electron.js",
 | 
				
			||||||
  "bin": {
 | 
					  "bin": {
 | 
				
			||||||
@ -78,7 +78,7 @@
 | 
				
			|||||||
    "yazl": "^2.5.1"
 | 
					    "yazl": "^2.5.1"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "devDependencies": {
 | 
					  "devDependencies": {
 | 
				
			||||||
    "electron": "9.0.0-beta.24",
 | 
					    "electron": "9.0.0",
 | 
				
			||||||
    "electron-builder": "22.6.0",
 | 
					    "electron-builder": "22.6.0",
 | 
				
			||||||
    "electron-packager": "14.2.1",
 | 
					    "electron-packager": "14.2.1",
 | 
				
			||||||
    "electron-rebuild": "1.10.1",
 | 
					    "electron-rebuild": "1.10.1",
 | 
				
			||||||
 | 
				
			|||||||
@ -17,6 +17,7 @@ class AppContext extends Component {
 | 
				
			|||||||
        super();
 | 
					        super();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        this.isMainWindow = isMainWindow;
 | 
					        this.isMainWindow = isMainWindow;
 | 
				
			||||||
 | 
					        this.executors = [];
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    setLayout(layout) {
 | 
					    setLayout(layout) {
 | 
				
			||||||
 | 
				
			|||||||
@ -103,10 +103,10 @@ export default class LoadResults {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * @return {boolean} true if there are changes which could affect the attributes (including inherited ones)
 | 
					     * @return {boolean} true if there are changes which could affect the attributes (including inherited ones)
 | 
				
			||||||
 | 
					     *          notably changes in note itself should not have any effect on attributes
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    hasAttributeRelatedChanges() {
 | 
					    hasAttributeRelatedChanges() {
 | 
				
			||||||
        return Object.keys(this.noteIdToSourceId).length === 0
 | 
					        return this.branches.length === 0
 | 
				
			||||||
            && this.branches.length === 0
 | 
					 | 
				
			||||||
            && this.attributes.length === 0;
 | 
					            && this.attributes.length === 0;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -251,6 +251,9 @@ export default class TabManager extends Component {
 | 
				
			|||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // close dangling autocompletes after closing the tab
 | 
				
			||||||
 | 
					        $(".aa-input").autocomplete("close");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        await this.triggerEvent('beforeTabRemove', {tabId});
 | 
					        await this.triggerEvent('beforeTabRemove', {tabId});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (this.tabContexts.length <= 1) {
 | 
					        if (this.tabContexts.length <= 1) {
 | 
				
			||||||
@ -269,9 +272,6 @@ export default class TabManager extends Component {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        this.children = this.children.filter(tc => tc.tabId !== tabId);
 | 
					        this.children = this.children.filter(tc => tc.tabId !== tabId);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // remove dangling autocompletes after closing the tab
 | 
					 | 
				
			||||||
        $(".algolia-autocomplete").remove();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        this.triggerEvent('tabRemoved', {tabId});
 | 
					        this.triggerEvent('tabRemoved', {tabId});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        this.tabsUpdate.scheduleUpdate();
 | 
					        this.tabsUpdate.scheduleUpdate();
 | 
				
			||||||
 | 
				
			|||||||
@ -162,6 +162,13 @@ function getNoteIdFromNotePath(notePath) {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function getNoteIdAndParentIdFromNotePath(notePath) {
 | 
					function getNoteIdAndParentIdFromNotePath(notePath) {
 | 
				
			||||||
 | 
					    if (notePath === 'root') {
 | 
				
			||||||
 | 
					        return {
 | 
				
			||||||
 | 
					            noteId: 'root',
 | 
				
			||||||
 | 
					            parentNoteId: 'none'
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    let parentNoteId = 'root';
 | 
					    let parentNoteId = 'root';
 | 
				
			||||||
    let noteId = '';
 | 
					    let noteId = '';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -39,7 +39,18 @@ let consumeQueuePromise = null;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// most sync events are sent twice - once immediatelly after finishing the transaction and once during the scheduled ping
 | 
					// most sync events are sent twice - once immediatelly after finishing the transaction and once during the scheduled ping
 | 
				
			||||||
// but we want to process only once
 | 
					// but we want to process only once
 | 
				
			||||||
const receivedSyncIds = new Set();
 | 
					const processedSyncIds = new Set();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function logRows(syncRows) {
 | 
				
			||||||
 | 
					    const filteredRows = syncRows.filter(row =>
 | 
				
			||||||
 | 
					        !processedSyncIds.has(row.id)
 | 
				
			||||||
 | 
					        && row.entityName !== 'recent_notes'
 | 
				
			||||||
 | 
					        && (row.entityName !== 'options' || row.entityId !== 'openTabs'));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (filteredRows.length > 0) {
 | 
				
			||||||
 | 
					        console.debug(utils.now(), "Sync data: ", filteredRows);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
async function handleMessage(event) {
 | 
					async function handleMessage(event) {
 | 
				
			||||||
    const message = JSON.parse(event.data);
 | 
					    const message = JSON.parse(event.data);
 | 
				
			||||||
@ -55,20 +66,9 @@ async function handleMessage(event) {
 | 
				
			|||||||
        $outstandingSyncsCount.html(message.outstandingSyncs);
 | 
					        $outstandingSyncsCount.html(message.outstandingSyncs);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (syncRows.length > 0) {
 | 
					        if (syncRows.length > 0) {
 | 
				
			||||||
            const filteredRows = syncRows.filter(row =>
 | 
					            logRows(syncRows);
 | 
				
			||||||
                !receivedSyncIds.has(row.id)
 | 
					 | 
				
			||||||
                && row.entityName !== 'recent_notes'
 | 
					 | 
				
			||||||
                && (row.entityName !== 'options' || row.entityId !== 'openTabs'));
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (filteredRows.length > 0) {
 | 
					            syncDataQueue.push(...syncRows);
 | 
				
			||||||
                console.debug(utils.now(), "Sync data: ", filteredRows);
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            for (const row of filteredRows) {
 | 
					 | 
				
			||||||
                receivedSyncIds.add(row.id);
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            syncDataQueue.push(...filteredRows);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // we set lastAcceptedSyncId even before sync processing and send ping so that backend can start sending more updates
 | 
					            // we set lastAcceptedSyncId even before sync processing and send ping so that backend can start sending more updates
 | 
				
			||||||
            lastAcceptedSyncId = Math.max(lastAcceptedSyncId, syncRows[syncRows.length - 1].id);
 | 
					            lastAcceptedSyncId = Math.max(lastAcceptedSyncId, syncRows[syncRows.length - 1].id);
 | 
				
			||||||
@ -142,13 +142,21 @@ async function runSafely(syncHandler, syncData) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * TODO: we should rethink the fact that each sync row is sent twice (once at the end of transaction, once periodically)
 | 
				
			||||||
 | 
					 *       and we keep both lastProcessedSyncId and processedSyncIds
 | 
				
			||||||
 | 
					 *       it even seems incorrect that when transaction sync rows are received, we incorrectly increase lastProcessedSyncId
 | 
				
			||||||
 | 
					 *       and then some syncs might lost (or are *all* sync rows sent from transactions?)
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
async function consumeSyncData() {
 | 
					async function consumeSyncData() {
 | 
				
			||||||
    if (syncDataQueue.length > 0) {
 | 
					    if (syncDataQueue.length > 0) {
 | 
				
			||||||
        const allSyncData = syncDataQueue;
 | 
					        const allSyncRows = syncDataQueue;
 | 
				
			||||||
        syncDataQueue = [];
 | 
					        syncDataQueue = [];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        const nonProcessedSyncRows = allSyncRows.filter(sync => !processedSyncIds.has(sync.id));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        try {
 | 
					        try {
 | 
				
			||||||
            await processSyncRows(allSyncData);
 | 
					            await processSyncRows(nonProcessedSyncRows);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        catch (e) {
 | 
					        catch (e) {
 | 
				
			||||||
            logError(`Encountered error ${e.message}: ${e.stack}, reloading frontend.`);
 | 
					            logError(`Encountered error ${e.message}: ${e.stack}, reloading frontend.`);
 | 
				
			||||||
@ -157,7 +165,7 @@ async function consumeSyncData() {
 | 
				
			|||||||
            utils.reloadApp();
 | 
					            utils.reloadApp();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        lastProcessedSyncId = Math.max(lastProcessedSyncId, allSyncData[allSyncData.length - 1].id);
 | 
					        lastProcessedSyncId = Math.max(lastProcessedSyncId, allSyncRows[allSyncRows.length - 1].id);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    checkSyncIdListeners();
 | 
					    checkSyncIdListeners();
 | 
				
			||||||
@ -221,18 +229,18 @@ subscribeToMessages(message => {
 | 
				
			|||||||
async function processSyncRows(syncRows) {
 | 
					async function processSyncRows(syncRows) {
 | 
				
			||||||
    const missingNoteIds = [];
 | 
					    const missingNoteIds = [];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    syncRows.forEach(({entityName, entity}) => {
 | 
					    for (const {entityName, entity} of syncRows) {
 | 
				
			||||||
       if (entityName === 'branches' && !(entity.parentNoteId in treeCache.notes)) {
 | 
					        if (entityName === 'branches' && !(entity.parentNoteId in treeCache.notes)) {
 | 
				
			||||||
            missingNoteIds.push(entity.parentNoteId);
 | 
					            missingNoteIds.push(entity.parentNoteId);
 | 
				
			||||||
       }
 | 
					        }
 | 
				
			||||||
       else if (entityName === 'attributes'
 | 
					        else if (entityName === 'attributes'
 | 
				
			||||||
           && entity.type === 'relation'
 | 
					              && entity.type === 'relation'
 | 
				
			||||||
           && entity.name === 'template'
 | 
					              && entity.name === 'template'
 | 
				
			||||||
           && !(entity.noteId in treeCache.notes)) {
 | 
					              && !(entity.noteId in treeCache.notes)) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
           missingNoteIds.push(entity.value);
 | 
					            missingNoteIds.push(entity.value);
 | 
				
			||||||
       }
 | 
					        }
 | 
				
			||||||
    });
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (missingNoteIds.length > 0) {
 | 
					    if (missingNoteIds.length > 0) {
 | 
				
			||||||
        await treeCache.reloadNotes(missingNoteIds);
 | 
					        await treeCache.reloadNotes(missingNoteIds);
 | 
				
			||||||
@ -240,16 +248,16 @@ async function processSyncRows(syncRows) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    const loadResults = new LoadResults(treeCache);
 | 
					    const loadResults = new LoadResults(treeCache);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    syncRows.filter(sync => sync.entityName === 'notes').forEach(sync => {
 | 
					    for (const sync of syncRows.filter(sync => sync.entityName === 'notes')) {
 | 
				
			||||||
        const note = treeCache.notes[sync.entityId];
 | 
					        const note = treeCache.notes[sync.entityId];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (note) {
 | 
					        if (note) {
 | 
				
			||||||
            note.update(sync.entity);
 | 
					            note.update(sync.entity);
 | 
				
			||||||
            loadResults.addNote(sync.entityId, sync.sourceId);
 | 
					            loadResults.addNote(sync.entityId, sync.sourceId);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    });
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    syncRows.filter(sync => sync.entityName === 'branches').forEach(sync => {
 | 
					    for (const sync of syncRows.filter(sync => sync.entityName === 'branches')) {
 | 
				
			||||||
        let branch = treeCache.branches[sync.entityId];
 | 
					        let branch = treeCache.branches[sync.entityId];
 | 
				
			||||||
        const childNote = treeCache.notes[sync.entity.noteId];
 | 
					        const childNote = treeCache.notes[sync.entity.noteId];
 | 
				
			||||||
        const parentNote = treeCache.notes[sync.entity.parentNoteId];
 | 
					        const parentNote = treeCache.notes[sync.entity.parentNoteId];
 | 
				
			||||||
@ -295,9 +303,9 @@ async function processSyncRows(syncRows) {
 | 
				
			|||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    });
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    syncRows.filter(sync => sync.entityName === 'note_reordering').forEach(sync => {
 | 
					    for (const sync of syncRows.filter(sync => sync.entityName === 'note_reordering')) {
 | 
				
			||||||
        for (const branchId in sync.positions) {
 | 
					        for (const branchId in sync.positions) {
 | 
				
			||||||
            const branch = treeCache.branches[branchId];
 | 
					            const branch = treeCache.branches[branchId];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -307,10 +315,10 @@ async function processSyncRows(syncRows) {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        loadResults.addNoteReordering(sync.entityId, sync.sourceId);
 | 
					        loadResults.addNoteReordering(sync.entityId, sync.sourceId);
 | 
				
			||||||
    });
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // missing reloading the relation target note
 | 
					    // missing reloading the relation target note
 | 
				
			||||||
    syncRows.filter(sync => sync.entityName === 'attributes').forEach(sync => {
 | 
					    for (const sync of syncRows.filter(sync => sync.entityName === 'attributes')) {
 | 
				
			||||||
        let attribute = treeCache.attributes[sync.entityId];
 | 
					        let attribute = treeCache.attributes[sync.entityId];
 | 
				
			||||||
        const sourceNote = treeCache.notes[sync.entity.noteId];
 | 
					        const sourceNote = treeCache.notes[sync.entity.noteId];
 | 
				
			||||||
        const targetNote = sync.entity.type === 'relation' && treeCache.notes[sync.entity.value];
 | 
					        const targetNote = sync.entity.type === 'relation' && treeCache.notes[sync.entity.value];
 | 
				
			||||||
@ -346,27 +354,27 @@ async function processSyncRows(syncRows) {
 | 
				
			|||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    });
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    syncRows.filter(sync => sync.entityName === 'note_contents').forEach(sync => {
 | 
					    for (const sync of syncRows.filter(sync => sync.entityName === 'note_contents')) {
 | 
				
			||||||
        delete treeCache.noteComplementPromises[sync.entityId];
 | 
					        delete treeCache.noteComplementPromises[sync.entityId];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        loadResults.addNoteContent(sync.entityId, sync.sourceId);
 | 
					        loadResults.addNoteContent(sync.entityId, sync.sourceId);
 | 
				
			||||||
    });
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    syncRows.filter(sync => sync.entityName === 'note_revisions').forEach(sync => {
 | 
					    for (const sync of syncRows.filter(sync => sync.entityName === 'note_revisions')) {
 | 
				
			||||||
        loadResults.addNoteRevision(sync.entityId, sync.noteId, sync.sourceId);
 | 
					        loadResults.addNoteRevision(sync.entityId, sync.noteId, sync.sourceId);
 | 
				
			||||||
    });
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    syncRows.filter(sync => sync.entityName === 'options').forEach(sync => {
 | 
					    for (const sync of syncRows.filter(sync => sync.entityName === 'options')) {
 | 
				
			||||||
        if (sync.entity.name === 'openTabs') {
 | 
					        if (sync.entity.name === 'openTabs') {
 | 
				
			||||||
            return; // only noise
 | 
					            continue; // only noise
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        options.set(sync.entity.name, sync.entity.value);
 | 
					        options.set(sync.entity.name, sync.entity.value);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        loadResults.addOption(sync.entity.name);
 | 
					        loadResults.addOption(sync.entity.name);
 | 
				
			||||||
    });
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!loadResults.isEmpty()) {
 | 
					    if (!loadResults.isEmpty()) {
 | 
				
			||||||
        if (loadResults.hasAttributeRelatedChanges()) {
 | 
					        if (loadResults.hasAttributeRelatedChanges()) {
 | 
				
			||||||
 | 
				
			|||||||
@ -9,9 +9,11 @@ class ZoomService extends Component {
 | 
				
			|||||||
    constructor() {
 | 
					    constructor() {
 | 
				
			||||||
        super();
 | 
					        super();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        options.initializedPromise.then(() => {
 | 
					        if (utils.isElectron()) {
 | 
				
			||||||
            this.setZoomFactor(options.getFloat('zoomFactor'));
 | 
					            options.initializedPromise.then(() => {
 | 
				
			||||||
        });
 | 
					                this.setZoomFactor(options.getFloat('zoomFactor'));
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    setZoomFactor(zoomFactor) {
 | 
					    setZoomFactor(zoomFactor) {
 | 
				
			||||||
 | 
				
			|||||||
@ -82,6 +82,10 @@ export default class Component {
 | 
				
			|||||||
        let release;
 | 
					        let release;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        try {
 | 
					        try {
 | 
				
			||||||
 | 
					            if (this.mutex.isLocked()) {
 | 
				
			||||||
 | 
					                console.debug("Mutex locked for", this.constructor.name);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            release = await this.mutex.acquire();
 | 
					            release = await this.mutex.acquire();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            await fun.call(this, data);
 | 
					            await fun.call(this, data);
 | 
				
			||||||
 | 
				
			|||||||
@ -308,7 +308,8 @@ export default class NoteDetailWidget extends TabAwareWidget {
 | 
				
			|||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        await noteCreateService.createNote(note.noteId, {
 | 
					        // without await as this otherwise causes deadlock through component mutex
 | 
				
			||||||
 | 
					        noteCreateService.createNote(note.noteId, {
 | 
				
			||||||
            isProtected: note.isProtected,
 | 
					            isProtected: note.isProtected,
 | 
				
			||||||
            saveSelection: true
 | 
					            saveSelection: true
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
				
			|||||||
@ -11,6 +11,14 @@ async function exportBranch(req, res) {
 | 
				
			|||||||
    const {branchId, type, format, version, taskId} = req.params;
 | 
					    const {branchId, type, format, version, taskId} = req.params;
 | 
				
			||||||
    const branch = await repository.getBranch(branchId);
 | 
					    const branch = await repository.getBranch(branchId);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (!branch) {
 | 
				
			||||||
 | 
					        const message = `Cannot export branch ${branchId} since it does not exist.`;
 | 
				
			||||||
 | 
					        log.error(message);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        res.status(500).send(message);
 | 
				
			||||||
 | 
					        return;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const taskContext = new TaskContext(taskId, 'export');
 | 
					    const taskContext = new TaskContext(taskId, 'export');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    try {
 | 
					    try {
 | 
				
			||||||
 | 
				
			|||||||
@ -1 +1 @@
 | 
				
			|||||||
module.exports = { buildDate:"2020-05-12T16:46:45+02:00", buildRevision: "4f50864ec8346a12d7845cb4c91a3de3b1043d34" };
 | 
					module.exports = { buildDate:"2020-05-20T08:54:55+02:00", buildRevision: "04c573e212db06e1dd60c74707e40f6912c85aab" };
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user