ioc-manifest 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,327 +1,547 @@
1
1
  # ioc-manifest
2
2
 
3
- **Build-time discovery and codegen for Awilix (PROXY mode).** This package generates a typed registration manifest from your TypeScript sources. It is **not** an IoC container and **does not replace Awilix** you still create an Awilix container and call `registerIocFromManifest` so discovered factories are registered with correct keys and lifetimes.
3
+ **Convention-based dependency discovery and codegen for [Awilix](https://github.com/jeffijoe/awilix).** Write factory functions, run the generator, get a fully typed IoC container — no manual registrations.
4
4
 
5
- At a glance:
6
-
7
- - **Discovers** `build*` (configurable) factory exports under `discovery.scanDirs`
8
- - **Infers** contracts from return types and dependency parameters
9
- - **Emits** `ioc-manifest.ts` (data for registration) and `ioc-registry.types.ts` (typed cradle)
10
- - **Registers** everything into Awilix via the small runtime helper in this package
5
+ ```
6
+ npm install ioc-manifest
7
+ ```
11
8
 
12
9
  ---
13
10
 
14
- ## What this is / is not
11
+ ## The problem
15
12
 
16
- | This package | Not this package |
17
- | --- | --- |
18
- | Codegen + conventions + validation | A general-purpose DI container |
19
- | Works with **Awilix PROXY** mode and flat resolvers | Class/decorator frameworks (NestJS, Inversify, …) |
20
- | **Production policy** in **`ioc.config` only** | Per-factory registration metadata in source files |
13
+ In most Node.js DI setups, every new service means another `container.register(...)` call, another import, another string key to keep in sync. Scale that to 50+ services and registration code becomes a maintenance burden. Awilix's `loadModules` helps, but you lose type safety — `container.resolve("userService")` returns `any` unless you maintain a cradle type by hand.
21
14
 
22
- **Factories must stay plain exports** (typically arrow functions). **Do not** attach `lifetime`, `scope`, `name`, `accessKey`, or other registration options to factory definitions. Those belong only in **`ioc.config.ts`** (`registrations`, `discovery.scanDirs[].scope`, groups, etc.). The generator does not look for a `{ factory, lifetime }` object pattern in your codebase.
15
+ ## What this does
23
16
 
24
- ---
17
+ `ioc-manifest` scans your TypeScript source at **build time**, discovers factory functions by naming convention, infers their contracts and dependencies from the type system, and generates two files:
25
18
 
26
- ## Mental model
19
+ 1. **`ioc-manifest.ts`** — a registration manifest with every factory, its contract, lifetime, and module import
20
+ 2. **`ioc-registry.types.ts`** — a fully typed `IocGeneratedCradle` interface for your container
27
21
 
28
- ```
29
- Factory export → inferred contract → registration plan (config + conventions)
30
- → generated manifest → Awilix container (your app)
31
- ```
22
+ Hand those to Awilix and you're done. Every factory is registered with the correct key and lifetime, the container is fully typed, and you never write a registration line again.
32
23
 
33
- You write small **factory functions**. The TypeScript program is analyzed at codegen time. The output manifest lists modules, registration keys, lifetimes, and defaults; the runtime applies that list to Awilix.
24
+ The approach is loosely inspired by [StructureMap](https://structuremap.github.io/)'s registry scanning conventions from the .NET world convention over configuration, with a single config file as the policy surface when you need to override defaults.
25
+
26
+ ## What you get for free
27
+
28
+ - **Auto-discovery** — export `buildUserService` and it's registered as `userService` returning `UserService`
29
+ - **Typed container** — `container.resolve("userService")` returns `UserService`, not `any`
30
+ - **Plural collections** — two implementations of `MediaStorage` automatically get a `mediaStorages: ReadonlyArray<MediaStorage>` key
31
+ - **Default selection** — convention picks the default; override in config when you have multiple implementations
32
+ - **Works in dev and prod** — discovers from TypeScript source during development, and works just as well against a bundled single-file production build (see [Dev and production builds](#dev-and-production-builds))
34
33
 
35
34
  ---
36
35
 
37
- ## Conventions
36
+ ## Quick start
38
37
 
39
- ### Factory shape
38
+ ### 1. Create factories
40
39
 
41
- Use a **function** (named `build…` by default) with an explicit or inferable return type. Dependencies are taken by **parameter destructuring** in PROXY mode; after registration, Awilix passes a cradle object whose properties match your generated keys.
40
+ Write plain factory functions. The naming convention `build<Name>` is the only requirement.
42
41
 
43
- **Good — plain export, policy in `ioc.config`:**
42
+ ```ts
43
+ // src/services/buildUserRepository.ts
44
+ export type UserRepository = {
45
+ findById: (id: string) => Promise<User | undefined>;
46
+ };
47
+
48
+ export const buildUserRepository = (): UserRepository => ({
49
+ findById: async (id) => db.users.find(id),
50
+ });
51
+ ```
44
52
 
45
53
  ```ts
46
- import type { UserRepository } from "./UserRepository.js";
47
- import type { UserService } from "./UserService.js";
54
+ // src/services/buildUserService.ts
55
+ import type { UserRepository } from "./buildUserRepository.js";
48
56
  import type { IocGeneratedCradle } from "../generated/ioc-registry.types.js";
49
57
 
58
+ export type UserService = {
59
+ getUser: (id: string) => Promise<User | undefined>;
60
+ };
61
+
50
62
  export const buildUserService = ({
51
63
  userRepository,
52
- }: IocGeneratedCradle): UserService => {
53
- return {
54
- getUser: (id) => userRepository.findById(id),
55
- };
56
- };
64
+ }: IocGeneratedCradle): UserService => ({
65
+ getUser: (id) => userRepository.findById(id),
66
+ });
57
67
  ```
58
68
 
59
- **Not documented or supported registration data on the factory:**
69
+ Dependencies are declared via parameter destructuring against the generated cradle type. After generation, TypeScript tells you exactly what's available.
60
70
 
61
- ```ts
62
- // Do not do this. Lifetime, scope, and keys belong in ioc.config only.
63
- export const buildThing = {
64
- lifetime: "scoped",
65
- factory: () => {
66
- /* … */
67
- },
68
- };
69
- ```
71
+ ### 2. Configure
70
72
 
71
- Class-based constructor injection is out of scope for the intended workflow; you can use classes as *return values*, but the primary pattern is factories + PROXY cradle.
73
+ Create `ioc.config.ts` at your package root or under `src/`:
72
74
 
73
- ### Key derivation
75
+ ```ts
76
+ import { defineIocConfig } from "ioc-manifest";
74
77
 
75
- For a factory `buildHttpClient` returning `MyService`:
78
+ export default defineIocConfig({
79
+ discovery: {
80
+ scanDirs: "src",
81
+ generatedDir: "generated",
82
+ },
83
+ });
84
+ ```
76
85
 
77
- - **Contract** `MyService` (return type symbol name)
78
- - **Implementation id** → `httpClient` (export name with prefix stripped, first char lowercased)
79
- - **Default access key** → `myService` (camel-cased contract name)
86
+ That's the minimal config. The generator scans `src/` for `build*` exports and writes output to `generated/`.
80
87
 
81
- Resolvers:
88
+ ### 3. Generate
82
89
 
83
- - `container.resolve("myService")` — default implementation for that contract (unless overridden)
84
- - `container.resolve("httpClient")` — this implementation by registration key
85
- - `container.resolve("myServices")` — array when multiple implementations exist and a plural collection key applies
90
+ ```bash
91
+ npx ioc generate
92
+ ```
86
93
 
87
- Exact keys and lifetimes can be overridden in **`ioc.config`** (see below).
94
+ Run this after changing factories or config. The generator prints a summary:
88
95
 
89
- ---
96
+ ```
97
+ Generated generated/ioc-manifest.ts — 12 module factory(ies), 8 contract(s).
98
+ ```
90
99
 
91
- ## `ioc.config` single source of policy
100
+ You can also call `generateManifest()` programmatically if you need to integrate generation into a custom build script.
92
101
 
93
- Put **`ioc.config.ts`** at the package root or under `src/` (see path resolution below). Export **`defineIocConfig({...})`** or a plain object (validation is the same).
102
+ ### 4. Bootstrap Awilix
94
103
 
95
- Only these top-level keys are allowed: `discovery`, `registrations`, `groups`. Unknown keys fail validation with `[ioc-config]`.
104
+ ```ts
105
+ import { createContainer, InjectionMode } from "awilix";
106
+ import { registerIocFromManifest } from "ioc-manifest";
107
+ import { iocManifest } from "./generated/ioc-manifest.js";
108
+ import type { IocGeneratedCradle } from "./generated/ioc-registry.types.js";
96
109
 
97
- ### `discovery`
110
+ const container = createContainer<IocGeneratedCradle>({
111
+ injectionMode: InjectionMode.PROXY,
112
+ });
98
113
 
99
- | Field | Purpose |
100
- | --- | --- |
101
- | `scanDirs` | **Required.** Non-empty string, string array, or array of objects `{ path, importPrefix?, importMode?, scope? }` (see below). Paths are relative to the **package root** (parent of `src/` when config lives in `src/`), unless absolute. |
102
- | `includes` / `excludes` | Optional glob lists for discovery (defaults exist when omitted — tighten for your repo). |
103
- | `factoryPrefix` | Prefix for factory exports (default `build`). |
104
- | `generatedDir` | Where `ioc-manifest.ts` and `ioc-registry.types.ts` are written (default `generated`). |
105
- | `workspacePackageImportBases` | Optional `{ root, importBase }[]` so contract types emitted under a package root use a **public** bare specifier instead of deep relative paths. Each entry allows only `root` and `importBase`; both must be non-empty strings. |
114
+ registerIocFromManifest(container, iocManifest);
106
115
 
107
- #### Discovery roots and `scanDirs`
116
+ // Fully typed no 'any', no string guessing
117
+ const userService = container.resolve("userService");
118
+ ```
108
119
 
109
- Each entry defines a **discovery root**: factories under that tree are discovered using the same TS program as your app. If you use **object** entries:
120
+ That's all you need for most applications. The sections below cover the conventions in more detail, and the [Advanced usage](#advanced-usage) section covers features you can reach for when your app grows folder-scoped lifetimes, groups, monorepo support, and environment-specific configs.
110
121
 
111
- - **`scope`** — default Awilix lifetime (`singleton` \| `scoped` \| `transient`) for factories whose source file resolves to this root. Per-implementation `registrations[Contract][impl].lifetime` wins. If one file could match multiple roots with different `scope` values, generation fails with an actionable error.
112
- - **`importPrefix` + `importMode`** — control how **generated imports** refer to factory modules. When `importPrefix` is set, `importMode` must be `root` (emit exactly that prefix) or `subpath` (emit `${importPrefix}/${pathFromScanRoot}`). `importPrefix` cannot be used without `importMode`. `importMode: "root"` without `importPrefix` is rejected.
122
+ ---
113
123
 
114
- Relative imports in generated files are always written so consumers depend on **supported** paths (package root, aliases you configured) — not on private paths inside `node_modules`.
124
+ ## What gets generated
115
125
 
116
- ### `registrations`
126
+ Here's what the output looks like for a small app. You never edit these files — they're regenerated from source.
117
127
 
118
- Override **defaults**, **lifetimes**, **Awilix registration keys** (`name`), and **contract-level** settings.
128
+ **`ioc-registry.types.ts`** the typed cradle:
119
129
 
120
- - Keys at `registrations[ContractName]` are **implementation names** from discovery (`buildX` → `x`), except the reserved **`$contract`** object for contract-level options.
121
- - Under each implementation, only **`name`**, **`lifetime`**, **`default`** are allowed.
122
- - Under **`$contract`**, only **`accessKey`** is allowed (non-empty string; cannot be `"$contract"`).
130
+ ```ts
131
+ /* AUTO-GENERATED. DO NOT EDIT. */
132
+ import type { Logger } from "../services/buildConsoleLogger.js";
133
+ import type { MediaStorage } from "../services/buildLocalMediaStorage.js";
134
+ import type { UserService } from "../services/buildUserService.js";
135
+
136
+ export interface IocGeneratedTypes {
137
+ logger: Logger;
138
+ mediaStorage: MediaStorage;
139
+ mediaStorages: ReadonlyArray<MediaStorage>;
140
+ userService: UserService;
141
+ }
142
+
143
+ export type IocGeneratedCradle = IocGeneratedTypes;
144
+ ```
123
145
 
124
- **`accessKey`** cradle / default-slot property for the contract when it should differ from the camel-cased contract name (e.g. singular `database` while the type is `Knex`).
146
+ Notice `mediaStorages` (plural) that appeared automatically because there are multiple `MediaStorage` implementations.
125
147
 
126
- **`$contract` example:**
148
+ **`ioc-manifest.ts`** — the registration data:
127
149
 
128
150
  ```ts
129
- registrations: {
130
- Knex: {
131
- $contract: { accessKey: "database" },
132
- pg: { default: true, lifetime: "singleton" },
151
+ /* AUTO-GENERATED. DO NOT EDIT. */
152
+ import type {
153
+ IocGeneratedContainerManifest,
154
+ IocModuleNamespace,
155
+ } from "ioc-manifest";
156
+
157
+ import * as ioc_services_buildConsoleLogger from "../services/buildConsoleLogger.js";
158
+ import * as ioc_services_buildLocalMediaStorage from "../services/buildLocalMediaStorage.js";
159
+ // ... more imports ...
160
+
161
+ export const iocManifest = {
162
+ moduleImports: [
163
+ /* ... */
164
+ ] as const satisfies readonly IocModuleNamespace[],
165
+ contracts: {
166
+ Logger: {
167
+ consoleLogger: {
168
+ exportName: "buildConsoleLogger",
169
+ registrationKey: "consoleLogger",
170
+ contractName: "Logger",
171
+ implementationName: "consoleLogger",
172
+ lifetime: "singleton",
173
+ moduleIndex: 0,
174
+ default: true,
175
+ discoveredBy: "naming",
176
+ },
177
+ },
178
+ // ... more contracts ...
133
179
  },
134
- },
180
+ } as const satisfies IocGeneratedContainerManifest;
135
181
  ```
136
182
 
137
- ### Default implementation when multiple factories share a contract
183
+ ---
138
184
 
139
- Order of precedence:
185
+ ## How conventions work
140
186
 
141
- 1. **`default: true`** on exactly one implementation under `registrations[Contract]` (after merges).
142
- 2. **Convention** — implementation whose registration key equals the camel-cased contract name (e.g. `myService` for `MyService`).
143
- 3. **Single implementation** — if only one exists, it becomes the default.
187
+ ### Factory discovery
144
188
 
145
- If more than one row is marked `default: true`, or the choice is otherwise ambiguous, generation fails with a clear error. **Defaults are configured only in `ioc.config`**, not in factory source files.
189
+ The generator looks for exported functions whose name starts with `build` (configurable via `factoryPrefix`). For `buildHttpClient`:
146
190
 
147
- ### Groups
191
+ | Concept | Derived value |
192
+ | ----------------------- | ----------------------------------------------------- |
193
+ | **Contract** | The return type's symbol name, e.g. `HttpClient` |
194
+ | **Implementation name** | Strip prefix, lowercase first char → `httpClient` |
195
+ | **Registration key** | Same as implementation name by default → `httpClient` |
196
+ | **Default access key** | Camel-cased contract name → `httpClient` |
148
197
 
149
- Optional `groups` map names to `{ kind: "collection" \| "object", baseType: "SomeType" }` so multiple contracts assignable to `SomeType` appear as an array (`collection`) or object (`object`) on the cradle. Only `kind` and `baseType` are allowed per entry.
198
+ The contract type must be a named type (interface or type alias) that is imported or declared in the factory's file. Anonymous object literals, primitives, and union types are skipped.
150
199
 
151
- ---
200
+ ### Default implementation selection
201
+
202
+ When a contract has only one implementation, it is the default. When there are multiple, the default is selected by this precedence:
203
+
204
+ 1. **Explicit** — `default: true` on exactly one implementation in `ioc.config`
205
+ 2. **Convention** — the implementation whose registration key equals the camel-cased contract name (e.g. `mediaStorage` for `MediaStorage`)
206
+ 3. **Single** — if only one implementation exists, it's the default
207
+
208
+ If the choice is ambiguous, generation fails with a clear error telling you what to do.
209
+
210
+ ### Automatic collections
152
211
 
153
- ## Generated files
212
+ When a contract has more than one implementation, a plural collection key is auto-registered. `MediaStorage` with implementations `localMediaStorage` and `s3MediaStorage` gives you:
154
213
 
155
- | File | Role |
156
- | --- | --- |
157
- | `ioc-manifest.ts` | Imports factory modules and exports `iocManifest` consumed by `registerIocFromManifest` |
158
- | `ioc-registry.types.ts` | `IocGeneratedCradle` and related types for `container.resolve` |
214
+ - `container.resolve("mediaStorage")` the default `MediaStorage`
215
+ - `container.resolve("localMediaStorage")` the local implementation
216
+ - `container.resolve("s3MediaStorage")` the S3 implementation
217
+ - `container.resolve("mediaStorages")` `ReadonlyArray<MediaStorage>` with all implementations
159
218
 
160
- Treat them as build artifacts: **do not edit by hand**. Regenerate after changing factories or config.
219
+ Pluralization handles common English patterns (`Service` `services`, `Factory` `factories`, `Cache` `caches`).
161
220
 
162
- Imports in generated modules use types from the **`ioc-manifest`** package (`IocGeneratedContainerManifest`, etc.)not deep imports into this repo’s `src/`.
221
+ This is the same fundamental idea behind having multiple implementations of a single interface in any IoC container: you can swap implementations by environment. Have one `ioc.config` for production that points to real services, a different one for development that uses local stubs, and a third for testing that wires in mocks without touching any factory source code. The config is the only thing that changes.
222
+
223
+ ### Dependency inference
224
+
225
+ The generator analyzes each factory's first parameter to determine which contracts it depends on. If `buildUserService` destructures `{ userRepository }` and `UserRepository` is a known contract, the manifest records that dependency relationship. This powers the resolution chain in error messages.
163
226
 
164
227
  ---
165
228
 
166
- ## Quick start
229
+ ## `ioc.config.ts` — single source of policy
167
230
 
168
- ### 1. Configure
231
+ All registration policy lives in one file. Factory source files stay plain — no decorators, no metadata objects, no `RESOLVER` symbols.
169
232
 
170
233
  ```ts
171
- // src/ioc.config.ts
172
234
  import { defineIocConfig } from "ioc-manifest";
173
235
 
174
236
  export default defineIocConfig({
175
237
  discovery: {
176
- scanDirs: "src",
177
- includes: ["**/*.{ts,tsx}"],
178
- excludes: ["**/*.test.ts", "generated/**/*"],
179
- factoryPrefix: "build",
180
- generatedDir: "generated",
238
+ /* where to scan */
239
+ },
240
+ registrations: {
241
+ /* overrides per contract/implementation */
242
+ },
243
+ groups: {
244
+ /* cross-contract grouping by base type (advanced) */
181
245
  },
182
246
  });
183
247
  ```
184
248
 
185
- ### 2. Factories
249
+ ### `discovery`
186
250
 
187
- ```ts
188
- import type { MyService } from "./MyService.js";
251
+ | Field | Purpose | Default |
252
+ | ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
253
+ | `scanDirs` | **Required.** Directories to scan. String, string array, or array of `{ path, scope?, importPrefix?, importMode? }` objects. | — |
254
+ | `includes` | Glob patterns for files to include. | `["**/*.{ts,tsx,js,mjs,cjs}"]` |
255
+ | `excludes` | Glob patterns for files to exclude. | `["**/*.d.ts", "**/*.test.ts", ...]` |
256
+ | `factoryPrefix` | Export name prefix for factory discovery. | `"build"` |
257
+ | `generatedDir` | Output directory for generated files. | `"generated"` |
258
+ | `workspacePackageImportBases` | Maps workspace roots to bare specifiers for generated imports (see [Monorepo support](#monorepo-support-importprefix)). | — |
189
259
 
190
- export const buildHttpClient = (): MyService => {
191
- return { doThing: () => "hello" };
192
- };
260
+ ### `registrations`
261
+
262
+ Override defaults, lifetimes, and keys per contract and implementation.
263
+
264
+ ```ts
265
+ registrations: {
266
+ MediaStorage: {
267
+ s3MediaStorage: { default: true, lifetime: "singleton" },
268
+ localMediaStorage: { lifetime: "transient" },
269
+ },
270
+ Knex: {
271
+ $contract: { accessKey: "database" },
272
+ pg: { default: true, lifetime: "singleton" },
273
+ },
274
+ },
193
275
  ```
194
276
 
195
- ### 3. Generate
277
+ Under each contract name, keys are implementation names from discovery (`buildFoo` → `foo`). The reserved `$contract` key holds contract-level options.
196
278
 
197
- Programmatic:
279
+ | Per-implementation field | Effect |
280
+ | ------------------------ | ------------------------------------------------------------ |
281
+ | `name` | Overrides the Awilix registration key |
282
+ | `lifetime` | `"singleton"` \| `"scoped"` \| `"transient"` |
283
+ | `default` | `true` to select this implementation as the contract default |
198
284
 
199
- ```ts
200
- import { generateManifest } from "ioc-manifest";
285
+ | `$contract` field | Effect |
286
+ | ----------------- | ----------------------------------------------------------------------------------------------- |
287
+ | `accessKey` | Overrides the cradle property name for the default slot (e.g. `"database"` instead of `"knex"`) |
201
288
 
202
- await generateManifest();
203
- ```
289
+ ---
204
290
 
205
- Or run your own script that calls `generateManifest({ iocConfigPath: "…" })` when needed. The repo uses `tsx` to run an internal generator script; consumers typically wire `generateManifest` into a `package.json` script.
291
+ ## Dev and production builds
206
292
 
207
- To debug the generator CLI with full stack traces, run with **`IOC_DEBUG=1`** (otherwise only the error message is printed to stderr).
293
+ Getting an IoC container to work across development (loose TypeScript source files) and production (a bundled single-file build) is a real headache. `ioc-manifest` handles both cases because the generated manifest uses static `import * as ...` statements rather than runtime filesystem scanning.
208
294
 
209
- ### 4. Bootstrap Awilix
295
+ In **development**, the generator discovers factories from your TypeScript source tree and emits relative imports that point to your `.ts` files (via `.js` extensions for ESM). Everything resolves naturally through your dev toolchain (tsx, ts-node, etc.).
210
296
 
211
- ```ts
212
- import { createContainer, InjectionMode } from "awilix";
213
- import { registerIocFromManifest } from "ioc-manifest";
214
- import { iocManifest } from "./generated/ioc-manifest.js";
215
- import type { IocGeneratedCradle } from "./generated/ioc-registry.types.js";
297
+ In **production**, if you bundle your app into a single file (esbuild, rollup, etc.), those same static imports get resolved and inlined by the bundler. The manifest doesn't do any filesystem scanning at runtime — it's just a data structure with pre-resolved imports. Your bundler treats it like any other module graph.
216
298
 
217
- const container = createContainer<IocGeneratedCradle>({
218
- injectionMode: InjectionMode.PROXY,
219
- });
299
+ This was a deliberate design choice (and a painful one to get right). There's no `loadModules` glob at runtime, no dynamic `require`, no filesystem walking. The generated manifest is a plain TypeScript module that any bundler can tree-shake and inline.
220
300
 
221
- registerIocFromManifest(container, iocManifest);
301
+ ---
222
302
 
223
- const svc = container.resolve("myService");
303
+ ## CLI: `ioc`
304
+
305
+ ```bash
306
+ npx ioc # prints help
307
+ npx ioc generate # discover factories, emit manifest + types
308
+ npx ioc generate -c ./ioc.config.test.ts # generate with a specific config
309
+ npx ioc inspect # loads the generated manifest and prints a summary
310
+ npx ioc inspect --discovery # re-runs discovery without reading the manifest
311
+ npx ioc inspect --config ./src/ioc.config.ts --project ./packages/api
224
312
  ```
225
313
 
226
- (Use your project’s actual `InjectionMode` import from `awilix`.)
314
+ | Flag | Purpose |
315
+ | -------------------------- | --------------------------------------------------------------------------------------- |
316
+ | `--discovery` | (inspect only) Re-run factory discovery and planning; don't read the generated manifest |
317
+ | `--config PATH`, `-c PATH` | Explicit path to `ioc.config.ts` |
318
+ | `--project PATH` | Project directory for config resolution (default: cwd) |
319
+
320
+ Set `IOC_DEBUG=1` for full stack traces on errors.
227
321
 
228
322
  ---
229
323
 
230
- ## CLI: `ioc`
324
+ ## Error handling
231
325
 
232
- The `ioc` binary is included for inspecting manifests and discovery. **Help** (exit **0**):
326
+ Errors are designed to tell you exactly what went wrong and what to do about it.
327
+
328
+ **Config errors** are prefixed `[ioc-config]` — unknown contracts in `registrations`, duplicate defaults, key collisions. These fail at generation time before any files are written.
329
+
330
+ **Discovery errors** are prefixed `[ioc]` — duplicate registration keys, unresolvable contract types, overlapping scan directories with conflicting scopes.
331
+
332
+ **Runtime resolution errors** use `IocResolutionError` with structured dependency chains:
233
333
 
234
- ```bash
235
- npx ioc
236
- npx ioc --help # same as -h
237
- npx ioc -h
238
- npx ioc inspect --help
239
- npx ioc inspect -h
240
334
  ```
335
+ [ioc] Cannot build AlbumService using implementation albumService.
241
336
 
242
- **Inspect** (same flags as always):
337
+ Resolution chain:
338
+ AlbumService (albumService) [services/buildAlbumService.ts]
339
+ -> MediaStorage (s3MediaStorage) [services/buildS3MediaStorage.ts]
340
+ -> S3Client ✖ no registered implementation
341
+ ```
243
342
 
244
- ```bash
245
- npx ioc inspect
246
- npx ioc inspect --discovery
247
- npx ioc inspect --config ./src/ioc.config.ts --project ./packages/api
248
- # Equivalent: ... -c ./src/ioc.config.ts
343
+ Missing dependencies, cyclic references, lifetime violations, and factory exceptions are all caught and reported with the full resolution path.
344
+
345
+ ---
346
+
347
+ ## Advanced usage
348
+
349
+ The basics — factory discovery, typed cradle, automatic collections — cover most applications. The features below are things you can reach for when your app grows or your architecture demands more structure.
350
+
351
+ ### Folder-scoped lifetimes
352
+
353
+ If you find yourself setting `lifetime: "scoped"` on dozens of individual services and repositories, you probably want folder-scoped lifetimes instead. Rather than annotating each factory, you tell the generator that everything under a directory defaults to a specific lifetime:
354
+
355
+ ```ts
356
+ discovery: {
357
+ scanDirs: [
358
+ { path: "src/services", scope: "scoped" },
359
+ { path: "src/repos", scope: "scoped" },
360
+ { path: "src/infra", scope: "singleton" },
361
+ { path: "src/handlers", scope: "transient" },
362
+ ],
363
+ },
249
364
  ```
250
365
 
251
- | Flag | Meaning |
252
- | --- | --- |
253
- | `--discovery` | Re-run factory discovery / registration planning; do **not** read the generated manifest. |
254
- | `--config PATH` , `-c PATH` | Explicit `ioc.config.ts` path. |
255
- | `--project PATH` | Directory used to resolve config (default: current directory). |
366
+ This came out of a real pattern: in a GraphQL API, services and repositories are scoped to the request, infrastructure clients (database pools, caches) are singletons, and HTTP handlers are transient. Instead of repeating that in `registrations` for every single factory, you express it structurally — the directory _is_ the policy.
256
367
 
257
- - **`ioc inspect`** — loads the **generated** `ioc-manifest.ts` from disk (same path resolution as generation), prints a contract/implementation summary.
258
- - **`ioc inspect --discovery`** — re-runs discovery and registration planning without reading the manifest (good for “why didn’t this register?”).
368
+ Per-implementation overrides in `registrations` always take precedence, so you can still make exceptions when needed.
259
369
 
260
- Malformed CLI usage (wrong command / unknown flag) exits **1** with a short message plus a usage hint; **help** and successful **inspect** exit **0**. Manifest or environment failures from Node loaders also exit **1** unless you set **`IOC_DEBUG=1`** for full stack traces.
370
+ ### Groups
261
371
 
262
- ---
372
+ Groups let you collect implementations across contracts by their assignability to a base type. There are two kinds — `collection` and `object` — and they solve different real-world problems.
263
373
 
264
- ## Larger example (repositories / services / routes)
374
+ #### Collection groups: the strategy pattern
265
375
 
266
- **`src/repos/buildUserRepository.ts`**
376
+ Say you have a pricing engine with five discount strategies, each implementing the same interface:
267
377
 
268
378
  ```ts
269
- import type { UserRepository } from "./UserRepository.js";
379
+ export type DiscountStrategy = {
380
+ applies: (order: Order) => boolean;
381
+ calculate: (order: Order) => number;
382
+ };
270
383
 
271
- export const buildUserRepository = (): UserRepository => ({
272
- findById: async () => undefined,
273
- });
384
+ // buildVolumeDiscount.ts DiscountStrategy
385
+ // buildSeasonalDiscount.ts DiscountStrategy
386
+ // buildLoyaltyDiscount.ts → DiscountStrategy
387
+ // buildCouponDiscount.ts → DiscountStrategy
388
+ // buildBundleDiscount.ts → DiscountStrategy
274
389
  ```
275
390
 
276
- **`src/services/buildUserService.ts`**
391
+ Without groups, you'd have to manually wire all five into an array. With a collection group:
277
392
 
278
393
  ```ts
279
- import type { UserRepository } from "../repos/UserRepository.js";
280
- import type { UserService } from "./UserService.js";
281
- import type { IocGeneratedCradle } from "../../generated/ioc-registry.types.js";
394
+ groups: {
395
+ discountStrategies: {
396
+ kind: "collection",
397
+ baseType: "DiscountStrategy",
398
+ },
399
+ },
400
+ ```
282
401
 
283
- export const buildUserService = ({
284
- userRepository,
285
- }: IocGeneratedCradle): UserService => ({
286
- get: (id) => userRepository.findById(id),
402
+ Now `container.resolve("discountStrategies")` gives you `ReadonlyArray<DiscountStrategy>` — every implementation that's assignable to the base type, discovered automatically. Your strategy runner just iterates through the array:
403
+
404
+ ```ts
405
+ export const buildPricingEngine = ({
406
+ discountStrategies,
407
+ }: IocGeneratedCradle): PricingEngine => ({
408
+ applyDiscounts: (order) => {
409
+ for (const strategy of discountStrategies) {
410
+ if (strategy.applies(order)) {
411
+ order.discount += strategy.calculate(order);
412
+ }
413
+ }
414
+ return order;
415
+ },
287
416
  });
288
417
  ```
289
418
 
290
- **`ioc.config.ts`** (lifetimes and defaults here, not in the files above):
419
+ Add a sixth strategy? Just create the factory. It shows up in the group automatically — no registration changes.
420
+
421
+ #### Object groups: bundling related services
422
+
423
+ Object groups are for when you have several services that implement a common base type and you want to access them as a keyed bundle rather than an array. A real example: in a GraphQL API, you might have a set of user-scoped read services that all need to be available on the resolver context:
291
424
 
292
425
  ```ts
293
- export default defineIocConfig({
294
- discovery: { scanDirs: "src", generatedDir: "generated" },
295
- registrations: {
296
- UserService: {
297
- userService: { default: true, lifetime: "scoped" },
426
+ export type ReadService = {
427
+ readonly scope: "user";
428
+ };
429
+
430
+ // buildUserReadService.ts UserReadService (extends ReadService)
431
+ // buildOrderReadService.ts → OrderReadService (extends ReadService)
432
+ // buildNotificationReadService.ts → NotificationReadService (extends ReadService)
433
+ ```
434
+
435
+ ```ts
436
+ groups: {
437
+ readServices: {
438
+ kind: "object",
439
+ baseType: "ReadService",
440
+ },
441
+ },
442
+ ```
443
+
444
+ Now `container.resolve("readServices")` returns an object keyed by each contract's convention name — `{ userReadService: UserReadService, orderReadService: OrderReadService, ... }`. You can spread that straight onto your GraphQL context without importing each service individually.
445
+
446
+ #### Group validation
447
+
448
+ The generator validates that group names don't collide with implementation keys, access keys, or collection keys. If a base type has no assignable implementations, generation fails with an actionable error.
449
+
450
+ ### Monorepo support (`importPrefix`)
451
+
452
+ In a monorepo, factories in one package often return types defined in another. Without configuration, the generated manifest would emit deep relative paths like `../../../packages/shared/src/types/UserService.js` — fragile and ugly.
453
+
454
+ `importPrefix` and `importMode` fix this. They tell the generator how to write import statements for factories discovered under a given scan root:
455
+
456
+ ```ts
457
+ discovery: {
458
+ scanDirs: [
459
+ {
460
+ path: "packages/shared/src",
461
+ importPrefix: "@acme/shared",
462
+ importMode: "subpath",
298
463
  },
299
- UserRepository: {
300
- userRepository: { lifetime: "singleton" },
464
+ {
465
+ path: "packages/api/src",
466
+ importPrefix: "@acme/api",
467
+ importMode: "subpath",
301
468
  },
469
+ ],
470
+ },
471
+ ```
472
+
473
+ With `importMode: "subpath"`, a factory at `packages/shared/src/services/buildLogger.ts` gets imported as `@acme/shared/services/buildLogger.js` in the generated manifest — matching your package's published exports. With `importMode: "root"`, it would emit just `@acme/shared`.
474
+
475
+ For contract type imports (the `import type` lines in `ioc-registry.types.ts`), use `workspacePackageImportBases` to achieve the same mapping:
476
+
477
+ ```ts
478
+ discovery: {
479
+ scanDirs: "packages/api/src",
480
+ workspacePackageImportBases: [
481
+ { root: "packages/shared", importBase: "@acme/shared" },
482
+ ],
483
+ },
484
+ ```
485
+
486
+ This ensures the generated types file uses `import type { UserService } from "@acme/shared"` instead of a deep relative path into another package's source tree.
487
+
488
+ ### Environment-specific configs
489
+
490
+ The separation between factory code and `ioc.config.ts` makes it straightforward to swap implementations by environment. Your factories don't change — the config is the only thing that differs:
491
+
492
+ ```ts
493
+ // ioc.config.ts (production)
494
+ registrations: {
495
+ EmailService: {
496
+ sesEmailService: { default: true },
302
497
  },
303
- });
498
+ Cache: {
499
+ redisCache: { default: true, lifetime: "singleton" },
500
+ },
501
+ },
502
+ ```
503
+
504
+ ```ts
505
+ // ioc.config.test.ts (testing)
506
+ registrations: {
507
+ EmailService: {
508
+ mockEmailService: { default: true },
509
+ },
510
+ Cache: {
511
+ inMemoryCache: { default: true, lifetime: "transient" },
512
+ },
513
+ },
304
514
  ```
305
515
 
516
+ Point the generator at a different config with `npx ioc generate --config ./ioc.config.test.ts` and you get a completely different wiring — all mocks, all stubs, whatever you need — without touching a single factory file.
517
+
306
518
  ---
307
519
 
308
- ## Error handling and exit codes
520
+ ## Pitfalls and troubleshooting
521
+
522
+ **Manifest out of date** — regenerate after editing factories or `ioc.config`. The generated files are build artifacts; treat them like compiled output.
523
+
524
+ **Contract not discovered** — the factory's return type must resolve to a named type (interface or type alias). The contract symbol must be imported or declared in the same file as the factory. Anonymous `{ foo: string }` return types are silently skipped.
525
+
526
+ **Duplicate registration keys** — every implementation needs a globally unique Awilix key. If two factories produce the same key, rename the exports or use `registrations[Contract][impl].name` to override.
527
+
528
+ **Overlapping scan directories with different scopes** — if a factory file matches multiple scan roots that specify different `scope` values, generation fails. Narrow the roots or set lifetimes per implementation in `registrations`.
529
+
530
+ **`registrations` for unknown contracts** — keys in `registrations` must match discovered contract type names exactly. A typo fails with a list of what was actually discovered.
309
531
 
310
- - Messages for config problems are prefixed **`[ioc-config]`**.
311
- - Messages for discovery / planning / manifest issues are prefixed **`[ioc]`**.
312
- - CLI **`ioc`** exits **`0`** for **`-h` / `--help`** and successful **`inspect`**; exits **`1`** on invalid CLI usage or failed inspect/discovery runs.
313
- - Runtime resolution errors (`IocResolutionError`) include dependency chains for debugging.
532
+ **`inspect` shows `lifetimeSource: factory-config`** this means the lifetime came from `ioc.config`, not from the factory source file (the label is historical).
314
533
 
315
534
  ---
316
535
 
317
- ## Pitfalls and troubleshooting
536
+ ## Design philosophy
537
+
538
+ This package is **not** an IoC container. It is a codegen layer over Awilix that trades manual registration for convention.
318
539
 
319
- - **Manifest out of date** Regenerate after editing factories or `ioc.config`.
320
- - **Contract not discovered**Return type must resolve to a named type; contract symbol must be in scope (imported or declared in the same file).
321
- - **Duplicate registration keys or implementation names** Rename exports or use `registrations` `name` overrides so Awilix keys stay globally unique.
322
- - **Overlapping `scanDirs` with different `scope`** Narrow roots or set lifetimes per implementation in `registrations`.
323
- - **`registrations` for unknown contracts** Keys must match discovered contract type names; typos fail with a list of discovered contracts.
324
- - **Inspect shows `lifetimeSource: factory-config`** — That label means the lifetime came from **`ioc.config`**, not from a factory file (historical identifier in inspect output).
540
+ - **Factories are plain functions.** No decorators, no base classes, no `RESOLVER` symbols. A factory is an exported function that takes a cradle and returns a value.
541
+ - **Policy lives in one file.** Lifetimes, defaults, and key overrides are in `ioc.config.ts` never scattered across factory sources. Looking at a factory tells you _what_ it builds; looking at the config tells you _how_ it's registered.
542
+ - **Types are inferred, not declared.** The generator reads the TypeScript program to discover contracts, dependencies, and assignability. You don't maintain a parallel type registry.
543
+ - **Errors fail fast and explain themselves.** Ambiguous defaults, key collisions, and missing contracts are caught at generation time with messages that name the problem and suggest the fix.
544
+ - **Static imports, not runtime scanning.** The generated manifest is a plain TypeScript module with static imports. It works in dev with loose source files and in production with a single bundled file — no filesystem walking at runtime.
325
545
 
326
546
  ---
327
547
 
@@ -331,17 +551,9 @@ export default defineIocConfig({
331
551
  npm install ioc-manifest
332
552
  ```
333
553
 
334
- Peer expectation: your app already uses **Awilix** (this package lists `awilix` as a dependency for types/runtime alignment).
335
-
336
- ---
337
-
338
- ## Scripts (this repo)
339
-
340
- - **`npm run build`** — compile `src/` to `dist/`
341
- - **`npm test`** — unit and integration tests
342
- - **`npm run pack:dev`** — build and `npm pack` for a dry-run tarball
554
+ Your app should already have **Awilix** installed `ioc-manifest` lists it as a dependency for type and runtime alignment.
343
555
 
344
- Consumers normally depend on the published package; only `dist/`, `bin/`, `LICENSE`, and `README.md` are intended for the registry artifact.
556
+ `ioc-manifest` bundles `typescript` and `prettier` as dependencies because it uses the TypeScript compiler API for source analysis and Prettier for formatting generated output. If your project uses a different TypeScript version, they coexist without conflict (the generator uses its own copy).
345
557
 
346
558
  ---
347
559
 
package/dist/cli/ioc.js CHANGED
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * @fileoverview `ioc` CLI: inspects a **generated** manifest on disk (`iocManifest` export).
3
+ * @fileoverview `ioc` CLI: generates and inspects Awilix manifests.
4
4
  *
5
+ * - `ioc generate` — runs the full generation pipeline (discover, plan, emit).
5
6
  * - `ioc inspect` — human-readable contract / implementation summary + manifest validation.
6
7
  * - `ioc inspect --discovery` — re-runs source discovery (no manifest read) for drift analysis.
7
8
  *
@@ -10,7 +11,8 @@
10
11
  */
11
12
  import path from "node:path";
12
13
  import { pathToFileURL } from "node:url";
13
- import { IOC_CLI_HELP_TEXT, parseIocCliArgv, } from "./parseIocCli.js";
14
+ import { IOC_CLI_HELP_TEXT, parseIocCliArgv } from "./parseIocCli.js";
15
+ import { generateManifest } from "../generator/generateManifest.js";
14
16
  import { resolveIocConfigPath, resolveProjectRootFromIocConfigPath, tryLoadIocConfig, } from "../config/loadIocConfig.js";
15
17
  import { mergeManifestOptionsWithIocConfig, resolveManifestOptions, } from "../generator/manifestOptions.js";
16
18
  import { buildDiscoveryReport, buildInspectionReport, formatDiscoveryReport, formatInspectionReport, formatRegistrationLifetimeInspect, } from "../inspection/index.js";
@@ -53,6 +55,16 @@ const main = async () => {
53
55
  console.log(IOC_CLI_HELP_TEXT.trimEnd());
54
56
  return;
55
57
  }
58
+ if (parsed.kind === "generate") {
59
+ const cli = parsed.options;
60
+ await generateManifest({
61
+ iocConfigPath: cli.iocConfigPath,
62
+ paths: cli.projectDir !== undefined
63
+ ? { projectRoot: path.resolve(cli.projectDir) }
64
+ : undefined,
65
+ });
66
+ return;
67
+ }
56
68
  const cli = parsed.options;
57
69
  const searchStart = path.resolve(cli.projectDir ?? process.c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AC;QACH,MAAM,MAAM,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAC;QAC9C,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC;QAC3C,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChB,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAC;QAC1E,OAAO;IACT,CAAC;IAED,MAAM,OAAO,GAAG,MAAM,2BAA2B,CAC/C,GAAG,CAAC,aAAa,EACjB,WAAW,CACZ,CAAC;IAEF,MAAM,MAAM,GAAG,qBAAqB,CAAC,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IACpE,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,MAAM,CAAC,CAAC,CAAC;AAC9C,CAAC,CAAC;AAEF,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IAC9B,IAAI,OAAO,CAAC,GAAG,CAAC,SAAS,KAAK,GAAG,EAAE,CAAC;QAClC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -1,8 +1,12 @@
1
1
  /**
2
- * @fileoverview Minimal argv parsing for the `ioc` CLI (`inspect` command and `-h/--help`).
2
+ * @fileoverview Minimal argv parsing for the `ioc` CLI (`generate`, `inspect`, and `-h/--help`).
3
3
  */
4
4
  /** Printed for `-h`, `--help`, or bare `ioc` — successful exit 0 */
5
- export declare const IOC_CLI_HELP_TEXT = "ioc \u2014 inspect Awilix manifests produced by ioc-manifest\n\nUsage:\n ioc [--help|-h]\n ioc inspect [--discovery] [--config <path> | -c <path>] [--project <path>]\n ioc inspect [--help|-h]\n\nCommands:\n ioc inspect Load generated ioc-manifest.ts (unless --discovery), print summary.\n\nOptions:\n --discovery Re-run discovery and registration planning; do not read manifest.\n --config PATH -c Path to ioc.config.ts\n --project PATH Directory to resolve config from (default: cwd)\n\nErrors:\n Set IOC_DEBUG=1 for stack traces alongside messages.\n";
5
+ export declare const IOC_CLI_HELP_TEXT = "ioc \u2014 generate and inspect Awilix manifests produced by ioc-manifest\n\nUsage:\n ioc [--help|-h]\n ioc generate [--config <path> | -c <path>] [--project <path>]\n ioc generate [--help|-h]\n ioc inspect [--discovery] [--config <path> | -c <path>] [--project <path>]\n ioc inspect [--help|-h]\n\nCommands:\n ioc generate Discover factories, build registration plan, and emit ioc-manifest.ts + ioc-registry.types.ts.\n ioc inspect Load generated ioc-manifest.ts (unless --discovery), print summary.\n\nOptions:\n --discovery (inspect only) Re-run discovery and registration planning; do not read manifest.\n --config PATH -c Path to ioc.config.ts\n --project PATH Directory to resolve config from (default: cwd)\n\nErrors:\n Set IOC_DEBUG=1 for stack traces alongside messages.\n";
6
+ export type IocGenerateCliOptions = {
7
+ iocConfigPath?: string;
8
+ projectDir?: string;
9
+ };
6
10
  export type IocInspectCliOptions = {
7
11
  iocConfigPath?: string;
8
12
  projectDir?: string;
@@ -10,6 +14,9 @@ export type IocInspectCliOptions = {
10
14
  };
11
15
  export type ParseIocCliArgvResult = {
12
16
  kind: "help";
17
+ } | {
18
+ kind: "generate";
19
+ options: IocGenerateCliOptions;
13
20
  } | {
14
21
  kind: "inspect";
15
22
  options: IocInspectCliOptions;
@@ -1 +1 @@
1
- {"version":3,"file":"parseIocCli.d.ts","sourceRoot":"","sources":["../../src/cli/parseIocCli.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,oEAAoE;AACpE,eAAO,MAAM,iBAAiB,6kBAiB7B,CAAC;AAQF,MAAM,MAAM,oBAAoB,GAAG;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAC7B;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,oBAAoB,CAAA;CAAE,CAAC;AAKvD;;GAEG;AACH,eAAO,MAAM,eAAe,GAC1B,MAAM,SAAS,MAAM,EAAE,KACtB,qBAsDF,CAAC"}
1
+ {"version":3,"file":"parseIocCli.d.ts","sourceRoot":"","sources":["../../src/cli/parseIocCli.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,oEAAoE;AACpE,eAAO,MAAM,iBAAiB,uzBAoB7B,CAAC;AAOF,MAAM,MAAM,qBAAqB,GAAG;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAC7B;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,OAAO,EAAE,qBAAqB,CAAA;CAAE,GACpD;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,oBAAoB,CAAA;CAAE,CAAC;AAKvD;;GAEG;AACH,eAAO,MAAM,eAAe,GAC1B,MAAM,SAAS,MAAM,EAAE,KACtB,qBAyEF,CAAC"}
@@ -1,19 +1,22 @@
1
1
  /**
2
- * @fileoverview Minimal argv parsing for the `ioc` CLI (`inspect` command and `-h/--help`).
2
+ * @fileoverview Minimal argv parsing for the `ioc` CLI (`generate`, `inspect`, and `-h/--help`).
3
3
  */
4
4
  /** Printed for `-h`, `--help`, or bare `ioc` — successful exit 0 */
5
- export const IOC_CLI_HELP_TEXT = `ioc — inspect Awilix manifests produced by ioc-manifest
5
+ export const IOC_CLI_HELP_TEXT = `ioc — generate and inspect Awilix manifests produced by ioc-manifest
6
6
 
7
7
  Usage:
8
8
  ioc [--help|-h]
9
+ ioc generate [--config <path> | -c <path>] [--project <path>]
10
+ ioc generate [--help|-h]
9
11
  ioc inspect [--discovery] [--config <path> | -c <path>] [--project <path>]
10
12
  ioc inspect [--help|-h]
11
13
 
12
14
  Commands:
15
+ ioc generate Discover factories, build registration plan, and emit ioc-manifest.ts + ioc-registry.types.ts.
13
16
  ioc inspect Load generated ioc-manifest.ts (unless --discovery), print summary.
14
17
 
15
18
  Options:
16
- --discovery Re-run discovery and registration planning; do not read manifest.
19
+ --discovery (inspect only) Re-run discovery and registration planning; do not read manifest.
17
20
  --config PATH -c Path to ioc.config.ts
18
21
  --project PATH Directory to resolve config from (default: cwd)
19
22
 
@@ -21,7 +24,7 @@ Errors:
21
24
  Set IOC_DEBUG=1 for stack traces alongside messages.
22
25
  `;
23
26
  const isHelpFlag = (s) => s === "--help" || s === "-h";
24
- const conciseUsageTail = () => '\nUsage: ioc (--help|-h) | ioc inspect [--discovery] [--config <path>|-c <path>] [--project <path>] | ioc inspect (--help|-h)';
27
+ const conciseUsageTail = () => "\nUsage: ioc (--help|-h) | ioc generate [--config <path>|-c <path>] [--project <path>] | ioc inspect [--discovery] [--config <path>|-c <path>] [--project <path>]";
25
28
  const cliParseError = (detail) => new Error(`${detail}${conciseUsageTail()}`);
26
29
  /**
27
30
  * Parses `process.argv`-style arrays (starts with executable and script paths).
@@ -34,9 +37,12 @@ export const parseIocCliArgv = (argv) => {
34
37
  if (args[0] === "inspect" && args.slice(1).some(isHelpFlag)) {
35
38
  return { kind: "help" };
36
39
  }
40
+ if (args[0] === "generate" && args.slice(1).some(isHelpFlag)) {
41
+ return { kind: "help" };
42
+ }
37
43
  const command = args[0];
38
- if (command !== "inspect") {
39
- throw cliParseError(`Unknown command ${JSON.stringify(command)}. Supported: inspect.`);
44
+ if (command !== "inspect" && command !== "generate") {
45
+ throw cliParseError(`Unknown command ${JSON.stringify(command)}. Supported: generate, inspect.`);
40
46
  }
41
47
  let iocConfigPath;
42
48
  let projectDir;
@@ -47,6 +53,9 @@ export const parseIocCliArgv = (argv) => {
47
53
  break;
48
54
  }
49
55
  if (a === "--discovery") {
56
+ if (command === "generate") {
57
+ throw cliParseError("--discovery is only valid with the inspect command.");
58
+ }
50
59
  discovery = true;
51
60
  continue;
52
61
  }
@@ -64,6 +73,15 @@ export const parseIocCliArgv = (argv) => {
64
73
  throw cliParseError(`Unknown flag ${JSON.stringify(a)}.`);
65
74
  }
66
75
  }
76
+ if (command === "generate") {
77
+ return {
78
+ kind: "generate",
79
+ options: {
80
+ ...(iocConfigPath !== undefined ? { iocConfigPath } : {}),
81
+ ...(projectDir !== undefined ? { projectDir } : {}),
82
+ },
83
+ };
84
+ }
67
85
  return {
68
86
  kind: "inspect",
69
87
  options: {
@@ -1 +1 @@
1
- {"version":3,"file":"parseIocCli.js","sourceRoot":"","sources":["../../src/cli/parseIocCli.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,oEAAoE;AACpE,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;CAiBhC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,CAAS,EAAW,EAAE,CACxC,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,CAAC;AAE/B,MAAM,gBAAgB,GAAG,GAAW,EAAE,CACpC,+HAA+H,CAAC;AAYlI,MAAM,aAAa,GAAG,CAAC,MAAc,EAAS,EAAE,CAC9C,IAAI,KAAK,CAAC,GAAG,MAAM,GAAG,gBAAgB,EAAE,EAAE,CAAC,CAAC;AAE9C;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,IAAuB,EACA,EAAE;IACzB,MAAM,IAAI,GAAG,IA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,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACzD,GAAG,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACnD,SAAS;SACV;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -17,7 +17,7 @@ export type ModuleFactoryManifestMetadata = {
17
17
  relImport: string;
18
18
  /** Contract / interface or type alias name the factory returns. */
19
19
  contractName: string;
20
- /** Derived from export: strip `build` prefix and lowercase first character (or resolver metadata). */
20
+ /** Derived from export: strip `definedPrefix` prefix and lowercase first character (or resolver metadata). */
21
21
  implementationName: string;
22
22
  /** Awilix lifetime for this registration. */
23
23
  lifetime: IocImplementationLifetime;
@@ -1 +1 @@
1
- {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/core/manifest.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEzD,4FAA4F;AAC5F,MAAM,MAAM,yBAAyB,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;AAE7E,MAAM,MAAM,sBAAsB,GAC9B,MAAM,GACN,UAAU,GACV,SAAS,GACT,WAAW,CAAC;AAEhB;;;GAGG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,kEAAkE;IAClE,UAAU,EAAE,MAAM,CAAC;IACnB,4EAA4E;IAC5E,eAAe,EAAE,MAAM,CAAC;IACxB,8CAA8C;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,qFAAqF;IACrF,SAAS,EAAE,MAAM,CAAC;IAClB,mEAAmE;IACnE,YAAY,EAAE,MAAM,CAAC;IACrB,sGAAsG;IACtG,kBAAkB,EAAE,MAAM,CAAC;IAC3B,6CAA6C;IAC7C,QAAQ,EAAE,yBAAyB,CAAC;IACpC,wDAAwD;IACxD,WAAW,EAAE,MAAM,CAAC;IACp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EF,MAAM,MAAM,mBAAmB,GAAG,MAAM,CACtC,MAAM,EACN,MAAM,CAAC,MAAM,EAAE,6BAA6B,CAAC,CAC9C,CAAC;AAEF,sGAAsG;AACtG,eAAO,MAAM,2CAA2C,EAAE,WAAW,CAAC,MAAM,CACnC,CAAC;AAE1C;;;GAGG;AACH,MAAM,MAAM,iCAAiC,GAAG;IAC9C,QAAQ,CAAC,aAAa,EAAE,SAAS,kBAAkB,EAAE,CAAC;IACtD,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;CACzC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,6BAA6B,CACvC,WAAW,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,IAChE,iCAAiC,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;AAE9D;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,iCAAiC,GACrE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE1B,+FAA+F;AAC/F,MAAM,MAAM,oBAAoB,GAAG;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,oFAAoF;AACpF,MAAM,MAAM,0BAA0B,GAAG,oBAAoB,EAAE,CAAC;AAEhE,kHAAkH;AAClH,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;AAE1E,MAAM,MAAM,oBAAoB,GAC5B,0BAA0B,GAC1B,sBAAsB,CAAC;AAE3B,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC"}
@@ -2,7 +2,7 @@
2
2
  * Derives a registration key from an export name when `key` is omitted (legacy / convenience).
3
3
  * `buildAlbumService` → `albumService`
4
4
  */
5
- export declare const keyFromExportName: (exportName: string) => string;
5
+ export declare const keyFromExportName: (exportName: string, factoryPrefix?: string) => string;
6
6
  export type RegistrationKeyResolutionContext = {
7
7
  /** e.g. path relative to project root */
8
8
  modulePath: string;
@@ -14,5 +14,5 @@ export type RegistrationKeyResolutionContext = {
14
14
  * → conventional key from export name.
15
15
  * Never returns an empty string; throws with actionable detail if a key cannot be determined.
16
16
  */
17
- export declare const resolveRegistrationKeyForFactory: (exportName: string, configRegistrationName: string | undefined, contractName: string, ctx: RegistrationKeyResolutionContext) => string;
17
+ export declare const resolveRegistrationKeyForFactory: (exportName: string, configRegistrationName: string | undefined, contractName: string, ctx: RegistrationKeyResolutionContext, factoryPrefix?: string) => string;
18
18
  //# sourceMappingURL=resolver.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../src/core/resolver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,YAAY,MAAM,KAAG,MAOtD,CAAC;AAEF,MAAM,MAAM,gCAAgC,GAAG;IAC7C,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,GAC3C,YAAY,MAAM,EAClB,wBAAwB,MAAM,GAAG,SAAS,EAC1C,cAAc,MAAM,EACpB,KAAK,gCAAgC,KACpC,MAWF,CAAC"}
1
+ {"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../src/core/resolver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAC5B,YAAY,MAAM,EAClB,sBAAuB,KACtB,MAWF,CAAC;AAEF,MAAM,MAAM,gCAAgC,GAAG;IAC7C,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,GAC3C,YAAY,MAAM,EAClB,wBAAwB,MAAM,GAAG,SAAS,EAC1C,cAAc,MAAM,EACpB,KAAK,gCAAgC,EACrC,sBAAuB,KACtB,MAWF,CAAC"}
@@ -2,9 +2,11 @@
2
2
  * Derives a registration key from an export name when `key` is omitted (legacy / convenience).
3
3
  * `buildAlbumService` → `albumService`
4
4
  */
5
- export const keyFromExportName = (exportName) => {
6
- if (exportName.startsWith("build") && exportName.length > 5) {
7
- const rest = exportName.slice(5);
5
+ export const keyFromExportName = (exportName, factoryPrefix = "build") => {
6
+ if (factoryPrefix.length > 0 &&
7
+ exportName.startsWith(factoryPrefix) &&
8
+ exportName.length > factoryPrefix.length) {
9
+ const rest = exportName.slice(factoryPrefix.length);
8
10
  return rest.charAt(0).toLowerCase() + rest.slice(1);
9
11
  }
10
12
  return exportName.charAt(0).toLowerCase() + exportName.slice(1);
@@ -14,11 +16,11 @@ export const keyFromExportName = (exportName) => {
14
16
  * → conventional key from export name.
15
17
  * Never returns an empty string; throws with actionable detail if a key cannot be determined.
16
18
  */
17
- export const resolveRegistrationKeyForFactory = (exportName, configRegistrationName, contractName, ctx) => {
19
+ export const resolveRegistrationKeyForFactory = (exportName, configRegistrationName, contractName, ctx, factoryPrefix = "build") => {
18
20
  if (configRegistrationName !== undefined && configRegistrationName.length > 0) {
19
21
  return configRegistrationName;
20
22
  }
21
- const derived = keyFromExportName(exportName);
23
+ const derived = keyFromExportName(exportName, factoryPrefix);
22
24
  if (derived.length === 0) {
23
25
  throw new Error(`[ioc] Cannot determine Awilix registration key for export ${JSON.stringify(exportName)} (contract ${JSON.stringify(contractName)}) in "${ctx.modulePath}". Set registrations[${JSON.stringify(contractName)}][implementationName].name in ioc.config.ts, or use a factory export name that yields a non-empty key (e.g. buildMyService).`);
24
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"resolver.js","sourceRoot":"","sources":["../../src/core/resolver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,iBA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],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,YAAY,CAAC;AAG5B,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,4BAA4B,CAAC;AAKpC,OAAO,KAAK,EACV,iBAAiB,EACjB,2BAA2B,EAC5B,MAAM,aAAa,CAAC;AAErB,uEAAuE;AACvE,MAAM,MAAM,YAAY,GAAG;IACzB,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACxB,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACzB,mBAAmB,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC;CACnD,CAAC;AAwLF,eAAO,MAAM,sCAAsC,GACjD,YAAY,EAAE,CAAC,UAAU,KACxB,YAyGF,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,UAAU,EAAE,iBAAiB,EAAE,CAAC;CACjC,CAAC;AA0BF,eAAO,MAAM,eAAe,GAC1B,SAAS,2BAA2B,EACpC,SAAS,EAAE,CAAC,WAAW,KACtB,qBA4LF,CAAC"}
1
+ {"version":3,"file":"scanFactoryFile.d.ts","sourceRoot":"","sources":["../../../src/generator/discoverFactories/scanFactoryFile.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,YAAY,CAAC;AAG5B,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,4BAA4B,CAAC;AAKpC,OAAO,KAAK,EACV,iBAAiB,EACjB,2BAA2B,EAC5B,MAAM,aAAa,CAAC;AAErB,uEAAuE;AACvE,MAAM,MAAM,YAAY,GAAG;IACzB,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACxB,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACzB,mBAAmB,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC;CACnD,CAAC;AAwLF,eAAO,MAAM,sCAAsC,GACjD,YAAY,EAAE,CAAC,UAAU,KACxB,YAyGF,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,UAAU,EAAE,iBAAiB,EAAE,CAAC;CACjC,CAAC;AA0BF,eAAO,MAAM,eAAe,GAC1B,SAAS,2BAA2B,EACpC,SAAS,EAAE,CAAC,WAAW,KACtB,qBA6LF,CAAC"}
@@ -340,7 +340,7 @@ export const scanFactoryFile = (context, checker) => {
340
340
  modulePath: fileLabel,
341
341
  contractName,
342
342
  exportName,
343
- });
343
+ }, factoryPrefix);
344
344
  }
345
345
  catch {
346
346
  outcomes.push({
@@ -1 +1 @@
1
- {"version":3,"file":"scanFactoryFile.js","sourceRoot":"","sources":["../../../src/generator/discoverFactories/scanFactoryFile.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,gCAAgC,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EACL,sBAAsB,EACtB,kBAAkB,GAEnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,0BAA0B,EAC1B,8BAA8B,GAC/B,MAAM,qBAAqB,CAAC;AAc7B,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC;IAC7B,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,MAAM;IACN,WAAW;IACX,MAAM;IACN,OAAO;IACP,SAAS;IACT,KAAK;IACL,QAAQ;IACR,QAAQ;CACT,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAG,CAAC,OAAuB,EAAE,CA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f,YAAY,EAAE,KAAK,CAAC,SAAS;SAC9B,CAAC,CAAC;IACL,CAAC;IAED,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;AAC9C,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"generateManifest.d.ts","sourceRoot":"","sources":["../../src/generator/generateManifest.ts"],"names":[],"mappings":"AAoBA,OAAO,EAEL,eAAe,EAEhB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAoC/D;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAC3B,YAAY,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC,GAAG;IACpD,KAAK,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACtC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,KACA,OAAO,CAAC,IAAI,CAwFd,CAAC"}
1
+ {"version":3,"file":"generateManifest.d.ts","sourceRoot":"","sources":["../../src/generator/generateManifest.ts"],"names":[],"mappings":"AAoBA,OAAO,EAEL,eAAe,EAEhB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAgD/D;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAC3B,YAAY,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC,GAAG;IACpD,KAAK,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACtC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,KACA,OAAO,CAAC,IAAI,CA2Fd,CAAC"}
@@ -19,12 +19,23 @@ const packageJson = require("../../package.json");
19
19
  const packageName = typeof packageJson.name === "string" && packageJson.name.length > 0
20
20
  ? packageJson.name
21
21
  : "ioc-manifest";
22
- const prettierCliPath = path.join(path.dirname(require.resolve("prettier/package.json")), "bin", "prettier.cjs");
22
+ const resolvePrettierCliPath = () => {
23
+ try {
24
+ return path.join(path.dirname(require.resolve("prettier/package.json")), "bin", "prettier.cjs");
25
+ }
26
+ catch {
27
+ return undefined;
28
+ }
29
+ };
23
30
  /**
24
- * Format via the local `prettier` dependency (not `npx`), so generation works regardless of cwd
25
- * or npm/npx resolution when using alternate `--config` paths.
31
+ * Format via the consumer's `prettier` dependency when available.
32
+ * If prettier is not installed, generation still succeeds — files are just unformatted.
26
33
  */
27
34
  const formatGeneratedFileWithPrettier = (filePath, projectRoot) => {
35
+ const prettierCliPath = resolvePrettierCliPath();
36
+ if (prettierCliPath === undefined) {
37
+ return;
38
+ }
28
39
  try {
29
40
  execFileSync(process.execPath, [prettierCliPath, "--write", filePath], {
30
41
  cwd: projectRoot,
@@ -1 +1 @@
1
- {"version":3,"file":"generateManifest.js","sourceRoot":"","sources":["../../src/generator/generateManifest.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,mCAAmC,GACpC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,EACL,4BAA4B,EAC5B,uBAAuB,EACvB,iCAAiC,GAClC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,iCAAiC,EAEjC,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,MAAM,OAAO,GAAG,aAAa,CAAC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,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE;QACxD,OAAO;QACP,YAAY;QACZ,QAAQ;KACT,CAAC,CAAC;IAEH,MAAM,aAAa,CACjB,iBAAiB,EACjB,KAAK,EACL,WAAW,EAAE,QAAQ,EACrB,eAAe,EACf,WAAW,EACX;QACE,yBAAyB,EAAE;YACzB,OAAO;YACP,YAAY;YACZ,QAAQ;SACT;KACF,CACF,CAAC;IAEF,+BAA+B,CAAC,eAAe,EAAE,WAAW,CAAC,CAAC;IAE9D,+BAA+B,CAC7B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,uBAAuB,CAAC,EACjE,WAAW,CACZ,CAAC;IAEF,OAAO,CAAC,GAAG,CACT,aAAa,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,eAAe,CAAC,MAAM,iBAAiB,CAAC,MAAM,yBAAyB,WAAW,CAAC,IAAI,eAAe,CAC/I,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"generateManifest.js","sourceRoot":"","sources":["../../src/generator/generateManifest.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,mCAAmC,GACpC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,EACL,4BAA4B,EAC5B,uBAAuB,EACvB,iCAAiC,GAClC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,iCAAiC,EAEjC,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO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EAAE,KAAK,CAAC,CAAC;IAE/D,MAAM,EAAE,WAAW,EAAE,iBAAiB,EAAE,GAAG,iBAAiB,CAC1D,KAAK,EACL,OAAO,EACP,WAAW,EACX,mBAAmB,EACnB,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,2BAA2B,EAAE,EACpE,MAAM,CACP,CAAC;IAEF,MAAM,KAAK,GAAG,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE;QACvD,WAAW;QACX,QAAQ;KACT,CAAC,CAAC;IACH,MAAM,WAAW,GAAG,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE;QACxD,OAAO;QACP,YAAY;QACZ,QAAQ;KACT,CAAC,CAAC;IAEH,MAAM,aAAa,CACjB,iBAAiB,EACjB,KAAK,EACL,WAAW,EAAE,QAAQ,EACrB,eAAe,EACf,WAAW,EACX;QACE,yBAAyB,EAAE;YACzB,OAAO;YACP,YAAY;YACZ,QAAQ;SACT;KACF,CACF,CAAC;IAEF,+BAA+B,CAAC,eAAe,EAAE,WAAW,CAAC,CAAC;IAE9D,+BAA+B,CAC7B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,uBAAuB,CAAC,EACjE,WAAW,CACZ,CAAC;IAEF,OAAO,CAAC,GAAG,CACT,aAAa,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,eAAe,CAAC,MAAM,iBAAiB,CAAC,MAAM,yBAAyB,WAAW,CAAC,IAAI,eAAe,CAC/I,CAAC;AACJ,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ioc-manifest",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Build-time factory discovery and codegen: generates a typed Awilix (PROXY) registration manifest from TypeScript sources with ioc.config as the single policy surface.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -56,12 +56,21 @@
56
56
  },
57
57
  "dependencies": {
58
58
  "awilix": "^12.0.5",
59
- "fast-glob": "^3.3.3",
60
- "prettier": "^3.4.2",
61
- "typescript": "^5.7.2"
59
+ "fast-glob": "^3.3.3"
60
+ },
61
+ "peerDependencies": {
62
+ "typescript": "^5.0.0",
63
+ "prettier": "^3.0.0"
64
+ },
65
+ "peerDependenciesMeta": {
66
+ "prettier": {
67
+ "optional": true
68
+ }
62
69
  },
63
70
  "devDependencies": {
64
71
  "@types/node": "^22.10.0",
65
- "tsx": "^4.19.2"
72
+ "prettier": "^3.4.2",
73
+ "tsx": "^4.19.2",
74
+ "typescript": "^5.0.0"
66
75
  }
67
76
  }