chore(monorepo): integrate everything from old monorepo

This commit is contained in:
Elian Doran 2025-05-03 03:14:23 +03:00
parent 85c8be691d
commit f9db91d5a1
No known key found for this signature in database
20 changed files with 18 additions and 693 deletions

View File

@ -1,13 +0,0 @@
{
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "bundler",
"target": "ES2017",
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true
},
"include": [ "./src/**/*.ts" ],
"files": [
"./src/types.d.ts",
]
}

View File

@ -1,120 +0,0 @@
import { fileURLToPath } from "url";
import path from "path";
import autoprefixer from "autoprefixer";
import assetPath from "./src/asset_path.js";
import miniCssExtractPlugin from "mini-css-extract-plugin";
import type { Configuration } from "webpack";
import CopyPlugin from "copy-webpack-plugin";
const rootDir = path.dirname(fileURLToPath(import.meta.url));
const config: Configuration = {
mode: "production",
entry: {},
output: {
publicPath: `${assetPath}/app-dist/`,
path: path.resolve(rootDir, "build"),
filename: "[name].js"
},
plugins: [
new miniCssExtractPlugin({
// TriliumNextTODO: enable this, once webpack build outputs into the "build" folder, instead of "src/public/app-dist" folder => @pano9000
//filename: "../stylesheets/[name].css"
}),
new CopyPlugin({
patterns: [
{
context: "../../node_modules/@excalidraw/excalidraw/dist/prod/fonts/",
from: "**/*",
to: "excalidraw/fonts/"
}
]
})
],
module: {
rules: [
{
test: /\.ts$/,
use: [
{
loader: "ts-loader",
options: {
configFile: path.join(rootDir, "tsconfig.json")
}
}
],
exclude: /node_modules/
},
{
test: /\.m?js$/,
resolve: {
fullySpecified: false
}
},
{
// bootstrap CSS related configuration
test: /\.(css)$/,
use: [
{
loader: miniCssExtractPlugin.loader
},
{
loader: "css-loader",
options: {
esModule: true
}
},
{
loader: "postcss-loader",
options: {
postcssOptions: {
plugins: [autoprefixer]
}
}
}
]
},
{
// bootstrap CSS related configuration
test: /\.(scss)$/,
use: [
{
loader: miniCssExtractPlugin.loader
},
{
loader: "css-loader"
},
{
loader: "postcss-loader",
options: {
postcssOptions: {
plugins: [autoprefixer]
}
}
},
{
loader: "sass-loader"
}
]
},
{
test: /\.(png)$/i,
type: 'asset/resource'
}
]
},
resolve: {
extensions: [".ts", ".js"],
extensionAlias: {
".js": [".js", ".ts"],
".cjs": [".cjs", ".cts"],
".mjs": [".mjs", ".mts"]
},
alias: {
stylesheets: path.resolve(rootDir, "src/public/stylesheets")
}
},
devtool: "nosources-source-map",
target: "electron-renderer"
};
export default config;

View File

@ -1,22 +0,0 @@
{
"compilerOptions": {
"module": "NodeNext",
"declaration": false,
"sourceMap": true,
"outDir": "./build/src",
"strict": true,
"noImplicitAny": true,
"resolveJsonModule": true,
"lib": ["ES2023"],
"downlevelIteration": true,
"skipLibCheck": true,
"esModuleInterop": true,
"verbatimModuleSyntax": true,
"allowJs": true
},
"include": [ "./src/**/*.ts" ],
"files": [
"../server/src/types.d.ts",
"../server/src/express.d.ts",
]
}

View File

@ -1,28 +0,0 @@
{
"name": "@triliumnext/edit-demo",
"version": "1.0.0",
"description": "Desktop version of Trilium which imports the demo database (presented to new users at start-up) or the user guide and other documentation and saves the modifications for committing.",
"main": "index.js",
"type": "module",
"scripts": {
"docs:edit": "cross-env NODE_OPTIONS=\"--import tsx\" electron ./src/electron-docs-main.ts .",
"docs:edit-nix": "electron-rebuild --version 33.3.1 && cross-env NODE_OPTIONS=\"--import tsx\" nix-shell -p electron_33 --run \"electron ./src/electron-docs-main.ts .\"",
"demo:edit": "cross-env NODE_OPTIONS=\"--import tsx\" TRILIUM_DATA_DIR=./data-demo electron ./src/electron-edit-demo.ts .",
"demo:edit-nix": "electron-rebuild --version 33.3.1 && cross-env NODE_OPTIONS=\"--import tsx\" TRILIUM_DATA_DIR=./data-docs TRILIUM_PORT=37741 TRILIUM_ENV=dev TRILIUM_INTEGRATION_TEST=memory-no-store nix-shell -p electron_33 --run \"electron ./src/electron-edit-demo.ts .\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/TriliumNext/Notes.git"
},
"author": "",
"license": "AGPL-3.0-only",
"bugs": {
"url": "https://github.com/TriliumNext/Notes/issues"
},
"homepage": "https://github.com/TriliumNext/Notes#readme",
"dependencies": {
"@triliumnext/client": "0.0.1",
"@triliumnext/electron": "0.0.1",
"@triliumnext/server": "0.0.1"
}
}

View File

@ -1,18 +0,0 @@
{
"compilerOptions": {
"module": "NodeNext",
"declaration": false,
"sourceMap": true,
"outDir": "./build/src",
"strict": true,
"noImplicitAny": true,
"resolveJsonModule": true,
"lib": ["ES2023"],
"downlevelIteration": true,
"skipLibCheck": true,
"esModuleInterop": true,
"verbatimModuleSyntax": true,
"allowJs": true
},
"include": [ "./src/**/*.ts" ]
}

View File

@ -1,44 +0,0 @@
# ignored Files
.dockerignore
.editorconfig
.git*
.prettier*
electron*
entitlements.plist
nodemon.json
renovate.json
trilium.iml
Dockerfile
Dockerfile.*
npm-debug.log
/src/**/*.spec.ts
# ignored folders
/.cache
/.git
/.github
/.idea
/.vscode
/bin
/build
/dist
/docs
/dump-db
/e2e
/integration-tests
/spec
/test
/test-etapi
/node_modules
# exceptions
!/bin/copy-dist.ts
!/bin/cleanupNodeModules.ts
# temporary exception to make copy-dist inside Docker build not fail
# TriliumNextTODO: make copy-dist *not* requiring to copy these file for builds other than electron-forge
!forge.config.cjs
!/bin/tpl
!/bin/electron-forge/desktop.ejs
!/bin/electron-forge/sign-windows.cjs

View File

@ -1,50 +0,0 @@
# Build stage
# Copy only necessary files for build
COPY . .
# Build and cleanup in a single layer
RUN npm ci && \
npm run build:prepare-dist && \
npm cache clean --force && \
rm -rf build/node_modules && \
mv build/* \
start-docker.sh \
/usr/src/app/ && \
rm -rf \
/usr/src/app/build \
/tmp/node-compile-cache
#TODO: improve node_modules handling in copy-dist/Dockerfile -> remove duplicated work
# currently copy-dist will copy certain node_module folders, but in the Dockerfile we delete them again (to keep image size down),
# as we install necessary dependencies in runtime buildstage anyways
# Runtime stage
FROM node:22.15.0-bullseye-slim
WORKDIR /usr/src/app
# Install only runtime dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gosu && \
rm -rf \
/var/lib/apt/lists/* \
/var/cache/apt/*
COPY --from=builder /usr/src/app ./
RUN sed -i "/electron/d" package.json && \
npm ci --omit=dev && \
node --experimental-strip-types ./bin/cleanupNodeModules.ts . --skip-prune-dev-deps && \
npm cache clean --force && \
rm -rf \
/tmp/node-compile-cache \
/usr/src/app/bin/cleanupNodeModules.ts
# Configure container
EXPOSE 8080
CMD [ "./start-docker.sh" ]
HEALTHCHECK --start-period=10s CMD exec gosu node node docker_healthcheck.js

View File

@ -1,25 +0,0 @@
# Build stage
FROM node:22.15.0-alpine AS builder
WORKDIR /usr/src/app/build
# Copy only necessary files for build
COPY . .
# Build and cleanup in a single layer
RUN npm ci && \
npm run build:prepare-dist && \
npm cache clean --force && \
rm -rf build/node_modules && \
mv build/* \
start-docker.sh \
/usr/src/app/ && \
rm -rf \
/usr/src/app/build \
/tmp/node-compile-cache
#TODO: improve node_modules handling in copy-dist/Dockerfile -> remove duplicated work
# currently copy-dist will copy certain node_module folders, but in the Dockerfile we delete them again (to keep image size down),
# as we install necessary dependencies in runtime buildstage anyways
# Runtime stage

View File

@ -1,42 +0,0 @@
{
"name": "@triliumnext/server",
"version": "0.0.1",
"description": "The server-side component of TriliumNext, which exposes the client via the web, allows for sync and provides a REST API for both internal and external use.",
"homepage": "https://github.com/TriliumNext/Notes#readme",
"bugs": {
"url": "https://github.com/TriliumNext/Notes/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/TriliumNext/Notes.git"
},
"license": "AGPL-3.0-only",
"author": {
"name": "TriliumNext Notes Team",
"email": "contact@eliandoran.me",
"url": "https://github.com/TriliumNext/Notes"
},
"type": "module",
"main": "index.js",
"scripts": {
"build:clean": "rimraf ./dist ./build",
"build:copy-dist": "tsx ./scripts/copy-dist.ts",
"build:prepare-dist": "npm run build:clean && npm run build:ts && npm run build:copy-dist",
"build:ts": "tsc",
"dist:start": "npm run build:prepare-dist && cross-env TRILIUM_DATA_DIR=./data node build/src/main.js",
"start": "cross-env nodemon src/main.ts",
"test": "cross-env TRILIUM_ENV=dev TRILIUM_DATA_DIR=./spec/data vitest",
"coverage": "cross-env TRILIUM_ENV=dev TRILIUM_DATA_DIR=./spec/data TRILIUM_INTEGRATION_TEST=memory vitest --coverage",
},
"dependencies": {
},
"devDependencies": {
"typescript": "5.8.3",
"typescript-eslint": "8.30.1",
"nodemon": "3.1.9",
"cross-env": "7.0.3",
"tsx": "4.19.3",
"vitest": "^3.1.1"
}
}

View File

@ -1,102 +0,0 @@
import fs from "fs-extra";
import path from "path";
import type { Dirent } from "fs-extra";
import { execSync } from "node:child_process";
/**
* Example usage with node >= v22:
* node --experimental-strip-types bin/cleanupNodeModules.ts /path/to/build/folder [--skip-prune-dev-deps]
* Example usage with tsx:
* tsx bin/cleanupNodeModules.ts /path/to/build/folder [--skip-prune-dev-deps]
*/
function main() {
if (process.argv.length > 4 || process.argv.length < 3) {
console.error("Usage: cleanupNodeModules.ts [path-to-build-folder] [--skip-prune-dev-deps]");
process.exit(1);
}
const basePath = process.argv[2];
const pruneDevDeps = process.argv[3] !== "--skip-prune-dev-deps";
if (!fs.existsSync(basePath)) {
console.error(`Supplied path '${basePath}' does not exist. Aborting.`);
process.exit(1);
}
console.log(`Starting pruning of node_modules ${!pruneDevDeps ? '(skipping npm pruning)' : ''} in '${basePath}'...`);
cleanupNodeModules(basePath, pruneDevDeps);
console.log("Successfully pruned node_modules.");
}
function cleanupNodeModules(basePath: string, pruneDevDeps: boolean = true) {
const nodeModulesDirPath = path.join(basePath, "node_modules");
const nodeModulesContent = fs.readdirSync(nodeModulesDirPath, { recursive: true, withFileTypes: true });
//const libDir = fs.readdirSync(path.join(basePath, "./libraries"), { recursive: true, withFileTypes: true });
/**
* Delete unnecessary folders
*/
const filterableDirs = new Set([
"demo",
"demos",
"doc",
"docs",
"example",
"examples",
"test",
"tests"
]);
nodeModulesContent
.filter(el => el.isDirectory() && filterableDirs.has(el.name))
.forEach(dir => removeDirent(dir));
/**
* Delete unnecessary files based on file extension
* TODO filter out useless (README).md files
*/
const filterableFileExt = new Set([
"ts",
"map"
]);
nodeModulesContent
// TriliumNextTODO: check if we can improve this naive file ext matching, without introducing any additional dependency
.filter(el => el.isFile() && filterableFileExt.has(el.name.split(".").at(-1) || ""))
.forEach(dir => removeDirent(dir));
/**
* Delete specific unnecessary folders
* TODO: check if we want removeSync to throw an error, if path does not exist anymore -> currently it will silently fail
*/
const extraFoldersDelete = new Set([
path.join(nodeModulesDirPath, ".bin"),
path.join(nodeModulesDirPath, "@excalidraw", "excalidraw", "dist", "dev"),
path.join(nodeModulesDirPath, "boxicons", "svg"),
path.join(nodeModulesDirPath, "boxicons", "node_modules"),
path.join(nodeModulesDirPath, "boxicons", "src"),
path.join(nodeModulesDirPath, "boxicons", "iconjar"),
path.join(nodeModulesDirPath, "@jimp", "plugin-print", "fonts"),
path.join(nodeModulesDirPath, "jimp", "dist", "browser") // missing "@" in front of jimp is not a typo here
]);
nodeModulesContent
.filter(el => el.isDirectory() && extraFoldersDelete.has(path.join(el.parentPath, el.name)))
.forEach(dir => removeDirent(dir))
}
function removeDirent(el: Dirent) {
const elementToDelete = path.join(el.parentPath, el.name);
fs.removeSync(elementToDelete);
if (process.env.VERBOSE) {
console.log(`Deleted ${elementToDelete}`);
}
}
main()

View File

@ -1,115 +0,0 @@
import fs from "fs-extra";
import path from "path";
const DEST_DIR = "./build";
const VERBOSE = process.env.VERBOSE;
function log(...args: any[]) {
if (VERBOSE) {
console.log(...args);
}
}
import { fileURLToPath } from "url";
import { dirname } from "path";
import { execSync } from "child_process";
const scriptDir = dirname(fileURLToPath(import.meta.url));
const rootDir = path.resolve(scriptDir, "..", "..", "..");
const clientDir = path.join(rootDir, "apps", "client");
const serverDir = path.join(rootDir, "apps", "server");
function copyAssets(baseDir: string, destDir: string, files: string[]) {
for (const file of files) {
const src = path.join(baseDir, file);
const dest = path.join(destDir, file);
log(`${src} -> ${dest}`);
fs.copySync(src, dest);
}
}
/**
* We cannot copy the node_modules directory directly because we are in a monorepo and all the packages are gathered at root level.
* We cannot copy the files manually because we'd have to implement all the npm lookup logic, especially since there are issues with the same library having multiple versions across dependencies.
*
* @param packageJsonPath
*/
function copyNodeModules(packageJsonPath: string) {
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
// Skip monorepo packages
packageJson.dependencies = Object.fromEntries(
Object.entries(packageJson.dependencies).filter(([key]) => {
return (key === "@triliumnext/express-partial-content" || !key.startsWith("@triliumnext"));
}));
// Trigger an npm install to obtain the dependencies.
fs.writeFileSync(path.join(DEST_DIR, "package.json"), JSON.stringify(packageJson));
execSync(`npm install --omit=dev`, {
cwd: DEST_DIR,
stdio: "inherit",
});
}
try {
const clientAssets = [
"./libraries",
`./stylesheets`
];
const serverAssets = [
// copy node_module, to avoid downloading packages a 2nd time during pruning
"./node_modules",
"./assets",
"./translations",
"./db",
"./config-sample.ini",
"./package.json",
"./src/public/icon.png",
"./src/public/manifest.webmanifest",
"./src/public/robots.txt",
"./src/public/fonts",
"./src/public/translations",
`./tpl/`,
"./scripts/cleanupNodeModules.ts",
"./src/views/",
"./src/etapi/etapi.openapi.yaml",
"./src/routes/api/openapi.json",
];
const rootAssets = [
"LICENSE",
"README.md"
];
fs.mkdirpSync(DEST_DIR);
copyNodeModules(path.join(serverDir, "package.json"));
// Copy monorepo assets.
fs.copySync("../../packages/commons/build", path.join(DEST_DIR, "node_modules", "@triliumnext/commons"));
fs.copySync("../../packages/turndown-plugin-gfm", path.join(DEST_DIR, "node_modules", "@triliumnext/turndown-plugin-gfm"));
copyAssets(clientDir, path.join(DEST_DIR, "src", "public"), clientAssets);
copyAssets(serverDir, path.join(DEST_DIR), serverAssets);
copyAssets(rootDir, path.join(DEST_DIR), rootAssets);
/**
* Directories to be copied relative to the project root into <resource_dir>/src/public/app-dist.
*/
const publicDirsToCopy = ["./src/public/app/doc_notes"];
const PUBLIC_DIR = path.join(DEST_DIR, "src", "public", "app-dist");
for (const dir of publicDirsToCopy) {
fs.copySync(dir, path.normalize(path.join(PUBLIC_DIR, path.basename(dir))));
}
fs.copySync(path.join(clientDir, "build"), path.join(DEST_DIR, "src", "public", "app-dist"));
fs.copySync(path.join(rootDir, "packages", "turndown-plugin-gfm", "src"), path.join(DEST_DIR, "src", "public", "app-dist", "turndown-plugin-gfm"));
console.log("Copying complete!")
} catch(err) {
console.error("Error during copy:", err.message)
process.exit(1)
}

View File

@ -1,52 +0,0 @@
UPDATE etapi_tokens SET tokenHash = 'API token hash value';
UPDATE notes SET title = 'title'
WHERE noteId NOT IN ('root', '_hidden', '_share')
AND SUBSTR(noteId, 1, 8) != '_options'
AND SUBSTR(noteId, 1, 3) != '_lb';
UPDATE blobs SET content = 'text' WHERE content IS NOT NULL;
UPDATE revisions SET title = 'title';
UPDATE attributes SET name = 'name', value = 'value' WHERE type = 'label'
AND name NOT IN
('inbox', 'disableVersioning', 'calendarRoot', 'archived', 'excludeFromExport', 'disableInclusion', 'appCss',
'appTheme', 'hidePromotedAttributes', 'readOnly', 'autoReadOnlyDisabled', 'cssClass', 'iconClass',
'keyboardShortcut', 'run', 'runOnInstance', 'runAtHour', 'customRequestHandler', 'customResourceProvider',
'widget', 'noteInfoWidgetDisabled', 'linkMapWidgetDisabled', 'revisionsWidgetDisabled',
'whatLinksHereWidgetDisabled', 'similarNotesWidgetDisabled', 'workspace', 'workspaceIconClass',
'workspaceTabBackgroundColor', 'workspaceCalendarRoot', 'workspaceTemplate', 'searchHome', 'workspaceInbox',
'workspaceSearchHome', 'sqlConsoleHome', 'datePattern', 'weekPattern', 'enableWeekNote', 'monthPattern',
'quarterPattern', 'yearPattern', 'enableQuarterNote', 'pageSize', 'viewType', 'mapRootNoteId',
'bookmarkFolder', 'sorted', 'sortDirection', 'sortFoldersFirst', 'sortNatural', 'sortLocale', 'top',
'fullContentWidth', 'shareHiddenFromTree', 'shareExternalLink', 'shareOmitDefaultCss', 'shareRoot', 'shareDescription',
'shareRaw', 'shareDisallowRobotIndexing', 'shareIndex', 'displayRelations', 'hideRelations', 'titleTemplate',
'template', 'toc', 'color', 'keepCurrentHoisting', 'executeButton', 'executeDescription', 'newNotesOnTop',
'clipperInbox', 'internalLink', 'imageLink', 'relationMapLink', 'includeMapLink', 'runOnNoteCreation',
'runOnNoteTitleChange', 'runOnNoteChange', 'runOnNoteContentChange', 'runOnNoteDeletion', 'runOnBranchCreation', 'runOnBranchChange',
'runOnBranchDeletion', 'runOnChildNoteCreation', 'runOnAttributeCreation', 'runOnAttributeChange', 'template',
'inherit', 'widget', 'renderNote', 'shareCss', 'shareJs', 'shareTemplate', 'shareFavicon');
UPDATE attributes SET name = 'name' WHERE type = 'relation'
AND name NOT IN
('inbox', 'disableVersioning', 'calendarRoot', 'archived', 'excludeFromExport', 'disableInclusion', 'appCss',
'appTheme', 'hidePromotedAttributes', 'readOnly', 'autoReadOnlyDisabled', 'cssClass', 'iconClass',
'keyboardShortcut', 'run', 'runOnInstance', 'runAtHour', 'customRequestHandler', 'customResourceProvider',
'widget', 'noteInfoWidgetDisabled', 'linkMapWidgetDisabled', 'revisionsWidgetDisabled',
'whatLinksHereWidgetDisabled', 'similarNotesWidgetDisabled', 'workspace', 'workspaceIconClass',
'workspaceTabBackgroundColor', 'workspaceCalendarRoot', 'workspaceTemplate', 'searchHome', 'workspaceInbox',
'workspaceSearchHome', 'sqlConsoleHome', 'datePattern', 'weekPattern', 'enableWeekNote', 'monthPattern',
'quarterPattern', 'yearPattern', 'enableQuarterNote', 'pageSize', 'viewType', 'mapRootNoteId',
'bookmarkFolder', 'sorted', 'sortDirection', 'sortFoldersFirst', 'sortNatural', 'sortLocale', 'top',
'fullContentWidth', 'shareHiddenFromTree', 'shareExternalLink', 'shareOmitDefaultCss', 'shareRoot', 'shareDescription',
'shareRaw', 'shareDisallowRobotIndexing', 'shareIndex', 'displayRelations', 'hideRelations', 'titleTemplate',
'template', 'toc', 'color', 'keepCurrentHoisting', 'executeButton', 'executeDescription', 'newNotesOnTop',
'clipperInbox', 'internalLink', 'imageLink', 'relationMapLink', 'includeMapLink', 'runOnNoteCreation',
'runOnNoteTitleChange', 'runOnNoteChange', 'runOnNoteContentChange', 'runOnNoteDeletion', 'runOnBranchCreation', 'runOnBranchChange',
'runOnBranchDeletion', 'runOnChildNoteCreation', 'runOnAttributeCreation', 'runOnAttributeChange', 'template',
'inherit', 'widget', 'renderNote', 'shareCss', 'shareJs', 'shareTemplate', 'shareFavicon');
UPDATE branches SET prefix = 'prefix' WHERE prefix IS NOT NULL AND prefix != 'recovered';
UPDATE options SET value = 'anonymized' WHERE name IN
('documentId', 'documentSecret', 'encryptedDataKey',
'passwordVerificationHash', 'passwordVerificationSalt',
'passwordDerivedKeySalt', 'username', 'syncServerHost', 'syncProxy')
AND value != '';
VACUUM;

View File

@ -1,21 +0,0 @@
{
"compilerOptions": {
"module": "NodeNext",
"declaration": false,
"sourceMap": true,
"outDir": "./build",
"strict": true,
"noImplicitAny": true,
"resolveJsonModule": true,
"lib": ["ES2023"],
"downlevelIteration": true,
"skipLibCheck": true,
"esModuleInterop": true,
"verbatimModuleSyntax": true,
"allowJs": true
},
"include": [ "./src/**/*.ts" ],
"files": [
"./src/types.d.ts",
]
}

View File

@ -1,35 +0,0 @@
{
"name": "trilium",
"productName": "TriliumNext Notes",
"description": "Build your personal knowledge base with TriliumNext Notes",
"version": "0.93.0",
"license": "AGPL-3.0-only",
"repository": {
"type": "git",
"url": "https://github.com/TriliumNext/Notes.git"
},
"workspaces": {
"packages": [
"apps/*",
"packages/*"
],
"nohoist": [
"better-sqlite3"
]
},
"scripts": {
"build:packages": "npm --workspace=packages/commons run build",
"test": "npm --workspace=apps/client --workspace=apps/server run test",
"clean": "rimraf --glob {apps,packages}/*/{build,dist}",
"client:test": "npm --workspace=apps/client run test",
"client:build": "npm --workspace=apps/client run build:webpack",
"server:test": "npm --workspace=apps/server run test",
"server:coverage": "npm --workspace=apps/server run coverage",
"server:build": "npm --workspace=apps/server run build:ts",
"server:package": "npm run build:packages && npm run client:build && npm --workspace=apps/server run package",
},
"devDependencies": {
"rimraf": "^6.0.1",
"tsx": "^4.19.3"
}
}

View File

@ -1,6 +1,7 @@
{
"name": "@triliumnext/desktop",
"version": "0.0.1",
"description": "Build your personal knowledge base with TriliumNext Notes",
"private": true,
"main": "main.js",
"dependencies": {
@ -41,8 +42,7 @@
"name": "TriliumNext Notes Team",
"email": "contact@eliandoran.me",
"url": "https://github.com/TriliumNext/Notes"
},
"description": "Build your personal knowledge base with TriliumNext Notes",
},
"nx": {
"name": "desktop",
"targets": {

View File

@ -2,6 +2,7 @@
"name": "@triliumnext/edit-docs",
"version": "0.0.1",
"private": true,
"description": "Desktop version of Trilium which imports the demo database (presented to new users at start-up) or the user guide and other documentation and saves the modifications for committing.",
"devDependencies": {
"@electron/rebuild": "4.0.1",
"@triliumnext/client": "workspace:*",

View File

@ -1,7 +1,7 @@
{
"name": "@triliumnext/server",
"version": "0.94.0",
"description": "Desktop client for TriliumNext, embedding both the client and the server.",
"description": "The server-side component of TriliumNext, which exposes the client via the web, allows for sync and provides a REST API for both internal and external use.",
"private": true,
"dependencies": {
"better-sqlite3": "11.9.1",

View File

@ -6,15 +6,22 @@
"doc": "docs"
},
"scripts": {
"client:test": "nx test client",
"client:build": "nx build client",
"client:coverage": "nx test client --coverage",
"server:test": "nx test server",
"server:build": "nx build server",
"server:coverage": "nx test server --coverage",
"server:start": "nx run-many --target=serve --projects=client,server --parallel",
"server:start-prod": "nx run server:start-prod",
"electron:build": "nx build desktop",
"chore:ci-update-nightly-version": "tsx ./scripts/update-nightly-version.ts",
"chore:update-build-info": "tsx ./scripts/update-build-info.ts",
"chore:update-version": "tsx ./scripts/update-version.ts",
"test": "pnpm nx run-many -t test"
"test": "pnpm nx run-many -t test",
"coverage": "pnpm nx run-many -t coverage"
},
"private": true,
"devDependencies": {

View File

@ -5,11 +5,12 @@
"emitDeclarationOnly": true,
"importHelpers": true,
"isolatedModules": true,
"lib": ["es2022"],
"lib": ["ES2023"],
"module": "nodenext",
"moduleResolution": "nodenext",
"noEmitOnError": true,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
@ -17,6 +18,9 @@
"strict": true,
"target": "es2022",
"customConditions": ["development"],
"verbatimModuleSyntax": true
"verbatimModuleSyntax": true,
"resolveJsonModule": true,
"downlevelIteration": true,
"esModuleInterop": true,
}
}