assemblerjs 0.9.7 → 1.0.0
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 +220 -56
- package/dist/index.d.ts +700 -465
- package/dist/index.js +59 -1
- package/dist/index.mjs +21 -919
- package/dist/index10.js +8 -0
- package/dist/index10.mjs +4 -0
- package/dist/index11.js +27 -0
- package/dist/index11.mjs +23 -0
- package/dist/index12.js +16 -0
- package/dist/index12.mjs +12 -0
- package/dist/index13.js +94 -0
- package/dist/index13.mjs +90 -0
- package/dist/index14.js +22 -0
- package/dist/index14.mjs +18 -0
- package/dist/index15.js +22 -0
- package/dist/index15.mjs +18 -0
- package/dist/index16.js +22 -0
- package/dist/index16.mjs +18 -0
- package/dist/index17.js +22 -0
- package/dist/index17.mjs +18 -0
- package/dist/index18.js +31 -0
- package/dist/index18.mjs +26 -0
- package/dist/index19.js +31 -0
- package/dist/index19.mjs +26 -0
- package/dist/index2.js +22 -0
- package/dist/index2.mjs +17 -0
- package/dist/index20.js +31 -0
- package/dist/index20.mjs +27 -0
- package/dist/index21.js +33 -0
- package/dist/index21.mjs +25 -0
- package/dist/index22.js +53 -0
- package/dist/index22.mjs +48 -0
- package/dist/index23.js +69 -0
- package/dist/index23.mjs +65 -0
- package/dist/index24.js +37 -0
- package/dist/index24.mjs +33 -0
- package/dist/index25.js +71 -0
- package/dist/index25.mjs +67 -0
- package/dist/index26.js +37 -0
- package/dist/index26.mjs +33 -0
- package/dist/index27.js +37 -0
- package/dist/index27.mjs +33 -0
- package/dist/index28.js +46 -0
- package/dist/index28.mjs +41 -0
- package/dist/index29.js +20 -0
- package/dist/index29.mjs +14 -0
- package/dist/index3.js +20 -0
- package/dist/index3.mjs +14 -0
- package/dist/index30.js +19 -0
- package/dist/index30.mjs +13 -0
- package/dist/index31.js +100 -0
- package/dist/index31.mjs +94 -0
- package/dist/index32.js +28 -0
- package/dist/index32.mjs +24 -0
- package/dist/index33.js +34 -0
- package/dist/index33.mjs +29 -0
- package/dist/index34.js +14 -0
- package/dist/index34.mjs +10 -0
- package/dist/index35.js +54 -0
- package/dist/index35.mjs +50 -0
- package/dist/index36.js +117 -0
- package/dist/index36.mjs +113 -0
- package/dist/index37.js +19 -0
- package/dist/index37.mjs +15 -0
- package/dist/index38.js +31 -0
- package/dist/index38.mjs +27 -0
- package/dist/index39.js +55 -0
- package/dist/index39.mjs +50 -0
- package/dist/index4.js +81 -0
- package/dist/index4.mjs +77 -0
- package/dist/index5.js +94 -0
- package/dist/index5.mjs +90 -0
- package/dist/index6.js +114 -0
- package/dist/index6.mjs +110 -0
- package/dist/index7.js +9 -0
- package/dist/index7.mjs +5 -0
- package/dist/index8.js +10 -0
- package/dist/index8.mjs +6 -0
- package/dist/index9.js +8 -0
- package/dist/index9.mjs +4 -0
- package/package.json +8 -5
package/dist/index10.js
ADDED
package/dist/index10.mjs
ADDED
package/dist/index11.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const Await = (t, e = 25)=>{
|
|
6
|
+
return (n, s, a)=>{
|
|
7
|
+
const i = a.value;
|
|
8
|
+
a.value = async function() {
|
|
9
|
+
return new Promise((n)=>{
|
|
10
|
+
if (this[t]) {
|
|
11
|
+
i.apply(this);
|
|
12
|
+
n();
|
|
13
|
+
} else {
|
|
14
|
+
const s = setInterval(()=>{
|
|
15
|
+
if (this[t]) {
|
|
16
|
+
clearInterval(s);
|
|
17
|
+
i.apply(this);
|
|
18
|
+
n();
|
|
19
|
+
}
|
|
20
|
+
}, e);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.Await = Await;
|
package/dist/index11.mjs
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const Await = (t, e = 25)=>{
|
|
2
|
+
return (n, s, a)=>{
|
|
3
|
+
const i = a.value;
|
|
4
|
+
a.value = async function() {
|
|
5
|
+
return new Promise((n)=>{
|
|
6
|
+
if (this[t]) {
|
|
7
|
+
i.apply(this);
|
|
8
|
+
n();
|
|
9
|
+
} else {
|
|
10
|
+
const s = setInterval(()=>{
|
|
11
|
+
if (this[t]) {
|
|
12
|
+
clearInterval(s);
|
|
13
|
+
i.apply(this);
|
|
14
|
+
n();
|
|
15
|
+
}
|
|
16
|
+
}, e);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { Await };
|
package/dist/index12.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const reflection = require('./index30.js');
|
|
6
|
+
|
|
7
|
+
const t = (t)=>()=>{
|
|
8
|
+
return (e, c, n)=>{
|
|
9
|
+
const a = reflection.getOwnCustomMetadata(t, e) || [];
|
|
10
|
+
a.push(n);
|
|
11
|
+
reflection.defineCustomMetadata(t, a, e);
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
const createParamIndexDecorator = t;
|
|
15
|
+
|
|
16
|
+
exports.createParamIndexDecorator = createParamIndexDecorator;
|
package/dist/index12.mjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { getOwnCustomMetadata, defineCustomMetadata } from './index30.mjs';
|
|
2
|
+
|
|
3
|
+
const t = (t)=>()=>{
|
|
4
|
+
return (e, c, n)=>{
|
|
5
|
+
const a = getOwnCustomMetadata(t, e) || [];
|
|
6
|
+
a.push(n);
|
|
7
|
+
defineCustomMetadata(t, a, e);
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
const createParamIndexDecorator = t;
|
|
11
|
+
|
|
12
|
+
export { createParamIndexDecorator };
|
package/dist/index13.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const reflection = require('./index30.js');
|
|
6
|
+
|
|
7
|
+
class ParameterDecoratorFactory {
|
|
8
|
+
static create(e) {
|
|
9
|
+
const { name: r, valueType: t = 'single', handler: a } = e;
|
|
10
|
+
if (this.registeredDecorators.has(r)) {
|
|
11
|
+
throw new Error(`Decorator ${r} already exists`);
|
|
12
|
+
}
|
|
13
|
+
const s = `assemblage:${r.toLowerCase()}.param.index`;
|
|
14
|
+
const o = `assemblage:${r.toLowerCase()}.param.value`;
|
|
15
|
+
const c = this.createDecoratorFunction(s, o, t);
|
|
16
|
+
this.registeredDecorators.set(r, {
|
|
17
|
+
name: r,
|
|
18
|
+
valueType: t,
|
|
19
|
+
handler: a
|
|
20
|
+
});
|
|
21
|
+
return c;
|
|
22
|
+
}
|
|
23
|
+
static createDecoratorFunction(e, r, t) {
|
|
24
|
+
return (a)=>{
|
|
25
|
+
return (s, o, c)=>{
|
|
26
|
+
this.storeParameterData(a, s, c, e, r, t);
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
static validateSingleDecoratorPerParameter(r, t, a) {
|
|
31
|
+
for (const s of this.registeredDecorators.keys()){
|
|
32
|
+
const o = `assemblage:${s.toLowerCase()}.param.index`;
|
|
33
|
+
if (o === a) {
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
const c = reflection.getOwnCustomMetadata(o, r) || [];
|
|
37
|
+
if (c.includes(t)) {
|
|
38
|
+
throw new Error(`Parameter at index ${t} already has decorator @${s}. ` + `Multiple decorators per parameter are not allowed.`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
static storeParameterData(t, a, s, o, c, i) {
|
|
43
|
+
this.validateSingleDecoratorPerParameter(a, s, o);
|
|
44
|
+
const n = reflection.getOwnCustomMetadata(o, a) || [];
|
|
45
|
+
n.push(s);
|
|
46
|
+
reflection.defineCustomMetadata(o, n, a);
|
|
47
|
+
switch(i){
|
|
48
|
+
case 'single':
|
|
49
|
+
{
|
|
50
|
+
reflection.defineCustomMetadata(c, t, a);
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
case 'array':
|
|
54
|
+
{
|
|
55
|
+
const o = reflection.getOwnCustomMetadata(c, a) || [];
|
|
56
|
+
o[s] = t;
|
|
57
|
+
reflection.defineCustomMetadata(c, o, a);
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
case 'map':
|
|
61
|
+
{
|
|
62
|
+
const o = reflection.getOwnCustomMetadata(c, a) || {};
|
|
63
|
+
o[s] = t;
|
|
64
|
+
reflection.defineCustomMetadata(c, o, a);
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
static createParameterIndexGetter(r) {
|
|
70
|
+
return (t)=>{
|
|
71
|
+
return reflection.getOwnCustomMetadata(r, t) || [];
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
static createParameterValueGetter(r, t) {
|
|
75
|
+
return (t)=>{
|
|
76
|
+
return reflection.getOwnCustomMetadata(r, t);
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
static getRegisteredDecorators() {
|
|
80
|
+
return Array.from(this.registeredDecorators.keys());
|
|
81
|
+
}
|
|
82
|
+
static isRegistered(e) {
|
|
83
|
+
return this.registeredDecorators.has(e);
|
|
84
|
+
}
|
|
85
|
+
static getDecoratorMetadata(e) {
|
|
86
|
+
return this.registeredDecorators.get(e);
|
|
87
|
+
}
|
|
88
|
+
static getDecoratorHandler(e) {
|
|
89
|
+
return this.registeredDecorators.get(e)?.handler;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
ParameterDecoratorFactory.registeredDecorators = new Map();
|
|
93
|
+
|
|
94
|
+
exports.ParameterDecoratorFactory = ParameterDecoratorFactory;
|
package/dist/index13.mjs
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { getOwnCustomMetadata, defineCustomMetadata } from './index30.mjs';
|
|
2
|
+
|
|
3
|
+
class ParameterDecoratorFactory {
|
|
4
|
+
static create(e) {
|
|
5
|
+
const { name: r, valueType: t = 'single', handler: a } = e;
|
|
6
|
+
if (this.registeredDecorators.has(r)) {
|
|
7
|
+
throw new Error(`Decorator ${r} already exists`);
|
|
8
|
+
}
|
|
9
|
+
const s = `assemblage:${r.toLowerCase()}.param.index`;
|
|
10
|
+
const o = `assemblage:${r.toLowerCase()}.param.value`;
|
|
11
|
+
const c = this.createDecoratorFunction(s, o, t);
|
|
12
|
+
this.registeredDecorators.set(r, {
|
|
13
|
+
name: r,
|
|
14
|
+
valueType: t,
|
|
15
|
+
handler: a
|
|
16
|
+
});
|
|
17
|
+
return c;
|
|
18
|
+
}
|
|
19
|
+
static createDecoratorFunction(e, r, t) {
|
|
20
|
+
return (a)=>{
|
|
21
|
+
return (s, o, c)=>{
|
|
22
|
+
this.storeParameterData(a, s, c, e, r, t);
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
static validateSingleDecoratorPerParameter(r, t, a) {
|
|
27
|
+
for (const s of this.registeredDecorators.keys()){
|
|
28
|
+
const o = `assemblage:${s.toLowerCase()}.param.index`;
|
|
29
|
+
if (o === a) {
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
const c = getOwnCustomMetadata(o, r) || [];
|
|
33
|
+
if (c.includes(t)) {
|
|
34
|
+
throw new Error(`Parameter at index ${t} already has decorator @${s}. ` + `Multiple decorators per parameter are not allowed.`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
static storeParameterData(t, a, s, o, c, i) {
|
|
39
|
+
this.validateSingleDecoratorPerParameter(a, s, o);
|
|
40
|
+
const n = getOwnCustomMetadata(o, a) || [];
|
|
41
|
+
n.push(s);
|
|
42
|
+
defineCustomMetadata(o, n, a);
|
|
43
|
+
switch(i){
|
|
44
|
+
case 'single':
|
|
45
|
+
{
|
|
46
|
+
defineCustomMetadata(c, t, a);
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
case 'array':
|
|
50
|
+
{
|
|
51
|
+
const o = getOwnCustomMetadata(c, a) || [];
|
|
52
|
+
o[s] = t;
|
|
53
|
+
defineCustomMetadata(c, o, a);
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
case 'map':
|
|
57
|
+
{
|
|
58
|
+
const o = getOwnCustomMetadata(c, a) || {};
|
|
59
|
+
o[s] = t;
|
|
60
|
+
defineCustomMetadata(c, o, a);
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
static createParameterIndexGetter(r) {
|
|
66
|
+
return (t)=>{
|
|
67
|
+
return getOwnCustomMetadata(r, t) || [];
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
static createParameterValueGetter(r, t) {
|
|
71
|
+
return (t)=>{
|
|
72
|
+
return getOwnCustomMetadata(r, t);
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
static getRegisteredDecorators() {
|
|
76
|
+
return Array.from(this.registeredDecorators.keys());
|
|
77
|
+
}
|
|
78
|
+
static isRegistered(e) {
|
|
79
|
+
return this.registeredDecorators.has(e);
|
|
80
|
+
}
|
|
81
|
+
static getDecoratorMetadata(e) {
|
|
82
|
+
return this.registeredDecorators.get(e);
|
|
83
|
+
}
|
|
84
|
+
static getDecoratorHandler(e) {
|
|
85
|
+
return this.registeredDecorators.get(e)?.handler;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
ParameterDecoratorFactory.registeredDecorators = new Map();
|
|
89
|
+
|
|
90
|
+
export { ParameterDecoratorFactory };
|
package/dist/index14.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const parameterDecoratorFactory = require('./index13.js');
|
|
6
|
+
const resolverStore = require('./index32.js');
|
|
7
|
+
|
|
8
|
+
let ContextResolver = class ContextResolver {
|
|
9
|
+
resolve(e, r, t) {
|
|
10
|
+
return r.publicContext;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
const Context = (()=>{
|
|
14
|
+
resolverStore.ResolverStore.register('Context', ContextResolver);
|
|
15
|
+
return parameterDecoratorFactory.ParameterDecoratorFactory.create({
|
|
16
|
+
name: 'Context',
|
|
17
|
+
valueType: 'array',
|
|
18
|
+
resolver: ContextResolver
|
|
19
|
+
});
|
|
20
|
+
})();
|
|
21
|
+
|
|
22
|
+
exports.Context = Context;
|
package/dist/index14.mjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ParameterDecoratorFactory } from './index13.mjs';
|
|
2
|
+
import { ResolverStore } from './index32.mjs';
|
|
3
|
+
|
|
4
|
+
let ContextResolver = class ContextResolver {
|
|
5
|
+
resolve(e, r, t) {
|
|
6
|
+
return r.publicContext;
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
const Context = (()=>{
|
|
10
|
+
ResolverStore.register('Context', ContextResolver);
|
|
11
|
+
return ParameterDecoratorFactory.create({
|
|
12
|
+
name: 'Context',
|
|
13
|
+
valueType: 'array',
|
|
14
|
+
resolver: ContextResolver
|
|
15
|
+
});
|
|
16
|
+
})();
|
|
17
|
+
|
|
18
|
+
export { Context };
|
package/dist/index15.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const parameterDecoratorFactory = require('./index13.js');
|
|
6
|
+
const resolverStore = require('./index32.js');
|
|
7
|
+
|
|
8
|
+
let ConfigurationResolver = class ConfigurationResolver {
|
|
9
|
+
resolve(r, o, e, n) {
|
|
10
|
+
return n || o.configuration;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
const Configuration = (()=>{
|
|
14
|
+
resolverStore.ResolverStore.register('Configuration', ConfigurationResolver);
|
|
15
|
+
return parameterDecoratorFactory.ParameterDecoratorFactory.create({
|
|
16
|
+
name: 'Configuration',
|
|
17
|
+
valueType: 'array',
|
|
18
|
+
resolver: ConfigurationResolver
|
|
19
|
+
});
|
|
20
|
+
})();
|
|
21
|
+
|
|
22
|
+
exports.Configuration = Configuration;
|
package/dist/index15.mjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ParameterDecoratorFactory } from './index13.mjs';
|
|
2
|
+
import { ResolverStore } from './index32.mjs';
|
|
3
|
+
|
|
4
|
+
let ConfigurationResolver = class ConfigurationResolver {
|
|
5
|
+
resolve(r, o, e, n) {
|
|
6
|
+
return n || o.configuration;
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
const Configuration = (()=>{
|
|
10
|
+
ResolverStore.register('Configuration', ConfigurationResolver);
|
|
11
|
+
return ParameterDecoratorFactory.create({
|
|
12
|
+
name: 'Configuration',
|
|
13
|
+
valueType: 'array',
|
|
14
|
+
resolver: ConfigurationResolver
|
|
15
|
+
});
|
|
16
|
+
})();
|
|
17
|
+
|
|
18
|
+
export { Configuration };
|
package/dist/index16.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const parameterDecoratorFactory = require('./index13.js');
|
|
6
|
+
const resolverStore = require('./index32.js');
|
|
7
|
+
|
|
8
|
+
let DefinitionResolver = class DefinitionResolver {
|
|
9
|
+
resolve(e, r) {
|
|
10
|
+
return r.definition;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
const Definition = (()=>{
|
|
14
|
+
resolverStore.ResolverStore.register('Definition', DefinitionResolver);
|
|
15
|
+
return parameterDecoratorFactory.ParameterDecoratorFactory.create({
|
|
16
|
+
name: 'Definition',
|
|
17
|
+
valueType: 'array',
|
|
18
|
+
resolver: DefinitionResolver
|
|
19
|
+
});
|
|
20
|
+
})();
|
|
21
|
+
|
|
22
|
+
exports.Definition = Definition;
|
package/dist/index16.mjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ParameterDecoratorFactory } from './index13.mjs';
|
|
2
|
+
import { ResolverStore } from './index32.mjs';
|
|
3
|
+
|
|
4
|
+
let DefinitionResolver = class DefinitionResolver {
|
|
5
|
+
resolve(e, r) {
|
|
6
|
+
return r.definition;
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
const Definition = (()=>{
|
|
10
|
+
ResolverStore.register('Definition', DefinitionResolver);
|
|
11
|
+
return ParameterDecoratorFactory.create({
|
|
12
|
+
name: 'Definition',
|
|
13
|
+
valueType: 'array',
|
|
14
|
+
resolver: DefinitionResolver
|
|
15
|
+
});
|
|
16
|
+
})();
|
|
17
|
+
|
|
18
|
+
export { Definition };
|
package/dist/index17.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const parameterDecoratorFactory = require('./index13.js');
|
|
6
|
+
const resolverStore = require('./index32.js');
|
|
7
|
+
|
|
8
|
+
let DisposeResolver = class DisposeResolver {
|
|
9
|
+
resolve(e, r, s) {
|
|
10
|
+
return r.privateContext.dispose;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
const Dispose = (()=>{
|
|
14
|
+
resolverStore.ResolverStore.register('Dispose', DisposeResolver);
|
|
15
|
+
return parameterDecoratorFactory.ParameterDecoratorFactory.create({
|
|
16
|
+
name: 'Dispose',
|
|
17
|
+
valueType: 'array',
|
|
18
|
+
resolver: DisposeResolver
|
|
19
|
+
});
|
|
20
|
+
})();
|
|
21
|
+
|
|
22
|
+
exports.Dispose = Dispose;
|
package/dist/index17.mjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ParameterDecoratorFactory } from './index13.mjs';
|
|
2
|
+
import { ResolverStore } from './index32.mjs';
|
|
3
|
+
|
|
4
|
+
let DisposeResolver = class DisposeResolver {
|
|
5
|
+
resolve(e, r, s) {
|
|
6
|
+
return r.privateContext.dispose;
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
const Dispose = (()=>{
|
|
10
|
+
ResolverStore.register('Dispose', DisposeResolver);
|
|
11
|
+
return ParameterDecoratorFactory.create({
|
|
12
|
+
name: 'Dispose',
|
|
13
|
+
valueType: 'array',
|
|
14
|
+
resolver: DisposeResolver
|
|
15
|
+
});
|
|
16
|
+
})();
|
|
17
|
+
|
|
18
|
+
export { Dispose };
|
package/dist/index18.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const reflection = require('./index30.js');
|
|
6
|
+
const parameterDecoratorFactory = require('./index13.js');
|
|
7
|
+
const helpers = require('./index21.js');
|
|
8
|
+
const resolverStore = require('./index32.js');
|
|
9
|
+
|
|
10
|
+
let UseResolver = class UseResolver {
|
|
11
|
+
resolve(r, o, t) {
|
|
12
|
+
const a = reflection.getOwnCustomMetadata(helpers.getParamValueKey('Use'), t);
|
|
13
|
+
const m = a[r];
|
|
14
|
+
return o.privateContext.require(m);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
const decorateUse = (e, r, o)=>{
|
|
18
|
+
Use(e)(r, undefined, o);
|
|
19
|
+
};
|
|
20
|
+
const Use = (()=>{
|
|
21
|
+
resolverStore.ResolverStore.register('Use', UseResolver);
|
|
22
|
+
return parameterDecoratorFactory.ParameterDecoratorFactory.create({
|
|
23
|
+
name: 'Use',
|
|
24
|
+
valueType: 'map',
|
|
25
|
+
resolver: UseResolver,
|
|
26
|
+
handler: decorateUse
|
|
27
|
+
});
|
|
28
|
+
})();
|
|
29
|
+
|
|
30
|
+
exports.Use = Use;
|
|
31
|
+
exports.decorateUse = decorateUse;
|
package/dist/index18.mjs
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { getOwnCustomMetadata } from './index30.mjs';
|
|
2
|
+
import { ParameterDecoratorFactory } from './index13.mjs';
|
|
3
|
+
import { getParamValueKey } from './index21.mjs';
|
|
4
|
+
import { ResolverStore } from './index32.mjs';
|
|
5
|
+
|
|
6
|
+
let UseResolver = class UseResolver {
|
|
7
|
+
resolve(r, o, t) {
|
|
8
|
+
const a = getOwnCustomMetadata(getParamValueKey('Use'), t);
|
|
9
|
+
const m = a[r];
|
|
10
|
+
return o.privateContext.require(m);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
const decorateUse = (e, r, o)=>{
|
|
14
|
+
Use(e)(r, undefined, o);
|
|
15
|
+
};
|
|
16
|
+
const Use = (()=>{
|
|
17
|
+
ResolverStore.register('Use', UseResolver);
|
|
18
|
+
return ParameterDecoratorFactory.create({
|
|
19
|
+
name: 'Use',
|
|
20
|
+
valueType: 'map',
|
|
21
|
+
resolver: UseResolver,
|
|
22
|
+
handler: decorateUse
|
|
23
|
+
});
|
|
24
|
+
})();
|
|
25
|
+
|
|
26
|
+
export { Use, decorateUse };
|
package/dist/index19.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const reflection = require('./index30.js');
|
|
6
|
+
const parameterDecoratorFactory = require('./index13.js');
|
|
7
|
+
const helpers = require('./index21.js');
|
|
8
|
+
const resolverStore = require('./index32.js');
|
|
9
|
+
|
|
10
|
+
let GlobalResolver = class GlobalResolver {
|
|
11
|
+
resolve(e, r, a) {
|
|
12
|
+
const t = reflection.getOwnCustomMetadata(helpers.getParamValueKey('Global'), a);
|
|
13
|
+
const s = t[e];
|
|
14
|
+
return r.privateContext.global(s);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
const decorateGlobal = (o, e, r)=>{
|
|
18
|
+
Global(o)(e, undefined, r);
|
|
19
|
+
};
|
|
20
|
+
const Global = (()=>{
|
|
21
|
+
resolverStore.ResolverStore.register('Global', GlobalResolver);
|
|
22
|
+
return parameterDecoratorFactory.ParameterDecoratorFactory.create({
|
|
23
|
+
name: 'Global',
|
|
24
|
+
valueType: 'map',
|
|
25
|
+
resolver: GlobalResolver,
|
|
26
|
+
handler: decorateGlobal
|
|
27
|
+
});
|
|
28
|
+
})();
|
|
29
|
+
|
|
30
|
+
exports.Global = Global;
|
|
31
|
+
exports.decorateGlobal = decorateGlobal;
|
package/dist/index19.mjs
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { getOwnCustomMetadata } from './index30.mjs';
|
|
2
|
+
import { ParameterDecoratorFactory } from './index13.mjs';
|
|
3
|
+
import { getParamValueKey } from './index21.mjs';
|
|
4
|
+
import { ResolverStore } from './index32.mjs';
|
|
5
|
+
|
|
6
|
+
let GlobalResolver = class GlobalResolver {
|
|
7
|
+
resolve(e, r, a) {
|
|
8
|
+
const t = getOwnCustomMetadata(getParamValueKey('Global'), a);
|
|
9
|
+
const s = t[e];
|
|
10
|
+
return r.privateContext.global(s);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
const decorateGlobal = (o, e, r)=>{
|
|
14
|
+
Global(o)(e, undefined, r);
|
|
15
|
+
};
|
|
16
|
+
const Global = (()=>{
|
|
17
|
+
ResolverStore.register('Global', GlobalResolver);
|
|
18
|
+
return ParameterDecoratorFactory.create({
|
|
19
|
+
name: 'Global',
|
|
20
|
+
valueType: 'map',
|
|
21
|
+
resolver: GlobalResolver,
|
|
22
|
+
handler: decorateGlobal
|
|
23
|
+
});
|
|
24
|
+
})();
|
|
25
|
+
|
|
26
|
+
export { Global, decorateGlobal };
|
package/dist/index2.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const constants = require('./index29.js');
|
|
6
|
+
const reflection = require('./index30.js');
|
|
7
|
+
const schema = require('./index31.js');
|
|
8
|
+
|
|
9
|
+
const Assemblage = (e)=>{
|
|
10
|
+
return (r)=>{
|
|
11
|
+
return decorateAssemblage(r, e);
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
const decorateAssemblage = (t, m)=>{
|
|
15
|
+
const n = schema.validateDefinition(m || {});
|
|
16
|
+
reflection.defineCustomMetadata(constants.ReflectFlags.IsAssemblage, true, t);
|
|
17
|
+
reflection.defineCustomMetadata(constants.ReflectValue.AssemblageDefinition, n, t);
|
|
18
|
+
return t;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.Assemblage = Assemblage;
|
|
22
|
+
exports.decorateAssemblage = decorateAssemblage;
|
package/dist/index2.mjs
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReflectFlags, ReflectValue } from './index29.mjs';
|
|
2
|
+
import { defineCustomMetadata } from './index30.mjs';
|
|
3
|
+
import { validateDefinition } from './index31.mjs';
|
|
4
|
+
|
|
5
|
+
const Assemblage = (e)=>{
|
|
6
|
+
return (r)=>{
|
|
7
|
+
return decorateAssemblage(r, e);
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
const decorateAssemblage = (t, m)=>{
|
|
11
|
+
const n = validateDefinition(m || {});
|
|
12
|
+
defineCustomMetadata(ReflectFlags.IsAssemblage, true, t);
|
|
13
|
+
defineCustomMetadata(ReflectValue.AssemblageDefinition, n, t);
|
|
14
|
+
return t;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { Assemblage, decorateAssemblage };
|
package/dist/index20.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const reflection = require('./index30.js');
|
|
6
|
+
const parameterDecoratorFactory = require('./index13.js');
|
|
7
|
+
const helpers = require('./index21.js');
|
|
8
|
+
const resolverStore = require('./index32.js');
|
|
9
|
+
|
|
10
|
+
let OptionalResolver = class OptionalResolver {
|
|
11
|
+
resolve(o, t, n) {
|
|
12
|
+
try {
|
|
13
|
+
const r = reflection.getParamTypes(n);
|
|
14
|
+
const a = r[o];
|
|
15
|
+
return t.privateContext.require(a);
|
|
16
|
+
} catch {
|
|
17
|
+
const e = reflection.getOwnCustomMetadata(helpers.getParamValueKey('Optional'), n);
|
|
18
|
+
return e?.[o];
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
const Optional = (()=>{
|
|
23
|
+
resolverStore.ResolverStore.register('Optional', OptionalResolver);
|
|
24
|
+
return parameterDecoratorFactory.ParameterDecoratorFactory.create({
|
|
25
|
+
name: 'Optional',
|
|
26
|
+
valueType: 'map',
|
|
27
|
+
resolver: OptionalResolver
|
|
28
|
+
});
|
|
29
|
+
})();
|
|
30
|
+
|
|
31
|
+
exports.Optional = Optional;
|
package/dist/index20.mjs
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { getParamTypes, getOwnCustomMetadata } from './index30.mjs';
|
|
2
|
+
import { ParameterDecoratorFactory } from './index13.mjs';
|
|
3
|
+
import { getParamValueKey } from './index21.mjs';
|
|
4
|
+
import { ResolverStore } from './index32.mjs';
|
|
5
|
+
|
|
6
|
+
let OptionalResolver = class OptionalResolver {
|
|
7
|
+
resolve(o, t, n) {
|
|
8
|
+
try {
|
|
9
|
+
const r = getParamTypes(n);
|
|
10
|
+
const a = r[o];
|
|
11
|
+
return t.privateContext.require(a);
|
|
12
|
+
} catch {
|
|
13
|
+
const e = getOwnCustomMetadata(getParamValueKey('Optional'), n);
|
|
14
|
+
return e?.[o];
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
const Optional = (()=>{
|
|
19
|
+
ResolverStore.register('Optional', OptionalResolver);
|
|
20
|
+
return ParameterDecoratorFactory.create({
|
|
21
|
+
name: 'Optional',
|
|
22
|
+
valueType: 'map',
|
|
23
|
+
resolver: OptionalResolver
|
|
24
|
+
});
|
|
25
|
+
})();
|
|
26
|
+
|
|
27
|
+
export { Optional };
|