assemblerjs 1.1.12 → 1.1.14

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/index31.js CHANGED
@@ -84,18 +84,31 @@ class InjectableManager {
84
84
  }
85
85
  require(e, t, n) {
86
86
  if (!this.injectables.has(e)) {
87
- const t = this.resolvingStack.has(e);
88
- const r = t ? 'Circular dependency detected' : 'Dependency not registered';
89
- const i = a(e);
90
- const s = f(e);
91
- const c = t ? `Circular dependency detected: '${i}' is already being resolved.` : `Dependency '${i}' has not been registered (Class/Service not found in current assemblies).`;
92
- debugLogger.DebugLogger.getInstance().log('error', r, {
93
- identifier: i,
87
+ const r = this.resolvingStack.has(e);
88
+ const i = r ? 'Circular dependency detected' : 'Dependency not registered';
89
+ const s = a(e);
90
+ const c = f(e);
91
+ const u = t?.__paramIndex;
92
+ const l = t?.__paramCount;
93
+ const g = t?.__expectedType;
94
+ const d = r ? `Circular dependency detected: '${s}' is already being resolved.` : `Dependency '${s}' has not been registered (Class/Service not found in current assemblages).`;
95
+ const p = {
96
+ identifier: s,
94
97
  caller: n ? a(n) : 'unknown',
95
- type: s,
96
- error: c
97
- });
98
- throw new Error(c);
98
+ type: c,
99
+ error: d
100
+ };
101
+ if (u !== undefined) {
102
+ p.paramIndex = u;
103
+ }
104
+ if (l !== undefined) {
105
+ p.paramCount = l;
106
+ }
107
+ if (g !== undefined) {
108
+ p.expectedType = a(g);
109
+ }
110
+ debugLogger.DebugLogger.getInstance().log('error', i, p);
111
+ throw new Error(d);
99
112
  }
100
113
  const r = this.injectables.get(e);
101
114
  this.resolvingStack.add(r.identifier);
package/dist/index31.mjs CHANGED
@@ -80,18 +80,31 @@ class InjectableManager {
80
80
  }
81
81
  require(e, t, n) {
82
82
  if (!this.injectables.has(e)) {
83
- const t = this.resolvingStack.has(e);
84
- const r = t ? 'Circular dependency detected' : 'Dependency not registered';
85
- const i = a(e);
86
- const s = f(e);
87
- const c = t ? `Circular dependency detected: '${i}' is already being resolved.` : `Dependency '${i}' has not been registered (Class/Service not found in current assemblies).`;
88
- DebugLogger.getInstance().log('error', r, {
89
- identifier: i,
83
+ const r = this.resolvingStack.has(e);
84
+ const i = r ? 'Circular dependency detected' : 'Dependency not registered';
85
+ const s = a(e);
86
+ const c = f(e);
87
+ const u = t?.__paramIndex;
88
+ const l = t?.__paramCount;
89
+ const g = t?.__expectedType;
90
+ const d = r ? `Circular dependency detected: '${s}' is already being resolved.` : `Dependency '${s}' has not been registered (Class/Service not found in current assemblages).`;
91
+ const p = {
92
+ identifier: s,
90
93
  caller: n ? a(n) : 'unknown',
91
- type: s,
92
- error: c
93
- });
94
- throw new Error(c);
94
+ type: c,
95
+ error: d
96
+ };
97
+ if (u !== undefined) {
98
+ p.paramIndex = u;
99
+ }
100
+ if (l !== undefined) {
101
+ p.paramCount = l;
102
+ }
103
+ if (g !== undefined) {
104
+ p.expectedType = a(g);
105
+ }
106
+ DebugLogger.getInstance().log('error', i, p);
107
+ throw new Error(d);
95
108
  }
96
109
  const r = this.injectables.get(e);
97
110
  this.resolvingStack.add(r.identifier);
package/dist/index36.js CHANGED
@@ -59,25 +59,25 @@ let ActiveDebugLogger = class ActiveDebugLogger {
59
59
  if (e !== undefined) t.duration = `${e.toFixed(2)}ms`;
60
60
  this.log('info', 'Build completed', t);
61
61
  }
62
- logRegistration(o) {
62
+ logRegistration(e) {
63
63
  if (!this.shouldLog('registration')) return;
64
64
  this.log('info', 'Registration', {
65
- identifier: o.identifier?.name || String(o.identifier),
66
- isSingleton: o.isSingleton,
67
- dependencies: o.dependencies.map((o)=>o?.name || String(o)),
68
- tags: o.tags
65
+ identifier: o(e.identifier),
66
+ isSingleton: e.isSingleton,
67
+ dependencies: e.dependencies.map((e)=>o(e)),
68
+ tags: e.tags
69
69
  });
70
70
  }
71
71
  logHook(e, t, n) {
72
72
  if (!this.shouldLog('hooks')) return;
73
- const i = this.options.logTimings ? performance.now() : 0;
73
+ const s = this.options.logTimings ? performance.now() : 0;
74
74
  this.log('info', `Hook: ${e}`, {
75
75
  target: o(t),
76
76
  config: n
77
77
  });
78
78
  if (this.options.logTimings) {
79
79
  return ()=>{
80
- const o = performance.now() - i;
80
+ const o = performance.now() - s;
81
81
  this.log('info', `Hook: ${e} completed`, {
82
82
  duration: `${o.toFixed(2)}ms`
83
83
  });
@@ -115,11 +115,11 @@ let ActiveDebugLogger = class ActiveDebugLogger {
115
115
  this.options.logger(o, e, t);
116
116
  } else {
117
117
  const n = `[Assembler:${o}]`;
118
- const i = this.options.useColors !== false ? this.colorize(o, n) : n;
118
+ const s = this.options.useColors !== false ? this.colorize(o, n) : n;
119
119
  if (t) {
120
- console.log(`${i} ${e}`, t);
120
+ console.log(`${s} ${e}`, t);
121
121
  } else {
122
- console.log(`${i} ${e}`);
122
+ console.log(`${s} ${e}`);
123
123
  }
124
124
  }
125
125
  }
package/dist/index36.mjs CHANGED
@@ -55,25 +55,25 @@ let ActiveDebugLogger = class ActiveDebugLogger {
55
55
  if (e !== undefined) t.duration = `${e.toFixed(2)}ms`;
56
56
  this.log('info', 'Build completed', t);
57
57
  }
58
- logRegistration(o) {
58
+ logRegistration(e) {
59
59
  if (!this.shouldLog('registration')) return;
60
60
  this.log('info', 'Registration', {
61
- identifier: o.identifier?.name || String(o.identifier),
62
- isSingleton: o.isSingleton,
63
- dependencies: o.dependencies.map((o)=>o?.name || String(o)),
64
- tags: o.tags
61
+ identifier: o(e.identifier),
62
+ isSingleton: e.isSingleton,
63
+ dependencies: e.dependencies.map((e)=>o(e)),
64
+ tags: e.tags
65
65
  });
66
66
  }
67
67
  logHook(e, t, n) {
68
68
  if (!this.shouldLog('hooks')) return;
69
- const i = this.options.logTimings ? performance.now() : 0;
69
+ const s = this.options.logTimings ? performance.now() : 0;
70
70
  this.log('info', `Hook: ${e}`, {
71
71
  target: o(t),
72
72
  config: n
73
73
  });
74
74
  if (this.options.logTimings) {
75
75
  return ()=>{
76
- const o = performance.now() - i;
76
+ const o = performance.now() - s;
77
77
  this.log('info', `Hook: ${e} completed`, {
78
78
  duration: `${o.toFixed(2)}ms`
79
79
  });
@@ -111,11 +111,11 @@ let ActiveDebugLogger = class ActiveDebugLogger {
111
111
  this.options.logger(o, e, t);
112
112
  } else {
113
113
  const n = `[Assembler:${o}]`;
114
- const i = this.options.useColors !== false ? this.colorize(o, n) : n;
114
+ const s = this.options.useColors !== false ? this.colorize(o, n) : n;
115
115
  if (t) {
116
- console.log(`${i} ${e}`, t);
116
+ console.log(`${s} ${e}`, t);
117
117
  } else {
118
- console.log(`${i} ${e}`);
118
+ console.log(`${s} ${e}`);
119
119
  }
120
120
  }
121
121
  }
package/dist/index50.js CHANGED
@@ -36,7 +36,11 @@ const resolveInjectableParameters = (o, a)=>{
36
36
  }
37
37
  i.push(r);
38
38
  } else {
39
- i.push(o.privateContext.require(t, undefined, o.identifier));
39
+ i.push(o.privateContext.require(t, {
40
+ __paramIndex: e,
41
+ __paramCount: l.length,
42
+ __expectedType: t
43
+ }, o.identifier));
40
44
  }
41
45
  }
42
46
  }
package/dist/index50.mjs CHANGED
@@ -32,7 +32,11 @@ const resolveInjectableParameters = (o, a)=>{
32
32
  }
33
33
  i.push(r);
34
34
  } else {
35
- i.push(o.privateContext.require(t, undefined, o.identifier));
35
+ i.push(o.privateContext.require(t, {
36
+ __paramIndex: e,
37
+ __paramCount: l.length,
38
+ __expectedType: t
39
+ }, o.identifier));
36
40
  }
37
41
  }
38
42
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "assemblerjs",
3
3
  "description": "A general purpose Dependency Injection library for node and browser.",
4
- "version": "1.1.12",
4
+ "version": "1.1.14",
5
5
  "author": "Benoît LAHOZ <info@benoitlahoz.io>",
6
6
  "bugs": "https://github.com/benoitlahoz/assemblerjs/issues",
7
7
  "homepage": "https://github.com/benoitlahoz/assemblerjs#README",