assemblerjs 1.0.0 → 1.1.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.
Files changed (89) hide show
  1. package/README.md +29 -53
  2. package/dist/index.d.ts +430 -9
  3. package/dist/index.js +24 -12
  4. package/dist/index.mjs +16 -12
  5. package/dist/index11.js +82 -20
  6. package/dist/index11.mjs +78 -20
  7. package/dist/index12.js +17 -8
  8. package/dist/index12.mjs +16 -8
  9. package/dist/index13.js +148 -73
  10. package/dist/index13.mjs +148 -73
  11. package/dist/index14.js +4 -17
  12. package/dist/index14.mjs +4 -17
  13. package/dist/index15.js +21 -16
  14. package/dist/index15.mjs +21 -16
  15. package/dist/index16.js +10 -16
  16. package/dist/index16.mjs +10 -16
  17. package/dist/index17.js +88 -16
  18. package/dist/index17.mjs +88 -16
  19. package/dist/index18.js +11 -20
  20. package/dist/index18.mjs +11 -19
  21. package/dist/index19.js +11 -20
  22. package/dist/index19.mjs +11 -19
  23. package/dist/index2.js +3 -3
  24. package/dist/index2.mjs +3 -3
  25. package/dist/index20.js +11 -20
  26. package/dist/index20.mjs +11 -20
  27. package/dist/index21.js +14 -25
  28. package/dist/index21.mjs +14 -21
  29. package/dist/index22.js +24 -46
  30. package/dist/index22.mjs +23 -45
  31. package/dist/index23.js +25 -63
  32. package/dist/index23.mjs +24 -63
  33. package/dist/index24.js +24 -30
  34. package/dist/index24.mjs +24 -30
  35. package/dist/index25.js +24 -62
  36. package/dist/index25.mjs +20 -62
  37. package/dist/index26.js +46 -30
  38. package/dist/index26.mjs +45 -30
  39. package/dist/index27.js +2 -34
  40. package/dist/index27.mjs +2 -32
  41. package/dist/index28.js +17 -41
  42. package/dist/index28.mjs +15 -40
  43. package/dist/index29.js +64 -15
  44. package/dist/index29.mjs +64 -13
  45. package/dist/index3.js +2 -2
  46. package/dist/index3.mjs +2 -2
  47. package/dist/index30.js +32 -14
  48. package/dist/index30.mjs +32 -12
  49. package/dist/index31.js +57 -86
  50. package/dist/index31.mjs +57 -84
  51. package/dist/index32.js +28 -19
  52. package/dist/index32.mjs +28 -19
  53. package/dist/index33.js +28 -25
  54. package/dist/index33.mjs +28 -24
  55. package/dist/index34.js +17 -8
  56. package/dist/index34.mjs +14 -8
  57. package/dist/index35.js +23 -49
  58. package/dist/index35.mjs +23 -49
  59. package/dist/index36.js +37 -108
  60. package/dist/index36.mjs +36 -108
  61. package/dist/index37.js +98 -10
  62. package/dist/index37.mjs +96 -10
  63. package/dist/index38.js +95 -20
  64. package/dist/index38.mjs +95 -20
  65. package/dist/index39.js +23 -44
  66. package/dist/index39.mjs +23 -43
  67. package/dist/index4.js +5 -5
  68. package/dist/index4.mjs +5 -5
  69. package/dist/index40.js +34 -0
  70. package/dist/index40.mjs +29 -0
  71. package/dist/index41.js +14 -0
  72. package/dist/index41.mjs +10 -0
  73. package/dist/index42.js +54 -0
  74. package/dist/index42.mjs +50 -0
  75. package/dist/index43.js +177 -0
  76. package/dist/index43.mjs +173 -0
  77. package/dist/index44.js +947 -0
  78. package/dist/index44.mjs +943 -0
  79. package/dist/index45.js +7 -0
  80. package/dist/index45.mjs +3 -0
  81. package/dist/index46.js +7 -0
  82. package/dist/index46.mjs +3 -0
  83. package/dist/index47.js +19 -0
  84. package/dist/index47.mjs +15 -0
  85. package/dist/index48.js +33 -0
  86. package/dist/index48.mjs +29 -0
  87. package/dist/index49.js +67 -0
  88. package/dist/index49.mjs +62 -0
  89. package/package.json +2 -2
package/dist/index23.mjs CHANGED
@@ -1,65 +1,26 @@
1
- import { HookManager } from './index25.mjs';
2
- import { SingletonStrategy, TransientStrategy } from './index33.mjs';
3
- import { resolveInstanceInjectionTuple } from './index34.mjs';
4
- import { resolveInjectionTuple } from './index35.mjs';
5
- import { Injectable } from './index36.mjs';
1
+ import { getOwnCustomMetadata } from './index34.mjs';
2
+ import { ParameterDecoratorFactory } from './index17.mjs';
3
+ import { getParamValueKey } from './index25.mjs';
4
+ import { ResolverStore } from './index35.mjs';
6
5
 
7
- class InjectableManager {
8
- setContexts(e, t) {
9
- this.privateContext = e;
10
- this.publicContext = t;
11
- }
12
- register(r, n = false) {
13
- const o = n === true ? resolveInstanceInjectionTuple(r) : resolveInjectionTuple(r);
14
- if (this.has(o.identifier)) {
15
- throw new Error(`An assemblage is already registered with identifier '${o.identifier.name}'.`);
16
- }
17
- const a = Injectable.of(o, this.privateContext, this.publicContext);
18
- this.injectables.set(a.identifier, a);
19
- HookManager.callHook(a.concrete, 'onRegister', this.publicContext, a.configuration);
20
- return a;
21
- }
22
- has(e) {
23
- return this.injectables.has(e);
24
- }
25
- require(e, t) {
26
- if (!this.injectables.has(e)) {
27
- throw new Error(`Class with identifier '${e.name}' has not been registered or is a circular dependency.`);
28
- }
29
- const i = this.injectables.get(e);
30
- if (i.isSingleton) {
31
- return this.singletonStrategy.resolve(i, t);
32
- } else {
33
- return this.transientStrategy.resolve(i, t);
34
- }
35
- }
36
- concrete(e) {
37
- const t = this.injectables.get(e);
38
- if (t) return t.concrete;
39
- return;
40
- }
41
- tagged(...e) {
42
- const t = [];
43
- for (const i of e){
44
- for (const [e, s] of this.injectables){
45
- if (s.tags.includes(i)) t.push(s.build());
46
- }
47
- }
48
- return t;
49
- }
50
- dispose() {
51
- for (const [e, t] of this.injectables){
52
- t.dispose();
53
- }
54
- }
55
- get size() {
56
- return this.injectables.size;
57
- }
58
- constructor(){
59
- this.injectables = new Map();
60
- this.singletonStrategy = new SingletonStrategy();
61
- this.transientStrategy = new TransientStrategy();
62
- }
63
- }
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
+ })();
64
25
 
65
- export { InjectableManager };
26
+ export { Global, decorateGlobal };
package/dist/index24.js CHANGED
@@ -2,36 +2,30 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- class ObjectManager {
6
- use(e, t) {
7
- if (this.has(e)) {
8
- throw new Error(`A value is already registered with identifier '${String(e)}'.`);
9
- }
10
- this.objects.set(e, t);
11
- return t;
12
- }
13
- has(e) {
14
- return this.objects.has(e);
15
- }
16
- require(e) {
17
- if (!this.objects.has(e)) {
18
- throw new Error(`Injected object with identifier '${String(e)}' has not been registered.`);
19
- }
20
- return this.objects.get(e);
21
- }
22
- addGlobal(e, t) {
23
- if (this.globals.has(e)) {
24
- throw new Error(`Global value with key '${e}' has already been registered.`);
5
+ const reflection = require('./index34.js');
6
+ const parameterDecoratorFactory = require('./index17.js');
7
+ const helpers = require('./index25.js');
8
+ const resolverStore = require('./index35.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];
25
19
  }
26
- this.globals.set(e, t);
27
- }
28
- global(e) {
29
- return this.globals.get(e);
30
- }
31
- constructor(){
32
- this.objects = new Map();
33
- this.globals = new Map();
34
20
  }
35
- }
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
+ })();
36
30
 
37
- exports.ObjectManager = ObjectManager;
31
+ exports.Optional = Optional;
package/dist/index24.mjs CHANGED
@@ -1,33 +1,27 @@
1
- class ObjectManager {
2
- use(e, t) {
3
- if (this.has(e)) {
4
- throw new Error(`A value is already registered with identifier '${String(e)}'.`);
5
- }
6
- this.objects.set(e, t);
7
- return t;
8
- }
9
- has(e) {
10
- return this.objects.has(e);
11
- }
12
- require(e) {
13
- if (!this.objects.has(e)) {
14
- throw new Error(`Injected object with identifier '${String(e)}' has not been registered.`);
15
- }
16
- return this.objects.get(e);
17
- }
18
- addGlobal(e, t) {
19
- if (this.globals.has(e)) {
20
- throw new Error(`Global value with key '${e}' has already been registered.`);
1
+ import { getParamTypes, getOwnCustomMetadata } from './index34.mjs';
2
+ import { ParameterDecoratorFactory } from './index17.mjs';
3
+ import { getParamValueKey } from './index25.mjs';
4
+ import { ResolverStore } from './index35.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];
21
15
  }
22
- this.globals.set(e, t);
23
- }
24
- global(e) {
25
- return this.globals.get(e);
26
- }
27
- constructor(){
28
- this.objects = new Map();
29
- this.globals = new Map();
30
16
  }
31
- }
17
+ };
18
+ const Optional = (()=>{
19
+ ResolverStore.register('Optional', OptionalResolver);
20
+ return ParameterDecoratorFactory.create({
21
+ name: 'Optional',
22
+ valueType: 'map',
23
+ resolver: OptionalResolver
24
+ });
25
+ })();
32
26
 
33
- export { ObjectManager };
27
+ export { Optional };
package/dist/index25.js CHANGED
@@ -2,70 +2,32 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const core = require('@assemblerjs/core');
5
+ const reflection = require('./index34.js');
6
+ const parameterDecoratorFactory = require('./index17.js');
6
7
 
7
- class HookManager {
8
- prepareInitHook(e, t) {
9
- this.initCache.push({
10
- instance: e,
11
- configuration: t
12
- });
13
- return this.initCache;
14
- }
15
- callInitHooks(e) {
16
- for (const t of this.initCache){
17
- HookManager.callHookImmediate(t.instance, 'onInit', e, t.configuration);
18
- }
19
- }
20
- callInitedHooks(e) {
21
- for (const t of [
22
- ...this.initCache
23
- ].reverse()){
24
- HookManager.callHookImmediate(t.instance, 'onInited', e, t.configuration);
25
- }
26
- }
27
- clearCache() {
28
- this.initCache.length = 0;
29
- }
30
- getCache() {
31
- return this.initCache;
32
- }
33
- constructor(){
34
- this.initCache = [];
35
- }
36
- }
37
- HookManager.callHook = (t, i, o, n)=>{
38
- return new Promise((a, c)=>{
39
- const r = t[i];
40
- if (r) {
41
- if (core.isAsync(r)) {
42
- r.bind(t)(o, n).then(()=>{
43
- a();
44
- }).catch((e)=>{
45
- c(e);
46
- });
47
- return;
48
- }
49
- try {
50
- r.bind(t)(o, n);
51
- a();
52
- } catch (e) {
53
- c(e);
54
- }
55
- } else {
56
- a();
57
- }
58
- });
8
+ const getParamIndexKey = (e)=>{
9
+ return `assemblage:${e.toLowerCase()}.param.index`;
10
+ };
11
+ const getParamValueKey = (e)=>{
12
+ return `assemblage:${e.toLowerCase()}.param.value`;
13
+ };
14
+ const getParameterIndexes = (r, t)=>{
15
+ return reflection.getOwnCustomMetadata(getParamIndexKey(r), t) || [];
16
+ };
17
+ const getParameterValues = (r, t)=>{
18
+ return reflection.getOwnCustomMetadata(getParamValueKey(r), t);
59
19
  };
60
- HookManager.callHookImmediate = (t, i, o, n)=>{
61
- const a = t[i];
62
- if (a) {
63
- if (core.isAsync(a)) {
64
- a.bind(t)(o, n).catch(()=>{});
65
- return;
66
- }
67
- a.bind(t)(o, n);
20
+ const getDecoratedParametersIndexes = (e)=>{
21
+ const t = parameterDecoratorFactory.ParameterDecoratorFactory.getRegisteredDecorators();
22
+ const a = {};
23
+ for (const r of t){
24
+ a[r] = getParameterIndexes(r, e);
68
25
  }
26
+ return a;
69
27
  };
70
28
 
71
- exports.HookManager = HookManager;
29
+ exports.getDecoratedParametersIndexes = getDecoratedParametersIndexes;
30
+ exports.getParamIndexKey = getParamIndexKey;
31
+ exports.getParamValueKey = getParamValueKey;
32
+ exports.getParameterIndexes = getParameterIndexes;
33
+ exports.getParameterValues = getParameterValues;
package/dist/index25.mjs CHANGED
@@ -1,67 +1,25 @@
1
- import { isAsync } from '@assemblerjs/core';
1
+ import { getOwnCustomMetadata } from './index34.mjs';
2
+ import { ParameterDecoratorFactory } from './index17.mjs';
2
3
 
3
- class HookManager {
4
- prepareInitHook(e, t) {
5
- this.initCache.push({
6
- instance: e,
7
- configuration: t
8
- });
9
- return this.initCache;
10
- }
11
- callInitHooks(e) {
12
- for (const t of this.initCache){
13
- HookManager.callHookImmediate(t.instance, 'onInit', e, t.configuration);
14
- }
15
- }
16
- callInitedHooks(e) {
17
- for (const t of [
18
- ...this.initCache
19
- ].reverse()){
20
- HookManager.callHookImmediate(t.instance, 'onInited', e, t.configuration);
21
- }
22
- }
23
- clearCache() {
24
- this.initCache.length = 0;
25
- }
26
- getCache() {
27
- return this.initCache;
28
- }
29
- constructor(){
30
- this.initCache = [];
31
- }
32
- }
33
- HookManager.callHook = (t, i, o, n)=>{
34
- return new Promise((a, c)=>{
35
- const r = t[i];
36
- if (r) {
37
- if (isAsync(r)) {
38
- r.bind(t)(o, n).then(()=>{
39
- a();
40
- }).catch((e)=>{
41
- c(e);
42
- });
43
- return;
44
- }
45
- try {
46
- r.bind(t)(o, n);
47
- a();
48
- } catch (e) {
49
- c(e);
50
- }
51
- } else {
52
- a();
53
- }
54
- });
4
+ const getParamIndexKey = (e)=>{
5
+ return `assemblage:${e.toLowerCase()}.param.index`;
6
+ };
7
+ const getParamValueKey = (e)=>{
8
+ return `assemblage:${e.toLowerCase()}.param.value`;
9
+ };
10
+ const getParameterIndexes = (r, t)=>{
11
+ return getOwnCustomMetadata(getParamIndexKey(r), t) || [];
12
+ };
13
+ const getParameterValues = (r, t)=>{
14
+ return getOwnCustomMetadata(getParamValueKey(r), t);
55
15
  };
56
- HookManager.callHookImmediate = (t, i, o, n)=>{
57
- const a = t[i];
58
- if (a) {
59
- if (isAsync(a)) {
60
- a.bind(t)(o, n).catch(()=>{});
61
- return;
62
- }
63
- a.bind(t)(o, n);
16
+ const getDecoratedParametersIndexes = (e)=>{
17
+ const t = ParameterDecoratorFactory.getRegisteredDecorators();
18
+ const a = {};
19
+ for (const r of t){
20
+ a[r] = getParameterIndexes(r, e);
64
21
  }
22
+ return a;
65
23
  };
66
24
 
67
- export { HookManager };
25
+ export { getDecoratedParametersIndexes, getParamIndexKey, getParamValueKey, getParameterIndexes, getParameterValues };
package/dist/index26.js CHANGED
@@ -2,36 +2,52 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const hookManager = require('./index25.js');
6
- const schema = require('./index31.js');
5
+ const constants = require('./index28.js');
6
+ const reflection = require('./index34.js');
7
+ const helpers = require('./index25.js');
8
+ const parameterDecoratorFactory = require('./index17.js');
9
+ const decorator = require('./index2.js');
7
10
 
8
- class AssemblerBuilder {
9
- build(t, o) {
10
- schema.setDefinitionValue('singleton', true, t);
11
- const a = this.assembler.register([
12
- t
13
- ]);
14
- const r = this.assembler.require(a.identifier, o);
15
- const i = this.assembler.hookManager.getCache().find((e)=>e.instance === r);
16
- if (!i) {
17
- throw new Error('Root instance not found in assemblages cache.');
11
+ const createConstructorDecorator = (e)=>{
12
+ return (t)=>ConstructorDecorator(e, t);
13
+ };
14
+ const ConstructorDecorator = (m, i)=>(l)=>{
15
+ const p = class extends l {
16
+ constructor(...e){
17
+ super(...e);
18
+ if (m) m.call(this, i);
19
+ }
20
+ };
21
+ Object.defineProperty(p, 'name', {
22
+ value: l.name
23
+ });
24
+ const u = Reflect.getOwnMetadata(constants.ReflectParamTypes, l) || [];
25
+ const d = helpers.getDecoratedParametersIndexes(l);
26
+ const g = [];
27
+ const h = parameterDecoratorFactory.ParameterDecoratorFactory.getRegisteredDecorators();
28
+ for(let r = 0; r < u.length; r++){
29
+ let o = false;
30
+ for (const s of h){
31
+ if (d[s]?.includes(r)) {
32
+ const a = parameterDecoratorFactory.ParameterDecoratorFactory.getDecoratorHandler(s);
33
+ if (a) {
34
+ const e = reflection.getOwnCustomMetadata(helpers.getParamValueKey(s), l);
35
+ a(e[r], p, r);
36
+ } else {
37
+ const o = reflection.getOwnCustomMetadata(helpers.getParamIndexKey(s), l) || [];
38
+ o.push(r);
39
+ reflection.defineCustomMetadata(helpers.getParamIndexKey(s), o, p);
40
+ }
41
+ o = true;
42
+ break;
43
+ }
44
+ }
45
+ if (!o && u[r]) {
46
+ g.push(u[r]);
47
+ }
18
48
  }
19
- const n = this.assembler.hookManager.getCache().indexOf(i);
20
- this.assembler.hookManager.getCache().splice(n, 1);
21
- this.assembler.hookManager.callInitHooks(this.assembler.publicContext);
22
- const l = o ? {
23
- ...a.configuration,
24
- ...o
25
- } : a.configuration;
26
- hookManager.HookManager.callHookImmediate(r, 'onInit', this.assembler.publicContext, l);
27
- this.assembler.hookManager.callInitedHooks(this.assembler.publicContext);
28
- hookManager.HookManager.callHookImmediate(r, 'onInited', this.assembler.publicContext, l);
29
- this.assembler.hookManager.clearCache();
30
- return r;
31
- }
32
- constructor(e){
33
- this.assembler = e;
34
- }
35
- }
49
+ return decorator.decorateAssemblage(p, reflection.getOwnCustomMetadata(constants.ReflectValue.AssemblageDefinition, l));
50
+ };
36
51
 
37
- exports.AssemblerBuilder = AssemblerBuilder;
52
+ exports.ConstructorDecorator = ConstructorDecorator;
53
+ exports.createConstructorDecorator = createConstructorDecorator;
package/dist/index26.mjs CHANGED
@@ -1,33 +1,48 @@
1
- import { HookManager } from './index25.mjs';
2
- import { setDefinitionValue } from './index31.mjs';
1
+ import { ReflectParamTypes, ReflectValue } from './index28.mjs';
2
+ import { getOwnCustomMetadata, defineCustomMetadata } from './index34.mjs';
3
+ import { getDecoratedParametersIndexes, getParamValueKey, getParamIndexKey } from './index25.mjs';
4
+ import { ParameterDecoratorFactory } from './index17.mjs';
5
+ import { decorateAssemblage } from './index2.mjs';
3
6
 
4
- class AssemblerBuilder {
5
- build(t, o) {
6
- setDefinitionValue('singleton', true, t);
7
- const a = this.assembler.register([
8
- t
9
- ]);
10
- const r = this.assembler.require(a.identifier, o);
11
- const i = this.assembler.hookManager.getCache().find((e)=>e.instance === r);
12
- if (!i) {
13
- throw new Error('Root instance not found in assemblages cache.');
7
+ const createConstructorDecorator = (e)=>{
8
+ return (t)=>ConstructorDecorator(e, t);
9
+ };
10
+ const ConstructorDecorator = (m, i)=>(l)=>{
11
+ const p = class extends l {
12
+ constructor(...e){
13
+ super(...e);
14
+ if (m) m.call(this, i);
15
+ }
16
+ };
17
+ Object.defineProperty(p, 'name', {
18
+ value: l.name
19
+ });
20
+ const u = Reflect.getOwnMetadata(ReflectParamTypes, l) || [];
21
+ const d = getDecoratedParametersIndexes(l);
22
+ const g = [];
23
+ const h = ParameterDecoratorFactory.getRegisteredDecorators();
24
+ for(let r = 0; r < u.length; r++){
25
+ let o = false;
26
+ for (const s of h){
27
+ if (d[s]?.includes(r)) {
28
+ const a = ParameterDecoratorFactory.getDecoratorHandler(s);
29
+ if (a) {
30
+ const e = getOwnCustomMetadata(getParamValueKey(s), l);
31
+ a(e[r], p, r);
32
+ } else {
33
+ const o = getOwnCustomMetadata(getParamIndexKey(s), l) || [];
34
+ o.push(r);
35
+ defineCustomMetadata(getParamIndexKey(s), o, p);
36
+ }
37
+ o = true;
38
+ break;
39
+ }
40
+ }
41
+ if (!o && u[r]) {
42
+ g.push(u[r]);
43
+ }
14
44
  }
15
- const n = this.assembler.hookManager.getCache().indexOf(i);
16
- this.assembler.hookManager.getCache().splice(n, 1);
17
- this.assembler.hookManager.callInitHooks(this.assembler.publicContext);
18
- const l = o ? {
19
- ...a.configuration,
20
- ...o
21
- } : a.configuration;
22
- HookManager.callHookImmediate(r, 'onInit', this.assembler.publicContext, l);
23
- this.assembler.hookManager.callInitedHooks(this.assembler.publicContext);
24
- HookManager.callHookImmediate(r, 'onInited', this.assembler.publicContext, l);
25
- this.assembler.hookManager.clearCache();
26
- return r;
27
- }
28
- constructor(e){
29
- this.assembler = e;
30
- }
31
- }
45
+ return decorateAssemblage(p, getOwnCustomMetadata(ReflectValue.AssemblageDefinition, l));
46
+ };
32
47
 
33
- export { AssemblerBuilder };
48
+ export { ConstructorDecorator, createConstructorDecorator };
package/dist/index27.js CHANGED
@@ -1,37 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
+ const Reflect = require('./index44.js');
4
4
 
5
- class ContextProvider {
6
- createPublicContext() {
7
- return {
8
- has: this.assembler.has.bind(this.assembler),
9
- require: this.assembler.require.bind(this.assembler),
10
- concrete: this.assembler.concrete.bind(this.assembler),
11
- tagged: this.assembler.tagged.bind(this.assembler),
12
- dispose: this.assembler.dispose.bind(this.assembler),
13
- global: this.assembler.global.bind(this.assembler),
14
- on: this.assembler.on.bind(this.assembler),
15
- once: this.assembler.once.bind(this.assembler),
16
- off: this.assembler.off.bind(this.assembler),
17
- events: this.assembler.channels
18
- };
19
- }
20
- createPrivateContext(s) {
21
- return {
22
- ...s,
23
- register: this.assembler.register.bind(this.assembler),
24
- use: this.assembler.use.bind(this.assembler),
25
- addGlobal: this.assembler.addGlobal.bind(this.assembler),
26
- prepareInitHook: this.assembler.prepareInitHook.bind(this.assembler),
27
- emit: this.assembler.emit.bind(this.assembler),
28
- addChannels: this.assembler.addChannels.bind(this.assembler),
29
- removeChannels: this.assembler.removeChannels.bind(this.assembler)
30
- };
31
- }
32
- constructor(s){
33
- this.assembler = s;
34
- }
35
- }
36
-
37
- exports.ContextProvider = ContextProvider;
5
+ Reflect.__require();
package/dist/index27.mjs CHANGED
@@ -1,33 +1,3 @@
1
- class ContextProvider {
2
- createPublicContext() {
3
- return {
4
- has: this.assembler.has.bind(this.assembler),
5
- require: this.assembler.require.bind(this.assembler),
6
- concrete: this.assembler.concrete.bind(this.assembler),
7
- tagged: this.assembler.tagged.bind(this.assembler),
8
- dispose: this.assembler.dispose.bind(this.assembler),
9
- global: this.assembler.global.bind(this.assembler),
10
- on: this.assembler.on.bind(this.assembler),
11
- once: this.assembler.once.bind(this.assembler),
12
- off: this.assembler.off.bind(this.assembler),
13
- events: this.assembler.channels
14
- };
15
- }
16
- createPrivateContext(s) {
17
- return {
18
- ...s,
19
- register: this.assembler.register.bind(this.assembler),
20
- use: this.assembler.use.bind(this.assembler),
21
- addGlobal: this.assembler.addGlobal.bind(this.assembler),
22
- prepareInitHook: this.assembler.prepareInitHook.bind(this.assembler),
23
- emit: this.assembler.emit.bind(this.assembler),
24
- addChannels: this.assembler.addChannels.bind(this.assembler),
25
- removeChannels: this.assembler.removeChannels.bind(this.assembler)
26
- };
27
- }
28
- constructor(s){
29
- this.assembler = s;
30
- }
31
- }
1
+ import { __require as require_Reflect } from './index44.mjs';
32
2
 
33
- export { ContextProvider };
3
+ require_Reflect();