@settlemint/sdk-cli 2.4.0-pr60c1cb59 → 2.4.0-pr62aee5c3
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 +86 -54
- package/dist/cli.js.map +20 -14
- package/package.json +9 -9
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-pr62aee5c3",
|
263844
263844
|
type: "module",
|
263845
263845
|
private: false,
|
263846
263846
|
license: "FSL-1.1-MIT",
|
@@ -263887,14 +263887,14 @@ var package_default = {
|
|
263887
263887
|
devDependencies: {
|
263888
263888
|
"@commander-js/extra-typings": "14.0.0",
|
263889
263889
|
commander: "14.0.0",
|
263890
|
-
"@inquirer/confirm": "5.1.
|
263891
|
-
"@inquirer/input": "4.
|
263892
|
-
"@inquirer/password": "4.0.
|
263893
|
-
"@inquirer/select": "4.2.
|
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.
|
263890
|
+
"@inquirer/confirm": "5.1.13",
|
263891
|
+
"@inquirer/input": "4.2.0",
|
263892
|
+
"@inquirer/password": "4.0.16",
|
263893
|
+
"@inquirer/select": "4.2.4",
|
263894
|
+
"@settlemint/sdk-js": "2.4.0-pr62aee5c3",
|
263895
|
+
"@settlemint/sdk-utils": "2.4.0-pr62aee5c3",
|
263896
|
+
"@settlemint/sdk-viem": "2.4.0-pr62aee5c3",
|
263897
|
+
"@types/node": "24.0.10",
|
263898
263898
|
"@types/semver": "7.7.0",
|
263899
263899
|
"@types/which": "3.0.4",
|
263900
263900
|
"get-tsconfig": "4.10.1",
|
@@ -303234,7 +303234,7 @@ var inputTheme = {
|
|
303234
303234
|
validationFailureMode: "keep"
|
303235
303235
|
};
|
303236
303236
|
var esm_default2 = createPrompt((config4, done) => {
|
303237
|
-
const { required: required4, validate: validate3 = () => true } = config4;
|
303237
|
+
const { required: required4, validate: validate3 = () => true, prefill = "tab" } = config4;
|
303238
303238
|
const theme = makeTheme(inputTheme, config4.theme);
|
303239
303239
|
const [status, setStatus] = useState("idle");
|
303240
303240
|
const [defaultValue = "", setDefaultValue] = useState(config4.default);
|
@@ -303274,6 +303274,12 @@ var esm_default2 = createPrompt((config4, done) => {
|
|
303274
303274
|
setError(undefined);
|
303275
303275
|
}
|
303276
303276
|
});
|
303277
|
+
useEffect((rl) => {
|
303278
|
+
if (prefill === "editable" && defaultValue) {
|
303279
|
+
rl.write(defaultValue);
|
303280
|
+
setValue(defaultValue);
|
303281
|
+
}
|
303282
|
+
}, []);
|
303277
303283
|
const message = theme.style.message(config4.message, status);
|
303278
303284
|
let formattedValue = value4;
|
303279
303285
|
if (typeof config4.transformer === "function") {
|
@@ -326488,6 +326494,9 @@ function addClusterServiceArgs(cmd2) {
|
|
326488
326494
|
// src/commands/platform/utils/wait-for-completion.ts
|
326489
326495
|
class TimeoutError2 extends Error {
|
326490
326496
|
}
|
326497
|
+
|
326498
|
+
class DeploymentFailedError extends Error {
|
326499
|
+
}
|
326491
326500
|
async function waitForCompletion({
|
326492
326501
|
settlemint,
|
326493
326502
|
type: type4,
|
@@ -326505,6 +326514,7 @@ async function waitForCompletion({
|
|
326505
326514
|
if (!service || !("read" in service)) {
|
326506
326515
|
throw new Error(`Service ${serviceType} does not support status checking`);
|
326507
326516
|
}
|
326517
|
+
let hasRestarted = false;
|
326508
326518
|
function showSpinner() {
|
326509
326519
|
return spinner({
|
326510
326520
|
startMessage: `Waiting for ${type4} to be ${getActionLabel(action)}`,
|
@@ -326517,8 +326527,7 @@ async function waitForCompletion({
|
|
326517
326527
|
if (resource.status === "FAILED") {
|
326518
326528
|
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} failed to ${getActionLabel(action)}`);
|
326519
326529
|
if (restartOnError) {
|
326520
|
-
|
326521
|
-
await service.restart(uniqueName);
|
326530
|
+
throw new DeploymentFailedError;
|
326522
326531
|
}
|
326523
326532
|
return false;
|
326524
326533
|
}
|
@@ -326541,15 +326550,24 @@ async function waitForCompletion({
|
|
326541
326550
|
try {
|
326542
326551
|
return await showSpinner();
|
326543
326552
|
} catch (error45) {
|
326544
|
-
|
326545
|
-
if (restartIfTimeout && isTimeoutError) {
|
326553
|
+
if (!hasRestarted && shouldRestart(error45, restartIfTimeout)) {
|
326546
326554
|
note(`Restarting ${capitalizeFirstLetter2(type4)}`);
|
326555
|
+
hasRestarted = true;
|
326547
326556
|
await service.restart(uniqueName);
|
326548
326557
|
return showSpinner();
|
326549
326558
|
}
|
326550
326559
|
throw error45;
|
326551
326560
|
}
|
326552
326561
|
}
|
326562
|
+
function shouldRestart(error45, restartIfTimeout) {
|
326563
|
+
const isSpinnerError = error45 instanceof SpinnerError;
|
326564
|
+
const isDeploymentFailedError = error45 instanceof DeploymentFailedError || isSpinnerError && error45.originalError instanceof DeploymentFailedError;
|
326565
|
+
if (isDeploymentFailedError) {
|
326566
|
+
return true;
|
326567
|
+
}
|
326568
|
+
const isTimeoutError = error45 instanceof TimeoutError2 || isSpinnerError && error45.originalError instanceof TimeoutError2;
|
326569
|
+
return restartIfTimeout && isTimeoutError;
|
326570
|
+
}
|
326553
326571
|
function updateStatus(spinner2, message) {
|
326554
326572
|
if (spinner2) {
|
326555
326573
|
spinner2.text = message;
|
@@ -328296,6 +328314,11 @@ function blockscoutPauseCommand() {
|
|
328296
328314
|
});
|
328297
328315
|
}
|
328298
328316
|
|
328317
|
+
// src/commands/platform/insights/pause.ts
|
328318
|
+
function insightsPauseCommand() {
|
328319
|
+
return new Command("insights").alias("in").description("Pause an insights service in the SettleMint platform").addCommand(blockscoutPauseCommand());
|
328320
|
+
}
|
328321
|
+
|
328299
328322
|
// src/commands/platform/integration-tools/hasura/pause.ts
|
328300
328323
|
function hasuraPauseCommand() {
|
328301
328324
|
return getPauseCommand({
|
@@ -328309,8 +328332,13 @@ function hasuraPauseCommand() {
|
|
328309
328332
|
});
|
328310
328333
|
}
|
328311
328334
|
|
328312
|
-
// src/commands/platform/
|
328313
|
-
function
|
328335
|
+
// src/commands/platform/integration-tools/pause.ts
|
328336
|
+
function integrationToolPauseCommand() {
|
328337
|
+
return new Command("integration-tool").alias("it").description("Pause an integration tool service in the SettleMint platform").addCommand(hasuraPauseCommand());
|
328338
|
+
}
|
328339
|
+
|
328340
|
+
// src/commands/platform/load-balancer/pause.ts
|
328341
|
+
function loadBalancerPauseCommand() {
|
328314
328342
|
return getPauseCommand({
|
328315
328343
|
name: "evm",
|
328316
328344
|
type: "load balancer",
|
@@ -328348,26 +328376,18 @@ function smartContractPortalMiddlewarePauseCommand() {
|
|
328348
328376
|
});
|
328349
328377
|
}
|
328350
328378
|
|
328351
|
-
// src/commands/platform/
|
328352
|
-
function
|
328353
|
-
return
|
328354
|
-
name: "accessible-ecdsa-p256",
|
328355
|
-
type: "private key",
|
328356
|
-
alias: "acc",
|
328357
|
-
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
328358
|
-
pauseFunction: async (settlemint, id) => {
|
328359
|
-
return settlemint.privateKey.pause(id);
|
328360
|
-
}
|
328361
|
-
});
|
328379
|
+
// src/commands/platform/middleware/pause.ts
|
328380
|
+
function middlewarePauseCommand() {
|
328381
|
+
return new Command("middleware").alias("mw").description("Pause a middleware service in the SettleMint platform").addCommand(graphMiddlewarePauseCommand()).addCommand(smartContractPortalMiddlewarePauseCommand());
|
328362
328382
|
}
|
328363
328383
|
|
328364
|
-
// src/commands/platform/private-key/
|
328365
|
-
function
|
328384
|
+
// src/commands/platform/private-key/pause.ts
|
328385
|
+
function privateKeyPauseCommand() {
|
328366
328386
|
return getPauseCommand({
|
328367
|
-
name: "
|
328387
|
+
name: "private-key",
|
328368
328388
|
type: "private key",
|
328369
|
-
alias: "
|
328370
|
-
envKey: "
|
328389
|
+
alias: "pk",
|
328390
|
+
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
328371
328391
|
pauseFunction: async (settlemint, id) => {
|
328372
328392
|
return settlemint.privateKey.pause(id);
|
328373
328393
|
}
|
@@ -328400,9 +328420,14 @@ function minioStoragePauseCommand() {
|
|
328400
328420
|
});
|
328401
328421
|
}
|
328402
328422
|
|
328423
|
+
// src/commands/platform/storage/pause.ts
|
328424
|
+
function storagePauseCommand() {
|
328425
|
+
return new Command("storage").alias("st").description("Pause a storage service in the SettleMint platform").addCommand(ipfsStoragePauseCommand()).addCommand(minioStoragePauseCommand());
|
328426
|
+
}
|
328427
|
+
|
328403
328428
|
// src/commands/platform/pause.ts
|
328404
328429
|
function pauseCommand() {
|
328405
|
-
const cmd2 = new Command("pause").description("Pause a resource in the SettleMint platform").addCommand(blockchainNodePauseCommand()).addCommand(blockchainNetworkPauseCommand()).addCommand(customDeploymentPauseCommand()).addCommand(
|
328430
|
+
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());
|
328406
328431
|
return cmd2;
|
328407
328432
|
}
|
328408
328433
|
|
@@ -328737,6 +328762,11 @@ function blockscoutResumeCommand() {
|
|
328737
328762
|
});
|
328738
328763
|
}
|
328739
328764
|
|
328765
|
+
// src/commands/platform/insights/resume.ts
|
328766
|
+
function insightsResumeCommand() {
|
328767
|
+
return new Command("insights").alias("in").description("Resume an insights service in the SettleMint platform").addCommand(blockscoutResumeCommand());
|
328768
|
+
}
|
328769
|
+
|
328740
328770
|
// src/commands/platform/integration-tools/hasura/resume.ts
|
328741
328771
|
function hasuraResumeCommand() {
|
328742
328772
|
return getResumeCommand({
|
@@ -328750,10 +328780,15 @@ function hasuraResumeCommand() {
|
|
328750
328780
|
});
|
328751
328781
|
}
|
328752
328782
|
|
328753
|
-
// src/commands/platform/
|
328754
|
-
function
|
328783
|
+
// src/commands/platform/integration-tools/resume.ts
|
328784
|
+
function integrationToolResumeCommand() {
|
328785
|
+
return new Command("integration-tool").alias("it").description("Resume an integration tool service in the SettleMint platform").addCommand(hasuraResumeCommand());
|
328786
|
+
}
|
328787
|
+
|
328788
|
+
// src/commands/platform/load-balancer/resume.ts
|
328789
|
+
function loadBalancerResumeCommand() {
|
328755
328790
|
return getResumeCommand({
|
328756
|
-
name: "
|
328791
|
+
name: "load-balancer",
|
328757
328792
|
type: "load balancer",
|
328758
328793
|
alias: "lb",
|
328759
328794
|
envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
|
@@ -328789,26 +328824,18 @@ function smartContractPortalMiddlewareResumeCommand() {
|
|
328789
328824
|
});
|
328790
328825
|
}
|
328791
328826
|
|
328792
|
-
// src/commands/platform/
|
328793
|
-
function
|
328794
|
-
return
|
328795
|
-
name: "accessible-ecdsa-p256",
|
328796
|
-
type: "private key",
|
328797
|
-
alias: "acc",
|
328798
|
-
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
328799
|
-
resumeFunction: async (settlemint, id) => {
|
328800
|
-
return settlemint.privateKey.resume(id);
|
328801
|
-
}
|
328802
|
-
});
|
328827
|
+
// src/commands/platform/middleware/resume.ts
|
328828
|
+
function middlewareResumeCommand() {
|
328829
|
+
return new Command("middleware").alias("mw").description("Resume a middleware service in the SettleMint platform").addCommand(graphMiddlewareResumeCommand()).addCommand(smartContractPortalMiddlewareResumeCommand());
|
328803
328830
|
}
|
328804
328831
|
|
328805
|
-
// src/commands/platform/private-key/
|
328806
|
-
function
|
328832
|
+
// src/commands/platform/private-key/resume.ts
|
328833
|
+
function privateKeyResumeCommand() {
|
328807
328834
|
return getResumeCommand({
|
328808
|
-
name: "
|
328835
|
+
name: "private-key",
|
328809
328836
|
type: "private key",
|
328810
|
-
alias: "
|
328811
|
-
envKey: "
|
328837
|
+
alias: "pk",
|
328838
|
+
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
328812
328839
|
resumeFunction: async (settlemint, id) => {
|
328813
328840
|
return settlemint.privateKey.resume(id);
|
328814
328841
|
}
|
@@ -328841,9 +328868,14 @@ function minioStorageResumeCommand() {
|
|
328841
328868
|
});
|
328842
328869
|
}
|
328843
328870
|
|
328871
|
+
// src/commands/platform/storage/resume.ts
|
328872
|
+
function storageResumeCommand() {
|
328873
|
+
return new Command("storage").alias("st").description("Resume a storage service in the SettleMint platform").addCommand(ipfsStorageResumeCommand()).addCommand(minioStorageResumeCommand());
|
328874
|
+
}
|
328875
|
+
|
328844
328876
|
// src/commands/platform/resume.ts
|
328845
328877
|
function resumeCommand() {
|
328846
|
-
const cmd2 = new Command("resume").description("Resume a resource in the SettleMint platform").addCommand(blockchainNodeResumeCommand()).addCommand(blockchainNetworkResumeCommand()).addCommand(customDeploymentResumeCommand()).addCommand(
|
328878
|
+
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());
|
328847
328879
|
return cmd2;
|
328848
328880
|
}
|
328849
328881
|
|
@@ -330768,4 +330800,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
330768
330800
|
// src/cli.ts
|
330769
330801
|
sdkCliCommand();
|
330770
330802
|
|
330771
|
-
//# debugId=
|
330803
|
+
//# debugId=EF66D7AC60A94B7964756E2164756E21
|