@settlemint/sdk-cli 0.7.0 → 0.7.1
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 +137 -28
- package/dist/cli.js.map +12 -9
- package/package.json +7 -7
package/dist/cli.js
CHANGED
|
@@ -197427,7 +197427,7 @@ ${Bt.cyan(Yt)}
|
|
|
197427
197427
|
code: "ENOENT"
|
|
197428
197428
|
}), getPathInfo = (e9, t7) => {
|
|
197429
197429
|
var r6 = t7.colon || or;
|
|
197430
|
-
var i6 = e9.match(/\//) || nr && e9.match(/\\/) ? [""] : [...nr ? [process.cwd()] : [], ...(t7.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
197430
|
+
var i6 = e9.match(/\//) || nr && e9.match(/\\/) ? [""] : [...nr ? [process.cwd()] : [], ...(t7.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.teStKTIQqX:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(r6)];
|
|
197431
197431
|
var n6 = nr ? t7.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
197432
197432
|
var a5 = nr ? n6.split(r6) : [""];
|
|
197433
197433
|
if (nr) {
|
|
@@ -200564,7 +200564,7 @@ ${whileRunning(e9)}`;
|
|
|
200564
200564
|
};
|
|
200565
200565
|
ni = Object.assign(async function _main() {
|
|
200566
200566
|
var e9 = new Cli({
|
|
200567
|
-
binaryVersion: "0.7.
|
|
200567
|
+
binaryVersion: "0.7.1",
|
|
200568
200568
|
binaryLabel: "gql.tada CLI",
|
|
200569
200569
|
binaryName: "gql.tada"
|
|
200570
200570
|
});
|
|
@@ -218401,7 +218401,7 @@ var require_lib4 = __commonJS((exports, module) => {
|
|
|
218401
218401
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
218402
218402
|
var getNotFoundError2 = (cmd2) => Object.assign(new Error(`not found: ${cmd2}`), { code: "ENOENT" });
|
|
218403
218403
|
var getPathInfo2 = (cmd2, {
|
|
218404
|
-
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
218404
|
+
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.teStKTIQqX:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
218405
218405
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
218406
218406
|
delimiter: optDelimiter = delimiter
|
|
218407
218407
|
}) => {
|
|
@@ -218605,7 +218605,7 @@ var require_lib5 = __commonJS((exports, module) => {
|
|
|
218605
218605
|
let pathToInitial;
|
|
218606
218606
|
try {
|
|
218607
218607
|
pathToInitial = which.sync(initialCmd, {
|
|
218608
|
-
path: options.env && findInObject(options.env, "PATH") || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
218608
|
+
path: options.env && findInObject(options.env, "PATH") || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.teStKTIQqX:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
218609
218609
|
pathext: options.env && findInObject(options.env, "PATHEXT") || process.env.PATHEXT
|
|
218610
218610
|
}).toLowerCase();
|
|
218611
218611
|
} catch (err) {
|
|
@@ -219322,7 +219322,7 @@ var require_lib6 = __commonJS((exports, module) => {
|
|
|
219322
219322
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
219323
219323
|
var getNotFoundError2 = (cmd2) => Object.assign(new Error(`not found: ${cmd2}`), { code: "ENOENT" });
|
|
219324
219324
|
var getPathInfo2 = (cmd2, {
|
|
219325
|
-
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
219325
|
+
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.teStKTIQqX:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
219326
219326
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
219327
219327
|
delimiter: optDelimiter = delimiter
|
|
219328
219328
|
}) => {
|
|
@@ -235213,7 +235213,7 @@ var require_which2 = __commonJS((exports, module) => {
|
|
|
235213
235213
|
const colon = opt2.colon || COLON;
|
|
235214
235214
|
const pathEnv = cmd2.match(/\//) || isWindows2 && cmd2.match(/\\/) ? [""] : [
|
|
235215
235215
|
...isWindows2 ? [process.cwd()] : [],
|
|
235216
|
-
...(opt2.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
235216
|
+
...(opt2.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.teStKTIQqX:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(colon)
|
|
235217
235217
|
];
|
|
235218
235218
|
const pathExtExe = isWindows2 ? opt2.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
235219
235219
|
const pathExt = isWindows2 ? pathExtExe.split(colon) : [""];
|
|
@@ -267876,7 +267876,7 @@ export const { client: theGraphClient${nameSuffix}, graphql: theGraphGraphql${na
|
|
|
267876
267876
|
Timestamp: string;
|
|
267877
267877
|
};
|
|
267878
267878
|
}>({
|
|
267879
|
-
instances: JSON.parse(process.env.SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS
|
|
267879
|
+
instances: JSON.parse(process.env.SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS || '[]'),
|
|
267880
267880
|
accessToken: process.env.SETTLEMINT_ACCESS_TOKEN!, // undefined in browser, by design to not leak the secrets
|
|
267881
267881
|
subgraphName: "${name2}",
|
|
267882
267882
|
});`
|
|
@@ -271538,6 +271538,7 @@ var BlockchainNodeFragment = graphql(`
|
|
|
271538
271538
|
name
|
|
271539
271539
|
uniqueName
|
|
271540
271540
|
status
|
|
271541
|
+
isEvm
|
|
271541
271542
|
endpoints {
|
|
271542
271543
|
id
|
|
271543
271544
|
label
|
|
@@ -273258,7 +273259,7 @@ function connectCommand() {
|
|
|
273258
273259
|
var package_default = {
|
|
273259
273260
|
name: "@settlemint/sdk-cli",
|
|
273260
273261
|
description: "SettleMint SDK, integrate SettleMint into your application with ease.",
|
|
273261
|
-
version: "0.7.
|
|
273262
|
+
version: "0.7.1",
|
|
273262
273263
|
type: "module",
|
|
273263
273264
|
private: false,
|
|
273264
273265
|
license: "FSL-1.1-MIT",
|
|
@@ -273305,12 +273306,12 @@ var package_default = {
|
|
|
273305
273306
|
slugify: "1.6.6",
|
|
273306
273307
|
yoctocolors: "2.1.1",
|
|
273307
273308
|
"@commander-js/extra-typings": "12.1.0",
|
|
273308
|
-
"@inquirer/confirm": "5.1.
|
|
273309
|
-
"@inquirer/input": "4.1.
|
|
273310
|
-
"@inquirer/password": "4.0.
|
|
273311
|
-
"@inquirer/select": "4.0.
|
|
273312
|
-
"@settlemint/sdk-js": "0.7.
|
|
273313
|
-
"@settlemint/sdk-utils": "0.7.
|
|
273309
|
+
"@inquirer/confirm": "5.1.1",
|
|
273310
|
+
"@inquirer/input": "4.1.1",
|
|
273311
|
+
"@inquirer/password": "4.0.4",
|
|
273312
|
+
"@inquirer/select": "4.0.4",
|
|
273313
|
+
"@settlemint/sdk-js": "0.7.1",
|
|
273314
|
+
"@settlemint/sdk-utils": "0.7.1",
|
|
273314
273315
|
"get-tsconfig": "4.8.1",
|
|
273315
273316
|
giget: "1.2.3"
|
|
273316
273317
|
},
|
|
@@ -274515,7 +274516,7 @@ function blockchainNetworkBesuCreateCommand() {
|
|
|
274515
274516
|
|
|
274516
274517
|
// src/commands/platform/blockchain-network/create.ts
|
|
274517
274518
|
function blockchainNetworkCreateCommand() {
|
|
274518
|
-
return new Command2("blockchain-network").alias("
|
|
274519
|
+
return new Command2("blockchain-network").alias("bnw").description("Create a blockchain network in the SettleMint platform").addCommand(blockchainNetworkBesuCreateCommand());
|
|
274519
274520
|
}
|
|
274520
274521
|
|
|
274521
274522
|
// src/commands/platform/workspace/create.ts
|
|
@@ -274787,6 +274788,111 @@ function applicationCreateCommand() {
|
|
|
274787
274788
|
});
|
|
274788
274789
|
}
|
|
274789
274790
|
|
|
274791
|
+
// src/commands/connect/blockchain-network.prompt.ts
|
|
274792
|
+
async function blockchainNetworkPrompt(env2, networks, accept) {
|
|
274793
|
+
if (networks.length === 0) {
|
|
274794
|
+
return;
|
|
274795
|
+
}
|
|
274796
|
+
const defaultNetwork = networks.find((network) => network.id === env2.SETTLEMINT_BLOCKCHAIN_NETWORK) ?? (networks.length === 1 ? networks[0] : undefined);
|
|
274797
|
+
const defaultPossible = accept;
|
|
274798
|
+
if (defaultPossible) {
|
|
274799
|
+
return defaultNetwork;
|
|
274800
|
+
}
|
|
274801
|
+
return esm_default2({
|
|
274802
|
+
message: "Which blockchain network do you want to connect to?",
|
|
274803
|
+
choices: [
|
|
274804
|
+
...networks.map((network) => ({
|
|
274805
|
+
name: network.name,
|
|
274806
|
+
value: network
|
|
274807
|
+
})),
|
|
274808
|
+
{
|
|
274809
|
+
name: "None",
|
|
274810
|
+
value: undefined
|
|
274811
|
+
}
|
|
274812
|
+
],
|
|
274813
|
+
default: defaultNetwork
|
|
274814
|
+
});
|
|
274815
|
+
}
|
|
274816
|
+
|
|
274817
|
+
// src/commands/platform/blockchain-node/besu/create.ts
|
|
274818
|
+
function blockchainNodeBesuCreateCommand() {
|
|
274819
|
+
return getCreateCommand({
|
|
274820
|
+
name: "besu",
|
|
274821
|
+
type: "blockchain node",
|
|
274822
|
+
alias: "b",
|
|
274823
|
+
execute: (cmd2, baseAction) => {
|
|
274824
|
+
addClusterServiceArgs(cmd2).option("-a, --application-id <applicationId>", "The application ID to create the node in (defaults to application from env)").option("--blockchain-network-id <blockchainNetworkId>", "Blockchain network to add this node to").option("--node-identity <nodeIdentity>", "EC DSA P256 private key to use as the node identity").addOption(new Option("--node-type <nodeType>", "Type of the node").choices(["VALIDATOR", "NON_VALIDATOR"]).makeOptionMandatory()).action(async (name2, {
|
|
274825
|
+
applicationId,
|
|
274826
|
+
provider,
|
|
274827
|
+
region,
|
|
274828
|
+
size,
|
|
274829
|
+
type: type4,
|
|
274830
|
+
blockchainNetworkId,
|
|
274831
|
+
nodeType,
|
|
274832
|
+
nodeIdentity,
|
|
274833
|
+
acceptDefaults,
|
|
274834
|
+
...defaultArgs
|
|
274835
|
+
}) => {
|
|
274836
|
+
return baseAction(defaultArgs, async (settlemint, env2) => {
|
|
274837
|
+
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
|
274838
|
+
const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
|
|
274839
|
+
if (!application) {
|
|
274840
|
+
cancel2("No application found. Please specify an application or run `settlemint connect` to continue.");
|
|
274841
|
+
}
|
|
274842
|
+
let networkId = blockchainNetworkId ?? (autoAccept ? env2.SETTLEMINT_BLOCKCHAIN_NETWORK : undefined);
|
|
274843
|
+
if (!networkId) {
|
|
274844
|
+
const networks = await settlemint.blockchainNetwork.list(application);
|
|
274845
|
+
const network = await blockchainNetworkPrompt(env2, networks, acceptDefaults ?? false);
|
|
274846
|
+
if (!network) {
|
|
274847
|
+
cancel2("No network found. Please specify a network to continue.");
|
|
274848
|
+
}
|
|
274849
|
+
networkId = network?.id;
|
|
274850
|
+
}
|
|
274851
|
+
const result = await settlemint.blockchainNode.create({
|
|
274852
|
+
applicationId: application,
|
|
274853
|
+
name: name2,
|
|
274854
|
+
blockchainNetworkId: networkId,
|
|
274855
|
+
nodeType,
|
|
274856
|
+
keyMaterial: nodeIdentity,
|
|
274857
|
+
provider,
|
|
274858
|
+
region,
|
|
274859
|
+
size,
|
|
274860
|
+
type: type4
|
|
274861
|
+
});
|
|
274862
|
+
return {
|
|
274863
|
+
result,
|
|
274864
|
+
mapDefaultEnv: () => {
|
|
274865
|
+
return {
|
|
274866
|
+
SETTLEMINT_APPLICATION: application,
|
|
274867
|
+
SETTLEMINT_BLOCKCHAIN_NODE: result.id
|
|
274868
|
+
};
|
|
274869
|
+
}
|
|
274870
|
+
};
|
|
274871
|
+
});
|
|
274872
|
+
});
|
|
274873
|
+
},
|
|
274874
|
+
examples: [
|
|
274875
|
+
{
|
|
274876
|
+
description: "Create a Besu blockchain node and save as default",
|
|
274877
|
+
command: "platform create blockchain-node besu my-node --node-type VALIDATOR --accept-defaults -d"
|
|
274878
|
+
},
|
|
274879
|
+
{
|
|
274880
|
+
description: "Create a Besu blockchain node in a different network",
|
|
274881
|
+
command: "platform create blockchain-node besu my-node --blockchain-network-id 12345 --node-type NON_VALIDATOR --accept-defaults"
|
|
274882
|
+
},
|
|
274883
|
+
{
|
|
274884
|
+
description: "Create a Besu blockchain node in a different application",
|
|
274885
|
+
command: "platform create blockchain-node besu my-node --application-id 123456789 --node-type NON_VALIDATOR --accept-defaults"
|
|
274886
|
+
}
|
|
274887
|
+
]
|
|
274888
|
+
});
|
|
274889
|
+
}
|
|
274890
|
+
|
|
274891
|
+
// src/commands/platform/blockchain-node/create.ts
|
|
274892
|
+
function blockchainNodeCreateCommand() {
|
|
274893
|
+
return new Command2("blockchain-node").alias("bn").description("Create a blockchain node in the SettleMint platform").addCommand(blockchainNodeBesuCreateCommand());
|
|
274894
|
+
}
|
|
274895
|
+
|
|
274790
274896
|
// src/commands/platform/insights/blockscout/create.ts
|
|
274791
274897
|
function blockscoutInsightsCreateCommand() {
|
|
274792
274898
|
return getCreateCommand({
|
|
@@ -274902,16 +275008,14 @@ function graphMiddlewareCreateCommand() {
|
|
|
274902
275008
|
type: "middleware",
|
|
274903
275009
|
alias: "gr",
|
|
274904
275010
|
execute: (cmd2, baseAction) => {
|
|
274905
|
-
addClusterServiceArgs(cmd2).option("--application-id <applicationId>", "Application ID").option("--
|
|
275011
|
+
addClusterServiceArgs(cmd2).option("--application-id <applicationId>", "Application ID").option("--blockchain-node-id <blockchainNodeId>", "Blockchain Node ID").action(async (name2, { applicationId, blockchainNodeId, provider, region, size, type: type4, ...defaultArgs }) => {
|
|
274906
275012
|
return baseAction(defaultArgs, async (settlemint, env2) => {
|
|
274907
275013
|
const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
|
|
274908
275014
|
const blockchainNode = blockchainNodeId ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
|
|
274909
|
-
const storage = storageId ?? env2.SETTLEMINT_IPFS;
|
|
274910
275015
|
const result = await settlemint.middleware.create({
|
|
274911
275016
|
name: name2,
|
|
274912
275017
|
applicationId: application,
|
|
274913
275018
|
interface: "HA_GRAPH",
|
|
274914
|
-
storageId: storage,
|
|
274915
275019
|
blockchainNodeId: blockchainNode,
|
|
274916
275020
|
provider,
|
|
274917
275021
|
region,
|
|
@@ -275227,7 +275331,7 @@ function storageCreateCommand() {
|
|
|
275227
275331
|
|
|
275228
275332
|
// src/commands/platform/create.ts
|
|
275229
275333
|
function createCommand3() {
|
|
275230
|
-
return new Command2("create").alias("c").description("Create a resource in the SettleMint platform").addCommand(workspaceCreateCommand()).addCommand(applicationCreateCommand()).addCommand(blockchainNetworkCreateCommand()).addCommand(privateKeyCreateCommand()).addCommand(middlewareCreateCommand()).addCommand(storageCreateCommand()).addCommand(integrationToolCreateCommand()).addCommand(insightsCreateCommand()).addCommand(applicationAccessTokenCreateCommand());
|
|
275334
|
+
return new Command2("create").alias("c").description("Create a resource in the SettleMint platform").addCommand(workspaceCreateCommand()).addCommand(applicationCreateCommand()).addCommand(blockchainNetworkCreateCommand()).addCommand(blockchainNodeCreateCommand()).addCommand(privateKeyCreateCommand()).addCommand(middlewareCreateCommand()).addCommand(storageCreateCommand()).addCommand(integrationToolCreateCommand()).addCommand(insightsCreateCommand()).addCommand(applicationAccessTokenCreateCommand());
|
|
275231
275335
|
}
|
|
275232
275336
|
|
|
275233
275337
|
// src/commands/platform/prompts/delete-confirmation.prompt.ts
|
|
@@ -276000,24 +276104,29 @@ function hardhatDeployRemoteCommand() {
|
|
|
276000
276104
|
accessToken,
|
|
276001
276105
|
instance
|
|
276002
276106
|
});
|
|
276107
|
+
const nodeId = blockchainNodeId ?? (autoAccept ? env2.SETTLEMINT_BLOCKCHAIN_NODE : undefined);
|
|
276003
276108
|
let node = undefined;
|
|
276004
|
-
if (!
|
|
276005
|
-
const
|
|
276006
|
-
|
|
276007
|
-
|
|
276109
|
+
if (!nodeId) {
|
|
276110
|
+
const nodes = await settlemint.blockchainNode.list(env2.SETTLEMINT_APPLICATION);
|
|
276111
|
+
const evmNodes = nodes.filter((node2) => node2.isEvm);
|
|
276112
|
+
if (evmNodes.length === 0) {
|
|
276113
|
+
cancel2("No EVM blockchain nodes found. Please create an EVM blockchain node and try again.");
|
|
276008
276114
|
}
|
|
276009
|
-
const nodesWithPrivateKey = await Promise.all(
|
|
276115
|
+
const nodesWithPrivateKey = await Promise.all(evmNodes.map((node2) => settlemint.blockchainNode.read(node2.id)));
|
|
276010
276116
|
const nodesWithActivePrivateKey = nodesWithPrivateKey.filter((node2) => node2.privateKeys && node2.privateKeys.length > 0);
|
|
276011
276117
|
if (nodesWithActivePrivateKey.length === 0) {
|
|
276012
|
-
cancel2("No blockchain nodes with private keys found. Please activate a private key on your blockchain node and try again.");
|
|
276118
|
+
cancel2("No EVM blockchain nodes with private keys found. Please activate a private key on your EVM blockchain node and try again.");
|
|
276013
276119
|
}
|
|
276014
276120
|
const blockchainNode = await blockchainNodePrompt(env2, nodesWithActivePrivateKey, autoAccept);
|
|
276015
276121
|
if (!blockchainNode) {
|
|
276016
|
-
cancel2("No
|
|
276122
|
+
cancel2("No EVM blockchain node selected. Please select one to continue.");
|
|
276017
276123
|
}
|
|
276018
276124
|
node = blockchainNode;
|
|
276019
276125
|
} else {
|
|
276020
|
-
node = await settlemint.blockchainNode.read(
|
|
276126
|
+
node = await settlemint.blockchainNode.read(nodeId);
|
|
276127
|
+
if (!node.isEvm) {
|
|
276128
|
+
cancel2("The specified blockchain node is not an EVM blockchain node. Please specify an EVM blockchain node to continue.");
|
|
276129
|
+
}
|
|
276021
276130
|
}
|
|
276022
276131
|
const envConfig = await settlemint.foundry.env(node.id);
|
|
276023
276132
|
const hardhatConfig = await getHardhatConfigData(envConfig);
|
|
@@ -276508,4 +276617,4 @@ sdkcli.parseAsync(process.argv).catch((reason) => {
|
|
|
276508
276617
|
cancel2(reason);
|
|
276509
276618
|
});
|
|
276510
276619
|
|
|
276511
|
-
//# debugId=
|
|
276620
|
+
//# debugId=9FA2EB1FA7B9ACEF64756E2164756E21
|