Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
chore(nx/dump-db): integrate into monorepo
Elian Doran9d5fbc60ade6
diff --git a/_regroup_monorepo/apps/dump-db/package.json b/_regroup_monorepo/apps/dump-db/package.jsondeleted file mode 100644index ecbf63c53b..0000000000--- a/_regroup_monorepo/apps/dump-db/package.json+++ /dev/null@@ -1,31 +0,0 @@-{- "name": "dump-db",- "version": "1.0.0",- "description": "Standalone tool to dump contents of Trilium document.db file into a directory tree of notes",- "main": "dump-db.ts",- "scripts": {- "test": "echo \"Error: no test specified\" && exit 1"- },- "repository": {- "type": "git",- "url": "git+https://github.com/TriliumNext/Notes.git"- },- "author": "TriliumNext",- "license": "ISC",- "bugs": {- "url": "https://github.com/TriliumNext/Notes/issues"- },- "homepage": "https://github.com/TriliumNext/Notes/blob/master/dump-db/README.md",- "dependencies": {- "better-sqlite3": "^11.1.2",- "mime-types": "^3.0.0",- "sanitize-filename": "^1.6.3",- "tsx": "^4.19.3",- "yargs": "^17.3.1"- },- "devDependencies": {- "@types/better-sqlite3": "^7.6.11",- "@types/mime-types": "^2.1.4",- "@types/yargs": "^17.0.33"- }-}diff --git a/_regroup_monorepo/apps/dump-db/tsconfig.json b/_regroup_monorepo/apps/dump-db/tsconfig.jsondeleted file mode 100644index 1865f5d1bd..0000000000--- a/_regroup_monorepo/apps/dump-db/tsconfig.json+++ /dev/null@@ -1,10 +0,0 @@-{- "compilerOptions": {- "module": "ESNext",- "moduleResolution": "node",- "esModuleInterop": true,- "allowSyntheticDefaultImports": true,- "target": "ES6",- "strict": true- }-}diff --git a/_regroup_monorepo/apps/dump-db/README.md b/apps/dump-db/README.mdsimilarity index 100%rename from _regroup_monorepo/apps/dump-db/README.mdrename to apps/dump-db/README.mddiff --git a/apps/dump-db/eslint.config.mjs b/apps/dump-db/eslint.config.mjsnew file mode 100644index 0000000000..724052a2e2--- /dev/null+++ b/apps/dump-db/eslint.config.mjs@@ -0,0 +1,5 @@+import baseConfig from "../../eslint.config.mjs";++export default [+ ...baseConfig+];diff --git a/apps/dump-db/package.json b/apps/dump-db/package.jsonnew file mode 100644index 0000000000..cb139b0101--- /dev/null+++ b/apps/dump-db/package.json@@ -0,0 +1,79 @@+{+ "name": "@triliumnext/dump-db",+ "version": "1.0.0",+ "description": "Standalone tool to dump contents of Trilium document.db file into a directory tree of notes",+ "private": true,+ "dependencies": {+ "better-sqlite3": "^11.1.2",+ "mime-types": "^3.0.0",+ "sanitize-filename": "^1.6.3",+ "tsx": "^4.19.3",+ "yargs": "^17.3.1"+ },+ "devDependencies": {+ "@types/better-sqlite3": "^7.6.11",+ "@types/mime-types": "^2.1.4",+ "@types/yargs": "^17.0.33"+ },+ "nx": {+ "name": "dump-db",+ "targets": {+ "build": {+ "executor": "@nx/esbuild:esbuild",+ "outputs": [+ "{options.outputPath}"+ ],+ "defaultConfiguration": "production",+ "options": {+ "platform": "node",+ "outputPath": "apps/dump-db/dist",+ "format": [+ "cjs"+ ],+ "bundle": false,+ "main": "apps/dump-db/src/main.ts",+ "tsConfig": "apps/dump-db/tsconfig.app.json",+ "assets": [+ "apps/dump-db/src/assets"+ ],+ "esbuildOptions": {+ "sourcemap": true,+ "outExtension": {+ ".js": ".js"+ }+ }+ },+ "configurations": {+ "development": {},+ "production": {+ "esbuildOptions": {+ "sourcemap": false,+ "outExtension": {+ ".js": ".js"+ }+ }+ }+ }+ },+ "serve": {+ "executor": "@nx/js:node",+ "defaultConfiguration": "development",+ "dependsOn": [+ "build"+ ],+ "options": {+ "buildTarget": "dump-db:build",+ "runBuildTargetDependencies": false+ },+ "configurations": {+ "development": {+ "buildTarget": "dump-db:build:development"+ },+ "production": {+ "buildTarget": "dump-db:build:production"+ }+ }+ }+ }+ }+}diff --git a/apps/dump-db/src/assets/.gitkeep b/apps/dump-db/src/assets/.gitkeepnew file mode 100644index 0000000000..e69de29bb2diff --git a/_regroup_monorepo/apps/dump-db/inc/data_key.ts b/apps/dump-db/src/inc/data_key.tssimilarity index 100%rename from _regroup_monorepo/apps/dump-db/inc/data_key.tsrename to apps/dump-db/src/inc/data_key.tsdiff --git a/_regroup_monorepo/apps/dump-db/inc/decrypt.ts b/apps/dump-db/src/inc/decrypt.tssimilarity index 100%rename from _regroup_monorepo/apps/dump-db/inc/decrypt.tsrename to apps/dump-db/src/inc/decrypt.tsdiff --git a/_regroup_monorepo/apps/dump-db/inc/dump.ts b/apps/dump-db/src/inc/dump.tssimilarity index 100%rename from _regroup_monorepo/apps/dump-db/inc/dump.tsrename to apps/dump-db/src/inc/dump.tsdiff --git a/_regroup_monorepo/apps/dump-db/inc/extension.ts b/apps/dump-db/src/inc/extension.tssimilarity index 100%rename from _regroup_monorepo/apps/dump-db/inc/extension.tsrename to apps/dump-db/src/inc/extension.tsdiff --git a/_regroup_monorepo/apps/dump-db/inc/sql.ts b/apps/dump-db/src/inc/sql.tssimilarity index 100%rename from _regroup_monorepo/apps/dump-db/inc/sql.tsrename to apps/dump-db/src/inc/sql.tsdiff --git a/_regroup_monorepo/apps/dump-db/dump-db.ts b/apps/dump-db/src/main.tssimilarity index 100%rename from _regroup_monorepo/apps/dump-db/dump-db.tsrename to apps/dump-db/src/main.tsdiff --git a/apps/dump-db/tsconfig.app.json b/apps/dump-db/tsconfig.app.jsonnew file mode 100644index 0000000000..f76ddf0f27--- /dev/null+++ b/apps/dump-db/tsconfig.app.json@@ -0,0 +1,25 @@+{+ "extends": "../../tsconfig.base.json",+ "compilerOptions": {+ "module": "ESNext",+ "moduleResolution": "bundler",+ "esModuleInterop": true,+ "allowSyntheticDefaultImports": true,+ "target": "ES6",+ "strict": true,+ "outDir": "dist",+ "types": [+ "node"+ ],+ "rootDir": "src",+ "tsBuildInfoFile": "dist/tsconfig.app.tsbuildinfo"+ },+ "include": [+ "src/**/*.ts"+ ],+ "exclude": [+ "eslint.config.js",+ "eslint.config.cjs",+ "eslint.config.mjs"+ ]+}diff --git a/apps/dump-db/tsconfig.json b/apps/dump-db/tsconfig.jsonnew file mode 100644index 0000000000..816e3f36f4--- /dev/null+++ b/apps/dump-db/tsconfig.json@@ -0,0 +1,10 @@+{+ "extends": "../../tsconfig.base.json",+ "files": [],+ "include": [],+ "references": [+ {+ "path": "./tsconfig.app.json"+ }+ ]+}diff --git a/tsconfig.json b/tsconfig.jsonindex 6593e8fbc7..74bd16cd69 100644--- a/tsconfig.json+++ b/tsconfig.json@@ -23,6 +23,9 @@},{"path": "./apps/desktop"+ },+ {+ "path": "./apps/dump-db"}]}