File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8686 "description" : " Author name for comments." ,
8787 "default" : " User"
8888 },
89+ "security-notes.localDatabase" : {
90+ "type" : " string" ,
91+ "description" : " Local database file path." ,
92+ "default" : " .security-notes.json"
93+ },
8994 "security-notes.collab.enabled" : {
9095 "type" : " boolean" ,
9196 "description" : " Enable collaboration via RethinkDB." ,
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import {
1414 syncNoteMapWithRemote ,
1515} from './helpers' ;
1616import { RemoteDb } from './persistence/remote-db' ;
17- import { loadCommentsFromFile , saveCommentsToFile } from './persistence/local' ;
17+ import { loadCommentsFromFile , saveCommentsToFile } from './persistence/local-db ' ;
1818
1919const noteMap = new Map < string , vscode . CommentThread > ( ) ;
2020let remoteDb : RemoteDb | undefined ;
Original file line number Diff line number Diff line change 33import * as fs from 'fs' ;
44import { Serializer } from '../serialization/serializer' ;
55import { Deserializer } from '../serialization/deserializer' ;
6- import { CommentThread , CommentThreadCollapsibleState } from 'vscode' ;
6+ import { CommentThread } from 'vscode' ;
7+ import { getSetting } from '../../helpers' ;
78
8- const persistenceFile = '/tmp/.security-notes.json' ;
9+ const persistenceFile = getSetting ( 'localDatabase' ) ;
910
1011export const saveCommentsToFile = ( noteList : Map < string , CommentThread > ) => {
1112 fs . writeFileSync ( persistenceFile , JSON . stringify ( Serializer . serialize ( noteList ) ) ) ;
You can’t perform that action at this time.
0 commit comments