mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	server-esm: Fix a few more straightforward imports
This commit is contained in:
		
							
								
								
									
										13
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										13
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @@ -94,6 +94,7 @@ | ||||
|         "@types/compression": "^1.7.5", | ||||
|         "@types/cookie-parser": "^1.4.7", | ||||
|         "@types/csurf": "^1.11.5", | ||||
|         "@types/debounce": "^1.2.4", | ||||
|         "@types/ejs": "^3.1.5", | ||||
|         "@types/escape-html": "^1.0.4", | ||||
|         "@types/express": "^4.17.21", | ||||
| @@ -1289,6 +1290,12 @@ | ||||
|       "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.3.tgz", | ||||
|       "integrity": "sha512-2p6olUZ4w3s+07q3Tm2dbiMZy5pCDfYwtLXXHUnVzXgQlZ/OyPtUz6OL382BkOuGlLXqfT+wqv8Fw2v8/0geBw==" | ||||
|     }, | ||||
|     "node_modules/@types/debounce": { | ||||
|       "version": "1.2.4", | ||||
|       "resolved": "https://registry.npmjs.org/@types/debounce/-/debounce-1.2.4.tgz", | ||||
|       "integrity": "sha512-jBqiORIzKDOToaF63Fm//haOCHuwQuLa2202RK4MozpA6lh93eCBc+/8+wZn5OzjJt3ySdc+74SXWXB55Ewtyw==", | ||||
|       "dev": true | ||||
|     }, | ||||
|     "node_modules/@types/debug": { | ||||
|       "version": "4.1.9", | ||||
|       "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.9.tgz", | ||||
| @@ -14355,6 +14362,12 @@ | ||||
|       "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.3.tgz", | ||||
|       "integrity": "sha512-2p6olUZ4w3s+07q3Tm2dbiMZy5pCDfYwtLXXHUnVzXgQlZ/OyPtUz6OL382BkOuGlLXqfT+wqv8Fw2v8/0geBw==" | ||||
|     }, | ||||
|     "@types/debounce": { | ||||
|       "version": "1.2.4", | ||||
|       "resolved": "https://registry.npmjs.org/@types/debounce/-/debounce-1.2.4.tgz", | ||||
|       "integrity": "sha512-jBqiORIzKDOToaF63Fm//haOCHuwQuLa2202RK4MozpA6lh93eCBc+/8+wZn5OzjJt3ySdc+74SXWXB55Ewtyw==", | ||||
|       "dev": true | ||||
|     }, | ||||
|     "@types/debug": { | ||||
|       "version": "4.1.9", | ||||
|       "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.9.tgz", | ||||
|   | ||||
| @@ -116,6 +116,7 @@ | ||||
|     "@types/compression": "^1.7.5", | ||||
|     "@types/cookie-parser": "^1.4.7", | ||||
|     "@types/csurf": "^1.11.5", | ||||
|     "@types/debounce": "^1.2.4", | ||||
|     "@types/ejs": "^3.1.5", | ||||
|     "@types/escape-html": "^1.0.4", | ||||
|     "@types/express": "^4.17.21", | ||||
|   | ||||
| @@ -132,7 +132,7 @@ function getIcon() { | ||||
| } | ||||
|  | ||||
| async function createSetupWindow() { | ||||
|     const { BrowserWindow } = require('electron'); // should not be statically imported | ||||
|     const { BrowserWindow } = await import("electron"); // should not be statically imported | ||||
|     setupWindow = new BrowserWindow({ | ||||
|         width: 800, | ||||
|         height: 800, | ||||
| @@ -156,7 +156,7 @@ function closeSetupWindow() { | ||||
| } | ||||
|  | ||||
| async function registerGlobalShortcuts() { | ||||
|     const { globalShortcut } = require('electron'); | ||||
|     const { globalShortcut } = await import("electron"); | ||||
|  | ||||
|     await sqlInit.dbReady; | ||||
|  | ||||
|   | ||||
| @@ -14,8 +14,8 @@ import { IncomingMessage, Server } from 'http'; | ||||
| import { EntityChange } from './entity_changes_interface'; | ||||
|  | ||||
| if (env.isDev()) { | ||||
|     const chokidar = require('chokidar'); | ||||
|     const debounce = require('debounce'); | ||||
|     const chokidar = (await import("chokidar")).default; | ||||
|     const debounce = (await import("debounce")).default; | ||||
|     const debouncedReloadFrontend = debounce(() => reloadFrontend("source code change"), 200); | ||||
|     chokidar | ||||
|         .watch('src/public') | ||||
|   | ||||
		Reference in New Issue
	
	Block a user