@settlemint/sdk-cli 0.7.0-pr9a96f6a → 0.7.0-pr9eef124
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 +132 -24
- package/dist/cli.js.map +12 -9
- package/package.json +3 -3
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.5jbJqLPnjZ:/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.0-
|
|
200567
|
+
binaryVersion: "0.7.0-pr9eef124",
|
|
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.5jbJqLPnjZ:/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.5jbJqLPnjZ:/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.5jbJqLPnjZ:/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.5jbJqLPnjZ:/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.0-
|
|
273262
|
+
version: "0.7.0-pr9eef124",
|
|
273262
273263
|
type: "module",
|
|
273263
273264
|
private: false,
|
|
273264
273265
|
license: "FSL-1.1-MIT",
|
|
@@ -273309,8 +273310,8 @@ var package_default = {
|
|
|
273309
273310
|
"@inquirer/input": "4.1.0",
|
|
273310
273311
|
"@inquirer/password": "4.0.3",
|
|
273311
273312
|
"@inquirer/select": "4.0.3",
|
|
273312
|
-
"@settlemint/sdk-js": "0.7.0-
|
|
273313
|
-
"@settlemint/sdk-utils": "0.7.0-
|
|
273313
|
+
"@settlemint/sdk-js": "0.7.0-pr9eef124",
|
|
273314
|
+
"@settlemint/sdk-utils": "0.7.0-pr9eef124",
|
|
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,110 @@ 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 application = applicationId ?? env2.SETTLEMINT_APPLICATION;
|
|
274838
|
+
if (!application) {
|
|
274839
|
+
cancel2("No application found. Please specify an application or run `settlemint connect` to continue.");
|
|
274840
|
+
}
|
|
274841
|
+
let networkId = blockchainNetworkId ?? (acceptDefaults ? env2.SETTLEMINT_BLOCKCHAIN_NETWORK : undefined);
|
|
274842
|
+
if (!networkId) {
|
|
274843
|
+
const networks = await settlemint.blockchainNetwork.list(application);
|
|
274844
|
+
const network = await blockchainNetworkPrompt(env2, networks, acceptDefaults ?? false);
|
|
274845
|
+
if (!network) {
|
|
274846
|
+
cancel2("No network found. Please specify a network to continue.");
|
|
274847
|
+
}
|
|
274848
|
+
networkId = network?.id;
|
|
274849
|
+
}
|
|
274850
|
+
const result = await settlemint.blockchainNode.create({
|
|
274851
|
+
applicationId: application,
|
|
274852
|
+
name: name2,
|
|
274853
|
+
blockchainNetworkId: networkId,
|
|
274854
|
+
nodeType,
|
|
274855
|
+
keyMaterial: nodeIdentity,
|
|
274856
|
+
provider,
|
|
274857
|
+
region,
|
|
274858
|
+
size,
|
|
274859
|
+
type: type4
|
|
274860
|
+
});
|
|
274861
|
+
return {
|
|
274862
|
+
result,
|
|
274863
|
+
mapDefaultEnv: () => {
|
|
274864
|
+
return {
|
|
274865
|
+
SETTLEMINT_APPLICATION: application,
|
|
274866
|
+
SETTLEMINT_BLOCKCHAIN_NODE: result.id
|
|
274867
|
+
};
|
|
274868
|
+
}
|
|
274869
|
+
};
|
|
274870
|
+
});
|
|
274871
|
+
});
|
|
274872
|
+
},
|
|
274873
|
+
examples: [
|
|
274874
|
+
{
|
|
274875
|
+
description: "Create a Besu blockchain node and save as default",
|
|
274876
|
+
command: "platform create blockchain-node besu my-node --node-type VALIDATOR --accept-defaults -d"
|
|
274877
|
+
},
|
|
274878
|
+
{
|
|
274879
|
+
description: "Create a Besu blockchain node in a different network",
|
|
274880
|
+
command: "platform create blockchain-node besu my-node --blockchain-network-id 12345 --node-type NON_VALIDATOR --accept-defaults"
|
|
274881
|
+
},
|
|
274882
|
+
{
|
|
274883
|
+
description: "Create a Besu blockchain node in a different application",
|
|
274884
|
+
command: "platform create blockchain-node besu my-node --application-id 123456789 --node-type NON_VALIDATOR --accept-defaults"
|
|
274885
|
+
}
|
|
274886
|
+
]
|
|
274887
|
+
});
|
|
274888
|
+
}
|
|
274889
|
+
|
|
274890
|
+
// src/commands/platform/blockchain-node/create.ts
|
|
274891
|
+
function blockchainNodeCreateCommand() {
|
|
274892
|
+
return new Command2("blockchain-node").alias("bn").description("Create a blockchain node in the SettleMint platform").addCommand(blockchainNodeBesuCreateCommand());
|
|
274893
|
+
}
|
|
274894
|
+
|
|
274790
274895
|
// src/commands/platform/insights/blockscout/create.ts
|
|
274791
274896
|
function blockscoutInsightsCreateCommand() {
|
|
274792
274897
|
return getCreateCommand({
|
|
@@ -274902,16 +275007,14 @@ function graphMiddlewareCreateCommand() {
|
|
|
274902
275007
|
type: "middleware",
|
|
274903
275008
|
alias: "gr",
|
|
274904
275009
|
execute: (cmd2, baseAction) => {
|
|
274905
|
-
addClusterServiceArgs(cmd2).option("--application-id <applicationId>", "Application ID").option("--
|
|
275010
|
+
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
275011
|
return baseAction(defaultArgs, async (settlemint, env2) => {
|
|
274907
275012
|
const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
|
|
274908
275013
|
const blockchainNode = blockchainNodeId ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
|
|
274909
|
-
const storage = storageId ?? env2.SETTLEMINT_IPFS;
|
|
274910
275014
|
const result = await settlemint.middleware.create({
|
|
274911
275015
|
name: name2,
|
|
274912
275016
|
applicationId: application,
|
|
274913
275017
|
interface: "HA_GRAPH",
|
|
274914
|
-
storageId: storage,
|
|
274915
275018
|
blockchainNodeId: blockchainNode,
|
|
274916
275019
|
provider,
|
|
274917
275020
|
region,
|
|
@@ -275227,7 +275330,7 @@ function storageCreateCommand() {
|
|
|
275227
275330
|
|
|
275228
275331
|
// src/commands/platform/create.ts
|
|
275229
275332
|
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());
|
|
275333
|
+
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
275334
|
}
|
|
275232
275335
|
|
|
275233
275336
|
// src/commands/platform/prompts/delete-confirmation.prompt.ts
|
|
@@ -276000,24 +276103,29 @@ function hardhatDeployRemoteCommand() {
|
|
|
276000
276103
|
accessToken,
|
|
276001
276104
|
instance
|
|
276002
276105
|
});
|
|
276106
|
+
const nodeId = autoAccept ? env2.SETTLEMINT_BLOCKCHAIN_NODE : blockchainNodeId;
|
|
276003
276107
|
let node = undefined;
|
|
276004
|
-
if (!
|
|
276005
|
-
const
|
|
276006
|
-
|
|
276007
|
-
|
|
276108
|
+
if (!nodeId) {
|
|
276109
|
+
const nodes = await settlemint.blockchainNode.list(env2.SETTLEMINT_APPLICATION);
|
|
276110
|
+
const evmNodes = nodes.filter((node2) => node2.isEvm);
|
|
276111
|
+
if (evmNodes.length === 0) {
|
|
276112
|
+
cancel2("No EVM blockchain nodes found. Please create an EVM blockchain node and try again.");
|
|
276008
276113
|
}
|
|
276009
|
-
const nodesWithPrivateKey = await Promise.all(
|
|
276114
|
+
const nodesWithPrivateKey = await Promise.all(evmNodes.map((node2) => settlemint.blockchainNode.read(node2.id)));
|
|
276010
276115
|
const nodesWithActivePrivateKey = nodesWithPrivateKey.filter((node2) => node2.privateKeys && node2.privateKeys.length > 0);
|
|
276011
276116
|
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.");
|
|
276117
|
+
cancel2("No EVM blockchain nodes with private keys found. Please activate a private key on your EVM blockchain node and try again.");
|
|
276013
276118
|
}
|
|
276014
276119
|
const blockchainNode = await blockchainNodePrompt(env2, nodesWithActivePrivateKey, autoAccept);
|
|
276015
276120
|
if (!blockchainNode) {
|
|
276016
|
-
cancel2("No
|
|
276121
|
+
cancel2("No EVM blockchain node selected. Please select one to continue.");
|
|
276017
276122
|
}
|
|
276018
276123
|
node = blockchainNode;
|
|
276019
276124
|
} else {
|
|
276020
|
-
node = await settlemint.blockchainNode.read(
|
|
276125
|
+
node = await settlemint.blockchainNode.read(nodeId);
|
|
276126
|
+
if (!node.isEvm) {
|
|
276127
|
+
cancel2("The specified blockchain node is not an EVM blockchain node. Please specify an EVM blockchain node to continue.");
|
|
276128
|
+
}
|
|
276021
276129
|
}
|
|
276022
276130
|
const envConfig = await settlemint.foundry.env(node.id);
|
|
276023
276131
|
const hardhatConfig = await getHardhatConfigData(envConfig);
|
|
@@ -276508,4 +276616,4 @@ sdkcli.parseAsync(process.argv).catch((reason) => {
|
|
|
276508
276616
|
cancel2(reason);
|
|
276509
276617
|
});
|
|
276510
276618
|
|
|
276511
|
-
//# debugId=
|
|
276619
|
+
//# debugId=B27E55CAB3CD00D464756E2164756E21
|