@decaf-ts/injectable-decorators 1.6.17 → 1.8.0

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.
Files changed (45) hide show
  1. package/README.md +22 -2
  2. package/dist/injectable-decorators.cjs +2 -541
  3. package/dist/injectable-decorators.cjs.map +1 -0
  4. package/dist/injectable-decorators.js +2 -0
  5. package/dist/injectable-decorators.js.map +1 -0
  6. package/lib/Injectables.cjs +1 -1
  7. package/lib/Injectables.js.map +1 -0
  8. package/lib/Metadata.cjs +1 -1
  9. package/lib/Metadata.js.map +1 -0
  10. package/lib/constants.cjs +1 -1
  11. package/lib/constants.js.map +1 -0
  12. package/lib/decorators.cjs +1 -1
  13. package/lib/decorators.js.map +1 -0
  14. package/lib/esm/Injectables.js +1 -1
  15. package/lib/esm/Injectables.js.map +1 -0
  16. package/lib/esm/Metadata.js +1 -1
  17. package/lib/esm/Metadata.js.map +1 -0
  18. package/lib/esm/constants.js +1 -1
  19. package/lib/esm/constants.js.map +1 -0
  20. package/lib/esm/decorators.js +1 -1
  21. package/lib/esm/decorators.js.map +1 -0
  22. package/lib/esm/index.d.ts +2 -2
  23. package/lib/esm/index.js +3 -3
  24. package/lib/esm/index.js.map +1 -0
  25. package/lib/esm/overrides.js +1 -1
  26. package/lib/esm/overrides.js.map +1 -0
  27. package/lib/esm/registry.js +1 -1
  28. package/lib/esm/registry.js.map +1 -0
  29. package/lib/esm/types.js +1 -1
  30. package/lib/esm/types.js.map +1 -0
  31. package/lib/esm/utils.js +1 -1
  32. package/lib/esm/utils.js.map +1 -0
  33. package/lib/index.cjs +3 -3
  34. package/lib/index.d.ts +2 -2
  35. package/lib/index.js.map +1 -0
  36. package/lib/overrides.cjs +1 -1
  37. package/lib/overrides.js.map +1 -0
  38. package/lib/registry.cjs +1 -1
  39. package/lib/registry.js.map +1 -0
  40. package/lib/types.cjs +1 -1
  41. package/lib/types.js.map +1 -0
  42. package/lib/utils.cjs +1 -1
  43. package/lib/utils.js.map +1 -0
  44. package/package.json +11 -16
  45. package/dist/injectable-decorators.esm.cjs +0 -522
package/README.md CHANGED
@@ -1,9 +1,8 @@
1
- ![Banner](./workdocs/assets/Banner.png)
1
+ ![Banner](./workdocs/assets/decaf-logo.svg)
2
2
  ## Simple Injectables engine
3
3
 
4
4
  A lightweight TypeScript dependency injection library that provides decorators for marking classes as injectable singletons and injecting dependencies into class properties. It features a centralized registry for managing dependencies, lazy loading of injected properties, and support for custom transformations of injected instances.
5
5
 
6
-
7
6
  ![Licence](https://img.shields.io/github/license/decaf-ts/injectable-decorators.svg?style=plastic)
8
7
  ![GitHub language count](https://img.shields.io/github/languages/count/decaf-ts/injectable-decorators?style=plastic)
9
8
  ![GitHub top language](https://img.shields.io/github/languages/top/decaf-ts/injectable-decorators?style=plastic)
@@ -27,6 +26,9 @@ A lightweight TypeScript dependency injection library that provides decorators f
27
26
 
28
27
  Documentation available [here](https://decaf-ts.github.io/injectable-decorators/)
29
28
 
29
+ Minimal size: 1.4 KB kb gzipped
30
+
31
+
30
32
  ### Description
31
33
 
32
34
  The `injectable-decorators` library is a standalone module that provides a lightweight and flexible dependency injection system for TypeScript applications. It is designed to simplify the management of dependencies between components in your application through the use of TypeScript decorators.
@@ -291,6 +293,24 @@ Notes:
291
293
  - VERSION is exported as a string placeholder defined at build time.
292
294
 
293
295
 
296
+ ## Coding Principles
297
+
298
+ - group similar functionality in folders (analog to namespaces but without any namespace declaration)
299
+ - one class per file;
300
+ - one interface per file (unless interface is just used as a type);
301
+ - group types as other interfaces in a types.ts file per folder;
302
+ - group constants or enums in a constants.ts file per folder;
303
+ - group decorators in a decorators.ts file per folder;
304
+ - always import from the specific file, never from a folder or index file (exceptions for dependencies on other packages);
305
+ - prefer the usage of established design patters where applicable:
306
+ - Singleton (can be an anti-pattern. use with care);
307
+ - factory;
308
+ - observer;
309
+ - strategy;
310
+ - builder;
311
+ - etc;
312
+
313
+
294
314
  ### Related
295
315
 
296
316
  [![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=decaf-ts&repo=ts-workspace)](https://github.com/decaf-ts/ts-workspace)