Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit c556153

Browse files
committed
server-esm: Fix import to session-file-store
1 parent f4d19e2 commit c556153

File tree

4 files changed

+25
-2
lines changed

4 files changed

+25
-2
lines changed

package-lock.json

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132
"@types/sax": "^1.2.7",
133133
"@types/semver": "^7.5.8",
134134
"@types/serve-favicon": "^2.5.7",
135+
"@types/session-file-store": "^1.2.5",
135136
"@types/stream-throttle": "^0.1.4",
136137
"@types/tmp": "^0.2.6",
137138
"@types/turndown": "^5.0.4",

src/becca/entities/bbranch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import TaskContext from "../../services/task_context.js";
88
import cls from "../../services/cls.js";
99
import log from "../../services/log.js";
1010
import { BranchRow } from './rows';
11+
import handlers from "../../services/handlers.js";
1112

1213
/**
1314
* Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple
@@ -157,7 +158,6 @@ class BBranch extends AbstractBeccaEntity<BBranch> {
157158

158159
if (parentBranches.length === 1 && parentBranches[0] === this) {
159160
// needs to be run before branches and attributes are deleted and thus attached relations disappear
160-
const handlers = require('../../services/handlers');
161161
handlers.runAttachedRelations(note, 'runOnNoteDeletion', note);
162162
}
163163
}

src/routes/session_parser.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import session from "express-session";
2+
import sessionFileStore from "session-file-store";
23
import sessionSecret from "../services/session_secret.js";
34
import dataDir from "../services/data_dir.js";
4-
const FileStore = require('session-file-store')(session);
5+
const FileStore = sessionFileStore(session);
56

67
const sessionParser = session({
78
secret: sessionSecret,

0 commit comments

Comments
 (0)