@settlemint/sdk-cli 2.1.4-pr89803ad8 → 2.1.4-pr8b3a2eba
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 +24 -17
- package/dist/cli.js.map +10 -10
- package/package.json +3 -3
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-
|
245343
|
+
version: "2.1.4-pr8b3a2eba",
|
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-
|
245393
|
-
"@settlemint/sdk-utils": "2.1.4-
|
245392
|
+
"@settlemint/sdk-js": "2.1.4-pr8b3a2eba",
|
245393
|
+
"@settlemint/sdk-utils": "2.1.4-pr8b3a2eba",
|
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
|
@@ -250093,6 +250094,9 @@ function tryParseJson3(value2, defaultValue = null) {
|
|
250093
250094
|
}
|
250094
250095
|
}
|
250095
250096
|
function extractJsonObject(value2) {
|
250097
|
+
if (value2.length > 5000) {
|
250098
|
+
throw new Error("Input too long");
|
250099
|
+
}
|
250096
250100
|
const result = /\{([\s\S]*)\}/.exec(value2);
|
250097
250101
|
if (!result) {
|
250098
250102
|
return null;
|
@@ -252815,7 +252819,7 @@ async function theGraphPrompt({
|
|
252815
252819
|
envKey: "SETTLEMINT_THEGRAPH",
|
252816
252820
|
isRequired,
|
252817
252821
|
defaultHandler: async ({ defaultService: defaultMiddleware, choices }) => {
|
252818
|
-
const filteredChoices = filterRunningOnly ? choices.filter(({ value: middleware }) => middleware
|
252822
|
+
const filteredChoices = filterRunningOnly ? choices.filter(({ value: middleware }) => isRunning(middleware)) : choices;
|
252819
252823
|
return esm_default3({
|
252820
252824
|
message: "Which The Graph instance do you want to connect to?",
|
252821
252825
|
choices: filteredChoices,
|
@@ -253143,7 +253147,7 @@ async function blockchainNodeOrLoadBalancerPrompt({
|
|
253143
253147
|
envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
|
253144
253148
|
isRequired,
|
253145
253149
|
defaultHandler: async ({ defaultService: defaultNode, choices }) => {
|
253146
|
-
const filteredChoices = filterRunningOnly ? choices.filter(({ value: node }) => node
|
253150
|
+
const filteredChoices = filterRunningOnly ? choices.filter(({ value: node }) => isRunning(node)) : choices;
|
253147
253151
|
return esm_default3({
|
253148
253152
|
message: promptMessage ?? "Which blockchain node or load balancer do you want to connect to?",
|
253149
253153
|
choices: filteredChoices,
|
@@ -257788,22 +257792,26 @@ function blockscoutInsightsCreateCommand() {
|
|
257788
257792
|
if (!applicationUniqueName) {
|
257789
257793
|
return missingApplication();
|
257790
257794
|
}
|
257791
|
-
let blockchainNodeUniqueName =
|
257792
|
-
|
257795
|
+
let blockchainNodeUniqueName = blockchainNode;
|
257796
|
+
let loadBalancerUniqueName = loadBalancer;
|
257793
257797
|
if (!blockchainNodeUniqueName && !loadBalancerUniqueName) {
|
257794
257798
|
const blockchainNodes = await serviceSpinner("blockchain node", () => settlemint.blockchainNode.list(applicationUniqueName));
|
257795
257799
|
const loadBalancers = await serviceSpinner("load balancer", () => settlemint.loadBalancer.list(applicationUniqueName));
|
257796
|
-
const
|
257800
|
+
const nodeOrLoadbalancer = await blockchainNodeOrLoadBalancerPrompt({
|
257797
257801
|
env: env2,
|
257798
257802
|
nodes: blockchainNodes,
|
257799
257803
|
loadBalancers,
|
257800
257804
|
accept: acceptDefaults,
|
257801
257805
|
isRequired: true
|
257802
257806
|
});
|
257803
|
-
if (!
|
257807
|
+
if (!nodeOrLoadbalancer) {
|
257804
257808
|
return nothingSelectedError("blockchain node");
|
257805
257809
|
}
|
257806
|
-
|
257810
|
+
if (nodeOrLoadbalancer.__typename?.endsWith("LoadBalancer")) {
|
257811
|
+
loadBalancerUniqueName = nodeOrLoadbalancer.uniqueName;
|
257812
|
+
} else {
|
257813
|
+
blockchainNodeUniqueName = nodeOrLoadbalancer.uniqueName;
|
257814
|
+
}
|
257807
257815
|
}
|
257808
257816
|
const result = await showSpinner(() => settlemint.insights.create({
|
257809
257817
|
name: name3,
|
@@ -257916,7 +257924,7 @@ function loadBalancerEvmCreateCommand() {
|
|
257916
257924
|
type: "load balancer",
|
257917
257925
|
subType: "EVM",
|
257918
257926
|
execute: (cmd2, baseAction) => {
|
257919
|
-
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)").option("--blockchain-network <blockchainNetwork>", "Blockchain network unique name where the load balancer connects to").action(async (name3, {
|
257927
|
+
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)").option("--blockchain-network <blockchainNetwork>", "Blockchain network unique name where the load balancer connects to, can be skipped if the --blockchain-nodes option is used (defaults to network from env)").action(async (name3, {
|
257920
257928
|
application,
|
257921
257929
|
provider,
|
257922
257930
|
region,
|
@@ -257990,7 +257998,8 @@ function loadBalancerEvmCreateCommand() {
|
|
257990
257998
|
mapDefaultEnv: () => {
|
257991
257999
|
return {
|
257992
258000
|
SETTLEMINT_APPLICATION: applicationUniqueName,
|
257993
|
-
SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER: result.uniqueName
|
258001
|
+
SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER: result.uniqueName,
|
258002
|
+
...getBlockchainNodeOrLoadBalancerEndpoints(result)
|
257994
258003
|
};
|
257995
258004
|
}
|
257996
258005
|
};
|
@@ -259784,12 +259793,10 @@ console.log(JSON.stringify(hardhat.userConfig));`,
|
|
259784
259793
|
if (isHardhatConfig(config3)) {
|
259785
259794
|
return config3;
|
259786
259795
|
}
|
259787
|
-
throw new Error(
|
259788
|
-
`)}`);
|
259796
|
+
throw new Error("Invalid hardhat config");
|
259789
259797
|
} catch (err) {
|
259790
259798
|
const error5 = err;
|
259791
|
-
note(`Error reading hardhat.config.ts: ${error5.
|
259792
|
-
`) ?? error5.message}`);
|
259799
|
+
note(`Error reading hardhat.config.ts: ${error5.message}`);
|
259793
259800
|
return {};
|
259794
259801
|
}
|
259795
259802
|
}
|
@@ -260505,4 +260512,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
260505
260512
|
// src/cli.ts
|
260506
260513
|
sdkCliCommand();
|
260507
260514
|
|
260508
|
-
//# debugId=
|
260515
|
+
//# debugId=36A9A5528CCEC94864756E2164756E21
|