javonet-nodejs-sdk 2.6.15 → 2.6.16

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.
@@ -578,10 +578,21 @@ class InvocationContext {
578
578
  this.#buildCommand(localCommand)
579
579
  );
580
580
  await localInvCtx.execute();
581
+ const resolve = (item) => {
582
+ return item?.commandType === import_CommandType.CommandType.Reference ? new InvocationContext(
583
+ this.#runtimeContextId,
584
+ this.#runtimeName,
585
+ this.#connectionData,
586
+ item
587
+ ) : item;
588
+ };
581
589
  const respCommand = localInvCtx.#responseCommand;
582
590
  if (!respCommand || !respCommand.payload || respCommand.payload.length === 0) {
583
591
  return [];
584
592
  }
593
+ if (respCommand.payload) {
594
+ return respCommand.payload.map((item) => resolve(item));
595
+ }
585
596
  return respCommand.payload || [];
586
597
  }
587
598
  /**
@@ -633,14 +633,27 @@ class InvocationContext {
633
633
  this.#connectionData,
634
634
  this.#buildCommand(localCommand)
635
635
  )
636
-
637
636
  await localInvCtx.execute()
638
637
 
638
+ const resolve = (/** @type {any} */ item) => {
639
+ return item?.commandType === CommandType.Reference ?
640
+ new InvocationContext(
641
+ this.#runtimeContextId,
642
+ this.#runtimeName,
643
+ this.#connectionData,
644
+ item
645
+ ) : item
646
+ }
647
+
639
648
  const respCommand = localInvCtx.#responseCommand
640
649
  if (!respCommand || !respCommand.payload || respCommand.payload.length === 0) {
641
650
  return []
642
651
  }
643
652
 
653
+ if (respCommand.payload) {
654
+ return respCommand.payload.map((/** @type {any} */ item) => resolve(item))
655
+ }
656
+
644
657
  // Return a shallow copy of the payload, mirroring the C# logic of copying to an object[]
645
658
  return respCommand.payload || []
646
659
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "javonet-nodejs-sdk",
3
- "version": "2.6.15",
3
+ "version": "2.6.16",
4
4
  "description": "Javonet allows you to reference and use modules or packages written in (Java/Kotlin/Groovy/Clojure, C#/VB.NET, Ruby, Perl, Python, JavaScript/TypeScript) like they were created in your technology. It works on Linux/Windows and MacOS for applications created in JVM, CLR/Netcore, Perl, Python, Ruby, NodeJS, C++ or GoLang and gives you unparalleled freedom and flexibility with native performance in building your mixed-technologies products. Let it be accessing best AI or cryptography libraries, devices SDKs, legacy client modules, internal custom packages or anything from public repositories available on NPM, Nuget, PyPI, Maven/Gradle, RubyGems or GitHub. Get free from programming languages barriers today! For more information check out our guides at https://www.javonet.com/guides/v2/",
5
5
  "keywords": [],
6
6
  "author": "SdNCenter Sp. z o. o.",