assemblerjs 1.1.17 → 1.1.19

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 (58) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/index13.js +97 -82
  3. package/dist/index13.mjs +97 -82
  4. package/dist/index18.js +1 -1
  5. package/dist/index18.mjs +1 -1
  6. package/dist/index19.js +1 -1
  7. package/dist/index19.mjs +1 -1
  8. package/dist/index20.js +1 -1
  9. package/dist/index20.mjs +1 -1
  10. package/dist/index21.js +1 -1
  11. package/dist/index21.mjs +1 -1
  12. package/dist/index22.js +1 -1
  13. package/dist/index22.mjs +1 -1
  14. package/dist/index23.js +1 -1
  15. package/dist/index23.mjs +1 -1
  16. package/dist/index24.js +1 -1
  17. package/dist/index24.mjs +1 -1
  18. package/dist/index27.js +1 -1
  19. package/dist/index27.mjs +1 -1
  20. package/dist/index31.js +100 -35
  21. package/dist/index31.mjs +100 -34
  22. package/dist/index32.js +24 -101
  23. package/dist/index32.mjs +24 -101
  24. package/dist/index33.js +152 -22
  25. package/dist/index33.mjs +151 -22
  26. package/dist/index34.js +44 -16
  27. package/dist/index34.mjs +44 -16
  28. package/dist/index35.js +66 -145
  29. package/dist/index35.mjs +67 -145
  30. package/dist/index36.js +50 -45
  31. package/dist/index36.mjs +50 -45
  32. package/dist/index37.js +28 -76
  33. package/dist/index37.mjs +28 -76
  34. package/dist/index38.js +161 -50
  35. package/dist/index38.mjs +161 -50
  36. package/dist/index39.js +60 -28
  37. package/dist/index39.mjs +60 -28
  38. package/dist/index4.js +7 -7
  39. package/dist/index4.mjs +7 -7
  40. package/dist/index40.js +32 -158
  41. package/dist/index40.mjs +31 -158
  42. package/dist/index41.js +16 -57
  43. package/dist/index41.mjs +16 -57
  44. package/dist/index44.js +28 -941
  45. package/dist/index44.mjs +27 -941
  46. package/dist/index45.js +194 -2
  47. package/dist/index45.mjs +194 -2
  48. package/dist/index46.js +942 -2
  49. package/dist/index46.mjs +942 -2
  50. package/dist/index47.js +2 -29
  51. package/dist/index47.mjs +2 -28
  52. package/dist/index48.js +2 -194
  53. package/dist/index48.mjs +2 -194
  54. package/dist/index49.js +1 -1
  55. package/dist/index49.mjs +1 -1
  56. package/dist/index50.js +2 -2
  57. package/dist/index50.mjs +2 -2
  58. package/package.json +1 -1
package/dist/index41.js CHANGED
@@ -2,68 +2,27 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- let AbstractCycleDetector = class AbstractCycleDetector {
6
- };
7
- let NoOpCycleDetector = class NoOpCycleDetector extends AbstractCycleDetector {
8
- detect() {
9
- return [];
5
+ class ResolverStore {
6
+ static register(e, r) {
7
+ this.resolvers.set(e, r);
10
8
  }
11
- };
12
- let ActiveCycleDetector = class ActiveCycleDetector extends AbstractCycleDetector {
13
- detect(e, t) {
14
- const c = [];
15
- const s = new Set();
16
- for (const [n] of e){
17
- if (s.has(n)) continue;
18
- const r = [];
19
- const o = new Set();
20
- if (this.hasCycleDFS(n, r, o, s, e)) {
21
- const e = r.findIndex((e)=>e === n);
22
- if (e >= 0) {
23
- const s = r.slice(e).map((e)=>t(e));
24
- c.push({
25
- cycle: s,
26
- path: s.join(' → ')
27
- });
28
- }
29
- }
9
+ static getResolver(e) {
10
+ const r = this.resolvers.get(e);
11
+ if (!r) {
12
+ throw new Error(`No resolver found for decorator type: ${e}`);
30
13
  }
31
- return c;
14
+ return new r();
32
15
  }
33
- hasCycleDFS(e, t, c, s, n) {
34
- if (c.has(e)) {
35
- t.push(e);
36
- return true;
37
- }
38
- if (s.has(e)) {
39
- return false;
40
- }
41
- t.push(e);
42
- c.add(e);
43
- const r = n.get(e);
44
- if (r?.dependencies && r.dependencies.length > 0) {
45
- for (const e of r.dependencies){
46
- if (this.hasCycleDFS(e, t, c, s, n)) {
47
- return true;
48
- }
49
- }
50
- }
51
- c.delete(e);
52
- s.add(e);
53
- return false;
54
- }
55
- };
56
- class CycleDetector {
57
- static getInstance() {
58
- return CycleDetector.instance;
16
+ static hasResolver(e) {
17
+ return this.resolvers.has(e);
59
18
  }
60
- static enable() {
61
- CycleDetector.instance = new ActiveCycleDetector();
19
+ static getRegisteredTypes() {
20
+ return Array.from(this.resolvers.keys());
62
21
  }
63
- static disable() {
64
- CycleDetector.instance = new NoOpCycleDetector();
22
+ static clear() {
23
+ this.resolvers.clear();
65
24
  }
66
25
  }
67
- CycleDetector.instance = new NoOpCycleDetector();
26
+ ResolverStore.resolvers = new Map();
68
27
 
69
- exports.CycleDetector = CycleDetector;
28
+ exports.ResolverStore = ResolverStore;
package/dist/index41.mjs CHANGED
@@ -1,65 +1,24 @@
1
- let AbstractCycleDetector = class AbstractCycleDetector {
2
- };
3
- let NoOpCycleDetector = class NoOpCycleDetector extends AbstractCycleDetector {
4
- detect() {
5
- return [];
1
+ class ResolverStore {
2
+ static register(e, r) {
3
+ this.resolvers.set(e, r);
6
4
  }
7
- };
8
- let ActiveCycleDetector = class ActiveCycleDetector extends AbstractCycleDetector {
9
- detect(e, t) {
10
- const c = [];
11
- const s = new Set();
12
- for (const [n] of e){
13
- if (s.has(n)) continue;
14
- const r = [];
15
- const o = new Set();
16
- if (this.hasCycleDFS(n, r, o, s, e)) {
17
- const e = r.findIndex((e)=>e === n);
18
- if (e >= 0) {
19
- const s = r.slice(e).map((e)=>t(e));
20
- c.push({
21
- cycle: s,
22
- path: s.join(' → ')
23
- });
24
- }
25
- }
5
+ static getResolver(e) {
6
+ const r = this.resolvers.get(e);
7
+ if (!r) {
8
+ throw new Error(`No resolver found for decorator type: ${e}`);
26
9
  }
27
- return c;
10
+ return new r();
28
11
  }
29
- hasCycleDFS(e, t, c, s, n) {
30
- if (c.has(e)) {
31
- t.push(e);
32
- return true;
33
- }
34
- if (s.has(e)) {
35
- return false;
36
- }
37
- t.push(e);
38
- c.add(e);
39
- const r = n.get(e);
40
- if (r?.dependencies && r.dependencies.length > 0) {
41
- for (const e of r.dependencies){
42
- if (this.hasCycleDFS(e, t, c, s, n)) {
43
- return true;
44
- }
45
- }
46
- }
47
- c.delete(e);
48
- s.add(e);
49
- return false;
50
- }
51
- };
52
- class CycleDetector {
53
- static getInstance() {
54
- return CycleDetector.instance;
12
+ static hasResolver(e) {
13
+ return this.resolvers.has(e);
55
14
  }
56
- static enable() {
57
- CycleDetector.instance = new ActiveCycleDetector();
15
+ static getRegisteredTypes() {
16
+ return Array.from(this.resolvers.keys());
58
17
  }
59
- static disable() {
60
- CycleDetector.instance = new NoOpCycleDetector();
18
+ static clear() {
19
+ this.resolvers.clear();
61
20
  }
62
21
  }
63
- CycleDetector.instance = new NoOpCycleDetector();
22
+ ResolverStore.resolvers = new Map();
64
23
 
65
- export { CycleDetector };
24
+ export { ResolverStore };