@notjustcoders/ioc-arise 1.1.10 → 1.1.12
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 +37 -115
- package/dist/analyser/ast-parser.d.ts.map +1 -1
- package/dist/analyser/ast-parser.js +42 -44
- package/dist/analyser/ast-parser.js.map +1 -1
- package/dist/analyser/class-analyzer.d.ts.map +1 -1
- package/dist/analyser/class-analyzer.js +35 -40
- package/dist/analyser/class-analyzer.js.map +1 -1
- package/dist/analyser/file-discovery.d.ts.map +1 -1
- package/dist/analyser/file-discovery.js +0 -3
- package/dist/analyser/file-discovery.js.map +1 -1
- package/dist/analyser/project-analyzer.d.ts.map +1 -1
- package/dist/analyser/project-analyzer.js +12 -9
- package/dist/analyser/project-analyzer.js.map +1 -1
- package/dist/commands/analyze.d.ts.map +1 -1
- package/dist/commands/analyze.js +33 -26
- package/dist/commands/analyze.js.map +1 -1
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +65 -48
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/visualize.d.ts.map +1 -1
- package/dist/commands/visualize.js +20 -13
- package/dist/commands/visualize.js.map +1 -1
- package/dist/errors/IoCError.d.ts +7 -0
- package/dist/errors/IoCError.d.ts.map +1 -1
- package/dist/errors/IoCError.js +16 -1
- package/dist/errors/IoCError.js.map +1 -1
- package/dist/errors/errorFactory.d.ts +1 -1
- package/dist/errors/errorFactory.d.ts.map +1 -1
- package/dist/errors/errorFactory.js +23 -23
- package/dist/errors/errorFactory.js.map +1 -1
- package/dist/generator/index.d.ts +2 -19
- package/dist/generator/index.d.ts.map +1 -1
- package/dist/generator/index.js +16 -34
- package/dist/generator/index.js.map +1 -1
- package/dist/generator/ioc-container-generator.d.ts +27 -0
- package/dist/generator/ioc-container-generator.d.ts.map +1 -0
- package/dist/generator/ioc-container-generator.js +353 -0
- package/dist/generator/ioc-container-generator.js.map +1 -0
- package/dist/generator/type-declaration-generator.d.ts +10 -0
- package/dist/generator/type-declaration-generator.d.ts.map +1 -0
- package/dist/generator/type-declaration-generator.js +141 -0
- package/dist/generator/type-declaration-generator.js.map +1 -0
- package/dist/index.js +14 -4
- package/dist/index.js.map +1 -1
- package/dist/utils/circular-dependency-detector.d.ts +16 -0
- package/dist/utils/circular-dependency-detector.d.ts.map +1 -0
- package/dist/utils/circular-dependency-detector.js +70 -0
- package/dist/utils/circular-dependency-detector.js.map +1 -0
- package/dist/utils/configManager.d.ts.map +1 -1
- package/dist/utils/configManager.js +8 -6
- package/dist/utils/configManager.js.map +1 -1
- package/dist/utils/configValidator.d.ts +1 -1
- package/dist/utils/configValidator.d.ts.map +1 -1
- package/dist/utils/configValidator.js +18 -15
- package/dist/utils/configValidator.js.map +1 -1
- package/dist/utils/logger.d.ts +93 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +162 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/moduleResolver.d.ts +1 -1
- package/dist/utils/moduleResolver.d.ts.map +1 -1
- package/dist/utils/moduleResolver.js +5 -5
- package/dist/utils/moduleResolver.js.map +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CircularDependencyDetector = void 0;
|
|
4
|
+
const topological_sorter_1 = require("./topological-sorter");
|
|
5
|
+
class CircularDependencyDetector {
|
|
6
|
+
/**
|
|
7
|
+
* Detects circular dependencies in a list of classes
|
|
8
|
+
* @param classes - Array of analyzed classes
|
|
9
|
+
* @returns Array of cycles, where each cycle is an array of class names involved
|
|
10
|
+
*/
|
|
11
|
+
static detect(classes) {
|
|
12
|
+
// Build a map from interface/class name to actual class name
|
|
13
|
+
const nameToClassName = new Map();
|
|
14
|
+
classes.forEach((cls) => {
|
|
15
|
+
nameToClassName.set(cls.name, cls.name); // Class name maps to itself
|
|
16
|
+
if (cls.interfaceName) {
|
|
17
|
+
nameToClassName.set(cls.interfaceName, cls.name); // Interface name maps to implementing class
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
const dependencyGraph = new Map();
|
|
21
|
+
// Build dependency graph using actual class names
|
|
22
|
+
classes.forEach((cls) => {
|
|
23
|
+
const resolvedDeps = cls.dependencies
|
|
24
|
+
.map((dep) => nameToClassName.get(dep.name))
|
|
25
|
+
.filter((name) => name !== undefined);
|
|
26
|
+
dependencyGraph.set(cls.name, resolvedDeps);
|
|
27
|
+
});
|
|
28
|
+
// Use TopologicalSorter to detect cycles
|
|
29
|
+
const result = topological_sorter_1.TopologicalSorter.sort(dependencyGraph);
|
|
30
|
+
return result.cycles;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Detects circular dependencies between modules
|
|
34
|
+
* @param moduleGroupedClasses - Map of module name to classes in that module
|
|
35
|
+
* @returns Array of cycles, where each cycle is an array of module names involved
|
|
36
|
+
*/
|
|
37
|
+
static detectModuleCycles(moduleGroupedClasses) {
|
|
38
|
+
const moduleDependencyGraph = new Map();
|
|
39
|
+
// Build module dependency graph
|
|
40
|
+
for (const [moduleName, classes] of moduleGroupedClasses.entries()) {
|
|
41
|
+
const moduleDeps = new Set();
|
|
42
|
+
// For each class in this module, find which modules its dependencies belong to
|
|
43
|
+
for (const cls of classes) {
|
|
44
|
+
for (const dep of cls.dependencies) {
|
|
45
|
+
// Find which module this dependency belongs to
|
|
46
|
+
for (const [depModuleName, depModuleClasses] of moduleGroupedClasses.entries()) {
|
|
47
|
+
if (depModuleName === moduleName)
|
|
48
|
+
continue; // Skip self-dependencies
|
|
49
|
+
// Check if the dependency is in this other module (by interface name or class name)
|
|
50
|
+
const isInModule = depModuleClasses.some(depCls => depCls.interfaceName === dep.name || depCls.name === dep.name);
|
|
51
|
+
if (isInModule) {
|
|
52
|
+
moduleDeps.add(depModuleName);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
moduleDependencyGraph.set(moduleName, moduleDeps);
|
|
58
|
+
}
|
|
59
|
+
// Convert Set to Array for TopologicalSorter
|
|
60
|
+
const graphForSorter = new Map();
|
|
61
|
+
for (const [module, deps] of moduleDependencyGraph.entries()) {
|
|
62
|
+
graphForSorter.set(module, Array.from(deps));
|
|
63
|
+
}
|
|
64
|
+
// Use TopologicalSorter to detect cycles
|
|
65
|
+
const result = topological_sorter_1.TopologicalSorter.sort(graphForSorter);
|
|
66
|
+
return result.cycles;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.CircularDependencyDetector = CircularDependencyDetector;
|
|
70
|
+
//# sourceMappingURL=circular-dependency-detector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"circular-dependency-detector.js","sourceRoot":"","sources":["../../src/utils/circular-dependency-detector.ts"],"names":[],"mappings":";;;AACA,6DAAyD;AAEzD,MAAa,0BAA0B;IACnC;;;;OAIG;IACH,MAAM,CAAC,MAAM,CAAC,OAAoB;QAC9B,6DAA6D;QAC7D,MAAM,eAAe,GAAG,IAAI,GAAG,EAAkB,CAAC;QAClD,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACpB,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,4BAA4B;YACrE,IAAI,GAAG,CAAC,aAAa,EAAE,CAAC;gBACpB,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC,aAAa,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,4CAA4C;YAClG,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,eAAe,GAAG,IAAI,GAAG,EAAoB,CAAC;QAEpD,kDAAkD;QAClD,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACpB,MAAM,YAAY,GAAG,GAAG,CAAC,YAAY;iBAChC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,eAA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;YACL,CAAC;YAED,qBAAqB,CAAC,GAAG,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QACtD,CAAC;QAED,6CAA6C;QAC7C,MAAM,cAAc,GAAG,IAAI,GAAG,EAAoB,CAAC;QACnD,KAAK,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,qBAAqB,CAAC,OAAO,EAAE,EAAE,CAAC;YAC3D,cAAc,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACjD,CAAC;QAED,yCAAyC;QACzC,MAAM,MAAM,GAAG,sCAAiB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACtD,OAAO,MAAM,CAAC,MAAM,CAAC;IACzB,CAAC;CACJ;AA5ED,gEA4EC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configManager.d.ts","sourceRoot":"","sources":["../../src/utils/configManager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"configManager.d.ts","sourceRoot":"","sources":["../../src/utils/configManager.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,SAAS;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CACpC;AAED,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAqB;IAC7D,OAAO,CAAC,MAAM,CAAiB;IAC/B,OAAO,CAAC,UAAU,CAAS;gBAEf,SAAS,EAAE,MAAM;IAM7B,OAAO,CAAC,UAAU;IAyBX,SAAS,IAAI,SAAS;IAItB,mBAAmB,CAAC,UAAU,EAAE,GAAG,GAAG,SAAS;IAa/C,aAAa,IAAI,OAAO;IAIxB,aAAa,IAAI,MAAM;CAG/B"}
|
|
@@ -3,7 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ConfigManager = void 0;
|
|
4
4
|
const fs_1 = require("fs");
|
|
5
5
|
const path_1 = require("path");
|
|
6
|
-
const
|
|
6
|
+
const errorFactory_1 = require("../errors/errorFactory");
|
|
7
|
+
const IoCError_1 = require("../errors/IoCError");
|
|
8
|
+
const logger_1 = require("./logger");
|
|
7
9
|
class ConfigManager {
|
|
8
10
|
constructor(sourceDir) {
|
|
9
11
|
this.config = {};
|
|
@@ -19,14 +21,14 @@ class ConfigManager {
|
|
|
19
21
|
}
|
|
20
22
|
catch (error) {
|
|
21
23
|
if (error instanceof SyntaxError) {
|
|
22
|
-
const parseError =
|
|
23
|
-
|
|
24
|
+
const parseError = errorFactory_1.ErrorFactory.configParseError(this.configPath, error.message);
|
|
25
|
+
logger_1.Logger.warn(`Warning: ${IoCError_1.ErrorUtils.formatForConsole(parseError)}`);
|
|
24
26
|
}
|
|
25
27
|
else {
|
|
26
|
-
const readError =
|
|
27
|
-
|
|
28
|
+
const readError = errorFactory_1.ErrorFactory.fileReadError(this.configPath, error instanceof Error ? error.message : String(error));
|
|
29
|
+
logger_1.Logger.warn(`Warning: ${IoCError_1.ErrorUtils.formatForConsole(readError)}`);
|
|
28
30
|
}
|
|
29
|
-
|
|
31
|
+
logger_1.Logger.log(' Using default configuration.');
|
|
30
32
|
this.config = {};
|
|
31
33
|
}
|
|
32
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configManager.js","sourceRoot":"","sources":["../../src/utils/configManager.ts"],"names":[],"mappings":";;;AAAA,2BAA8C;AAC9C,+BAAwC;AACxC,
|
|
1
|
+
{"version":3,"file":"configManager.js","sourceRoot":"","sources":["../../src/utils/configManager.ts"],"names":[],"mappings":";;;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AM,GAAG,EAAE,CAAC;YACnB,CAAC;QACH,CAAC;IACH,CAAC;IAEM,SAAS;QACd,OAAO,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;IAC5B,CAAC;IAEM,mBAAmB,CAAC,UAAe;QACxC,+CAA+C;QAC/C,OAAO;YACL,MAAM,EAAE,UAAU,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,KAAK;YACxD,MAAM,EAAE,UAAU,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,kBAAkB;YACrE,SAAS,EAAE,UAAU,CAAC,SAAS,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS;YACxD,OAAO,EAAE,UAAU,CAAC,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO;YAClD,WAAW,EAAE,UAAU,CAAC,WAAW,IAAI,IAAI,CAAC,MAAM,CAAC,WAAW,IAAI,KAAK;YACvE,OAAO,EAAE,UAAU,CAAC,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,KAAK;YAC3D,OAAO,EAAE,UAAU,CAAC,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO;SACnD,CAAC;IACJ,CAAC;IAEM,aAAa;QAClB,OAAO,IAAA,eAAU,EAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACrC,CAAC;IAEM,aAAa;QAClB,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;;AA3DH,sCA4DC;AA3DyB,8BAAgB,GAAG,iBAAiB,AAApB,CAAqB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configValidator.d.ts","sourceRoot":"","sources":["../../src/utils/configValidator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"configValidator.d.ts","sourceRoot":"","sources":["../../src/utils/configValidator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAA4C,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAExF,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,QAAQ,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,qBAAa,eAAe;IAC1B;;;;OAIG;WACW,cAAc,CAAC,MAAM,EAAE,SAAS,GAAG,gBAAgB;IA8EjE;;;;;OAKG;WACW,cAAc,CAAC,MAAM,EAAE,SAAS,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO;IAyB7E;;;;;OAKG;WACW,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,MAAM,SAAS,CAAC,EAAE,GAAG,gBAAgB;CAqBvG"}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ConfigValidator = void 0;
|
|
4
4
|
const moduleResolver_1 = require("./moduleResolver");
|
|
5
|
-
const
|
|
5
|
+
const errorFactory_1 = require("../errors/errorFactory");
|
|
6
|
+
const IoCError_1 = require("../errors/IoCError");
|
|
6
7
|
class ConfigValidator {
|
|
7
8
|
/**
|
|
8
9
|
* Validates the complete IoC configuration
|
|
@@ -15,13 +16,13 @@ class ConfigValidator {
|
|
|
15
16
|
// Validate source directory
|
|
16
17
|
if (config.source !== undefined) {
|
|
17
18
|
if (typeof config.source !== 'string' || config.source.trim() === '') {
|
|
18
|
-
errors.push(
|
|
19
|
+
errors.push(errorFactory_1.ErrorFactory.configValidationError('source', config.source, 'non-empty string'));
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
22
|
// Validate output file
|
|
22
23
|
if (config.output !== undefined) {
|
|
23
24
|
if (typeof config.output !== 'string' || config.output.trim() === '') {
|
|
24
|
-
errors.push(
|
|
25
|
+
errors.push(errorFactory_1.ErrorFactory.configValidationError('output', config.output, 'non-empty string'));
|
|
25
26
|
}
|
|
26
27
|
else if (!config.output.endsWith('.ts') && !config.output.endsWith('.js')) {
|
|
27
28
|
warnings.push('Output file should have .ts or .js extension');
|
|
@@ -30,41 +31,41 @@ class ConfigValidator {
|
|
|
30
31
|
// Validate interface pattern
|
|
31
32
|
if (config.interface !== undefined) {
|
|
32
33
|
if (typeof config.interface !== 'string') {
|
|
33
|
-
errors.push(
|
|
34
|
+
errors.push(errorFactory_1.ErrorFactory.configValidationError('interface', config.interface, 'string'));
|
|
34
35
|
}
|
|
35
36
|
else {
|
|
36
37
|
try {
|
|
37
38
|
new RegExp(config.interface);
|
|
38
39
|
}
|
|
39
40
|
catch (error) {
|
|
40
|
-
errors.push(
|
|
41
|
+
errors.push(errorFactory_1.ErrorFactory.validationError(`Invalid interface pattern regex: ${config.interface}`, { configProperty: 'interface' }));
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
// Validate exclude patterns
|
|
45
46
|
if (config.exclude !== undefined) {
|
|
46
47
|
if (!Array.isArray(config.exclude)) {
|
|
47
|
-
errors.push(
|
|
48
|
+
errors.push(errorFactory_1.ErrorFactory.configValidationError('exclude', config.exclude, 'array'));
|
|
48
49
|
}
|
|
49
50
|
else {
|
|
50
51
|
config.exclude.forEach((pattern, index) => {
|
|
51
52
|
if (typeof pattern !== 'string') {
|
|
52
|
-
errors.push(
|
|
53
|
+
errors.push(errorFactory_1.ErrorFactory.validationError(`Exclude pattern at index ${index} must be a string`, { configProperty: 'exclude' }));
|
|
53
54
|
}
|
|
54
55
|
});
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
58
|
// Validate boolean flags
|
|
58
59
|
if (config.checkCycles !== undefined && typeof config.checkCycles !== 'boolean') {
|
|
59
|
-
errors.push(
|
|
60
|
+
errors.push(errorFactory_1.ErrorFactory.configValidationError('checkCycles', config.checkCycles, 'boolean'));
|
|
60
61
|
}
|
|
61
62
|
if (config.verbose !== undefined && typeof config.verbose !== 'boolean') {
|
|
62
|
-
errors.push(
|
|
63
|
+
errors.push(errorFactory_1.ErrorFactory.configValidationError('verbose', config.verbose, 'boolean'));
|
|
63
64
|
}
|
|
64
65
|
// Validate modules configuration
|
|
65
66
|
if (config.modules !== undefined) {
|
|
66
67
|
if (typeof config.modules !== 'object' || config.modules === null || Array.isArray(config.modules)) {
|
|
67
|
-
errors.push(
|
|
68
|
+
errors.push(errorFactory_1.ErrorFactory.configValidationError('modules', config.modules, 'object'));
|
|
68
69
|
}
|
|
69
70
|
else {
|
|
70
71
|
const moduleErrors = moduleResolver_1.ModuleResolver.validateModuleConfig(config.modules);
|
|
@@ -86,17 +87,19 @@ class ConfigValidator {
|
|
|
86
87
|
static validateAndLog(config, configPath) {
|
|
87
88
|
const result = this.validateConfig(config);
|
|
88
89
|
if (result.warnings.length > 0) {
|
|
89
|
-
|
|
90
|
+
const { Logger } = require('./logger');
|
|
91
|
+
Logger.warn('Configuration warnings:');
|
|
90
92
|
result.warnings.forEach(warning => {
|
|
91
|
-
|
|
93
|
+
Logger.log(` ${warning}`);
|
|
92
94
|
});
|
|
93
95
|
}
|
|
94
96
|
if (!result.isValid) {
|
|
97
|
+
const { Logger } = require('./logger');
|
|
95
98
|
const configSource = configPath ? ` in ${configPath}` : '';
|
|
96
|
-
|
|
97
|
-
|
|
99
|
+
Logger.error(`Configuration validation failed${configSource}`);
|
|
100
|
+
Logger.log('\n Validation errors:');
|
|
98
101
|
result.errors.forEach(error => {
|
|
99
|
-
|
|
102
|
+
Logger.log(` • ${IoCError_1.ErrorUtils.formatForConsole(error)}`);
|
|
100
103
|
});
|
|
101
104
|
return false;
|
|
102
105
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configValidator.js","sourceRoot":"","sources":["../../src/utils/configValidator.ts"],"names":[],"mappings":";;;AACA,qDAAkD;AAClD,
|
|
1
|
+
{"version":3,"file":"configValidator.js","sourceRoot":"","sources":["../../src/utils/configValidator.ts"],"names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AU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAC5E,CAAC;QAEF,OAAO;YACL,OAAO,EAAE,cAAc,CAAC,MAAM,KAAK,CAAC;YACpC,MAAM,EAAE,cAAc;YACtB,QAAQ,EAAE,gBAAgB;SAC3B,CAAC;IACJ,CAAC;CACF;AA9ID,0CA8IC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logger utility for CLI output
|
|
3
|
+
* Provides consistent, production-ready logging with support for verbose mode and colors
|
|
4
|
+
*/
|
|
5
|
+
export declare enum LogLevel {
|
|
6
|
+
ERROR = 0,
|
|
7
|
+
WARN = 1,
|
|
8
|
+
INFO = 2,
|
|
9
|
+
SUCCESS = 3,
|
|
10
|
+
DEBUG = 4
|
|
11
|
+
}
|
|
12
|
+
export declare class Logger {
|
|
13
|
+
private static verbose;
|
|
14
|
+
private static silent;
|
|
15
|
+
private static colorsEnabled;
|
|
16
|
+
/**
|
|
17
|
+
* Initialize logger with options
|
|
18
|
+
*/
|
|
19
|
+
static initialize(options?: {
|
|
20
|
+
verbose?: boolean;
|
|
21
|
+
silent?: boolean;
|
|
22
|
+
colors?: boolean;
|
|
23
|
+
}): void;
|
|
24
|
+
/**
|
|
25
|
+
* Apply color to text
|
|
26
|
+
*/
|
|
27
|
+
private static colorize;
|
|
28
|
+
/**
|
|
29
|
+
* Log an error message
|
|
30
|
+
*/
|
|
31
|
+
static error(message: string, ...args: unknown[]): void;
|
|
32
|
+
/**
|
|
33
|
+
* Log a warning message
|
|
34
|
+
*/
|
|
35
|
+
static warn(message: string, ...args: unknown[]): void;
|
|
36
|
+
/**
|
|
37
|
+
* Log an info message
|
|
38
|
+
*/
|
|
39
|
+
static info(message: string, ...args: unknown[]): void;
|
|
40
|
+
/**
|
|
41
|
+
* Log a success message
|
|
42
|
+
*/
|
|
43
|
+
static success(message: string, ...args: unknown[]): void;
|
|
44
|
+
/**
|
|
45
|
+
* Log a debug message (only shown in verbose mode)
|
|
46
|
+
*/
|
|
47
|
+
static debug(message: string, ...args: unknown[]): void;
|
|
48
|
+
/**
|
|
49
|
+
* Log a plain message without prefix (for structured output)
|
|
50
|
+
*/
|
|
51
|
+
static log(message: string, ...args: unknown[]): void;
|
|
52
|
+
/**
|
|
53
|
+
* Log a message with custom emoji/prefix and optional color
|
|
54
|
+
*/
|
|
55
|
+
static custom(prefix: string, message: string, color?: string, ...args: unknown[]): void;
|
|
56
|
+
/**
|
|
57
|
+
* Log a section header
|
|
58
|
+
*/
|
|
59
|
+
static section(title: string): void;
|
|
60
|
+
/**
|
|
61
|
+
* Log a newline
|
|
62
|
+
*/
|
|
63
|
+
static newline(): void;
|
|
64
|
+
/**
|
|
65
|
+
* Format error for display
|
|
66
|
+
*/
|
|
67
|
+
static formatError(error: unknown): string;
|
|
68
|
+
/**
|
|
69
|
+
* Check if verbose mode is enabled
|
|
70
|
+
*/
|
|
71
|
+
static isVerbose(): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Colorize text (public method for advanced usage)
|
|
74
|
+
*/
|
|
75
|
+
static colorizeText(text: string, color: string): string;
|
|
76
|
+
/**
|
|
77
|
+
* Get color codes (for advanced usage)
|
|
78
|
+
*/
|
|
79
|
+
static getColors(): {
|
|
80
|
+
reset: string;
|
|
81
|
+
bright: string;
|
|
82
|
+
dim: string;
|
|
83
|
+
red: string;
|
|
84
|
+
green: string;
|
|
85
|
+
yellow: string;
|
|
86
|
+
blue: string;
|
|
87
|
+
magenta: string;
|
|
88
|
+
cyan: string;
|
|
89
|
+
white: string;
|
|
90
|
+
gray: string;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"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AAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAOxF;;OAEG;IACH,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IASnC;;OAEG;IACH,MAAM,CAAC,OAAO,IAAI,IAAI;IAKtB;;OAEG;IACH,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM;IAO1C;;OAEG;IACH,MAAM,CAAC,SAAS,IAAI,OAAO;IAI3B;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM;IAIxD;;OAEG;IACH,MAAM,CAAC,SAAS;;;;;;;;;;;;;CAGnB"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Logger utility for CLI output
|
|
4
|
+
* Provides consistent, production-ready logging with support for verbose mode and colors
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.Logger = exports.LogLevel = void 0;
|
|
8
|
+
// ANSI color codes for beautiful console output
|
|
9
|
+
const colors = {
|
|
10
|
+
reset: '\x1b[0m',
|
|
11
|
+
bright: '\x1b[1m',
|
|
12
|
+
dim: '\x1b[2m',
|
|
13
|
+
red: '\x1b[31m',
|
|
14
|
+
green: '\x1b[32m',
|
|
15
|
+
yellow: '\x1b[33m',
|
|
16
|
+
blue: '\x1b[34m',
|
|
17
|
+
magenta: '\x1b[35m',
|
|
18
|
+
cyan: '\x1b[36m',
|
|
19
|
+
white: '\x1b[37m',
|
|
20
|
+
gray: '\x1b[90m',
|
|
21
|
+
};
|
|
22
|
+
var LogLevel;
|
|
23
|
+
(function (LogLevel) {
|
|
24
|
+
LogLevel[LogLevel["ERROR"] = 0] = "ERROR";
|
|
25
|
+
LogLevel[LogLevel["WARN"] = 1] = "WARN";
|
|
26
|
+
LogLevel[LogLevel["INFO"] = 2] = "INFO";
|
|
27
|
+
LogLevel[LogLevel["SUCCESS"] = 3] = "SUCCESS";
|
|
28
|
+
LogLevel[LogLevel["DEBUG"] = 4] = "DEBUG";
|
|
29
|
+
})(LogLevel || (exports.LogLevel = LogLevel = {}));
|
|
30
|
+
class Logger {
|
|
31
|
+
/**
|
|
32
|
+
* Initialize logger with options
|
|
33
|
+
*/
|
|
34
|
+
static initialize(options = {}) {
|
|
35
|
+
Logger.verbose = options.verbose ?? false;
|
|
36
|
+
Logger.silent = options.silent ?? false;
|
|
37
|
+
Logger.colorsEnabled = options.colors ?? true;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Apply color to text
|
|
41
|
+
*/
|
|
42
|
+
static colorize(text, color) {
|
|
43
|
+
if (!Logger.colorsEnabled)
|
|
44
|
+
return text;
|
|
45
|
+
return `${color}${text}${colors.reset}`;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Log an error message
|
|
49
|
+
*/
|
|
50
|
+
static error(message, ...args) {
|
|
51
|
+
if (Logger.silent)
|
|
52
|
+
return;
|
|
53
|
+
const coloredMessage = Logger.colorize(`❌ ${message}`, colors.red + colors.bright);
|
|
54
|
+
console.error(coloredMessage, ...args);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Log a warning message
|
|
58
|
+
*/
|
|
59
|
+
static warn(message, ...args) {
|
|
60
|
+
if (Logger.silent)
|
|
61
|
+
return;
|
|
62
|
+
const coloredMessage = Logger.colorize(`⚠️ ${message}`, colors.yellow + colors.bright);
|
|
63
|
+
console.warn(coloredMessage, ...args);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Log an info message
|
|
67
|
+
*/
|
|
68
|
+
static info(message, ...args) {
|
|
69
|
+
if (Logger.silent)
|
|
70
|
+
return;
|
|
71
|
+
const coloredMessage = Logger.colorize(`ℹ️ ${message}`, colors.blue);
|
|
72
|
+
console.log(coloredMessage, ...args);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Log a success message
|
|
76
|
+
*/
|
|
77
|
+
static success(message, ...args) {
|
|
78
|
+
if (Logger.silent)
|
|
79
|
+
return;
|
|
80
|
+
const coloredMessage = Logger.colorize(`✅ ${message}`, colors.green + colors.bright);
|
|
81
|
+
console.log(coloredMessage, ...args);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Log a debug message (only shown in verbose mode)
|
|
85
|
+
*/
|
|
86
|
+
static debug(message, ...args) {
|
|
87
|
+
if (Logger.silent || !Logger.verbose)
|
|
88
|
+
return;
|
|
89
|
+
const coloredMessage = Logger.colorize(`🔍 ${message}`, colors.gray);
|
|
90
|
+
console.log(coloredMessage, ...args);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Log a plain message without prefix (for structured output)
|
|
94
|
+
*/
|
|
95
|
+
static log(message, ...args) {
|
|
96
|
+
if (Logger.silent)
|
|
97
|
+
return;
|
|
98
|
+
console.log(message, ...args);
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Log a message with custom emoji/prefix and optional color
|
|
102
|
+
*/
|
|
103
|
+
static custom(prefix, message, color, ...args) {
|
|
104
|
+
if (Logger.silent)
|
|
105
|
+
return;
|
|
106
|
+
const coloredPrefix = color ? Logger.colorize(prefix, color) : prefix;
|
|
107
|
+
const output = `${coloredPrefix} ${message}`;
|
|
108
|
+
console.log(output, ...args);
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Log a section header
|
|
112
|
+
*/
|
|
113
|
+
static section(title) {
|
|
114
|
+
if (Logger.silent)
|
|
115
|
+
return;
|
|
116
|
+
const separator = Logger.colorize('─'.repeat(50), colors.cyan);
|
|
117
|
+
const coloredTitle = Logger.colorize(title, colors.cyan + colors.bright);
|
|
118
|
+
console.log(`\n${separator}`);
|
|
119
|
+
console.log(` ${coloredTitle}`);
|
|
120
|
+
console.log(`${separator}\n`);
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Log a newline
|
|
124
|
+
*/
|
|
125
|
+
static newline() {
|
|
126
|
+
if (Logger.silent)
|
|
127
|
+
return;
|
|
128
|
+
console.log('');
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Format error for display
|
|
132
|
+
*/
|
|
133
|
+
static formatError(error) {
|
|
134
|
+
if (error instanceof Error) {
|
|
135
|
+
return error.message;
|
|
136
|
+
}
|
|
137
|
+
return String(error);
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Check if verbose mode is enabled
|
|
141
|
+
*/
|
|
142
|
+
static isVerbose() {
|
|
143
|
+
return Logger.verbose;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Colorize text (public method for advanced usage)
|
|
147
|
+
*/
|
|
148
|
+
static colorizeText(text, color) {
|
|
149
|
+
return Logger.colorize(text, color);
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Get color codes (for advanced usage)
|
|
153
|
+
*/
|
|
154
|
+
static getColors() {
|
|
155
|
+
return colors;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
exports.Logger = Logger;
|
|
159
|
+
Logger.verbose = false;
|
|
160
|
+
Logger.silent = false;
|
|
161
|
+
Logger.colorsEnabled = true;
|
|
162
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,gDAAgD;AAChD,MAAM,MAAM,GAAG;IACX,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,SAAS;IACjB,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,UAAU;IACf,KAAK,EAAE,UAAU;IACjB,MAAM,EAAE,UAAU;IAClB,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,UAAU;IACnB,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,U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zB,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,SAAS;QACZ,OAAO,MAAM,CAAC,OAAO,CAAC;IAC1B,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,IAAY,EAAE,KAAa;QAC3C,OAAO,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACxC,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,SAAS;QACZ,OAAO,MAAM,CAAC;IAClB,CAAC;;AAtIL,wBAuIC;AAtIkB,cAAO,GAAY,KAAK,CAAC;AACzB,aAAM,GAAY,KAAK,CAAC;AACxB,oBAAa,GAAY,IAAI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moduleResolver.d.ts","sourceRoot":"","sources":["../../src/utils/moduleResolver.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"moduleResolver.d.ts","sourceRoot":"","sources":["../../src/utils/moduleResolver.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,qBAAa,cAAc;IACzB,OAAO,CAAC,YAAY,CAA2B;IAC/C,OAAO,CAAC,eAAe,CAAS;gBAEpB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,eAAe,EAAE,MAAM;IAK3E;;;;OAIG;IACI,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAcxD;;;;OAIG;IACI,oBAAoB,CAAC,OAAO,EAAE,SAAS,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC;IAgB3E;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAgBtB;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAKzB;;;;OAIG;WACW,oBAAoB,CAAC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,QAAQ,EAAE;CAkCvF"}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ModuleResolver = void 0;
|
|
4
4
|
const minimatch_1 = require("minimatch");
|
|
5
5
|
const path_1 = require("path");
|
|
6
|
-
const
|
|
6
|
+
const errorFactory_1 = require("../errors/errorFactory");
|
|
7
7
|
class ModuleResolver {
|
|
8
8
|
constructor(moduleConfig, sourceDirectory) {
|
|
9
9
|
this.moduleConfig = moduleConfig;
|
|
@@ -80,22 +80,22 @@ class ModuleResolver {
|
|
|
80
80
|
for (const [moduleName, patterns] of Object.entries(moduleConfig)) {
|
|
81
81
|
// Validate module name
|
|
82
82
|
if (!moduleName || typeof moduleName !== 'string') {
|
|
83
|
-
errors.push(
|
|
83
|
+
errors.push(errorFactory_1.ErrorFactory.moduleConfigInvalid(moduleName, 'Invalid module name'));
|
|
84
84
|
continue;
|
|
85
85
|
}
|
|
86
86
|
// Validate patterns
|
|
87
87
|
if (!Array.isArray(patterns)) {
|
|
88
|
-
errors.push(
|
|
88
|
+
errors.push(errorFactory_1.ErrorFactory.moduleConfigInvalid(moduleName, 'patterns must be an array'));
|
|
89
89
|
continue;
|
|
90
90
|
}
|
|
91
91
|
for (const pattern of patterns) {
|
|
92
92
|
if (typeof pattern !== 'string') {
|
|
93
|
-
errors.push(
|
|
93
|
+
errors.push(errorFactory_1.ErrorFactory.moduleConfigInvalid(moduleName, `contains invalid pattern: ${pattern}`));
|
|
94
94
|
continue;
|
|
95
95
|
}
|
|
96
96
|
// Check for duplicate patterns
|
|
97
97
|
if (allPatterns.has(pattern)) {
|
|
98
|
-
errors.push(
|
|
98
|
+
errors.push(errorFactory_1.ErrorFactory.modulePatternInvalid(pattern, moduleName));
|
|
99
99
|
}
|
|
100
100
|
else {
|
|
101
101
|
allPatterns.add(pattern);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moduleResolver.js","sourceRoot":"","sources":["../../src/utils/moduleResolver.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,+BAA2C;AAE3C,
|
|
1
|
+
{"version":3,"file":"moduleResolver.js","sourceRoot":"","sources":["../../src/utils/moduleResolver.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,+BAA2C;AAE3C,yDAAsD;AAGtD,MAAa,cAAc;IAIzB,YAAY,YAAsC,EAAE,eAAuB;QACzE,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,eAAe,GAAG,IAAA,gBAAS,EAAC,eAAe,CAAC,CAAC;IACpD,CAAC;IAED;;;;OAIG;IACI,gBAAgB,CAAC,QAAgB;QACtC,MAAM,YAAY,GAAG,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;QAEtD,KAAK,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC;YACvE,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;gBAC/B,IAAI,IAAI,CAAC,cAAc,CAAC,YAAY,EAAE,OAAO,CAAC,EAAE,CAAC;oBAC/C,OAAO,UAAU,CAAC;gBACpB,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC,CAAC,iCAAiC;IAChD,CAAC;IAED;;;;OAIG;IACI,oBAAoB,CAAC,OAAoB;QAC9C,MAAM,YAAY,GAAG,IAAI,GAAG,EAAuB,CAAC;QAEpD,KAAK,MAAM,SAAS,IAAI,OAAO,EAAE,CAAC;YAChC,MAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,YAAY,CAAC;YAE7E,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;gBAClC,YAAY,CAAC,GAAG,CA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AQ,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;YAClE,uBAAuB;YACvB,IAAI,CAAC,UAAU,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;gBAClD,MAAM,CAAC,IAAI,CAAC,2BAAY,CAAC,mBAAmB,CAAC,UAAU,EAAE,qBAAqB,CAAC,CAAC,CAAC;gBACjF,SAAS;YACX,CAAC;YAED,oBAAoB;YACpB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAC7B,MAAM,CAAC,IAAI,CAAC,2BAAY,CAAC,mBAAmB,CAAC,UAAU,EAAE,2BAA2B,CAAC,CAAC,CAAC;gBACvF,SAAS;YACX,CAAC;YAED,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;gBAC/B,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;oBAChC,MAAM,CAAC,IAAI,CAAC,2BAAY,CAAC,mBAAmB,CAAC,UAAU,EAAE,6BAA6B,OAAO,EAAE,CAAC,CAAC,CAAC;oBAClG,SAAS;gBACX,CAAC;gBAED,+BAA+B;gBAC/B,IAAI,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;oBAC7B,MAAM,CAAC,IAAI,CAAC,2BAAY,CAAC,oBAAoB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;gBACtE,CAAC;qBAAM,CAAC;oBACN,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;gBAC3B,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAxHD,wCAwHC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@notjustcoders/ioc-arise",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.12",
|
|
4
4
|
"description": "Arise type-safe IoC containers from your code. Zero overhead, zero coupling.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -45,7 +45,8 @@
|
|
|
45
45
|
"@notjustcoders/one-logger-client-sdk": "^1.0.10",
|
|
46
46
|
"commander": "^11.1.0",
|
|
47
47
|
"glob": "^10.3.10",
|
|
48
|
-
"minimatch": "^10.0.1"
|
|
48
|
+
"minimatch": "^10.0.1",
|
|
49
|
+
"@notjustcoders/di-container": "1.0.2"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
51
52
|
"@types/minimatch": "^5.1.2",
|