@settlemint/sdk-cli 2.1.4-pr86a1f4ed → 2.1.4-pr9dd5ccc8

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
@@ -245278,7 +245278,7 @@ function pruneCurrentEnv(currentEnv, env2) {
245278
245278
  var package_default = {
245279
245279
  name: "@settlemint/sdk-cli",
245280
245280
  description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
245281
- version: "2.1.4-pr86a1f4ed",
245281
+ version: "2.1.4-pr9dd5ccc8",
245282
245282
  type: "module",
245283
245283
  private: false,
245284
245284
  license: "FSL-1.1-MIT",
@@ -245327,8 +245327,8 @@ var package_default = {
245327
245327
  "@inquirer/input": "4.1.9",
245328
245328
  "@inquirer/password": "4.0.12",
245329
245329
  "@inquirer/select": "4.1.1",
245330
- "@settlemint/sdk-js": "2.1.4-pr86a1f4ed",
245331
- "@settlemint/sdk-utils": "2.1.4-pr86a1f4ed",
245330
+ "@settlemint/sdk-js": "2.1.4-pr9dd5ccc8",
245331
+ "@settlemint/sdk-utils": "2.1.4-pr9dd5ccc8",
245332
245332
  "@types/node": "22.14.1",
245333
245333
  "@types/semver": "7.7.0",
245334
245334
  "@types/which": "3.0.4",
@@ -252285,6 +252285,9 @@ async function servicePrompt({
252285
252285
  }
252286
252286
  const selectedService = services.find((service) => Array.isArray(service) ? false : service.uniqueName === env2[envKey]);
252287
252287
  const autoAccept = isCi || accept;
252288
+ if (autoAccept && allowAll) {
252289
+ return services;
252290
+ }
252288
252291
  if (autoAccept && selectedService) {
252289
252292
  return selectedService;
252290
252293
  }
@@ -256905,7 +256908,10 @@ function getCreateCommand({
256905
256908
  usePersonalAccessToken = true,
256906
256909
  requiresDeployment = true
256907
256910
  }) {
256908
- const cmd2 = new Command(sanitizeCommandName(name3)).alias(alias).description(`Create a new ${subType ? `${subType} ${type4}` : type4} in the SettleMint platform.`).usage(createExamples(examples)).argument("<name>", `The ${subType ? `${subType} ${type4}` : type4} name`).option("-a, --accept-defaults", "Accept the default values").option("-d, --default", `Save as default ${type4}`).option("--prod", "Connect to production environment");
256911
+ const cmd2 = new Command(sanitizeCommandName(name3)).description(`Create a new ${subType ? `${subType} ${type4}` : type4} in the SettleMint platform.`).usage(createExamples(examples)).argument("<name>", `The ${subType ? `${subType} ${type4}` : type4} name`).option("-a, --accept-defaults", "Accept the default values").option("-d, --default", `Save as default ${type4}`).option("--prod", "Connect to production environment");
256912
+ if (alias) {
256913
+ cmd2.alias(alias);
256914
+ }
256909
256915
  if (requiresDeployment) {
256910
256916
  cmd2.option("-w, --wait", "Wait until deployed").option("-r, --restart-if-timeout", "Restart if wait time is exceeded");
256911
256917
  }
@@ -257619,7 +257625,6 @@ function loadBalancerEvmCreateCommand() {
257619
257625
  name: "evm",
257620
257626
  type: "load balancer",
257621
257627
  subType: "EVM",
257622
- alias: "e",
257623
257628
  execute: (cmd2, baseAction) => {
257624
257629
  addClusterServiceArgs(cmd2).option("--app, --application <application>", "The application unique name to create the load balancer in (defaults to application from env)").option("--blockchain-nodes <blockchainNodes...>", "Blockchain node unique names where the load balancer connects to (must be from the same network)").action(async (name3, { application, provider, region, size, type: type4, blockchainNodes, acceptDefaults, ...defaultArgs }) => {
257625
257630
  return baseAction({
@@ -257645,21 +257650,25 @@ function loadBalancerEvmCreateCommand() {
257645
257650
  if (!network) {
257646
257651
  return nothingSelectedError("blockchain network");
257647
257652
  }
257653
+ networkUniqueName = network.uniqueName;
257648
257654
  const blockchainNodes2 = await serviceSpinner("blockchain node", () => settlemint.blockchainNode.list(applicationUniqueName));
257649
257655
  const connectedNodes = await blockchainNodePrompt({
257650
257656
  env: env2,
257651
- nodes: blockchainNodes2.filter((node) => node.blockchainNetwork?.uniqueName === networkUniqueName),
257657
+ nodes: blockchainNodes2.filter((node) => node.blockchainNetwork?.uniqueName === network.uniqueName),
257652
257658
  accept: acceptDefaults,
257653
257659
  promptMessage: "Which blockchain node do you want to connect the load balancer to?",
257654
257660
  allowAll: true
257655
257661
  });
257656
257662
  connectedNodesUniqueNames = Array.isArray(connectedNodes) ? blockchainNodes2.map((node) => node.uniqueName) : connectedNodes ? [connectedNodes.uniqueName] : [];
257657
257663
  }
257664
+ if (connectedNodesUniqueNames.length === 0) {
257665
+ return cancel2("A load balancer must connect to at least one blockchain node");
257666
+ }
257658
257667
  if (!networkUniqueName) {
257659
257668
  const applicationBlockchainNodes = await serviceSpinner("blockchain node", () => settlemint.blockchainNode.list(applicationUniqueName));
257660
257669
  const selectedBlockchainNodes = applicationBlockchainNodes.filter((node) => connectedNodesUniqueNames.includes(node.uniqueName));
257661
257670
  if (selectedBlockchainNodes.length === 0) {
257662
- return cancel2("blockchain network");
257671
+ return cancel2(`Blockchain node(s) '${connectedNodesUniqueNames.join(", ")}' are not part of the application '${applicationUniqueName}'`);
257663
257672
  }
257664
257673
  const onTheSameNetwork = selectedBlockchainNodes.every((node) => node.blockchainNetwork?.uniqueName === selectedBlockchainNodes[0].blockchainNetwork?.uniqueName);
257665
257674
  if (!onTheSameNetwork) {
@@ -257696,7 +257705,7 @@ function loadBalancerEvmCreateCommand() {
257696
257705
  },
257697
257706
  {
257698
257707
  description: "Create an EVM load balancer and connect to specific blockchain nodes",
257699
- command: "platform create load-balancer evm my-lb --blockchain-nodes my-node1 my-node2 --accept-defaults"
257708
+ command: "platform create load-balancer evm my-lb --blockchain-network my-network --accept-defaults"
257700
257709
  },
257701
257710
  {
257702
257711
  description: "Create an EVM load balancer in a different application",
@@ -260189,4 +260198,4 @@ async function sdkCliCommand(argv = process.argv) {
260189
260198
  // src/cli.ts
260190
260199
  sdkCliCommand();
260191
260200
 
260192
- //# debugId=C55F9514E9EDA97B64756E2164756E21
260201
+ //# debugId=E041458A71857F8B64756E2164756E21