Skip to content

Conversation

@johnf
Copy link
Collaborator

@johnf johnf commented Oct 7, 2025

Implement flexible entity transformation pipeline with access control and custom transformers. Enables customisation of entity responses through composable transformers for access control, data enrichment, and response modification.

  • Add transformer types and base/default implementations
  • Update all entity routes to support transformer pipeline
  • Add comprehensive tests and snapshots for transformer functionality
  • Document transformer system with examples in CLAUDE.md and README.md
  • Add @total-typescript/ts-reset for improved type safety
  • Clean up package.json dependencies

@johnf johnf requested review from moisbo and r-tae October 7, 2025 21:57
@github-actions
Copy link

github-actions bot commented Oct 7, 2025

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 100% (🎯 100%) 632 / 632
🟢 Statements 100% (🎯 100%) 632 / 632
🟢 Functions 100% (🎯 100%) 23 / 23
🟢 Branches 100% (🎯 100%) 99 / 99
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/app.ts 100% 100% 100% 100%
src/routes/entities.ts 100% 100% 100% 100%
src/routes/entity.ts 100% 100% 100% 100%
src/routes/search.ts 100% 100% 100% 100%
src/test/integration.setup.ts 100% 100% 100% 100%
src/transformers/default.ts 100% 100% 100% 100%
src/utils/errors.ts 100% 100% 100% 100%
Generated in workflow #14 for commit 7c639de by the Vitest Coverage Report Action

README.md Outdated
});
```

**Default Behaviour**: If no `accessTransformer` is provided, all entities
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm nervous about anything public by default. Can we instead error by default and require a consumer to do something like:

import arocapi, { AllPublicAccessTransformer } from 'arocapi';

await server.register(arocapi, {
  prisma,
  opensearch,
  accessTransformer: AllPublicAccessTransformer
})

Implement flexible entity transformation pipeline with access control and custom transformers. Enables customisation of entity responses through composable transformers for access control, data enrichment, and response modification.

- Add transformer types and base/default implementations
- Update all entity routes to support transformer pipeline
- Add comprehensive tests and snapshots for transformer functionality
- Document transformer system with examples in CLAUDE.md and README.md
- Add @total-typescript/ts-reset for improved type safety
- Clean up package.json dependencies
@johnf johnf merged commit f39c90f into main Oct 14, 2025
1 check passed
@github-actions
Copy link

🎉 This PR is included in version 1.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants