server-esm: Change export object to export default object

This commit is contained in:
Elian Doran 2024-07-18 21:42:44 +03:00
parent 2750df04a3
commit 55eecb0f61
No known key found for this signature in database
48 changed files with 48 additions and 48 deletions

View File

@ -32,6 +32,6 @@ function getEntityFromEntityName(entityName: keyof typeof ENTITY_NAME_TO_ENTITY)
return ENTITY_NAME_TO_ENTITY[entityName];
}
export = {
export default {
getEntityFromEntityName
};

View File

@ -461,6 +461,6 @@ function setImmediatePromise() {
});
}
export = {
export default {
findSimilarNotes
};

View File

@ -8,6 +8,6 @@ function register(router: Router) {
});
}
export = {
export default {
register
};

View File

@ -104,6 +104,6 @@ function register(router: Router) {
});
}
export = {
export default {
register
};

View File

@ -81,6 +81,6 @@ function register(router: Router) {
});
}
export = {
export default {
register
};

View File

@ -39,6 +39,6 @@ function register(router: Router, loginMiddleware: RequestHandler[]) {
});
}
export = {
export default {
register
}

View File

@ -11,6 +11,6 @@ function register(router: Router) {
});
}
export = {
export default {
register
};

View File

@ -84,6 +84,6 @@ function register(router: Router) {
});
}
export = {
export default {
register
};

View File

@ -267,6 +267,6 @@ function parseInteger(obj: any, name: string) {
return integer;
}
export = {
export default {
register
};

View File

@ -17,6 +17,6 @@ function register(router: Router) {
});
}
export = {
export default {
register
};

View File

@ -73,6 +73,6 @@ function register(router: Router) {
});
}
export = {
export default {
register
};

View File

@ -6,6 +6,6 @@ function getAppInfo() {
return appInfo;
}
export = {
export default {
getAppInfo
};

View File

@ -75,6 +75,6 @@ function getRecentNotes(activeNoteId: string) {
});
}
export = {
export default {
getAutocomplete
};

View File

@ -17,6 +17,6 @@ function getBackendLog() {
}
}
export = {
export default {
getBackendLog
};

View File

@ -55,6 +55,6 @@ function exportBranch(req: Request, res: Response) {
}
}
export = {
export default {
exportBranch
};

View File

@ -35,6 +35,6 @@ function getFontCss(req: Request, res: Response) {
res.send(style);
}
export = {
export default {
getFontCss
};

View File

@ -111,6 +111,6 @@ function getRecentChanges(req: Request) {
return recentChanges;
}
export = {
export default {
getRecentChanges
};

View File

@ -19,6 +19,6 @@ function addRecentNote(req: Request) {
}
}
export = {
export default {
addRecentNote
};

View File

@ -76,6 +76,6 @@ function getRelationMap(req: Request) {
return resp;
}
export = {
export default {
getRelationMap
};

View File

@ -13,6 +13,6 @@ async function getSimilarNotes(req: Request) {
return await similarityService.findSimilarNotes(noteId);
}
export = {
export default {
getSimilarNotes
};

View File

@ -71,6 +71,6 @@ function register(app: express.Application) {
app.use(`/${assetPath}/node_modules/panzoom/dist/`, persistentCacheStatic(path.join(srcRoot, '..', 'node_modules/panzoom/dist/')));
}
export = {
export default {
register
};

View File

@ -84,6 +84,6 @@ function register(router: Router) {
});
}
export = {
export default {
register
};

View File

@ -39,6 +39,6 @@ function register(app: Application) {
});
}
export = {
export default {
register
};

View File

@ -64,6 +64,6 @@ function getAppCssNoteIds() {
return attributeService.getNotesWithLabel('appCss').map(note => note.noteId);
}
export = {
export default {
index
};

View File

@ -517,6 +517,6 @@ function createUploadMiddleware() {
return multer(multerOptions).single('upload');
}
export = {
export default {
register
};

View File

@ -38,6 +38,6 @@ function setupPage(req: Request, res: Response) {
});
}
export = {
export default {
setupPage
};

View File

@ -68,6 +68,6 @@ function getExePath() {
return path.resolve(resourceDir.ELECTRON_APP_ROOT_DIR, 'trilium');
}
export = {
export default {
installLocalAppIcon
};

View File

@ -47,6 +47,6 @@ function formatValue(val: string) {
}
}
export = {
export default {
formatAttrForSearch
};

View File

@ -172,6 +172,6 @@ function executeActions(note: BNote, searchResultNoteIds: string[] | Set<string>
}
}
export = {
export default {
executeActions
};

View File

@ -2,6 +2,6 @@ function isDev() {
return !!(process.env.TRILIUM_ENV && process.env.TRILIUM_ENV === 'dev');
}
export = {
export default {
isDev
};

View File

@ -14,6 +14,6 @@ function toMarkdown(content: string) {
return instance.turndown(content);
}
export = {
export default {
toMarkdown
};

View File

@ -98,6 +98,6 @@ function escapeXmlAttribute(text: string) {
.replace(/'/g, '&apos;');
}
export = {
export default {
exportToOpml
};

View File

@ -125,6 +125,6 @@ function inlineAttachments(content: string) {
return content;
}
export = {
export default {
exportSingleNote
};

View File

@ -249,6 +249,6 @@ eventService.subscribe(eventService.ENTITY_DELETED, ({ entityName, entity }) =>
}
});
export = {
export default {
runAttachedRelations
};

View File

@ -12,6 +12,6 @@ function renderToHtml(content: string, title: string) {
return htmlSanitizer.sanitize(h1Handled);
}
export = {
export default {
renderToHtml
};

View File

@ -108,6 +108,6 @@ function toHtml(text: string) {
return `<p>${text.replace(/(?:\r\n|\r|\n)/g, '</p><p>')}</p>`;
}
export = {
export default {
importOpml
};

View File

@ -11,6 +11,6 @@ function handleH1(content: string, title: string) {
return content;
}
export = {
export default {
handleH1
};

View File

@ -656,6 +656,6 @@ function resolveNoteType(type: string | undefined): NoteType {
}
}
export = {
export default {
importZip
};

View File

@ -20,6 +20,6 @@ function scheduleExecution(name: string, milliseconds: number, cb: () => void) {
}, milliseconds);
}
export = {
export default {
scheduleExecution
};

View File

@ -37,6 +37,6 @@ function parse(value: string): DefinitionObject {
return defObj;
}
export = {
export default {
parse
};

View File

@ -44,6 +44,6 @@ function protectRevisions(note: BNote) {
}
}
export = {
export default {
protectRevisions
};

View File

@ -13,6 +13,6 @@ function sanitizeAttributeName(origName: string) {
}
export = {
export default {
sanitizeAttributeName
};

View File

@ -17,6 +17,6 @@ async function doExclusively<T>(func: () => T) {
}
}
export = {
export default {
doExclusively
};

View File

@ -185,6 +185,6 @@ function logUpdateContext(updateContext: UpdateContext) {
log.info(message.substr(1, message.length - 2));
}
export = {
export default {
updateEntities
};

View File

@ -106,6 +106,6 @@ function createTray() {
registerVisibilityListener();
}
export = {
export default {
createTray
}

View File

@ -170,6 +170,6 @@ function renderFile(note: SNote, result: Result) {
}
}
export = {
export default {
getContent
};

View File

@ -383,6 +383,6 @@ function register(router: Router) {
});
}
export = {
export default {
register
}

View File

@ -1,3 +1,3 @@
export = {
export default {
SHARE_ROOT_NOTE_ID: '_share'
}