@settlemint/sdk-cli 2.1.4-pr05b60a44 → 2.1.4-pr0d78d8f9

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/dist/cli.js CHANGED
@@ -245340,7 +245340,7 @@ function pruneCurrentEnv(currentEnv, env2) {
245340
245340
  var package_default = {
245341
245341
  name: "@settlemint/sdk-cli",
245342
245342
  description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
245343
- version: "2.1.4-pr05b60a44",
245343
+ version: "2.1.4-pr0d78d8f9",
245344
245344
  type: "module",
245345
245345
  private: false,
245346
245346
  license: "FSL-1.1-MIT",
@@ -245389,8 +245389,8 @@ var package_default = {
245389
245389
  "@inquirer/input": "4.1.9",
245390
245390
  "@inquirer/password": "4.0.12",
245391
245391
  "@inquirer/select": "4.1.1",
245392
- "@settlemint/sdk-js": "2.1.4-pr05b60a44",
245393
- "@settlemint/sdk-utils": "2.1.4-pr05b60a44",
245392
+ "@settlemint/sdk-js": "2.1.4-pr0d78d8f9",
245393
+ "@settlemint/sdk-utils": "2.1.4-pr0d78d8f9",
245394
245394
  "@types/node": "22.14.1",
245395
245395
  "@types/semver": "7.7.0",
245396
245396
  "@types/which": "3.0.4",
@@ -248210,6 +248210,7 @@ var getEnv = (gqlClient) => {
248210
248210
  };
248211
248211
  var LoadBalancerFragment = graphql(`
248212
248212
  fragment LoadBalancer on LoadBalancer {
248213
+ __typename
248213
248214
  id
248214
248215
  uniqueName
248215
248216
  name
@@ -252818,7 +252819,7 @@ async function theGraphPrompt({
252818
252819
  envKey: "SETTLEMINT_THEGRAPH",
252819
252820
  isRequired,
252820
252821
  defaultHandler: async ({ defaultService: defaultMiddleware, choices }) => {
252821
- const filteredChoices = filterRunningOnly ? choices.filter(({ value: middleware }) => middleware === undefined || middleware?.status === "COMPLETED") : choices;
252822
+ const filteredChoices = filterRunningOnly ? choices.filter(({ value: middleware }) => isRunning(middleware)) : choices;
252822
252823
  return esm_default3({
252823
252824
  message: "Which The Graph instance do you want to connect to?",
252824
252825
  choices: filteredChoices,
@@ -253146,7 +253147,7 @@ async function blockchainNodeOrLoadBalancerPrompt({
253146
253147
  envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
253147
253148
  isRequired,
253148
253149
  defaultHandler: async ({ defaultService: defaultNode, choices }) => {
253149
- const filteredChoices = filterRunningOnly ? choices.filter(({ value: node }) => node === undefined || node?.status === "COMPLETED") : choices;
253150
+ const filteredChoices = filterRunningOnly ? choices.filter(({ value: node }) => isRunning(node)) : choices;
253150
253151
  return esm_default3({
253151
253152
  message: promptMessage ?? "Which blockchain node or load balancer do you want to connect to?",
253152
253153
  choices: filteredChoices,
@@ -257791,22 +257792,26 @@ function blockscoutInsightsCreateCommand() {
257791
257792
  if (!applicationUniqueName) {
257792
257793
  return missingApplication();
257793
257794
  }
257794
- let blockchainNodeUniqueName = loadBalancer ? undefined : blockchainNode ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
257795
- const loadBalancerUniqueName = blockchainNodeUniqueName ? undefined : loadBalancer ?? env2.SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER;
257795
+ let blockchainNodeUniqueName = blockchainNode;
257796
+ let loadBalancerUniqueName = loadBalancer;
257796
257797
  if (!blockchainNodeUniqueName && !loadBalancerUniqueName) {
257797
257798
  const blockchainNodes = await serviceSpinner("blockchain node", () => settlemint.blockchainNode.list(applicationUniqueName));
257798
257799
  const loadBalancers = await serviceSpinner("load balancer", () => settlemint.loadBalancer.list(applicationUniqueName));
257799
- const node = await blockchainNodeOrLoadBalancerPrompt({
257800
+ const nodeOrLoadbalancer = await blockchainNodeOrLoadBalancerPrompt({
257800
257801
  env: env2,
257801
257802
  nodes: blockchainNodes,
257802
257803
  loadBalancers,
257803
257804
  accept: acceptDefaults,
257804
257805
  isRequired: true
257805
257806
  });
257806
- if (!node) {
257807
+ if (!nodeOrLoadbalancer) {
257807
257808
  return nothingSelectedError("blockchain node");
257808
257809
  }
257809
- blockchainNodeUniqueName = node.uniqueName;
257810
+ if (nodeOrLoadbalancer.__typename?.endsWith("LoadBalancer")) {
257811
+ loadBalancerUniqueName = nodeOrLoadbalancer.uniqueName;
257812
+ } else {
257813
+ blockchainNodeUniqueName = nodeOrLoadbalancer.uniqueName;
257814
+ }
257810
257815
  }
257811
257816
  const result = await showSpinner(() => settlemint.insights.create({
257812
257817
  name: name3,
@@ -257993,7 +257998,8 @@ function loadBalancerEvmCreateCommand() {
257993
257998
  mapDefaultEnv: () => {
257994
257999
  return {
257995
258000
  SETTLEMINT_APPLICATION: applicationUniqueName,
257996
- SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER: result.uniqueName
258001
+ SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER: result.uniqueName,
258002
+ ...getBlockchainNodeOrLoadBalancerEndpoints(result)
257997
258003
  };
257998
258004
  }
257999
258005
  };
@@ -259305,6 +259311,8 @@ function getItemsForServiceType(services, serviceType) {
259305
259311
  return services.blockchainNetworks;
259306
259312
  case "blockchain-node":
259307
259313
  return services.blockchainNodes;
259314
+ case "load-balancer":
259315
+ return services.loadBalancers;
259308
259316
  default:
259309
259317
  return [];
259310
259318
  }
@@ -260506,4 +260514,4 @@ async function sdkCliCommand(argv = process.argv) {
260506
260514
  // src/cli.ts
260507
260515
  sdkCliCommand();
260508
260516
 
260509
- //# debugId=41A23B2F51149BFD64756E2164756E21
260517
+ //# debugId=1D671D9A13FE7C1164756E2164756E21