@settlemint/sdk-cli 2.4.0-pr533b825c → 2.4.0-pr5a0551e6
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 +117 -104
- package/dist/cli.js.map +40 -34
- package/package.json +4 -4
package/dist/cli.js
CHANGED
@@ -263840,7 +263840,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
263840
263840
|
var package_default = {
|
263841
263841
|
name: "@settlemint/sdk-cli",
|
263842
263842
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
263843
|
-
version: "2.4.0-
|
263843
|
+
version: "2.4.0-pr5a0551e6",
|
263844
263844
|
type: "module",
|
263845
263845
|
private: false,
|
263846
263846
|
license: "FSL-1.1-MIT",
|
@@ -263891,9 +263891,9 @@ var package_default = {
|
|
263891
263891
|
"@inquirer/input": "4.1.12",
|
263892
263892
|
"@inquirer/password": "4.0.15",
|
263893
263893
|
"@inquirer/select": "4.2.3",
|
263894
|
-
"@settlemint/sdk-js": "2.4.0-
|
263895
|
-
"@settlemint/sdk-utils": "2.4.0-
|
263896
|
-
"@settlemint/sdk-viem": "2.4.0-
|
263894
|
+
"@settlemint/sdk-js": "2.4.0-pr5a0551e6",
|
263895
|
+
"@settlemint/sdk-utils": "2.4.0-pr5a0551e6",
|
263896
|
+
"@settlemint/sdk-viem": "2.4.0-pr5a0551e6",
|
263897
263897
|
"@types/node": "24.0.8",
|
263898
263898
|
"@types/semver": "7.7.0",
|
263899
263899
|
"@types/which": "3.0.4",
|
@@ -326488,13 +326488,17 @@ function addClusterServiceArgs(cmd2) {
|
|
326488
326488
|
// src/commands/platform/utils/wait-for-completion.ts
|
326489
326489
|
class TimeoutError2 extends Error {
|
326490
326490
|
}
|
326491
|
+
|
326492
|
+
class DeploymentFailedError extends Error {
|
326493
|
+
}
|
326491
326494
|
async function waitForCompletion({
|
326492
326495
|
settlemint,
|
326493
326496
|
type: type4,
|
326494
326497
|
uniqueName,
|
326495
326498
|
action,
|
326496
326499
|
maxTimeout = 10 * 60 * 1000,
|
326497
|
-
restartIfTimeout = false
|
326500
|
+
restartIfTimeout = false,
|
326501
|
+
restartOnError = false
|
326498
326502
|
}) {
|
326499
326503
|
const serviceType = SETTLEMINT_CLIENT_MAP[type4];
|
326500
326504
|
if (serviceType === "workspace" || serviceType === "application" || serviceType === "foundry" || serviceType === "applicationAccessToken" || serviceType === "platform" || serviceType === "wallet") {
|
@@ -326504,26 +326508,7 @@ async function waitForCompletion({
|
|
326504
326508
|
if (!service || !("read" in service)) {
|
326505
326509
|
throw new Error(`Service ${serviceType} does not support status checking`);
|
326506
326510
|
}
|
326507
|
-
|
326508
|
-
if (spinner2) {
|
326509
|
-
spinner2.text = message;
|
326510
|
-
} else {
|
326511
|
-
note(message);
|
326512
|
-
}
|
326513
|
-
}
|
326514
|
-
function isActionComplete(action2, status) {
|
326515
|
-
switch (action2) {
|
326516
|
-
case "pause":
|
326517
|
-
return status === "PAUSED" || status === "AUTO_PAUSED";
|
326518
|
-
case "resume":
|
326519
|
-
case "deploy":
|
326520
|
-
case "destroy":
|
326521
|
-
case "restart":
|
326522
|
-
return status === "COMPLETED";
|
326523
|
-
default:
|
326524
|
-
return false;
|
326525
|
-
}
|
326526
|
-
}
|
326511
|
+
let hasRestarted = false;
|
326527
326512
|
function showSpinner() {
|
326528
326513
|
return spinner({
|
326529
326514
|
startMessage: `Waiting for ${type4} to be ${getActionLabel(action)}`,
|
@@ -326535,6 +326520,9 @@ async function waitForCompletion({
|
|
326535
326520
|
const resource = await service.read(uniqueName);
|
326536
326521
|
if (resource.status === "FAILED") {
|
326537
326522
|
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} failed to ${getActionLabel(action)}`);
|
326523
|
+
if (restartOnError) {
|
326524
|
+
throw new DeploymentFailedError;
|
326525
|
+
}
|
326538
326526
|
return false;
|
326539
326527
|
}
|
326540
326528
|
if (isActionComplete(action, resource.status)) {
|
@@ -326556,15 +326544,44 @@ async function waitForCompletion({
|
|
326556
326544
|
try {
|
326557
326545
|
return await showSpinner();
|
326558
326546
|
} catch (error45) {
|
326559
|
-
|
326560
|
-
if (restartIfTimeout && isTimeoutError) {
|
326547
|
+
if (!hasRestarted && shouldRestart(error45, restartIfTimeout)) {
|
326561
326548
|
note(`Restarting ${capitalizeFirstLetter2(type4)}`);
|
326549
|
+
hasRestarted = true;
|
326562
326550
|
await service.restart(uniqueName);
|
326563
326551
|
return showSpinner();
|
326564
326552
|
}
|
326565
326553
|
throw error45;
|
326566
326554
|
}
|
326567
326555
|
}
|
326556
|
+
function shouldRestart(error45, restartIfTimeout) {
|
326557
|
+
const isSpinnerError = error45 instanceof SpinnerError;
|
326558
|
+
const isDeploymentFailedError = error45 instanceof DeploymentFailedError || isSpinnerError && error45.originalError instanceof DeploymentFailedError;
|
326559
|
+
if (isDeploymentFailedError) {
|
326560
|
+
return true;
|
326561
|
+
}
|
326562
|
+
const isTimeoutError = error45 instanceof TimeoutError2 || isSpinnerError && error45.originalError instanceof TimeoutError2;
|
326563
|
+
return restartIfTimeout && isTimeoutError;
|
326564
|
+
}
|
326565
|
+
function updateStatus(spinner2, message) {
|
326566
|
+
if (spinner2) {
|
326567
|
+
spinner2.text = message;
|
326568
|
+
} else {
|
326569
|
+
note(message);
|
326570
|
+
}
|
326571
|
+
}
|
326572
|
+
function isActionComplete(action, status) {
|
326573
|
+
switch (action) {
|
326574
|
+
case "pause":
|
326575
|
+
return status === "PAUSED" || status === "AUTO_PAUSED";
|
326576
|
+
case "resume":
|
326577
|
+
case "deploy":
|
326578
|
+
case "destroy":
|
326579
|
+
case "restart":
|
326580
|
+
return status === "COMPLETED";
|
326581
|
+
default:
|
326582
|
+
return false;
|
326583
|
+
}
|
326584
|
+
}
|
326568
326585
|
function getActionLabel(action) {
|
326569
326586
|
switch (action) {
|
326570
326587
|
case "restart":
|
@@ -326660,9 +326677,9 @@ function getCreateCommand({
|
|
326660
326677
|
cmd2.alias(alias);
|
326661
326678
|
}
|
326662
326679
|
if (requiresDeployment) {
|
326663
|
-
cmd2.option("-w, --wait", "Wait until deployed").option("
|
326680
|
+
cmd2.option("-w, --wait", "Wait until deployed").option("--restart-if-timeout", "Restart if wait time is exceeded").option("--restart-on-error", "Restart if deployment fails");
|
326664
326681
|
}
|
326665
|
-
execute2(cmd2, async ({ acceptDefaults, prod, default: isDefault, wait: wait2, restartIfTimeout, provider, region }, createFunction) => {
|
326682
|
+
execute2(cmd2, async ({ acceptDefaults, prod, default: isDefault, wait: wait2, restartIfTimeout, restartOnError, provider, region }, createFunction) => {
|
326666
326683
|
intro(`Creating ${type4} in the SettleMint platform`);
|
326667
326684
|
const env2 = await loadEnv(false, !!prod);
|
326668
326685
|
const instance = await instancePrompt({ env: env2, accept: acceptDefaults });
|
@@ -326706,7 +326723,8 @@ function getCreateCommand({
|
|
326706
326723
|
type: waitFor?.resourceType ?? type4,
|
326707
326724
|
uniqueName: waitFor?.uniqueName ?? result.uniqueName,
|
326708
326725
|
action: "deploy",
|
326709
|
-
restartIfTimeout
|
326726
|
+
restartIfTimeout,
|
326727
|
+
restartOnError
|
326710
326728
|
});
|
326711
326729
|
if (!isDeployed) {
|
326712
326730
|
throw new Error(`Failed to deploy ${waitFor?.resourceType ?? type4} ${waitFor?.uniqueName ?? result.uniqueName}`);
|
@@ -328181,21 +328199,22 @@ function deleteCommand() {
|
|
328181
328199
|
function getPauseCommand({
|
328182
328200
|
name: name3,
|
328183
328201
|
type: type4,
|
328184
|
-
subType,
|
328185
328202
|
alias,
|
328186
328203
|
envKey,
|
328187
328204
|
pauseFunction,
|
328188
328205
|
usePersonalAccessToken = true
|
328189
328206
|
}) {
|
328190
328207
|
const commandName = sanitizeCommandName(name3);
|
328208
|
+
const typeCommandName = sanitizeCommandName(type4);
|
328209
|
+
const exampleCommandPrefix = `platform pause ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
328191
328210
|
return new Command(commandName).alias(alias).description(`Pause a ${type4} in the SettleMint platform. Provide the ${type4} unique name or use 'default' to pause the default ${type4} from your .env file.`).usage(createExamples([
|
328192
328211
|
{
|
328193
328212
|
description: `Pauses the specified ${type4} by unique name`,
|
328194
|
-
command:
|
328213
|
+
command: `${exampleCommandPrefix} <unique-name>`
|
328195
328214
|
},
|
328196
328215
|
{
|
328197
328216
|
description: `Pauses the default ${type4} in the production environment`,
|
328198
|
-
command:
|
328217
|
+
command: `${exampleCommandPrefix} default --prod`
|
328199
328218
|
}
|
328200
328219
|
])).argument("<unique-name>", `The unique name of the ${type4}, use 'default' to pause the default one from your .env file`).option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").option("-w, --wait", "Wait until paused").action(async (uniqueName, { acceptDefaults, prod, wait: wait2 }) => {
|
328201
328220
|
intro(`Pausing ${type4} in the SettleMint platform`);
|
@@ -328281,7 +328300,6 @@ function blockscoutPauseCommand() {
|
|
328281
328300
|
return getPauseCommand({
|
328282
328301
|
name: "blockscout",
|
328283
328302
|
type: "insights",
|
328284
|
-
subType: "blockscout",
|
328285
328303
|
alias: "bs",
|
328286
328304
|
envKey: "SETTLEMINT_BLOCKSCOUT",
|
328287
328305
|
pauseFunction: async (settlemint, id) => {
|
@@ -328290,12 +328308,16 @@ function blockscoutPauseCommand() {
|
|
328290
328308
|
});
|
328291
328309
|
}
|
328292
328310
|
|
328311
|
+
// src/commands/platform/insights/pause.ts
|
328312
|
+
function insightsPauseCommand() {
|
328313
|
+
return new Command("insights").alias("in").description("Pause an insights service in the SettleMint platform").addCommand(blockscoutPauseCommand());
|
328314
|
+
}
|
328315
|
+
|
328293
328316
|
// src/commands/platform/integration-tools/hasura/pause.ts
|
328294
328317
|
function hasuraPauseCommand() {
|
328295
328318
|
return getPauseCommand({
|
328296
328319
|
name: "hasura",
|
328297
328320
|
type: "integration tool",
|
328298
|
-
subType: "hasura",
|
328299
328321
|
alias: "ha",
|
328300
328322
|
envKey: "SETTLEMINT_HASURA",
|
328301
328323
|
pauseFunction: async (settlemint, id) => {
|
@@ -328304,12 +328326,16 @@ function hasuraPauseCommand() {
|
|
328304
328326
|
});
|
328305
328327
|
}
|
328306
328328
|
|
328307
|
-
// src/commands/platform/
|
328308
|
-
function
|
328329
|
+
// src/commands/platform/integration-tools/pause.ts
|
328330
|
+
function integrationToolPauseCommand() {
|
328331
|
+
return new Command("integration-tool").alias("it").description("Pause an integration tool service in the SettleMint platform").addCommand(hasuraPauseCommand());
|
328332
|
+
}
|
328333
|
+
|
328334
|
+
// src/commands/platform/load-balancer/pause.ts
|
328335
|
+
function loadBalancerPauseCommand() {
|
328309
328336
|
return getPauseCommand({
|
328310
328337
|
name: "evm",
|
328311
328338
|
type: "load balancer",
|
328312
|
-
subType: "evm",
|
328313
328339
|
alias: "lb",
|
328314
328340
|
envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
|
328315
328341
|
pauseFunction: async (settlemint, id) => {
|
@@ -328323,7 +328349,6 @@ function graphMiddlewarePauseCommand() {
|
|
328323
328349
|
return getPauseCommand({
|
328324
328350
|
name: "graph",
|
328325
328351
|
type: "middleware",
|
328326
|
-
subType: "graph",
|
328327
328352
|
alias: "gr",
|
328328
328353
|
envKey: "SETTLEMINT_THEGRAPH",
|
328329
328354
|
pauseFunction: async (settlemint, id) => {
|
@@ -328337,7 +328362,6 @@ function smartContractPortalMiddlewarePauseCommand() {
|
|
328337
328362
|
return getPauseCommand({
|
328338
328363
|
name: "smart-contract-portal",
|
328339
328364
|
type: "middleware",
|
328340
|
-
subType: "smart-contract-portal",
|
328341
328365
|
alias: "scp",
|
328342
328366
|
envKey: "SETTLEMINT_PORTAL",
|
328343
328367
|
pauseFunction: async (settlemint, id) => {
|
@@ -328346,28 +328370,18 @@ function smartContractPortalMiddlewarePauseCommand() {
|
|
328346
328370
|
});
|
328347
328371
|
}
|
328348
328372
|
|
328349
|
-
// src/commands/platform/
|
328350
|
-
function
|
328351
|
-
return
|
328352
|
-
name: "accessible-ecdsa-p256",
|
328353
|
-
type: "private key",
|
328354
|
-
subType: "accessible-ecdsa-p256",
|
328355
|
-
alias: "acc",
|
328356
|
-
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
328357
|
-
pauseFunction: async (settlemint, id) => {
|
328358
|
-
return settlemint.privateKey.pause(id);
|
328359
|
-
}
|
328360
|
-
});
|
328373
|
+
// src/commands/platform/middleware/pause.ts
|
328374
|
+
function middlewarePauseCommand() {
|
328375
|
+
return new Command("middleware").alias("mw").description("Pause a middleware service in the SettleMint platform").addCommand(graphMiddlewarePauseCommand()).addCommand(smartContractPortalMiddlewarePauseCommand());
|
328361
328376
|
}
|
328362
328377
|
|
328363
|
-
// src/commands/platform/private-key/
|
328364
|
-
function
|
328378
|
+
// src/commands/platform/private-key/pause.ts
|
328379
|
+
function privateKeyPauseCommand() {
|
328365
328380
|
return getPauseCommand({
|
328366
|
-
name: "
|
328381
|
+
name: "private-key",
|
328367
328382
|
type: "private key",
|
328368
|
-
|
328369
|
-
|
328370
|
-
envKey: "SETTLEMINT_HD_PRIVATE_KEY",
|
328383
|
+
alias: "pk",
|
328384
|
+
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
328371
328385
|
pauseFunction: async (settlemint, id) => {
|
328372
328386
|
return settlemint.privateKey.pause(id);
|
328373
328387
|
}
|
@@ -328379,7 +328393,6 @@ function ipfsStoragePauseCommand() {
|
|
328379
328393
|
return getPauseCommand({
|
328380
328394
|
name: "ipfs",
|
328381
328395
|
type: "storage",
|
328382
|
-
subType: "ipfs",
|
328383
328396
|
alias: "ip",
|
328384
328397
|
envKey: "SETTLEMINT_IPFS",
|
328385
328398
|
pauseFunction: async (settlemint, id) => {
|
@@ -328393,7 +328406,6 @@ function minioStoragePauseCommand() {
|
|
328393
328406
|
return getPauseCommand({
|
328394
328407
|
name: "minio",
|
328395
328408
|
type: "storage",
|
328396
|
-
subType: "minio",
|
328397
328409
|
alias: "m",
|
328398
328410
|
envKey: "SETTLEMINT_MINIO",
|
328399
328411
|
pauseFunction: async (settlemint, id) => {
|
@@ -328402,9 +328414,14 @@ function minioStoragePauseCommand() {
|
|
328402
328414
|
});
|
328403
328415
|
}
|
328404
328416
|
|
328417
|
+
// src/commands/platform/storage/pause.ts
|
328418
|
+
function storagePauseCommand() {
|
328419
|
+
return new Command("storage").alias("st").description("Pause a storage service in the SettleMint platform").addCommand(ipfsStoragePauseCommand()).addCommand(minioStoragePauseCommand());
|
328420
|
+
}
|
328421
|
+
|
328405
328422
|
// src/commands/platform/pause.ts
|
328406
328423
|
function pauseCommand() {
|
328407
|
-
const cmd2 = new Command("pause").description("Pause a resource in the SettleMint platform").addCommand(blockchainNodePauseCommand()).addCommand(blockchainNetworkPauseCommand()).addCommand(customDeploymentPauseCommand()).addCommand(
|
328424
|
+
const cmd2 = new Command("pause").description("Pause a resource in the SettleMint platform").addCommand(blockchainNodePauseCommand()).addCommand(blockchainNetworkPauseCommand()).addCommand(customDeploymentPauseCommand()).addCommand(insightsPauseCommand()).addCommand(integrationToolPauseCommand()).addCommand(loadBalancerPauseCommand()).addCommand(middlewarePauseCommand()).addCommand(privateKeyPauseCommand()).addCommand(storagePauseCommand());
|
328408
328425
|
return cmd2;
|
328409
328426
|
}
|
328410
328427
|
|
@@ -328412,21 +328429,22 @@ function pauseCommand() {
|
|
328412
328429
|
function getRestartCommand({
|
328413
328430
|
name: name3,
|
328414
328431
|
type: type4,
|
328415
|
-
subType,
|
328416
328432
|
alias,
|
328417
328433
|
envKey,
|
328418
328434
|
restartFunction,
|
328419
328435
|
usePersonalAccessToken = true
|
328420
328436
|
}) {
|
328421
328437
|
const commandName = sanitizeCommandName(name3);
|
328438
|
+
const typeCommandName = sanitizeCommandName(type4);
|
328439
|
+
const exampleCommandPrefix = `platform restart ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
328422
328440
|
return new Command(commandName).alias(alias).description(`Restart a ${type4} in the SettleMint platform. Provide the ${type4} unique name or use 'default' to restart the default ${type4} from your .env file.`).usage(createExamples([
|
328423
328441
|
{
|
328424
328442
|
description: `Restarts the specified ${type4} by unique name`,
|
328425
|
-
command:
|
328443
|
+
command: `${exampleCommandPrefix} <unique-name>`
|
328426
328444
|
},
|
328427
328445
|
{
|
328428
328446
|
description: `Restarts the default ${type4} in the production environment`,
|
328429
|
-
command:
|
328447
|
+
command: `${exampleCommandPrefix} default --prod`
|
328430
328448
|
}
|
328431
328449
|
])).argument("<unique-name>", `The unique name of the ${type4}, use 'default' to restart the default one from your .env file`).option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").option("-w, --wait", "Wait until restarted").action(async (uniqueName, { acceptDefaults, prod, wait: wait2 }) => {
|
328432
328450
|
intro(`Restarting ${type4} in the SettleMint platform`);
|
@@ -328513,7 +328531,6 @@ function blockscoutRestartCommand() {
|
|
328513
328531
|
return getRestartCommand({
|
328514
328532
|
name: "blockscout",
|
328515
328533
|
type: "insights",
|
328516
|
-
subType: "blockscout",
|
328517
328534
|
alias: "bs",
|
328518
328535
|
envKey: "SETTLEMINT_BLOCKSCOUT",
|
328519
328536
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -328532,7 +328549,6 @@ function hasuraRestartCommand() {
|
|
328532
328549
|
return getRestartCommand({
|
328533
328550
|
name: "hasura",
|
328534
328551
|
type: "integration tool",
|
328535
|
-
subType: "hasura",
|
328536
328552
|
alias: "ha",
|
328537
328553
|
envKey: "SETTLEMINT_HASURA",
|
328538
328554
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -328564,7 +328580,6 @@ function graphRestartCommand() {
|
|
328564
328580
|
return getRestartCommand({
|
328565
328581
|
name: "graph",
|
328566
328582
|
type: "middleware",
|
328567
|
-
subType: "graph",
|
328568
328583
|
alias: "gr",
|
328569
328584
|
envKey: "SETTLEMINT_THEGRAPH",
|
328570
328585
|
restartFunction: async (settlemint, id) => {
|
@@ -328578,7 +328593,6 @@ function smartContractPortalRestartCommand() {
|
|
328578
328593
|
return getRestartCommand({
|
328579
328594
|
name: "smart-contract-portal",
|
328580
328595
|
type: "middleware",
|
328581
|
-
subType: "smart-contract-portal",
|
328582
328596
|
alias: "scp",
|
328583
328597
|
envKey: "SETTLEMINT_PORTAL",
|
328584
328598
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -328633,21 +328647,22 @@ function restartCommand() {
|
|
328633
328647
|
function getResumeCommand({
|
328634
328648
|
name: name3,
|
328635
328649
|
type: type4,
|
328636
|
-
subType,
|
328637
328650
|
alias,
|
328638
328651
|
envKey,
|
328639
328652
|
resumeFunction,
|
328640
328653
|
usePersonalAccessToken = true
|
328641
328654
|
}) {
|
328642
328655
|
const commandName = sanitizeCommandName(name3);
|
328656
|
+
const typeCommandName = sanitizeCommandName(type4);
|
328657
|
+
const exampleCommandPrefix = `platform resume ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
328643
328658
|
return new Command(commandName).alias(alias).description(`Resume a ${type4} in the SettleMint platform. Provide the ${type4} unique name or use 'default' to resume the default ${type4} from your .env file.`).usage(createExamples([
|
328644
328659
|
{
|
328645
328660
|
description: `Resumes the specified ${type4} by unique name`,
|
328646
|
-
command:
|
328661
|
+
command: `${exampleCommandPrefix} <unique-name>`
|
328647
328662
|
},
|
328648
328663
|
{
|
328649
328664
|
description: `Resumes the default ${type4} in the production environment`,
|
328650
|
-
command:
|
328665
|
+
command: `${exampleCommandPrefix} default --prod`
|
328651
328666
|
}
|
328652
328667
|
])).argument("<unique-name>", `The unique name of the ${type4}, use 'default' to resume the default one from your .env file`).option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").option("-w, --wait", "Wait until resumed").action(async (uniqueName, { acceptDefaults, prod, wait: wait2 }) => {
|
328653
328668
|
intro(`Resuming ${type4} in the SettleMint platform`);
|
@@ -328733,7 +328748,6 @@ function blockscoutResumeCommand() {
|
|
328733
328748
|
return getResumeCommand({
|
328734
328749
|
name: "blockscout",
|
328735
328750
|
type: "insights",
|
328736
|
-
subType: "blockscout",
|
328737
328751
|
alias: "bs",
|
328738
328752
|
envKey: "SETTLEMINT_BLOCKSCOUT",
|
328739
328753
|
resumeFunction: async (settlemint, id) => {
|
@@ -328742,12 +328756,16 @@ function blockscoutResumeCommand() {
|
|
328742
328756
|
});
|
328743
328757
|
}
|
328744
328758
|
|
328759
|
+
// src/commands/platform/insights/resume.ts
|
328760
|
+
function insightsResumeCommand() {
|
328761
|
+
return new Command("insights").alias("in").description("Resume an insights service in the SettleMint platform").addCommand(blockscoutResumeCommand());
|
328762
|
+
}
|
328763
|
+
|
328745
328764
|
// src/commands/platform/integration-tools/hasura/resume.ts
|
328746
328765
|
function hasuraResumeCommand() {
|
328747
328766
|
return getResumeCommand({
|
328748
328767
|
name: "hasura",
|
328749
328768
|
type: "integration tool",
|
328750
|
-
subType: "hasura",
|
328751
328769
|
alias: "ha",
|
328752
328770
|
envKey: "SETTLEMINT_HASURA",
|
328753
328771
|
resumeFunction: async (settlemint, id) => {
|
@@ -328756,12 +328774,16 @@ function hasuraResumeCommand() {
|
|
328756
328774
|
});
|
328757
328775
|
}
|
328758
328776
|
|
328759
|
-
// src/commands/platform/
|
328760
|
-
function
|
328777
|
+
// src/commands/platform/integration-tools/resume.ts
|
328778
|
+
function integrationToolResumeCommand() {
|
328779
|
+
return new Command("integration-tool").alias("it").description("Resume an integration tool service in the SettleMint platform").addCommand(hasuraResumeCommand());
|
328780
|
+
}
|
328781
|
+
|
328782
|
+
// src/commands/platform/load-balancer/resume.ts
|
328783
|
+
function loadBalancerResumeCommand() {
|
328761
328784
|
return getResumeCommand({
|
328762
|
-
name: "
|
328785
|
+
name: "load-balancer",
|
328763
328786
|
type: "load balancer",
|
328764
|
-
subType: "evm",
|
328765
328787
|
alias: "lb",
|
328766
328788
|
envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
|
328767
328789
|
resumeFunction: async (settlemint, id) => {
|
@@ -328775,7 +328797,6 @@ function graphMiddlewareResumeCommand() {
|
|
328775
328797
|
return getResumeCommand({
|
328776
328798
|
name: "graph",
|
328777
328799
|
type: "middleware",
|
328778
|
-
subType: "graph",
|
328779
328800
|
alias: "gr",
|
328780
328801
|
envKey: "SETTLEMINT_THEGRAPH",
|
328781
328802
|
resumeFunction: async (settlemint, id) => {
|
@@ -328789,7 +328810,6 @@ function smartContractPortalMiddlewareResumeCommand() {
|
|
328789
328810
|
return getResumeCommand({
|
328790
328811
|
name: "smart-contract-portal",
|
328791
328812
|
type: "middleware",
|
328792
|
-
subType: "smart-contract-portal",
|
328793
328813
|
alias: "scp",
|
328794
328814
|
envKey: "SETTLEMINT_PORTAL",
|
328795
328815
|
resumeFunction: async (settlemint, id) => {
|
@@ -328798,28 +328818,18 @@ function smartContractPortalMiddlewareResumeCommand() {
|
|
328798
328818
|
});
|
328799
328819
|
}
|
328800
328820
|
|
328801
|
-
// src/commands/platform/
|
328802
|
-
function
|
328803
|
-
return
|
328804
|
-
name: "accessible-ecdsa-p256",
|
328805
|
-
type: "private key",
|
328806
|
-
subType: "accessible-ecdsa-p256",
|
328807
|
-
alias: "acc",
|
328808
|
-
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
328809
|
-
resumeFunction: async (settlemint, id) => {
|
328810
|
-
return settlemint.privateKey.resume(id);
|
328811
|
-
}
|
328812
|
-
});
|
328821
|
+
// src/commands/platform/middleware/resume.ts
|
328822
|
+
function middlewareResumeCommand() {
|
328823
|
+
return new Command("middleware").alias("mw").description("Resume a middleware service in the SettleMint platform").addCommand(graphMiddlewareResumeCommand()).addCommand(smartContractPortalMiddlewareResumeCommand());
|
328813
328824
|
}
|
328814
328825
|
|
328815
|
-
// src/commands/platform/private-key/
|
328816
|
-
function
|
328826
|
+
// src/commands/platform/private-key/resume.ts
|
328827
|
+
function privateKeyResumeCommand() {
|
328817
328828
|
return getResumeCommand({
|
328818
|
-
name: "
|
328829
|
+
name: "private-key",
|
328819
328830
|
type: "private key",
|
328820
|
-
|
328821
|
-
|
328822
|
-
envKey: "SETTLEMINT_HD_PRIVATE_KEY",
|
328831
|
+
alias: "pk",
|
328832
|
+
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
328823
328833
|
resumeFunction: async (settlemint, id) => {
|
328824
328834
|
return settlemint.privateKey.resume(id);
|
328825
328835
|
}
|
@@ -328831,7 +328841,6 @@ function ipfsStorageResumeCommand() {
|
|
328831
328841
|
return getResumeCommand({
|
328832
328842
|
name: "ipfs",
|
328833
328843
|
type: "storage",
|
328834
|
-
subType: "ipfs",
|
328835
328844
|
alias: "ip",
|
328836
328845
|
envKey: "SETTLEMINT_IPFS",
|
328837
328846
|
resumeFunction: async (settlemint, id) => {
|
@@ -328845,7 +328854,6 @@ function minioStorageResumeCommand() {
|
|
328845
328854
|
return getResumeCommand({
|
328846
328855
|
name: "minio",
|
328847
328856
|
type: "storage",
|
328848
|
-
subType: "minio",
|
328849
328857
|
alias: "m",
|
328850
328858
|
envKey: "SETTLEMINT_MINIO",
|
328851
328859
|
resumeFunction: async (settlemint, id) => {
|
@@ -328854,9 +328862,14 @@ function minioStorageResumeCommand() {
|
|
328854
328862
|
});
|
328855
328863
|
}
|
328856
328864
|
|
328865
|
+
// src/commands/platform/storage/resume.ts
|
328866
|
+
function storageResumeCommand() {
|
328867
|
+
return new Command("storage").alias("st").description("Resume a storage service in the SettleMint platform").addCommand(ipfsStorageResumeCommand()).addCommand(minioStorageResumeCommand());
|
328868
|
+
}
|
328869
|
+
|
328857
328870
|
// src/commands/platform/resume.ts
|
328858
328871
|
function resumeCommand() {
|
328859
|
-
const cmd2 = new Command("resume").description("Resume a resource in the SettleMint platform").addCommand(blockchainNodeResumeCommand()).addCommand(blockchainNetworkResumeCommand()).addCommand(customDeploymentResumeCommand()).addCommand(
|
328872
|
+
const cmd2 = new Command("resume").description("Resume a resource in the SettleMint platform").addCommand(blockchainNodeResumeCommand()).addCommand(blockchainNetworkResumeCommand()).addCommand(customDeploymentResumeCommand()).addCommand(insightsResumeCommand()).addCommand(integrationToolResumeCommand()).addCommand(loadBalancerResumeCommand()).addCommand(middlewareResumeCommand()).addCommand(privateKeyResumeCommand()).addCommand(storageResumeCommand());
|
328860
328873
|
return cmd2;
|
328861
328874
|
}
|
328862
328875
|
|
@@ -330371,12 +330384,12 @@ async function getNodeName({
|
|
330371
330384
|
|
330372
330385
|
// src/commands/smart-contract-set/subgraph/build.ts
|
330373
330386
|
function subgraphBuildCommand() {
|
330374
|
-
return new Command("build").description("Build the subgraph").usage(createExamples([
|
330387
|
+
return new Command("build").description("Build the subgraph").option("--ipfs <ipfs-url>", "The IPFS URL to use for the subgraph deployment").usage(createExamples([
|
330375
330388
|
{
|
330376
330389
|
description: "Build the subgraph",
|
330377
330390
|
command: "scs subgraph build"
|
330378
330391
|
}
|
330379
|
-
])).action(async () => {
|
330392
|
+
])).action(async ({ ipfs }) => {
|
330380
330393
|
intro("Building subgraph");
|
330381
330394
|
await validateIfRequiredPackagesAreInstalled(["@graphprotocol/graph-cli"]);
|
330382
330395
|
await subgraphSetup({
|
@@ -330385,7 +330398,7 @@ function subgraphBuildCommand() {
|
|
330385
330398
|
const { command, args } = await getPackageManagerExecutable();
|
330386
330399
|
const subgraphYamlFile = await getSubgraphYamlFile();
|
330387
330400
|
await executeCommand(command, [...args, "graph", "codegen", subgraphYamlFile]);
|
330388
|
-
await executeCommand(command, [...args, "graph", "build", subgraphYamlFile]);
|
330401
|
+
await executeCommand(command, [...args, "graph", "build", ...ipfs ? ["--ipfs", ipfs] : [], subgraphYamlFile]);
|
330389
330402
|
outro("Subgraph built successfully");
|
330390
330403
|
});
|
330391
330404
|
}
|
@@ -330781,4 +330794,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
330781
330794
|
// src/cli.ts
|
330782
330795
|
sdkCliCommand();
|
330783
330796
|
|
330784
|
-
//# debugId=
|
330797
|
+
//# debugId=8CA00959ED7C90DD64756E2164756E21
|