@kapeta/local-cluster-service 0.40.5 → 0.40.6

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [0.40.6](https://github.com/kapetacom/local-cluster-service/compare/v0.40.5...v0.40.6) (2024-04-11)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Fix wrong connection id structure ([4056bc5](https://github.com/kapetacom/local-cluster-service/commit/4056bc5c0d51aa15ff9be0b9ec3b9f9dbdfaec56))
7
+
1
8
  ## [0.40.5](https://github.com/kapetacom/local-cluster-service/compare/v0.40.4...v0.40.5) (2024-04-09)
2
9
 
3
10
 
@@ -8,7 +8,7 @@ declare class NetworkManager {
8
8
  private _connections;
9
9
  private _sources;
10
10
  private _targets;
11
- static toConnectionId(connection: Connection): string;
11
+ static toConnectionId({ provider, consumer }: Connection): string;
12
12
  constructor();
13
13
  _ensureSystem(systemId: string): void;
14
14
  _ensureConnection(systemId: string, connectionId: string): Traffic[];
@@ -14,13 +14,11 @@ class NetworkManager {
14
14
  _connections;
15
15
  _sources;
16
16
  _targets;
17
- static toConnectionId(connection) {
17
+ static toConnectionId({ provider, consumer }) {
18
18
  return [
19
- connection.provider.blockId,
20
- connection.provider.resourceName,
21
- connection.consumer.blockId,
22
- connection.consumer.resourceName,
23
- ].join('_');
19
+ [provider.blockId, provider.resourceName, 'PROVIDES'].join('__'),
20
+ [consumer.blockId, consumer.resourceName, 'CONSUMES'].join('__'),
21
+ ].join('-');
24
22
  }
25
23
  constructor() {
26
24
  this._connections = {};
@@ -8,7 +8,7 @@ declare class NetworkManager {
8
8
  private _connections;
9
9
  private _sources;
10
10
  private _targets;
11
- static toConnectionId(connection: Connection): string;
11
+ static toConnectionId({ provider, consumer }: Connection): string;
12
12
  constructor();
13
13
  _ensureSystem(systemId: string): void;
14
14
  _ensureConnection(systemId: string, connectionId: string): Traffic[];
@@ -14,13 +14,11 @@ class NetworkManager {
14
14
  _connections;
15
15
  _sources;
16
16
  _targets;
17
- static toConnectionId(connection) {
17
+ static toConnectionId({ provider, consumer }) {
18
18
  return [
19
- connection.provider.blockId,
20
- connection.provider.resourceName,
21
- connection.consumer.blockId,
22
- connection.consumer.resourceName,
23
- ].join('_');
19
+ [provider.blockId, provider.resourceName, 'PROVIDES'].join('__'),
20
+ [consumer.blockId, consumer.resourceName, 'CONSUMES'].join('__'),
21
+ ].join('-');
24
22
  }
25
23
  constructor() {
26
24
  this._connections = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kapeta/local-cluster-service",
3
- "version": "0.40.5",
3
+ "version": "0.40.6",
4
4
  "description": "Manages configuration, ports and service discovery for locally running Kapeta systems",
5
5
  "type": "commonjs",
6
6
  "exports": {
@@ -13,13 +13,11 @@ class NetworkManager {
13
13
  private _sources: { [systemId: string]: { [instanceId: string]: Traffic[] } };
14
14
  private _targets: { [systemId: string]: { [instanceId: string]: Traffic[] } };
15
15
 
16
- static toConnectionId(connection: Connection) {
16
+ static toConnectionId({ provider, consumer }: Connection) {
17
17
  return [
18
- connection.provider.blockId,
19
- connection.provider.resourceName,
20
- connection.consumer.blockId,
21
- connection.consumer.resourceName,
22
- ].join('_');
18
+ [provider.blockId, provider.resourceName, 'PROVIDES'].join('__'),
19
+ [consumer.blockId, consumer.resourceName, 'CONSUMES'].join('__'),
20
+ ].join('-');
23
21
  }
24
22
 
25
23
  constructor() {