mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-11-04 15:11:31 +08:00 
			
		
		
		
	server-esm: Change some more export object to export default object
This commit is contained in:
		
							parent
							
								
									55eecb0f61
								
							
						
					
					
						commit
						0ceae0a65e
					
				@ -80,7 +80,7 @@ function note(title: string, extraParams = {}) {
 | 
				
			|||||||
  return new NoteBuilder(note);
 | 
					  return new NoteBuilder(note);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
  NoteBuilder,
 | 
					  NoteBuilder,
 | 
				
			||||||
  findNoteByTitle,
 | 
					  findNoteByTitle,
 | 
				
			||||||
  note,
 | 
					  note,
 | 
				
			||||||
 | 
				
			|||||||
@ -286,7 +286,7 @@ eventService.subscribeBeccaLoader(eventService.ENTER_PROTECTED_SESSION, () => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
eventService.subscribeBeccaLoader(eventService.LEAVE_PROTECTED_SESSION, load);
 | 
					eventService.subscribeBeccaLoader(eventService.LEAVE_PROTECTED_SESSION, load);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    load,
 | 
					    load,
 | 
				
			||||||
    reload,
 | 
					    reload,
 | 
				
			||||||
    beccaLoaded
 | 
					    beccaLoaded
 | 
				
			||||||
 | 
				
			|||||||
@ -82,7 +82,7 @@ function getNoteTitleForPath(notePathArray: string[]) {
 | 
				
			|||||||
    return titles.join(' / ');
 | 
					    return titles.join(' / ');
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    getNoteTitle,
 | 
					    getNoteTitle,
 | 
				
			||||||
    getNoteTitleForPath,
 | 
					    getNoteTitleForPath,
 | 
				
			||||||
    isNotePathArchived
 | 
					    isNotePathArchived
 | 
				
			||||||
 | 
				
			|||||||
@ -146,7 +146,7 @@ function validateAndPatch(target: any, source: any, allowedProperties: Validator
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    EtapiError,
 | 
					    EtapiError,
 | 
				
			||||||
    sendError,
 | 
					    sendError,
 | 
				
			||||||
    route,
 | 
					    route,
 | 
				
			||||||
 | 
				
			|||||||
@ -64,7 +64,7 @@ function mapAttachmentToPojo(attachment: BAttachment) {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    mapNoteToPojo,
 | 
					    mapNoteToPojo,
 | 
				
			||||||
    mapBranchToPojo,
 | 
					    mapBranchToPojo,
 | 
				
			||||||
    mapAttributeToPojo,
 | 
					    mapAttributeToPojo,
 | 
				
			||||||
 | 
				
			|||||||
@ -107,7 +107,7 @@ function isValidEntityId(obj: unknown) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    mandatory,
 | 
					    mandatory,
 | 
				
			||||||
    notNull,
 | 
					    notNull,
 | 
				
			||||||
    isString,
 | 
					    isString,
 | 
				
			||||||
 | 
				
			|||||||
@ -97,7 +97,7 @@ function convertAttachmentToNote(req: Request) {
 | 
				
			|||||||
    return attachment.convertToNote();
 | 
					    return attachment.convertToNote();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    getAttachmentBlob,
 | 
					    getAttachmentBlob,
 | 
				
			||||||
    getAttachments,
 | 
					    getAttachments,
 | 
				
			||||||
    getAttachment,
 | 
					    getAttachment,
 | 
				
			||||||
 | 
				
			|||||||
@ -238,7 +238,7 @@ function deleteRelation(req: Request) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    updateNoteAttributes,
 | 
					    updateNoteAttributes,
 | 
				
			||||||
    updateNoteAttribute,
 | 
					    updateNoteAttribute,
 | 
				
			||||||
    setNoteAttribute,
 | 
					    setNoteAttribute,
 | 
				
			||||||
 | 
				
			|||||||
@ -224,7 +224,7 @@ function setPrefix(req: Request) {
 | 
				
			|||||||
    branch.save();
 | 
					    branch.save();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    moveBranchToParent,
 | 
					    moveBranchToParent,
 | 
				
			||||||
    moveBranchBeforeNote,
 | 
					    moveBranchBeforeNote,
 | 
				
			||||||
    moveBranchAfterNote,
 | 
					    moveBranchAfterNote,
 | 
				
			||||||
 | 
				
			|||||||
@ -43,7 +43,7 @@ function getAffectedNoteIds(noteIds: string[], includeDescendants: boolean) {
 | 
				
			|||||||
    return affectedNoteIds;
 | 
					    return affectedNoteIds;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    execute,
 | 
					    execute,
 | 
				
			||||||
    getAffectedNoteCount
 | 
					    getAffectedNoteCount
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -229,7 +229,7 @@ function findNotesByUrl(req: Request){
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    createNote,
 | 
					    createNote,
 | 
				
			||||||
    addClipping,
 | 
					    addClipping,
 | 
				
			||||||
    openNote,
 | 
					    openNote,
 | 
				
			||||||
 | 
				
			|||||||
@ -29,7 +29,7 @@ function toggleNoteInParent(req: Request) {
 | 
				
			|||||||
    return cloningService.toggleNoteInParent(present === 'true', noteId, parentNoteId);
 | 
					    return cloningService.toggleNoteInParent(present === 'true', noteId, parentNoteId);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    cloneNoteToBranch,
 | 
					    cloneNoteToBranch,
 | 
				
			||||||
    cloneNoteToParentNote,
 | 
					    cloneNoteToParentNote,
 | 
				
			||||||
    cloneNoteAfter,
 | 
					    cloneNoteAfter,
 | 
				
			||||||
 | 
				
			|||||||
@ -49,7 +49,7 @@ function checkIntegrity() {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    getExistingBackups,
 | 
					    getExistingBackups,
 | 
				
			||||||
    backupDatabase,
 | 
					    backupDatabase,
 | 
				
			||||||
    vacuumDatabase,
 | 
					    vacuumDatabase,
 | 
				
			||||||
 | 
				
			|||||||
@ -21,7 +21,7 @@ function deleteToken(req: Request) {
 | 
				
			|||||||
    etapiTokenService.deleteToken(req.params.etapiTokenId);
 | 
					    etapiTokenService.deleteToken(req.params.etapiTokenId);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    getTokens,
 | 
					    getTokens,
 | 
				
			||||||
    createToken,
 | 
					    createToken,
 | 
				
			||||||
    patchToken,
 | 
					    patchToken,
 | 
				
			||||||
 | 
				
			|||||||
@ -245,7 +245,7 @@ function uploadModifiedFileToAttachment(req: Request) {
 | 
				
			|||||||
    attachment.setContent(fileContent);
 | 
					    attachment.setContent(fileContent);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    updateFile,
 | 
					    updateFile,
 | 
				
			||||||
    updateAttachment,
 | 
					    updateAttachment,
 | 
				
			||||||
    openFile,
 | 
					    openFile,
 | 
				
			||||||
 | 
				
			|||||||
@ -114,7 +114,7 @@ function updateImage(req: AppRequest) {
 | 
				
			|||||||
    return { uploaded: true };
 | 
					    return { uploaded: true };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    returnImageFromNote,
 | 
					    returnImageFromNote,
 | 
				
			||||||
    returnImageFromRevision,
 | 
					    returnImageFromRevision,
 | 
				
			||||||
    returnAttachedImage,
 | 
					    returnAttachedImage,
 | 
				
			||||||
 | 
				
			|||||||
@ -136,7 +136,7 @@ async function importAttachmentsToNote(req: AppRequest) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    importNotesToBranch,
 | 
					    importNotesToBranch,
 | 
				
			||||||
    importAttachmentsToNote
 | 
					    importAttachmentsToNote
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -14,7 +14,7 @@ function getShortcutsForNotes() {
 | 
				
			|||||||
    return labels.filter(attr => becca.getNote(attr.noteId)?.type !== 'launcher');
 | 
					    return labels.filter(attr => becca.getNote(attr.noteId)?.type !== 'launcher');
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    getKeyboardActions,
 | 
					    getKeyboardActions,
 | 
				
			||||||
    getShortcutsForNotes
 | 
					    getShortcutsForNotes
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -110,7 +110,7 @@ function token(req: Request) {
 | 
				
			|||||||
    return { token: authToken };
 | 
					    return { token: authToken };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    loginSync,
 | 
					    loginSync,
 | 
				
			||||||
    loginToProtectedSession,
 | 
					    loginToProtectedSession,
 | 
				
			||||||
    logoutFromProtectedSession,
 | 
					    logoutFromProtectedSession,
 | 
				
			||||||
 | 
				
			|||||||
@ -385,7 +385,7 @@ function getBacklinks(req: Request) {
 | 
				
			|||||||
    });
 | 
					    });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    getLinkMap,
 | 
					    getLinkMap,
 | 
				
			||||||
    getTreeMap,
 | 
					    getTreeMap,
 | 
				
			||||||
    getBacklinkCount,
 | 
					    getBacklinkCount,
 | 
				
			||||||
 | 
				
			|||||||
@ -250,7 +250,7 @@ function convertNoteToAttachment(req: Request) {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    getNote,
 | 
					    getNote,
 | 
				
			||||||
    getNoteBlob,
 | 
					    getNoteBlob,
 | 
				
			||||||
    getNoteMetadata,
 | 
					    getNoteMetadata,
 | 
				
			||||||
 | 
				
			|||||||
@ -136,7 +136,7 @@ function isAllowed(name: string) {
 | 
				
			|||||||
        || name.startsWith("hideArchivedNotes");
 | 
					        || name.startsWith("hideArchivedNotes");
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    getOptions,
 | 
					    getOptions,
 | 
				
			||||||
    updateOption,
 | 
					    updateOption,
 | 
				
			||||||
    updateOptions,
 | 
					    updateOptions,
 | 
				
			||||||
 | 
				
			|||||||
@ -35,7 +35,7 @@ function renderMarkdown(req: Request) {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    getIconUsage,
 | 
					    getIconUsage,
 | 
				
			||||||
    renderMarkdown
 | 
					    renderMarkdown
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -22,7 +22,7 @@ function resetPassword(req: Request) {
 | 
				
			|||||||
    return passwordService.resetPassword();
 | 
					    return passwordService.resetPassword();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    changePassword,
 | 
					    changePassword,
 | 
				
			||||||
    resetPassword
 | 
					    resetPassword
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -200,7 +200,7 @@ function getNotePathData(note: BNote): NotePath | undefined {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    getRevisionBlob,
 | 
					    getRevisionBlob,
 | 
				
			||||||
    getRevisions,
 | 
					    getRevisions,
 | 
				
			||||||
    getRevision,
 | 
					    getRevision,
 | 
				
			||||||
 | 
				
			|||||||
@ -131,7 +131,7 @@ function getBundle(req: Request) {
 | 
				
			|||||||
    return scriptService.getScriptBundleForFrontend(note, script, params);
 | 
					    return scriptService.getScriptBundleForFrontend(note, script, params);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    exec,
 | 
					    exec,
 | 
				
			||||||
    run,
 | 
					    run,
 | 
				
			||||||
    getStartupBundles,
 | 
					    getStartupBundles,
 | 
				
			||||||
 | 
				
			|||||||
@ -126,7 +126,7 @@ function searchTemplates() {
 | 
				
			|||||||
    }).map(note => note.noteId);
 | 
					    }).map(note => note.noteId);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    searchFromNote,
 | 
					    searchFromNote,
 | 
				
			||||||
    searchAndExecute,
 | 
					    searchAndExecute,
 | 
				
			||||||
    getRelatedNotes,
 | 
					    getRelatedNotes,
 | 
				
			||||||
 | 
				
			|||||||
@ -84,7 +84,7 @@ function saveNote(req: Request) {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    uploadImage,
 | 
					    uploadImage,
 | 
				
			||||||
    saveNote
 | 
					    saveNote
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -51,7 +51,7 @@ function getSyncSeed() {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    getStatus,
 | 
					    getStatus,
 | 
				
			||||||
    setupNewDocument,
 | 
					    setupNewDocument,
 | 
				
			||||||
    setupSyncFromServer,
 | 
					    setupSyncFromServer,
 | 
				
			||||||
 | 
				
			|||||||
@ -82,7 +82,7 @@ function createOrUpdateScriptLauncherFromApi(req: Request) {
 | 
				
			|||||||
    return specialNotesService.createOrUpdateScriptLauncherFromApi(req.body);
 | 
					    return specialNotesService.createOrUpdateScriptLauncherFromApi(req.body);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    getInboxNote,
 | 
					    getInboxNote,
 | 
				
			||||||
    getDayNote,
 | 
					    getDayNote,
 | 
				
			||||||
    getWeekNote,
 | 
					    getWeekNote,
 | 
				
			||||||
 | 
				
			|||||||
@ -66,7 +66,7 @@ function execute(req: Request) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    getSchema,
 | 
					    getSchema,
 | 
				
			||||||
    execute
 | 
					    execute
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -45,7 +45,7 @@ function getSubtreeSize(req: Request) {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    getNoteSize,
 | 
					    getNoteSize,
 | 
				
			||||||
    getSubtreeSize
 | 
					    getSubtreeSize
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -209,7 +209,7 @@ function checkEntityChanges() {
 | 
				
			|||||||
    require('../../services/consistency_checks').runEntityChangesChecks();
 | 
					    require('../../services/consistency_checks').runEntityChangesChecks();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    testSync,
 | 
					    testSync,
 | 
				
			||||||
    checkSync,
 | 
					    checkSync,
 | 
				
			||||||
    syncNow,
 | 
					    syncNow,
 | 
				
			||||||
 | 
				
			|||||||
@ -160,7 +160,7 @@ function load(req: Request) {
 | 
				
			|||||||
    return getNotesAndBranchesAndAttributes(req.body.noteIds);
 | 
					    return getNotesAndBranchesAndAttributes(req.body.noteIds);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    getTree,
 | 
					    getTree,
 | 
				
			||||||
    load
 | 
					    load
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -102,7 +102,7 @@ function logout(req: AppRequest, res: Response) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    loginPage,
 | 
					    loginPage,
 | 
				
			||||||
    setPasswordPage,
 | 
					    setPasswordPage,
 | 
				
			||||||
    setPassword,
 | 
					    setPassword,
 | 
				
			||||||
 | 
				
			|||||||
@ -90,7 +90,7 @@ function getExistingAnonymizedDatabases() {
 | 
				
			|||||||
        }));
 | 
					        }));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    getFullAnonymizationScript,
 | 
					    getFullAnonymizationScript,
 | 
				
			||||||
    createAnonymizedCopy,
 | 
					    createAnonymizedCopy,
 | 
				
			||||||
    getExistingAnonymizedDatabases
 | 
					    getExistingAnonymizedDatabases
 | 
				
			||||||
 | 
				
			|||||||
@ -8,7 +8,7 @@ const APP_DB_VERSION = 228;
 | 
				
			|||||||
const SYNC_VERSION = 32;
 | 
					const SYNC_VERSION = 32;
 | 
				
			||||||
const CLIPPER_PROTOCOL_VERSION = "1.0";
 | 
					const CLIPPER_PROTOCOL_VERSION = "1.0";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    appVersion: packageJson.version,
 | 
					    appVersion: packageJson.version,
 | 
				
			||||||
    dbVersion: APP_DB_VERSION,
 | 
					    dbVersion: APP_DB_VERSION,
 | 
				
			||||||
    nodeVersion: process.version,
 | 
					    nodeVersion: process.version,
 | 
				
			||||||
 | 
				
			|||||||
@ -110,7 +110,7 @@ function isAttributeDangerous(type: string, name: string): boolean {
 | 
				
			|||||||
    );
 | 
					    );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    getNotesWithLabel,
 | 
					    getNotesWithLabel,
 | 
				
			||||||
    getNoteWithLabel,
 | 
					    getNoteWithLabel,
 | 
				
			||||||
    createLabel,
 | 
					    createLabel,
 | 
				
			||||||
 | 
				
			|||||||
@ -126,7 +126,7 @@ function checkCredentials(req: AppRequest, res: Response, next: NextFunction) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    checkAuth,
 | 
					    checkAuth,
 | 
				
			||||||
    checkApiAuth,
 | 
					    checkApiAuth,
 | 
				
			||||||
    checkAppInitialized,
 | 
					    checkAppInitialized,
 | 
				
			||||||
 | 
				
			|||||||
@ -75,7 +75,7 @@ if (!fs.existsSync(dataDir.BACKUP_DIR)) {
 | 
				
			|||||||
    fs.mkdirSync(dataDir.BACKUP_DIR, 0o700);
 | 
					    fs.mkdirSync(dataDir.BACKUP_DIR, 0o700);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    getExistingBackups,
 | 
					    getExistingBackups,
 | 
				
			||||||
    backupNow,
 | 
					    backupNow,
 | 
				
			||||||
    regularBackup
 | 
					    regularBackup
 | 
				
			||||||
 | 
				
			|||||||
@ -54,7 +54,7 @@ function calculateContentHash({blobId, content}: Blob) {
 | 
				
			|||||||
    return utils.hash(`${blobId}|${content.toString()}`);
 | 
					    return utils.hash(`${blobId}|${content.toString()}`);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    getBlobPojo,
 | 
					    getBlobPojo,
 | 
				
			||||||
    processContent,
 | 
					    processContent,
 | 
				
			||||||
    calculateContentHash
 | 
					    calculateContentHash
 | 
				
			||||||
 | 
				
			|||||||
@ -44,7 +44,7 @@ function moveBranchToBranch(branchToMove: BBranch, targetParentBranch: BBranch,
 | 
				
			|||||||
    return res;
 | 
					    return res;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    moveBranchToBranch,
 | 
					    moveBranchToBranch,
 | 
				
			||||||
    moveBranchToNote
 | 
					    moveBranchToNote
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -1 +1 @@
 | 
				
			|||||||
export = { buildDate:"2024-07-14T22:32:45+03:00", buildRevision: "b811f3d399aed7e740bd8e92ef7edc7d15de7038" };
 | 
					export default { buildDate:"2024-07-14T22:32:45+03:00", buildRevision: "b811f3d399aed7e740bd8e92ef7edc7d15de7038" };
 | 
				
			||||||
 | 
				
			|||||||
@ -175,7 +175,7 @@ function cloneNoteAfter(noteId: string, afterBranchId: string) {
 | 
				
			|||||||
    return { success: true, branchId: branch.branchId };
 | 
					    return { success: true, branchId: branch.branchId };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    cloneNoteToBranch,
 | 
					    cloneNoteToBranch,
 | 
				
			||||||
    cloneNoteToParentNote,
 | 
					    cloneNoteToParentNote,
 | 
				
			||||||
    ensureNoteIsPresentInParent,
 | 
					    ensureNoteIsPresentInParent,
 | 
				
			||||||
 | 
				
			|||||||
@ -96,7 +96,7 @@ function ignoreEntityChangeIds() {
 | 
				
			|||||||
    namespace.set('ignoreEntityChangeIds', true);
 | 
					    namespace.set('ignoreEntityChangeIds', true);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    init,
 | 
					    init,
 | 
				
			||||||
    wrap,
 | 
					    wrap,
 | 
				
			||||||
    get,
 | 
					    get,
 | 
				
			||||||
 | 
				
			|||||||
@ -913,7 +913,7 @@ sqlInit.dbReady.then(() => {
 | 
				
			|||||||
    setTimeout(cls.wrap(runPeriodicChecks), 4 * 1000);
 | 
					    setTimeout(cls.wrap(runPeriodicChecks), 4 * 1000);
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    runOnDemandChecks,
 | 
					    runOnDemandChecks,
 | 
				
			||||||
    runEntityChangesChecks
 | 
					    runEntityChangesChecks
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -80,7 +80,7 @@ function checkContentHashes(otherHashes: Record<string, SectorHash>) {
 | 
				
			|||||||
    return failedChecks;
 | 
					    return failedChecks;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    getEntityHashes,
 | 
					    getEntityHashes,
 | 
				
			||||||
    checkContentHashes
 | 
					    checkContentHashes
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -68,7 +68,7 @@ const LOG_DIR = process.env.TRILIUM_LOG_DIR || `${DIR_SEP}log`;
 | 
				
			|||||||
const ANONYMIZED_DB_DIR = process.env.TRILIUM_ANONYMIZED_DB_DIR || `${DIR_SEP}anonymized-db`;
 | 
					const ANONYMIZED_DB_DIR = process.env.TRILIUM_ANONYMIZED_DB_DIR || `${DIR_SEP}anonymized-db`;
 | 
				
			||||||
const CONFIG_INI_PATH = process.env.TRILIUM_CONFIG_INI_PATH || `${DIR_SEP}config.ini`;
 | 
					const CONFIG_INI_PATH = process.env.TRILIUM_CONFIG_INI_PATH || `${DIR_SEP}config.ini`;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    TRILIUM_DATA_DIR,
 | 
					    TRILIUM_DATA_DIR,
 | 
				
			||||||
    DOCUMENT_PATH,
 | 
					    DOCUMENT_PATH,
 | 
				
			||||||
    BACKUP_DIR,
 | 
					    BACKUP_DIR,
 | 
				
			||||||
 | 
				
			|||||||
@ -226,7 +226,7 @@ function getWeekNote(dateStr: string, options: WeekNoteOpts = {}, rootNote: BNot
 | 
				
			|||||||
    return getDayNote(dateStr, rootNote);
 | 
					    return getDayNote(dateStr, rootNote);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    getRootCalendarNote,
 | 
					    getRootCalendarNote,
 | 
				
			||||||
    getYearNote,
 | 
					    getYearNote,
 | 
				
			||||||
    getMonthNote,
 | 
					    getMonthNote,
 | 
				
			||||||
 | 
				
			|||||||
@ -95,7 +95,7 @@ function validateUtcDateTime(str: string | undefined) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    utcNowDateTime,
 | 
					    utcNowDateTime,
 | 
				
			||||||
    localNowDateTime,
 | 
					    localNowDateTime,
 | 
				
			||||||
    localNowDate,
 | 
					    localNowDate,
 | 
				
			||||||
 | 
				
			|||||||
@ -112,7 +112,7 @@ function decryptString(dataKey: Buffer, cipherText: string) {
 | 
				
			|||||||
    return buffer.toString('utf-8');
 | 
					    return buffer.toString('utf-8');
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    encrypt,
 | 
					    encrypt,
 | 
				
			||||||
    decrypt,
 | 
					    decrypt,
 | 
				
			||||||
    decryptString
 | 
					    decryptString
 | 
				
			||||||
 | 
				
			|||||||
@ -22,7 +22,7 @@ function getScryptHash(password: crypto.BinaryLike, salt: crypto.BinaryLike) {
 | 
				
			|||||||
    return hashed;
 | 
					    return hashed;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    getVerificationHash,
 | 
					    getVerificationHash,
 | 
				
			||||||
    getPasswordDerivedKey
 | 
					    getPasswordDerivedKey
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -78,7 +78,7 @@ function resetPassword() {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    isPasswordSet,
 | 
					    isPasswordSet,
 | 
				
			||||||
    changePassword,
 | 
					    changePassword,
 | 
				
			||||||
    setPassword,
 | 
					    setPassword,
 | 
				
			||||||
 | 
				
			|||||||
@ -33,7 +33,7 @@ function getDataKey(password: string) {
 | 
				
			|||||||
    return decryptedDataKey;
 | 
					    return decryptedDataKey;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    verifyPassword,
 | 
					    verifyPassword,
 | 
				
			||||||
    getDataKey,
 | 
					    getDataKey,
 | 
				
			||||||
    setDataKey
 | 
					    setDataKey
 | 
				
			||||||
 | 
				
			|||||||
@ -193,7 +193,7 @@ function recalculateMaxEntityChangeId() {
 | 
				
			|||||||
    maxEntityChangeId = sql.getValue<number>("SELECT COALESCE(MAX(id), 0) FROM entity_changes");
 | 
					    maxEntityChangeId = sql.getValue<number>("SELECT COALESCE(MAX(id), 0) FROM entity_changes");
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    putNoteReorderingEntityChange,
 | 
					    putNoteReorderingEntityChange,
 | 
				
			||||||
    putEntityChangeForOtherInstances,
 | 
					    putEntityChangeForOtherInstances,
 | 
				
			||||||
    putEntityChangeWithForcedChange,
 | 
					    putEntityChangeWithForcedChange,
 | 
				
			||||||
 | 
				
			|||||||
@ -186,7 +186,7 @@ sqlInit.dbReady.then(() => {
 | 
				
			|||||||
    setInterval(cls.wrap(() => eraseScheduledAttachments()), 3600 * 1000);
 | 
					    setInterval(cls.wrap(() => eraseScheduledAttachments()), 3600 * 1000);
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    eraseDeletedNotesNow,
 | 
					    eraseDeletedNotesNow,
 | 
				
			||||||
    eraseUnusedAttachmentsNow,
 | 
					    eraseUnusedAttachmentsNow,
 | 
				
			||||||
    eraseNotesWithDeleteId,
 | 
					    eraseNotesWithDeleteId,
 | 
				
			||||||
 | 
				
			|||||||
@ -114,7 +114,7 @@ function deleteToken(etapiTokenId: string) {
 | 
				
			|||||||
    etapiToken.markAsDeletedSimple();
 | 
					    etapiToken.markAsDeletedSimple();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    getTokens,
 | 
					    getTokens,
 | 
				
			||||||
    createToken,
 | 
					    createToken,
 | 
				
			||||||
    renameToken,
 | 
					    renameToken,
 | 
				
			||||||
 | 
				
			|||||||
@ -59,7 +59,7 @@ function emit(eventType: string, data?: any) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    subscribe,
 | 
					    subscribe,
 | 
				
			||||||
    subscribeBeccaLoader,
 | 
					    subscribeBeccaLoader,
 | 
				
			||||||
    emit,
 | 
					    emit,
 | 
				
			||||||
 | 
				
			|||||||
@ -582,7 +582,7 @@ async function exportToZipFile(noteId: string, format: "markdown" | "html", zipF
 | 
				
			|||||||
    log.info(`Exported '${noteId}' with format '${format}' to '${zipFilePath}'`);
 | 
					    log.info(`Exported '${noteId}' with format '${format}' to '${zipFilePath}'`);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    exportToZip,
 | 
					    exportToZip,
 | 
				
			||||||
    exportToZipFile
 | 
					    exportToZipFile
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -362,7 +362,7 @@ function checkHiddenSubtreeRecursively(parentNoteId: string, item: Item) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    checkHiddenSubtree,
 | 
					    checkHiddenSubtree,
 | 
				
			||||||
    LBTPL_ROOT,
 | 
					    LBTPL_ROOT,
 | 
				
			||||||
    LBTPL_BASE,
 | 
					    LBTPL_BASE,
 | 
				
			||||||
 | 
				
			|||||||
@ -33,7 +33,7 @@ function getWorkspaceNote() {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    getHoistedNoteId,
 | 
					    getHoistedNoteId,
 | 
				
			||||||
    getWorkspaceNote,
 | 
					    getWorkspaceNote,
 | 
				
			||||||
    isHoistedInHiddenSubtree
 | 
					    isHoistedInHiddenSubtree
 | 
				
			||||||
 | 
				
			|||||||
@ -47,7 +47,7 @@ function sanitize(dirtyHtml: string) {
 | 
				
			|||||||
    });
 | 
					    });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    sanitize,
 | 
					    sanitize,
 | 
				
			||||||
    sanitizeUrl: (url: string) => {
 | 
					    sanitizeUrl: (url: string) => {
 | 
				
			||||||
        return sanitizeUrl.sanitizeUrl(url).trim();
 | 
					        return sanitizeUrl.sanitizeUrl(url).trim();
 | 
				
			||||||
 | 
				
			|||||||
@ -234,7 +234,7 @@ async function resize(buffer: Buffer, quality: number) {
 | 
				
			|||||||
    return resultBuffer;
 | 
					    return resultBuffer;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    saveImage,
 | 
					    saveImage,
 | 
				
			||||||
    saveImageToAttachment,
 | 
					    saveImageToAttachment,
 | 
				
			||||||
    updateImage
 | 
					    updateImage
 | 
				
			||||||
 | 
				
			|||||||
@ -409,4 +409,4 @@ function importEnex(taskContext: TaskContext, file: File, parentNote: BNote): Pr
 | 
				
			|||||||
    });
 | 
					    });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = { importEnex };
 | 
					export default { importEnex };
 | 
				
			||||||
 | 
				
			|||||||
@ -110,7 +110,7 @@ function normalizeMimeType(mime: string) {
 | 
				
			|||||||
    return undefined;
 | 
					    return undefined;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    getMime,
 | 
					    getMime,
 | 
				
			||||||
    getType,
 | 
					    getType,
 | 
				
			||||||
    normalizeMimeType
 | 
					    normalizeMimeType
 | 
				
			||||||
 | 
				
			|||||||
@ -191,7 +191,7 @@ function importAttachment(taskContext: TaskContext, file: File, parentNote: BNot
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    importSingleFile,
 | 
					    importSingleFile,
 | 
				
			||||||
    importAttachment
 | 
					    importAttachment
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -637,7 +637,7 @@ function getKeyboardActions() {
 | 
				
			|||||||
    return actions;
 | 
					    return actions;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    DEFAULT_KEYBOARD_ACTIONS,
 | 
					    DEFAULT_KEYBOARD_ACTIONS,
 | 
				
			||||||
    getKeyboardActions
 | 
					    getKeyboardActions
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -117,7 +117,7 @@ function formatDate() {
 | 
				
			|||||||
    return `${pad(todaysMidnight.getFullYear())}-${pad(todaysMidnight.getMonth() + 1)}-${pad(todaysMidnight.getDate())}`;
 | 
					    return `${pad(todaysMidnight.getFullYear())}-${pad(todaysMidnight.getMonth() + 1)}-${pad(todaysMidnight.getDate())}`;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    info,
 | 
					    info,
 | 
				
			||||||
    error,
 | 
					    error,
 | 
				
			||||||
    request
 | 
					    request
 | 
				
			||||||
 | 
				
			|||||||
@ -143,7 +143,7 @@ async function migrateIfNecessary() {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    migrateIfNecessary,
 | 
					    migrateIfNecessary,
 | 
				
			||||||
    isDbUpToDate
 | 
					    isDbUpToDate
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -26,7 +26,7 @@ function getDefaultMimeForNoteType(typeName: string) {
 | 
				
			|||||||
    return typeRec.defaultMime;
 | 
					    return typeRec.defaultMime;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    getNoteTypeNames: () => noteTypes.map(nt => nt.type),
 | 
					    getNoteTypeNames: () => noteTypes.map(nt => nt.type),
 | 
				
			||||||
    getDefaultMimeForNoteType
 | 
					    getDefaultMimeForNoteType
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -1037,7 +1037,7 @@ function getNoteIdMapping(origNote: BNote) {
 | 
				
			|||||||
    return noteIdMapping;
 | 
					    return noteIdMapping;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    createNewNote,
 | 
					    createNewNote,
 | 
				
			||||||
    createNewNoteWithTarget,
 | 
					    createNewNoteWithTarget,
 | 
				
			||||||
    updateNoteData,
 | 
					    updateNoteData,
 | 
				
			||||||
 | 
				
			|||||||
@ -93,7 +93,7 @@ function getOptionMap() {
 | 
				
			|||||||
    return map;
 | 
					    return map;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    getOption,
 | 
					    getOption,
 | 
				
			||||||
    getOptionInt,
 | 
					    getOptionInt,
 | 
				
			||||||
    getOptionBool,
 | 
					    getOptionBool,
 | 
				
			||||||
 | 
				
			|||||||
@ -132,7 +132,7 @@ function getKeyboardDefaultOptions() {
 | 
				
			|||||||
        }));
 | 
					        }));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    initDocumentOptions,
 | 
					    initDocumentOptions,
 | 
				
			||||||
    initNotSyncedOptions,
 | 
					    initNotSyncedOptions,
 | 
				
			||||||
    initStartupOptions
 | 
					    initStartupOptions
 | 
				
			||||||
 | 
				
			|||||||
@ -70,7 +70,7 @@ function checkProtectedSessionExpiration() {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    setDataKey,
 | 
					    setDataKey,
 | 
				
			||||||
    resetDataKey,
 | 
					    resetDataKey,
 | 
				
			||||||
    isProtectedSessionAvailable,
 | 
					    isProtectedSessionAvailable,
 | 
				
			||||||
 | 
				
			|||||||
@ -233,7 +233,7 @@ function generateError(opts: {
 | 
				
			|||||||
    return new Error(`Request to ${opts.method} ${opts.url} failed, error: ${message}`);
 | 
					    return new Error(`Request to ${opts.method} ${opts.url} failed, error: ${message}`);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    exec,
 | 
					    exec,
 | 
				
			||||||
    getImage
 | 
					    getImage
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -20,7 +20,7 @@ if (!fs.existsSync(MIGRATIONS_DIR)) {
 | 
				
			|||||||
    process.exit(1);
 | 
					    process.exit(1);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    RESOURCE_DIR,
 | 
					    RESOURCE_DIR,
 | 
				
			||||||
    MIGRATIONS_DIR,
 | 
					    MIGRATIONS_DIR,
 | 
				
			||||||
    DB_INIT_DIR,
 | 
					    DB_INIT_DIR,
 | 
				
			||||||
 | 
				
			|||||||
@ -219,7 +219,7 @@ function sanitizeVariableName(str: string) {
 | 
				
			|||||||
    return str.replace(/[^a-z0-9_]/gim, "");
 | 
					    return str.replace(/[^a-z0-9_]/gim, "");
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    executeNote,
 | 
					    executeNote,
 | 
				
			||||||
    executeNoteNoException,
 | 
					    executeNoteNoException,
 | 
				
			||||||
    executeScript,
 | 
					    executeScript,
 | 
				
			||||||
 | 
				
			|||||||
@ -444,7 +444,7 @@ function formatAttribute(attr: BAttribute) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    searchFromNote,
 | 
					    searchFromNote,
 | 
				
			||||||
    searchNotesForAutocomplete,
 | 
					    searchNotesForAutocomplete,
 | 
				
			||||||
    findResultsWithQuery,
 | 
					    findResultsWithQuery,
 | 
				
			||||||
 | 
				
			|||||||
@ -110,7 +110,7 @@ function getSyncSeedOptions() {
 | 
				
			|||||||
    ];
 | 
					    ];
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    hasSyncServerSchemaAndSeed,
 | 
					    hasSyncServerSchemaAndSeed,
 | 
				
			||||||
    triggerSync,
 | 
					    triggerSync,
 | 
				
			||||||
    sendSeedToSyncServer,
 | 
					    sendSeedToSyncServer,
 | 
				
			||||||
 | 
				
			|||||||
@ -287,7 +287,7 @@ function createOrUpdateScriptLauncherFromApi(opts: {
 | 
				
			|||||||
    return launcherNote;
 | 
					    return launcherNote;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    getInboxNote,
 | 
					    getInboxNote,
 | 
				
			||||||
    createSqlConsole,
 | 
					    createSqlConsole,
 | 
				
			||||||
    saveSqlConsole,
 | 
					    saveSqlConsole,
 | 
				
			||||||
 | 
				
			|||||||
@ -314,7 +314,7 @@ function disableSlowQueryLogging<T>(cb: () => T) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    dbConnection,
 | 
					    dbConnection,
 | 
				
			||||||
    insert,
 | 
					    insert,
 | 
				
			||||||
    replace,
 | 
					    replace,
 | 
				
			||||||
 | 
				
			|||||||
@ -184,7 +184,7 @@ function getDbSize() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
log.info(`DB size: ${getDbSize()} KB`);
 | 
					log.info(`DB size: ${getDbSize()} KB`);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    dbReady,
 | 
					    dbReady,
 | 
				
			||||||
    schemaExists,
 | 
					    schemaExists,
 | 
				
			||||||
    isDbInitialized,
 | 
					    isDbInitialized,
 | 
				
			||||||
 | 
				
			|||||||
@ -453,7 +453,7 @@ require('../becca/becca_loader').beccaLoaded.then(() => {
 | 
				
			|||||||
    getLastSyncedPush();
 | 
					    getLastSyncedPush();
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    sync,
 | 
					    sync,
 | 
				
			||||||
    login,
 | 
					    login,
 | 
				
			||||||
    getEntityChangeRecords,
 | 
					    getEntityChangeRecords,
 | 
				
			||||||
 | 
				
			|||||||
@ -14,7 +14,7 @@ function get(name: string) {
 | 
				
			|||||||
    return (config['Sync'] && config['Sync'][name]) || optionService.getOption(name);
 | 
					    return (config['Sync'] && config['Sync'][name]) || optionService.getOption(name);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    // env variable is the easiest way to guarantee we won't overwrite prod data during development
 | 
					    // env variable is the easiest way to guarantee we won't overwrite prod data during development
 | 
				
			||||||
    // after copying prod document/data directory
 | 
					    // after copying prod document/data directory
 | 
				
			||||||
    getSyncServerHost: () => process.env.TRILIUM_SYNC_SERVER_HOST || get('syncServerHost'),
 | 
					    getSyncServerHost: () => process.env.TRILIUM_SYNC_SERVER_HOST || get('syncServerHost'),
 | 
				
			||||||
 | 
				
			|||||||
@ -261,7 +261,7 @@ function setNoteToParent(noteId: string, prefix: string, parentNoteId: string) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    validateParentChild,
 | 
					    validateParentChild,
 | 
				
			||||||
    sortNotes,
 | 
					    sortNotes,
 | 
				
			||||||
    sortNotesIfNeeded,
 | 
					    sortNotesIfNeeded,
 | 
				
			||||||
 | 
				
			|||||||
@ -311,7 +311,7 @@ function isString(x: any) {
 | 
				
			|||||||
    return Object.prototype.toString.call(x) === "[object String]";
 | 
					    return Object.prototype.toString.call(x) === "[object String]";
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    randomSecureToken,
 | 
					    randomSecureToken,
 | 
				
			||||||
    randomString,
 | 
					    randomString,
 | 
				
			||||||
    md5,
 | 
					    md5,
 | 
				
			||||||
 | 
				
			|||||||
@ -193,7 +193,7 @@ function getMainWindow() {
 | 
				
			|||||||
    return mainWindow;
 | 
					    return mainWindow;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    createMainWindow,
 | 
					    createMainWindow,
 | 
				
			||||||
    createSetupWindow,
 | 
					    createSetupWindow,
 | 
				
			||||||
    closeSetupWindow,
 | 
					    closeSetupWindow,
 | 
				
			||||||
 | 
				
			|||||||
@ -275,7 +275,7 @@ function setLastSyncedPush(entityChangeId: number) {
 | 
				
			|||||||
    lastSyncedPush = entityChangeId;
 | 
					    lastSyncedPush = entityChangeId;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    init,
 | 
					    init,
 | 
				
			||||||
    sendMessageToAllClients,
 | 
					    sendMessageToAllClients,
 | 
				
			||||||
    syncPushInProgress,
 | 
					    syncPushInProgress,
 | 
				
			||||||
 | 
				
			|||||||
@ -92,7 +92,7 @@ eventService.subscribe([eventService.ENTITY_CREATED, eventService.ENTITY_CHANGED
 | 
				
			|||||||
    shaca.reset();
 | 
					    shaca.reset();
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    load,
 | 
					    load,
 | 
				
			||||||
    ensureLoad
 | 
					    ensureLoad
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -27,7 +27,7 @@ function getColumn<T>(query: string, params: string[] = []): T[] {
 | 
				
			|||||||
    return dbConnection.prepare(query).pluck().all(params) as T[];
 | 
					    return dbConnection.prepare(query).pluck().all(params) as T[];
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export = {
 | 
					export default {
 | 
				
			||||||
    getRawRows,
 | 
					    getRawRows,
 | 
				
			||||||
    getRow,
 | 
					    getRow,
 | 
				
			||||||
    getColumn
 | 
					    getColumn
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user