@vercube/di 0.0.47 → 1.0.0-beta.1

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/dist/index.d.mts CHANGED
@@ -356,6 +356,16 @@ declare function Init(): Function;
356
356
  */
357
357
  declare function Destroy(): Function;
358
358
  //#endregion
359
+ //#region src/Decorators/Injectable.d.ts
360
+ /**
361
+ * Marks a class as injectable, making it discoverable by the Vercube Nitro module
362
+ * for automatic registration in the DI container.
363
+ *
364
+ * This decorator is intentionally a no-op at runtime - it exists solely as a
365
+ * compile-time marker that the build-time scanner can detect via AST analysis.
366
+ */
367
+ declare function Injectable(): ClassDecorator;
368
+ //#endregion
359
369
  //#region src/Utils/Utils.d.ts
360
370
  /**
361
371
  * This function generates new service key for particular service. Providing
@@ -431,4 +441,4 @@ declare function initializeContainer(container: Container): void;
431
441
  */
432
442
  declare function destroyContainer(container: Container): void;
433
443
  //#endregion
434
- export { BaseDecorator, Container, Destroy, IClassType, IDecoratedInstance, IDecoratedPrototype, IDecoratorEntry, IOC, Identity, Init, Inject, InjectOptional, createDecorator, destroyContainer, destroyDecorators, initializeContainer, initializeDecorators };
444
+ export { BaseDecorator, Container, Destroy, IClassType, IDecoratedInstance, IDecoratedPrototype, IDecoratorEntry, IOC, Identity, Init, Inject, InjectOptional, Injectable, createDecorator, destroyContainer, destroyDecorators, initializeContainer, initializeDecorators };
package/dist/index.mjs CHANGED
@@ -700,4 +700,16 @@ function Destroy() {
700
700
  return createDecorator(DestroyDecorator, {});
701
701
  }
702
702
  //#endregion
703
- export { BaseDecorator, Container, Destroy, IOC, Identity, Init, Inject, InjectOptional, createDecorator, destroyContainer, destroyDecorators, initializeContainer, initializeDecorators };
703
+ //#region src/Decorators/Injectable.ts
704
+ /**
705
+ * Marks a class as injectable, making it discoverable by the Vercube Nitro module
706
+ * for automatic registration in the DI container.
707
+ *
708
+ * This decorator is intentionally a no-op at runtime - it exists solely as a
709
+ * compile-time marker that the build-time scanner can detect via AST analysis.
710
+ */
711
+ function Injectable() {
712
+ return () => {};
713
+ }
714
+ //#endregion
715
+ export { BaseDecorator, Container, Destroy, IOC, Identity, Init, Inject, InjectOptional, Injectable, createDecorator, destroyContainer, destroyDecorators, initializeContainer, initializeDecorators };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercube/di",
3
- "version": "0.0.47",
3
+ "version": "1.0.0-beta.1",
4
4
  "description": "Dependency Injection module for Vercube framework",
5
5
  "repository": {
6
6
  "type": "git",