mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
server-esm: Change export object to export default object
This commit is contained in:
parent
2750df04a3
commit
55eecb0f61
@ -32,6 +32,6 @@ function getEntityFromEntityName(entityName: keyof typeof ENTITY_NAME_TO_ENTITY)
|
||||
return ENTITY_NAME_TO_ENTITY[entityName];
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
getEntityFromEntityName
|
||||
};
|
||||
|
@ -461,6 +461,6 @@ function setImmediatePromise() {
|
||||
});
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
findSimilarNotes
|
||||
};
|
||||
|
@ -8,6 +8,6 @@ function register(router: Router) {
|
||||
});
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
register
|
||||
};
|
||||
|
@ -104,6 +104,6 @@ function register(router: Router) {
|
||||
});
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
register
|
||||
};
|
||||
|
@ -81,6 +81,6 @@ function register(router: Router) {
|
||||
});
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
register
|
||||
};
|
||||
|
@ -39,6 +39,6 @@ function register(router: Router, loginMiddleware: RequestHandler[]) {
|
||||
});
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
register
|
||||
}
|
||||
|
@ -11,6 +11,6 @@ function register(router: Router) {
|
||||
});
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
register
|
||||
};
|
||||
|
@ -84,6 +84,6 @@ function register(router: Router) {
|
||||
});
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
register
|
||||
};
|
||||
|
@ -267,6 +267,6 @@ function parseInteger(obj: any, name: string) {
|
||||
return integer;
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
register
|
||||
};
|
||||
|
@ -17,6 +17,6 @@ function register(router: Router) {
|
||||
});
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
register
|
||||
};
|
||||
|
@ -73,6 +73,6 @@ function register(router: Router) {
|
||||
});
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
register
|
||||
};
|
||||
|
@ -6,6 +6,6 @@ function getAppInfo() {
|
||||
return appInfo;
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
getAppInfo
|
||||
};
|
||||
|
@ -75,6 +75,6 @@ function getRecentNotes(activeNoteId: string) {
|
||||
});
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
getAutocomplete
|
||||
};
|
||||
|
@ -17,6 +17,6 @@ function getBackendLog() {
|
||||
}
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
getBackendLog
|
||||
};
|
||||
|
@ -55,6 +55,6 @@ function exportBranch(req: Request, res: Response) {
|
||||
}
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
exportBranch
|
||||
};
|
||||
|
@ -35,6 +35,6 @@ function getFontCss(req: Request, res: Response) {
|
||||
res.send(style);
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
getFontCss
|
||||
};
|
||||
|
@ -111,6 +111,6 @@ function getRecentChanges(req: Request) {
|
||||
return recentChanges;
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
getRecentChanges
|
||||
};
|
||||
|
@ -19,6 +19,6 @@ function addRecentNote(req: Request) {
|
||||
}
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
addRecentNote
|
||||
};
|
||||
|
@ -76,6 +76,6 @@ function getRelationMap(req: Request) {
|
||||
return resp;
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
getRelationMap
|
||||
};
|
||||
|
@ -13,6 +13,6 @@ async function getSimilarNotes(req: Request) {
|
||||
return await similarityService.findSimilarNotes(noteId);
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
getSimilarNotes
|
||||
};
|
||||
|
@ -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
|
||||
};
|
||||
|
@ -84,6 +84,6 @@ function register(router: Router) {
|
||||
});
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
register
|
||||
};
|
||||
|
@ -39,6 +39,6 @@ function register(app: Application) {
|
||||
});
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
register
|
||||
};
|
||||
|
@ -64,6 +64,6 @@ function getAppCssNoteIds() {
|
||||
return attributeService.getNotesWithLabel('appCss').map(note => note.noteId);
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
index
|
||||
};
|
||||
|
@ -517,6 +517,6 @@ function createUploadMiddleware() {
|
||||
return multer(multerOptions).single('upload');
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
register
|
||||
};
|
||||
|
@ -38,6 +38,6 @@ function setupPage(req: Request, res: Response) {
|
||||
});
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
setupPage
|
||||
};
|
||||
|
@ -68,6 +68,6 @@ function getExePath() {
|
||||
return path.resolve(resourceDir.ELECTRON_APP_ROOT_DIR, 'trilium');
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
installLocalAppIcon
|
||||
};
|
||||
|
@ -47,6 +47,6 @@ function formatValue(val: string) {
|
||||
}
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
formatAttrForSearch
|
||||
};
|
||||
|
@ -172,6 +172,6 @@ function executeActions(note: BNote, searchResultNoteIds: string[] | Set<string>
|
||||
}
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
executeActions
|
||||
};
|
||||
|
@ -2,6 +2,6 @@ function isDev() {
|
||||
return !!(process.env.TRILIUM_ENV && process.env.TRILIUM_ENV === 'dev');
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
isDev
|
||||
};
|
@ -14,6 +14,6 @@ function toMarkdown(content: string) {
|
||||
return instance.turndown(content);
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
toMarkdown
|
||||
};
|
||||
|
@ -98,6 +98,6 @@ function escapeXmlAttribute(text: string) {
|
||||
.replace(/'/g, ''');
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
exportToOpml
|
||||
};
|
||||
|
@ -125,6 +125,6 @@ function inlineAttachments(content: string) {
|
||||
return content;
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
exportSingleNote
|
||||
};
|
||||
|
@ -249,6 +249,6 @@ eventService.subscribe(eventService.ENTITY_DELETED, ({ entityName, entity }) =>
|
||||
}
|
||||
});
|
||||
|
||||
export = {
|
||||
export default {
|
||||
runAttachedRelations
|
||||
};
|
||||
|
@ -12,6 +12,6 @@ function renderToHtml(content: string, title: string) {
|
||||
return htmlSanitizer.sanitize(h1Handled);
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
renderToHtml
|
||||
};
|
||||
|
@ -108,6 +108,6 @@ function toHtml(text: string) {
|
||||
return `<p>${text.replace(/(?:\r\n|\r|\n)/g, '</p><p>')}</p>`;
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
importOpml
|
||||
};
|
||||
|
@ -11,6 +11,6 @@ function handleH1(content: string, title: string) {
|
||||
return content;
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
handleH1
|
||||
};
|
||||
|
@ -656,6 +656,6 @@ function resolveNoteType(type: string | undefined): NoteType {
|
||||
}
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
importZip
|
||||
};
|
||||
|
@ -20,6 +20,6 @@ function scheduleExecution(name: string, milliseconds: number, cb: () => void) {
|
||||
}, milliseconds);
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
scheduleExecution
|
||||
};
|
||||
|
@ -37,6 +37,6 @@ function parse(value: string): DefinitionObject {
|
||||
return defObj;
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
parse
|
||||
};
|
||||
|
@ -44,6 +44,6 @@ function protectRevisions(note: BNote) {
|
||||
}
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
protectRevisions
|
||||
};
|
||||
|
@ -13,6 +13,6 @@ function sanitizeAttributeName(origName: string) {
|
||||
}
|
||||
|
||||
|
||||
export = {
|
||||
export default {
|
||||
sanitizeAttributeName
|
||||
};
|
||||
|
@ -17,6 +17,6 @@ async function doExclusively<T>(func: () => T) {
|
||||
}
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
doExclusively
|
||||
};
|
||||
|
@ -185,6 +185,6 @@ function logUpdateContext(updateContext: UpdateContext) {
|
||||
log.info(message.substr(1, message.length - 2));
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
updateEntities
|
||||
};
|
||||
|
@ -106,6 +106,6 @@ function createTray() {
|
||||
registerVisibilityListener();
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
createTray
|
||||
}
|
||||
|
@ -170,6 +170,6 @@ function renderFile(note: SNote, result: Result) {
|
||||
}
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
getContent
|
||||
};
|
||||
|
@ -383,6 +383,6 @@ function register(router: Router) {
|
||||
});
|
||||
}
|
||||
|
||||
export = {
|
||||
export default {
|
||||
register
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
export = {
|
||||
export default {
|
||||
SHARE_ROOT_NOTE_ID: '_share'
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user