@kapeta/local-cluster-service 0.56.0 → 0.56.1

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.56.1](https://github.com/kapetacom/local-cluster-service/compare/v0.56.0...v0.56.1) (2024-07-17)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * fix way of checking for kind ([495fdfa](https://github.com/kapetacom/local-cluster-service/commit/495fdfa13267bdd425e2486ec02f0a9922eca4ab))
7
+
1
8
  # [0.56.0](https://github.com/kapetacom/local-cluster-service/compare/v0.55.3...v0.56.0) (2024-07-15)
2
9
 
3
10
 
@@ -282,7 +282,11 @@ class StormEventParser {
282
282
  console.warn('Client consumer not found: %s', apiConnection.toComponent, apiConnection);
283
283
  return;
284
284
  }
285
- const apiResource = apiProviderBlock.content.spec.providers?.find((p) => p.kind === this.options.apiKind && p.metadata.name === apiConnection.fromResource);
285
+ const apiResource = apiProviderBlock.content.spec.providers?.find((p) => {
286
+ const pKind = (0, nodejs_utils_1.normalizeKapetaUri)(p.kind);
287
+ const apiKind = (0, nodejs_utils_1.normalizeKapetaUri)(this.options.apiKind);
288
+ return pKind === apiKind && p.metadata.name === apiConnection.fromResource;
289
+ });
286
290
  if (!apiResource) {
287
291
  if (warn) {
288
292
  console.warn('API resource not found: %s on %s', apiConnection.fromResource, apiProviderRef.toNormalizedString(), apiConnection);
@@ -610,7 +614,11 @@ class StormEventParser {
610
614
  console.warn('Provider block not found: %s', connection.fromComponent, connection);
611
615
  return;
612
616
  }
613
- const apiResource = apiProviderBlock.content.spec.providers?.find((p) => p.kind === this.options.apiKind && p.metadata.name === connection.fromResource);
617
+ const apiResource = apiProviderBlock.content.spec.providers?.find((p) => {
618
+ const pKind = (0, nodejs_utils_1.normalizeKapetaUri)(p.kind);
619
+ const apiKind = (0, nodejs_utils_1.normalizeKapetaUri)(this.options.apiKind);
620
+ return pKind === apiKind && p.metadata.name === connection.fromResource;
621
+ });
614
622
  if (!apiResource) {
615
623
  if (warn) {
616
624
  console.warn('API resource not found: %s on %s', connection.fromResource, fromRef.toNormalizedString(), connection);
@@ -282,7 +282,11 @@ class StormEventParser {
282
282
  console.warn('Client consumer not found: %s', apiConnection.toComponent, apiConnection);
283
283
  return;
284
284
  }
285
- const apiResource = apiProviderBlock.content.spec.providers?.find((p) => p.kind === this.options.apiKind && p.metadata.name === apiConnection.fromResource);
285
+ const apiResource = apiProviderBlock.content.spec.providers?.find((p) => {
286
+ const pKind = (0, nodejs_utils_1.normalizeKapetaUri)(p.kind);
287
+ const apiKind = (0, nodejs_utils_1.normalizeKapetaUri)(this.options.apiKind);
288
+ return pKind === apiKind && p.metadata.name === apiConnection.fromResource;
289
+ });
286
290
  if (!apiResource) {
287
291
  if (warn) {
288
292
  console.warn('API resource not found: %s on %s', apiConnection.fromResource, apiProviderRef.toNormalizedString(), apiConnection);
@@ -610,7 +614,11 @@ class StormEventParser {
610
614
  console.warn('Provider block not found: %s', connection.fromComponent, connection);
611
615
  return;
612
616
  }
613
- const apiResource = apiProviderBlock.content.spec.providers?.find((p) => p.kind === this.options.apiKind && p.metadata.name === connection.fromResource);
617
+ const apiResource = apiProviderBlock.content.spec.providers?.find((p) => {
618
+ const pKind = (0, nodejs_utils_1.normalizeKapetaUri)(p.kind);
619
+ const apiKind = (0, nodejs_utils_1.normalizeKapetaUri)(this.options.apiKind);
620
+ return pKind === apiKind && p.metadata.name === connection.fromResource;
621
+ });
614
622
  if (!apiResource) {
615
623
  if (warn) {
616
624
  console.warn('API resource not found: %s on %s', connection.fromResource, fromRef.toNormalizedString(), connection);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kapeta/local-cluster-service",
3
- "version": "0.56.0",
3
+ "version": "0.56.1",
4
4
  "description": "Manages configuration, ports and service discovery for locally running Kapeta systems",
5
5
  "type": "commonjs",
6
6
  "exports": {
@@ -406,7 +406,11 @@ export class StormEventParser {
406
406
  }
407
407
 
408
408
  const apiResource = apiProviderBlock.content.spec.providers?.find(
409
- (p) => p.kind === this.options.apiKind && p.metadata.name === apiConnection.fromResource
409
+ (p) => {
410
+ const pKind = normalizeKapetaUri(p.kind);
411
+ const apiKind = normalizeKapetaUri(this.options.apiKind);
412
+ return pKind === apiKind && p.metadata.name === apiConnection.fromResource
413
+ }
410
414
  );
411
415
 
412
416
  if (!apiResource) {
@@ -791,8 +795,12 @@ export class StormEventParser {
791
795
  }
792
796
 
793
797
  const apiResource = apiProviderBlock.content.spec.providers?.find(
794
- (p) => p.kind === this.options.apiKind && p.metadata.name === connection.fromResource
795
- );
798
+ (p) => {
799
+ const pKind = normalizeKapetaUri(p.kind);
800
+ const apiKind = normalizeKapetaUri(this.options.apiKind);
801
+ return pKind === apiKind && p.metadata.name === connection.fromResource
802
+ }
803
+ );
796
804
 
797
805
  if (!apiResource) {
798
806
  if (warn) {