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

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-pr0ae40216",
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-pr0ae40216",
245393
+ "@settlemint/sdk-utils": "2.1.4-pr0ae40216",
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
@@ -251865,7 +251866,13 @@ async function subgraphPrompt({
251865
251866
  if (env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH) {
251866
251867
  return [env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH];
251867
251868
  }
251868
- return subgraphNames.length === 1 ? subgraphNames : [];
251869
+ if (subgraphNames.length === 1) {
251870
+ return subgraphNames;
251871
+ }
251872
+ if (subgraphNames.includes("kit")) {
251873
+ return ["kit"];
251874
+ }
251875
+ return [];
251869
251876
  }
251870
251877
  if (!allowNew) {
251871
251878
  if (subgraphNames.length === 0) {
@@ -252818,7 +252825,7 @@ async function theGraphPrompt({
252818
252825
  envKey: "SETTLEMINT_THEGRAPH",
252819
252826
  isRequired,
252820
252827
  defaultHandler: async ({ defaultService: defaultMiddleware, choices }) => {
252821
- const filteredChoices = filterRunningOnly ? choices.filter(({ value: middleware }) => middleware === undefined || middleware?.status === "COMPLETED") : choices;
252828
+ const filteredChoices = filterRunningOnly ? choices.filter(({ value: middleware }) => isRunning(middleware)) : choices;
252822
252829
  return esm_default3({
252823
252830
  message: "Which The Graph instance do you want to connect to?",
252824
252831
  choices: filteredChoices,
@@ -253146,7 +253153,7 @@ async function blockchainNodeOrLoadBalancerPrompt({
253146
253153
  envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
253147
253154
  isRequired,
253148
253155
  defaultHandler: async ({ defaultService: defaultNode, choices }) => {
253149
- const filteredChoices = filterRunningOnly ? choices.filter(({ value: node }) => node === undefined || node?.status === "COMPLETED") : choices;
253156
+ const filteredChoices = filterRunningOnly ? choices.filter(({ value: node }) => isRunning(node)) : choices;
253150
253157
  return esm_default3({
253151
253158
  message: promptMessage ?? "Which blockchain node or load balancer do you want to connect to?",
253152
253159
  choices: filteredChoices,
@@ -257791,22 +257798,26 @@ function blockscoutInsightsCreateCommand() {
257791
257798
  if (!applicationUniqueName) {
257792
257799
  return missingApplication();
257793
257800
  }
257794
- let blockchainNodeUniqueName = loadBalancer ? undefined : blockchainNode ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
257795
- const loadBalancerUniqueName = blockchainNodeUniqueName ? undefined : loadBalancer ?? env2.SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER;
257801
+ let blockchainNodeUniqueName = blockchainNode;
257802
+ let loadBalancerUniqueName = loadBalancer;
257796
257803
  if (!blockchainNodeUniqueName && !loadBalancerUniqueName) {
257797
257804
  const blockchainNodes = await serviceSpinner("blockchain node", () => settlemint.blockchainNode.list(applicationUniqueName));
257798
257805
  const loadBalancers = await serviceSpinner("load balancer", () => settlemint.loadBalancer.list(applicationUniqueName));
257799
- const node = await blockchainNodeOrLoadBalancerPrompt({
257806
+ const nodeOrLoadbalancer = await blockchainNodeOrLoadBalancerPrompt({
257800
257807
  env: env2,
257801
257808
  nodes: blockchainNodes,
257802
257809
  loadBalancers,
257803
257810
  accept: acceptDefaults,
257804
257811
  isRequired: true
257805
257812
  });
257806
- if (!node) {
257813
+ if (!nodeOrLoadbalancer) {
257807
257814
  return nothingSelectedError("blockchain node");
257808
257815
  }
257809
- blockchainNodeUniqueName = node.uniqueName;
257816
+ if (nodeOrLoadbalancer.__typename?.endsWith("LoadBalancer")) {
257817
+ loadBalancerUniqueName = nodeOrLoadbalancer.uniqueName;
257818
+ } else {
257819
+ blockchainNodeUniqueName = nodeOrLoadbalancer.uniqueName;
257820
+ }
257810
257821
  }
257811
257822
  const result = await showSpinner(() => settlemint.insights.create({
257812
257823
  name: name3,
@@ -257993,7 +258004,8 @@ function loadBalancerEvmCreateCommand() {
257993
258004
  mapDefaultEnv: () => {
257994
258005
  return {
257995
258006
  SETTLEMINT_APPLICATION: applicationUniqueName,
257996
- SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER: result.uniqueName
258007
+ SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER: result.uniqueName,
258008
+ ...getBlockchainNodeOrLoadBalancerEndpoints(result)
257997
258009
  };
257998
258010
  }
257999
258011
  };
@@ -259305,6 +259317,8 @@ function getItemsForServiceType(services, serviceType) {
259305
259317
  return services.blockchainNetworks;
259306
259318
  case "blockchain-node":
259307
259319
  return services.blockchainNodes;
259320
+ case "load-balancer":
259321
+ return services.loadBalancers;
259308
259322
  default:
259309
259323
  return [];
259310
259324
  }
@@ -260506,4 +260520,4 @@ async function sdkCliCommand(argv = process.argv) {
260506
260520
  // src/cli.ts
260507
260521
  sdkCliCommand();
260508
260522
 
260509
- //# debugId=41A23B2F51149BFD64756E2164756E21
260523
+ //# debugId=D577954B0791B95F64756E2164756E21