assemblerjs 1.1.19 → 1.1.21
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/index.d.ts +4 -0
- package/dist/index13.js +1 -1
- package/dist/index13.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/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 +11 -5
- package/dist/index22.mjs +11 -5
- package/dist/index23.js +13 -7
- package/dist/index23.mjs +13 -7
- package/dist/index24.js +1 -1
- package/dist/index24.mjs +1 -1
- package/dist/index31.js +35 -100
- package/dist/index31.mjs +34 -100
- package/dist/index32.js +152 -22
- package/dist/index32.mjs +151 -22
- package/dist/index33.js +35 -143
- package/dist/index33.mjs +35 -142
- package/dist/index34.js +70 -41
- package/dist/index34.mjs +70 -41
- package/dist/index35.js +49 -73
- package/dist/index35.mjs +49 -73
- package/dist/index36.js +29 -53
- package/dist/index36.mjs +29 -53
- package/dist/index37.js +170 -26
- package/dist/index37.mjs +170 -26
- package/dist/index38.js +48 -151
- package/dist/index38.mjs +48 -151
- package/dist/index39.js +16 -57
- package/dist/index39.mjs +16 -57
- package/dist/index4.js +7 -7
- package/dist/index4.mjs +7 -7
- package/dist/index40.js +100 -35
- package/dist/index40.mjs +100 -34
- package/dist/index41.js +24 -18
- package/dist/index41.mjs +24 -18
- package/dist/index45.js +54 -22
- package/dist/index45.mjs +54 -22
- package/dist/index49.js +1 -1
- package/dist/index49.mjs +1 -1
- package/dist/index50.js +2 -2
- package/dist/index50.mjs +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -387,10 +387,14 @@ export declare interface AssemblerDebugOptions {
|
|
|
387
387
|
logger?: (level: 'info' | 'warn' | 'error', message: string, data?: any) => void;
|
|
388
388
|
logPhases?: {
|
|
389
389
|
registration?: boolean;
|
|
390
|
+
registrationUse?: boolean;
|
|
391
|
+
registrationGlobals?: boolean;
|
|
390
392
|
resolution?: boolean;
|
|
391
393
|
construction?: boolean;
|
|
392
394
|
hooks?: boolean;
|
|
393
395
|
cache?: boolean;
|
|
396
|
+
injectionUse?: boolean;
|
|
397
|
+
injectionGlobal?: boolean;
|
|
394
398
|
};
|
|
395
399
|
logTimings?: boolean;
|
|
396
400
|
logDependencyTree?: boolean;
|
package/dist/index13.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const core = require('@assemblerjs/core');
|
|
6
|
-
const pointcutMatcher = require('./
|
|
6
|
+
const pointcutMatcher = require('./index41.js');
|
|
7
7
|
const affect = require('./index12.js');
|
|
8
8
|
const schema = require('./index30.js');
|
|
9
9
|
|
package/dist/index13.mjs
CHANGED
package/dist/index18.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const parameterDecoratorFactory = require('./index17.js');
|
|
6
|
-
const resolverStore = require('./
|
|
6
|
+
const resolverStore = require('./index39.js');
|
|
7
7
|
|
|
8
8
|
let ContextResolver = class ContextResolver {
|
|
9
9
|
resolve(e, r, t) {
|
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('./index17.js');
|
|
6
|
-
const resolverStore = require('./
|
|
6
|
+
const resolverStore = require('./index39.js');
|
|
7
7
|
|
|
8
8
|
let ConfigurationResolver = class ConfigurationResolver {
|
|
9
9
|
resolve(r, o, e, n) {
|
package/dist/index19.mjs
CHANGED
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('./index17.js');
|
|
6
|
-
const resolverStore = require('./
|
|
6
|
+
const resolverStore = require('./index39.js');
|
|
7
7
|
|
|
8
8
|
let DefinitionResolver = class DefinitionResolver {
|
|
9
9
|
resolve(e, r) {
|
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('./index17.js');
|
|
6
|
-
const resolverStore = require('./
|
|
6
|
+
const resolverStore = require('./index39.js');
|
|
7
7
|
|
|
8
8
|
let DisposeResolver = class DisposeResolver {
|
|
9
9
|
resolve(e, r, s) {
|
package/dist/index21.mjs
CHANGED
package/dist/index22.js
CHANGED
|
@@ -3,15 +3,21 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const reflection = require('./index29.js');
|
|
6
|
+
const debugLogger = require('./index37.js');
|
|
6
7
|
const parameterDecoratorFactory = require('./index17.js');
|
|
7
8
|
const helpers = require('./index25.js');
|
|
8
|
-
const resolverStore = require('./
|
|
9
|
+
const resolverStore = require('./index39.js');
|
|
9
10
|
|
|
10
11
|
let UseResolver = class UseResolver {
|
|
11
|
-
resolve(
|
|
12
|
-
const
|
|
13
|
-
const m =
|
|
14
|
-
|
|
12
|
+
resolve(o, t, a) {
|
|
13
|
+
const n = reflection.getOwnCustomMetadata(helpers.getParamValueKey('Use'), a);
|
|
14
|
+
const m = n[o];
|
|
15
|
+
debugLogger.DebugLogger.getInstance().logInjection('use', {
|
|
16
|
+
target: a?.name,
|
|
17
|
+
index: o,
|
|
18
|
+
identifier: typeof m === 'symbol' ? m.toString() : m
|
|
19
|
+
});
|
|
20
|
+
return t.privateContext.require(m);
|
|
15
21
|
}
|
|
16
22
|
};
|
|
17
23
|
const decorateUse = (e, r, o)=>{
|
package/dist/index22.mjs
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import { getOwnCustomMetadata } from './index29.mjs';
|
|
2
|
+
import { DebugLogger } from './index37.mjs';
|
|
2
3
|
import { ParameterDecoratorFactory } from './index17.mjs';
|
|
3
4
|
import { getParamValueKey } from './index25.mjs';
|
|
4
|
-
import { ResolverStore } from './
|
|
5
|
+
import { ResolverStore } from './index39.mjs';
|
|
5
6
|
|
|
6
7
|
let UseResolver = class UseResolver {
|
|
7
|
-
resolve(
|
|
8
|
-
const
|
|
9
|
-
const m =
|
|
10
|
-
|
|
8
|
+
resolve(o, t, a) {
|
|
9
|
+
const n = getOwnCustomMetadata(getParamValueKey('Use'), a);
|
|
10
|
+
const m = n[o];
|
|
11
|
+
DebugLogger.getInstance().logInjection('use', {
|
|
12
|
+
target: a?.name,
|
|
13
|
+
index: o,
|
|
14
|
+
identifier: typeof m === 'symbol' ? m.toString() : m
|
|
15
|
+
});
|
|
16
|
+
return t.privateContext.require(m);
|
|
11
17
|
}
|
|
12
18
|
};
|
|
13
19
|
const decorateUse = (e, r, o)=>{
|
package/dist/index23.js
CHANGED
|
@@ -3,19 +3,25 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const reflection = require('./index29.js');
|
|
6
|
+
const debugLogger = require('./index37.js');
|
|
6
7
|
const parameterDecoratorFactory = require('./index17.js');
|
|
7
8
|
const helpers = require('./index25.js');
|
|
8
|
-
const resolverStore = require('./
|
|
9
|
+
const resolverStore = require('./index39.js');
|
|
9
10
|
|
|
10
11
|
let GlobalResolver = class GlobalResolver {
|
|
11
|
-
resolve(
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
|
|
12
|
+
resolve(r, l, a) {
|
|
13
|
+
const s = reflection.getOwnCustomMetadata(helpers.getParamValueKey('Global'), a);
|
|
14
|
+
const n = s[r];
|
|
15
|
+
debugLogger.DebugLogger.getInstance().logInjection('global', {
|
|
16
|
+
target: a?.name,
|
|
17
|
+
index: r,
|
|
18
|
+
identifier: typeof n === 'symbol' ? n.toString() : n
|
|
19
|
+
});
|
|
20
|
+
return l.privateContext.global(n);
|
|
15
21
|
}
|
|
16
22
|
};
|
|
17
|
-
const decorateGlobal = (
|
|
18
|
-
Global(
|
|
23
|
+
const decorateGlobal = (e, o, r)=>{
|
|
24
|
+
Global(e)(o, undefined, r);
|
|
19
25
|
};
|
|
20
26
|
const Global = (()=>{
|
|
21
27
|
resolverStore.ResolverStore.register('Global', GlobalResolver);
|
package/dist/index23.mjs
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import { getOwnCustomMetadata } from './index29.mjs';
|
|
2
|
+
import { DebugLogger } from './index37.mjs';
|
|
2
3
|
import { ParameterDecoratorFactory } from './index17.mjs';
|
|
3
4
|
import { getParamValueKey } from './index25.mjs';
|
|
4
|
-
import { ResolverStore } from './
|
|
5
|
+
import { ResolverStore } from './index39.mjs';
|
|
5
6
|
|
|
6
7
|
let GlobalResolver = class GlobalResolver {
|
|
7
|
-
resolve(
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
|
|
8
|
+
resolve(r, l, a) {
|
|
9
|
+
const s = getOwnCustomMetadata(getParamValueKey('Global'), a);
|
|
10
|
+
const n = s[r];
|
|
11
|
+
DebugLogger.getInstance().logInjection('global', {
|
|
12
|
+
target: a?.name,
|
|
13
|
+
index: r,
|
|
14
|
+
identifier: typeof n === 'symbol' ? n.toString() : n
|
|
15
|
+
});
|
|
16
|
+
return l.privateContext.global(n);
|
|
11
17
|
}
|
|
12
18
|
};
|
|
13
|
-
const decorateGlobal = (
|
|
14
|
-
Global(
|
|
19
|
+
const decorateGlobal = (e, o, r)=>{
|
|
20
|
+
Global(e)(o, undefined, r);
|
|
15
21
|
};
|
|
16
22
|
const Global = (()=>{
|
|
17
23
|
ResolverStore.register('Global', GlobalResolver);
|
package/dist/index24.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
5
5
|
const reflection = require('./index29.js');
|
|
6
6
|
const parameterDecoratorFactory = require('./index17.js');
|
|
7
7
|
const helpers = require('./index25.js');
|
|
8
|
-
const resolverStore = require('./
|
|
8
|
+
const resolverStore = require('./index39.js');
|
|
9
9
|
|
|
10
10
|
let OptionalResolver = class OptionalResolver {
|
|
11
11
|
resolve(o, t, n) {
|
package/dist/index24.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getParamTypes, getOwnCustomMetadata } from './index29.mjs';
|
|
2
2
|
import { ParameterDecoratorFactory } from './index17.mjs';
|
|
3
3
|
import { getParamValueKey } from './index25.mjs';
|
|
4
|
-
import { ResolverStore } from './
|
|
4
|
+
import { ResolverStore } from './index39.mjs';
|
|
5
5
|
|
|
6
6
|
let OptionalResolver = class OptionalResolver {
|
|
7
7
|
resolve(o, t, n) {
|
package/dist/index31.js
CHANGED
|
@@ -2,110 +2,45 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
const affect = require('./index12.js');
|
|
5
|
+
const eventManager = require('./index6.js');
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
if (
|
|
15
|
-
|
|
16
|
-
if (!n) return false;
|
|
17
|
-
const r = n.value && typeof n.value === 'function';
|
|
18
|
-
const o = n.get && typeof n.get === 'function';
|
|
19
|
-
if (!r && !o) return false;
|
|
20
|
-
const c = affect.getAffectedMethods(a, t);
|
|
21
|
-
return c.length > 0;
|
|
22
|
-
});
|
|
23
|
-
if (s.length === 0 && !f) {
|
|
24
|
-
return n;
|
|
7
|
+
const registerEvents = (t, n)=>{
|
|
8
|
+
const o = t.concrete !== undefined && t.concrete.prototype instanceof eventManager.EventManager;
|
|
9
|
+
if (o) {
|
|
10
|
+
const e = n;
|
|
11
|
+
const o = e.channels;
|
|
12
|
+
for (const n of t.events){
|
|
13
|
+
if (!o.has(n)) e.addChannels(n);
|
|
14
|
+
if (!t.privateContext.events.has(n)) t.privateContext.addChannels(n);
|
|
25
15
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const a = {
|
|
35
|
-
target: t,
|
|
36
|
-
methodName: o,
|
|
37
|
-
args: n
|
|
38
|
-
};
|
|
39
|
-
const f = c.getAdvicesForJoinPoint(a, s, t, e);
|
|
40
|
-
return TransversalWeaver.executeAdviceChain(f, r, t, n, a);
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
static executeAdviceChain(t, e, n, r, o) {
|
|
46
|
-
const c = t.filter((t)=>t.type === 'before');
|
|
47
|
-
const s = t.filter((t)=>t.type === 'around');
|
|
48
|
-
const a = t.filter((t)=>t.type === 'after');
|
|
49
|
-
try {
|
|
50
|
-
for (const t of c){
|
|
51
|
-
const e = {
|
|
52
|
-
...o,
|
|
53
|
-
config: t.config
|
|
54
|
-
};
|
|
55
|
-
t.method.call(t.transversalInstance, e);
|
|
56
|
-
}
|
|
57
|
-
let t;
|
|
58
|
-
if (s.length > 0) {
|
|
59
|
-
t = this.buildAroundChain(s, e, n, r, o);
|
|
60
|
-
} else {
|
|
61
|
-
t = e.apply(n, r);
|
|
62
|
-
}
|
|
63
|
-
if (t instanceof Promise) {
|
|
64
|
-
return t.then((t)=>{
|
|
65
|
-
for (const e of a){
|
|
66
|
-
const n = {
|
|
67
|
-
...o,
|
|
68
|
-
result: t
|
|
69
|
-
};
|
|
70
|
-
e.method.call(e.transversalInstance, n);
|
|
71
|
-
}
|
|
72
|
-
return t;
|
|
73
|
-
}).catch((t)=>{
|
|
74
|
-
o.error = t;
|
|
75
|
-
throw t;
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
for (const e of a){
|
|
79
|
-
const n = {
|
|
80
|
-
...o,
|
|
81
|
-
result: t,
|
|
82
|
-
config: e.config
|
|
83
|
-
};
|
|
84
|
-
e.method.call(e.transversalInstance, n);
|
|
85
|
-
}
|
|
86
|
-
return t;
|
|
87
|
-
} catch (t) {
|
|
88
|
-
o.error = t;
|
|
89
|
-
throw t;
|
|
16
|
+
for (const e of t.events){
|
|
17
|
+
n.on(e, (...n)=>{
|
|
18
|
+
t.privateContext.emit(e, ...n);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
} else {
|
|
22
|
+
for (const e of t.events){
|
|
23
|
+
if (!t.privateContext.events.has(e)) t.privateContext.addChannels(e);
|
|
90
24
|
}
|
|
91
25
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
26
|
+
};
|
|
27
|
+
const unregisterEvents = (t, n)=>{
|
|
28
|
+
const o = t.concrete !== undefined && t.concrete.prototype instanceof eventManager.EventManager;
|
|
29
|
+
if (o) {
|
|
30
|
+
const e = n;
|
|
31
|
+
for (const n of t.events){
|
|
32
|
+
e.off(n);
|
|
33
|
+
}
|
|
34
|
+
e.removeChannels(...t.events);
|
|
35
|
+
t.privateContext.removeChannels(...t.events);
|
|
36
|
+
} else {
|
|
37
|
+
for (const e of t.events){
|
|
38
|
+
if (t.privateContext.events.has(e)) {
|
|
39
|
+
t.privateContext.removeChannels(e);
|
|
105
40
|
}
|
|
106
|
-
}
|
|
107
|
-
return s();
|
|
41
|
+
}
|
|
108
42
|
}
|
|
109
|
-
}
|
|
43
|
+
};
|
|
110
44
|
|
|
111
|
-
exports.
|
|
45
|
+
exports.registerEvents = registerEvents;
|
|
46
|
+
exports.unregisterEvents = unregisterEvents;
|
package/dist/index31.mjs
CHANGED
|
@@ -1,107 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getAffectedMethods } from './index12.mjs';
|
|
1
|
+
import { EventManager } from './index6.mjs';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
if (
|
|
11
|
-
|
|
12
|
-
if (!n) return false;
|
|
13
|
-
const r = n.value && typeof n.value === 'function';
|
|
14
|
-
const o = n.get && typeof n.get === 'function';
|
|
15
|
-
if (!r && !o) return false;
|
|
16
|
-
const c = getAffectedMethods(a, t);
|
|
17
|
-
return c.length > 0;
|
|
18
|
-
});
|
|
19
|
-
if (s.length === 0 && !f) {
|
|
20
|
-
return n;
|
|
3
|
+
const registerEvents = (t, n)=>{
|
|
4
|
+
const o = t.concrete !== undefined && t.concrete.prototype instanceof EventManager;
|
|
5
|
+
if (o) {
|
|
6
|
+
const e = n;
|
|
7
|
+
const o = e.channels;
|
|
8
|
+
for (const n of t.events){
|
|
9
|
+
if (!o.has(n)) e.addChannels(n);
|
|
10
|
+
if (!t.privateContext.events.has(n)) t.privateContext.addChannels(n);
|
|
21
11
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const a = {
|
|
31
|
-
target: t,
|
|
32
|
-
methodName: o,
|
|
33
|
-
args: n
|
|
34
|
-
};
|
|
35
|
-
const f = c.getAdvicesForJoinPoint(a, s, t, e);
|
|
36
|
-
return TransversalWeaver.executeAdviceChain(f, r, t, n, a);
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
static executeAdviceChain(t, e, n, r, o) {
|
|
42
|
-
const c = t.filter((t)=>t.type === 'before');
|
|
43
|
-
const s = t.filter((t)=>t.type === 'around');
|
|
44
|
-
const a = t.filter((t)=>t.type === 'after');
|
|
45
|
-
try {
|
|
46
|
-
for (const t of c){
|
|
47
|
-
const e = {
|
|
48
|
-
...o,
|
|
49
|
-
config: t.config
|
|
50
|
-
};
|
|
51
|
-
t.method.call(t.transversalInstance, e);
|
|
52
|
-
}
|
|
53
|
-
let t;
|
|
54
|
-
if (s.length > 0) {
|
|
55
|
-
t = this.buildAroundChain(s, e, n, r, o);
|
|
56
|
-
} else {
|
|
57
|
-
t = e.apply(n, r);
|
|
58
|
-
}
|
|
59
|
-
if (t instanceof Promise) {
|
|
60
|
-
return t.then((t)=>{
|
|
61
|
-
for (const e of a){
|
|
62
|
-
const n = {
|
|
63
|
-
...o,
|
|
64
|
-
result: t
|
|
65
|
-
};
|
|
66
|
-
e.method.call(e.transversalInstance, n);
|
|
67
|
-
}
|
|
68
|
-
return t;
|
|
69
|
-
}).catch((t)=>{
|
|
70
|
-
o.error = t;
|
|
71
|
-
throw t;
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
for (const e of a){
|
|
75
|
-
const n = {
|
|
76
|
-
...o,
|
|
77
|
-
result: t,
|
|
78
|
-
config: e.config
|
|
79
|
-
};
|
|
80
|
-
e.method.call(e.transversalInstance, n);
|
|
81
|
-
}
|
|
82
|
-
return t;
|
|
83
|
-
} catch (t) {
|
|
84
|
-
o.error = t;
|
|
85
|
-
throw t;
|
|
12
|
+
for (const e of t.events){
|
|
13
|
+
n.on(e, (...n)=>{
|
|
14
|
+
t.privateContext.emit(e, ...n);
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
} else {
|
|
18
|
+
for (const e of t.events){
|
|
19
|
+
if (!t.privateContext.events.has(e)) t.privateContext.addChannels(e);
|
|
86
20
|
}
|
|
87
21
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
22
|
+
};
|
|
23
|
+
const unregisterEvents = (t, n)=>{
|
|
24
|
+
const o = t.concrete !== undefined && t.concrete.prototype instanceof EventManager;
|
|
25
|
+
if (o) {
|
|
26
|
+
const e = n;
|
|
27
|
+
for (const n of t.events){
|
|
28
|
+
e.off(n);
|
|
29
|
+
}
|
|
30
|
+
e.removeChannels(...t.events);
|
|
31
|
+
t.privateContext.removeChannels(...t.events);
|
|
32
|
+
} else {
|
|
33
|
+
for (const e of t.events){
|
|
34
|
+
if (t.privateContext.events.has(e)) {
|
|
35
|
+
t.privateContext.removeChannels(e);
|
|
101
36
|
}
|
|
102
|
-
}
|
|
103
|
-
return s();
|
|
37
|
+
}
|
|
104
38
|
}
|
|
105
|
-
}
|
|
39
|
+
};
|
|
106
40
|
|
|
107
|
-
export {
|
|
41
|
+
export { registerEvents, unregisterEvents };
|