From 1e525fad35585c5401914200e8e15c50304d8688 Mon Sep 17 00:00:00 2001 From: InversionSpaces Date: Wed, 22 Nov 2023 14:44:34 +0100 Subject: [PATCH] feat(api): Use `js.UndefOr` for `defaultServiceId` (#980) Use js.UndefOr --- .github/workflows/e2e.yml | 3 ++- js/js-exports/src/main/scala/aqua/js/Definitions.scala | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index de73256d..a233a47d 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -44,9 +44,10 @@ jobs: fcli: needs: aqua - uses: fluencelabs/cli/.github/workflows/tests.yml@main + uses: fluencelabs/fluence-cli/.github/workflows/tests.yml@use-js-client-0.5.0 with: aqua-snapshots: "${{ needs.aqua.outputs.aqua-snapshots }}" + ref: use-js-client-0.5.0 registry: needs: diff --git a/js/js-exports/src/main/scala/aqua/js/Definitions.scala b/js/js-exports/src/main/scala/aqua/js/Definitions.scala index 64dfafa9..226ccde9 100644 --- a/js/js-exports/src/main/scala/aqua/js/Definitions.scala +++ b/js/js-exports/src/main/scala/aqua/js/Definitions.scala @@ -115,14 +115,17 @@ object TypeDefinitionJs { @JSExportAll case class ServiceDefJs( - defaultServiceId: Option[String], + defaultServiceId: js.UndefOr[String], functions: LabeledTypeDefJs ) object ServiceDefJs { def apply(sd: ServiceDef): ServiceDefJs = { - ServiceDefJs(sd.defaultServiceId, LabeledTypeDefJs(sd.functions)) + ServiceDefJs( + sd.defaultServiceId.getOrElse(()), + LabeledTypeDefJs(sd.functions) + ) } }