mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
server-esm: Fix import to session-file-store
This commit is contained in:
parent
f4d19e2bc1
commit
c5561530ec
21
package-lock.json
generated
21
package-lock.json
generated
@ -110,6 +110,7 @@
|
|||||||
"@types/sax": "^1.2.7",
|
"@types/sax": "^1.2.7",
|
||||||
"@types/semver": "^7.5.8",
|
"@types/semver": "^7.5.8",
|
||||||
"@types/serve-favicon": "^2.5.7",
|
"@types/serve-favicon": "^2.5.7",
|
||||||
|
"@types/session-file-store": "^1.2.5",
|
||||||
"@types/stream-throttle": "^0.1.4",
|
"@types/stream-throttle": "^0.1.4",
|
||||||
"@types/tmp": "^0.2.6",
|
"@types/tmp": "^0.2.6",
|
||||||
"@types/turndown": "^5.0.4",
|
"@types/turndown": "^5.0.4",
|
||||||
@ -1708,6 +1709,16 @@
|
|||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/session-file-store": {
|
||||||
|
"version": "1.2.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/session-file-store/-/session-file-store-1.2.5.tgz",
|
||||||
|
"integrity": "sha512-xjIyh40IznXLrvbAY/nmxu5cMcPcE3ZoDrSDvd02m6p8UjUgOtZAGI7Os5DDd6THuxClLWNhFo/awy1tYp64Bg==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@types/express": "*",
|
||||||
|
"@types/express-session": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@types/stream-throttle": {
|
"node_modules/@types/stream-throttle": {
|
||||||
"version": "0.1.4",
|
"version": "0.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/@types/stream-throttle/-/stream-throttle-0.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/@types/stream-throttle/-/stream-throttle-0.1.4.tgz",
|
||||||
@ -14734,6 +14745,16 @@
|
|||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@types/session-file-store": {
|
||||||
|
"version": "1.2.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/session-file-store/-/session-file-store-1.2.5.tgz",
|
||||||
|
"integrity": "sha512-xjIyh40IznXLrvbAY/nmxu5cMcPcE3ZoDrSDvd02m6p8UjUgOtZAGI7Os5DDd6THuxClLWNhFo/awy1tYp64Bg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/express": "*",
|
||||||
|
"@types/express-session": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@types/stream-throttle": {
|
"@types/stream-throttle": {
|
||||||
"version": "0.1.4",
|
"version": "0.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/@types/stream-throttle/-/stream-throttle-0.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/@types/stream-throttle/-/stream-throttle-0.1.4.tgz",
|
||||||
|
@ -132,6 +132,7 @@
|
|||||||
"@types/sax": "^1.2.7",
|
"@types/sax": "^1.2.7",
|
||||||
"@types/semver": "^7.5.8",
|
"@types/semver": "^7.5.8",
|
||||||
"@types/serve-favicon": "^2.5.7",
|
"@types/serve-favicon": "^2.5.7",
|
||||||
|
"@types/session-file-store": "^1.2.5",
|
||||||
"@types/stream-throttle": "^0.1.4",
|
"@types/stream-throttle": "^0.1.4",
|
||||||
"@types/tmp": "^0.2.6",
|
"@types/tmp": "^0.2.6",
|
||||||
"@types/turndown": "^5.0.4",
|
"@types/turndown": "^5.0.4",
|
||||||
|
@ -8,6 +8,7 @@ import TaskContext from "../../services/task_context.js";
|
|||||||
import cls from "../../services/cls.js";
|
import cls from "../../services/cls.js";
|
||||||
import log from "../../services/log.js";
|
import log from "../../services/log.js";
|
||||||
import { BranchRow } from './rows';
|
import { BranchRow } from './rows';
|
||||||
|
import handlers from "../../services/handlers.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple
|
* 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> {
|
|||||||
|
|
||||||
if (parentBranches.length === 1 && parentBranches[0] === this) {
|
if (parentBranches.length === 1 && parentBranches[0] === this) {
|
||||||
// needs to be run before branches and attributes are deleted and thus attached relations disappear
|
// needs to be run before branches and attributes are deleted and thus attached relations disappear
|
||||||
const handlers = require('../../services/handlers');
|
|
||||||
handlers.runAttachedRelations(note, 'runOnNoteDeletion', note);
|
handlers.runAttachedRelations(note, 'runOnNoteDeletion', note);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import session from "express-session";
|
import session from "express-session";
|
||||||
|
import sessionFileStore from "session-file-store";
|
||||||
import sessionSecret from "../services/session_secret.js";
|
import sessionSecret from "../services/session_secret.js";
|
||||||
import dataDir from "../services/data_dir.js";
|
import dataDir from "../services/data_dir.js";
|
||||||
const FileStore = require('session-file-store')(session);
|
const FileStore = sessionFileStore(session);
|
||||||
|
|
||||||
const sessionParser = session({
|
const sessionParser = session({
|
||||||
secret: sessionSecret,
|
secret: sessionSecret,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user