assemblerjs 1.1.25 → 1.1.26
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 +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index11.js +2 -2
- package/dist/index11.mjs +2 -2
- package/dist/index13.js +1 -1
- package/dist/index13.mjs +1 -1
- package/dist/index14.js +85 -61
- package/dist/index14.mjs +85 -61
- package/dist/index17.js +1 -1
- package/dist/index17.mjs +1 -1
- package/dist/index18.js +1 -1
- package/dist/index18.mjs +1 -1
- package/dist/index19.js +1 -1
- package/dist/index19.mjs +1 -1
- package/dist/index2.js +2 -2
- package/dist/index2.mjs +2 -2
- package/dist/index20.js +1 -1
- package/dist/index20.mjs +1 -1
- package/dist/index21.js +1 -1
- package/dist/index21.mjs +1 -1
- package/dist/index22.js +1 -1
- package/dist/index22.mjs +1 -1
- package/dist/index23.js +3 -3
- package/dist/index23.mjs +3 -3
- package/dist/index24.js +3 -3
- package/dist/index24.mjs +3 -3
- package/dist/index25.js +2 -2
- package/dist/index25.mjs +2 -2
- package/dist/index26.js +1 -1
- package/dist/index26.mjs +1 -1
- package/dist/index27.js +1 -1
- package/dist/index27.mjs +1 -1
- package/dist/index3.js +1 -1
- package/dist/index3.mjs +1 -1
- package/dist/index30.js +15 -38
- package/dist/index30.mjs +12 -37
- package/dist/index31.js +100 -151
- package/dist/index31.mjs +98 -150
- package/dist/index32.js +143 -35
- package/dist/index32.mjs +142 -35
- package/dist/index33.js +41 -70
- package/dist/index33.mjs +41 -70
- package/dist/index34.js +73 -49
- package/dist/index34.mjs +73 -49
- package/dist/index35.js +53 -29
- package/dist/index35.mjs +53 -29
- package/dist/index36.js +26 -170
- package/dist/index36.mjs +26 -170
- package/dist/index37.js +160 -48
- package/dist/index37.mjs +160 -48
- package/dist/index38.js +61 -15
- package/dist/index38.mjs +61 -12
- package/dist/index39.js +38 -20
- package/dist/index39.mjs +37 -20
- package/dist/index4.js +7 -7
- package/dist/index4.mjs +7 -7
- package/dist/index40.js +18 -103
- package/dist/index40.mjs +18 -101
- package/dist/index42.js +49 -29
- package/dist/index42.mjs +49 -28
- package/dist/index44.js +29 -49
- package/dist/index44.mjs +28 -49
- package/dist/index45.js +5 -5
- package/dist/index45.mjs +5 -5
- package/dist/index49.js +1 -1
- package/dist/index49.mjs +1 -1
- package/dist/index50.js +1 -1
- package/dist/index50.mjs +1 -1
- package/dist/index51.js +1 -1
- package/dist/index51.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,6 +25,7 @@ A modern, type-safe, and lightweight [Dependency Injection](https://en.wikipedia
|
|
|
25
25
|
- ♻️ **Lifecycle Hooks** - `onRegister`, `onInit`, `onDispose`
|
|
26
26
|
- 📡 **Built-in Event System** - Integrated EventManager
|
|
27
27
|
- 🔀 **AOP/Transversals** - Cross-cutting concerns (logging, security, caching, performance)
|
|
28
|
+
- 🎯 **Caller Tracking** - Audit logging, authorization, and request tracing with full caller context
|
|
28
29
|
- 🎨 **Custom Decorators** - Easy creation with `ParameterDecoratorFactory` and `createConstructorDecorator`
|
|
29
30
|
- 🔧 **Flexible Configuration** - Runtime configuration override
|
|
30
31
|
- 🏷️ **Tags Support** - Group and retrieve dependencies by tags
|
package/dist/index.d.ts
CHANGED
|
@@ -1423,6 +1423,30 @@ export declare class TransversalWeaver {
|
|
|
1423
1423
|
* ```
|
|
1424
1424
|
*/
|
|
1425
1425
|
static withCaller<T>(caller: string, identifier?: string | symbol | (() => T | Promise<T>), fn?: () => T | Promise<T>): T | Promise<T>;
|
|
1426
|
+
/**
|
|
1427
|
+
* Wrap a function with caller context.
|
|
1428
|
+
* Returns a new function that will execute with the specified caller context.
|
|
1429
|
+
* Useful for creating wrapped functions that can be called multiple times.
|
|
1430
|
+
*
|
|
1431
|
+
* @param caller The name of the calling component/class
|
|
1432
|
+
* @param identifier Optional identifier (class reference, symbol, etc)
|
|
1433
|
+
* @param fn The function to wrap
|
|
1434
|
+
* @returns A wrapped function that maintains caller context on each call
|
|
1435
|
+
*
|
|
1436
|
+
* @example
|
|
1437
|
+
* ```typescript
|
|
1438
|
+
* // In Vue component
|
|
1439
|
+
* const mergeClasses = TransversalWeaver.wrapCaller(
|
|
1440
|
+
* 'LeafletMap',
|
|
1441
|
+
* 'LeafletMap.vue',
|
|
1442
|
+
* (...args: any[]) => tailwind.mergeClasses(...args)
|
|
1443
|
+
* );
|
|
1444
|
+
*
|
|
1445
|
+
* // Now each call maintains the caller context
|
|
1446
|
+
* mergeClasses('class1', 'class2'); // Advices see caller: LeafletMap
|
|
1447
|
+
* ```
|
|
1448
|
+
*/
|
|
1449
|
+
static wrapCaller<T extends (...args: any[]) => any>(caller: string, identifier?: string | symbol | T, fn?: T): T;
|
|
1426
1450
|
/**
|
|
1427
1451
|
* Get the current caller metadata from the context stack.
|
|
1428
1452
|
* Returns undefined if no caller context is active.
|
package/dist/index11.js
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const constants = require('./index29.js');
|
|
6
|
-
const reflection = require('./
|
|
6
|
+
const reflection = require('./index30.js');
|
|
7
7
|
const decorator = require('./index2.js');
|
|
8
|
-
const schema = require('./
|
|
8
|
+
const schema = require('./index31.js');
|
|
9
9
|
|
|
10
10
|
function isTransversal(e) {
|
|
11
11
|
try {
|
package/dist/index11.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReflectValue } from './index29.mjs';
|
|
2
|
-
import { getCustomMetadata, defineCustomMetadata } from './
|
|
2
|
+
import { getCustomMetadata, defineCustomMetadata } from './index30.mjs';
|
|
3
3
|
import { Assemblage } from './index2.mjs';
|
|
4
|
-
import { getDefinition } from './
|
|
4
|
+
import { getDefinition } from './index31.mjs';
|
|
5
5
|
|
|
6
6
|
function isTransversal(e) {
|
|
7
7
|
try {
|
package/dist/index13.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
5
5
|
const core = require('@assemblerjs/core');
|
|
6
6
|
const pointcutMatcher = require('./index41.js');
|
|
7
7
|
const affect = require('./index12.js');
|
|
8
|
-
const schema = require('./
|
|
8
|
+
const schema = require('./index31.js');
|
|
9
9
|
|
|
10
10
|
class TransversalManager {
|
|
11
11
|
static getInstance(e) {
|
package/dist/index13.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isClass } from '@assemblerjs/core';
|
|
2
2
|
import { PointcutMatcher } from './index41.mjs';
|
|
3
3
|
import { getAffectedMethods } from './index12.mjs';
|
|
4
|
-
import { getDefinition } from './
|
|
4
|
+
import { getDefinition } from './index31.mjs';
|
|
5
5
|
|
|
6
6
|
class TransversalManager {
|
|
7
7
|
static getInstance(e) {
|
package/dist/index14.js
CHANGED
|
@@ -6,23 +6,23 @@ const transversalManager = require('./index13.js');
|
|
|
6
6
|
const affect = require('./index12.js');
|
|
7
7
|
|
|
8
8
|
class TransversalWeaver {
|
|
9
|
-
static registerCaller(
|
|
10
|
-
this.callerRegistry.set(
|
|
11
|
-
className:
|
|
9
|
+
static registerCaller(t, e, r) {
|
|
10
|
+
this.callerRegistry.set(t, {
|
|
11
|
+
className: e,
|
|
12
12
|
identifier: r
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
|
-
static getCallerMetadata(
|
|
16
|
-
return this.callerRegistry.get(
|
|
15
|
+
static getCallerMetadata(t) {
|
|
16
|
+
return this.callerRegistry.get(t);
|
|
17
17
|
}
|
|
18
|
-
static withCaller(
|
|
19
|
-
if (typeof
|
|
20
|
-
r =
|
|
21
|
-
|
|
18
|
+
static withCaller(t, e, r) {
|
|
19
|
+
if (typeof e === 'function') {
|
|
20
|
+
r = e;
|
|
21
|
+
e = undefined;
|
|
22
22
|
}
|
|
23
23
|
const n = {
|
|
24
|
-
className:
|
|
25
|
-
identifier:
|
|
24
|
+
className: t,
|
|
25
|
+
identifier: e
|
|
26
26
|
};
|
|
27
27
|
this.callerStack.push(n);
|
|
28
28
|
const a = r();
|
|
@@ -32,44 +32,68 @@ class TransversalWeaver {
|
|
|
32
32
|
this.callerStack.pop();
|
|
33
33
|
return a;
|
|
34
34
|
}
|
|
35
|
+
static wrapCaller(t, e, r) {
|
|
36
|
+
if (typeof e === 'function') {
|
|
37
|
+
r = e;
|
|
38
|
+
e = undefined;
|
|
39
|
+
}
|
|
40
|
+
const n = {
|
|
41
|
+
className: t,
|
|
42
|
+
identifier: e
|
|
43
|
+
};
|
|
44
|
+
return (...t)=>{
|
|
45
|
+
this.callerStack.push(n);
|
|
46
|
+
try {
|
|
47
|
+
const e = r(...t);
|
|
48
|
+
if (e instanceof Promise) {
|
|
49
|
+
return e.finally(()=>this.callerStack.pop());
|
|
50
|
+
}
|
|
51
|
+
this.callerStack.pop();
|
|
52
|
+
return e;
|
|
53
|
+
} catch (t) {
|
|
54
|
+
this.callerStack.pop();
|
|
55
|
+
throw t;
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
}
|
|
35
59
|
static getCurrentCaller() {
|
|
36
60
|
return this.callerStack[this.callerStack.length - 1];
|
|
37
61
|
}
|
|
38
62
|
static weave(r, n, a) {
|
|
39
63
|
const s = transversalManager.TransversalManager.getInstance(a);
|
|
40
64
|
const c = s.getAspectsForTarget(n);
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
44
|
-
const r = Object.getOwnPropertyDescriptor(
|
|
65
|
+
const l = Object.getPrototypeOf(r);
|
|
66
|
+
const o = Object.getOwnPropertyNames(l).some((t)=>{
|
|
67
|
+
if (t === 'constructor') return false;
|
|
68
|
+
const r = Object.getOwnPropertyDescriptor(l, t);
|
|
45
69
|
if (!r) return false;
|
|
46
70
|
const n = r.value && typeof r.value === 'function';
|
|
47
71
|
const a = r.get && typeof r.get === 'function';
|
|
48
72
|
if (!n && !a) return false;
|
|
49
|
-
const s = affect.getAffectedMethods(
|
|
73
|
+
const s = affect.getAffectedMethods(l, t);
|
|
50
74
|
return s.length > 0;
|
|
51
75
|
});
|
|
52
|
-
if (c.length === 0 && !
|
|
76
|
+
if (c.length === 0 && !o) {
|
|
53
77
|
return r;
|
|
54
78
|
}
|
|
55
79
|
const i = new Proxy(r, {
|
|
56
|
-
get (
|
|
57
|
-
const n = Reflect.get(
|
|
80
|
+
get (t, e, r) {
|
|
81
|
+
const n = Reflect.get(t, e, r);
|
|
58
82
|
if (typeof n !== 'function') {
|
|
59
83
|
return n;
|
|
60
84
|
}
|
|
61
85
|
return function(...r) {
|
|
62
|
-
const a = String(
|
|
63
|
-
const
|
|
64
|
-
const
|
|
65
|
-
target:
|
|
86
|
+
const a = String(e);
|
|
87
|
+
const l = TransversalWeaver.getCurrentCaller() ?? TransversalWeaver.callerRegistry.get(this);
|
|
88
|
+
const o = {
|
|
89
|
+
target: t,
|
|
66
90
|
methodName: a,
|
|
67
91
|
args: r,
|
|
68
|
-
caller:
|
|
69
|
-
callerIdentifier:
|
|
92
|
+
caller: l?.className,
|
|
93
|
+
callerIdentifier: l?.identifier
|
|
70
94
|
};
|
|
71
|
-
const i = s.getAdvicesForJoinPoint(
|
|
72
|
-
return TransversalWeaver.executeAdviceChain(i, n,
|
|
95
|
+
const i = s.getAdvicesForJoinPoint(o, c, t, e);
|
|
96
|
+
return TransversalWeaver.executeAdviceChain(i, n, t, r, o);
|
|
73
97
|
};
|
|
74
98
|
}
|
|
75
99
|
});
|
|
@@ -79,66 +103,66 @@ class TransversalWeaver {
|
|
|
79
103
|
});
|
|
80
104
|
return i;
|
|
81
105
|
}
|
|
82
|
-
static executeAdviceChain(
|
|
83
|
-
const s =
|
|
84
|
-
const c =
|
|
85
|
-
const
|
|
106
|
+
static executeAdviceChain(t, e, r, n, a) {
|
|
107
|
+
const s = t.filter((t)=>t.type === 'before');
|
|
108
|
+
const c = t.filter((t)=>t.type === 'around');
|
|
109
|
+
const l = t.filter((t)=>t.type === 'after');
|
|
86
110
|
try {
|
|
87
|
-
for (const
|
|
88
|
-
const
|
|
111
|
+
for (const t of s){
|
|
112
|
+
const e = {
|
|
89
113
|
...a,
|
|
90
|
-
config:
|
|
114
|
+
config: t.config
|
|
91
115
|
};
|
|
92
|
-
|
|
116
|
+
t.method.call(t.transversalInstance, e);
|
|
93
117
|
}
|
|
94
|
-
let
|
|
118
|
+
let t;
|
|
95
119
|
if (c.length > 0) {
|
|
96
|
-
|
|
120
|
+
t = this.buildAroundChain(c, e, r, n, a);
|
|
97
121
|
} else {
|
|
98
|
-
|
|
122
|
+
t = e.apply(r, n);
|
|
99
123
|
}
|
|
100
|
-
if (
|
|
101
|
-
return
|
|
102
|
-
for (const
|
|
124
|
+
if (t instanceof Promise) {
|
|
125
|
+
return t.then((t)=>{
|
|
126
|
+
for (const e of l){
|
|
103
127
|
const r = {
|
|
104
128
|
...a,
|
|
105
|
-
result:
|
|
129
|
+
result: t
|
|
106
130
|
};
|
|
107
|
-
|
|
131
|
+
e.method.call(e.transversalInstance, r);
|
|
108
132
|
}
|
|
109
|
-
return
|
|
110
|
-
}).catch((
|
|
111
|
-
a.error =
|
|
112
|
-
throw
|
|
133
|
+
return t;
|
|
134
|
+
}).catch((t)=>{
|
|
135
|
+
a.error = t;
|
|
136
|
+
throw t;
|
|
113
137
|
});
|
|
114
138
|
}
|
|
115
|
-
for (const
|
|
139
|
+
for (const e of l){
|
|
116
140
|
const r = {
|
|
117
141
|
...a,
|
|
118
|
-
result:
|
|
119
|
-
config:
|
|
142
|
+
result: t,
|
|
143
|
+
config: e.config
|
|
120
144
|
};
|
|
121
|
-
|
|
145
|
+
e.method.call(e.transversalInstance, r);
|
|
122
146
|
}
|
|
123
|
-
return
|
|
124
|
-
} catch (
|
|
125
|
-
a.error =
|
|
126
|
-
throw
|
|
147
|
+
return t;
|
|
148
|
+
} catch (t) {
|
|
149
|
+
a.error = t;
|
|
150
|
+
throw t;
|
|
127
151
|
}
|
|
128
152
|
}
|
|
129
|
-
static buildAroundChain(
|
|
153
|
+
static buildAroundChain(t, e, r, n, a) {
|
|
130
154
|
let s = 0;
|
|
131
155
|
const c = ()=>{
|
|
132
|
-
if (s <
|
|
133
|
-
const
|
|
156
|
+
if (s < t.length) {
|
|
157
|
+
const e = t[s++];
|
|
134
158
|
const r = {
|
|
135
159
|
...a,
|
|
136
160
|
proceed: c,
|
|
137
|
-
config:
|
|
161
|
+
config: e.config
|
|
138
162
|
};
|
|
139
|
-
return
|
|
163
|
+
return e.method.call(e.transversalInstance, r);
|
|
140
164
|
} else {
|
|
141
|
-
return
|
|
165
|
+
return e.apply(r, n);
|
|
142
166
|
}
|
|
143
167
|
};
|
|
144
168
|
return c();
|
package/dist/index14.mjs
CHANGED
|
@@ -2,23 +2,23 @@ import { TransversalManager } from './index13.mjs';
|
|
|
2
2
|
import { getAffectedMethods } from './index12.mjs';
|
|
3
3
|
|
|
4
4
|
class TransversalWeaver {
|
|
5
|
-
static registerCaller(
|
|
6
|
-
this.callerRegistry.set(
|
|
7
|
-
className:
|
|
5
|
+
static registerCaller(t, e, r) {
|
|
6
|
+
this.callerRegistry.set(t, {
|
|
7
|
+
className: e,
|
|
8
8
|
identifier: r
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
|
-
static getCallerMetadata(
|
|
12
|
-
return this.callerRegistry.get(
|
|
11
|
+
static getCallerMetadata(t) {
|
|
12
|
+
return this.callerRegistry.get(t);
|
|
13
13
|
}
|
|
14
|
-
static withCaller(
|
|
15
|
-
if (typeof
|
|
16
|
-
r =
|
|
17
|
-
|
|
14
|
+
static withCaller(t, e, r) {
|
|
15
|
+
if (typeof e === 'function') {
|
|
16
|
+
r = e;
|
|
17
|
+
e = undefined;
|
|
18
18
|
}
|
|
19
19
|
const n = {
|
|
20
|
-
className:
|
|
21
|
-
identifier:
|
|
20
|
+
className: t,
|
|
21
|
+
identifier: e
|
|
22
22
|
};
|
|
23
23
|
this.callerStack.push(n);
|
|
24
24
|
const a = r();
|
|
@@ -28,44 +28,68 @@ class TransversalWeaver {
|
|
|
28
28
|
this.callerStack.pop();
|
|
29
29
|
return a;
|
|
30
30
|
}
|
|
31
|
+
static wrapCaller(t, e, r) {
|
|
32
|
+
if (typeof e === 'function') {
|
|
33
|
+
r = e;
|
|
34
|
+
e = undefined;
|
|
35
|
+
}
|
|
36
|
+
const n = {
|
|
37
|
+
className: t,
|
|
38
|
+
identifier: e
|
|
39
|
+
};
|
|
40
|
+
return (...t)=>{
|
|
41
|
+
this.callerStack.push(n);
|
|
42
|
+
try {
|
|
43
|
+
const e = r(...t);
|
|
44
|
+
if (e instanceof Promise) {
|
|
45
|
+
return e.finally(()=>this.callerStack.pop());
|
|
46
|
+
}
|
|
47
|
+
this.callerStack.pop();
|
|
48
|
+
return e;
|
|
49
|
+
} catch (t) {
|
|
50
|
+
this.callerStack.pop();
|
|
51
|
+
throw t;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}
|
|
31
55
|
static getCurrentCaller() {
|
|
32
56
|
return this.callerStack[this.callerStack.length - 1];
|
|
33
57
|
}
|
|
34
58
|
static weave(r, n, a) {
|
|
35
59
|
const s = TransversalManager.getInstance(a);
|
|
36
60
|
const c = s.getAspectsForTarget(n);
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
if (
|
|
40
|
-
const r = Object.getOwnPropertyDescriptor(
|
|
61
|
+
const l = Object.getPrototypeOf(r);
|
|
62
|
+
const o = Object.getOwnPropertyNames(l).some((t)=>{
|
|
63
|
+
if (t === 'constructor') return false;
|
|
64
|
+
const r = Object.getOwnPropertyDescriptor(l, t);
|
|
41
65
|
if (!r) return false;
|
|
42
66
|
const n = r.value && typeof r.value === 'function';
|
|
43
67
|
const a = r.get && typeof r.get === 'function';
|
|
44
68
|
if (!n && !a) return false;
|
|
45
|
-
const s = getAffectedMethods(
|
|
69
|
+
const s = getAffectedMethods(l, t);
|
|
46
70
|
return s.length > 0;
|
|
47
71
|
});
|
|
48
|
-
if (c.length === 0 && !
|
|
72
|
+
if (c.length === 0 && !o) {
|
|
49
73
|
return r;
|
|
50
74
|
}
|
|
51
75
|
const i = new Proxy(r, {
|
|
52
|
-
get (
|
|
53
|
-
const n = Reflect.get(
|
|
76
|
+
get (t, e, r) {
|
|
77
|
+
const n = Reflect.get(t, e, r);
|
|
54
78
|
if (typeof n !== 'function') {
|
|
55
79
|
return n;
|
|
56
80
|
}
|
|
57
81
|
return function(...r) {
|
|
58
|
-
const a = String(
|
|
59
|
-
const
|
|
60
|
-
const
|
|
61
|
-
target:
|
|
82
|
+
const a = String(e);
|
|
83
|
+
const l = TransversalWeaver.getCurrentCaller() ?? TransversalWeaver.callerRegistry.get(this);
|
|
84
|
+
const o = {
|
|
85
|
+
target: t,
|
|
62
86
|
methodName: a,
|
|
63
87
|
args: r,
|
|
64
|
-
caller:
|
|
65
|
-
callerIdentifier:
|
|
88
|
+
caller: l?.className,
|
|
89
|
+
callerIdentifier: l?.identifier
|
|
66
90
|
};
|
|
67
|
-
const i = s.getAdvicesForJoinPoint(
|
|
68
|
-
return TransversalWeaver.executeAdviceChain(i, n,
|
|
91
|
+
const i = s.getAdvicesForJoinPoint(o, c, t, e);
|
|
92
|
+
return TransversalWeaver.executeAdviceChain(i, n, t, r, o);
|
|
69
93
|
};
|
|
70
94
|
}
|
|
71
95
|
});
|
|
@@ -75,66 +99,66 @@ class TransversalWeaver {
|
|
|
75
99
|
});
|
|
76
100
|
return i;
|
|
77
101
|
}
|
|
78
|
-
static executeAdviceChain(
|
|
79
|
-
const s =
|
|
80
|
-
const c =
|
|
81
|
-
const
|
|
102
|
+
static executeAdviceChain(t, e, r, n, a) {
|
|
103
|
+
const s = t.filter((t)=>t.type === 'before');
|
|
104
|
+
const c = t.filter((t)=>t.type === 'around');
|
|
105
|
+
const l = t.filter((t)=>t.type === 'after');
|
|
82
106
|
try {
|
|
83
|
-
for (const
|
|
84
|
-
const
|
|
107
|
+
for (const t of s){
|
|
108
|
+
const e = {
|
|
85
109
|
...a,
|
|
86
|
-
config:
|
|
110
|
+
config: t.config
|
|
87
111
|
};
|
|
88
|
-
|
|
112
|
+
t.method.call(t.transversalInstance, e);
|
|
89
113
|
}
|
|
90
|
-
let
|
|
114
|
+
let t;
|
|
91
115
|
if (c.length > 0) {
|
|
92
|
-
|
|
116
|
+
t = this.buildAroundChain(c, e, r, n, a);
|
|
93
117
|
} else {
|
|
94
|
-
|
|
118
|
+
t = e.apply(r, n);
|
|
95
119
|
}
|
|
96
|
-
if (
|
|
97
|
-
return
|
|
98
|
-
for (const
|
|
120
|
+
if (t instanceof Promise) {
|
|
121
|
+
return t.then((t)=>{
|
|
122
|
+
for (const e of l){
|
|
99
123
|
const r = {
|
|
100
124
|
...a,
|
|
101
|
-
result:
|
|
125
|
+
result: t
|
|
102
126
|
};
|
|
103
|
-
|
|
127
|
+
e.method.call(e.transversalInstance, r);
|
|
104
128
|
}
|
|
105
|
-
return
|
|
106
|
-
}).catch((
|
|
107
|
-
a.error =
|
|
108
|
-
throw
|
|
129
|
+
return t;
|
|
130
|
+
}).catch((t)=>{
|
|
131
|
+
a.error = t;
|
|
132
|
+
throw t;
|
|
109
133
|
});
|
|
110
134
|
}
|
|
111
|
-
for (const
|
|
135
|
+
for (const e of l){
|
|
112
136
|
const r = {
|
|
113
137
|
...a,
|
|
114
|
-
result:
|
|
115
|
-
config:
|
|
138
|
+
result: t,
|
|
139
|
+
config: e.config
|
|
116
140
|
};
|
|
117
|
-
|
|
141
|
+
e.method.call(e.transversalInstance, r);
|
|
118
142
|
}
|
|
119
|
-
return
|
|
120
|
-
} catch (
|
|
121
|
-
a.error =
|
|
122
|
-
throw
|
|
143
|
+
return t;
|
|
144
|
+
} catch (t) {
|
|
145
|
+
a.error = t;
|
|
146
|
+
throw t;
|
|
123
147
|
}
|
|
124
148
|
}
|
|
125
|
-
static buildAroundChain(
|
|
149
|
+
static buildAroundChain(t, e, r, n, a) {
|
|
126
150
|
let s = 0;
|
|
127
151
|
const c = ()=>{
|
|
128
|
-
if (s <
|
|
129
|
-
const
|
|
152
|
+
if (s < t.length) {
|
|
153
|
+
const e = t[s++];
|
|
130
154
|
const r = {
|
|
131
155
|
...a,
|
|
132
156
|
proceed: c,
|
|
133
|
-
config:
|
|
157
|
+
config: e.config
|
|
134
158
|
};
|
|
135
|
-
return
|
|
159
|
+
return e.method.call(e.transversalInstance, r);
|
|
136
160
|
} else {
|
|
137
|
-
return
|
|
161
|
+
return e.apply(r, n);
|
|
138
162
|
}
|
|
139
163
|
};
|
|
140
164
|
return c();
|
package/dist/index17.js
CHANGED
package/dist/index17.mjs
CHANGED
package/dist/index18.js
CHANGED
package/dist/index18.mjs
CHANGED
package/dist/index19.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const parameterDecoratorFactory = require('./index18.js');
|
|
6
|
-
const resolverStore = require('./
|
|
6
|
+
const resolverStore = require('./index40.js');
|
|
7
7
|
|
|
8
8
|
let ContextResolver = class ContextResolver {
|
|
9
9
|
resolve(e, r, t) {
|
package/dist/index19.mjs
CHANGED
package/dist/index2.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const constants = require('./index29.js');
|
|
6
|
-
const reflection = require('./
|
|
7
|
-
const schema = require('./
|
|
6
|
+
const reflection = require('./index30.js');
|
|
7
|
+
const schema = require('./index31.js');
|
|
8
8
|
|
|
9
9
|
const Assemblage = (e)=>{
|
|
10
10
|
return (r)=>{
|
package/dist/index2.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReflectFlags, ReflectValue } from './index29.mjs';
|
|
2
|
-
import { defineCustomMetadata } from './
|
|
3
|
-
import { validateDefinition } from './
|
|
2
|
+
import { defineCustomMetadata } from './index30.mjs';
|
|
3
|
+
import { validateDefinition } from './index31.mjs';
|
|
4
4
|
|
|
5
5
|
const Assemblage = (e)=>{
|
|
6
6
|
return (r)=>{
|
package/dist/index20.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const parameterDecoratorFactory = require('./index18.js');
|
|
6
|
-
const resolverStore = require('./
|
|
6
|
+
const resolverStore = require('./index40.js');
|
|
7
7
|
|
|
8
8
|
let ConfigurationResolver = class ConfigurationResolver {
|
|
9
9
|
resolve(r, o, e, n) {
|
package/dist/index20.mjs
CHANGED
package/dist/index21.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const parameterDecoratorFactory = require('./index18.js');
|
|
6
|
-
const resolverStore = require('./
|
|
6
|
+
const resolverStore = require('./index40.js');
|
|
7
7
|
|
|
8
8
|
let DefinitionResolver = class DefinitionResolver {
|
|
9
9
|
resolve(e, r) {
|
package/dist/index21.mjs
CHANGED
package/dist/index22.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const parameterDecoratorFactory = require('./index18.js');
|
|
6
|
-
const resolverStore = require('./
|
|
6
|
+
const resolverStore = require('./index40.js');
|
|
7
7
|
|
|
8
8
|
let DisposeResolver = class DisposeResolver {
|
|
9
9
|
resolve(e, r, s) {
|
package/dist/index22.mjs
CHANGED