node-dependency-injection 2.7.3 → 3.0.0-alpha.10

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 (109) hide show
  1. package/.nyc_output/65e34a77-efb9-4bcf-803d-282fd660b5a8.json +1 -0
  2. package/.nyc_output/f2f58129-8a27-4ea1-94b2-d5913ef6944d.json +1 -0
  3. package/.nyc_output/processinfo/65e34a77-efb9-4bcf-803d-282fd660b5a8.json +1 -0
  4. package/.nyc_output/processinfo/f2f58129-8a27-4ea1-94b2-d5913ef6944d.json +1 -0
  5. package/.nyc_output/processinfo/index.json +1 -0
  6. package/CHANGELOG-3.md +7 -0
  7. package/UPGRADE-3.0.md +6 -0
  8. package/coverage/lcov-report/base.css +224 -0
  9. package/coverage/lcov-report/bin/Services/File/BaseAdapter.js.html +158 -0
  10. package/coverage/lcov-report/bin/Services/File/FileManager.js.html +176 -0
  11. package/coverage/lcov-report/bin/Services/File/JsAdapter.js.html +140 -0
  12. package/coverage/lcov-report/bin/Services/File/JsonAdapter.js.html +131 -0
  13. package/coverage/lcov-report/bin/Services/File/YamlAdapter.js.html +155 -0
  14. package/coverage/lcov-report/bin/Services/File/index.html +171 -0
  15. package/coverage/lcov-report/block-navigation.js +79 -0
  16. package/coverage/lcov-report/favicon.png +0 -0
  17. package/coverage/lcov-report/index.html +171 -0
  18. package/coverage/lcov-report/lib/Autowire.js.html +506 -0
  19. package/coverage/lcov-report/lib/Compiler.js.html +239 -0
  20. package/coverage/lcov-report/lib/CompilerPass/DecoratePass.js.html +248 -0
  21. package/coverage/lcov-report/lib/CompilerPass/OptimizePass.js.html +128 -0
  22. package/coverage/lcov-report/lib/CompilerPass/RemovePass.js.html +116 -0
  23. package/coverage/lcov-report/lib/CompilerPass/index.html +156 -0
  24. package/coverage/lcov-report/lib/CompilerPass/index.js.html +326 -0
  25. package/coverage/lcov-report/lib/ContainerBuilder.js.html +1115 -0
  26. package/coverage/lcov-report/lib/Definition.js.html +962 -0
  27. package/coverage/lcov-report/lib/Exception/AbstractServiceException.js.html +110 -0
  28. package/coverage/lcov-report/lib/Exception/AttributesMapException.js.html +101 -0
  29. package/coverage/lcov-report/lib/Exception/ConfigurationFileNotFoundException.js.html +110 -0
  30. package/coverage/lcov-report/lib/Exception/DefinitionNotFoundException.js.html +110 -0
  31. package/coverage/lcov-report/lib/Exception/FrozenContainerException.js.html +101 -0
  32. package/coverage/lcov-report/lib/Exception/LoadMethodNotFoundException.js.html +110 -0
  33. package/coverage/lcov-report/lib/Exception/LoggerWarnMethodNotFoundException.js.html +101 -0
  34. package/coverage/lcov-report/lib/Exception/MethodCallEmptyException.js.html +101 -0
  35. package/coverage/lcov-report/lib/Exception/MethodCallNotFoundException.js.html +110 -0
  36. package/coverage/lcov-report/lib/Exception/NotAbstractServiceException.js.html +110 -0
  37. package/coverage/lcov-report/lib/Exception/PrivateServiceException.js.html +110 -0
  38. package/coverage/lcov-report/lib/Exception/ProcessMethodNotFoundException.js.html +110 -0
  39. package/coverage/lcov-report/lib/Exception/ServiceCircularReferenceException.js.html +101 -0
  40. package/coverage/lcov-report/lib/Exception/ServiceFileNotFoundException.js.html +110 -0
  41. package/coverage/lcov-report/lib/Exception/ServiceFileNotLoadedException.js.html +110 -0
  42. package/coverage/lcov-report/lib/Exception/ServiceNotFoundException.js.html +113 -0
  43. package/coverage/lcov-report/lib/Exception/WrongCompilerPassTypeException.js.html +110 -0
  44. package/coverage/lcov-report/lib/Exception/WrongDefinitionException.js.html +101 -0
  45. package/coverage/lcov-report/lib/Exception/index.html +366 -0
  46. package/coverage/lcov-report/lib/InstanceManager.js.html +839 -0
  47. package/coverage/lcov-report/lib/Loader/FileLoader.js.html +1034 -0
  48. package/coverage/lcov-report/lib/Loader/JsFileLoader.js.html +155 -0
  49. package/coverage/lcov-report/lib/Loader/JsonFileLoader.js.html +98 -0
  50. package/coverage/lcov-report/lib/Loader/YamlFileLoader.js.html +188 -0
  51. package/coverage/lcov-report/lib/Loader/index.html +156 -0
  52. package/coverage/lcov-report/lib/PackageReference.js.html +131 -0
  53. package/coverage/lcov-report/lib/PassConfig.js.html +230 -0
  54. package/coverage/lcov-report/lib/Reference.js.html +158 -0
  55. package/coverage/lcov-report/lib/TagReference.js.html +131 -0
  56. package/coverage/lcov-report/lib/index.html +231 -0
  57. package/coverage/lcov-report/prettify.css +1 -0
  58. package/coverage/lcov-report/prettify.js +2 -0
  59. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  60. package/coverage/lcov-report/sorter.js +170 -0
  61. package/coverage/lcov.info +1516 -0
  62. package/dist/bin/Services/File/BaseAdapter.js +6 -7
  63. package/dist/bin/Services/File/FileManager.js +6 -8
  64. package/dist/bin/Services/File/JsAdapter.js +14 -26
  65. package/dist/bin/Services/File/JsonAdapter.js +13 -25
  66. package/dist/bin/Services/File/YamlAdapter.js +13 -25
  67. package/dist/bin/ndi-config:check.js +2 -2
  68. package/dist/bin/ndi-config:create.js +2 -2
  69. package/dist/bin/ndi-container:service.js +2 -2
  70. package/dist/bin/ndi.js +2 -2
  71. package/dist/lib/Autowire.js +323 -0
  72. package/dist/lib/Compiler.js +8 -12
  73. package/dist/lib/CompilerPass/DecoratePass.js +8 -9
  74. package/dist/lib/CompilerPass/OptimizePass.js +9 -16
  75. package/dist/lib/CompilerPass/RemovePass.js +9 -16
  76. package/dist/lib/CompilerPass/index.js +8 -12
  77. package/dist/lib/ContainerBuilder.js +54 -30
  78. package/dist/lib/Definition.js +11 -15
  79. package/dist/lib/Exception/AbstractServiceException.js +12 -19
  80. package/dist/lib/Exception/AttributesMapException.js +12 -19
  81. package/dist/lib/Exception/ConfigurationFileNotFoundException.js +12 -19
  82. package/dist/lib/Exception/DefinitionNotFoundException.js +12 -19
  83. package/dist/lib/Exception/FrozenContainerException.js +12 -19
  84. package/dist/lib/Exception/LoadMethodNotFoundException.js +12 -19
  85. package/dist/lib/Exception/LoggerWarnMethodNotFoundException.js +12 -19
  86. package/dist/lib/Exception/MethodCallEmptyException.js +12 -19
  87. package/dist/lib/Exception/MethodCallNotFoundException.js +12 -19
  88. package/dist/lib/Exception/NotAbstractServiceException.js +12 -19
  89. package/dist/lib/Exception/PrivateServiceException.js +12 -19
  90. package/dist/lib/Exception/ProcessMethodNotFoundException.js +12 -19
  91. package/dist/lib/Exception/ServiceCircularReferenceException.js +12 -19
  92. package/dist/lib/Exception/ServiceFileNotFoundException.js +12 -19
  93. package/dist/lib/Exception/ServiceFileNotLoadedException.js +12 -19
  94. package/dist/lib/Exception/ServiceNotFoundException.js +14 -20
  95. package/dist/lib/Exception/WrongCompilerPassTypeException.js +12 -19
  96. package/dist/lib/Exception/WrongDefinitionException.js +12 -19
  97. package/dist/lib/InstanceManager.js +53 -48
  98. package/dist/lib/Loader/FileLoader.js +32 -12
  99. package/dist/lib/Loader/JsFileLoader.js +14 -28
  100. package/dist/lib/Loader/JsonFileLoader.js +11 -16
  101. package/dist/lib/Loader/YamlFileLoader.js +20 -32
  102. package/dist/lib/PackageReference.js +6 -8
  103. package/dist/lib/PassConfig.js +6 -7
  104. package/dist/lib/Reference.js +6 -9
  105. package/dist/lib/TagReference.js +6 -8
  106. package/dist/lib/index.js +23 -15
  107. package/dist/lib/types/index.d.ts +9 -1
  108. package/package.json +26 -12
  109. package/tsconfig.json +12 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-dependency-injection",
3
- "version": "2.7.3",
3
+ "version": "3.0.0-alpha.10",
4
4
  "description": "The NodeDependencyInjection component allows you to standardize and centralize the way objects are constructed in your application.",
5
5
  "main": "dist/lib/index.js",
6
6
  "directories": {
@@ -11,8 +11,8 @@
11
11
  "ndi": "dist/bin/ndi.js"
12
12
  },
13
13
  "scripts": {
14
- "test": "cross-env NODE_ENV=test mocha",
15
- "test:coverage": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text mocha",
14
+ "test": "cross-env NODE_ENV=test ts-mocha --paths",
15
+ "test:coverage": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text ts-mocha --paths",
16
16
  "test:standard": "standard",
17
17
  "test:standard:fix": "standard --fix",
18
18
  "build:lib": "rm -rf dist/lib/* && babel lib -d dist/lib -D",
@@ -50,31 +50,45 @@
50
50
  },
51
51
  "homepage": "https://github.com/zazoomauro/node-dependency-injection#readme",
52
52
  "dependencies": {
53
+ "@babel/plugin-transform-runtime": "^7.17.10",
54
+ "@babel/runtime": "^7.17.9",
55
+ "@typescript-eslint/typescript-estree": "^5.23.0",
53
56
  "chalk": "^4.1.0",
54
- "commander": "^8.1.0",
57
+ "commander": "^8.3.0",
55
58
  "console.table": "^0.10.0",
56
59
  "js-yaml": "^4.0.0",
60
+ "json5": "^2.2.1",
57
61
  "validate-npm-package-name": "^3.0.0"
58
62
  },
59
63
  "devDependencies": {
60
- "@babel/cli": "^7.12.10",
61
- "@babel/core": "^7.12.10",
62
- "@babel/preset-env": "^7.12.11",
63
- "@babel/register": "^7.12.10",
64
- "babel-plugin-istanbul": "^6.0.0",
65
- "chai": "^4.2.0",
64
+ "@babel/cli": "^7.17.10",
65
+ "@babel/core": "^7.17.10",
66
+ "@babel/preset-env": "^7.17.10",
67
+ "@babel/register": "^7.17.7",
68
+ "@types/chai": "^4.3.1",
69
+ "@types/expect": "^24.3.0",
70
+ "@types/mocha": "^9.1.1",
71
+ "babel-plugin-istanbul": "^6.1.1",
72
+ "chai": "^4.3.6",
66
73
  "codecov": "^4.0.0-0",
67
74
  "cross-env": "^7.0.3",
68
75
  "istanbul": "^0.4.5",
69
- "mocha": "^9.0.3",
76
+ "mocha": "^9.2.2",
70
77
  "nyc": "^15.1.0",
71
78
  "sinon": "^11.1.2",
72
- "standard": "^16.0.3"
79
+ "standard": "^16.0.4",
80
+ "ts-mocha": "^10.0.0",
81
+ "ts-node": "^10.7.0",
82
+ "tsconfig-paths": "^4.0.0",
83
+ "typescript": "^4.6.4"
73
84
  },
74
85
  "babel": {
75
86
  "presets": [
76
87
  "@babel/preset-env"
77
88
  ],
89
+ "plugins": [
90
+ "@babel/transform-runtime"
91
+ ],
78
92
  "env": {
79
93
  "test": {
80
94
  "plugins": [
package/tsconfig.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES6",
4
+ "lib": ["DOM", "ES7"],
5
+ "baseUrl": ".",
6
+ "paths": {
7
+ "@app/*": [
8
+ "./test/Resources-ts/AutowireModulePath/src/*",
9
+ ]
10
+ }
11
+ }
12
+ }