14 Commits

Author SHA1 Message Date
e8d92f58dc Merge pull request 'chore: untrack .claude/settings.local.json (machine-specific)' (#4) from chore/gitignore-claude-settings-local into main
All checks were successful
ci / test (push) Successful in 12s
2026-05-14 03:33:10 +00:00
9c19d0f7d1 chore: untrack .claude/settings.local.json (machine-specific)
All checks were successful
ci / test (pull_request) Successful in 15s
2026-05-13 20:31:45 -07:00
7dbce6637c Merge pull request 'feat: v0.1.0 — sqlite-migrate package extraction from authd' (#1) from feat/initial-package into main
All checks were successful
ci / test (push) Successful in 11s
v0.1.0
2026-05-12 09:30:50 +00:00
93f5d63f26 refactor: dedupe INSERT SQL and DDL exec in migrate.ts
All checks were successful
ci / test (pull_request) Successful in 12s
- Extract INSERT_MIGRATION_SQL constant; was repeated three times.
- Hoist db.exec(SCHEMA_MIGRATIONS_DDL) above the genesis-stamp branch
  so it is no longer duplicated in both arms of the if/else.
- Prepare insertRow once and reuse it for both genesis-stamping and
  the per-file insert in the apply loop.
- Simplify existence probe in stampMigration to SELECT 1 and drop the
  misleading MigrationRow cast (only existence was checked).
2026-05-12 02:24:33 -07:00
accd3ca340 build: regenerate dist/ for v0.1.0
All checks were successful
ci / test (pull_request) Successful in 17s
Pre-compiled ESM JS + .d.ts from tsconfig.build.json. Consumers install
via 'git+https://gitea.bchen.dev/...#v0.1.0' so the built output must
travel with the source. CI verifies in-sync via 'git diff --exit-code
dist/'.
2026-05-12 02:17:02 -07:00
5096ca174f docs: replace placeholder README with v0.1.0 docs
Install via git+https with pinned tag, quick-start, API reference for the
4 runtime exports + the CLI sub-path, genesis-stamping explainer, the
per-consumer probe-table table for the six fleet consumers, security note
on the trusted-SQL boundary.
2026-05-12 02:16:50 -07:00
7e29d8afbd ci: add Gitea Actions workflow
Runs npm ci, typecheck, build, test, and a 'git diff --exit-code dist/'
gate that catches 'forgot to re-run npm run build' before merge. Fires on
PR / push to main / push to v* tags.
2026-05-12 02:16:45 -07:00
0af987651c chore: un-ignore /dist/
Appended '\!/dist/' override to the bottom of .gitignore so the committed
build output is tracked. node_modules and other Nuxt-template-default
entries remain ignored. Verified with 'git check-ignore -v dist/index.js'
(no match, exit 1).
2026-05-12 02:16:41 -07:00
7d194a9ced chore: add package.json, tsconfig pair, and vitest config
ESM-only, Node 20+, ships pre-compiled dist/. Peer dependency on
better-sqlite3 >=11 <13. Dev pins: typescript ^5.5, vitest ^4.0
(resolved to 4.1.6), better-sqlite3 12.6.2 (matches authd).

tsconfig.json (noEmit) is the dev/test config; tsconfig.build.json
extends it and emits .js + .d.ts to dist/. Relative imports inside src/
use .js extensions so the emitted JS resolves correctly at runtime.
2026-05-12 02:16:37 -07:00
7a7c5adf92 test: port migrate suite + add probe-table and CLI specs
15 vitest specs total:
- 9 lifted from authd's tests/db/migrate.test.ts. Specs that referenced
  the on-disk migrations dir now write fixtures into a per-test tmpdir
  (package ships no migrations dir of its own).
- 3 new specs covering the genesisProbeTable parameter (default, custom
  table name, opt-out via stampGenesis=false).
- 3 new specs covering runMigrateCli (migrate / status / stamp) using
  PassThrough stream capture.
2026-05-12 02:16:29 -07:00
a4c994ca9a feat: add runMigrateCli wrapper at sub-path './cli'
Extracts the union of authd's three CLI scripts (db-migrate.ts,
db-status.ts, db-stamp.ts) into one wrapper. Consumers wire a ~5-line shim
that injects their own openDb / migrationsDir / config-loading logic. The
wrapper returns an exit code rather than calling process.exit, which keeps
it testable via PassThrough stream capture.
2026-05-12 02:16:21 -07:00
d2dfa5f61b feat: add migration runner with genesisProbeTable param
Forward-only SQLite migration runner lifted from authd (src/db/migrate.ts,
PR #14 / merge ced21ab) and parameterized for cross-project use. The single
deliberate API change vs. authd's source: the previously-hardcoded
GENESIS_PROBE_TABLE = 'users' is now an ApplyOptions.genesisProbeTable?: string
option (default 'users').
2026-05-12 02:16:16 -07:00
293c748a96 chore: bootstrap sandbox settings 2026-05-12 01:58:29 -07:00
7c4f6c02f9 Initial commit 2026-05-12 07:00:57 +00:00