@decaf-ts/injectable-decorators 1.9.9 → 1.9.11

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
@@ -5,6 +5,13 @@ A lightweight TypeScript dependency injection library that provides decorators f
5
5
 
6
6
  > Release docs refreshed on 2025-11-26. See [workdocs/reports/RELEASE_NOTES.md](./workdocs/reports/RELEASE_NOTES.md) for ticket summaries.
7
7
 
8
+ ### Core Concepts
9
+
10
+ * **`@injectable()`**: A class decorator that registers a class with the dependency injection system, making it available for injection.
11
+ * **`@inject()`**: A property decorator that injects a registered dependency into a class property.
12
+ * **`Injectables` Class**: A static class that acts as the central registry for managing injectable dependencies.
13
+ * **Singleton vs. On-Demand**: Injectables can be configured to be singletons (one instance shared across the application) or on-demand (a new instance created each time it's injected).
14
+
8
15
  ![Licence](https://img.shields.io/github/license/decaf-ts/injectable-decorators.svg?style=plastic)
9
16
  ![GitHub language count](https://img.shields.io/github/languages/count/decaf-ts/injectable-decorators?style=plastic)
10
17
  ![GitHub top language](https://img.shields.io/github/languages/top/decaf-ts/injectable-decorators?style=plastic)
@@ -78,243 +85,106 @@ The library follows a minimalist approach, focusing on providing essential depen
78
85
  Unlike more complex DI frameworks, this library doesn't require extensive configuration or setup. The developer is responsible for initially decorating classes and properties, but the library handles the instantiation and injection process automatically.
79
86
 
80
87
 
81
- ### How to Use
88
+ # How to Use
82
89
 
83
- - See Initial Setup and Installation in: ./workdocs/tutorials/For Developers.md
90
+ This guide provides examples of how to use the main features of the `@decaf-ts/injectable-decorators` library.
84
91
 
85
- ## Basic Usage Examples
92
+ ## Creating an Injectable Service
86
93
 
87
- ### 1) Mark a class as injectable and get it from the registry
88
-
89
- Description: Define a class with @injectable() so it becomes available through the central registry. Creating with new returns the instance managed by the registry.
94
+ The `@injectable()` decorator marks a class as available for dependency injection.
90
95
 
91
96
  ```typescript
92
- import 'reflect-metadata';
93
- import { injectable, Injectables } from 'injectable-decorators';
97
+ import { injectable } from '@decaf-ts/injectable-decorators';
94
98
 
95
99
  @injectable()
96
- class InitialObject {
97
- doSomething() { return 5; }
100
+ class MyService {
101
+ greet() {
102
+ return 'Hello from MyService!';
103
+ }
98
104
  }
99
-
100
- const obj = new InitialObject();
101
- const same = Injectables.get(InitialObject);
102
- // obj and same refer to the same instance (singleton by default)
103
105
  ```
104
106
 
105
- ### 2) Inject a dependency into a property
107
+ ## Injecting a Service
106
108
 
107
- Description: Use @inject() on a typed property. The instance is created lazily when the property is first accessed and cached thereafter.
109
+ The `@inject()` decorator injects a registered dependency into a class property.
108
110
 
109
111
  ```typescript
110
- import 'reflect-metadata';
111
- import { injectable, inject, Injectables } from 'injectable-decorators';
112
+ import { inject } from '@decaf-ts/injectable-decorators';
113
+ import { MyService } from './MyService';
112
114
 
113
- @injectable()
114
- class SomeService { value = 5; }
115
-
116
- class Controller {
115
+ class MyComponent {
117
116
  @inject()
118
- service!: SomeService; // non-null assertion because it's set outside the constructor
119
- }
120
-
121
- const c = new Controller();
122
- console.log(c.service.value); // 5
123
- console.log(c.service === Injectables.get(SomeService)); // true
124
- ```
125
-
126
- ### 3) Use a custom category (string) for minification or upcasting
127
-
128
- Description: Provide a stable name when class names may change (e.g., minification) or to upcast through a base type.
129
-
130
- ```typescript
131
- import 'reflect-metadata';
132
- import { injectable, inject, singleton } from 'injectable-decorators';
133
-
134
- @singleton()
135
- class AAA { a = 'aaa'; }
136
-
137
- @injectable('AAA')
138
- class BBB extends AAA { b = 'bbb'; }
117
+ private myService!: MyService;
139
118
 
140
- const b = new BBB();
141
-
142
- class Host {
143
- @inject()
144
- repo!: AAA; // resolves to the instance registered under category 'AAA'
119
+ doSomething() {
120
+ console.log(this.myService.greet());
121
+ }
145
122
  }
146
123
 
147
- const h = new Host();
148
- console.log(h.repo === b); // true
124
+ const component = new MyComponent();
125
+ component.doSomething(); // Outputs: "Hello from MyService!"
149
126
  ```
150
127
 
151
- ### 4) Inject by explicit category (string)
152
-
153
- Description: When a different string category was used at registration, pass that string to @inject.
154
-
155
- ```typescript
156
- import 'reflect-metadata';
157
- import { inject, singleton } from 'injectable-decorators';
158
-
159
- class DDD { a = 'aaa'; }
128
+ ## Singleton vs. On-Demand
160
129
 
161
- @singleton('EEE')
162
- class CCC extends DDD { b = 'bbb'; }
130
+ By default, injectables are singletons. You can change this behavior using the `@onDemand` decorator or by passing a configuration object to `@injectable`.
163
131
 
164
- const instance = new CCC();
165
-
166
- class Holder {
167
- @inject('EEE')
168
- repo!: CCC;
169
- }
170
-
171
- const h = new Holder();
172
- console.log(h.repo === instance); // true
173
- ```
174
-
175
- ### 5) Map one constructor to another and inject by constructor
176
-
177
- Description: You can register an injectable using another constructor as the category, then inject it by that constructor.
132
+ ### Singleton (Default)
178
133
 
179
134
  ```typescript
180
- import 'reflect-metadata';
181
- import { injectable, inject } from 'injectable-decorators';
135
+ import { injectable } from '@decaf-ts/injectable-decorators';
182
136
 
183
- class Token {}
184
-
185
- @injectable(Token, { callback: (original) => original })
186
- class Impl {
187
- id = 1;
137
+ @injectable() // or @singleton()
138
+ class MySingletonService {
139
+ constructor() {
140
+ console.log('MySingletonService instance created');
141
+ }
188
142
  }
189
143
 
190
- class UsesImpl {
191
- @inject(Token)
192
- object!: Impl; // injects the instance registered under Token (Impl instance)
193
- }
144
+ // ...
194
145
 
195
- const u = new UsesImpl();
196
- console.log(u.object instanceof Impl); // true
146
+ const component1 = new MyComponent(); // MySingletonService instance created
147
+ const component2 = new MyComponent(); // No new instance created
197
148
  ```
198
149
 
199
- ### 6) Non-singleton injectables with @onDemand and passing constructor args
200
-
201
- Description: Use @onDemand() so each injection produces a fresh instance. You can pass args for construction via @inject({ args }).
150
+ ### On-Demand
202
151
 
203
152
  ```typescript
204
- import 'reflect-metadata';
205
- import { onDemand, inject } from 'injectable-decorators';
153
+ import { onDemand } from '@decaf-ts/injectable-decorators';
206
154
 
207
155
  @onDemand()
208
- class FreshObject {
209
- constructor(public a?: string, public b?: string) {}
156
+ class MyOnDemandService {
157
+ constructor() {
158
+ console.log('MyOnDemandService instance created');
159
+ }
210
160
  }
211
161
 
212
- class ParentA {
213
- @inject()
214
- fresh!: FreshObject; // new instance per parent
215
- }
216
-
217
- class ParentB {
218
- @inject({ args: ['x', 'y'] })
219
- fresh!: FreshObject; // passes constructor args to on-demand instance
220
- }
162
+ // ...
221
163
 
222
- const p1 = new ParentA();
223
- const p2 = new ParentA();
224
- console.log(p1.fresh !== p2.fresh); // true
225
-
226
- const p3 = new ParentB();
227
- console.log([p3.fresh.a, p3.fresh.b]); // ['x','y']
164
+ const component1 = new MyComponent(); // MyOnDemandService instance created
165
+ const component2 = new MyComponent(); // MyOnDemandService instance created
228
166
  ```
229
167
 
230
- ### 7) Transform an injected value
168
+ ## Injecting with a Category
231
169
 
232
- Description: Modify the resolved instance before assignment using a transformer.
170
+ You can register and inject dependencies using a string or symbol as a category, which is useful for avoiding issues with minification or for upcasting.
233
171
 
234
172
  ```typescript
235
- import 'reflect-metadata';
236
- import { injectable, inject } from 'injectable-decorators';
173
+ import { injectable, inject } from '@decaf-ts/injectable-decorators';
237
174
 
238
- @injectable('SomeOtherObject')
239
- class SomeOtherObject { value() { return 10; } }
175
+ const IMyService = 'IMyService';
240
176
 
241
- class Controller {
242
- @inject({ transformer: (obj: SomeOtherObject, c: Controller) => '1' })
243
- repo!: SomeOtherObject | string;
177
+ @injectable(IMyService)
178
+ class MyServiceImpl {
179
+ // ...
244
180
  }
245
181
 
246
- const c = new Controller();
247
- console.log(c.repo); // '1'
248
- ```
249
-
250
- ### 8) Registry operations: reset and swapping registry
251
-
252
- Description: Reset clears all registrations. Swapping the registry replaces the storage, losing previous entries.
253
-
254
- ```typescript
255
- import { Injectables, InjectableRegistryImp } from 'injectable-decorators';
256
-
257
- // ensure something is registered
258
- Injectables.get('SomeOtherObject');
259
-
260
- // swap to a fresh registry
261
- Injectables.setRegistry(new InjectableRegistryImp());
262
- console.log(Injectables.get('SomeOtherObject')); // undefined
263
-
264
- // reset to a new empty default registry
265
- Injectables.reset();
266
- ```
267
-
268
- ### 9) Singleton vs onDemand convenience decorators
269
-
270
- Description: Prefer @singleton() to force single instance, or @onDemand() for new instance per retrieval.
271
-
272
- ```typescript
273
- import { singleton, onDemand } from 'injectable-decorators';
274
-
275
- @singleton()
276
- class OneOnly {}
277
-
278
- @onDemand()
279
- class Many {}
280
- ```
281
-
282
- ### 10) Utility helpers and constants
283
-
284
- Description: Generate reflection keys and understand default config.
285
-
286
- ```typescript
287
- import { getInjectKey } from 'injectable-decorators';
288
-
289
- console.log(getInjectKey('injectable')); // "inject.db.injectable"
290
- console.log(getInjectKey('inject')); // "inject.db.inject"
182
+ class MyOtherComponent {
183
+ @inject(IMyService)
184
+ private myService!: MyServiceImpl;
185
+ }
291
186
  ```
292
187
 
293
- Notes:
294
- - Always include `import 'reflect-metadata'` once in your app before using decorators.
295
- - VERSION is exported as a string placeholder defined at build time.
296
-
297
-
298
- ## Coding Principles
299
-
300
- - group similar functionality in folders (analog to namespaces but without any namespace declaration)
301
- - one class per file;
302
- - one interface per file (unless interface is just used as a type);
303
- - group types as other interfaces in a types.ts file per folder;
304
- - group constants or enums in a constants.ts file per folder;
305
- - group decorators in a decorators.ts file per folder;
306
- - always import from the specific file, never from a folder or index file (exceptions for dependencies on other packages);
307
- - prefer the usage of established design patters where applicable:
308
- - Singleton (can be an anti-pattern. use with care);
309
- - factory;
310
- - observer;
311
- - strategy;
312
- - builder;
313
- - etc;
314
-
315
- ## Release Documentation Hooks
316
- Stay aligned with the automated release pipeline by reviewing [Release Notes](./workdocs/reports/RELEASE_NOTES.md) and [Dependencies](./workdocs/reports/DEPENDENCIES.md) after trying these recipes (updated on 2025-11-26).
317
-
318
188
 
319
189
  ### Related
320
190
 
@@ -1,2 +1,2 @@
1
- var t,e;t=this,e=function(t,e,n){"use strict";const o={REFLECT:"inject.db.",INJECTABLE:"injectable",INJECT:"inject"},r={singleton:!0},i=t=>o.REFLECT+t;class c{constructor(){this.cache={}}has(t){return"symbol"==typeof t?t in this.cache:Symbol.for(t.toString())in this.cache}get(t,...e){if("string"==typeof t&&(t=Symbol.for(t)),"symbol"!=typeof t){const e=Reflect.getMetadata(i(o.INJECTABLE),t);t=e?.symbol||Symbol.for(t.toString())}if(!t)throw Error(`Injectable ${t} not found`);if(!(t in this.cache))return;const n=this.cache[t];return(n.options.singleton||n.instance)&&n.instance||this.build(t,...e)}register(t,e,n,o=!1){const r=t,i=!r.name&&r.constructor;if("function"!=typeof r&&!i)throw Error("Injectable registering failed. Missing Class name or constructor");const c=e||Symbol.for(t.toString());this.cache[c]&&!o||(this.cache[c]={instance:n.singleton&&i?t:void 0,constructor:i?t.constructor:t,options:n})}build(t,...e){const{constructor:n,options:o}=this.cache[t];let r;try{r=new n(...e)}catch(n){throw Error(`failed to build ${t.toString()} with args ${e}: ${n}`)}return o.singleton&&(this.cache[t].instance=r),o.callback&&(r=o.callback(r,...e)),r}}class s{static{this.actingInjectablesRegistry=void 0}constructor(){}static get(t,...e){return s.getRegistry().get(t,...e)}static register(t,...e){return s.getRegistry().register(t,...e)}static build(t,...e){return s.getRegistry().build(t,...e)}static setRegistry(t){s.actingInjectablesRegistry=t}static getRegistry(){return s.actingInjectablesRegistry||(s.actingInjectablesRegistry=new c),s.actingInjectablesRegistry}static reset(){s.setRegistry(new c)}static selectiveReset(t){const e="string"==typeof t?RegExp(t):t;s.actingInjectablesRegistry.cache=Object.entries(s.actingInjectablesRegistry.cache).reduce(((t,[n,o])=>(n.match(e)||(t[n]=o),t)),{})}}function a(t,c){return c=c||("object"==typeof t?Object.assign(t,r):r),t="object"==typeof t?void 0:"string"==typeof t||"function"==typeof t&&t.name?t:void 0,r=>{const a=Symbol.for(t||r.toString()),l={class:t=t||r.name,symbol:a};Reflect.defineMetadata(i(o.INJECTABLE),l,r);const f=(...t)=>s.get(a,...t);return f.prototype=r.prototype,Object.defineProperty(f,"name",{writable:!1,enumerable:!0,configurable:!1,value:r.prototype.constructor.name}),Reflect.defineMetadata(i(o.INJECTABLE),l,f),e.metadata(n.ModelKeys.CONSTRUCTOR,r)(f),s.register(r,a,c),f}}function l(t,n){return e.Decoration.for(o.INJECTABLE).define({decorator:a,args:[t,n]}).apply()}function f(t,n){return function(r,c){const a=n||"object"==typeof t?t:{};c&&e.prop()(r,c);const l="function"==typeof r?r.prototype:r,f="function"==typeof r?r:r.constructor,g="object"!=typeof t&&t||e.Metadata.type(f,c);if(!g)throw Error(`Could not determine injectable type for ${c+""} on ${f?.name||"unknown"}`);Reflect.defineMetadata(i(o.INJECT),{injectable:g},r,c);const d=new WeakMap;Object.defineProperty(l,c,{configurable:!0,enumerable:!0,get(){if(!d.has(this)){let t=s.get(g,...a.args||[]);if(!t)throw Error(`Could not get Injectable ${g.toString()} to inject in ${this.constructor?this.constructor.name:r.name}'s ${c}`);if(a.transformer)try{t=a.transformer(t,this)}catch(t){}d.set(this,t)}return d.get(this)},set(t){void 0!==t?d.set(this,t):d.delete(this)}})}}const g="##VERSION##",d="##PACKAGE##";e.Metadata.registerLibrary(d,g),t.DefaultInjectablesConfig=r,t.InjectableRegistryImp=c,t.Injectables=s,t.InjectablesKeys=o,t.PACKAGE_NAME=d,t.TypeKey="design:type",t.VERSION=g,t.getInjectKey=i,t.inject=(t,n)=>e.Decoration.for(o.INJECT).define({decorator:f,args:[t,n]}).apply(),t.injectBaseDecorator=f,t.injectable=l,t.injectableBaseDecorator=a,t.onDemand=(t,e)=>l(t,Object.assign({},e||{},{singleton:!1})),t.singleton=(t,e)=>l(t,Object.assign({},e||{},{singleton:!0}))},"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@decaf-ts/decoration"),require("@decaf-ts/decorator-validation")):"function"==typeof define&&define.amd?define(["exports","@decaf-ts/decoration","@decaf-ts/decorator-validation"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["injectable-decorators"]={},t.decafTsDecoration,t.decafTsDecoratorValidation);
1
+ var t,e;t=this,e=function(t,e,n){"use strict";const o={REFLECT:"inject.db.",INJECTABLE:"injectable",INJECT:"inject"},r={singleton:!0},i=t=>o.REFLECT+t;class c{constructor(){this.cache={}}has(t){return"symbol"==typeof t?t in this.cache:Symbol.for(t.toString())in this.cache}get(t,...e){if("string"==typeof t&&(t=Symbol.for(t)),"symbol"!=typeof t){const e=Reflect.getMetadata(i(o.INJECTABLE),t);t=e?.symbol||Symbol.for(t.toString())}if(!t)throw Error(`Injectable ${t} not found`);if(!(t in this.cache))return;const n=this.cache[t];return(n.options.singleton||n.instance)&&n.instance||this.build(t,...e)}register(t,e,n,o=!1){const r=t,i=!r.name&&r.constructor;if("function"!=typeof r&&!i)throw Error("Injectable registering failed. Missing Class name or constructor");const c=e||Symbol.for(t.toString());this.cache[c]&&!o||(this.cache[c]={instance:n.singleton&&i?t:void 0,constructor:i?t.constructor:t,options:n})}build(t,...e){const{constructor:n,options:o}=this.cache[t];let r;try{r=new n(...e)}catch(n){throw Error(`failed to build ${t.toString()} with args ${e}: ${n}`)}return o.singleton&&(this.cache[t].instance=r),o.callback&&(r=o.callback(r,...e)),r}}class s{static{this.actingInjectablesRegistry=void 0}constructor(){}static get(t,...e){return s.getRegistry().get(t,...e)}static register(t,...e){return s.getRegistry().register(t,...e)}static build(t,...e){return s.getRegistry().build(t,...e)}static setRegistry(t){s.actingInjectablesRegistry=t}static getRegistry(){return s.actingInjectablesRegistry||(s.actingInjectablesRegistry=new c),s.actingInjectablesRegistry}static reset(){s.setRegistry(new c)}static selectiveReset(t){const e="string"==typeof t?RegExp(t):t;s.actingInjectablesRegistry.cache=Object.entries(s.actingInjectablesRegistry.cache).reduce((t,[n,o])=>(n.match(e)||(t[n]=o),t),{})}}function a(t,c){return c=c||("object"==typeof t?Object.assign(t,r):r),t="object"==typeof t?void 0:"string"==typeof t||"function"==typeof t&&t.name?t:void 0,r=>{const a=Symbol.for(t||r.toString()),l={class:t=t||r.name,symbol:a};Reflect.defineMetadata(i(o.INJECTABLE),l,r);const f=(...t)=>s.get(a,...t);return f.prototype=r.prototype,Object.defineProperty(f,"name",{writable:!1,enumerable:!0,configurable:!1,value:r.prototype.constructor.name}),Reflect.defineMetadata(i(o.INJECTABLE),l,f),e.metadata(n.ModelKeys.CONSTRUCTOR,r)(f),s.register(r,a,c),f}}function l(t,n){return e.Decoration.for(o.INJECTABLE).define({decorator:a,args:[t,n]}).apply()}function f(t,n){return function(r,c){const a=n||"object"==typeof t?t:{};c&&e.prop()(r,c);const l="function"==typeof r?r.prototype:r,f="function"==typeof r?r:r.constructor,g="object"!=typeof t&&t||e.Metadata.type(f,c);if(!g)throw Error(`Could not determine injectable type for ${c+""} on ${f?.name||"unknown"}`);Reflect.defineMetadata(i(o.INJECT),{injectable:g},r,c);const d=new WeakMap;Object.defineProperty(l,c,{configurable:!0,enumerable:!0,get(){if(!d.has(this)){let t=s.get(g,...a.args||[]);if(!t)throw Error(`Could not get Injectable ${g.toString()} to inject in ${this.constructor?this.constructor.name:r.name}'s ${c}`);if(a.transformer)try{t=a.transformer(t,this)}catch(t){}d.set(this,t)}return d.get(this)},set(t){void 0!==t?d.set(this,t):d.delete(this)}})}}const g="##VERSION##",d="##PACKAGE##";e.Metadata.registerLibrary(d,g),t.DefaultInjectablesConfig=r,t.InjectableRegistryImp=c,t.Injectables=s,t.InjectablesKeys=o,t.PACKAGE_NAME=d,t.TypeKey="design:type",t.VERSION=g,t.getInjectKey=i,t.inject=(t,n)=>e.Decoration.for(o.INJECT).define({decorator:f,args:[t,n]}).apply(),t.injectBaseDecorator=f,t.injectable=l,t.injectableBaseDecorator=a,t.onDemand=(t,e)=>l(t,Object.assign({},e||{},{singleton:!1})),t.singleton=(t,e)=>l(t,Object.assign({},e||{},{singleton:!0}))},"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@decaf-ts/decoration"),require("@decaf-ts/decorator-validation")):"function"==typeof define&&define.amd?define(["exports","@decaf-ts/decoration","@decaf-ts/decorator-validation"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["injectable-decorators"]={},t.decafTsDecoration,t.decafTsDecoratorValidation);
2
2
  //# sourceMappingURL=injectable-decorators.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"injectable-decorators.cjs","sources":["../src/constants.ts","../src/utils.ts","../src/registry.ts","../src/Injectables.ts","../src/decorators.ts","../src/index.ts"],"sourcesContent":[null,null,null,null,null,null],"names":["InjectablesKeys","REFLECT","INJECTABLE","INJECT","DefaultInjectablesConfig","singleton","getInjectKey","key","InjectableRegistryImp","constructor","this","cache","has","name","Symbol","for","toString","get","args","meta","Reflect","getMetadata","symbol","Error","options","instance","build","register","obj","category","force","castObj","undefined","e","callback","Injectables","actingInjectablesRegistry","getRegistry","setRegistry","operationsRegistry","reset","selectiveReset","match","regexp","RegExp","Object","entries","reduce","accum","val","injectableBaseDecorator","cfg","assign","original","class","defineMetadata","newConstructor","prototype","defineProperty","writable","enumerable","configurable","value","metadata","ModelKeys","CONSTRUCTOR","injectable","Decoration","define","decorator","apply","injectBaseDecorator","target","propertyKey","config","prop","definitionTarget","lookupConstructor","Metadata","type","String","values","WeakMap","transformer","set","delete","VERSION","PACKAGE_NAME","registerLibrary"],"mappings":"8CAWa,MAAAA,EAAkB,CAC7BC,QAAS,aACTC,WAAY,aACZC,OAAQ,UASGC,EAA6C,CACxDC,WAAW,GCdAC,EAAgBC,GAAgBP,EAAgBC,QAAUM,QCgG1DC,EAAb,WAAAC,GACUC,KAAKC,MAAkC,EA6EhD,CA3EC,GAAAC,CAAOC,GACL,MAAoB,iBAATA,EAA0BA,KAAQH,KAAKC,MAC3CG,OAAOC,IAAIF,EAAKG,cAAeN,KAAKC,KAC5C,CAKD,GAAAM,CACEJ,KACGK,GAGH,GADoB,iBAATL,IAAmBA,EAAOC,OAAOC,IAAIF,IAC5B,iBAATA,EAAmB,CAC5B,MAAMM,EAAOC,QAAQC,YACnBf,EAAaN,EAAgBE,YAC7BW,GAEFA,EAAQM,GAAMG,QAAqBR,OAAOC,IAAIF,EAAKG,WACpD,CACD,IAAKH,EAAM,MAAUU,MAAM,cAAcV,e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B,aAAWpD,IAAIf,EAAgBG,QACnCiE,OAAO,CAAEC,UAAWE,EAAqBrD,KAAM,CAACW,EAAUsB,KAC1DmB,sFApOW,CACdzC,EACAsB,IAEOe,EACLrC,EACAgB,OAAOO,OAAO,CAAE,EAAED,GAAO,CAAA,EAAI,CAAE9C,WAAW,iBAzB9B,CACdwB,EACAsB,IAEOe,EACLrC,EACAgB,OAAOO,OAAO,CAAE,EAAED,GAAO,CAAA,EAAI,CAAE9C,WAAW"}
1
+ {"version":3,"file":"injectable-decorators.cjs","sources":["../src/constants.ts","../src/utils.ts","../src/registry.ts","../src/Injectables.ts","../src/decorators.ts","../src/index.ts"],"sourcesContent":[null,null,null,null,null,null],"names":["InjectablesKeys","REFLECT","INJECTABLE","INJECT","DefaultInjectablesConfig","singleton","getInjectKey","key","InjectableRegistryImp","constructor","this","cache","has","name","Symbol","for","toString","get","args","meta","Reflect","getMetadata","symbol","Error","options","instance","build","register","obj","category","force","castObj","undefined","e","callback","Injectables","actingInjectablesRegistry","getRegistry","setRegistry","operationsRegistry","reset","selectiveReset","match","regexp","RegExp","Object","entries","reduce","accum","val","injectableBaseDecorator","cfg","assign","original","class","defineMetadata","newConstructor","prototype","defineProperty","writable","enumerable","configurable","value","metadata","ModelKeys","CONSTRUCTOR","injectable","Decoration","define","decorator","apply","injectBaseDecorator","target","propertyKey","config","prop","definitionTarget","lookupConstructor","Metadata","type","String","values","WeakMap","transformer","set","delete","VERSION","PACKAGE_NAME","registerLibrary"],"mappings":"8CAWa,MAAAA,EAAkB,CAC7BC,QAAS,aACTC,WAAY,aACZC,OAAQ,UASGC,EAA6C,CACxDC,WAAW,GCdAC,EAAgBC,GAAgBP,EAAgBC,QAAUM,QCgG1DC,EAAb,WAAAC,GACUC,KAAKC,MAAkC,EA6EhD,CA3EC,GAAAC,CAAOC,GACL,MAAoB,iBAATA,EAA0BA,KAAQH,KAAKC,MAC3CG,OAAOC,IAAIF,EAAKG,cAAeN,KAAKC,KAC5C,CAKD,GAA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OqD,EAAOhE,IAAIP,KACnB,EACD,GAAA0E,CAAetB,QACQ,IAAVA,EAIXmB,EAAOG,IAAI1E,KAAMoD,GAHfmB,EAAOI,OAAO3E,KAIjB,GAEL,CACF,CC9Sa,MAAA4E,EAAU,cACVC,EAAe,cAC5BT,EAAAA,SAASU,gBAAgBD,EAAcD,yHLOhB,oDIuZP,CACdzD,EACAsB,IAEOgB,aAAWpD,IAAIf,EAAgBG,QACnCiE,OAAO,CAAEC,UAAWE,EAAqBrD,KAAM,CAACW,EAAUsB,KAC1DmB,sFApOW,CACdzC,EACAsB,IAEOe,EACLrC,EACAgB,OAAOO,OAAO,CAAE,EAAED,GAAO,CAAA,EAAI,CAAE9C,WAAW,iBAzB9B,CACdwB,EACAsB,IAEOe,EACLrC,EACAgB,OAAOO,OAAO,CAAE,EAAED,GAAO,CAAA,EAAI,CAAE9C,WAAW"}
@@ -1,2 +1,2 @@
1
- import{metadata as t,Decoration as e,prop as n,Metadata as r}from"@decaf-ts/decoration";import{ModelKeys as o}from"@decaf-ts/decorator-validation";const i={REFLECT:"inject.db.",INJECTABLE:"injectable",INJECT:"inject"},c={singleton:!0},s="design:type",a=t=>i.REFLECT+t;class g{constructor(){this.cache={}}has(t){return"symbol"==typeof t?t in this.cache:Symbol.for(t.toString())in this.cache}get(t,...e){if("string"==typeof t&&(t=Symbol.for(t)),"symbol"!=typeof t){const e=Reflect.getMetadata(a("injectable"),t);t=e?.symbol||Symbol.for(t.toString())}if(!t)throw Error(`Injectable ${t} not found`);if(!(t in this.cache))return;const n=this.cache[t];return(n.options.singleton||n.instance)&&n.instance||this.build(t,...e)}register(t,e,n,r=!1){const o=t,i=!o.name&&o.constructor;if("function"!=typeof o&&!i)throw Error("Injectable registering failed. Missing Class name or constructor");const c=e||Symbol.for(t.toString());this.cache[c]&&!r||(this.cache[c]={instance:n.singleton&&i?t:void 0,constructor:i?t.constructor:t,options:n})}build(t,...e){const{constructor:n,options:r}=this.cache[t];let o;try{o=new n(...e)}catch(n){throw Error(`failed to build ${t.toString()} with args ${e}: ${n}`)}return r.singleton&&(this.cache[t].instance=o),r.callback&&(o=r.callback(o,...e)),o}}class l{static{this.actingInjectablesRegistry=void 0}constructor(){}static get(t,...e){return l.getRegistry().get(t,...e)}static register(t,...e){return l.getRegistry().register(t,...e)}static build(t,...e){return l.getRegistry().build(t,...e)}static setRegistry(t){l.actingInjectablesRegistry=t}static getRegistry(){return l.actingInjectablesRegistry||(l.actingInjectablesRegistry=new g),l.actingInjectablesRegistry}static reset(){l.setRegistry(new g)}static selectiveReset(t){const e="string"==typeof t?RegExp(t):t;l.actingInjectablesRegistry.cache=Object.entries(l.actingInjectablesRegistry.cache).reduce(((t,[n,r])=>(n.match(e)||(t[n]=r),t)),{})}}function f(e,n){return n=n||("object"==typeof e?Object.assign(e,c):c),e="object"==typeof e?void 0:"string"==typeof e||"function"==typeof e&&e.name?e:void 0,r=>{const i=Symbol.for(e||r.toString()),c={class:e=e||r.name,symbol:i};Reflect.defineMetadata(a("injectable"),c,r);const s=(...t)=>l.get(i,...t);return s.prototype=r.prototype,Object.defineProperty(s,"name",{writable:!1,enumerable:!0,configurable:!1,value:r.prototype.constructor.name}),Reflect.defineMetadata(a("injectable"),c,s),t(o.CONSTRUCTOR,r)(s),l.register(r,i,n),s}}function u(t,n){return e.for("injectable").define({decorator:f,args:[t,n]}).apply()}function b(t,e){return u(t,Object.assign({},e||{},{singleton:!0}))}function y(t,e){return u(t,Object.assign({},e||{},{singleton:!1}))}function h(t,e){return function(o,i){const c=e||"object"==typeof t?t:{};i&&n()(o,i);const s="function"==typeof o?o.prototype:o,g="function"==typeof o?o:o.constructor,f="object"!=typeof t&&t||r.type(g,i);if(!f)throw Error(`Could not determine injectable type for ${i+""} on ${g?.name||"unknown"}`);Reflect.defineMetadata(a("inject"),{injectable:f},o,i);const u=new WeakMap;Object.defineProperty(s,i,{configurable:!0,enumerable:!0,get(){if(!u.has(this)){let t=l.get(f,...c.args||[]);if(!t)throw Error(`Could not get Injectable ${f.toString()} to inject in ${this.constructor?this.constructor.name:o.name}'s ${i}`);if(c.transformer)try{t=c.transformer(t,this)}catch(t){}u.set(this,t)}return u.get(this)},set(t){void 0!==t?u.set(this,t):u.delete(this)}})}}function d(t,n){return e.for("inject").define({decorator:h,args:[t,n]}).apply()}const p="##VERSION##",j="##PACKAGE##";r.registerLibrary(j,p);export{c as DefaultInjectablesConfig,g as InjectableRegistryImp,l as Injectables,i as InjectablesKeys,j as PACKAGE_NAME,s as TypeKey,p as VERSION,a as getInjectKey,d as inject,h as injectBaseDecorator,u as injectable,f as injectableBaseDecorator,y as onDemand,b as singleton};
1
+ import{metadata as t,Decoration as e,prop as n,Metadata as r}from"@decaf-ts/decoration";import{ModelKeys as o}from"@decaf-ts/decorator-validation";const i={REFLECT:"inject.db.",INJECTABLE:"injectable",INJECT:"inject"},c={singleton:!0},s="design:type",a=t=>i.REFLECT+t;class g{constructor(){this.cache={}}has(t){return"symbol"==typeof t?t in this.cache:Symbol.for(t.toString())in this.cache}get(t,...e){if("string"==typeof t&&(t=Symbol.for(t)),"symbol"!=typeof t){const e=Reflect.getMetadata(a("injectable"),t);t=e?.symbol||Symbol.for(t.toString())}if(!t)throw Error(`Injectable ${t} not found`);if(!(t in this.cache))return;const n=this.cache[t];return(n.options.singleton||n.instance)&&n.instance||this.build(t,...e)}register(t,e,n,r=!1){const o=t,i=!o.name&&o.constructor;if("function"!=typeof o&&!i)throw Error("Injectable registering failed. Missing Class name or constructor");const c=e||Symbol.for(t.toString());this.cache[c]&&!r||(this.cache[c]={instance:n.singleton&&i?t:void 0,constructor:i?t.constructor:t,options:n})}build(t,...e){const{constructor:n,options:r}=this.cache[t];let o;try{o=new n(...e)}catch(n){throw Error(`failed to build ${t.toString()} with args ${e}: ${n}`)}return r.singleton&&(this.cache[t].instance=o),r.callback&&(o=r.callback(o,...e)),o}}class l{static{this.actingInjectablesRegistry=void 0}constructor(){}static get(t,...e){return l.getRegistry().get(t,...e)}static register(t,...e){return l.getRegistry().register(t,...e)}static build(t,...e){return l.getRegistry().build(t,...e)}static setRegistry(t){l.actingInjectablesRegistry=t}static getRegistry(){return l.actingInjectablesRegistry||(l.actingInjectablesRegistry=new g),l.actingInjectablesRegistry}static reset(){l.setRegistry(new g)}static selectiveReset(t){const e="string"==typeof t?RegExp(t):t;l.actingInjectablesRegistry.cache=Object.entries(l.actingInjectablesRegistry.cache).reduce((t,[n,r])=>(n.match(e)||(t[n]=r),t),{})}}function f(e,n){return n=n||("object"==typeof e?Object.assign(e,c):c),e="object"==typeof e?void 0:"string"==typeof e||"function"==typeof e&&e.name?e:void 0,r=>{const i=Symbol.for(e||r.toString()),c={class:e=e||r.name,symbol:i};Reflect.defineMetadata(a("injectable"),c,r);const s=(...t)=>l.get(i,...t);return s.prototype=r.prototype,Object.defineProperty(s,"name",{writable:!1,enumerable:!0,configurable:!1,value:r.prototype.constructor.name}),Reflect.defineMetadata(a("injectable"),c,s),t(o.CONSTRUCTOR,r)(s),l.register(r,i,n),s}}function u(t,n){return e.for("injectable").define({decorator:f,args:[t,n]}).apply()}function b(t,e){return u(t,Object.assign({},e||{},{singleton:!0}))}function y(t,e){return u(t,Object.assign({},e||{},{singleton:!1}))}function h(t,e){return function(o,i){const c=e||"object"==typeof t?t:{};i&&n()(o,i);const s="function"==typeof o?o.prototype:o,g="function"==typeof o?o:o.constructor,f="object"!=typeof t&&t||r.type(g,i);if(!f)throw Error(`Could not determine injectable type for ${i+""} on ${g?.name||"unknown"}`);Reflect.defineMetadata(a("inject"),{injectable:f},o,i);const u=new WeakMap;Object.defineProperty(s,i,{configurable:!0,enumerable:!0,get(){if(!u.has(this)){let t=l.get(f,...c.args||[]);if(!t)throw Error(`Could not get Injectable ${f.toString()} to inject in ${this.constructor?this.constructor.name:o.name}'s ${i}`);if(c.transformer)try{t=c.transformer(t,this)}catch(t){}u.set(this,t)}return u.get(this)},set(t){void 0!==t?u.set(this,t):u.delete(this)}})}}function d(t,n){return e.for("inject").define({decorator:h,args:[t,n]}).apply()}const p="##VERSION##",j="##PACKAGE##";r.registerLibrary(j,p);export{c as DefaultInjectablesConfig,g as InjectableRegistryImp,l as Injectables,i as InjectablesKeys,j as PACKAGE_NAME,s as TypeKey,p as VERSION,a as getInjectKey,d as inject,h as injectBaseDecorator,u as injectable,f as injectableBaseDecorator,y as onDemand,b as singleton};
2
2
  //# sourceMappingURL=injectable-decorators.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"injectable-decorators.js","sources":["../src/constants.ts","../src/utils.ts","../src/registry.ts","../src/Injectables.ts","../src/decorators.ts","../src/index.ts"],"sourcesContent":[null,null,null,null,null,null],"names":["InjectablesKeys","REFLECT","INJECTABLE","INJECT","DefaultInjectablesConfig","singleton","TypeKey","getInjectKey","key","InjectableRegistryImp","constructor","this","cache","has","name","Symbol","for","toString","get","args","meta","Reflect","getMetadata","symbol","Error","options","instance","build","register","obj","category","force","castObj","undefined","e","callback","Injectables","actingInjectablesRegistry","getRegistry","setRegistry","operationsRegistry","reset","selectiveReset","match","regexp","RegExp","Object","entries","reduce","accum","val","injectableBaseDecorator","cfg","assign","original","class","defineMetadata","newConstructor","prototype","defineProperty","writable","enumerable","configurable","value","metadata","ModelKeys","CONSTRUCTOR","injectable","Decoration","define","decorator","apply","onDemand","injectBaseDecorator","target","propertyKey","config","prop","definitionTarget","lookupConstructor","Metadata","type","String","values","WeakMap","transformer","set","delete","inject","VERSION","PACKAGE_NAME","registerLibrary"],"mappings":"mJAWa,MAAAA,EAAkB,CAC7BC,QAAS,aACTC,WAAY,aACZC,OAAQ,UASGC,EAA6C,CACxDC,WAAW,GASAC,EAAU,cCvBVC,EAAgBC,GAAgBR,EAAgBC,QAAUO,QCgG1DC,EAAb,WAAAC,GACUC,KAAKC,MAAkC,EA6EhD,CA3EC,GAAAC,CAAOC,GACL,MAAoB,iBAATA,EAA0BA,KAAQH,KAAKC,MAC3CG,OAAOC,IAAIF,EAAKG,cAAeN,KAAKC,KAC5C,CAKD,GAAAM,CACEJ,KAC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O5D,UAAU6D,KAGrI,GAAIC,EAAOS,YACT,IACExD,EAAM+C,EAAOS,YAAYxD,EAAKlB,KAC/B,CAAC,MAAOuB,GAER,CAEHiD,EAAOG,IAAI3E,KAAMkB,EAClB,CAED,OAAOsD,EAAOjE,IAAIP,KACnB,EACD,GAAA2E,CAAevB,QACQ,IAAVA,EAIXoB,EAAOG,IAAI3E,KAAMoD,GAHfoB,EAAOI,OAAO5E,KAIjB,GAEL,CACF,CAkHgB,SAAA6E,EACd1D,EACAsB,GAEA,OAAOgB,EAAWpD,IAAIhB,UACnBqE,OAAO,CAAEC,UAAWG,EAAqBtD,KAAM,CAACW,EAAUsB,KAC1DmB,OACL,CCvaO,MAAMkB,EAAU,cACVC,EAAe,cAC5BV,EAASW,gBAAgBD,EAAcD"}
1
+ {"version":3,"file":"injectable-decorators.js","sources":["../src/constants.ts","../src/utils.ts","../src/registry.ts","../src/Injectables.ts","../src/decorators.ts","../src/index.ts"],"sourcesContent":[null,null,null,null,null,null],"names":["InjectablesKeys","REFLECT","INJECTABLE","INJECT","DefaultInjectablesConfig","singleton","TypeKey","getInjectKey","key","InjectableRegistryImp","constructor","this","cache","has","name","Symbol","for","toString","get","args","meta","Reflect","getMetadata","symbol","Error","options","instance","build","register","obj","category","force","castObj","undefined","e","callback","Injectables","actingInjectablesRegistry","getRegistry","setRegistry","operationsRegistry","reset","selectiveReset","match","regexp","RegExp","Object","entries","reduce","accum","val","injectableBaseDecorator","cfg","assign","original","class","defineMetadata","newConstructor","prototype","defineProperty","writable","enumerable","configurable","value","metadata","ModelKeys","CONSTRUCTOR","injectable","Decoration","define","decorator","apply","onDemand","injectBaseDecorator","target","propertyKey","config","prop","definitionTarget","lookupConstructor","Metadata","type","String","values","WeakMap","transformer","set","delete","inject","VERSION","PACKAGE_NAME","registerLibrary"],"mappings":"mJAWa,MAAAA,EAAkB,CAC7BC,QAAS,aACTC,WAAY,aACZC,OAAQ,UASGC,EAA6C,CACxDC,WAAW,GASAC,EAAU,cC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AAc,EACdD,YAAY,EACZ,GAAA3C,GACE,IAAKiE,EAAOtE,IAAIF,MAAO,CACrB,IAAIkB,EAAMO,EAAYlB,IAAIJ,KAAiB8D,EAAOzD,MAAQ,IAC1D,IAAKU,EACH,MAAUL,MACR,4BAA6BV,EAAaG,2BAA2BN,KAAKD,YAAcC,KAAKD,YAAYI,KAAO4D,EAAO5D,UAAU6D,KAGrI,GAAIC,EAAOS,YACT,IACExD,EAAM+C,EAAOS,YAAYxD,EAAKlB,KAC/B,CAAC,MAAOuB,GAER,CAEHiD,EAAOG,IAAI3E,KAAMkB,EAClB,CAED,OAAOsD,EAAOjE,IAAIP,KACnB,EACD,GAAA2E,CAAevB,QACQ,IAAVA,EAIXoB,EAAOG,IAAI3E,KAAMoD,GAHfoB,EAAOI,OAAO5E,KAIjB,GAEL,CACF,CAkHgB,SAAA6E,EACd1D,EACAsB,GAEA,OAAOgB,EAAWpD,IAAIhB,UACnBqE,OAAO,CAAEC,UAAWG,EAAqBtD,KAAM,CAACW,EAAUsB,KAC1DmB,OACL,CCvaO,MAAMkB,EAAU,cACVC,EAAe,cAC5BV,EAASW,gBAAgBD,EAAcD"}
@@ -18,5 +18,5 @@ export * from "./utils";
18
18
  * @const VERSION
19
19
  * @memberOf module:injectable-decorators
20
20
  */
21
- export declare const VERSION = "1.9.8";
21
+ export declare const VERSION = "1.9.10";
22
22
  export declare const PACKAGE_NAME = "@decaf-ts/injectable-decorators";
package/lib/esm/index.js CHANGED
@@ -19,7 +19,7 @@ export * from "./utils.js";
19
19
  * @const VERSION
20
20
  * @memberOf module:injectable-decorators
21
21
  */
22
- export const VERSION = "1.9.8";
22
+ export const VERSION = "1.9.10";
23
23
  export const PACKAGE_NAME = "@decaf-ts/injectable-decorators";
24
24
  Metadata.registerLibrary(PACKAGE_NAME, VERSION);
25
25
  //# sourceMappingURL=index.js.map
package/lib/index.cjs CHANGED
@@ -36,7 +36,7 @@ __exportStar(require("./utils.cjs"), exports);
36
36
  * @const VERSION
37
37
  * @memberOf module:injectable-decorators
38
38
  */
39
- exports.VERSION = "1.9.8";
39
+ exports.VERSION = "1.9.10";
40
40
  exports.PACKAGE_NAME = "@decaf-ts/injectable-decorators";
41
41
  decoration_1.Metadata.registerLibrary(exports.PACKAGE_NAME, exports.VERSION);
42
42
  //# sourceMappingURL=index.js.map
package/lib/index.d.ts CHANGED
@@ -18,5 +18,5 @@ export * from "./utils";
18
18
  * @const VERSION
19
19
  * @memberOf module:injectable-decorators
20
20
  */
21
- export declare const VERSION = "1.9.8";
21
+ export declare const VERSION = "1.9.10";
22
22
  export declare const PACKAGE_NAME = "@decaf-ts/injectable-decorators";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decaf-ts/injectable-decorators",
3
- "version": "1.9.9",
3
+ "version": "1.9.11",
4
4
  "description": "injectable decorators extension for decorator validation",
5
5
  "type": "module",
6
6
  "exports": {