@settlemint/sdk-cli 0.7.0-mained4217a → 0.7.0-pr0ab001d
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 +120 -16
- package/dist/cli.js.map +11 -8
- 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.sVnxiuvbOK:/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-pr0ab001d",
|
|
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.sVnxiuvbOK:/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.sVnxiuvbOK:/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.sVnxiuvbOK:/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.sVnxiuvbOK:/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) : [""];
|
|
@@ -271538,6 +271538,7 @@ var BlockchainNodeFragment = graphql(`
|
|
|
271538
271538
|
name
|
|
271539
271539
|
uniqueName
|
|
271540
271540
|
status
|
|
271541
|
+
blockchainClient
|
|
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-pr0ab001d",
|
|
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-pr0ab001d",
|
|
273314
|
+
"@settlemint/sdk-utils": "0.7.0-pr0ab001d",
|
|
273314
273315
|
"get-tsconfig": "4.8.1",
|
|
273315
273316
|
giget: "1.2.3"
|
|
273316
273317
|
},
|
|
@@ -274389,7 +274390,7 @@ ${createExamples(examples)}`).argument("<name>", `The ${type4} name`).option("-a
|
|
|
274389
274390
|
intro(`Creating ${type4} in the SettleMint platform`);
|
|
274390
274391
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
|
274391
274392
|
const env2 = await loadEnv2(false, !!prod);
|
|
274392
|
-
const instance = await instancePrompt(env2, autoAccept);
|
|
274393
|
+
const instance = env2.SETTLEMINT_INSTANCE ?? await instancePrompt(env2, autoAccept);
|
|
274393
274394
|
const accessToken = usePersonalAccessToken ? (await getInstanceCredentials(instance))?.personalAccessToken : env2.SETTLEMINT_ACCESS_TOKEN;
|
|
274394
274395
|
if (!accessToken) {
|
|
274395
274396
|
return missingAccessTokenError();
|
|
@@ -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((network2) => network2.id === env2.SETTLEMINT_BLOCKCHAIN_NETWORK) ?? (networks.length === 1 ? networks[0] : undefined);
|
|
274797
|
+
const defaultPossible = accept;
|
|
274798
|
+
if (defaultPossible) {
|
|
274799
|
+
return defaultNetwork;
|
|
274800
|
+
}
|
|
274801
|
+
const network = await esm_default2({
|
|
274802
|
+
message: "Which blockchain network do you want to connect to?",
|
|
274803
|
+
choices: [
|
|
274804
|
+
...networks.map((network2) => ({
|
|
274805
|
+
name: network2.name,
|
|
274806
|
+
value: network2
|
|
274807
|
+
})),
|
|
274808
|
+
{
|
|
274809
|
+
name: "None",
|
|
274810
|
+
value: undefined
|
|
274811
|
+
}
|
|
274812
|
+
],
|
|
274813
|
+
default: defaultNetwork
|
|
274814
|
+
});
|
|
274815
|
+
return network;
|
|
274816
|
+
}
|
|
274817
|
+
|
|
274818
|
+
// src/commands/platform/blockchain-node/besu/create.ts
|
|
274819
|
+
function blockchainNodeBesuCreateCommand() {
|
|
274820
|
+
return getCreateCommand({
|
|
274821
|
+
name: "besu",
|
|
274822
|
+
type: "blockchain node",
|
|
274823
|
+
alias: "b",
|
|
274824
|
+
execute: (cmd2, baseAction) => {
|
|
274825
|
+
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", "NOTARY", "ORDERER", "PEER", "UNSPECIFIED"]).makeOptionMandatory()).action(async (name2, {
|
|
274826
|
+
applicationId,
|
|
274827
|
+
provider,
|
|
274828
|
+
region,
|
|
274829
|
+
size,
|
|
274830
|
+
type: type4,
|
|
274831
|
+
blockchainNetworkId,
|
|
274832
|
+
nodeType,
|
|
274833
|
+
nodeIdentity,
|
|
274834
|
+
acceptDefaults,
|
|
274835
|
+
...defaultArgs
|
|
274836
|
+
}) => {
|
|
274837
|
+
return baseAction(defaultArgs, async (settlemint, env2) => {
|
|
274838
|
+
const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
|
|
274839
|
+
if (!application) {
|
|
274840
|
+
cancel2("No application found");
|
|
274841
|
+
}
|
|
274842
|
+
let networkId = blockchainNetworkId ?? (acceptDefaults ? 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");
|
|
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
|
|
@@ -276508,4 +276612,4 @@ sdkcli.parseAsync(process.argv).catch((reason) => {
|
|
|
276508
276612
|
cancel2(reason);
|
|
276509
276613
|
});
|
|
276510
276614
|
|
|
276511
|
-
//# debugId=
|
|
276615
|
+
//# debugId=25CF92331763736F64756E2164756E21
|