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

Commit 6a7eb9b

Browse files
committed
Merge remote-tracking branch 'origin/develop' into feat/ts-unit-and-integration-tests
; Conflicts: ; package.json ; tsconfig.json
2 parents 1e54a96 + 653fba3 commit 6a7eb9b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+487
-156
lines changed

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@
55
/docs
66
/npm-debug.log
77
node_modules
8+
9+
src/**/*.ts
10+
!src/services/asset_path.ts

.github/workflows/dev.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Dev
2+
on:
3+
push:
4+
jobs:
5+
build_docker:
6+
name: Build Docker image
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- name: Set up node & dependencies
11+
uses: actions/setup-node@v4
12+
with:
13+
node-version: 18
14+
cache: "npm"
15+
- run: npm ci
16+
- name: Run the TypeScript build
17+
run: npx tsc
18+
- name: Create server-package.json
19+
run: cat package.json | grep -v electron > server-package.json
20+
- uses: docker/setup-buildx-action@v3
21+
- uses: docker/build-push-action@v6
22+
with:
23+
context: .
24+
cache-from: type=gha
25+
cache-to: type=gha,mode=max

.github/workflows/main.yml

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
name: Main
2+
on:
3+
push:
4+
branches:
5+
- 'develop'
6+
env:
7+
REGISTRY: ghcr.io
8+
IMAGE_NAME: ${{ github.repository }}
9+
jobs:
10+
build_darwin-x64:
11+
name: Build macOS x86_64
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Set up node & dependencies
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: 18
19+
cache: "npm"
20+
- run: npm ci
21+
- run: ./bin/build-mac-x64.sh
22+
- uses: actions/upload-artifact@v4
23+
with:
24+
name: trilium-mac-x64.zip
25+
path: dist/trilium-mac-x64*.zip
26+
build_darwin-arm64:
27+
name: Build macOS aarch64
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v4
31+
- name: Set up node & dependencies
32+
uses: actions/setup-node@v4
33+
with:
34+
node-version: 18
35+
cache: "npm"
36+
- run: npm ci
37+
- run: ./bin/build-mac-arm64.sh
38+
- uses: actions/upload-artifact@v4
39+
with:
40+
name: trilium-mac-arm64.zip
41+
path: dist/trilium-mac-arm64*.zip
42+
build_linux-x64:
43+
name: Build Linux x86_64
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v4
47+
- name: Set up node & dependencies
48+
uses: actions/setup-node@v4
49+
with:
50+
node-version: 18
51+
cache: "npm"
52+
- run: npm ci
53+
- run: ./bin/build-linux-x64.sh
54+
- uses: actions/upload-artifact@v4
55+
with:
56+
name: trilium-linux-x64.tar.xz
57+
path: dist/trilium-linux-x64-*.tar.xz
58+
- uses: actions/upload-artifact@v4
59+
with:
60+
name: trilium_amd64.deb
61+
path: dist/trilium_*.deb
62+
build_linux_server-x64:
63+
name: Build Linux Server x86_64
64+
runs-on: ubuntu-latest
65+
steps:
66+
- uses: actions/checkout@v4
67+
- name: Set up node & dependencies
68+
uses: actions/setup-node@v4
69+
with:
70+
node-version: 18
71+
cache: "npm"
72+
- run: npm ci
73+
- run: ./bin/build-server.sh
74+
- uses: actions/upload-artifact@v4
75+
with:
76+
name: trilium-linux-x64-server.tar.xz
77+
path: dist/trilium-linux-x64-server-*.tar.xz
78+
build_windows-x64:
79+
name: Build Windows x86_64
80+
runs-on: ubuntu-latest
81+
steps:
82+
- name: Set up Wine
83+
run: |
84+
sudo dpkg --add-architecture i386
85+
wget -qO - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
86+
sudo add-apt-repository ppa:cybermax-dexter/sdl2-backport
87+
sudo apt-add-repository "deb https://dl.winehq.org/wine-builds/ubuntu $(lsb_release -cs) main"
88+
sudo apt install --install-recommends winehq-stable
89+
- uses: actions/checkout@v4
90+
- name: Set up node & dependencies
91+
uses: actions/setup-node@v4
92+
with:
93+
node-version: 18
94+
cache: "npm"
95+
- run: npm ci
96+
- run: ./bin/build-win-x64.sh
97+
- uses: actions/upload-artifact@v4
98+
with:
99+
name: trilium-windows-x64.zip
100+
path: dist/trilium-windows-x64-*.zip
101+
build_docker:
102+
name: Build Docker image
103+
runs-on: ubuntu-latest
104+
permissions:
105+
contents: read
106+
packages: write
107+
attestations: write
108+
id-token: write
109+
steps:
110+
- uses: actions/checkout@v4
111+
- name: Log in to the Container registry
112+
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
113+
with:
114+
registry: ${{ env.REGISTRY }}
115+
username: ${{ github.actor }}
116+
password: ${{ secrets.GITHUB_TOKEN }}
117+
- name: Extract metadata (tags, labels) for Docker
118+
id: meta
119+
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
120+
with:
121+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
122+
- name: Set up node & dependencies
123+
uses: actions/setup-node@v4
124+
with:
125+
node-version: 18
126+
cache: "npm"
127+
- run: npm ci
128+
- name: Run the TypeScript build
129+
run: npx tsc
130+
- name: Create server-package.json
131+
run: cat package.json | grep -v electron > server-package.json
132+
- uses: docker/setup-buildx-action@v3
133+
- uses: docker/build-push-action@v6
134+
id: push
135+
with:
136+
context: .
137+
push: true
138+
tags: ${{ steps.meta.outputs.tags }}
139+
labels: ${{ steps.meta.outputs.labels }}
140+
cache-from: type=gha
141+
cache-to: type=gha,mode=max
142+
- name: Generate artifact attestation
143+
uses: actions/attest-build-provenance@v1
144+
with:
145+
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
146+
subject-digest: ${{ steps.push.outputs.digest }}
147+
push-to-registry: true
File renamed without changes.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.DS_Store
22
node_modules/
33
dist/
4+
build/
45
src/public/app-dist/
56
npm-debug.log
67
yarn-error.log

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"editor.formatOnSave": true,
2+
"editor.formatOnSave": false,
33
"editor.defaultFormatter": "esbenp.prettier-vscode",
44
"files.eol": "\n",
55
"typescript.tsdk": "node_modules/typescript/lib"

Dockerfile

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
# !!! Don't try to build this Dockerfile directly, run it through bin/build-docker.sh script !!!
22
FROM node:18.18.2-alpine
33

4+
# Configure system dependencies
5+
RUN apk add --no-cache --virtual .build-dependencies \
6+
autoconf \
7+
automake \
8+
g++ \
9+
gcc \
10+
libtool \
11+
make \
12+
nasm \
13+
libpng-dev \
14+
python3
15+
416
# Create app directory
517
WORKDIR /usr/src/app
618

@@ -9,25 +21,21 @@ COPY . .
921

1022
COPY server-package.json package.json
1123

24+
# Copy TypeScript build artifacts into the original directory structure.
25+
RUN ls
26+
RUN cp -R build/src/* src/.
27+
RUN rm -r build
28+
1229
# Install app dependencies
1330
RUN set -x \
14-
&& apk add --no-cache --virtual .build-dependencies \
15-
autoconf \
16-
automake \
17-
g++ \
18-
gcc \
19-
libtool \
20-
make \
21-
nasm \
22-
libpng-dev \
23-
python3 \
2431
&& npm install \
2532
&& apk del .build-dependencies \
2633
&& npm run webpack \
2734
&& npm prune --omit=dev \
2835
&& cp src/public/app/share.js src/public/app-dist/. \
2936
&& cp -r src/public/app/doc_notes src/public/app-dist/. \
30-
&& rm -rf src/public/app
37+
&& rm -rf src/public/app \
38+
&& rm src/services/asset_path.ts
3139

3240
# Some setup tools need to be kept
3341
RUN apk add --no-cache su-exec shadow

README.md

Lines changed: 48 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,95 @@
1-
# Trilium Notes
1+
# TriliumNext Notes
22

3-
## Trilium is in maintenance mode - see details in https://github.com/zadam/trilium/issues/4620
3+
[English](https://github.com/TriliumNext/Notes/blob/master/README.md) | [Chinese](https://github.com/TriliumNext/Notes/blob/master/README-ZH_CN.md) | [Russian](https://github.com/TriliumNext/Notes/blob/master/README.ru.md) | [Japanese](https://github.com/TriliumNext/Notes/blob/master/README.ja.md) | [Italian](https://github.com/TriliumNext/Notes/blob/master/README.it.md)
44

5-
Preliminary disccusions on the successor organization are taking place in [Trilium Next discussions](https://github.com/orgs/TriliumNext/discussions).
5+
TriliumNext Notes is a hierarchical note taking application with focus on building large personal knowledge bases.
66

7-
[English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md) | [Japanese](https://github.com/zadam/trilium/blob/master/README.ja.md) | [Italian](https://github.com/zadam/trilium/blob/master/README.it.md)
7+
See [screenshots](https://triliumnext.github.io/Docs/Wiki/Screenshot%20tour) for quick overview:
88

9+
<a href="https://triliumnext.github.io/Docs/Wiki/Screenshot%20tour"><img src="https://github.com/TriliumNext/Docs/blob/main/Wiki/images/screenshot.png?raw=true" alt="Trilium Screenshot" width="1000"></a>
910

10-
Trilium Notes is a hierarchical note taking application with focus on building large personal knowledge bases.
11+
## ⚠️ Why TriliumNext?
1112

12-
## Discuss with us
13+
[The original Trilium project is in maintenance mode](https://github.com/zadam/trilium/issues/4620)
1314

14-
Feel free to join our discussions.
15+
## 🗭 Discuss with us
1516

16-
- [XMPP](https://joinjabber.org/): [xmpp:[email protected]?join](xmpp:[email protected]?join) ([web link](https://anonymous.cheogram.com/[email protected]))
17-
- [Matrix](https://matrix.org/try-matrix/): #trilium:matrix.org ([web link](https://app.element.io/#/room/#trilium:matrix.org))
17+
Feel free to join our official discussions and community. We are focused on the development on Trilium, and would love to hear what features, suggestions, or issues you may have!
1818

19-
The two rooms are mirrored, so you can use the protocol of your choice, from the client you prefer, on pretty much any platform under the sun!
19+
- [Matrix](https://matrix.to/#/#triliumnext:matrix.org) (For synchronous discussions)
20+
- [Github Discussions](https://github.com/TriliumNext/Notes/discussions) (For Asynchronous discussions)
21+
- [Wiki](https://github.com/zadam/trilium/wiki) (For common how-to questions and user guides)
2022

21-
See [screenshots](https://github.com/zadam/trilium/wiki/Screenshot-tour) for quick overview:
23+
The two rooms linked above are mirrored, so you can use either XMPP or Matrix, from any client you prefer, on pretty much any platform under the sun!
2224

23-
<a href="https://github.com/zadam/trilium/wiki/Screenshot-tour"><img src="https://raw.githubusercontent.com/wiki/zadam/trilium/images/screenshot.png" alt="Trilium Screenshot" width="1000"></a>
25+
### Unofficial Communities
2426

25-
Ukraine is currently defending itself from Russian aggression, please consider [donating to Ukrainian Army or humanitarian charities](https://standforukraine.com/).
26-
27-
<p float="left">
28-
<img src="https://upload.wikimedia.org/wikipedia/commons/4/49/Flag_of_Ukraine.svg" alt="drawing" width="400"/>
29-
<img src="https://signmyrocket.com//uploads/2b2a523cd0c0e76cdbba95a89a9636b2_1676971281.jpg" alt="Trilium Notes supports Ukraine!" width="570"/>
30-
</p>
27+
[Trilium Rocks](https://discord.gg/aqdX9mXX4r)
3128

3229
## 🎁 Features
3330

34-
* Notes can be arranged into arbitrarily deep tree. Single note can be placed into multiple places in the tree (see [cloning](https://github.com/zadam/trilium/wiki/Cloning-notes))
35-
* Rich WYSIWYG note editing including e.g. tables, images and [math](https://github.com/zadam/trilium/wiki/Text-notes#math-support) with markdown [autoformat](https://github.com/zadam/trilium/wiki/Text-notes#autoformat)
36-
* Support for editing [notes with source code](https://github.com/zadam/trilium/wiki/Code-notes), including syntax highlighting
37-
* Fast and easy [navigation between notes](https://github.com/zadam/trilium/wiki/Note-navigation), full text search and [note hoisting](https://github.com/zadam/trilium/wiki/Note-hoisting)
38-
* Seamless [note versioning](https://github.com/zadam/trilium/wiki/Note-revisions)
39-
* Note [attributes](https://github.com/zadam/trilium/wiki/Attributes) can be used for note organization, querying and advanced [scripting](https://github.com/zadam/trilium/wiki/Scripts)
40-
* [Synchronization](https://github.com/zadam/trilium/wiki/Synchronization) with self-hosted sync server
31+
* Notes can be arranged into arbitrarily deep tree. Single note can be placed into multiple places in the tree (see [cloning](https://triliumnext.github.io/Docs/Wiki/Cloning-notes))
32+
* Rich WYSIWYG note editing including e.g. tables, images and [math](https://triliumnext.github.io/Docs/Wiki/Text-notes) with markdown [autoformat](https://triliumnext.github.io/Docs/Wiki/Text-notes#autoformat)
33+
* Support for editing [notes with source code](https://triliumnext.github.io/Docs/Wiki/Code-notes), including syntax highlighting
34+
* Fast and easy [navigation between notes](https://triliumnext.github.io/Docs/Wiki/Note-navigation), full text search and [note hoisting](https://triliumnext.github.io/Docs/Wiki/Note-hoisting)
35+
* Seamless [note versioning](https://triliumnext.github.io/Docs/Wiki/Note-revisions)
36+
* Note [attributes](https://triliumnext.github.io/Docs/Wiki/Attributes) can be used for note organization, querying and advanced [scripting](https://triliumnext.github.io/Docs/Wiki/Scripts)
37+
* [Synchronization](https://triliumnext.github.io/Docs/Wiki/Synchronization) with self-hosted sync server
4138
* there's a [3rd party service for hosting synchronisation server](https://trilium.cc/paid-hosting)
42-
* [Sharing](https://github.com/zadam/trilium/wiki/Sharing) (publishing) notes to public internet
43-
* Strong [note encryption](https://github.com/zadam/trilium/wiki/Protected-notes) with per-note granularity
39+
* [Sharing](https://triliumnext.github.io/Docs/Wiki/Sharing) (publishing) notes to public internet
40+
* Strong [note encryption](https://triliumnext.github.io/Docs/Wiki/Protected-notes) with per-note granularity
4441
* Sketching diagrams with built-in Excalidraw (note type "canvas")
45-
* [Relation maps](https://github.com/zadam/trilium/wiki/Relation-map) and [link maps](https://github.com/zadam/trilium/wiki/Link-map) for visualizing notes and their relations
46-
* [Scripting](https://github.com/zadam/trilium/wiki/Scripts) - see [Advanced showcases](https://github.com/zadam/trilium/wiki/Advanced-showcases)
47-
* [REST API](https://github.com/zadam/trilium/wiki/ETAPI) for automation
42+
* [Relation maps](https://triliumnext.github.io/Docs/Wiki/Relation-map) and [link maps](https://triliumnext.github.io/Docs/Wiki/Link-map) for visualizing notes and their relations
43+
* [Scripting](https://triliumnext.github.io/Docs/Wiki/Scripts) - see [Advanced showcases](https://triliumnext.github.io/Docs/Wiki/Advanced-showcases)
44+
* [REST API](https://triliumnext.github.io/Docs/Wiki/ETAPI) for automation
4845
* Scales well in both usability and performance upwards of 100 000 notes
49-
* Touch optimized [mobile frontend](https://github.com/zadam/trilium/wiki/Mobile-frontend) for smartphones and tablets
50-
* [Night theme](https://github.com/zadam/trilium/wiki/Themes)
51-
* [Evernote](https://github.com/zadam/trilium/wiki/Evernote-import) and [Markdown import & export](https://github.com/zadam/trilium/wiki/Markdown)
52-
* [Web Clipper](https://github.com/zadam/trilium/wiki/Web-clipper) for easy saving of web content
46+
* Touch optimized [mobile frontend](https://triliumnext.github.io/Docs/Wiki/Mobile-frontend) for smartphones and tablets
47+
* [Night theme](https://triliumnext.github.io/Docs/Wiki/Themes)
48+
* [Evernote](https://triliumnext.github.io/Docs/Wiki/Evernote-import) and [Markdown import & export](https://triliumnext.github.io/Docs/Wiki/Markdown)
49+
* [Web Clipper](https://triliumnext.github.io/Docs/Wiki/Web-clipper) for easy saving of web content
50+
51+
✨ Check out the following third-party resources for more TriliumNext related goodies:
5352

54-
Check out [awesome-trilium](https://github.com/Nriver/awesome-trilium) for 3rd party themes, scripts, plugins and more.
53+
- [awesome-trilium](https://github.com/Nriver/awesome-trilium) for 3rd party themes, scripts, plugins and more.
54+
- [TriliumRocks!](https://trilium.rocks/) for tutorials, guides, and much more.
5555

5656
## 🏗 Builds
5757

58-
Trilium is provided as either desktop application (Linux and Windows) or web application hosted on your server (Linux). Mac OS desktop build is available, but it is [unsupported](https://github.com/zadam/trilium/wiki/FAQ#mac-os-support).
58+
Trilium is provided as either desktop application (Linux and Windows) or web application hosted on your server (Linux). Mac OS desktop build is available, but it is [unsupported](https://triliumnext.github.io/Docs/Wiki/FAQ#mac-os-support).
5959

60-
* If you want to use Trilium on the desktop, download binary release for your platform from [latest release](https://github.com/zadam/trilium/releases/latest), unzip the package and run ```trilium``` executable.
61-
* If you want to install Trilium on server, follow [this page](https://github.com/zadam/trilium/wiki/Server-installation).
62-
* Currently only recent Chrome and Firefox are supported (tested) browsers.
60+
* If you want to use TriliumNext on the desktop, download binary release for your platform from [latest release](https://github.com/TriliumNext/Notes/releases/latest), unzip the package and run ```trilium``` executable.
61+
* If you want to install TriliumNext on your own server, follow [this page](https://triliumnext.github.io/Docs/Wiki/Server-installation).
62+
* Currently only recent versions of Chrome and Firefox are supported (tested) browsers.
6363

64-
Trilium is also provided as a Flatpak:
64+
TriliumNext will also provided as a Flatpak:
6565

66-
[<img width="240" src="https://flathub.org/assets/badges/flathub-badge-en.png">](https://flathub.org/apps/details/com.github.zadam.trilium)
66+
<img width="240" src="https://flathub.org/assets/badges/flathub-badge-en.png">
6767

6868
## 📝 Documentation
6969

70-
[See wiki for complete list of documentation pages.](https://github.com/zadam/trilium/wiki/)
70+
[See wiki for complete list of documentation pages.](https://triliumnext.github.io/Docs)
7171

72-
You can also read [Patterns of personal knowledge base](https://github.com/zadam/trilium/wiki/Patterns-of-personal-knowledge-base) to get some inspiration on how you might use Trilium.
72+
You can also read [Patterns of personal knowledge base](https://triliumnext.github.io/Docs/Wiki/Patterns-of-personal-knowledge-base) to get some inspiration on how you might use Trilium.
7373

7474
## 💻 Contribute
7575

76-
Use a browser based dev environment
77-
78-
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/zadam/trilium)
79-
80-
Or clone locally and run
76+
Clone locally and run
8177
```
8278
npm install
8379
npm run start-server
8480
```
8581

86-
## 📢 Shoutouts
82+
## 👏 Shoutouts
8783

8884
* [CKEditor 5](https://github.com/ckeditor/ckeditor5) - best WYSIWYG editor on the market, very interactive and listening team
8985
* [FancyTree](https://github.com/mar10/fancytree) - very feature rich tree library without real competition. Trilium Notes would not be the same without it.
9086
* [CodeMirror](https://github.com/codemirror/CodeMirror) - code editor with support for huge amount of languages
91-
* [jsPlumb](https://github.com/jsplumb/jsplumb) - visual connectivity library without competition. Used in [relation maps](https://github.com/zadam/trilium/wiki/Relation-map) and [link maps](https://github.com/zadam/trilium/wiki/Link-map)
87+
* [jsPlumb](https://github.com/jsplumb/jsplumb) - visual connectivity library without competition. Used in [relation maps](https://triliumnext.github.io/Docs/Wiki/Relation-map) and [link maps](https://triliumnext.github.io/Docs/Wiki/Link-map)
9288

9389
## 🤝 Support
9490

95-
You can support Trilium using GitHub Sponsors, [PayPal](https://paypal.me/za4am) or Bitcoin (bitcoin:bc1qv3svjn40v89mnkre5vyvs2xw6y8phaltl385d2).
91+
You can support the original Trilium developer using GitHub Sponsors, [PayPal](https://paypal.me/za4am) or Bitcoin (bitcoin:bc1qv3svjn40v89mnkre5vyvs2xw6y8phaltl385d2).
92+
Support for the TriliumNext organization will be possible in the near future.
9693

9794
## 🔑 License
9895

Binary file not shown.

0 commit comments

Comments
 (0)