@settlemint/sdk-cli 2.4.0-pr131aa769 → 2.4.0-pr1867a66f
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 +749 -63
- package/dist/cli.js.map +43 -15
- 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-pr1867a66f",
|
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-pr1867a66f",
|
263895
|
+
"@settlemint/sdk-utils": "2.4.0-pr1867a66f",
|
263896
|
+
"@settlemint/sdk-viem": "2.4.0-pr1867a66f",
|
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"
|
@@ -288291,6 +288291,20 @@ var restartBlockchainNetwork = graphql(`
|
|
288291
288291
|
}
|
288292
288292
|
}
|
288293
288293
|
`, [BlockchainNetworkFragment]);
|
288294
|
+
var pauseBlockchainNetwork = graphql(`
|
288295
|
+
mutation PauseBlockchainNetwork($uniqueName: String!) {
|
288296
|
+
pauseBlockchainNetworkByUniqueName(uniqueName: $uniqueName) {
|
288297
|
+
...BlockchainNetwork
|
288298
|
+
}
|
288299
|
+
}
|
288300
|
+
`, [BlockchainNetworkFragment]);
|
288301
|
+
var resumeBlockchainNetwork = graphql(`
|
288302
|
+
mutation ResumeBlockchainNetwork($uniqueName: String!) {
|
288303
|
+
resumeBlockchainNetworkByUniqueName(uniqueName: $uniqueName) {
|
288304
|
+
...BlockchainNetwork
|
288305
|
+
}
|
288306
|
+
}
|
288307
|
+
`, [BlockchainNetworkFragment]);
|
288294
288308
|
var blockchainNetworkList = (gqlClient) => {
|
288295
288309
|
return async (applicationUniqueName) => {
|
288296
288310
|
const { blockchainNetworksByUniqueName: { items } } = await gqlClient.request(getBlockchainNetworks, { applicationUniqueName });
|
@@ -288325,6 +288339,14 @@ var blockchainNetworkRestart = (gqlClient) => async (blockchainNetworkUniqueName
|
|
288325
288339
|
const { restartBlockchainNetworkByUniqueName: blockchainNetwork } = await gqlClient.request(restartBlockchainNetwork, { uniqueName: blockchainNetworkUniqueName });
|
288326
288340
|
return blockchainNetwork;
|
288327
288341
|
};
|
288342
|
+
var blockchainNetworkPause = (gqlClient) => async (blockchainNetworkUniqueName) => {
|
288343
|
+
const { pauseBlockchainNetworkByUniqueName: blockchainNetwork } = await gqlClient.request(pauseBlockchainNetwork, { uniqueName: blockchainNetworkUniqueName });
|
288344
|
+
return blockchainNetwork;
|
288345
|
+
};
|
288346
|
+
var blockchainNetworkResume = (gqlClient) => async (blockchainNetworkUniqueName) => {
|
288347
|
+
const { resumeBlockchainNetworkByUniqueName: blockchainNetwork } = await gqlClient.request(resumeBlockchainNetwork, { uniqueName: blockchainNetworkUniqueName });
|
288348
|
+
return blockchainNetwork;
|
288349
|
+
};
|
288328
288350
|
var BlockchainNodeFragment = graphql(`
|
288329
288351
|
fragment BlockchainNode on BlockchainNode {
|
288330
288352
|
__typename
|
@@ -288458,6 +288480,20 @@ var restartBlockchainNode = graphql(`
|
|
288458
288480
|
}
|
288459
288481
|
}
|
288460
288482
|
`, [BlockchainNodeFragment]);
|
288483
|
+
var pauseBlockchainNode = graphql(`
|
288484
|
+
mutation PauseBlockchainNode($uniqueName: String!) {
|
288485
|
+
pauseBlockchainNodeByUniqueName(uniqueName: $uniqueName) {
|
288486
|
+
...BlockchainNode
|
288487
|
+
}
|
288488
|
+
}
|
288489
|
+
`, [BlockchainNodeFragment]);
|
288490
|
+
var resumeBlockchainNode = graphql(`
|
288491
|
+
mutation ResumeBlockchainNode($uniqueName: String!) {
|
288492
|
+
resumeBlockchainNodeByUniqueName(uniqueName: $uniqueName) {
|
288493
|
+
...BlockchainNode
|
288494
|
+
}
|
288495
|
+
}
|
288496
|
+
`, [BlockchainNodeFragment]);
|
288461
288497
|
var blockchainNodeList = (gqlClient) => {
|
288462
288498
|
return async (applicationUniqueName) => {
|
288463
288499
|
const { blockchainNodesByUniqueName: { items } } = await gqlClient.request(getBlockchainNodes, { applicationUniqueName });
|
@@ -288486,6 +288522,14 @@ var blockchainNodeRestart = (gqlClient) => async (blockchainNodeUniqueName) => {
|
|
288486
288522
|
const { restartBlockchainNodeByUniqueName: blockchainNode } = await gqlClient.request(restartBlockchainNode, { uniqueName: blockchainNodeUniqueName });
|
288487
288523
|
return blockchainNode;
|
288488
288524
|
};
|
288525
|
+
var blockchainNodePause = (gqlClient) => async (blockchainNodeUniqueName) => {
|
288526
|
+
const { pauseBlockchainNodeByUniqueName: blockchainNode } = await gqlClient.request(pauseBlockchainNode, { uniqueName: blockchainNodeUniqueName });
|
288527
|
+
return blockchainNode;
|
288528
|
+
};
|
288529
|
+
var blockchainNodeResume = (gqlClient) => async (blockchainNodeUniqueName) => {
|
288530
|
+
const { resumeBlockchainNodeByUniqueName: blockchainNode } = await gqlClient.request(resumeBlockchainNode, { uniqueName: blockchainNodeUniqueName });
|
288531
|
+
return blockchainNode;
|
288532
|
+
};
|
288489
288533
|
var CustomDeploymentFragment = graphql(`
|
288490
288534
|
fragment CustomDeployment on CustomDeployment {
|
288491
288535
|
id
|
@@ -288568,6 +288612,20 @@ var restartCustomDeployment = graphql(`
|
|
288568
288612
|
}
|
288569
288613
|
}
|
288570
288614
|
`, [CustomDeploymentFragment]);
|
288615
|
+
var pauseCustomDeployment = graphql(`
|
288616
|
+
mutation PauseCustomDeployment($uniqueName: String!) {
|
288617
|
+
pauseCustomDeploymentByUniqueName(uniqueName: $uniqueName) {
|
288618
|
+
...CustomDeployment
|
288619
|
+
}
|
288620
|
+
}
|
288621
|
+
`, [CustomDeploymentFragment]);
|
288622
|
+
var resumeCustomDeployment = graphql(`
|
288623
|
+
mutation ResumeCustomDeployment($uniqueName: String!) {
|
288624
|
+
resumeCustomDeploymentByUniqueName(uniqueName: $uniqueName) {
|
288625
|
+
...CustomDeployment
|
288626
|
+
}
|
288627
|
+
}
|
288628
|
+
`, [CustomDeploymentFragment]);
|
288571
288629
|
var customdeploymentList = (gqlClient) => {
|
288572
288630
|
return async (applicationUniqueName) => {
|
288573
288631
|
const { customDeploymentsByUniqueName: { items } } = await gqlClient.request(getCustomDeployments, { applicationUniqueName });
|
@@ -288604,6 +288662,14 @@ var customDeploymentRestart = (gqlClient) => async (customDeploymentUniqueName)
|
|
288604
288662
|
const { restartCustomDeploymentByUniqueName: customDeployment } = await gqlClient.request(restartCustomDeployment, { uniqueName: customDeploymentUniqueName });
|
288605
288663
|
return customDeployment;
|
288606
288664
|
};
|
288665
|
+
var customDeploymentPause = (gqlClient) => async (customDeploymentUniqueName) => {
|
288666
|
+
const { pauseCustomDeploymentByUniqueName: customDeployment } = await gqlClient.request(pauseCustomDeployment, { uniqueName: customDeploymentUniqueName });
|
288667
|
+
return customDeployment;
|
288668
|
+
};
|
288669
|
+
var customDeploymentResume = (gqlClient) => async (customDeploymentUniqueName) => {
|
288670
|
+
const { resumeCustomDeploymentByUniqueName: customDeployment } = await gqlClient.request(resumeCustomDeployment, { uniqueName: customDeploymentUniqueName });
|
288671
|
+
return customDeployment;
|
288672
|
+
};
|
288607
288673
|
var getFoundryEnvConfig = graphql(`
|
288608
288674
|
query GetFoundryEnvConfig($blockchainNodeUniqueName: String!) {
|
288609
288675
|
foundryEnvConfigByUniqueName(blockchainNodeUniqueName: $blockchainNodeUniqueName)
|
@@ -288680,6 +288746,20 @@ var restartLoadBalancer = graphql(`
|
|
288680
288746
|
}
|
288681
288747
|
}
|
288682
288748
|
`, [LoadBalancerFragment]);
|
288749
|
+
var pauseLoadBalancer = graphql(`
|
288750
|
+
mutation PauseLoadBalancer($uniqueName: String!) {
|
288751
|
+
pauseLoadBalancerByUniqueName(uniqueName: $uniqueName) {
|
288752
|
+
...LoadBalancer
|
288753
|
+
}
|
288754
|
+
}
|
288755
|
+
`, [LoadBalancerFragment]);
|
288756
|
+
var resumeLoadBalancer = graphql(`
|
288757
|
+
mutation ResumeLoadBalancer($uniqueName: String!) {
|
288758
|
+
resumeLoadBalancerByUniqueName(uniqueName: $uniqueName) {
|
288759
|
+
...LoadBalancer
|
288760
|
+
}
|
288761
|
+
}
|
288762
|
+
`, [LoadBalancerFragment]);
|
288683
288763
|
var loadBalancerRead = (gqlClient) => {
|
288684
288764
|
return async (loadBalancerUniqueName) => {
|
288685
288765
|
const { loadBalancerByUniqueName: loadBalancer } = await gqlClient.request(getLoadBalancer, { uniqueName: loadBalancerUniqueName });
|
@@ -288713,6 +288793,14 @@ var loadBalancerRestart = (gqlClient) => async (loadBalancerUniqueName) => {
|
|
288713
288793
|
const { restartLoadBalancerByUniqueName: loadBalancer } = await gqlClient.request(restartLoadBalancer, { uniqueName: loadBalancerUniqueName });
|
288714
288794
|
return loadBalancer;
|
288715
288795
|
};
|
288796
|
+
var loadBalancerPause = (gqlClient) => async (loadBalancerUniqueName) => {
|
288797
|
+
const { pauseLoadBalancerByUniqueName: loadBalancer } = await gqlClient.request(pauseLoadBalancer, { uniqueName: loadBalancerUniqueName });
|
288798
|
+
return loadBalancer;
|
288799
|
+
};
|
288800
|
+
var loadBalancerResume = (gqlClient) => async (loadBalancerUniqueName) => {
|
288801
|
+
const { resumeLoadBalancerByUniqueName: loadBalancer } = await gqlClient.request(resumeLoadBalancer, { uniqueName: loadBalancerUniqueName });
|
288802
|
+
return loadBalancer;
|
288803
|
+
};
|
288716
288804
|
var InsightsFragment = graphql(`
|
288717
288805
|
fragment Insights on Insights {
|
288718
288806
|
__typename
|
@@ -288786,6 +288874,20 @@ var restartInsights = graphql(`
|
|
288786
288874
|
}
|
288787
288875
|
}
|
288788
288876
|
`, [InsightsFragment]);
|
288877
|
+
var pauseInsights = graphql(`
|
288878
|
+
mutation PauseInsights($uniqueName: String!) {
|
288879
|
+
pauseInsightsByUniqueName(uniqueName: $uniqueName) {
|
288880
|
+
...Insights
|
288881
|
+
}
|
288882
|
+
}
|
288883
|
+
`, [InsightsFragment]);
|
288884
|
+
var resumeInsights = graphql(`
|
288885
|
+
mutation ResumeInsights($uniqueName: String!) {
|
288886
|
+
resumeInsightsByUniqueName(uniqueName: $uniqueName) {
|
288887
|
+
...Insights
|
288888
|
+
}
|
288889
|
+
}
|
288890
|
+
`, [InsightsFragment]);
|
288789
288891
|
var insightsList = (gqlClient) => {
|
288790
288892
|
return async (applicationUniqueName) => {
|
288791
288893
|
const { insightsListByUniqueName: { items } } = await gqlClient.request(getInsights, { applicationUniqueName });
|
@@ -288819,6 +288921,14 @@ var insightsRestart = (gqlClient) => async (insightsUniqueName) => {
|
|
288819
288921
|
const { restartInsightsByUniqueName: insights } = await gqlClient.request(restartInsights, { uniqueName: insightsUniqueName });
|
288820
288922
|
return insights;
|
288821
288923
|
};
|
288924
|
+
var insightsPause = (gqlClient) => async (insightsUniqueName) => {
|
288925
|
+
const { pauseInsightsByUniqueName: insights } = await gqlClient.request(pauseInsights, { uniqueName: insightsUniqueName });
|
288926
|
+
return insights;
|
288927
|
+
};
|
288928
|
+
var insightsResume = (gqlClient) => async (insightsUniqueName) => {
|
288929
|
+
const { resumeInsightsByUniqueName: insights } = await gqlClient.request(resumeInsights, { uniqueName: insightsUniqueName });
|
288930
|
+
return insights;
|
288931
|
+
};
|
288822
288932
|
var IntegrationFragment = graphql(`
|
288823
288933
|
fragment Integration on Integration {
|
288824
288934
|
__typename
|
@@ -288888,6 +288998,20 @@ var restartIntegrationTool = graphql(`
|
|
288888
288998
|
}
|
288889
288999
|
}
|
288890
289000
|
`, [IntegrationFragment]);
|
289001
|
+
var pauseIntegrationTool = graphql(`
|
289002
|
+
mutation PauseIntegrationTool($uniqueName: String!) {
|
289003
|
+
pauseIntegrationByUniqueName(uniqueName: $uniqueName) {
|
289004
|
+
...Integration
|
289005
|
+
}
|
289006
|
+
}
|
289007
|
+
`, [IntegrationFragment]);
|
289008
|
+
var resumeIntegrationTool = graphql(`
|
289009
|
+
mutation ResumeIntegrationTool($uniqueName: String!) {
|
289010
|
+
resumeIntegrationByUniqueName(uniqueName: $uniqueName) {
|
289011
|
+
...Integration
|
289012
|
+
}
|
289013
|
+
}
|
289014
|
+
`, [IntegrationFragment]);
|
288891
289015
|
var integrationToolList = (gqlClient) => {
|
288892
289016
|
return async (applicationUniqueName) => {
|
288893
289017
|
const { integrationsByUniqueName: { items } } = await gqlClient.request(getIntegrations, { applicationUniqueName });
|
@@ -288915,6 +289039,14 @@ var integrationToolRestart = (gqlClient) => async (integrationUniqueName) => {
|
|
288915
289039
|
const { restartIntegrationByUniqueName: integration } = await gqlClient.request(restartIntegrationTool, { uniqueName: integrationUniqueName });
|
288916
289040
|
return integration;
|
288917
289041
|
};
|
289042
|
+
var integrationToolPause = (gqlClient) => async (integrationUniqueName) => {
|
289043
|
+
const { pauseIntegrationByUniqueName: integration } = await gqlClient.request(pauseIntegrationTool, { uniqueName: integrationUniqueName });
|
289044
|
+
return integration;
|
289045
|
+
};
|
289046
|
+
var integrationToolResume = (gqlClient) => async (integrationUniqueName) => {
|
289047
|
+
const { resumeIntegrationByUniqueName: integration } = await gqlClient.request(resumeIntegrationTool, { uniqueName: integrationUniqueName });
|
289048
|
+
return integration;
|
289049
|
+
};
|
288918
289050
|
var StorageFragment = graphql(`
|
288919
289051
|
fragment Storage on Storage {
|
288920
289052
|
__typename
|
@@ -288984,6 +289116,20 @@ var restartStorage = graphql(`
|
|
288984
289116
|
}
|
288985
289117
|
}
|
288986
289118
|
`, [StorageFragment]);
|
289119
|
+
var pauseStorage = graphql(`
|
289120
|
+
mutation PauseStorage($uniqueName: String!) {
|
289121
|
+
pauseStorageByUniqueName(uniqueName: $uniqueName) {
|
289122
|
+
...Storage
|
289123
|
+
}
|
289124
|
+
}
|
289125
|
+
`, [StorageFragment]);
|
289126
|
+
var resumeStorage = graphql(`
|
289127
|
+
mutation ResumeStorage($uniqueName: String!) {
|
289128
|
+
resumeStorageByUniqueName(uniqueName: $uniqueName) {
|
289129
|
+
...Storage
|
289130
|
+
}
|
289131
|
+
}
|
289132
|
+
`, [StorageFragment]);
|
288987
289133
|
var storageList = (gqlClient) => {
|
288988
289134
|
return async (applicationUniqueName) => {
|
288989
289135
|
const { storagesByUniqueName: { items } } = await gqlClient.request(getStorages, { applicationUniqueName });
|
@@ -289011,6 +289157,14 @@ var storageRestart = (gqlClient) => async (storageUniqueName) => {
|
|
289011
289157
|
const { restartStorageByUniqueName: storage } = await gqlClient.request(restartStorage, { uniqueName: storageUniqueName });
|
289012
289158
|
return storage;
|
289013
289159
|
};
|
289160
|
+
var storagePause = (gqlClient) => async (storageUniqueName) => {
|
289161
|
+
const { pauseStorageByUniqueName: storage } = await gqlClient.request(pauseStorage, { uniqueName: storageUniqueName });
|
289162
|
+
return storage;
|
289163
|
+
};
|
289164
|
+
var storageResume = (gqlClient) => async (storageUniqueName) => {
|
289165
|
+
const { resumeStorageByUniqueName: storage } = await gqlClient.request(resumeStorage, { uniqueName: storageUniqueName });
|
289166
|
+
return storage;
|
289167
|
+
};
|
289014
289168
|
var MiddlewareFragment = graphql(`
|
289015
289169
|
fragment Middleware on Middleware {
|
289016
289170
|
__typename
|
@@ -289111,6 +289265,20 @@ var restartMiddleware = graphql(`
|
|
289111
289265
|
}
|
289112
289266
|
}
|
289113
289267
|
`, [MiddlewareFragment]);
|
289268
|
+
var pauseMiddleware = graphql(`
|
289269
|
+
mutation PauseMiddleware($uniqueName: String!) {
|
289270
|
+
pauseMiddlewareByUniqueName(uniqueName: $uniqueName) {
|
289271
|
+
...Middleware
|
289272
|
+
}
|
289273
|
+
}
|
289274
|
+
`, [MiddlewareFragment]);
|
289275
|
+
var resumeMiddleware = graphql(`
|
289276
|
+
mutation ResumeMiddleware($uniqueName: String!) {
|
289277
|
+
resumeMiddlewareByUniqueName(uniqueName: $uniqueName) {
|
289278
|
+
...Middleware
|
289279
|
+
}
|
289280
|
+
}
|
289281
|
+
`, [MiddlewareFragment]);
|
289114
289282
|
var middlewareList = (gqlClient) => {
|
289115
289283
|
return async (applicationUniqueName) => {
|
289116
289284
|
const { middlewaresByUniqueName: { items } } = await gqlClient.request(getMiddlewares, { applicationUniqueName });
|
@@ -289155,6 +289323,14 @@ var middlewareRestart = (gqlClient) => async (middlewareUniqueName) => {
|
|
289155
289323
|
const { restartMiddlewareByUniqueName: middleware } = await gqlClient.request(restartMiddleware, { uniqueName: middlewareUniqueName });
|
289156
289324
|
return middleware;
|
289157
289325
|
};
|
289326
|
+
var middlewarePause = (gqlClient) => async (middlewareUniqueName) => {
|
289327
|
+
const { pauseMiddlewareByUniqueName: middleware } = await gqlClient.request(pauseMiddleware, { uniqueName: middlewareUniqueName });
|
289328
|
+
return middleware;
|
289329
|
+
};
|
289330
|
+
var middlewareResume = (gqlClient) => async (middlewareUniqueName) => {
|
289331
|
+
const { resumeMiddlewareByUniqueName: middleware } = await gqlClient.request(resumeMiddleware, { uniqueName: middlewareUniqueName });
|
289332
|
+
return middleware;
|
289333
|
+
};
|
289158
289334
|
var getPlatformConfigQuery = graphql(`
|
289159
289335
|
query platformConfig {
|
289160
289336
|
config {
|
@@ -289287,6 +289463,20 @@ var restartPrivateKey = graphql(`
|
|
289287
289463
|
}
|
289288
289464
|
}
|
289289
289465
|
`, [PrivateKeyFragment]);
|
289466
|
+
var pausePrivateKey = graphql(`
|
289467
|
+
mutation PausePrivateKey($uniqueName: String!) {
|
289468
|
+
pausePrivateKeyByUniqueName(uniqueName: $uniqueName) {
|
289469
|
+
...PrivateKey
|
289470
|
+
}
|
289471
|
+
}
|
289472
|
+
`, [PrivateKeyFragment]);
|
289473
|
+
var resumePrivateKey = graphql(`
|
289474
|
+
mutation ResumePrivateKey($uniqueName: String!) {
|
289475
|
+
resumePrivateKeyByUniqueName(uniqueName: $uniqueName) {
|
289476
|
+
...PrivateKey
|
289477
|
+
}
|
289478
|
+
}
|
289479
|
+
`, [PrivateKeyFragment]);
|
289290
289480
|
var privateKeyList = (gqlClient) => {
|
289291
289481
|
return async (applicationUniqueName) => {
|
289292
289482
|
const { privateKeysByUniqueName: { items } } = await gqlClient.request(getPrivateKeys, { applicationUniqueName });
|
@@ -289325,6 +289515,14 @@ var privateKeyRestart = (gqlClient) => async (privateKeyUniqueName) => {
|
|
289325
289515
|
const { restartPrivateKeyByUniqueName: privateKey } = await gqlClient.request(restartPrivateKey, { uniqueName: privateKeyUniqueName });
|
289326
289516
|
return privateKey;
|
289327
289517
|
};
|
289518
|
+
var privateKeyPause = (gqlClient) => async (privateKeyUniqueName) => {
|
289519
|
+
const { pausePrivateKeyByUniqueName: privateKey } = await gqlClient.request(pausePrivateKey, { uniqueName: privateKeyUniqueName });
|
289520
|
+
return privateKey;
|
289521
|
+
};
|
289522
|
+
var privateKeyResume = (gqlClient) => async (privateKeyUniqueName) => {
|
289523
|
+
const { resumePrivateKeyByUniqueName: privateKey } = await gqlClient.request(resumePrivateKey, { uniqueName: privateKeyUniqueName });
|
289524
|
+
return privateKey;
|
289525
|
+
};
|
289328
289526
|
var ClientOptionsSchema = exports_external.object({
|
289329
289527
|
accessToken: AccessTokenSchema2,
|
289330
289528
|
instance: UrlSchema2
|
@@ -289404,57 +289602,75 @@ function createSettleMintClient(options) {
|
|
289404
289602
|
read: blockchainNetworkRead(gqlClient),
|
289405
289603
|
create: blockchainNetworkCreate(gqlClient),
|
289406
289604
|
delete: blockchainNetworkDelete(gqlClient),
|
289407
|
-
restart: blockchainNetworkRestart(gqlClient)
|
289605
|
+
restart: blockchainNetworkRestart(gqlClient),
|
289606
|
+
pause: blockchainNetworkPause(gqlClient),
|
289607
|
+
resume: blockchainNetworkResume(gqlClient)
|
289408
289608
|
},
|
289409
289609
|
blockchainNode: {
|
289410
289610
|
list: blockchainNodeList(gqlClient),
|
289411
289611
|
read: blockchainNodeRead(gqlClient),
|
289412
289612
|
create: blockchainNodeCreate(gqlClient),
|
289413
|
-
restart: blockchainNodeRestart(gqlClient)
|
289613
|
+
restart: blockchainNodeRestart(gqlClient),
|
289614
|
+
pause: blockchainNodePause(gqlClient),
|
289615
|
+
resume: blockchainNodeResume(gqlClient)
|
289414
289616
|
},
|
289415
289617
|
loadBalancer: {
|
289416
289618
|
list: loadBalancerList(gqlClient),
|
289417
289619
|
read: loadBalancerRead(gqlClient),
|
289418
289620
|
create: loadBalancerCreate(gqlClient),
|
289419
|
-
restart: loadBalancerRestart(gqlClient)
|
289621
|
+
restart: loadBalancerRestart(gqlClient),
|
289622
|
+
pause: loadBalancerPause(gqlClient),
|
289623
|
+
resume: loadBalancerResume(gqlClient)
|
289420
289624
|
},
|
289421
289625
|
middleware: {
|
289422
289626
|
list: middlewareList(gqlClient),
|
289423
289627
|
read: middlewareRead(gqlClient),
|
289424
289628
|
graphSubgraphs: graphMiddlewareSubgraphs(gqlClient),
|
289425
289629
|
create: middlewareCreate(gqlClient),
|
289426
|
-
restart: middlewareRestart(gqlClient)
|
289630
|
+
restart: middlewareRestart(gqlClient),
|
289631
|
+
pause: middlewarePause(gqlClient),
|
289632
|
+
resume: middlewareResume(gqlClient)
|
289427
289633
|
},
|
289428
289634
|
integrationTool: {
|
289429
289635
|
list: integrationToolList(gqlClient),
|
289430
289636
|
read: integrationToolRead(gqlClient),
|
289431
289637
|
create: integrationToolCreate(gqlClient),
|
289432
|
-
restart: integrationToolRestart(gqlClient)
|
289638
|
+
restart: integrationToolRestart(gqlClient),
|
289639
|
+
pause: integrationToolPause(gqlClient),
|
289640
|
+
resume: integrationToolResume(gqlClient)
|
289433
289641
|
},
|
289434
289642
|
storage: {
|
289435
289643
|
list: storageList(gqlClient),
|
289436
289644
|
read: storageRead(gqlClient),
|
289437
289645
|
create: storageCreate(gqlClient),
|
289438
|
-
restart: storageRestart(gqlClient)
|
289646
|
+
restart: storageRestart(gqlClient),
|
289647
|
+
pause: storagePause(gqlClient),
|
289648
|
+
resume: storageResume(gqlClient)
|
289439
289649
|
},
|
289440
289650
|
privateKey: {
|
289441
289651
|
list: privateKeyList(gqlClient),
|
289442
289652
|
read: privatekeyRead(gqlClient),
|
289443
289653
|
create: privateKeyCreate(gqlClient),
|
289444
|
-
restart: privateKeyRestart(gqlClient)
|
289654
|
+
restart: privateKeyRestart(gqlClient),
|
289655
|
+
pause: privateKeyPause(gqlClient),
|
289656
|
+
resume: privateKeyResume(gqlClient)
|
289445
289657
|
},
|
289446
289658
|
insights: {
|
289447
289659
|
list: insightsList(gqlClient),
|
289448
289660
|
read: insightsRead(gqlClient),
|
289449
289661
|
create: insightsCreate(gqlClient),
|
289450
|
-
restart: insightsRestart(gqlClient)
|
289662
|
+
restart: insightsRestart(gqlClient),
|
289663
|
+
pause: insightsPause(gqlClient),
|
289664
|
+
resume: insightsResume(gqlClient)
|
289451
289665
|
},
|
289452
289666
|
customDeployment: {
|
289453
289667
|
list: customdeploymentList(gqlClient),
|
289454
289668
|
read: customdeploymentRead(gqlClient),
|
289455
289669
|
create: customdeploymentCreate(gqlClient),
|
289456
289670
|
update: customdeploymentUpdate(gqlClient),
|
289457
|
-
restart: customDeploymentRestart(gqlClient)
|
289671
|
+
restart: customDeploymentRestart(gqlClient),
|
289672
|
+
pause: customDeploymentPause(gqlClient),
|
289673
|
+
resume: customDeploymentResume(gqlClient)
|
289458
289674
|
},
|
289459
289675
|
foundry: { env: getEnv(gqlClient) },
|
289460
289676
|
applicationAccessToken: { create: applicationAccessTokenCreate(gqlClient) },
|
@@ -326272,13 +326488,17 @@ function addClusterServiceArgs(cmd2) {
|
|
326272
326488
|
// src/commands/platform/utils/wait-for-completion.ts
|
326273
326489
|
class TimeoutError2 extends Error {
|
326274
326490
|
}
|
326491
|
+
|
326492
|
+
class DeploymentFailedError extends Error {
|
326493
|
+
}
|
326275
326494
|
async function waitForCompletion({
|
326276
326495
|
settlemint,
|
326277
326496
|
type: type4,
|
326278
326497
|
uniqueName,
|
326279
326498
|
action,
|
326280
326499
|
maxTimeout = 10 * 60 * 1000,
|
326281
|
-
restartIfTimeout = false
|
326500
|
+
restartIfTimeout = false,
|
326501
|
+
restartOnError = false
|
326282
326502
|
}) {
|
326283
326503
|
const serviceType = SETTLEMINT_CLIENT_MAP[type4];
|
326284
326504
|
if (serviceType === "workspace" || serviceType === "application" || serviceType === "foundry" || serviceType === "applicationAccessToken" || serviceType === "platform" || serviceType === "wallet") {
|
@@ -326297,33 +326517,20 @@ async function waitForCompletion({
|
|
326297
326517
|
while (true) {
|
326298
326518
|
try {
|
326299
326519
|
const resource = await service.read(uniqueName);
|
326300
|
-
if (resource.status === "COMPLETED") {
|
326301
|
-
if (spinner2) {
|
326302
|
-
spinner2.text = `${capitalizeFirstLetter2(type4)} is ${getActionLabel(action)}`;
|
326303
|
-
} else {
|
326304
|
-
note(`${capitalizeFirstLetter2(type4)} is ${getActionLabel(action)}`);
|
326305
|
-
}
|
326306
|
-
return true;
|
326307
|
-
}
|
326308
326520
|
if (resource.status === "FAILED") {
|
326309
|
-
|
326310
|
-
|
326311
|
-
|
326312
|
-
note(`${capitalizeFirstLetter2(type4)} failed to ${getActionLabel(action)}`);
|
326521
|
+
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} failed to ${getActionLabel(action)}`);
|
326522
|
+
if (restartOnError) {
|
326523
|
+
throw new DeploymentFailedError;
|
326313
326524
|
}
|
326314
326525
|
return false;
|
326315
326526
|
}
|
326316
|
-
if (
|
326317
|
-
spinner2
|
326318
|
-
|
326319
|
-
note(`${capitalizeFirstLetter2(type4)} is not ready yet (status: ${resource.status})`);
|
326527
|
+
if (isActionComplete(action, resource.status)) {
|
326528
|
+
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} is ${getActionLabel(action)}`);
|
326529
|
+
return true;
|
326320
326530
|
}
|
326531
|
+
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} is not ready yet (status: ${resource.status})`);
|
326321
326532
|
} catch (_error) {
|
326322
|
-
|
326323
|
-
spinner2.text = `${capitalizeFirstLetter2(type4)} is not ready yet (status: UNKNOWN)`;
|
326324
|
-
} else {
|
326325
|
-
note(`${capitalizeFirstLetter2(type4)} is not ready yet (status: UNKNOWN)`);
|
326326
|
-
}
|
326533
|
+
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} is not ready yet (status: UNKNOWN)`);
|
326327
326534
|
}
|
326328
326535
|
if (Date.now() - startTime > maxTimeout) {
|
326329
326536
|
throw new TimeoutError2(`Operation timed out after ${maxTimeout / 60000} minutes for ${type4} with unique name ${uniqueName}`);
|
@@ -326336,8 +326543,7 @@ async function waitForCompletion({
|
|
326336
326543
|
try {
|
326337
326544
|
return await showSpinner();
|
326338
326545
|
} catch (error45) {
|
326339
|
-
|
326340
|
-
if (restartIfTimeout && isTimeoutError) {
|
326546
|
+
if (shouldRestart(error45, restartIfTimeout)) {
|
326341
326547
|
note(`Restarting ${capitalizeFirstLetter2(type4)}`);
|
326342
326548
|
await service.restart(uniqueName);
|
326343
326549
|
return showSpinner();
|
@@ -326345,14 +326551,50 @@ async function waitForCompletion({
|
|
326345
326551
|
throw error45;
|
326346
326552
|
}
|
326347
326553
|
}
|
326348
|
-
function
|
326349
|
-
|
326350
|
-
|
326554
|
+
function shouldRestart(error45, restartIfTimeout) {
|
326555
|
+
const isSpinnerError = error45 instanceof SpinnerError;
|
326556
|
+
const isDeploymentFailedError = error45 instanceof DeploymentFailedError || isSpinnerError && error45.originalError instanceof DeploymentFailedError;
|
326557
|
+
if (isDeploymentFailedError) {
|
326558
|
+
return true;
|
326351
326559
|
}
|
326352
|
-
|
326353
|
-
|
326560
|
+
const isTimeoutError = error45 instanceof TimeoutError2 || isSpinnerError && error45.originalError instanceof TimeoutError2;
|
326561
|
+
return restartIfTimeout && isTimeoutError;
|
326562
|
+
}
|
326563
|
+
function updateStatus(spinner2, message) {
|
326564
|
+
if (spinner2) {
|
326565
|
+
spinner2.text = message;
|
326566
|
+
} else {
|
326567
|
+
note(message);
|
326568
|
+
}
|
326569
|
+
}
|
326570
|
+
function isActionComplete(action, status) {
|
326571
|
+
switch (action) {
|
326572
|
+
case "pause":
|
326573
|
+
return status === "PAUSED" || status === "AUTO_PAUSED";
|
326574
|
+
case "resume":
|
326575
|
+
case "deploy":
|
326576
|
+
case "destroy":
|
326577
|
+
case "restart":
|
326578
|
+
return status === "COMPLETED";
|
326579
|
+
default:
|
326580
|
+
return false;
|
326581
|
+
}
|
326582
|
+
}
|
326583
|
+
function getActionLabel(action) {
|
326584
|
+
switch (action) {
|
326585
|
+
case "restart":
|
326586
|
+
return "restarted";
|
326587
|
+
case "destroy":
|
326588
|
+
return "destroyed";
|
326589
|
+
case "pause":
|
326590
|
+
return "paused";
|
326591
|
+
case "resume":
|
326592
|
+
return "resumed";
|
326593
|
+
case "deploy":
|
326594
|
+
return "deployed";
|
326595
|
+
default:
|
326596
|
+
return "deployed";
|
326354
326597
|
}
|
326355
|
-
return "deployed";
|
326356
326598
|
}
|
326357
326599
|
|
326358
326600
|
// src/prompts/provider.prompt.ts
|
@@ -326433,9 +326675,9 @@ function getCreateCommand({
|
|
326433
326675
|
cmd2.alias(alias);
|
326434
326676
|
}
|
326435
326677
|
if (requiresDeployment) {
|
326436
|
-
cmd2.option("-w, --wait", "Wait until deployed").option("
|
326678
|
+
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");
|
326437
326679
|
}
|
326438
|
-
execute2(cmd2, async ({ acceptDefaults, prod, default: isDefault, wait: wait2, restartIfTimeout, provider, region }, createFunction) => {
|
326680
|
+
execute2(cmd2, async ({ acceptDefaults, prod, default: isDefault, wait: wait2, restartIfTimeout, restartOnError, provider, region }, createFunction) => {
|
326439
326681
|
intro(`Creating ${type4} in the SettleMint platform`);
|
326440
326682
|
const env2 = await loadEnv(false, !!prod);
|
326441
326683
|
const instance = await instancePrompt({ env: env2, accept: acceptDefaults });
|
@@ -326479,7 +326721,8 @@ function getCreateCommand({
|
|
326479
326721
|
type: waitFor?.resourceType ?? type4,
|
326480
326722
|
uniqueName: waitFor?.uniqueName ?? result.uniqueName,
|
326481
326723
|
action: "deploy",
|
326482
|
-
restartIfTimeout
|
326724
|
+
restartIfTimeout,
|
326725
|
+
restartOnError
|
326483
326726
|
});
|
326484
326727
|
if (!isDeployed) {
|
326485
326728
|
throw new Error(`Failed to deploy ${waitFor?.resourceType ?? type4} ${waitFor?.uniqueName ?? result.uniqueName}`);
|
@@ -327950,25 +328193,249 @@ function deleteCommand() {
|
|
327950
328193
|
return new Command("delete").alias("d").description("Delete a resource in the SettleMint platform").addCommand(applicationDeleteCommand()).addCommand(workspaceDeleteCommand());
|
327951
328194
|
}
|
327952
328195
|
|
328196
|
+
// src/commands/platform/common/pause-command.ts
|
328197
|
+
function getPauseCommand({
|
328198
|
+
name: name3,
|
328199
|
+
type: type4,
|
328200
|
+
alias,
|
328201
|
+
envKey,
|
328202
|
+
pauseFunction,
|
328203
|
+
usePersonalAccessToken = true
|
328204
|
+
}) {
|
328205
|
+
const commandName = sanitizeCommandName(name3);
|
328206
|
+
const typeCommandName = sanitizeCommandName(type4);
|
328207
|
+
const exampleCommandPrefix = `platform pause ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
328208
|
+
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([
|
328209
|
+
{
|
328210
|
+
description: `Pauses the specified ${type4} by unique name`,
|
328211
|
+
command: `${exampleCommandPrefix} <unique-name>`
|
328212
|
+
},
|
328213
|
+
{
|
328214
|
+
description: `Pauses the default ${type4} in the production environment`,
|
328215
|
+
command: `${exampleCommandPrefix} default --prod`
|
328216
|
+
}
|
328217
|
+
])).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 }) => {
|
328218
|
+
intro(`Pausing ${type4} in the SettleMint platform`);
|
328219
|
+
const env2 = await loadEnv(false, !!prod);
|
328220
|
+
const instance = await instancePrompt({ env: env2, accept: acceptDefaults });
|
328221
|
+
const accessToken = await getApplicationOrPersonalAccessToken({
|
328222
|
+
env: env2,
|
328223
|
+
instance,
|
328224
|
+
prefer: usePersonalAccessToken ? "personal" : "application"
|
328225
|
+
});
|
328226
|
+
const settlemint = createSettleMintClient({
|
328227
|
+
accessToken,
|
328228
|
+
instance
|
328229
|
+
});
|
328230
|
+
const isDefaultUniqueName = uniqueName === "default";
|
328231
|
+
const serviceUniqueName = isDefaultUniqueName ? typeof env2[envKey] === "string" ? env2[envKey] : null : uniqueName;
|
328232
|
+
if (!serviceUniqueName) {
|
328233
|
+
cancel2(`No default ${type4} found in your .env file. Please provide a valid ${type4} unique name or set a default ${type4} first.`);
|
328234
|
+
}
|
328235
|
+
const result = await spinner({
|
328236
|
+
startMessage: `Pausing ${type4}`,
|
328237
|
+
task: async () => {
|
328238
|
+
return pauseFunction(settlemint, serviceUniqueName);
|
328239
|
+
},
|
328240
|
+
stopMessage: `${capitalizeFirstLetter2(type4)} pause initiated`
|
328241
|
+
});
|
328242
|
+
if (wait2) {
|
328243
|
+
const isPaused = await waitForCompletion({
|
328244
|
+
settlemint,
|
328245
|
+
type: type4,
|
328246
|
+
uniqueName: serviceUniqueName,
|
328247
|
+
action: "pause"
|
328248
|
+
});
|
328249
|
+
if (!isPaused) {
|
328250
|
+
throw new Error(`Failed to pause ${type4} ${serviceUniqueName}`);
|
328251
|
+
}
|
328252
|
+
}
|
328253
|
+
outro(`${capitalizeFirstLetter2(type4)} ${result.name} pause initiated successfully`);
|
328254
|
+
});
|
328255
|
+
}
|
328256
|
+
|
328257
|
+
// src/commands/platform/blockchain-network/pause.ts
|
328258
|
+
function blockchainNetworkPauseCommand() {
|
328259
|
+
return getPauseCommand({
|
328260
|
+
name: "blockchain-network",
|
328261
|
+
type: "blockchain network",
|
328262
|
+
alias: "bnw",
|
328263
|
+
envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
|
328264
|
+
pauseFunction: async (settlemint, id) => {
|
328265
|
+
return settlemint.blockchainNetwork.pause(id);
|
328266
|
+
}
|
328267
|
+
});
|
328268
|
+
}
|
328269
|
+
|
328270
|
+
// src/commands/platform/blockchain-node/pause.ts
|
328271
|
+
function blockchainNodePauseCommand() {
|
328272
|
+
return getPauseCommand({
|
328273
|
+
name: "blockchain-node",
|
328274
|
+
type: "blockchain node",
|
328275
|
+
alias: "bn",
|
328276
|
+
envKey: "SETTLEMINT_BLOCKCHAIN_NODE",
|
328277
|
+
pauseFunction: async (settlemint, id) => {
|
328278
|
+
return settlemint.blockchainNode.pause(id);
|
328279
|
+
}
|
328280
|
+
});
|
328281
|
+
}
|
328282
|
+
|
328283
|
+
// src/commands/platform/custom-deployments/pause.ts
|
328284
|
+
function customDeploymentPauseCommand() {
|
328285
|
+
return getPauseCommand({
|
328286
|
+
name: "custom-deployment",
|
328287
|
+
type: "custom deployment",
|
328288
|
+
alias: "cd",
|
328289
|
+
envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
|
328290
|
+
pauseFunction: async (settlemint, id) => {
|
328291
|
+
return settlemint.customDeployment.pause(id);
|
328292
|
+
}
|
328293
|
+
});
|
328294
|
+
}
|
328295
|
+
|
328296
|
+
// src/commands/platform/insights/blockscout/pause.ts
|
328297
|
+
function blockscoutPauseCommand() {
|
328298
|
+
return getPauseCommand({
|
328299
|
+
name: "blockscout",
|
328300
|
+
type: "insights",
|
328301
|
+
alias: "bs",
|
328302
|
+
envKey: "SETTLEMINT_BLOCKSCOUT",
|
328303
|
+
pauseFunction: async (settlemint, id) => {
|
328304
|
+
return settlemint.insights.pause(id);
|
328305
|
+
}
|
328306
|
+
});
|
328307
|
+
}
|
328308
|
+
|
328309
|
+
// src/commands/platform/integration-tools/hasura/pause.ts
|
328310
|
+
function hasuraPauseCommand() {
|
328311
|
+
return getPauseCommand({
|
328312
|
+
name: "hasura",
|
328313
|
+
type: "integration tool",
|
328314
|
+
alias: "ha",
|
328315
|
+
envKey: "SETTLEMINT_HASURA",
|
328316
|
+
pauseFunction: async (settlemint, id) => {
|
328317
|
+
return settlemint.integrationTool.pause(id);
|
328318
|
+
}
|
328319
|
+
});
|
328320
|
+
}
|
328321
|
+
|
328322
|
+
// src/commands/platform/load-balancer/evm/pause.ts
|
328323
|
+
function evmLoadBalancerPauseCommand() {
|
328324
|
+
return getPauseCommand({
|
328325
|
+
name: "evm",
|
328326
|
+
type: "load balancer",
|
328327
|
+
alias: "lb",
|
328328
|
+
envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
|
328329
|
+
pauseFunction: async (settlemint, id) => {
|
328330
|
+
return settlemint.loadBalancer.pause(id);
|
328331
|
+
}
|
328332
|
+
});
|
328333
|
+
}
|
328334
|
+
|
328335
|
+
// src/commands/platform/middleware/graph/pause.ts
|
328336
|
+
function graphMiddlewarePauseCommand() {
|
328337
|
+
return getPauseCommand({
|
328338
|
+
name: "graph",
|
328339
|
+
type: "middleware",
|
328340
|
+
alias: "gr",
|
328341
|
+
envKey: "SETTLEMINT_THEGRAPH",
|
328342
|
+
pauseFunction: async (settlemint, id) => {
|
328343
|
+
return settlemint.middleware.pause(id);
|
328344
|
+
}
|
328345
|
+
});
|
328346
|
+
}
|
328347
|
+
|
328348
|
+
// src/commands/platform/middleware/smart-contract-portal/pause.ts
|
328349
|
+
function smartContractPortalMiddlewarePauseCommand() {
|
328350
|
+
return getPauseCommand({
|
328351
|
+
name: "smart-contract-portal",
|
328352
|
+
type: "middleware",
|
328353
|
+
alias: "scp",
|
328354
|
+
envKey: "SETTLEMINT_PORTAL",
|
328355
|
+
pauseFunction: async (settlemint, id) => {
|
328356
|
+
return settlemint.middleware.pause(id);
|
328357
|
+
}
|
328358
|
+
});
|
328359
|
+
}
|
328360
|
+
|
328361
|
+
// src/commands/platform/private-key/accessible-ecdsa-p256/pause.ts
|
328362
|
+
function accessibleEcdsaP256PrivateKeyPauseCommand() {
|
328363
|
+
return getPauseCommand({
|
328364
|
+
name: "accessible-ecdsa-p256",
|
328365
|
+
type: "private key",
|
328366
|
+
alias: "acc",
|
328367
|
+
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
328368
|
+
pauseFunction: async (settlemint, id) => {
|
328369
|
+
return settlemint.privateKey.pause(id);
|
328370
|
+
}
|
328371
|
+
});
|
328372
|
+
}
|
328373
|
+
|
328374
|
+
// src/commands/platform/private-key/hd-ecdsa-p256/pause.ts
|
328375
|
+
function hdEcdsaP256PrivateKeyPauseCommand() {
|
328376
|
+
return getPauseCommand({
|
328377
|
+
name: "hd-ecdsa-p256",
|
328378
|
+
type: "private key",
|
328379
|
+
alias: "hd",
|
328380
|
+
envKey: "SETTLEMINT_HD_PRIVATE_KEY",
|
328381
|
+
pauseFunction: async (settlemint, id) => {
|
328382
|
+
return settlemint.privateKey.pause(id);
|
328383
|
+
}
|
328384
|
+
});
|
328385
|
+
}
|
328386
|
+
|
328387
|
+
// src/commands/platform/storage/ipfs/pause.ts
|
328388
|
+
function ipfsStoragePauseCommand() {
|
328389
|
+
return getPauseCommand({
|
328390
|
+
name: "ipfs",
|
328391
|
+
type: "storage",
|
328392
|
+
alias: "ip",
|
328393
|
+
envKey: "SETTLEMINT_IPFS",
|
328394
|
+
pauseFunction: async (settlemint, id) => {
|
328395
|
+
return settlemint.storage.pause(id);
|
328396
|
+
}
|
328397
|
+
});
|
328398
|
+
}
|
328399
|
+
|
328400
|
+
// src/commands/platform/storage/minio/pause.ts
|
328401
|
+
function minioStoragePauseCommand() {
|
328402
|
+
return getPauseCommand({
|
328403
|
+
name: "minio",
|
328404
|
+
type: "storage",
|
328405
|
+
alias: "m",
|
328406
|
+
envKey: "SETTLEMINT_MINIO",
|
328407
|
+
pauseFunction: async (settlemint, id) => {
|
328408
|
+
return settlemint.storage.pause(id);
|
328409
|
+
}
|
328410
|
+
});
|
328411
|
+
}
|
328412
|
+
|
328413
|
+
// src/commands/platform/pause.ts
|
328414
|
+
function pauseCommand() {
|
328415
|
+
const cmd2 = new Command("pause").description("Pause a resource in the SettleMint platform").addCommand(blockchainNodePauseCommand()).addCommand(blockchainNetworkPauseCommand()).addCommand(customDeploymentPauseCommand()).addCommand(blockscoutPauseCommand()).addCommand(hasuraPauseCommand()).addCommand(evmLoadBalancerPauseCommand()).addCommand(graphMiddlewarePauseCommand()).addCommand(smartContractPortalMiddlewarePauseCommand()).addCommand(accessibleEcdsaP256PrivateKeyPauseCommand()).addCommand(hdEcdsaP256PrivateKeyPauseCommand()).addCommand(ipfsStoragePauseCommand()).addCommand(minioStoragePauseCommand());
|
328416
|
+
return cmd2;
|
328417
|
+
}
|
328418
|
+
|
327953
328419
|
// src/commands/platform/common/restart-command.ts
|
327954
328420
|
function getRestartCommand({
|
327955
328421
|
name: name3,
|
327956
328422
|
type: type4,
|
327957
|
-
subType,
|
327958
328423
|
alias,
|
327959
328424
|
envKey,
|
327960
328425
|
restartFunction,
|
327961
328426
|
usePersonalAccessToken = true
|
327962
328427
|
}) {
|
327963
328428
|
const commandName = sanitizeCommandName(name3);
|
328429
|
+
const typeCommandName = sanitizeCommandName(type4);
|
328430
|
+
const exampleCommandPrefix = `platform restart ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
327964
328431
|
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([
|
327965
328432
|
{
|
327966
|
-
description: `Restarts the specified ${type4} by
|
327967
|
-
command:
|
328433
|
+
description: `Restarts the specified ${type4} by unique name`,
|
328434
|
+
command: `${exampleCommandPrefix} <unique-name>`
|
327968
328435
|
},
|
327969
328436
|
{
|
327970
328437
|
description: `Restarts the default ${type4} in the production environment`,
|
327971
|
-
command:
|
328438
|
+
command: `${exampleCommandPrefix} default --prod`
|
327972
328439
|
}
|
327973
328440
|
])).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 }) => {
|
327974
328441
|
intro(`Restarting ${type4} in the SettleMint platform`);
|
@@ -328055,7 +328522,6 @@ function blockscoutRestartCommand() {
|
|
328055
328522
|
return getRestartCommand({
|
328056
328523
|
name: "blockscout",
|
328057
328524
|
type: "insights",
|
328058
|
-
subType: "blockscout",
|
328059
328525
|
alias: "bs",
|
328060
328526
|
envKey: "SETTLEMINT_BLOCKSCOUT",
|
328061
328527
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -328074,7 +328540,6 @@ function hasuraRestartCommand() {
|
|
328074
328540
|
return getRestartCommand({
|
328075
328541
|
name: "hasura",
|
328076
328542
|
type: "integration tool",
|
328077
|
-
subType: "hasura",
|
328078
328543
|
alias: "ha",
|
328079
328544
|
envKey: "SETTLEMINT_HASURA",
|
328080
328545
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -328106,7 +328571,6 @@ function graphRestartCommand() {
|
|
328106
328571
|
return getRestartCommand({
|
328107
328572
|
name: "graph",
|
328108
328573
|
type: "middleware",
|
328109
|
-
subType: "graph",
|
328110
328574
|
alias: "gr",
|
328111
328575
|
envKey: "SETTLEMINT_THEGRAPH",
|
328112
328576
|
restartFunction: async (settlemint, id) => {
|
@@ -328120,7 +328584,6 @@ function smartContractPortalRestartCommand() {
|
|
328120
328584
|
return getRestartCommand({
|
328121
328585
|
name: "smart-contract-portal",
|
328122
328586
|
type: "middleware",
|
328123
|
-
subType: "smart-contract-portal",
|
328124
328587
|
alias: "scp",
|
328125
328588
|
envKey: "SETTLEMINT_PORTAL",
|
328126
328589
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -328171,6 +328634,229 @@ function restartCommand() {
|
|
328171
328634
|
return cmd2;
|
328172
328635
|
}
|
328173
328636
|
|
328637
|
+
// src/commands/platform/common/resume-command.ts
|
328638
|
+
function getResumeCommand({
|
328639
|
+
name: name3,
|
328640
|
+
type: type4,
|
328641
|
+
alias,
|
328642
|
+
envKey,
|
328643
|
+
resumeFunction,
|
328644
|
+
usePersonalAccessToken = true
|
328645
|
+
}) {
|
328646
|
+
const commandName = sanitizeCommandName(name3);
|
328647
|
+
const typeCommandName = sanitizeCommandName(type4);
|
328648
|
+
const exampleCommandPrefix = `platform resume ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
328649
|
+
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([
|
328650
|
+
{
|
328651
|
+
description: `Resumes the specified ${type4} by unique name`,
|
328652
|
+
command: `${exampleCommandPrefix} <unique-name>`
|
328653
|
+
},
|
328654
|
+
{
|
328655
|
+
description: `Resumes the default ${type4} in the production environment`,
|
328656
|
+
command: `${exampleCommandPrefix} default --prod`
|
328657
|
+
}
|
328658
|
+
])).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 }) => {
|
328659
|
+
intro(`Resuming ${type4} in the SettleMint platform`);
|
328660
|
+
const env2 = await loadEnv(false, !!prod);
|
328661
|
+
const instance = await instancePrompt({ env: env2, accept: acceptDefaults });
|
328662
|
+
const accessToken = await getApplicationOrPersonalAccessToken({
|
328663
|
+
env: env2,
|
328664
|
+
instance,
|
328665
|
+
prefer: usePersonalAccessToken ? "personal" : "application"
|
328666
|
+
});
|
328667
|
+
const settlemint = createSettleMintClient({
|
328668
|
+
accessToken,
|
328669
|
+
instance
|
328670
|
+
});
|
328671
|
+
const isDefaultUniqueName = uniqueName === "default";
|
328672
|
+
const serviceUniqueName = isDefaultUniqueName ? typeof env2[envKey] === "string" ? env2[envKey] : null : uniqueName;
|
328673
|
+
if (!serviceUniqueName) {
|
328674
|
+
cancel2(`No default ${type4} found in your .env file. Please provide a valid ${type4} unique name or set a default ${type4} first.`);
|
328675
|
+
}
|
328676
|
+
const result = await spinner({
|
328677
|
+
startMessage: `Resuming ${type4}`,
|
328678
|
+
task: async () => {
|
328679
|
+
return resumeFunction(settlemint, serviceUniqueName);
|
328680
|
+
},
|
328681
|
+
stopMessage: `${capitalizeFirstLetter2(type4)} resume initiated`
|
328682
|
+
});
|
328683
|
+
if (wait2) {
|
328684
|
+
const isResumed = await waitForCompletion({
|
328685
|
+
settlemint,
|
328686
|
+
type: type4,
|
328687
|
+
uniqueName: serviceUniqueName,
|
328688
|
+
action: "resume"
|
328689
|
+
});
|
328690
|
+
if (!isResumed) {
|
328691
|
+
throw new Error(`Failed to resume ${type4} ${serviceUniqueName}`);
|
328692
|
+
}
|
328693
|
+
}
|
328694
|
+
outro(`${capitalizeFirstLetter2(type4)} ${result.name} resume initiated successfully`);
|
328695
|
+
});
|
328696
|
+
}
|
328697
|
+
|
328698
|
+
// src/commands/platform/blockchain-network/resume.ts
|
328699
|
+
function blockchainNetworkResumeCommand() {
|
328700
|
+
return getResumeCommand({
|
328701
|
+
name: "blockchain-network",
|
328702
|
+
type: "blockchain network",
|
328703
|
+
alias: "bnw",
|
328704
|
+
envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
|
328705
|
+
resumeFunction: async (settlemint, id) => {
|
328706
|
+
return settlemint.blockchainNetwork.resume(id);
|
328707
|
+
}
|
328708
|
+
});
|
328709
|
+
}
|
328710
|
+
|
328711
|
+
// src/commands/platform/blockchain-node/resume.ts
|
328712
|
+
function blockchainNodeResumeCommand() {
|
328713
|
+
return getResumeCommand({
|
328714
|
+
name: "blockchain-node",
|
328715
|
+
type: "blockchain node",
|
328716
|
+
alias: "bn",
|
328717
|
+
envKey: "SETTLEMINT_BLOCKCHAIN_NODE",
|
328718
|
+
resumeFunction: async (settlemint, id) => {
|
328719
|
+
return settlemint.blockchainNode.resume(id);
|
328720
|
+
}
|
328721
|
+
});
|
328722
|
+
}
|
328723
|
+
|
328724
|
+
// src/commands/platform/custom-deployments/resume.ts
|
328725
|
+
function customDeploymentResumeCommand() {
|
328726
|
+
return getResumeCommand({
|
328727
|
+
name: "custom-deployment",
|
328728
|
+
type: "custom deployment",
|
328729
|
+
alias: "cd",
|
328730
|
+
envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
|
328731
|
+
resumeFunction: async (settlemint, id) => {
|
328732
|
+
return settlemint.customDeployment.resume(id);
|
328733
|
+
}
|
328734
|
+
});
|
328735
|
+
}
|
328736
|
+
|
328737
|
+
// src/commands/platform/insights/blockscout/resume.ts
|
328738
|
+
function blockscoutResumeCommand() {
|
328739
|
+
return getResumeCommand({
|
328740
|
+
name: "blockscout",
|
328741
|
+
type: "insights",
|
328742
|
+
alias: "bs",
|
328743
|
+
envKey: "SETTLEMINT_BLOCKSCOUT",
|
328744
|
+
resumeFunction: async (settlemint, id) => {
|
328745
|
+
return settlemint.insights.resume(id);
|
328746
|
+
}
|
328747
|
+
});
|
328748
|
+
}
|
328749
|
+
|
328750
|
+
// src/commands/platform/integration-tools/hasura/resume.ts
|
328751
|
+
function hasuraResumeCommand() {
|
328752
|
+
return getResumeCommand({
|
328753
|
+
name: "hasura",
|
328754
|
+
type: "integration tool",
|
328755
|
+
alias: "ha",
|
328756
|
+
envKey: "SETTLEMINT_HASURA",
|
328757
|
+
resumeFunction: async (settlemint, id) => {
|
328758
|
+
return settlemint.integrationTool.resume(id);
|
328759
|
+
}
|
328760
|
+
});
|
328761
|
+
}
|
328762
|
+
|
328763
|
+
// src/commands/platform/load-balancer/evm/resume.ts
|
328764
|
+
function evmLoadBalancerResumeCommand() {
|
328765
|
+
return getResumeCommand({
|
328766
|
+
name: "evm",
|
328767
|
+
type: "load balancer",
|
328768
|
+
alias: "lb",
|
328769
|
+
envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
|
328770
|
+
resumeFunction: async (settlemint, id) => {
|
328771
|
+
return settlemint.loadBalancer.resume(id);
|
328772
|
+
}
|
328773
|
+
});
|
328774
|
+
}
|
328775
|
+
|
328776
|
+
// src/commands/platform/middleware/graph/resume.ts
|
328777
|
+
function graphMiddlewareResumeCommand() {
|
328778
|
+
return getResumeCommand({
|
328779
|
+
name: "graph",
|
328780
|
+
type: "middleware",
|
328781
|
+
alias: "gr",
|
328782
|
+
envKey: "SETTLEMINT_THEGRAPH",
|
328783
|
+
resumeFunction: async (settlemint, id) => {
|
328784
|
+
return settlemint.middleware.resume(id);
|
328785
|
+
}
|
328786
|
+
});
|
328787
|
+
}
|
328788
|
+
|
328789
|
+
// src/commands/platform/middleware/smart-contract-portal/resume.ts
|
328790
|
+
function smartContractPortalMiddlewareResumeCommand() {
|
328791
|
+
return getResumeCommand({
|
328792
|
+
name: "smart-contract-portal",
|
328793
|
+
type: "middleware",
|
328794
|
+
alias: "scp",
|
328795
|
+
envKey: "SETTLEMINT_PORTAL",
|
328796
|
+
resumeFunction: async (settlemint, id) => {
|
328797
|
+
return settlemint.middleware.resume(id);
|
328798
|
+
}
|
328799
|
+
});
|
328800
|
+
}
|
328801
|
+
|
328802
|
+
// src/commands/platform/private-key/accessible-ecdsa-p256/resume.ts
|
328803
|
+
function accessibleEcdsaP256PrivateKeyResumeCommand() {
|
328804
|
+
return getResumeCommand({
|
328805
|
+
name: "accessible-ecdsa-p256",
|
328806
|
+
type: "private key",
|
328807
|
+
alias: "acc",
|
328808
|
+
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
328809
|
+
resumeFunction: async (settlemint, id) => {
|
328810
|
+
return settlemint.privateKey.resume(id);
|
328811
|
+
}
|
328812
|
+
});
|
328813
|
+
}
|
328814
|
+
|
328815
|
+
// src/commands/platform/private-key/hd-ecdsa-p256/resume.ts
|
328816
|
+
function hdEcdsaP256PrivateKeyResumeCommand() {
|
328817
|
+
return getResumeCommand({
|
328818
|
+
name: "hd-ecdsa-p256",
|
328819
|
+
type: "private key",
|
328820
|
+
alias: "hd",
|
328821
|
+
envKey: "SETTLEMINT_HD_PRIVATE_KEY",
|
328822
|
+
resumeFunction: async (settlemint, id) => {
|
328823
|
+
return settlemint.privateKey.resume(id);
|
328824
|
+
}
|
328825
|
+
});
|
328826
|
+
}
|
328827
|
+
|
328828
|
+
// src/commands/platform/storage/ipfs/resume.ts
|
328829
|
+
function ipfsStorageResumeCommand() {
|
328830
|
+
return getResumeCommand({
|
328831
|
+
name: "ipfs",
|
328832
|
+
type: "storage",
|
328833
|
+
alias: "ip",
|
328834
|
+
envKey: "SETTLEMINT_IPFS",
|
328835
|
+
resumeFunction: async (settlemint, id) => {
|
328836
|
+
return settlemint.storage.resume(id);
|
328837
|
+
}
|
328838
|
+
});
|
328839
|
+
}
|
328840
|
+
|
328841
|
+
// src/commands/platform/storage/minio/resume.ts
|
328842
|
+
function minioStorageResumeCommand() {
|
328843
|
+
return getResumeCommand({
|
328844
|
+
name: "minio",
|
328845
|
+
type: "storage",
|
328846
|
+
alias: "m",
|
328847
|
+
envKey: "SETTLEMINT_MINIO",
|
328848
|
+
resumeFunction: async (settlemint, id) => {
|
328849
|
+
return settlemint.storage.resume(id);
|
328850
|
+
}
|
328851
|
+
});
|
328852
|
+
}
|
328853
|
+
|
328854
|
+
// src/commands/platform/resume.ts
|
328855
|
+
function resumeCommand() {
|
328856
|
+
const cmd2 = new Command("resume").description("Resume a resource in the SettleMint platform").addCommand(blockchainNodeResumeCommand()).addCommand(blockchainNetworkResumeCommand()).addCommand(customDeploymentResumeCommand()).addCommand(blockscoutResumeCommand()).addCommand(hasuraResumeCommand()).addCommand(evmLoadBalancerResumeCommand()).addCommand(graphMiddlewareResumeCommand()).addCommand(smartContractPortalMiddlewareResumeCommand()).addCommand(accessibleEcdsaP256PrivateKeyResumeCommand()).addCommand(hdEcdsaP256PrivateKeyResumeCommand()).addCommand(ipfsStorageResumeCommand()).addCommand(minioStorageResumeCommand());
|
328857
|
+
return cmd2;
|
328858
|
+
}
|
328859
|
+
|
328174
328860
|
// src/commands/platform/custom-deployments/update.ts
|
328175
328861
|
function customDeploymentsUpdateCommand() {
|
328176
328862
|
return new Command("custom-deployment").alias("cd").argument("<tag>", "The tag to update the custom deployment to").option("--unique-name <uniqueName>", "The unique name of the custom deployment to update. If not provided, will use SETTLEMINT_CUSTOM_DEPLOYMENT from env").option("--prod", "Connect to your production environment").option("--wait", "Wait for the custom deployment to be redeployed").description("Update a custom deployment in the SettleMint platform").usage(createExamples([
|
@@ -328746,7 +329432,7 @@ function listCommand() {
|
|
328746
329432
|
|
328747
329433
|
// src/commands/platform.ts
|
328748
329434
|
function platformCommand() {
|
328749
|
-
return new Command("platform").description("Manage SettleMint platform resources").addCommand(configCommand()).addCommand(createCommand3()).addCommand(deleteCommand()).addCommand(listCommand()).addCommand(restartCommand()).addCommand(updateCommand());
|
329435
|
+
return new Command("platform").description("Manage SettleMint platform resources").addCommand(configCommand()).addCommand(createCommand3()).addCommand(deleteCommand()).addCommand(listCommand()).addCommand(pauseCommand()).addCommand(resumeCommand()).addCommand(restartCommand()).addCommand(updateCommand());
|
328750
329436
|
}
|
328751
329437
|
|
328752
329438
|
// src/commands/smart-contract-set/create.ts
|
@@ -329682,12 +330368,12 @@ async function getNodeName({
|
|
329682
330368
|
|
329683
330369
|
// src/commands/smart-contract-set/subgraph/build.ts
|
329684
330370
|
function subgraphBuildCommand() {
|
329685
|
-
return new Command("build").description("Build the subgraph").usage(createExamples([
|
330371
|
+
return new Command("build").description("Build the subgraph").option("--ipfs <ipfs-url>", "The IPFS URL to use for the subgraph deployment").usage(createExamples([
|
329686
330372
|
{
|
329687
330373
|
description: "Build the subgraph",
|
329688
330374
|
command: "scs subgraph build"
|
329689
330375
|
}
|
329690
|
-
])).action(async () => {
|
330376
|
+
])).action(async ({ ipfs }) => {
|
329691
330377
|
intro("Building subgraph");
|
329692
330378
|
await validateIfRequiredPackagesAreInstalled(["@graphprotocol/graph-cli"]);
|
329693
330379
|
await subgraphSetup({
|
@@ -329696,7 +330382,7 @@ function subgraphBuildCommand() {
|
|
329696
330382
|
const { command, args } = await getPackageManagerExecutable();
|
329697
330383
|
const subgraphYamlFile = await getSubgraphYamlFile();
|
329698
330384
|
await executeCommand(command, [...args, "graph", "codegen", subgraphYamlFile]);
|
329699
|
-
await executeCommand(command, [...args, "graph", "build", subgraphYamlFile]);
|
330385
|
+
await executeCommand(command, [...args, "graph", "build", ...ipfs ? ["--ipfs", ipfs] : [], subgraphYamlFile]);
|
329700
330386
|
outro("Subgraph built successfully");
|
329701
330387
|
});
|
329702
330388
|
}
|
@@ -330092,4 +330778,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
330092
330778
|
// src/cli.ts
|
330093
330779
|
sdkCliCommand();
|
330094
330780
|
|
330095
|
-
//# debugId=
|
330781
|
+
//# debugId=5A0E1F06F2D7727264756E2164756E21
|