mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 19:12:27 +08:00
Merge pull request #1021 from TriliumNext/chore_move-generate-documents
chore: move generate_documents to bin folder
This commit is contained in:
commit
0b0fcc0685
@ -1,15 +1,15 @@
|
|||||||
/**
|
/**
|
||||||
* Usage: node src/tools/generate_document.js 1000
|
* Usage: tsx ./generate_document.ts 1000
|
||||||
* will create 1000 new notes and some clones into the current document.db
|
* will create 1000 new notes and some clones into the current document.db
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import sqlInit from "../services/sql_init.js";
|
import sqlInit from "../src/services/sql_init.js";
|
||||||
import noteService from "../services/notes.js";
|
import noteService from "../src/services/notes.js";
|
||||||
import attributeService from "../services/attributes.js";
|
import attributeService from "../src/services/attributes.js";
|
||||||
import cls from "../services/cls.js";
|
import cls from "../src/services/cls.js";
|
||||||
import cloningService from "../services/cloning.js";
|
import cloningService from "../src/services/cloning.js";
|
||||||
import loremIpsum from "lorem-ipsum";
|
import loremIpsum from "lorem-ipsum";
|
||||||
import "../becca/entity_constructor.js";
|
import "../src/becca/entity_constructor.js";
|
||||||
|
|
||||||
const noteCount = parseInt(process.argv[2]);
|
const noteCount = parseInt(process.argv[2]);
|
||||||
|
|
||||||
@ -90,4 +90,6 @@ async function start() {
|
|||||||
process.exit(0);
|
process.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
sqlInit.dbReady.then(cls.wrap(start));
|
// @TriliumNextTODO sqlInit.dbReady never seems to resolve so program hangs
|
||||||
|
// see https://github.com/TriliumNext/Notes/issues/1020
|
||||||
|
sqlInit.dbReady.then(cls.wrap(start)).catch((err) => console.error(err));
|
@ -48,7 +48,7 @@
|
|||||||
"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",
|
"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",
|
||||||
"integration-mem-db": "cross-env TRILIUM_INTEGRATION_TEST=memory TRILIUM_PORT=8082 TRILIUM_DATA_DIR=./integration-tests/db nodemon src/main.ts",
|
"integration-mem-db": "cross-env TRILIUM_INTEGRATION_TEST=memory TRILIUM_PORT=8082 TRILIUM_DATA_DIR=./integration-tests/db nodemon src/main.ts",
|
||||||
"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",
|
"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",
|
||||||
"generate-document": "cross-env nodemon src/tools/generate_document.ts 1000",
|
"generate-document": "cross-env nodemon ./bin/generate_document.ts 1000",
|
||||||
"ci-update-nightly-version": "tsx ./bin/update-nightly-version.ts",
|
"ci-update-nightly-version": "tsx ./bin/update-nightly-version.ts",
|
||||||
"prettier-check": "prettier . --check",
|
"prettier-check": "prettier . --check",
|
||||||
"prettier-fix": "prettier . --write"
|
"prettier-fix": "prettier . --write"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user