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