diff --git a/.gitignore b/.gitignore index 56d71dc..2f7b680 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ **/node_modules -framework/downloads -framework/binaries -framework/.nodejs -framework/.nodejs-config +diachron/downloads +diachron/binaries +diachron/.nodejs +diachron/.nodejs-config diff --git a/CLAUDE.md b/CLAUDE.md index a757a5f..1e3b46c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -56,7 +56,7 @@ cd master && go build - **backend/** - TypeScript/Express.js backend application - **master/** - Go-based master process for file watching and process management -- **framework/** - Managed binaries (Node.js, pnpm), command wrappers, and +- **diachron/** - Managed binaries (Node.js, pnpm), command wrappers, and framework-specific library code - **monitor/** - Go file watcher that triggers rebuilds (experimental) @@ -78,7 +78,7 @@ Responsibilities: ### Framework Command System -Commands flow through: `./cmd` → `framework/cmd.d/*` → `framework/shims/*` → managed binaries in `framework/binaries/` +Commands flow through: `./cmd` → `diachron/cmd.d/*` → `diachron/shims/*` → managed binaries in `diachron/binaries/` This ensures consistent tooling versions across the team without system-wide installations. diff --git a/backend/check.sh b/backend/check.sh index 0dece7f..15f51ca 100755 --- a/backend/check.sh +++ b/backend/check.sh @@ -8,7 +8,7 @@ check_dir="$DIR" out_dir="$check_dir/out" -source "$check_dir"/../framework/shims/common -source "$check_dir"/../framework/shims/node.common +source "$check_dir"/../diachron/shims/common +source "$check_dir"/../diachron/shims/node.common $ROOT/cmd pnpm tsc --outDir "$out_dir" diff --git a/backend/show-config.sh b/backend/show-config.sh index 2c553a1..4a199ec 100755 --- a/backend/show-config.sh +++ b/backend/show-config.sh @@ -6,7 +6,7 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" check_dir="$DIR" -source "$check_dir"/../framework/shims/common -source "$check_dir"/../framework/shims/node.common +source "$check_dir"/../diachron/shims/common +source "$check_dir"/../diachron/shims/node.common $ROOT/cmd pnpm tsc --showConfig diff --git a/backend/watch.sh b/backend/watch.sh index e1fba56..3709130 100755 --- a/backend/watch.sh +++ b/backend/watch.sh @@ -6,8 +6,8 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" check_dir="$DIR" -source "$check_dir"/../framework/shims/common -source "$check_dir"/../framework/shims/node.common +source "$check_dir"/../diachron/shims/common +source "$check_dir"/../diachron/shims/node.common # $ROOT/cmd pnpm tsc --lib ES2023 --esModuleInterop -w $check_dir/app.ts # $ROOT/cmd pnpm tsc -w $check_dir/app.ts diff --git a/check.sh b/check.sh index 23597f6..8454da7 100755 --- a/check.sh +++ b/check.sh @@ -10,7 +10,7 @@ cd "$DIR" # exclusions="SC2002" -source "$DIR/framework/versions" +source "$DIR/diachron/versions" if [[ $# -ne 0 ]]; then shellcheck --exclude="$exclusions" "$@" @@ -20,10 +20,10 @@ fi shell_scripts="$(fd .sh | xargs)" # The files we need to check all either end in .sh or else they're the files -# in framework/cmd.d and framework/shims. -x instructs shellcheck to also +# in diachron/cmd.d and diachron/shims. -x instructs shellcheck to also # check `source`d files. -shellcheck -x --exclude="$exclusions" "$DIR/cmd" "$DIR"/framework/cmd.d/* "$DIR"/framework/shims/* "$shell_scripts" +shellcheck -x --exclude="$exclusions" "$DIR/cmd" "$DIR"/diachron/cmd.d/* "$DIR"/diachron/shims/* "$shell_scripts" pushd "$DIR/master" docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:$golangci_lint golangci-lint run diff --git a/cmd b/cmd index 552a972..7c2e85d 100755 --- a/cmd +++ b/cmd @@ -13,7 +13,7 @@ if [ $# -lt 1 ]; then echo "Usage: ./cmd [args...]" echo "" echo "Available commands:" - for cmd in "$DIR"/framework/cmd.d/*; do + for cmd in "$DIR"/diachron/cmd.d/*; do if [ -x "$cmd" ]; then basename "$cmd" fi @@ -24,4 +24,4 @@ fi subcmd="$1" shift -exec "$DIR"/framework/cmd.d/"$subcmd" "$@" +exec "$DIR"/diachron/cmd.d/"$subcmd" "$@" diff --git a/develop b/develop index 5592ec1..f17d434 100755 --- a/develop +++ b/develop @@ -13,7 +13,7 @@ if [ $# -lt 1 ]; then echo "Usage: ./develop [args...]" echo "" echo "Available commands:" - for cmd in "$DIR"/framework/develop.d/*; do + for cmd in "$DIR"/diachron/develop.d/*; do if [ -x "$cmd" ]; then basename "$cmd" fi @@ -24,4 +24,4 @@ fi subcmd="$1" shift -exec "$DIR"/framework/develop.d/"$subcmd" "$@" +exec "$DIR"/diachron/develop.d/"$subcmd" "$@" diff --git a/framework/.nodejs-config/.gitignore b/diachron/.nodejs-config/.gitignore similarity index 100% rename from framework/.nodejs-config/.gitignore rename to diachron/.nodejs-config/.gitignore diff --git a/framework/.nodejs/.gitignore b/diachron/.nodejs/.gitignore similarity index 100% rename from framework/.nodejs/.gitignore rename to diachron/.nodejs/.gitignore diff --git a/framework/binaries/.gitignore b/diachron/binaries/.gitignore similarity index 100% rename from framework/binaries/.gitignore rename to diachron/binaries/.gitignore diff --git a/framework/cmd.d/list b/diachron/cmd.d/list similarity index 100% rename from framework/cmd.d/list rename to diachron/cmd.d/list diff --git a/framework/cmd.d/node b/diachron/cmd.d/node similarity index 100% rename from framework/cmd.d/node rename to diachron/cmd.d/node diff --git a/framework/cmd.d/pnpm b/diachron/cmd.d/pnpm similarity index 100% rename from framework/cmd.d/pnpm rename to diachron/cmd.d/pnpm diff --git a/framework/cmd.d/sync b/diachron/cmd.d/sync similarity index 100% rename from framework/cmd.d/sync rename to diachron/cmd.d/sync diff --git a/framework/cmd.d/test b/diachron/cmd.d/test similarity index 100% rename from framework/cmd.d/test rename to diachron/cmd.d/test diff --git a/framework/cmd.d/ts-node b/diachron/cmd.d/ts-node similarity index 100% rename from framework/cmd.d/ts-node rename to diachron/cmd.d/ts-node diff --git a/framework/cmd.d/tsx b/diachron/cmd.d/tsx similarity index 100% rename from framework/cmd.d/tsx rename to diachron/cmd.d/tsx diff --git a/framework/common.d/db b/diachron/common.d/db similarity index 100% rename from framework/common.d/db rename to diachron/common.d/db diff --git a/framework/common.d/migrate b/diachron/common.d/migrate similarity index 100% rename from framework/common.d/migrate rename to diachron/common.d/migrate diff --git a/framework/develop.d/clear-db b/diachron/develop.d/clear-db similarity index 100% rename from framework/develop.d/clear-db rename to diachron/develop.d/clear-db diff --git a/framework/develop.d/db b/diachron/develop.d/db similarity index 100% rename from framework/develop.d/db rename to diachron/develop.d/db diff --git a/framework/develop.d/db-url b/diachron/develop.d/db-url similarity index 100% rename from framework/develop.d/db-url rename to diachron/develop.d/db-url diff --git a/framework/develop.d/migrate b/diachron/develop.d/migrate similarity index 100% rename from framework/develop.d/migrate rename to diachron/develop.d/migrate diff --git a/framework/develop.d/reset-db b/diachron/develop.d/reset-db similarity index 100% rename from framework/develop.d/reset-db rename to diachron/develop.d/reset-db diff --git a/framework/downloads/.gitignore b/diachron/downloads/.gitignore similarity index 100% rename from framework/downloads/.gitignore rename to diachron/downloads/.gitignore diff --git a/framework/mgmt.d/add-user b/diachron/mgmt.d/add-user similarity index 100% rename from framework/mgmt.d/add-user rename to diachron/mgmt.d/add-user diff --git a/framework/mgmt.d/db b/diachron/mgmt.d/db similarity index 100% rename from framework/mgmt.d/db rename to diachron/mgmt.d/db diff --git a/framework/mgmt.d/migrate b/diachron/mgmt.d/migrate similarity index 100% rename from framework/mgmt.d/migrate rename to diachron/mgmt.d/migrate diff --git a/framework/platform b/diachron/platform similarity index 100% rename from framework/platform rename to diachron/platform diff --git a/framework/shims/common b/diachron/shims/common similarity index 100% rename from framework/shims/common rename to diachron/shims/common diff --git a/framework/shims/node b/diachron/shims/node similarity index 100% rename from framework/shims/node rename to diachron/shims/node diff --git a/framework/shims/node.common b/diachron/shims/node.common similarity index 94% rename from framework/shims/node.common rename to diachron/shims/node.common index ef55172..32b5c2d 100644 --- a/framework/shims/node.common +++ b/diachron/shims/node.common @@ -13,7 +13,7 @@ source "$node_common_DIR"/../platform # Get platform-specific node directory nodejs_dirname_var="nodejs_dirname_${platform}" nodejs_dirname="${!nodejs_dirname_var}" -nodejs_dist_dir="framework/binaries/$nodejs_dirname" +nodejs_dist_dir="diachron/binaries/$nodejs_dirname" nodejs_bin_dir="$nodejs_dist_dir/bin" nodejs_binary_dir="$project_root/$nodejs_bin_dir" diff --git a/framework/shims/npm b/diachron/shims/npm similarity index 100% rename from framework/shims/npm rename to diachron/shims/npm diff --git a/framework/shims/pnpm b/diachron/shims/pnpm similarity index 91% rename from framework/shims/pnpm rename to diachron/shims/pnpm index f6dab88..304429e 100755 --- a/framework/shims/pnpm +++ b/diachron/shims/pnpm @@ -11,6 +11,6 @@ source "$pnpm_shim_DIR"/node.common # shellcheck source=./common source "$pnpm_shim_DIR"/common -# cd $ROOT/framework/node +# cd $ROOT/diachron/node exec "$pnpm_shim_DIR"/../binaries/pnpm "$@" diff --git a/framework/versions b/diachron/versions similarity index 100% rename from framework/versions rename to diachron/versions diff --git a/docs/new-project.md b/docs/new-project.md index ff10bf4..9cb7c5a 100644 --- a/docs/new-project.md +++ b/docs/new-project.md @@ -38,11 +38,11 @@ you should convert the `.gitignore` file to whatever your version control system uses.) You should add the whole directory to git and commit it. There will be two -`.gitignore` files, one in the root, and one in the `framework/` directory. +`.gitignore` files, one in the root, and one in the `diachron/` directory. The root `.gitignore` created for you will be a good starting point, but you can make changes to it as you see fit. However, you should not ever modify -`framework/.gitignore`. More on this in the next section. +`diachron/.gitignore`. More on this in the next section. ### working with diachron diff --git a/fixup.sh b/fixup.sh index 5194cef..f098f2a 100755 --- a/fixup.sh +++ b/fixup.sh @@ -11,7 +11,7 @@ cd "$DIR" # uv run ruff format . shell_scripts="$(fd '.sh$' | xargs)" -shfmt -i 4 -w "$DIR/cmd" "$DIR"/framework/cmd.d/* "$DIR"/framework/shims/* "$DIR"/master/master "$DIR"/logger/logger +shfmt -i 4 -w "$DIR/cmd" "$DIR"/diachron/cmd.d/* "$DIR"/diachron/shims/* "$DIR"/master/master "$DIR"/logger/logger # "$shell_scripts" for ss in $shell_scripts; do shfmt -i 4 -w $ss @@ -21,6 +21,6 @@ pushd "$DIR/master" go fmt popd -pushd "$DIR/express" +pushd "$DIR/backend" ../cmd pnpm biome check --write popd diff --git a/mgmt b/mgmt index 703c2ed..ae623a0 100755 --- a/mgmt +++ b/mgmt @@ -13,7 +13,7 @@ if [ $# -lt 1 ]; then echo "Usage: ./mgmt [args...]" echo "" echo "Available commands:" - for cmd in "$DIR"/framework/mgmt.d/*; do + for cmd in "$DIR"/diachron/mgmt.d/*; do if [ -x "$cmd" ]; then basename "$cmd" fi @@ -24,4 +24,4 @@ fi subcmd="$1" shift -exec "$DIR"/framework/mgmt.d/"$subcmd" "$@" +exec "$DIR"/diachron/mgmt.d/"$subcmd" "$@" diff --git a/sync.sh b/sync.sh index 54af484..8719815 100755 --- a/sync.sh +++ b/sync.sh @@ -6,11 +6,11 @@ set -eu DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -# shellcheck source=framework/versions -source "$DIR/framework/versions" +# shellcheck source=diachron/versions +source "$DIR/diachron/versions" -# shellcheck source=framework/platform -source "$DIR/framework/platform" +# shellcheck source=diachron/platform +source "$DIR/diachron/platform" # Get platform-specific variables nodejs_binary_var="nodejs_binary_${platform}" @@ -26,11 +26,11 @@ pnpm_binary_url="${!pnpm_binary_var}" pnpm_checksum="${!pnpm_checksum_var}" # Set up paths for shims to use -nodejs_dist_dir="framework/binaries/$nodejs_dirname" +nodejs_dist_dir="diachron/binaries/$nodejs_dirname" nodejs_bin_dir="$nodejs_dist_dir/bin" # Ensure correct node version is installed -node_installed_checksum_file="$DIR/framework/binaries/.node.checksum" +node_installed_checksum_file="$DIR/diachron/binaries/.node.checksum" node_installed_checksum="" if [ -f "$node_installed_checksum_file" ]; then node_installed_checksum=$(cat "$node_installed_checksum_file") @@ -38,22 +38,22 @@ fi if [ "$node_installed_checksum" != "$nodejs_checksum" ]; then echo "Downloading Node.js for $platform..." - node_archive="$DIR/framework/downloads/node.tar.xz" + node_archive="$DIR/diachron/downloads/node.tar.xz" curl -fsSL "$nodejs_binary" -o "$node_archive" echo "Verifying checksum..." echo "$nodejs_checksum $node_archive" | sha256_check echo "Extracting Node.js..." - tar -xf "$node_archive" -C "$DIR/framework/binaries" + tar -xf "$node_archive" -C "$DIR/diachron/binaries" rm "$node_archive" echo "$nodejs_checksum" >"$node_installed_checksum_file" fi # Ensure correct pnpm version is installed -pnpm_binary="$DIR/framework/binaries/pnpm" -pnpm_installed_checksum_file="$DIR/framework/binaries/.pnpm.checksum" +pnpm_binary="$DIR/diachron/binaries/pnpm" +pnpm_installed_checksum_file="$DIR/diachron/binaries/.pnpm.checksum" pnpm_installed_checksum="" if [ -f "$pnpm_installed_checksum_file" ]; then pnpm_installed_checksum=$(cat "$pnpm_installed_checksum_file")