@settlemint/sdk-cli 2.4.0-pr04e7799a → 2.4.0-pr11c56f22
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 +90 -102
- package/dist/cli.js.map +33 -33
- package/package.json +6 -6
package/dist/cli.js
CHANGED
@@ -231623,7 +231623,7 @@ function size(value4) {
|
|
231623
231623
|
var init_size = () => {};
|
231624
231624
|
|
231625
231625
|
// ../../node_modules/viem/_esm/errors/version.js
|
231626
|
-
var version5 = "2.31.
|
231626
|
+
var version5 = "2.31.6";
|
231627
231627
|
|
231628
231628
|
// ../../node_modules/viem/_esm/errors/base.js
|
231629
231629
|
function walk(err, fn) {
|
@@ -238855,7 +238855,7 @@ async function localBatchGatewayRequest(parameters) {
|
|
238855
238855
|
const responses = [];
|
238856
238856
|
await Promise.all(queries.map(async (query, i6) => {
|
238857
238857
|
try {
|
238858
|
-
responses[i6] = await ccipRequest(query);
|
238858
|
+
responses[i6] = query.urls.includes(localBatchGatewayUrl) ? await localBatchGatewayRequest({ data: query.data, ccipRequest }) : await ccipRequest(query);
|
238859
238859
|
failures[i6] = false;
|
238860
238860
|
} catch (err) {
|
238861
238861
|
failures[i6] = true;
|
@@ -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-pr11c56f22",
|
263844
263844
|
type: "module",
|
263845
263845
|
private: false,
|
263846
263846
|
license: "FSL-1.1-MIT",
|
@@ -263891,10 +263891,10 @@ 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-
|
263897
|
-
"@types/node": "24.0.
|
263894
|
+
"@settlemint/sdk-js": "2.4.0-pr11c56f22",
|
263895
|
+
"@settlemint/sdk-utils": "2.4.0-pr11c56f22",
|
263896
|
+
"@settlemint/sdk-viem": "2.4.0-pr11c56f22",
|
263897
|
+
"@types/node": "24.0.8",
|
263898
263898
|
"@types/semver": "7.7.0",
|
263899
263899
|
"@types/which": "3.0.4",
|
263900
263900
|
"get-tsconfig": "4.10.1",
|
@@ -263902,7 +263902,7 @@ var package_default = {
|
|
263902
263902
|
"is-in-ci": "1.0.0",
|
263903
263903
|
semver: "7.7.2",
|
263904
263904
|
slugify: "1.6.6",
|
263905
|
-
viem: "2.31.
|
263905
|
+
viem: "2.31.6",
|
263906
263906
|
which: "5.0.0",
|
263907
263907
|
yaml: "2.8.0",
|
263908
263908
|
yoctocolors: "2.1.1"
|
@@ -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,6 +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
|
}
|
326511
|
+
let hasRestarted = false;
|
326507
326512
|
function showSpinner() {
|
326508
326513
|
return spinner({
|
326509
326514
|
startMessage: `Waiting for ${type4} to be ${getActionLabel(action)}`,
|
@@ -326513,49 +326518,20 @@ async function waitForCompletion({
|
|
326513
326518
|
while (true) {
|
326514
326519
|
try {
|
326515
326520
|
const resource = await service.read(uniqueName);
|
326516
|
-
if (action === "pause" && (resource.status === "PAUSED" || resource.status === "AUTO_PAUSED")) {
|
326517
|
-
if (spinner2) {
|
326518
|
-
spinner2.text = `${capitalizeFirstLetter2(type4)} is ${getActionLabel(action)}`;
|
326519
|
-
} else {
|
326520
|
-
note(`${capitalizeFirstLetter2(type4)} is ${getActionLabel(action)}`);
|
326521
|
-
}
|
326522
|
-
return true;
|
326523
|
-
}
|
326524
|
-
if (action === "resume" && resource.status === "COMPLETED") {
|
326525
|
-
if (spinner2) {
|
326526
|
-
spinner2.text = `${capitalizeFirstLetter2(type4)} is ${getActionLabel(action)}`;
|
326527
|
-
} else {
|
326528
|
-
note(`${capitalizeFirstLetter2(type4)} is ${getActionLabel(action)}`);
|
326529
|
-
}
|
326530
|
-
return true;
|
326531
|
-
}
|
326532
|
-
if ((action === "deploy" || action === "destroy" || action === "restart") && resource.status === "COMPLETED") {
|
326533
|
-
if (spinner2) {
|
326534
|
-
spinner2.text = `${capitalizeFirstLetter2(type4)} is ${getActionLabel(action)}`;
|
326535
|
-
} else {
|
326536
|
-
note(`${capitalizeFirstLetter2(type4)} is ${getActionLabel(action)}`);
|
326537
|
-
}
|
326538
|
-
return true;
|
326539
|
-
}
|
326540
326521
|
if (resource.status === "FAILED") {
|
326541
|
-
|
326542
|
-
|
326543
|
-
|
326544
|
-
note(`${capitalizeFirstLetter2(type4)} failed to ${getActionLabel(action)}`);
|
326522
|
+
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} failed to ${getActionLabel(action)}`);
|
326523
|
+
if (restartOnError) {
|
326524
|
+
throw new DeploymentFailedError;
|
326545
326525
|
}
|
326546
326526
|
return false;
|
326547
326527
|
}
|
326548
|
-
if (
|
326549
|
-
spinner2
|
326550
|
-
|
326551
|
-
note(`${capitalizeFirstLetter2(type4)} is not ready yet (status: ${resource.status})`);
|
326528
|
+
if (isActionComplete(action, resource.status)) {
|
326529
|
+
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} is ${getActionLabel(action)}`);
|
326530
|
+
return true;
|
326552
326531
|
}
|
326532
|
+
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} is not ready yet (status: ${resource.status})`);
|
326553
326533
|
} catch (_error) {
|
326554
|
-
|
326555
|
-
spinner2.text = `${capitalizeFirstLetter2(type4)} is not ready yet (status: UNKNOWN)`;
|
326556
|
-
} else {
|
326557
|
-
note(`${capitalizeFirstLetter2(type4)} is not ready yet (status: UNKNOWN)`);
|
326558
|
-
}
|
326534
|
+
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} is not ready yet (status: UNKNOWN)`);
|
326559
326535
|
}
|
326560
326536
|
if (Date.now() - startTime > maxTimeout) {
|
326561
326537
|
throw new TimeoutError2(`Operation timed out after ${maxTimeout / 60000} minutes for ${type4} with unique name ${uniqueName}`);
|
@@ -326568,29 +326544,59 @@ async function waitForCompletion({
|
|
326568
326544
|
try {
|
326569
326545
|
return await showSpinner();
|
326570
326546
|
} catch (error45) {
|
326571
|
-
|
326572
|
-
if (restartIfTimeout && isTimeoutError) {
|
326547
|
+
if (!hasRestarted && shouldRestart(error45, restartIfTimeout)) {
|
326573
326548
|
note(`Restarting ${capitalizeFirstLetter2(type4)}`);
|
326549
|
+
hasRestarted = true;
|
326574
326550
|
await service.restart(uniqueName);
|
326575
326551
|
return showSpinner();
|
326576
326552
|
}
|
326577
326553
|
throw error45;
|
326578
326554
|
}
|
326579
326555
|
}
|
326580
|
-
function
|
326581
|
-
|
326582
|
-
|
326583
|
-
|
326584
|
-
|
326585
|
-
return "destroyed";
|
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;
|
326586
326561
|
}
|
326587
|
-
|
326588
|
-
|
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;
|
326589
326583
|
}
|
326590
|
-
|
326591
|
-
|
326584
|
+
}
|
326585
|
+
function getActionLabel(action) {
|
326586
|
+
switch (action) {
|
326587
|
+
case "restart":
|
326588
|
+
return "restarted";
|
326589
|
+
case "destroy":
|
326590
|
+
return "destroyed";
|
326591
|
+
case "pause":
|
326592
|
+
return "paused";
|
326593
|
+
case "resume":
|
326594
|
+
return "resumed";
|
326595
|
+
case "deploy":
|
326596
|
+
return "deployed";
|
326597
|
+
default:
|
326598
|
+
return "deployed";
|
326592
326599
|
}
|
326593
|
-
return "deployed";
|
326594
326600
|
}
|
326595
326601
|
|
326596
326602
|
// src/prompts/provider.prompt.ts
|
@@ -326671,9 +326677,9 @@ function getCreateCommand({
|
|
326671
326677
|
cmd2.alias(alias);
|
326672
326678
|
}
|
326673
326679
|
if (requiresDeployment) {
|
326674
|
-
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");
|
326675
326681
|
}
|
326676
|
-
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) => {
|
326677
326683
|
intro(`Creating ${type4} in the SettleMint platform`);
|
326678
326684
|
const env2 = await loadEnv(false, !!prod);
|
326679
326685
|
const instance = await instancePrompt({ env: env2, accept: acceptDefaults });
|
@@ -326717,7 +326723,8 @@ function getCreateCommand({
|
|
326717
326723
|
type: waitFor?.resourceType ?? type4,
|
326718
326724
|
uniqueName: waitFor?.uniqueName ?? result.uniqueName,
|
326719
326725
|
action: "deploy",
|
326720
|
-
restartIfTimeout
|
326726
|
+
restartIfTimeout,
|
326727
|
+
restartOnError
|
326721
326728
|
});
|
326722
326729
|
if (!isDeployed) {
|
326723
326730
|
throw new Error(`Failed to deploy ${waitFor?.resourceType ?? type4} ${waitFor?.uniqueName ?? result.uniqueName}`);
|
@@ -328192,21 +328199,22 @@ function deleteCommand() {
|
|
328192
328199
|
function getPauseCommand({
|
328193
328200
|
name: name3,
|
328194
328201
|
type: type4,
|
328195
|
-
subType,
|
328196
328202
|
alias,
|
328197
328203
|
envKey,
|
328198
328204
|
pauseFunction,
|
328199
328205
|
usePersonalAccessToken = true
|
328200
328206
|
}) {
|
328201
328207
|
const commandName = sanitizeCommandName(name3);
|
328208
|
+
const typeCommandName = sanitizeCommandName(type4);
|
328209
|
+
const exampleCommandPrefix = `platform pause ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
328202
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([
|
328203
328211
|
{
|
328204
|
-
description: `Pauses the specified ${type4} by
|
328205
|
-
command:
|
328212
|
+
description: `Pauses the specified ${type4} by unique name`,
|
328213
|
+
command: `${exampleCommandPrefix} <unique-name>`
|
328206
328214
|
},
|
328207
328215
|
{
|
328208
328216
|
description: `Pauses the default ${type4} in the production environment`,
|
328209
|
-
command:
|
328217
|
+
command: `${exampleCommandPrefix} default --prod`
|
328210
328218
|
}
|
328211
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 }) => {
|
328212
328220
|
intro(`Pausing ${type4} in the SettleMint platform`);
|
@@ -328241,7 +328249,7 @@ function getPauseCommand({
|
|
328241
328249
|
action: "pause"
|
328242
328250
|
});
|
328243
328251
|
if (!isPaused) {
|
328244
|
-
throw new Error(`Failed to pause ${type4} ${
|
328252
|
+
throw new Error(`Failed to pause ${type4} ${serviceUniqueName}`);
|
328245
328253
|
}
|
328246
328254
|
}
|
328247
328255
|
outro(`${capitalizeFirstLetter2(type4)} ${result.name} pause initiated successfully`);
|
@@ -328292,7 +328300,6 @@ function blockscoutPauseCommand() {
|
|
328292
328300
|
return getPauseCommand({
|
328293
328301
|
name: "blockscout",
|
328294
328302
|
type: "insights",
|
328295
|
-
subType: "blockscout",
|
328296
328303
|
alias: "bs",
|
328297
328304
|
envKey: "SETTLEMINT_BLOCKSCOUT",
|
328298
328305
|
pauseFunction: async (settlemint, id) => {
|
@@ -328306,7 +328313,6 @@ function hasuraPauseCommand() {
|
|
328306
328313
|
return getPauseCommand({
|
328307
328314
|
name: "hasura",
|
328308
328315
|
type: "integration tool",
|
328309
|
-
subType: "hasura",
|
328310
328316
|
alias: "ha",
|
328311
328317
|
envKey: "SETTLEMINT_HASURA",
|
328312
328318
|
pauseFunction: async (settlemint, id) => {
|
@@ -328320,7 +328326,6 @@ function evmLoadBalancerPauseCommand() {
|
|
328320
328326
|
return getPauseCommand({
|
328321
328327
|
name: "evm",
|
328322
328328
|
type: "load balancer",
|
328323
|
-
subType: "evm",
|
328324
328329
|
alias: "lb",
|
328325
328330
|
envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
|
328326
328331
|
pauseFunction: async (settlemint, id) => {
|
@@ -328334,7 +328339,6 @@ function graphMiddlewarePauseCommand() {
|
|
328334
328339
|
return getPauseCommand({
|
328335
328340
|
name: "graph",
|
328336
328341
|
type: "middleware",
|
328337
|
-
subType: "graph",
|
328338
328342
|
alias: "gr",
|
328339
328343
|
envKey: "SETTLEMINT_THEGRAPH",
|
328340
328344
|
pauseFunction: async (settlemint, id) => {
|
@@ -328348,7 +328352,6 @@ function smartContractPortalMiddlewarePauseCommand() {
|
|
328348
328352
|
return getPauseCommand({
|
328349
328353
|
name: "smart-contract-portal",
|
328350
328354
|
type: "middleware",
|
328351
|
-
subType: "smart-contract-portal",
|
328352
328355
|
alias: "scp",
|
328353
328356
|
envKey: "SETTLEMINT_PORTAL",
|
328354
328357
|
pauseFunction: async (settlemint, id) => {
|
@@ -328362,7 +328365,6 @@ function accessibleEcdsaP256PrivateKeyPauseCommand() {
|
|
328362
328365
|
return getPauseCommand({
|
328363
328366
|
name: "accessible-ecdsa-p256",
|
328364
328367
|
type: "private key",
|
328365
|
-
subType: "accessible-ecdsa-p256",
|
328366
328368
|
alias: "acc",
|
328367
328369
|
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
328368
328370
|
pauseFunction: async (settlemint, id) => {
|
@@ -328376,7 +328378,6 @@ function hdEcdsaP256PrivateKeyPauseCommand() {
|
|
328376
328378
|
return getPauseCommand({
|
328377
328379
|
name: "hd-ecdsa-p256",
|
328378
328380
|
type: "private key",
|
328379
|
-
subType: "hd-ecdsa-p256",
|
328380
328381
|
alias: "hd",
|
328381
328382
|
envKey: "SETTLEMINT_HD_PRIVATE_KEY",
|
328382
328383
|
pauseFunction: async (settlemint, id) => {
|
@@ -328390,7 +328391,6 @@ function ipfsStoragePauseCommand() {
|
|
328390
328391
|
return getPauseCommand({
|
328391
328392
|
name: "ipfs",
|
328392
328393
|
type: "storage",
|
328393
|
-
subType: "ipfs",
|
328394
328394
|
alias: "ip",
|
328395
328395
|
envKey: "SETTLEMINT_IPFS",
|
328396
328396
|
pauseFunction: async (settlemint, id) => {
|
@@ -328404,7 +328404,6 @@ function minioStoragePauseCommand() {
|
|
328404
328404
|
return getPauseCommand({
|
328405
328405
|
name: "minio",
|
328406
328406
|
type: "storage",
|
328407
|
-
subType: "minio",
|
328408
328407
|
alias: "m",
|
328409
328408
|
envKey: "SETTLEMINT_MINIO",
|
328410
328409
|
pauseFunction: async (settlemint, id) => {
|
@@ -328423,21 +328422,22 @@ function pauseCommand() {
|
|
328423
328422
|
function getRestartCommand({
|
328424
328423
|
name: name3,
|
328425
328424
|
type: type4,
|
328426
|
-
subType,
|
328427
328425
|
alias,
|
328428
328426
|
envKey,
|
328429
328427
|
restartFunction,
|
328430
328428
|
usePersonalAccessToken = true
|
328431
328429
|
}) {
|
328432
328430
|
const commandName = sanitizeCommandName(name3);
|
328431
|
+
const typeCommandName = sanitizeCommandName(type4);
|
328432
|
+
const exampleCommandPrefix = `platform restart ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
328433
328433
|
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([
|
328434
328434
|
{
|
328435
|
-
description: `Restarts the specified ${type4} by
|
328436
|
-
command:
|
328435
|
+
description: `Restarts the specified ${type4} by unique name`,
|
328436
|
+
command: `${exampleCommandPrefix} <unique-name>`
|
328437
328437
|
},
|
328438
328438
|
{
|
328439
328439
|
description: `Restarts the default ${type4} in the production environment`,
|
328440
|
-
command:
|
328440
|
+
command: `${exampleCommandPrefix} default --prod`
|
328441
328441
|
}
|
328442
328442
|
])).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 }) => {
|
328443
328443
|
intro(`Restarting ${type4} in the SettleMint platform`);
|
@@ -328524,7 +328524,6 @@ function blockscoutRestartCommand() {
|
|
328524
328524
|
return getRestartCommand({
|
328525
328525
|
name: "blockscout",
|
328526
328526
|
type: "insights",
|
328527
|
-
subType: "blockscout",
|
328528
328527
|
alias: "bs",
|
328529
328528
|
envKey: "SETTLEMINT_BLOCKSCOUT",
|
328530
328529
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -328543,7 +328542,6 @@ function hasuraRestartCommand() {
|
|
328543
328542
|
return getRestartCommand({
|
328544
328543
|
name: "hasura",
|
328545
328544
|
type: "integration tool",
|
328546
|
-
subType: "hasura",
|
328547
328545
|
alias: "ha",
|
328548
328546
|
envKey: "SETTLEMINT_HASURA",
|
328549
328547
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -328575,7 +328573,6 @@ function graphRestartCommand() {
|
|
328575
328573
|
return getRestartCommand({
|
328576
328574
|
name: "graph",
|
328577
328575
|
type: "middleware",
|
328578
|
-
subType: "graph",
|
328579
328576
|
alias: "gr",
|
328580
328577
|
envKey: "SETTLEMINT_THEGRAPH",
|
328581
328578
|
restartFunction: async (settlemint, id) => {
|
@@ -328589,7 +328586,6 @@ function smartContractPortalRestartCommand() {
|
|
328589
328586
|
return getRestartCommand({
|
328590
328587
|
name: "smart-contract-portal",
|
328591
328588
|
type: "middleware",
|
328592
|
-
subType: "smart-contract-portal",
|
328593
328589
|
alias: "scp",
|
328594
328590
|
envKey: "SETTLEMINT_PORTAL",
|
328595
328591
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -328644,21 +328640,22 @@ function restartCommand() {
|
|
328644
328640
|
function getResumeCommand({
|
328645
328641
|
name: name3,
|
328646
328642
|
type: type4,
|
328647
|
-
subType,
|
328648
328643
|
alias,
|
328649
328644
|
envKey,
|
328650
328645
|
resumeFunction,
|
328651
328646
|
usePersonalAccessToken = true
|
328652
328647
|
}) {
|
328653
328648
|
const commandName = sanitizeCommandName(name3);
|
328649
|
+
const typeCommandName = sanitizeCommandName(type4);
|
328650
|
+
const exampleCommandPrefix = `platform resume ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
328654
328651
|
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([
|
328655
328652
|
{
|
328656
|
-
description: `Resumes the specified ${type4} by
|
328657
|
-
command:
|
328653
|
+
description: `Resumes the specified ${type4} by unique name`,
|
328654
|
+
command: `${exampleCommandPrefix} <unique-name>`
|
328658
328655
|
},
|
328659
328656
|
{
|
328660
328657
|
description: `Resumes the default ${type4} in the production environment`,
|
328661
|
-
command:
|
328658
|
+
command: `${exampleCommandPrefix} default --prod`
|
328662
328659
|
}
|
328663
328660
|
])).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 }) => {
|
328664
328661
|
intro(`Resuming ${type4} in the SettleMint platform`);
|
@@ -328693,7 +328690,7 @@ function getResumeCommand({
|
|
328693
328690
|
action: "resume"
|
328694
328691
|
});
|
328695
328692
|
if (!isResumed) {
|
328696
|
-
throw new Error(`Failed to resume ${type4} ${
|
328693
|
+
throw new Error(`Failed to resume ${type4} ${serviceUniqueName}`);
|
328697
328694
|
}
|
328698
328695
|
}
|
328699
328696
|
outro(`${capitalizeFirstLetter2(type4)} ${result.name} resume initiated successfully`);
|
@@ -328744,7 +328741,6 @@ function blockscoutResumeCommand() {
|
|
328744
328741
|
return getResumeCommand({
|
328745
328742
|
name: "blockscout",
|
328746
328743
|
type: "insights",
|
328747
|
-
subType: "blockscout",
|
328748
328744
|
alias: "bs",
|
328749
328745
|
envKey: "SETTLEMINT_BLOCKSCOUT",
|
328750
328746
|
resumeFunction: async (settlemint, id) => {
|
@@ -328758,7 +328754,6 @@ function hasuraResumeCommand() {
|
|
328758
328754
|
return getResumeCommand({
|
328759
328755
|
name: "hasura",
|
328760
328756
|
type: "integration tool",
|
328761
|
-
subType: "hasura",
|
328762
328757
|
alias: "ha",
|
328763
328758
|
envKey: "SETTLEMINT_HASURA",
|
328764
328759
|
resumeFunction: async (settlemint, id) => {
|
@@ -328772,7 +328767,6 @@ function evmLoadBalancerResumeCommand() {
|
|
328772
328767
|
return getResumeCommand({
|
328773
328768
|
name: "evm",
|
328774
328769
|
type: "load balancer",
|
328775
|
-
subType: "evm",
|
328776
328770
|
alias: "lb",
|
328777
328771
|
envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
|
328778
328772
|
resumeFunction: async (settlemint, id) => {
|
@@ -328786,7 +328780,6 @@ function graphMiddlewareResumeCommand() {
|
|
328786
328780
|
return getResumeCommand({
|
328787
328781
|
name: "graph",
|
328788
328782
|
type: "middleware",
|
328789
|
-
subType: "graph",
|
328790
328783
|
alias: "gr",
|
328791
328784
|
envKey: "SETTLEMINT_THEGRAPH",
|
328792
328785
|
resumeFunction: async (settlemint, id) => {
|
@@ -328800,7 +328793,6 @@ function smartContractPortalMiddlewareResumeCommand() {
|
|
328800
328793
|
return getResumeCommand({
|
328801
328794
|
name: "smart-contract-portal",
|
328802
328795
|
type: "middleware",
|
328803
|
-
subType: "smart-contract-portal",
|
328804
328796
|
alias: "scp",
|
328805
328797
|
envKey: "SETTLEMINT_PORTAL",
|
328806
328798
|
resumeFunction: async (settlemint, id) => {
|
@@ -328814,7 +328806,6 @@ function accessibleEcdsaP256PrivateKeyResumeCommand() {
|
|
328814
328806
|
return getResumeCommand({
|
328815
328807
|
name: "accessible-ecdsa-p256",
|
328816
328808
|
type: "private key",
|
328817
|
-
subType: "accessible-ecdsa-p256",
|
328818
328809
|
alias: "acc",
|
328819
328810
|
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
328820
328811
|
resumeFunction: async (settlemint, id) => {
|
@@ -328828,7 +328819,6 @@ function hdEcdsaP256PrivateKeyResumeCommand() {
|
|
328828
328819
|
return getResumeCommand({
|
328829
328820
|
name: "hd-ecdsa-p256",
|
328830
328821
|
type: "private key",
|
328831
|
-
subType: "hd-ecdsa-p256",
|
328832
328822
|
alias: "hd",
|
328833
328823
|
envKey: "SETTLEMINT_HD_PRIVATE_KEY",
|
328834
328824
|
resumeFunction: async (settlemint, id) => {
|
@@ -328842,7 +328832,6 @@ function ipfsStorageResumeCommand() {
|
|
328842
328832
|
return getResumeCommand({
|
328843
328833
|
name: "ipfs",
|
328844
328834
|
type: "storage",
|
328845
|
-
subType: "ipfs",
|
328846
328835
|
alias: "ip",
|
328847
328836
|
envKey: "SETTLEMINT_IPFS",
|
328848
328837
|
resumeFunction: async (settlemint, id) => {
|
@@ -328856,7 +328845,6 @@ function minioStorageResumeCommand() {
|
|
328856
328845
|
return getResumeCommand({
|
328857
328846
|
name: "minio",
|
328858
328847
|
type: "storage",
|
328859
|
-
subType: "minio",
|
328860
328848
|
alias: "m",
|
328861
328849
|
envKey: "SETTLEMINT_MINIO",
|
328862
328850
|
resumeFunction: async (settlemint, id) => {
|
@@ -330382,12 +330370,12 @@ async function getNodeName({
|
|
330382
330370
|
|
330383
330371
|
// src/commands/smart-contract-set/subgraph/build.ts
|
330384
330372
|
function subgraphBuildCommand() {
|
330385
|
-
return new Command("build").description("Build the subgraph").usage(createExamples([
|
330373
|
+
return new Command("build").description("Build the subgraph").option("--ipfs <ipfs-url>", "The IPFS URL to use for the subgraph deployment").usage(createExamples([
|
330386
330374
|
{
|
330387
330375
|
description: "Build the subgraph",
|
330388
330376
|
command: "scs subgraph build"
|
330389
330377
|
}
|
330390
|
-
])).action(async () => {
|
330378
|
+
])).action(async ({ ipfs }) => {
|
330391
330379
|
intro("Building subgraph");
|
330392
330380
|
await validateIfRequiredPackagesAreInstalled(["@graphprotocol/graph-cli"]);
|
330393
330381
|
await subgraphSetup({
|
@@ -330396,7 +330384,7 @@ function subgraphBuildCommand() {
|
|
330396
330384
|
const { command, args } = await getPackageManagerExecutable();
|
330397
330385
|
const subgraphYamlFile = await getSubgraphYamlFile();
|
330398
330386
|
await executeCommand(command, [...args, "graph", "codegen", subgraphYamlFile]);
|
330399
|
-
await executeCommand(command, [...args, "graph", "build", subgraphYamlFile]);
|
330387
|
+
await executeCommand(command, [...args, "graph", "build", ...ipfs ? ["--ipfs", ipfs] : [], subgraphYamlFile]);
|
330400
330388
|
outro("Subgraph built successfully");
|
330401
330389
|
});
|
330402
330390
|
}
|
@@ -330792,4 +330780,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
330792
330780
|
// src/cli.ts
|
330793
330781
|
sdkCliCommand();
|
330794
330782
|
|
330795
|
-
//# debugId=
|
330783
|
+
//# debugId=8B8815AD805B488464756E2164756E21
|