@layerzerolabs/dependency-graph 0.2.67 → 0.2.68

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.
@@ -11,17 +11,17 @@
11
11
  CLI Cleaning output folder
12
12
  CJS Build start
13
13
  ESM Build start
14
- ESM dist/dependencyNode.js 133.00 B
15
- ESM dist/index.js 115.00 B
16
- ESM dist/EYJTCMSL.js 472.00 B
17
- ESM dist/dependencyNode.js.map 78.00 B
18
- ESM dist/index.js.map 69.00 B
19
- ESM dist/EYJTCMSL.js.map 1.55 KB
20
- ESM ⚡️ Build success in 164ms
21
- CJS dist/dependencyNode.cjs 285.00 B
22
- CJS dist/GTEKUOS6.cjs 503.00 B
23
- CJS dist/index.cjs 267.00 B
14
+ CJS dist/dependencyNode.cjs 426.00 B
15
+ CJS dist/4LBVNANM.cjs 1007.00 B
16
+ CJS dist/index.cjs 408.00 B
24
17
  CJS dist/dependencyNode.cjs.map 79.00 B
25
18
  CJS dist/index.cjs.map 70.00 B
26
- CJS dist/GTEKUOS6.cjs.map 1.55 KB
27
- CJS ⚡️ Build success in 164ms
19
+ CJS dist/4LBVNANM.cjs.map 3.01 KB
20
+ CJS ⚡️ Build success in 82ms
21
+ ESM dist/index.js 133.00 B
22
+ ESM dist/dependencyNode.js 151.00 B
23
+ ESM dist/WWFEJOTN.js 949.00 B
24
+ ESM dist/index.js.map 69.00 B
25
+ ESM dist/WWFEJOTN.js.map 3.01 KB
26
+ ESM dist/dependencyNode.js.map 78.00 B
27
+ ESM ⚡️ Build success in 82ms
@@ -2,7 +2,7 @@
2
2
  > @layerzerolabs/dependency-graph@0.0.2 lint /home/runner/work/monorepo-internal/monorepo-internal/packages/framework/dependency-graph
3
3
  > eslint . --max-warnings 0 || (eslint . --fix --max-warnings 0 && false)
4
4
 
5
- (node:67254) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file:///home/runner/work/monorepo-internal/monorepo-internal/eslint.config.js?mtime=1775694520701 is not specified and it doesn't parse as CommonJS.
5
+ (node:66125) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file:///home/runner/work/monorepo-internal/monorepo-internal/eslint.config.js?mtime=1775777605148 is not specified and it doesn't parse as CommonJS.
6
6
  Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
7
7
  To eliminate this warning, add "type": "module" to /home/runner/work/monorepo-internal/monorepo-internal/package.json.
8
8
  (Use `node --trace-warnings ...` to show where the warning was created)
@@ -0,0 +1,37 @@
1
+ 'use strict';
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
+
6
+ // src/dependencyNode.ts
7
+ var DependencyNode = class {
8
+ static {
9
+ __name(this, "DependencyNode");
10
+ }
11
+ name;
12
+ dependencies;
13
+ constructor({ name, dependencies = {} }) {
14
+ this.name = name;
15
+ this.dependencies = dependencies;
16
+ }
17
+ };
18
+ var withDependencies = /* @__PURE__ */ __name((node, extraDeps) => {
19
+ const mergedDeps = {
20
+ ...node.dependencies,
21
+ ...Object.fromEntries(extraDeps.map((dep, i) => [
22
+ `__extra${i}`,
23
+ dep
24
+ ]))
25
+ };
26
+ const descriptors = Object.getOwnPropertyDescriptors(node);
27
+ descriptors.dependencies = {
28
+ ...descriptors.dependencies,
29
+ value: mergedDeps
30
+ };
31
+ return Object.create(Object.getPrototypeOf(node), descriptors);
32
+ }, "withDependencies");
33
+
34
+ exports.DependencyNode = DependencyNode;
35
+ exports.withDependencies = withDependencies;
36
+ //# sourceMappingURL=4LBVNANM.cjs.map
37
+ //# sourceMappingURL=4LBVNANM.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/dependencyNode.ts"],"names":["DependencyNode","name","dependencies","withDependencies","node","extraDeps","mergedDeps","Object","fromEntries","map","dep","i","descriptors","getOwnPropertyDescriptors","value","create","getPrototypeOf"],"mappings":";;;;;;AAUO,IAAeA,iBAAf,MAAeA;EAVtB;;;AAcoBC,EAAAA,IAAAA;AACAC,EAAAA,YAAAA;AAChB,EAAA,WAAA,CAAY,EACRD,IAAAA,EACAC,YAAAA,GAAe,IAAmB,EAInC;AACC,IAAA,IAAA,CAAKD,IAAAA,GAAOA,IAAAA;AACZ,IAAA,IAAA,CAAKC,YAAAA,GAAeA,YAAAA;AACxB,EAAA;AACJ;AAQO,IAAMC,gBAAAA,mBAAmB,MAAA,CAAA,CAI5BC,IAAAA,EACAC,SAAAA,KAAAA;AAEA,EAAA,MAAMC,UAAAA,GAAa;AACf,IAAA,GAAGF,IAAAA,CAAKF,YAAAA;AACR,IAAA,GAAGK,OAAOC,WAAAA,CAAYH,SAAAA,CAAUI,GAAAA,CAAI,CAACC,KAAKC,CAAAA,KAAM;AAAC,MAAA,CAAA,OAAA,EAAUA,CAAAA,CAAAA,CAAAA;AAAKD,MAAAA;KAAI,CAAA;AACxE,GAAA;AACA,EAAA,MAAME,WAAAA,GAAqCL,MAAAA,CAAOM,yBAAAA,CAA0BT,IAAAA,CAAAA;AAC5EQ,EAAAA,WAAAA,CAAYV,YAAAA,GAAe;AAAE,IAAA,GAAGU,WAAAA,CAAYV,YAAAA;IAAcY,KAAAA,EAAOR;AAAW,GAAA;AAC5E,EAAA,OAAOC,OAAOQ,MAAAA,CAAOR,MAAAA,CAAOS,cAAAA,CAAeZ,IAAAA,GAAOQ,WAAAA,CAAAA;AACtD,CAAA,EAdgC,kBAAA","file":"4LBVNANM.cjs","sourcesContent":["/**\n * <!-- anchor:DependencyNode -->\n * Dependency nodes are abstract nodes in the dependency graph. They're used to build the graph,\n * but as an abstract class, lacks the required information to actually be resolved to anything.\n * If you want to implement a new dependency node, see ObjectDefinition or FactoryDefinition\n * @param name the name of this node. It should be unique across the entire graph.\n * @param dependencies a map of other nodes that this node depends on. These children will be resolved first.\n * The key of the dependencies map should be some arbitrary name within the context of *this* node. It does\n * not have to be unique.\n */\nexport abstract class DependencyNode<\n Name extends string = string,\n _Dependencies extends Dependencies = Dependencies,\n> {\n public readonly name: Name;\n public readonly dependencies: _Dependencies;\n constructor({\n name,\n dependencies = {} as _Dependencies,\n }: {\n name: Name;\n dependencies?: _Dependencies;\n }) {\n this.name = name;\n this.dependencies = dependencies;\n }\n}\n\nexport type Dependencies = { [key: string]: DependencyNode<any, any> };\n\ntype IndexedDeps<Extra extends readonly DependencyNode[]> = {\n [K in keyof Extra as K extends `${number}` ? `__extra${K}` : never]: Extra[K];\n};\n\nexport const withDependencies = <\n N extends DependencyNode,\n const Extra extends readonly DependencyNode[],\n>(\n node: N,\n extraDeps: Extra,\n): N & { dependencies: N['dependencies'] & IndexedDeps<Extra> } => {\n const mergedDeps = {\n ...node.dependencies,\n ...Object.fromEntries(extraDeps.map((dep, i) => [`__extra${i}`, dep])),\n };\n const descriptors: PropertyDescriptorMap = Object.getOwnPropertyDescriptors(node);\n descriptors.dependencies = { ...descriptors.dependencies, value: mergedDeps };\n return Object.create(Object.getPrototypeOf(node), descriptors);\n};\n"]}
@@ -0,0 +1,34 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+
4
+ // src/dependencyNode.ts
5
+ var DependencyNode = class {
6
+ static {
7
+ __name(this, "DependencyNode");
8
+ }
9
+ name;
10
+ dependencies;
11
+ constructor({ name, dependencies = {} }) {
12
+ this.name = name;
13
+ this.dependencies = dependencies;
14
+ }
15
+ };
16
+ var withDependencies = /* @__PURE__ */ __name((node, extraDeps) => {
17
+ const mergedDeps = {
18
+ ...node.dependencies,
19
+ ...Object.fromEntries(extraDeps.map((dep, i) => [
20
+ `__extra${i}`,
21
+ dep
22
+ ]))
23
+ };
24
+ const descriptors = Object.getOwnPropertyDescriptors(node);
25
+ descriptors.dependencies = {
26
+ ...descriptors.dependencies,
27
+ value: mergedDeps
28
+ };
29
+ return Object.create(Object.getPrototypeOf(node), descriptors);
30
+ }, "withDependencies");
31
+
32
+ export { DependencyNode, withDependencies };
33
+ //# sourceMappingURL=WWFEJOTN.js.map
34
+ //# sourceMappingURL=WWFEJOTN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/dependencyNode.ts"],"names":["DependencyNode","name","dependencies","withDependencies","node","extraDeps","mergedDeps","Object","fromEntries","map","dep","i","descriptors","getOwnPropertyDescriptors","value","create","getPrototypeOf"],"mappings":";;;;AAUO,IAAeA,iBAAf,MAAeA;EAVtB;;;AAcoBC,EAAAA,IAAAA;AACAC,EAAAA,YAAAA;AAChB,EAAA,WAAA,CAAY,EACRD,IAAAA,EACAC,YAAAA,GAAe,IAAmB,EAInC;AACC,IAAA,IAAA,CAAKD,IAAAA,GAAOA,IAAAA;AACZ,IAAA,IAAA,CAAKC,YAAAA,GAAeA,YAAAA;AACxB,EAAA;AACJ;AAQO,IAAMC,gBAAAA,mBAAmB,MAAA,CAAA,CAI5BC,IAAAA,EACAC,SAAAA,KAAAA;AAEA,EAAA,MAAMC,UAAAA,GAAa;AACf,IAAA,GAAGF,IAAAA,CAAKF,YAAAA;AACR,IAAA,GAAGK,OAAOC,WAAAA,CAAYH,SAAAA,CAAUI,GAAAA,CAAI,CAACC,KAAKC,CAAAA,KAAM;AAAC,MAAA,CAAA,OAAA,EAAUA,CAAAA,CAAAA,CAAAA;AAAKD,MAAAA;KAAI,CAAA;AACxE,GAAA;AACA,EAAA,MAAME,WAAAA,GAAqCL,MAAAA,CAAOM,yBAAAA,CAA0BT,IAAAA,CAAAA;AAC5EQ,EAAAA,WAAAA,CAAYV,YAAAA,GAAe;AAAE,IAAA,GAAGU,WAAAA,CAAYV,YAAAA;IAAcY,KAAAA,EAAOR;AAAW,GAAA;AAC5E,EAAA,OAAOC,OAAOQ,MAAAA,CAAOR,MAAAA,CAAOS,cAAAA,CAAeZ,IAAAA,GAAOQ,WAAAA,CAAAA;AACtD,CAAA,EAdgC,kBAAA","file":"WWFEJOTN.js","sourcesContent":["/**\n * <!-- anchor:DependencyNode -->\n * Dependency nodes are abstract nodes in the dependency graph. They're used to build the graph,\n * but as an abstract class, lacks the required information to actually be resolved to anything.\n * If you want to implement a new dependency node, see ObjectDefinition or FactoryDefinition\n * @param name the name of this node. It should be unique across the entire graph.\n * @param dependencies a map of other nodes that this node depends on. These children will be resolved first.\n * The key of the dependencies map should be some arbitrary name within the context of *this* node. It does\n * not have to be unique.\n */\nexport abstract class DependencyNode<\n Name extends string = string,\n _Dependencies extends Dependencies = Dependencies,\n> {\n public readonly name: Name;\n public readonly dependencies: _Dependencies;\n constructor({\n name,\n dependencies = {} as _Dependencies,\n }: {\n name: Name;\n dependencies?: _Dependencies;\n }) {\n this.name = name;\n this.dependencies = dependencies;\n }\n}\n\nexport type Dependencies = { [key: string]: DependencyNode<any, any> };\n\ntype IndexedDeps<Extra extends readonly DependencyNode[]> = {\n [K in keyof Extra as K extends `${number}` ? `__extra${K}` : never]: Extra[K];\n};\n\nexport const withDependencies = <\n N extends DependencyNode,\n const Extra extends readonly DependencyNode[],\n>(\n node: N,\n extraDeps: Extra,\n): N & { dependencies: N['dependencies'] & IndexedDeps<Extra> } => {\n const mergedDeps = {\n ...node.dependencies,\n ...Object.fromEntries(extraDeps.map((dep, i) => [`__extra${i}`, dep])),\n };\n const descriptors: PropertyDescriptorMap = Object.getOwnPropertyDescriptors(node);\n descriptors.dependencies = { ...descriptors.dependencies, value: mergedDeps };\n return Object.create(Object.getPrototypeOf(node), descriptors);\n};\n"]}
@@ -1,12 +1,16 @@
1
1
  'use strict';
2
2
 
3
- var GTEKUOS6_cjs = require('./GTEKUOS6.cjs');
3
+ var _4LBVNANM_cjs = require('./4LBVNANM.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "DependencyNode", {
8
8
  enumerable: true,
9
- get: function () { return GTEKUOS6_cjs.DependencyNode; }
9
+ get: function () { return _4LBVNANM_cjs.DependencyNode; }
10
+ });
11
+ Object.defineProperty(exports, "withDependencies", {
12
+ enumerable: true,
13
+ get: function () { return _4LBVNANM_cjs.withDependencies; }
10
14
  });
11
15
  //# sourceMappingURL=dependencyNode.cjs.map
12
16
  //# sourceMappingURL=dependencyNode.cjs.map
@@ -19,4 +19,11 @@ export declare abstract class DependencyNode<Name extends string = string, _Depe
19
19
  export type Dependencies = {
20
20
  [key: string]: DependencyNode<any, any>;
21
21
  };
22
+ type IndexedDeps<Extra extends readonly DependencyNode[]> = {
23
+ [K in keyof Extra as K extends `${number}` ? `__extra${K}` : never]: Extra[K];
24
+ };
25
+ export declare const withDependencies: <N extends DependencyNode, const Extra extends readonly DependencyNode[]>(node: N, extraDeps: Extra) => N & {
26
+ dependencies: N["dependencies"] & IndexedDeps<Extra>;
27
+ };
28
+ export {};
22
29
  //# sourceMappingURL=dependencyNode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dependencyNode.d.ts","sourceRoot":"","sources":["../src/dependencyNode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,8BAAsB,cAAc,CAChC,IAAI,SAAS,MAAM,GAAG,MAAM,EAC5B,aAAa,SAAS,YAAY,GAAG,YAAY;IAEjD,SAAgB,IAAI,EAAE,IAAI,CAAC;IAC3B,SAAgB,YAAY,EAAE,aAAa,CAAC;gBAChC,EACR,IAAI,EACJ,YAAkC,GACrC,EAAE;QACC,IAAI,EAAE,IAAI,CAAC;QACX,YAAY,CAAC,EAAE,aAAa,CAAC;KAChC;CAIJ;AAED,MAAM,MAAM,YAAY,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;CAAE,CAAC"}
1
+ {"version":3,"file":"dependencyNode.d.ts","sourceRoot":"","sources":["../src/dependencyNode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,8BAAsB,cAAc,CAChC,IAAI,SAAS,MAAM,GAAG,MAAM,EAC5B,aAAa,SAAS,YAAY,GAAG,YAAY;IAEjD,SAAgB,IAAI,EAAE,IAAI,CAAC;IAC3B,SAAgB,YAAY,EAAE,aAAa,CAAC;gBAChC,EACR,IAAI,EACJ,YAAkC,GACrC,EAAE;QACC,IAAI,EAAE,IAAI,CAAC;QACX,YAAY,CAAC,EAAE,aAAa,CAAC;KAChC;CAIJ;AAED,MAAM,MAAM,YAAY,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;CAAE,CAAC;AAEvE,KAAK,WAAW,CAAC,KAAK,SAAS,SAAS,cAAc,EAAE,IAAI;KACvD,CAAC,IAAI,MAAM,KAAK,IAAI,CAAC,SAAS,GAAG,MAAM,EAAE,GAAG,UAAU,CAAC,EAAE,GAAG,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC;CAChF,CAAC;AAEF,eAAO,MAAM,gBAAgB,GACzB,CAAC,SAAS,cAAc,EACxB,KAAK,CAAC,KAAK,SAAS,SAAS,cAAc,EAAE,EAE7C,MAAM,CAAC,EACP,WAAW,KAAK,KACjB,CAAC,GAAG;IAAE,YAAY,EAAE,CAAC,CAAC,cAAc,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,CAAA;CAQ5D,CAAC"}
@@ -1,3 +1,3 @@
1
- export { DependencyNode } from './EYJTCMSL.js';
1
+ export { DependencyNode, withDependencies } from './WWFEJOTN.js';
2
2
  //# sourceMappingURL=dependencyNode.js.map
3
3
  //# sourceMappingURL=dependencyNode.js.map
package/dist/index.cjs CHANGED
@@ -1,12 +1,16 @@
1
1
  'use strict';
2
2
 
3
- var GTEKUOS6_cjs = require('./GTEKUOS6.cjs');
3
+ var _4LBVNANM_cjs = require('./4LBVNANM.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "DependencyNode", {
8
8
  enumerable: true,
9
- get: function () { return GTEKUOS6_cjs.DependencyNode; }
9
+ get: function () { return _4LBVNANM_cjs.DependencyNode; }
10
+ });
11
+ Object.defineProperty(exports, "withDependencies", {
12
+ enumerable: true,
13
+ get: function () { return _4LBVNANM_cjs.withDependencies; }
10
14
  });
11
15
  //# sourceMappingURL=index.cjs.map
12
16
  //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- export { DependencyNode } from './EYJTCMSL.js';
1
+ export { DependencyNode, withDependencies } from './WWFEJOTN.js';
2
2
  //# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@layerzerolabs/dependency-graph",
3
- "version": "0.2.67",
3
+ "version": "0.2.68",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -15,8 +15,8 @@
15
15
  "types": "./dist/index.d.ts",
16
16
  "devDependencies": {
17
17
  "tsup": "^8.4.0",
18
- "@layerzerolabs/tsup-configuration": "0.2.67",
19
- "@layerzerolabs/typescript-configuration": "0.2.67"
18
+ "@layerzerolabs/tsup-configuration": "0.2.68",
19
+ "@layerzerolabs/typescript-configuration": "0.2.68"
20
20
  },
21
21
  "publishConfig": {
22
22
  "access": "public",
@@ -27,3 +27,23 @@ export abstract class DependencyNode<
27
27
  }
28
28
 
29
29
  export type Dependencies = { [key: string]: DependencyNode<any, any> };
30
+
31
+ type IndexedDeps<Extra extends readonly DependencyNode[]> = {
32
+ [K in keyof Extra as K extends `${number}` ? `__extra${K}` : never]: Extra[K];
33
+ };
34
+
35
+ export const withDependencies = <
36
+ N extends DependencyNode,
37
+ const Extra extends readonly DependencyNode[],
38
+ >(
39
+ node: N,
40
+ extraDeps: Extra,
41
+ ): N & { dependencies: N['dependencies'] & IndexedDeps<Extra> } => {
42
+ const mergedDeps = {
43
+ ...node.dependencies,
44
+ ...Object.fromEntries(extraDeps.map((dep, i) => [`__extra${i}`, dep])),
45
+ };
46
+ const descriptors: PropertyDescriptorMap = Object.getOwnPropertyDescriptors(node);
47
+ descriptors.dependencies = { ...descriptors.dependencies, value: mergedDeps };
48
+ return Object.create(Object.getPrototypeOf(node), descriptors);
49
+ };
package/dist/EYJTCMSL.js DELETED
@@ -1,19 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
- // src/dependencyNode.ts
5
- var DependencyNode = class {
6
- static {
7
- __name(this, "DependencyNode");
8
- }
9
- name;
10
- dependencies;
11
- constructor({ name, dependencies = {} }) {
12
- this.name = name;
13
- this.dependencies = dependencies;
14
- }
15
- };
16
-
17
- export { DependencyNode };
18
- //# sourceMappingURL=EYJTCMSL.js.map
19
- //# sourceMappingURL=EYJTCMSL.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/dependencyNode.ts"],"names":["DependencyNode","name","dependencies"],"mappings":";;;;AAUO,IAAeA,iBAAf,MAAeA;EAVtB;;;AAcoBC,EAAAA,IAAAA;AACAC,EAAAA,YAAAA;AAChB,EAAA,WAAA,CAAY,EACRD,IAAAA,EACAC,YAAAA,GAAe,IAAmB,EAInC;AACC,IAAA,IAAA,CAAKD,IAAAA,GAAOA,IAAAA;AACZ,IAAA,IAAA,CAAKC,YAAAA,GAAeA,YAAAA;AACxB,EAAA;AACJ","file":"EYJTCMSL.js","sourcesContent":["/**\n * <!-- anchor:DependencyNode -->\n * Dependency nodes are abstract nodes in the dependency graph. They're used to build the graph,\n * but as an abstract class, lacks the required information to actually be resolved to anything.\n * If you want to implement a new dependency node, see ObjectDefinition or FactoryDefinition\n * @param name the name of this node. It should be unique across the entire graph.\n * @param dependencies a map of other nodes that this node depends on. These children will be resolved first.\n * The key of the dependencies map should be some arbitrary name within the context of *this* node. It does\n * not have to be unique.\n */\nexport abstract class DependencyNode<\n Name extends string = string,\n _Dependencies extends Dependencies = Dependencies,\n> {\n public readonly name: Name;\n public readonly dependencies: _Dependencies;\n constructor({\n name,\n dependencies = {} as _Dependencies,\n }: {\n name: Name;\n dependencies?: _Dependencies;\n }) {\n this.name = name;\n this.dependencies = dependencies;\n }\n}\n\nexport type Dependencies = { [key: string]: DependencyNode<any, any> };\n"]}
package/dist/GTEKUOS6.cjs DELETED
@@ -1,21 +0,0 @@
1
- 'use strict';
2
-
3
- var __defProp = Object.defineProperty;
4
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
-
6
- // src/dependencyNode.ts
7
- var DependencyNode = class {
8
- static {
9
- __name(this, "DependencyNode");
10
- }
11
- name;
12
- dependencies;
13
- constructor({ name, dependencies = {} }) {
14
- this.name = name;
15
- this.dependencies = dependencies;
16
- }
17
- };
18
-
19
- exports.DependencyNode = DependencyNode;
20
- //# sourceMappingURL=GTEKUOS6.cjs.map
21
- //# sourceMappingURL=GTEKUOS6.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/dependencyNode.ts"],"names":["DependencyNode","name","dependencies"],"mappings":";;;;;;AAUO,IAAeA,iBAAf,MAAeA;EAVtB;;;AAcoBC,EAAAA,IAAAA;AACAC,EAAAA,YAAAA;AAChB,EAAA,WAAA,CAAY,EACRD,IAAAA,EACAC,YAAAA,GAAe,IAAmB,EAInC;AACC,IAAA,IAAA,CAAKD,IAAAA,GAAOA,IAAAA;AACZ,IAAA,IAAA,CAAKC,YAAAA,GAAeA,YAAAA;AACxB,EAAA;AACJ","file":"GTEKUOS6.cjs","sourcesContent":["/**\n * <!-- anchor:DependencyNode -->\n * Dependency nodes are abstract nodes in the dependency graph. They're used to build the graph,\n * but as an abstract class, lacks the required information to actually be resolved to anything.\n * If you want to implement a new dependency node, see ObjectDefinition or FactoryDefinition\n * @param name the name of this node. It should be unique across the entire graph.\n * @param dependencies a map of other nodes that this node depends on. These children will be resolved first.\n * The key of the dependencies map should be some arbitrary name within the context of *this* node. It does\n * not have to be unique.\n */\nexport abstract class DependencyNode<\n Name extends string = string,\n _Dependencies extends Dependencies = Dependencies,\n> {\n public readonly name: Name;\n public readonly dependencies: _Dependencies;\n constructor({\n name,\n dependencies = {} as _Dependencies,\n }: {\n name: Name;\n dependencies?: _Dependencies;\n }) {\n this.name = name;\n this.dependencies = dependencies;\n }\n}\n\nexport type Dependencies = { [key: string]: DependencyNode<any, any> };\n"]}