Rename framework/ to diachron/ and update all references
Update paths in .gitignore, cmd, develop, mgmt, sync.sh, check.sh, fixup.sh, CLAUDE.md, docs/new-project.md, and backend/*.sh scripts. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
0
diachron/.nodejs-config/.gitignore
vendored
Normal file
0
diachron/.nodejs-config/.gitignore
vendored
Normal file
0
diachron/.nodejs/.gitignore
vendored
Normal file
0
diachron/.nodejs/.gitignore
vendored
Normal file
0
diachron/binaries/.gitignore
vendored
Normal file
0
diachron/binaries/.gitignore
vendored
Normal file
9
diachron/cmd.d/list
Executable file
9
diachron/cmd.d/list
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
cd "$DIR"
|
||||
|
||||
ls .
|
||||
7
diachron/cmd.d/node
Executable file
7
diachron/cmd.d/node
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
exec "$DIR"/../shims/node "$@"
|
||||
7
diachron/cmd.d/pnpm
Executable file
7
diachron/cmd.d/pnpm
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
"$DIR"/../shims/pnpm "$@"
|
||||
18
diachron/cmd.d/sync
Executable file
18
diachron/cmd.d/sync
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
# figure out the platform we're on
|
||||
|
||||
# source ../framework/versions
|
||||
# [eventually: check for it in user's cache dir
|
||||
# download $nodejs_version
|
||||
# verify its checksum against $nodejs_checksum
|
||||
|
||||
cd "$DIR/../node"
|
||||
|
||||
"$DIR"/pnpm install
|
||||
|
||||
echo we will download other files here later
|
||||
15
diachron/cmd.d/test
Executable file
15
diachron/cmd.d/test
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
cd "$DIR/../../express"
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
# Find all test files - use -print0/xargs to handle filenames safely
|
||||
find . -type f \( -name '*.spec.ts' -o -name '*.test.ts' \) -print0 | \
|
||||
xargs -0 "$DIR"/../shims/pnpm tsx --test
|
||||
else
|
||||
"$DIR"/../shims/pnpm tsx --test "$@"
|
||||
fi
|
||||
5
diachron/cmd.d/ts-node
Executable file
5
diachron/cmd.d/ts-node
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
"$DIR"/../shims/pnpm ts-node "$@"
|
||||
5
diachron/cmd.d/tsx
Executable file
5
diachron/cmd.d/tsx
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
"$DIR"/../shims/pnpm tsx "$@"
|
||||
9
diachron/common.d/db
Executable file
9
diachron/common.d/db
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
ROOT="$DIR/../.."
|
||||
|
||||
# FIXME: don't hard code this of course
|
||||
PGPASSWORD=diachron psql -U diachron -h localhost diachron
|
||||
9
diachron/common.d/migrate
Executable file
9
diachron/common.d/migrate
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
ROOT="$DIR/../.."
|
||||
|
||||
cd "$ROOT/express"
|
||||
"$DIR"/tsx migrate.ts "$@"
|
||||
11
diachron/develop.d/clear-db
Executable file
11
diachron/develop.d/clear-db
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This file belongs to the framework. You are not expected to modify it.
|
||||
|
||||
set -eu
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
ROOT="$DIR/../.."
|
||||
|
||||
cd "$ROOT/express"
|
||||
"$DIR"/../cmd.d/tsx develop/clear-db.ts "$@"
|
||||
1
diachron/develop.d/db
Symbolic link
1
diachron/develop.d/db
Symbolic link
@@ -0,0 +1 @@
|
||||
../common.d/db
|
||||
8
diachron/develop.d/db-url
Executable file
8
diachron/develop.d/db-url
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This file belongs to the framework. You are not expected to modify it.
|
||||
|
||||
set -eu
|
||||
|
||||
# FIXME: don't hard code this of course
|
||||
echo "postgres://diachron:diachron@localhost/diachron"
|
||||
1
diachron/develop.d/migrate
Symbolic link
1
diachron/develop.d/migrate
Symbolic link
@@ -0,0 +1 @@
|
||||
../common.d/migrate
|
||||
9
diachron/develop.d/reset-db
Executable file
9
diachron/develop.d/reset-db
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
ROOT="$DIR/../.."
|
||||
|
||||
cd "$ROOT/express"
|
||||
"$DIR"/../cmd.d/tsx develop/reset-db.ts "$@"
|
||||
0
diachron/downloads/.gitignore
vendored
Normal file
0
diachron/downloads/.gitignore
vendored
Normal file
9
diachron/mgmt.d/add-user
Executable file
9
diachron/mgmt.d/add-user
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
ROOT="$DIR/../.."
|
||||
|
||||
cd "$ROOT/express"
|
||||
"$DIR"/../cmd.d/tsx mgmt/add-user.ts "$@"
|
||||
1
diachron/mgmt.d/db
Symbolic link
1
diachron/mgmt.d/db
Symbolic link
@@ -0,0 +1 @@
|
||||
../common.d/db
|
||||
1
diachron/mgmt.d/migrate
Symbolic link
1
diachron/mgmt.d/migrate
Symbolic link
@@ -0,0 +1 @@
|
||||
../common.d/migrate
|
||||
26
diachron/platform
Normal file
26
diachron/platform
Normal file
@@ -0,0 +1,26 @@
|
||||
# shellcheck shell=bash
|
||||
|
||||
# Detect platform (OS and architecture)
|
||||
|
||||
os=$(uname -s | tr '[:upper:]' '[:lower:]')
|
||||
arch=$(uname -m)
|
||||
|
||||
case "$os" in
|
||||
linux) platform_os=linux ;;
|
||||
darwin) platform_os=darwin ;;
|
||||
*) echo "Unsupported OS: $os" >&2; exit 1 ;;
|
||||
esac
|
||||
|
||||
case "$arch" in
|
||||
x86_64) platform_arch=x86_64 ;;
|
||||
*) echo "Unsupported architecture: $arch" >&2; exit 1 ;;
|
||||
esac
|
||||
|
||||
platform="${platform_os}_${platform_arch}"
|
||||
|
||||
# Platform-specific checksum command
|
||||
if [ "$platform_os" = "darwin" ]; then
|
||||
sha256_check() { shasum -a 256 -c -; }
|
||||
else
|
||||
sha256_check() { sha256sum -c -; }
|
||||
fi
|
||||
5
diachron/shims/common
Normal file
5
diachron/shims/common
Normal file
@@ -0,0 +1,5 @@
|
||||
# Fix for https://www.shellcheck.net/wiki/SC2148
|
||||
# shellcheck shell=bash
|
||||
|
||||
common_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
export ROOT="$common_DIR/../../"
|
||||
12
diachron/shims/node
Executable file
12
diachron/shims/node
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This file belongs to the framework. You are not expected to modify it.
|
||||
|
||||
set -eu
|
||||
|
||||
node_shim_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
# shellcheck source=node.common
|
||||
source "$node_shim_DIR"/node.common
|
||||
|
||||
exec "$nodejs_binary_dir/node" "$@"
|
||||
29
diachron/shims/node.common
Normal file
29
diachron/shims/node.common
Normal file
@@ -0,0 +1,29 @@
|
||||
# Fix for https://www.shellcheck.net/wiki/SC2148
|
||||
# shellcheck shell=bash
|
||||
|
||||
node_common_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
project_root="$node_common_DIR/../.."
|
||||
|
||||
# shellcheck source=../versions
|
||||
source "$node_common_DIR"/../versions
|
||||
|
||||
# shellcheck source=../platform
|
||||
source "$node_common_DIR"/../platform
|
||||
|
||||
# Get platform-specific node directory
|
||||
nodejs_dirname_var="nodejs_dirname_${platform}"
|
||||
nodejs_dirname="${!nodejs_dirname_var}"
|
||||
nodejs_dist_dir="diachron/binaries/$nodejs_dirname"
|
||||
nodejs_bin_dir="$nodejs_dist_dir/bin"
|
||||
|
||||
nodejs_binary_dir="$project_root/$nodejs_bin_dir"
|
||||
|
||||
# This might be too restrictive. Or not restrictive enough.
|
||||
PATH="$nodejs_binary_dir":/bin:/usr/bin
|
||||
|
||||
node_dist_dir="$project_root/$nodejs_dist_dir"
|
||||
|
||||
export NPM_CONFIG_PREFIX="$node_dist_dir/npm"
|
||||
export NPM_CONFIG_CACHE="$node_dist_dir/cache"
|
||||
export NPM_CONFIG_TMP="$node_dist_dir/tmp"
|
||||
export NODE_PATH="$node_dist_dir/node_modules"
|
||||
13
diachron/shims/npm
Executable file
13
diachron/shims/npm
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
npm_shim_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
export npm_shim_DIR
|
||||
|
||||
# shellcheck source=node.common
|
||||
source "$npm_shim_DIR"/node.common
|
||||
|
||||
cd "$npm_shim_DIR"/../.nodejs-config
|
||||
echo in dir "$(pwd)"
|
||||
npm "$@"
|
||||
16
diachron/shims/pnpm
Executable file
16
diachron/shims/pnpm
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
pnpm_shim_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
export pnpm_shim_DIR
|
||||
|
||||
# shellcheck source=./node.common
|
||||
source "$pnpm_shim_DIR"/node.common
|
||||
|
||||
# shellcheck source=./common
|
||||
source "$pnpm_shim_DIR"/common
|
||||
|
||||
# cd $ROOT/diachron/node
|
||||
|
||||
exec "$pnpm_shim_DIR"/../binaries/pnpm "$@"
|
||||
26
diachron/versions
Normal file
26
diachron/versions
Normal file
@@ -0,0 +1,26 @@
|
||||
# shellcheck shell=bash
|
||||
|
||||
# This file belongs to the framework. You are not expected to modify it.
|
||||
|
||||
nodejs_version=v24.12.0
|
||||
|
||||
# https://nodejs.org/dist
|
||||
nodejs_binary_linux_x86_64=https://nodejs.org/dist/v24.12.0/node-v24.12.0-linux-x64.tar.xz
|
||||
nodejs_checksum_linux_x86_64=bdebee276e58d0ef5448f3d5ac12c67daa963dd5e0a9bb621a53d1cefbc852fd
|
||||
nodejs_dirname_linux_x86_64=node-v24.12.0-linux-x64
|
||||
|
||||
nodejs_binary_darwin_x86_64=https://nodejs.org/dist/v24.12.0/node-v24.12.0-darwin-x64.tar.xz
|
||||
nodejs_checksum_darwin_x86_64=1e4d54f706e0a3613d6415ffe2ccdfd4095d3483971dbbaa4ff909fac5fc211c
|
||||
nodejs_dirname_darwin_x86_64=node-v24.12.0-darwin-x64
|
||||
|
||||
caddy_binary_linux_x86_64=fixme
|
||||
caddy_checksum_linux_x86_64=fixmetoo
|
||||
|
||||
# https://github.com/pnpm/pnpm/releases
|
||||
pnpm_binary_linux_x86_64=https://github.com/pnpm/pnpm/releases/download/v10.28.0/pnpm-linux-x64
|
||||
pnpm_checksum_linux_x86_64=348e863d17a62411a65f900e8d91395acabae9e9237653ccc3c36cb385965f28
|
||||
|
||||
pnpm_binary_darwin_x86_64=https://github.com/pnpm/pnpm/releases/download/v10.28.0/pnpm-macos-x64
|
||||
pnpm_checksum_darwin_x86_64=99431e91d721169c2050d5e46abefc6f0d23c49e635a5964dcb573d9fe89975a
|
||||
|
||||
golangci_lint=v2.7.2-alpine
|
||||
Reference in New Issue
Block a user