From 1e4f3a32841fd5439f48707ede8a50295057766c Mon Sep 17 00:00:00 2001 From: tatakaisun <136896447+tatakaisun@users.noreply.github.com> Date: Thu, 21 May 2026 14:51:55 +0900 Subject: [PATCH 1/3] chore: remove install README copy --- bin/harper.ts | 2 ++ static/README.md | 13 ------------- unitTests/utility/mount_hdb.test.js | 1 - utility/mount_hdb.ts | 4 +--- 4 files changed, 3 insertions(+), 17 deletions(-) delete mode 100644 static/README.md diff --git a/bin/harper.ts b/bin/harper.ts index baa6edd20..6ee262ec0 100644 --- a/bin/harper.ts +++ b/bin/harper.ts @@ -18,6 +18,8 @@ Usage: harperdb [command] With no command, harper will simply run Harper (in the foreground) +Documentation: https://docs.harperdb.io/learn + By default, the CLI also supports certain Operation APIs. Specify the operation name and any required parameters, and omit the 'operation' command. Commands: diff --git a/static/README.md b/static/README.md deleted file mode 100644 index 9d100c5a0..000000000 --- a/static/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Harper - -Harper is an open-source Node.js performance platform that unifies database, cache, application, and messaging layers into one in-memory process. - -## Harper Filesystem Structure - -- `harper` - This is the root folder for Harper. It contains all the files and folders that Harper uses. -- `harper/harper-config.yaml` - This is the configuration file, It contains all the settings for Harper. This file is read by Harper when it starts up. It is also written to when you change settings through the API. -- `harper/database` - This folder is the default location for all your database files (that contain the actual data in your databases). -- `harper/keys` - This folder contains the private keys (and can also have certificates) for your PKI/TLS. -- `harper/components` - This folder contains editable components that are stored in Harper. This folder is intended for components that are edited and canonically stored on this server. The standard approach for components is that they are deployed from npm or GitHub and installed to the `hdb/components` directory, then symlinked to the `node_modules/` folder for dependency resolution purposes. -- `harper/log` - This folder contains the log file for Harper -- `harper/backup` - This folder contains backup copies for files when they are modified. When harper-config.yaml is modified through the API, previous versions are stored here. diff --git a/unitTests/utility/mount_hdb.test.js b/unitTests/utility/mount_hdb.test.js index 9dd0a4a35..e0aea088d 100644 --- a/unitTests/utility/mount_hdb.test.js +++ b/unitTests/utility/mount_hdb.test.js @@ -54,7 +54,6 @@ describe('test mount_hdb module', () => { init_sys_schema_path_stub = sandbox.stub(init_paths, 'initSystemSchemaPaths').resolves(); create_table_stub = sandbox.stub(bridge, 'createTable'); mount_hdb.__set__('mkdirpSync', mk_dirp_sync_stub); - mount_hdb.__set__('copySync', sandbox.stub()); mount_hdb.__set__('systemSchema_json_1', { default: test_system_schema }); }); diff --git a/utility/mount_hdb.ts b/utility/mount_hdb.ts index f9355ff04..4c838a2c7 100644 --- a/utility/mount_hdb.ts +++ b/utility/mount_hdb.ts @@ -1,13 +1,12 @@ 'use strict'; -const { mkdirpSync, copySync } = require('fs-extra'); +const { mkdirpSync } = require('fs-extra'); import * as path from 'path'; import * as terms from '../utility/hdbTerms.ts'; import hdbLogger from '../utility/logging/harper_logger.ts'; import bridge from '../dataLayer/harperBridge/harperBridge.ts'; import systemSchema from '../json/systemSchema.json'; import * as initPaths from '../dataLayer/harperBridge/lmdbBridge/lmdbUtility/initializePaths.js'; -import { PACKAGE_ROOT } from '../utility/packageUtils.js'; export default async function mountHdb(hdbPath: string) { hdbLogger.trace('Mounting Harper'); @@ -18,7 +17,6 @@ export default async function mountHdb(hdbPath: string) { makeDirectory(path.join(hdbPath, 'log')); makeDirectory(path.join(hdbPath, 'database')); makeDirectory(path.join(hdbPath, 'components')); - copySync(path.join(PACKAGE_ROOT, 'static/README.md'), path.join(hdbPath, 'README.md')); await createTables(); } From db06efdcca6c1cb5be31785135fe7016c7815c0f Mon Sep 17 00:00:00 2001 From: tatakaisun <136896447+tatakaisun@users.noreply.github.com> Date: Sat, 23 May 2026 05:51:04 +0900 Subject: [PATCH 2/3] chore: keep install README context --- bin/harper.ts | 2 +- static/README.md | 14 ++++++++++++++ unitTests/utility/mount_hdb.test.js | 1 + utility/mount_hdb.ts | 4 +++- 4 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 static/README.md diff --git a/bin/harper.ts b/bin/harper.ts index 6ee262ec0..2e65317a3 100644 --- a/bin/harper.ts +++ b/bin/harper.ts @@ -18,7 +18,7 @@ Usage: harperdb [command] With no command, harper will simply run Harper (in the foreground) -Documentation: https://docs.harperdb.io/learn +Documentation: https://docs.harperdb.io/ By default, the CLI also supports certain Operation APIs. Specify the operation name and any required parameters, and omit the 'operation' command. diff --git a/static/README.md b/static/README.md new file mode 100644 index 000000000..6f574f25b --- /dev/null +++ b/static/README.md @@ -0,0 +1,14 @@ +# Harper + +This directory contains the files used by a local Harper installation. + +## Directory Guide + +- `harper-config.yaml` - Local configuration read by Harper at startup and updated when settings change through the API. +- `database/` - Default location for database storage files. +- `components/` - Editable local components stored on this server. +- `keys/` - Private keys and certificates used for PKI/TLS. +- `log/` - Harper log output. +- `backup/` - Backup copies of files Harper updates, such as previous `harper-config.yaml` versions. + +For installation, configuration, and API documentation, see https://docs.harperdb.io/. diff --git a/unitTests/utility/mount_hdb.test.js b/unitTests/utility/mount_hdb.test.js index e0aea088d..9dd0a4a35 100644 --- a/unitTests/utility/mount_hdb.test.js +++ b/unitTests/utility/mount_hdb.test.js @@ -54,6 +54,7 @@ describe('test mount_hdb module', () => { init_sys_schema_path_stub = sandbox.stub(init_paths, 'initSystemSchemaPaths').resolves(); create_table_stub = sandbox.stub(bridge, 'createTable'); mount_hdb.__set__('mkdirpSync', mk_dirp_sync_stub); + mount_hdb.__set__('copySync', sandbox.stub()); mount_hdb.__set__('systemSchema_json_1', { default: test_system_schema }); }); diff --git a/utility/mount_hdb.ts b/utility/mount_hdb.ts index 4c838a2c7..f9355ff04 100644 --- a/utility/mount_hdb.ts +++ b/utility/mount_hdb.ts @@ -1,12 +1,13 @@ 'use strict'; -const { mkdirpSync } = require('fs-extra'); +const { mkdirpSync, copySync } = require('fs-extra'); import * as path from 'path'; import * as terms from '../utility/hdbTerms.ts'; import hdbLogger from '../utility/logging/harper_logger.ts'; import bridge from '../dataLayer/harperBridge/harperBridge.ts'; import systemSchema from '../json/systemSchema.json'; import * as initPaths from '../dataLayer/harperBridge/lmdbBridge/lmdbUtility/initializePaths.js'; +import { PACKAGE_ROOT } from '../utility/packageUtils.js'; export default async function mountHdb(hdbPath: string) { hdbLogger.trace('Mounting Harper'); @@ -17,6 +18,7 @@ export default async function mountHdb(hdbPath: string) { makeDirectory(path.join(hdbPath, 'log')); makeDirectory(path.join(hdbPath, 'database')); makeDirectory(path.join(hdbPath, 'components')); + copySync(path.join(PACKAGE_ROOT, 'static/README.md'), path.join(hdbPath, 'README.md')); await createTables(); } From 7b51d2b81b0b8f1c475b46115c12d0318fd27d0a Mon Sep 17 00:00:00 2001 From: tatakaisun <136896447+tatakaisun@users.noreply.github.com> Date: Sat, 23 May 2026 10:43:11 +0900 Subject: [PATCH 3/3] docs: sort directory list alphabetically --- static/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/README.md b/static/README.md index 6f574f25b..c3df73214 100644 --- a/static/README.md +++ b/static/README.md @@ -5,10 +5,10 @@ This directory contains the files used by a local Harper installation. ## Directory Guide - `harper-config.yaml` - Local configuration read by Harper at startup and updated when settings change through the API. -- `database/` - Default location for database storage files. +- `backup/` - Backup copies of files Harper updates, such as previous `harper-config.yaml` versions. - `components/` - Editable local components stored on this server. +- `database/` - Default location for database storage files. - `keys/` - Private keys and certificates used for PKI/TLS. - `log/` - Harper log output. -- `backup/` - Backup copies of files Harper updates, such as previous `harper-config.yaml` versions. For installation, configuration, and API documentation, see https://docs.harperdb.io/.