mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-29 11:44:21 +08:00 
			
		
		
		
	Merge branch 'develop' of https://github.com/TriliumNext/Notes into develop
This commit is contained in:
		
						commit
						9ff8b53ae6
					
				
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1,3 +1,4 @@ | ||||
| .cache | ||||
| .DS_Store | ||||
| node_modules/ | ||||
| dist/ | ||||
|  | ||||
							
								
								
									
										8
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										8
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @ -153,7 +153,7 @@ | ||||
|         "@types/yargs": "17.0.33", | ||||
|         "@vitest/coverage-v8": "3.0.5", | ||||
|         "cross-env": "7.0.3", | ||||
|         "electron": "34.1.0", | ||||
|         "electron": "34.1.1", | ||||
|         "esm": "3.2.25", | ||||
|         "jasmine": "5.5.0", | ||||
|         "jsdoc": "4.0.4", | ||||
| @ -7910,9 +7910,9 @@ | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/electron": { | ||||
|       "version": "34.1.0", | ||||
|       "resolved": "https://registry.npmjs.org/electron/-/electron-34.1.0.tgz", | ||||
|       "integrity": "sha512-ZUid8XrGPA0dfes97PPADc8ecWOUX/qYRNp1glze9coZLEYc+PsMvgjVDCHSvjfHfiI+V3unwngSVpBouX71YQ==", | ||||
|       "version": "34.1.1", | ||||
|       "resolved": "https://registry.npmjs.org/electron/-/electron-34.1.1.tgz", | ||||
|       "integrity": "sha512-1aDYk9Gsv1/fFeClMrxWGoVMl7uCUgl1pe26BiTnLXmAoqEXCa3f3sCKFWV+cuDzUjQGAZcpkWhGYTgWUSQrLA==", | ||||
|       "hasInstallScript": true, | ||||
|       "license": "MIT", | ||||
|       "dependencies": { | ||||
|  | ||||
							
								
								
									
										16
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								package.json
									
									
									
									
									
								
							| @ -25,10 +25,16 @@ | ||||
|     "start-server-no-dir": "cross-env TRILIUM_ENV=dev TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 nodemon src/main.ts", | ||||
|     "start-test-server": "npm run switch-server && rimraf ./data-test && cross-env TRILIUM_DATA_DIR=./data-test TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev TRILIUM_PORT=9999 nodemon src/main.ts", | ||||
|     "qstart-server": "npm run switch-server && npm run start-server", | ||||
|     "start-electron": "npm run prepare-dist && cross-env TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev electron ./dist/electron-main.js --inspect=5858 .", | ||||
|     "start-electron-nix": "electron-rebuild --version 33.3.1 && npm run prepare-dist && cross-env TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev nix-shell -p electron_33 --run \"electron ./dist/electron-main.js --inspect=5858 .\"", | ||||
|     "start-electron-no-dir": "npm run prepare-dist && cross-env TRILIUM_ENV=dev electron --inspect=5858 .", | ||||
|     "start-electron-no-dir-nix": "electron-rebuild --version 33.3.1 && npm run prepare-dist && cross-env TRILIUM_ENV=dev nix-shell -p electron_33 --run \"electron ./dist/electron-main.js --inspect=5858 .\"", | ||||
| 
 | ||||
|     "start-electron": "cross-env NODE_OPTIONS=\"--import tsx\" TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev electron ./electron-main.ts --inspect=5858 .", | ||||
|     "start-electron-nix": "electron-rebuild --version 33.3.1 && cross-env NODE_OPTIONS=\"--import tsx\" TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev nix-shell -p electron_33 --run \"electron ./electron-main.ts --inspect=5858 .\"", | ||||
|     "start-electron-no-dir": "cross-env NODE_OPTIONS=\"--import tsx\" TRILIUM_ENV=dev electron --inspect=5858 .", | ||||
|     "start-electron-no-dir-nix": "electron-rebuild --version 33.3.1 && cross-env NODE_OPTIONS=\"--import tsx\" TRILIUM_ENV=dev nix-shell -p electron_33 --run \"electron ./electron-main.ts --inspect=5858 .\"", | ||||
| 
 | ||||
|     "start-electron-prod": "npm run prepare-dist && cross-env TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev electron ./dist/electron-main.js --inspect=5858 .", | ||||
|     "start-electron-prod-nix": "electron-rebuild --version 33.3.1 && npm run prepare-dist && cross-env TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev nix-shell -p electron_33 --run \"electron ./dist/electron-main.js --inspect=5858 .\"", | ||||
|     "start-electron-prod-no-dir": "npm run prepare-dist && cross-env TRILIUM_ENV=dev electron --inspect=5858 .", | ||||
|     "start-electron-prod-no-dir-nix": "electron-rebuild --version 33.3.1 && npm run prepare-dist && cross-env TRILIUM_ENV=dev nix-shell -p electron_33 --run \"electron ./dist/electron-main.js --inspect=5858 .\"", | ||||
|     "qstart-electron": "npm run switch-electron && npm run start-electron", | ||||
|     "switch-server": "rimraf ./node_modules/better-sqlite3 && npm install", | ||||
|     "switch-electron": "electron-rebuild", | ||||
| @ -195,7 +201,7 @@ | ||||
|     "@types/yargs": "17.0.33", | ||||
|     "@vitest/coverage-v8": "3.0.5", | ||||
|     "cross-env": "7.0.3", | ||||
|     "electron": "34.1.0", | ||||
|     "electron": "34.1.1", | ||||
|     "esm": "3.2.25", | ||||
|     "jasmine": "5.5.0", | ||||
|     "jsdoc": "4.0.4", | ||||
|  | ||||
| @ -2,7 +2,7 @@ import assetPath from "../services/asset_path.js"; | ||||
| import path from "path"; | ||||
| import { fileURLToPath } from "url"; | ||||
| import express from "express"; | ||||
| import { isDev } from "../services/utils.js"; | ||||
| import { isDev, isElectron } from "../services/utils.js"; | ||||
| import type serveStatic from "serve-static"; | ||||
| 
 | ||||
| const persistentCacheStatic = (root: string, options?: serveStatic.ServeStaticOptions<express.Response<any, Record<string, any>>>) => { | ||||
| @ -24,6 +24,10 @@ async function register(app: express.Application) { | ||||
| 
 | ||||
|         const frontendCompiler = webpack({ | ||||
|             mode: "development", | ||||
|             cache: { | ||||
|                 type: "filesystem", | ||||
|                 cacheDirectory: path.join(srcRoot, "..", ".cache", isElectron ? "electron" : "server") | ||||
|             }, | ||||
|             entry: productionConfig.entry, | ||||
|             module: productionConfig.module, | ||||
|             resolve: productionConfig.resolve, | ||||
|  | ||||
| @ -28,7 +28,6 @@ function parseNoteMetaFile(noteMetaFile: NoteMetaFile): HiddenSubtreeItem[] { | ||||
| 
 | ||||
|     const metaRoot = noteMetaFile.files[0]; | ||||
|     const parsedMetaRoot = parseNoteMeta(metaRoot, "/" + (metaRoot.dirFileName ?? "")); | ||||
|     console.log(JSON.stringify(parsedMetaRoot, null, 4)); | ||||
|     return parsedMetaRoot.children ?? []; | ||||
| } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Adorian Doran
						Adorian Doran