chore(nx/dump-db): integrate into monorepo

This commit is contained in:
Elian Doran 2025-04-29 00:17:58 +03:00
parent fdcdc41ea6
commit 9d5fbc60ad
No known key found for this signature in database
15 changed files with 122 additions and 41 deletions

View File

@ -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"
}
}

View File

@ -1,10 +0,0 @@
{
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "node",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"target": "ES6",
"strict": true
}
}

View File

@ -0,0 +1,5 @@
import baseConfig from "../../eslint.config.mjs";
export default [
...baseConfig
];

79
apps/dump-db/package.json Normal file
View File

@ -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"
}
}
}
}
}
}

View File

View File

@ -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"
]
}

View File

@ -0,0 +1,10 @@
{
"extends": "../../tsconfig.base.json",
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.app.json"
}
]
}

View File

@ -23,6 +23,9 @@
}, },
{ {
"path": "./apps/desktop" "path": "./apps/desktop"
},
{
"path": "./apps/dump-db"
} }
] ]
} }