mirror of
https://github.com/zadam/trilium.git
synced 2025-12-27 09:44:23 +01:00
since we build TS and webpack ourselves and are not using any electron-forge plugins (at least at the moment) -> we should use the "build" folder as build context for electron-forge: in comparison to running electron-forge in the root folder of the project, this avoids electron-forge from packing the source code multiple times (e.g. once as uncompiled TS, then as compiled JS, and then (partially) a third time as webpack bundled JS files), same as some of the assets. to achieve this, we run our usual TS/Webpack build process, but then install the npm dependencies *inside* the build folder (as otherwise electron-forge would choke on the missing node_modules it and abort building). In theory we could avoid cd-ing into the build folder, by providing the "dir" as argument to electron-forge's CLI -- BUT that wouldn't play well with our CI, where we are passing --arch and --platform options to it, which need to come *before* the dir argument. since we now cd into the "build" folder, we also need to adjust the path in package.json "main" again
255 lines
12 KiB
JSON
255 lines
12 KiB
JSON
{
|
|
"name": "trilium",
|
|
"productName": "TriliumNext Notes",
|
|
"description": "Build your personal knowledge base with TriliumNext Notes",
|
|
"version": "0.92.3-beta",
|
|
"license": "AGPL-3.0-only",
|
|
"main": "./electron-main.js",
|
|
"author": {
|
|
"name": "TriliumNext Notes Team",
|
|
"email": "contact@eliandoran.me",
|
|
"url": "https://github.com/TriliumNext/Notes"
|
|
},
|
|
"copyright": "",
|
|
"bin": {
|
|
"trilium": "src/main.js"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/TriliumNext/Notes.git"
|
|
},
|
|
"type": "module",
|
|
"scripts": {
|
|
"server:start": "cross-env TRILIUM_DATA_DIR=./data TRILIUM_ENV=dev TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 nodemon src/main.ts",
|
|
"server:start-safe": "cross-env TRILIUM_DATA_DIR=./data TRILIUM_ENV=dev TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 nodemon src/main.ts",
|
|
"server:start-no-dir": "cross-env TRILIUM_ENV=dev TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 nodemon src/main.ts",
|
|
"server:start-test": "npm run server:switch && rimraf ./data-test && cross-env TRILIUM_DATA_DIR=./data-test TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev TRILIUM_PORT=9999 nodemon src/main.ts",
|
|
"server:qstart": "npm run server:switch && npm run server:start",
|
|
"server:switch": "rimraf ./node_modules/better-sqlite3 && npm install",
|
|
"electron:start": "cross-env NODE_OPTIONS=\"--import tsx\" TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev electron ./electron-main.ts --inspect=5858 .",
|
|
"electron:start-no-dir": "cross-env NODE_OPTIONS=\"--import tsx\" TRILIUM_ENV=dev electron --inspect=5858 .",
|
|
"electron:start-nix": "electron-rebuild --version 33.3.1 && cross-env NODE_OPTIONS=\"--import tsx\" TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev nix-shell -p electron_33 --run \"electron ./electron-main.ts --inspect=5858 .\"",
|
|
"electron:start-nix-no-dir": "electron-rebuild --version 33.3.1 && cross-env NODE_OPTIONS=\"--import tsx\" TRILIUM_ENV=dev nix-shell -p electron_33 --run \"electron ./electron-main.ts --inspect=5858 .\"",
|
|
"electron:start-prod": "npm run build:prepare-dist && cross-env TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=prod electron ./dist/electron-main.js --inspect=5858 .",
|
|
"electron:start-prod-no-dir": "npm run build:prepare-dist && cross-env TRILIUM_ENV=prod electron --inspect=5858 .",
|
|
"electron:start-prod-nix": "electron-rebuild --version 33.3.1 && npm run build:prepare-dist && cross-env TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev nix-shell -p electron_33 --run \"electron ./dist/electron-main.js --inspect=5858 .\"",
|
|
"electron:start-prod-nix-no-dir": "electron-rebuild --version 33.3.1 && npm run build:prepare-dist && cross-env TRILIUM_ENV=dev nix-shell -p electron_33 --run \"electron ./dist/electron-main.js --inspect=5858 .\"",
|
|
"electron:qstart": "npm run electron:switch && npm run electron:start",
|
|
"electron:switch": "electron-rebuild",
|
|
"docs:edit": "cross-env NODE_OPTIONS=\"--import tsx\" TRILIUM_DATA_DIR=./data-docs TRILIUM_ENV=dev TRILIUM_PORT=37741 electron ./electron-docs-main.ts .",
|
|
"docs:edit-nix": "electron-rebuild --version 33.3.1 && cross-env NODE_OPTIONS=\"--import tsx\" TRILIUM_DATA_DIR=./data-docs TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_PORT=37741 TRILIUM_ENV=dev nix-shell -p electron_33 --run \"electron ./electron-docs-main.ts .\"",
|
|
"electron-forge:prepare": "npm run build:prepare-dist && npm ci --omit=dev --prefix ./build",
|
|
"electron-forge:start": "npm run electron-forge:prepare && cd ./build && electron-forge start",
|
|
"electron-forge:make": "npm run electron-forge:prepare && cd ./build && electron-forge make",
|
|
"electron-forge:package": "npm run electron-forge:prepare && cd ./build && electron-forge package",
|
|
"docs:build-backend": "rimraf ./docs/backend_api && typedoc ./docs/backend_api src/becca/entities/*.ts src/services/backend_script_api.ts src/services/sql.ts",
|
|
"docs:build-frontend": "rimraf ./docs/frontend_api && jsdoc -c jsdoc-conf.json -d ./docs/frontend_api src/public/app/entities/*.js src/public/app/services/frontend_script_api.js src/public/app/widgets/basic_widget.js src/public/app/widgets/note_context_aware_widget.js src/public/app/widgets/right_panel_widget.js",
|
|
"docs:build": "npm run docs:build-backend && npm run docs:build-frontend",
|
|
"build:webpack": "tsx node_modules/webpack/bin/webpack.js -c webpack.config.ts --progress",
|
|
"build:ts": "tsc -p tsconfig.build.json",
|
|
"build:clean": "rimraf ./dist ./build",
|
|
"build:prepare-dist": "npm run build:clean && npm run build:ts && npm run build:webpack && tsx ./bin/copy-dist.ts",
|
|
"test": "npm run client:test && npm run server:test",
|
|
"server:test": "cross-env TRILIUM_ENV=dev TRILIUM_DATA_DIR=./integration-tests/db TRILIUM_INTEGRATION_TEST=memory vitest",
|
|
"server:coverage": "cross-env TRILIUM_ENV=dev TRILIUM_DATA_DIR=./integration-tests/db TRILIUM_INTEGRATION_TEST=memory vitest --coverage",
|
|
"client:test": "cross-env TRILIUM_ENV=dev TRILIUM_DATA_DIR=./integration-tests/db TRILIUM_INTEGRATION_TEST=memory vitest --root src/public/app",
|
|
"client:coverage": "cross-env TRILIUM_ENV=dev TRILIUM_DATA_DIR=./integration-tests/db TRILIUM_INTEGRATION_TEST=memory vitest --root src/public/app --coverage",
|
|
"test:playwright": "playwright test --workers 1",
|
|
"test:integration-edit-db": "cross-env TRILIUM_INTEGRATION_TEST=edit TRILIUM_PORT=8081 TRILIUM_ENV=dev TRILIUM_DATA_DIR=./integration-tests/db nodemon src/main.ts",
|
|
"test:integration-mem-db": "cross-env TRILIUM_INTEGRATION_TEST=memory TRILIUM_PORT=8082 TRILIUM_DATA_DIR=./integration-tests/db nodemon src/main.ts",
|
|
"test:integration-mem-db-dev": "cross-env TRILIUM_INTEGRATION_TEST=memory TRILIUM_PORT=8082 TRILIUM_ENV=dev TRILIUM_DATA_DIR=./integration-tests/db nodemon src/main.ts",
|
|
"dev:watch-dist": "tsx ./bin/watch-dist.ts",
|
|
"dev:prettier-check": "prettier . --check",
|
|
"dev:prettier-fix": "prettier . --write",
|
|
"dev:linter-check": "eslint .",
|
|
"dev:linter-fix": "eslint . --fix",
|
|
"chore:update-build-info": "tsx bin/update-build-info.ts",
|
|
"chore:ci-update-nightly-version": "tsx ./bin/update-nightly-version.ts",
|
|
"chore:generate-document": "cross-env nodemon ./bin/generate_document.ts 1000",
|
|
"chore:generate-openapi": "tsx bin/generate-openapi.js"
|
|
},
|
|
"dependencies": {
|
|
"@braintree/sanitize-url": "7.1.1",
|
|
"@electron/remote": "2.1.2",
|
|
"@excalidraw/excalidraw": "0.18.0",
|
|
"@fullcalendar/core": "6.1.15",
|
|
"@fullcalendar/daygrid": "6.1.15",
|
|
"@fullcalendar/interaction": "6.1.15",
|
|
"@highlightjs/cdn-assets": "11.11.1",
|
|
"@joplin/turndown-plugin-gfm": "1.0.61",
|
|
"@mermaid-js/layout-elk": "0.1.7",
|
|
"@mind-elixir/node-menu": "1.0.4",
|
|
"@triliumnext/express-partial-content": "1.0.1",
|
|
"archiver": "7.0.1",
|
|
"async-mutex": "0.5.0",
|
|
"autocomplete.js": "0.38.1",
|
|
"axios": "1.8.2",
|
|
"better-sqlite3": "11.8.1",
|
|
"boxicons": "2.1.4",
|
|
"chardet": "2.1.0",
|
|
"cheerio": "1.0.0",
|
|
"chokidar": "4.0.3",
|
|
"cls-hooked": "4.2.2",
|
|
"codemirror": "5.65.18",
|
|
"compression": "1.8.0",
|
|
"cookie-parser": "1.4.7",
|
|
"csrf-csrf": "3.1.0",
|
|
"dayjs": "1.11.13",
|
|
"dayjs-plugin-utc": "0.1.2",
|
|
"debounce": "2.2.0",
|
|
"draggabilly": "3.0.0",
|
|
"ejs": "3.1.10",
|
|
"electron-debug": "4.1.0",
|
|
"electron-dl": "4.0.0",
|
|
"electron-squirrel-startup": "1.0.1",
|
|
"electron-window-state": "5.0.3",
|
|
"escape-html": "1.0.3",
|
|
"eslint-linter-browserify": "9.22.0",
|
|
"express": "4.21.2",
|
|
"express-rate-limit": "7.5.0",
|
|
"express-session": "1.18.1",
|
|
"force-graph": "1.49.3",
|
|
"fs-extra": "11.3.0",
|
|
"helmet": "8.0.0",
|
|
"html": "1.0.0",
|
|
"html2plaintext": "2.1.4",
|
|
"http-proxy-agent": "7.0.2",
|
|
"https-proxy-agent": "7.0.6",
|
|
"i18next": "24.2.2",
|
|
"i18next-fs-backend": "2.6.0",
|
|
"image-type": "5.2.0",
|
|
"ini": "5.0.0",
|
|
"is-animated": "2.0.2",
|
|
"is-svg": "5.1.0",
|
|
"jimp": "1.6.0",
|
|
"jquery": "3.7.1",
|
|
"jquery-hotkeys": "0.2.2",
|
|
"jquery.fancytree": "2.38.4",
|
|
"js-yaml": "4.1.0",
|
|
"jsdom": "26.0.0",
|
|
"jsplumb": "2.15.6",
|
|
"katex": "0.16.21",
|
|
"leaflet": "1.9.4",
|
|
"leaflet-gpx": "2.1.2",
|
|
"mark.js": "8.11.1",
|
|
"marked": "15.0.7",
|
|
"mermaid": "11.4.1",
|
|
"mime-types": "2.1.35",
|
|
"mind-elixir": "4.4.1",
|
|
"multer": "1.4.5-lts.1",
|
|
"normalize-strings": "1.1.1",
|
|
"normalize.css": "8.0.1",
|
|
"panzoom": "9.4.3",
|
|
"rand-token": "1.0.1",
|
|
"react": "18.3.1",
|
|
"react-dom": "18.3.1",
|
|
"safe-compare": "1.1.4",
|
|
"sanitize-filename": "1.6.3",
|
|
"sanitize-html": "2.14.0",
|
|
"sax": "1.4.1",
|
|
"serve-favicon": "2.5.0",
|
|
"session-file-store": "1.5.0",
|
|
"source-map-support": "0.5.21",
|
|
"stream-throttle": "0.1.3",
|
|
"strip-bom": "5.0.0",
|
|
"striptags": "3.2.0",
|
|
"swagger-ui-express": "5.0.1",
|
|
"tmp": "0.2.3",
|
|
"turndown": "7.2.0",
|
|
"unescape": "1.0.1",
|
|
"vanilla-js-wheel-zoom": "9.0.4",
|
|
"ws": "8.18.1",
|
|
"xml2js": "0.6.2",
|
|
"yauzl": "3.2.0"
|
|
},
|
|
"devDependencies": {
|
|
"@electron-forge/cli": "7.7.0",
|
|
"@electron-forge/maker-deb": "7.7.0",
|
|
"@electron-forge/maker-dmg": "7.7.0",
|
|
"@electron-forge/maker-flatpak": "7.7.0",
|
|
"@electron-forge/maker-rpm": "7.7.0",
|
|
"@electron-forge/maker-squirrel": "7.7.0",
|
|
"@electron-forge/maker-zip": "7.7.0",
|
|
"@electron-forge/plugin-auto-unpack-natives": "7.7.0",
|
|
"@electron/rebuild": "3.7.1",
|
|
"@eslint/js": "9.22.0",
|
|
"@playwright/test": "1.51.0",
|
|
"@popperjs/core": "2.11.8",
|
|
"@types/archiver": "6.0.3",
|
|
"@types/better-sqlite3": "7.6.12",
|
|
"@types/bootstrap": "5.2.10",
|
|
"@types/cheerio": "0.22.35",
|
|
"@types/cls-hooked": "4.3.9",
|
|
"@types/compression": "1.7.5",
|
|
"@types/cookie-parser": "1.4.8",
|
|
"@types/debounce": "1.2.4",
|
|
"@types/ejs": "3.1.5",
|
|
"@types/electron-squirrel-startup": "1.0.2",
|
|
"@types/escape-html": "1.0.4",
|
|
"@types/express": "5.0.0",
|
|
"@types/express-session": "1.18.1",
|
|
"@types/fs-extra": "11.0.4",
|
|
"@types/html": "1.0.4",
|
|
"@types/ini": "4.1.1",
|
|
"@types/jquery": "3.5.32",
|
|
"@types/js-yaml": "4.0.9",
|
|
"@types/jsdom": "21.1.7",
|
|
"@types/leaflet": "1.9.16",
|
|
"@types/leaflet-gpx": "1.3.7",
|
|
"@types/mime-types": "2.1.4",
|
|
"@types/multer": "1.4.12",
|
|
"@types/node": "22.13.10",
|
|
"@types/react": "18.3.18",
|
|
"@types/react-dom": "18.3.5",
|
|
"@types/safe-compare": "1.1.2",
|
|
"@types/sanitize-html": "2.13.0",
|
|
"@types/sax": "1.2.7",
|
|
"@types/serve-favicon": "2.5.7",
|
|
"@types/session-file-store": "1.2.5",
|
|
"@types/source-map-support": "0.5.10",
|
|
"@types/stream-throttle": "0.1.4",
|
|
"@types/supertest": "6.0.2",
|
|
"@types/swagger-ui-express": "4.1.8",
|
|
"@types/tmp": "0.2.6",
|
|
"@types/turndown": "5.0.5",
|
|
"@types/ws": "8.18.0",
|
|
"@types/xml2js": "0.4.14",
|
|
"@types/yargs": "17.0.33",
|
|
"@vitest/coverage-v8": "3.0.8",
|
|
"autoprefixer": "10.4.21",
|
|
"bootstrap": "5.3.3",
|
|
"cross-env": "7.0.3",
|
|
"css-loader": "7.1.2",
|
|
"electron": "34.3.2",
|
|
"eslint": "9.22.0",
|
|
"esm": "3.2.25",
|
|
"globals": "16.0.0",
|
|
"happy-dom": "17.4.3",
|
|
"i18next-http-backend": "3.0.2",
|
|
"jsdoc": "4.0.4",
|
|
"knockout": "3.5.1",
|
|
"lorem-ipsum": "2.0.8",
|
|
"mini-css-extract-plugin": "2.9.2",
|
|
"nodemon": "3.1.9",
|
|
"postcss-loader": "8.1.1",
|
|
"prettier": "3.5.3",
|
|
"rcedit": "4.0.1",
|
|
"rimraf": "6.0.1",
|
|
"sass": "1.85.1",
|
|
"sass-loader": "16.0.5",
|
|
"split.js": "1.6.5",
|
|
"supertest": "7.0.0",
|
|
"swagger-jsdoc": "6.2.8",
|
|
"ts-loader": "9.5.2",
|
|
"tslib": "2.8.1",
|
|
"tsx": "4.19.3",
|
|
"typedoc": "0.27.9",
|
|
"typescript": "5.8.2",
|
|
"typescript-eslint": "8.26.1",
|
|
"vitest": "3.0.8",
|
|
"webpack": "5.98.0",
|
|
"webpack-cli": "6.0.1",
|
|
"webpack-dev-middleware": "7.4.2"
|
|
}
|
|
}
|