mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 04:59:04 +01:00
Merge branch 'develop' into feature/grafana-dashboard
This commit is contained in:
commit
70fb610e8d
4
.gitignore
vendored
4
.gitignore
vendored
@ -43,4 +43,6 @@ apps/*/out
|
|||||||
upload
|
upload
|
||||||
|
|
||||||
.rollup.cache
|
.rollup.cache
|
||||||
*.tsbuildinfo
|
*.tsbuildinfo
|
||||||
|
|
||||||
|
/result
|
||||||
@ -41,7 +41,7 @@
|
|||||||
"@types/node": "22.15.29",
|
"@types/node": "22.15.29",
|
||||||
"@types/yargs": "17.0.33",
|
"@types/yargs": "17.0.33",
|
||||||
"@vitest/coverage-v8": "3.1.4",
|
"@vitest/coverage-v8": "3.1.4",
|
||||||
"eslint": "9.27.0",
|
"eslint": "9.28.0",
|
||||||
"eslint-plugin-simple-import-sort": "12.1.1",
|
"eslint-plugin-simple-import-sort": "12.1.1",
|
||||||
"esm": "3.2.25",
|
"esm": "3.2.25",
|
||||||
"jsdoc": "4.0.4",
|
"jsdoc": "4.0.4",
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
"url": "https://github.com/TriliumNext/Notes"
|
"url": "https://github.com/TriliumNext/Notes"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint/js": "9.27.0",
|
"@eslint/js": "9.28.0",
|
||||||
"@excalidraw/excalidraw": "0.18.0",
|
"@excalidraw/excalidraw": "0.18.0",
|
||||||
"@fullcalendar/core": "6.1.17",
|
"@fullcalendar/core": "6.1.17",
|
||||||
"@fullcalendar/daygrid": "6.1.17",
|
"@fullcalendar/daygrid": "6.1.17",
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/better-sqlite3": "^7.6.11",
|
"@types/better-sqlite3": "^7.6.11",
|
||||||
"@types/mime-types": "^2.1.4",
|
"@types/mime-types": "^3.0.0",
|
||||||
"@types/yargs": "^17.0.33"
|
"@types/yargs": "^17.0.33"
|
||||||
},
|
},
|
||||||
"nx": {
|
"nx": {
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
"@types/ini": "4.1.1",
|
"@types/ini": "4.1.1",
|
||||||
"@types/js-yaml": "4.0.9",
|
"@types/js-yaml": "4.0.9",
|
||||||
"@types/jsdom": "21.1.7",
|
"@types/jsdom": "21.1.7",
|
||||||
"@types/mime-types": "2.1.4",
|
"@types/mime-types": "3.0.0",
|
||||||
"@types/multer": "1.4.12",
|
"@types/multer": "1.4.12",
|
||||||
"@types/safe-compare": "1.1.2",
|
"@types/safe-compare": "1.1.2",
|
||||||
"@types/sanitize-html": "2.16.0",
|
"@types/sanitize-html": "2.16.0",
|
||||||
@ -88,7 +88,7 @@
|
|||||||
"multer": "2.0.0",
|
"multer": "2.0.0",
|
||||||
"normalize-strings": "1.1.1",
|
"normalize-strings": "1.1.1",
|
||||||
"ollama": "0.5.16",
|
"ollama": "0.5.16",
|
||||||
"openai": "4.104.0",
|
"openai": "5.0.1",
|
||||||
"rand-token": "1.0.1",
|
"rand-token": "1.0.1",
|
||||||
"safe-compare": "1.1.4",
|
"safe-compare": "1.1.4",
|
||||||
"sanitize-filename": "1.6.3",
|
"sanitize-filename": "1.6.3",
|
||||||
|
|||||||
61
flake.lock
generated
Normal file
61
flake.lock
generated
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533236,
|
||||||
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1748437600,
|
||||||
|
"narHash": "sha256-hYKMs3ilp09anGO7xzfGs3JqEgUqFMnZ8GMAqI6/k04=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "7282cb574e0607e65224d33be8241eae7cfe0979",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-25.05",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
106
flake.nix
Normal file
106
flake.nix
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
{
|
||||||
|
description = "TriliumNext Notes (experimental flake)";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs =
|
||||||
|
{
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
flake-utils,
|
||||||
|
}:
|
||||||
|
flake-utils.lib.eachDefaultSystem (
|
||||||
|
system:
|
||||||
|
let
|
||||||
|
packageJSON = builtins.fromJSON (builtins.readFile ./package.json);
|
||||||
|
pkgs = import nixpkgs { inherit system; };
|
||||||
|
electron = pkgs.electron_35;
|
||||||
|
inherit (pkgs)
|
||||||
|
copyDesktopItems
|
||||||
|
lib
|
||||||
|
makeBinaryWrapper
|
||||||
|
makeDesktopItem
|
||||||
|
nodejs
|
||||||
|
pnpm
|
||||||
|
stdenv
|
||||||
|
wrapGAppsHook3
|
||||||
|
;
|
||||||
|
desktop = stdenv.mkDerivation (finalAttrs: {
|
||||||
|
pname = "triliumnext-desktop";
|
||||||
|
version = packageJSON.version;
|
||||||
|
src = lib.cleanSource ./.;
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
pnpm.configHook
|
||||||
|
nodejs
|
||||||
|
nodejs.python
|
||||||
|
copyDesktopItems
|
||||||
|
makeBinaryWrapper
|
||||||
|
wrapGAppsHook3
|
||||||
|
];
|
||||||
|
|
||||||
|
dontWrapGApps = true;
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
runHook preBuild
|
||||||
|
|
||||||
|
# Disable NX interaction
|
||||||
|
export NX_TUI=false
|
||||||
|
export NX_DAEMON=false
|
||||||
|
|
||||||
|
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
||||||
|
node_modules/.pnpm/sass-embedded-linux-x64@*/node_modules/sass-embedded-linux-x64/dart-sass/src/dart
|
||||||
|
pnpm nx run desktop:build --outputStyle stream --verbose
|
||||||
|
|
||||||
|
# Rebuild dependencies
|
||||||
|
export npm_config_nodedir=${electron.headers}
|
||||||
|
pnpm nx run desktop:rebuild-deps --outputStyle stream --verbose
|
||||||
|
|
||||||
|
runHook postBuild
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
mkdir -p $out/{bin,share/icons/hicolor/512x512/apps,opt/trilium}
|
||||||
|
cp --archive apps/desktop/dist/* $out/opt/trilium
|
||||||
|
cp apps/client/src/assets/icon.png $out/share/icons/hicolor/512x512/apps/trilium.png
|
||||||
|
makeWrapper ${lib.getExe electron} $out/bin/trilium \
|
||||||
|
"''${gappsWrapperArgs[@]}" \
|
||||||
|
--set-default ELECTRON_IS_DEV 0 \
|
||||||
|
--add-flags $out/opt/trilium/main.cjs
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
desktopItems = [
|
||||||
|
(makeDesktopItem {
|
||||||
|
name = "TriliumNext Notes";
|
||||||
|
exec = finalAttrs.meta.mainProgram;
|
||||||
|
icon = "trilium";
|
||||||
|
comment = finalAttrs.meta.description;
|
||||||
|
desktopName = "TriliumNext Notes";
|
||||||
|
categories = [ "Office" ];
|
||||||
|
startupWMClass = "Trilium Notes Next";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
pnpmDeps = pnpm.fetchDeps {
|
||||||
|
inherit (finalAttrs) pname version src;
|
||||||
|
hash = "sha256-xC0u1h92wtthylOAw+IF9mpFi0c4xajJhUcA9pqzcAw=";
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Free and open-source, cross-platform hierarchical note taking application with focus on building large personal knowledge bases";
|
||||||
|
mainProgram = "trilium";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
in
|
||||||
|
{
|
||||||
|
packages.default = desktop;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -61,6 +61,6 @@
|
|||||||
"@ssddanbrown/codemirror-lang-twig": "1.0.0",
|
"@ssddanbrown/codemirror-lang-twig": "1.0.0",
|
||||||
"codemirror-lang-hcl": "0.1.0",
|
"codemirror-lang-hcl": "0.1.0",
|
||||||
"codemirror-lang-mermaid": "0.5.0",
|
"codemirror-lang-mermaid": "0.5.0",
|
||||||
"eslint-linter-browserify": "9.27.0"
|
"eslint-linter-browserify": "9.28.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
507
pnpm-lock.yaml
generated
507
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user