# @ogre-tools/injectable-extension-for-auto-registration

> Auto-registration of injectables for Injectable in Ogre Tools

Latest version **27.0.0** (published 2026-08-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ogre-tools/injectable-extension-for-auto-registration
pnpm add @ogre-tools/injectable-extension-for-auto-registration
yarn add @ogre-tools/injectable-extension-for-auto-registration
bun add @ogre-tools/injectable-extension-for-auto-registration
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 27.0.0 |
| Published | 2026-08-31 |
| First published | 2022-04-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 165.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Ogre Works |
| Maintainers | jansav, iku-turso |
| Keywords | js |

## Links

- npm: https://www.npmjs.com/package/@ogre-tools/injectable-extension-for-auto-registration
- Repository: https://github.com/ogre-works/ogre-tools
- Homepage: https://github.com/ogre-works/ogre-tools#readme
- Issues: https://github.com/ogre-works/ogre-tools/issues
- npm.io page: https://npm.io/package/@ogre-tools/injectable-extension-for-auto-registration

## Dependencies (1)

- [lodash](https://npm.io/package/lodash.md) ^4.17.21

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 27.0.0 (latest) — 2026-08-31
- 26.1.0 — 2026-08-30
- 26.0.0 — 2026-08-27
- 25.1.0 — 2026-08-26
- 25.0.0 — 2026-08-24
- 24.0.0 — 2026-08-20
- 23.3.2 — 2026-08-17
- 23.2.0 — 2026-05-19
- 23.1.0 — 2026-05-07
- 23.0.1 — 2026-04-24
- 19.0.0 — 2026-02-20
- 17.11.1 — 2023-11-29
- 17.11.0 — 2023-10-26
- 18.0.1 — 2023-10-26
- 18.0.0 — 2023-10-23
- … 58 more at https://npm.io/package/@ogre-tools/injectable-extension-for-auto-registration/versions

## README

# Auto-registration for Injectable in Ogre Tools

Auto register injectables from default exports of files that match a require.context.

## Usage

```
$ npm install @ogre-tools/injectable
$ npm install @ogre-tools/injectable-extension-for-auto-registration

...
  const di = createContainer();
  
  autoRegister({ 
    di, 
    
    requireContexts: [
      require.context("./some-directory", true, /\.injectable\.(ts|tsx)$/),
      require.context("./some-other-directory", true, /\.injectable\.(ts|tsx)$/),
    ],
  });
```

## Documentation

Check unit tests for documentation.

---
_Source: https://npm.io/package/@ogre-tools/injectable-extension-for-auto-registration · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
