Skip to content

chore: update to framework 5.5.0 - #66

Merged
Systerr merged 1 commit into
mainfrom
chore/framework-5.5.0
Oct 3, 2026
Merged

Systerr merged 1 commit into
mainfrom
chore/framework-5.5.0

Conversation

@Systerr

@Systerr Systerr commented Oct 3, 2026

Copy link
Copy Markdown
Member

Summary

  • Framework 5.5.0: @adaptivestone/framework ^5.5.0. Only the framework moved in the lockfile.
  • createEnv replaces scripts/ensure-env.ts: npm run dev now runs npm run cli createEnv before nodemon. It copies .env.example to .env with a fresh AUTH_SALT and never overwrites an existing .env. The script is deleted; .env.example, AGENTS.md and the README are updated.
  • Coded, translated 404: GET /person/:id throws NotFoundError({ code: 'PERSON_NOT_FOUND', i18nKey: 'person.notFound', message: 'Person not found' }).
    • The response is { "error": "PERSON_NOT_FOUND", "message": "..." }, and src/locales/ru translates the message.
    • The test asserts the exact English body; tests don't load the app's locales, by design.
    • The README shows the Russian curl.
  • Error rules aligned with the framework contract:
    • .clinerules/01-ResponceType.md and 07-ErrorHandling.md now describe what the framework actually answers: { error?, message, errors?: { field: [msg] } }, with per-field arrays and no data.
    • They show throwing coded HttpErrors. 03 and 08 are unchanged for now.
  • No custom health route:
    • The bootHttp showcase registers POST /webhooks/example (202 { data: { received: true } }) instead of GET /health, with a note to verify provider signatures with timingSafeEqualStrings.
    • The framework now serves /health/live and /health/ready, and the README has a "Health checks" row for them.
    • The bootHttp test, configureServer.ts and .clinerules/11 follow the new route.

Verification (in the Docker backend container)

  • npm run check:types (codegen + tsc) and npm run check (Biome): pass
  • npm test: 9/9
  • Bun (docker compose --profile bun run --rm backend-bun): 9/9
  • createEnv on a fresh copy without .env: creates it with a 64-character salt, keeps every other line, and a second run changes nothing
  • Live server:
    • the 404 in English and Russian, with the code;
    • the Russian 401 AUTH001;
    • /health/live → 200, and /health/ready → 200 with the MongoDB check;
    • POST /webhooks/example → 202;
    • GET /health → the framework's 404.

Use the built-in createEnv command instead of scripts/ensure-env.ts,
show a coded, translated NotFoundError, align the response and error
rules with the framework's error contract, and replace the bootHttp
/health showcase with an example webhook now that the framework serves
/health/live and /health/ready.
@Systerr
Systerr merged commit 5ce6c89 into main Oct 3, 2026
12 checks passed
@Systerr
Systerr deleted the chore/framework-5.5.0 branch October 3, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant