@settlemint/sdk-cli 2.4.0-pra779099b → 2.4.0-praf6ea8ac
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 +63 -765
- package/dist/cli.js.map +15 -49
- 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.4";
|
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] =
|
238858
|
+
responses[i6] = 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-praf6ea8ac",
|
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-praf6ea8ac",
|
263895
|
+
"@settlemint/sdk-utils": "2.4.0-praf6ea8ac",
|
263896
|
+
"@settlemint/sdk-viem": "2.4.0-praf6ea8ac",
|
263897
|
+
"@types/node": "24.0.7",
|
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.4",
|
263906
263906
|
which: "5.0.0",
|
263907
263907
|
yaml: "2.8.0",
|
263908
263908
|
yoctocolors: "2.1.1"
|
@@ -288291,20 +288291,6 @@ 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]);
|
288308
288294
|
var blockchainNetworkList = (gqlClient) => {
|
288309
288295
|
return async (applicationUniqueName) => {
|
288310
288296
|
const { blockchainNetworksByUniqueName: { items } } = await gqlClient.request(getBlockchainNetworks, { applicationUniqueName });
|
@@ -288339,14 +288325,6 @@ var blockchainNetworkRestart = (gqlClient) => async (blockchainNetworkUniqueName
|
|
288339
288325
|
const { restartBlockchainNetworkByUniqueName: blockchainNetwork } = await gqlClient.request(restartBlockchainNetwork, { uniqueName: blockchainNetworkUniqueName });
|
288340
288326
|
return blockchainNetwork;
|
288341
288327
|
};
|
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
|
-
};
|
288350
288328
|
var BlockchainNodeFragment = graphql(`
|
288351
288329
|
fragment BlockchainNode on BlockchainNode {
|
288352
288330
|
__typename
|
@@ -288480,20 +288458,6 @@ var restartBlockchainNode = graphql(`
|
|
288480
288458
|
}
|
288481
288459
|
}
|
288482
288460
|
`, [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]);
|
288497
288461
|
var blockchainNodeList = (gqlClient) => {
|
288498
288462
|
return async (applicationUniqueName) => {
|
288499
288463
|
const { blockchainNodesByUniqueName: { items } } = await gqlClient.request(getBlockchainNodes, { applicationUniqueName });
|
@@ -288522,14 +288486,6 @@ var blockchainNodeRestart = (gqlClient) => async (blockchainNodeUniqueName) => {
|
|
288522
288486
|
const { restartBlockchainNodeByUniqueName: blockchainNode } = await gqlClient.request(restartBlockchainNode, { uniqueName: blockchainNodeUniqueName });
|
288523
288487
|
return blockchainNode;
|
288524
288488
|
};
|
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
|
-
};
|
288533
288489
|
var CustomDeploymentFragment = graphql(`
|
288534
288490
|
fragment CustomDeployment on CustomDeployment {
|
288535
288491
|
id
|
@@ -288612,20 +288568,6 @@ var restartCustomDeployment = graphql(`
|
|
288612
288568
|
}
|
288613
288569
|
}
|
288614
288570
|
`, [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]);
|
288629
288571
|
var customdeploymentList = (gqlClient) => {
|
288630
288572
|
return async (applicationUniqueName) => {
|
288631
288573
|
const { customDeploymentsByUniqueName: { items } } = await gqlClient.request(getCustomDeployments, { applicationUniqueName });
|
@@ -288662,14 +288604,6 @@ var customDeploymentRestart = (gqlClient) => async (customDeploymentUniqueName)
|
|
288662
288604
|
const { restartCustomDeploymentByUniqueName: customDeployment } = await gqlClient.request(restartCustomDeployment, { uniqueName: customDeploymentUniqueName });
|
288663
288605
|
return customDeployment;
|
288664
288606
|
};
|
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
|
-
};
|
288673
288607
|
var getFoundryEnvConfig = graphql(`
|
288674
288608
|
query GetFoundryEnvConfig($blockchainNodeUniqueName: String!) {
|
288675
288609
|
foundryEnvConfigByUniqueName(blockchainNodeUniqueName: $blockchainNodeUniqueName)
|
@@ -288746,20 +288680,6 @@ var restartLoadBalancer = graphql(`
|
|
288746
288680
|
}
|
288747
288681
|
}
|
288748
288682
|
`, [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]);
|
288763
288683
|
var loadBalancerRead = (gqlClient) => {
|
288764
288684
|
return async (loadBalancerUniqueName) => {
|
288765
288685
|
const { loadBalancerByUniqueName: loadBalancer } = await gqlClient.request(getLoadBalancer, { uniqueName: loadBalancerUniqueName });
|
@@ -288793,14 +288713,6 @@ var loadBalancerRestart = (gqlClient) => async (loadBalancerUniqueName) => {
|
|
288793
288713
|
const { restartLoadBalancerByUniqueName: loadBalancer } = await gqlClient.request(restartLoadBalancer, { uniqueName: loadBalancerUniqueName });
|
288794
288714
|
return loadBalancer;
|
288795
288715
|
};
|
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
|
-
};
|
288804
288716
|
var InsightsFragment = graphql(`
|
288805
288717
|
fragment Insights on Insights {
|
288806
288718
|
__typename
|
@@ -288874,20 +288786,6 @@ var restartInsights = graphql(`
|
|
288874
288786
|
}
|
288875
288787
|
}
|
288876
288788
|
`, [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]);
|
288891
288789
|
var insightsList = (gqlClient) => {
|
288892
288790
|
return async (applicationUniqueName) => {
|
288893
288791
|
const { insightsListByUniqueName: { items } } = await gqlClient.request(getInsights, { applicationUniqueName });
|
@@ -288921,14 +288819,6 @@ var insightsRestart = (gqlClient) => async (insightsUniqueName) => {
|
|
288921
288819
|
const { restartInsightsByUniqueName: insights } = await gqlClient.request(restartInsights, { uniqueName: insightsUniqueName });
|
288922
288820
|
return insights;
|
288923
288821
|
};
|
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
|
-
};
|
288932
288822
|
var IntegrationFragment = graphql(`
|
288933
288823
|
fragment Integration on Integration {
|
288934
288824
|
__typename
|
@@ -288998,20 +288888,6 @@ var restartIntegrationTool = graphql(`
|
|
288998
288888
|
}
|
288999
288889
|
}
|
289000
288890
|
`, [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]);
|
289015
288891
|
var integrationToolList = (gqlClient) => {
|
289016
288892
|
return async (applicationUniqueName) => {
|
289017
288893
|
const { integrationsByUniqueName: { items } } = await gqlClient.request(getIntegrations, { applicationUniqueName });
|
@@ -289039,14 +288915,6 @@ var integrationToolRestart = (gqlClient) => async (integrationUniqueName) => {
|
|
289039
288915
|
const { restartIntegrationByUniqueName: integration } = await gqlClient.request(restartIntegrationTool, { uniqueName: integrationUniqueName });
|
289040
288916
|
return integration;
|
289041
288917
|
};
|
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
|
-
};
|
289050
288918
|
var StorageFragment = graphql(`
|
289051
288919
|
fragment Storage on Storage {
|
289052
288920
|
__typename
|
@@ -289116,20 +288984,6 @@ var restartStorage = graphql(`
|
|
289116
288984
|
}
|
289117
288985
|
}
|
289118
288986
|
`, [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]);
|
289133
288987
|
var storageList = (gqlClient) => {
|
289134
288988
|
return async (applicationUniqueName) => {
|
289135
288989
|
const { storagesByUniqueName: { items } } = await gqlClient.request(getStorages, { applicationUniqueName });
|
@@ -289157,14 +289011,6 @@ var storageRestart = (gqlClient) => async (storageUniqueName) => {
|
|
289157
289011
|
const { restartStorageByUniqueName: storage } = await gqlClient.request(restartStorage, { uniqueName: storageUniqueName });
|
289158
289012
|
return storage;
|
289159
289013
|
};
|
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
|
-
};
|
289168
289014
|
var MiddlewareFragment = graphql(`
|
289169
289015
|
fragment Middleware on Middleware {
|
289170
289016
|
__typename
|
@@ -289265,20 +289111,6 @@ var restartMiddleware = graphql(`
|
|
289265
289111
|
}
|
289266
289112
|
}
|
289267
289113
|
`, [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]);
|
289282
289114
|
var middlewareList = (gqlClient) => {
|
289283
289115
|
return async (applicationUniqueName) => {
|
289284
289116
|
const { middlewaresByUniqueName: { items } } = await gqlClient.request(getMiddlewares, { applicationUniqueName });
|
@@ -289323,14 +289155,6 @@ var middlewareRestart = (gqlClient) => async (middlewareUniqueName) => {
|
|
289323
289155
|
const { restartMiddlewareByUniqueName: middleware } = await gqlClient.request(restartMiddleware, { uniqueName: middlewareUniqueName });
|
289324
289156
|
return middleware;
|
289325
289157
|
};
|
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
|
-
};
|
289334
289158
|
var getPlatformConfigQuery = graphql(`
|
289335
289159
|
query platformConfig {
|
289336
289160
|
config {
|
@@ -289463,20 +289287,6 @@ var restartPrivateKey = graphql(`
|
|
289463
289287
|
}
|
289464
289288
|
}
|
289465
289289
|
`, [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]);
|
289480
289290
|
var privateKeyList = (gqlClient) => {
|
289481
289291
|
return async (applicationUniqueName) => {
|
289482
289292
|
const { privateKeysByUniqueName: { items } } = await gqlClient.request(getPrivateKeys, { applicationUniqueName });
|
@@ -289515,14 +289325,6 @@ var privateKeyRestart = (gqlClient) => async (privateKeyUniqueName) => {
|
|
289515
289325
|
const { restartPrivateKeyByUniqueName: privateKey } = await gqlClient.request(restartPrivateKey, { uniqueName: privateKeyUniqueName });
|
289516
289326
|
return privateKey;
|
289517
289327
|
};
|
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
|
-
};
|
289526
289328
|
var ClientOptionsSchema = exports_external.object({
|
289527
289329
|
accessToken: AccessTokenSchema2,
|
289528
289330
|
instance: UrlSchema2
|
@@ -289602,75 +289404,57 @@ function createSettleMintClient(options) {
|
|
289602
289404
|
read: blockchainNetworkRead(gqlClient),
|
289603
289405
|
create: blockchainNetworkCreate(gqlClient),
|
289604
289406
|
delete: blockchainNetworkDelete(gqlClient),
|
289605
|
-
restart: blockchainNetworkRestart(gqlClient)
|
289606
|
-
pause: blockchainNetworkPause(gqlClient),
|
289607
|
-
resume: blockchainNetworkResume(gqlClient)
|
289407
|
+
restart: blockchainNetworkRestart(gqlClient)
|
289608
289408
|
},
|
289609
289409
|
blockchainNode: {
|
289610
289410
|
list: blockchainNodeList(gqlClient),
|
289611
289411
|
read: blockchainNodeRead(gqlClient),
|
289612
289412
|
create: blockchainNodeCreate(gqlClient),
|
289613
|
-
restart: blockchainNodeRestart(gqlClient)
|
289614
|
-
pause: blockchainNodePause(gqlClient),
|
289615
|
-
resume: blockchainNodeResume(gqlClient)
|
289413
|
+
restart: blockchainNodeRestart(gqlClient)
|
289616
289414
|
},
|
289617
289415
|
loadBalancer: {
|
289618
289416
|
list: loadBalancerList(gqlClient),
|
289619
289417
|
read: loadBalancerRead(gqlClient),
|
289620
289418
|
create: loadBalancerCreate(gqlClient),
|
289621
|
-
restart: loadBalancerRestart(gqlClient)
|
289622
|
-
pause: loadBalancerPause(gqlClient),
|
289623
|
-
resume: loadBalancerResume(gqlClient)
|
289419
|
+
restart: loadBalancerRestart(gqlClient)
|
289624
289420
|
},
|
289625
289421
|
middleware: {
|
289626
289422
|
list: middlewareList(gqlClient),
|
289627
289423
|
read: middlewareRead(gqlClient),
|
289628
289424
|
graphSubgraphs: graphMiddlewareSubgraphs(gqlClient),
|
289629
289425
|
create: middlewareCreate(gqlClient),
|
289630
|
-
restart: middlewareRestart(gqlClient)
|
289631
|
-
pause: middlewarePause(gqlClient),
|
289632
|
-
resume: middlewareResume(gqlClient)
|
289426
|
+
restart: middlewareRestart(gqlClient)
|
289633
289427
|
},
|
289634
289428
|
integrationTool: {
|
289635
289429
|
list: integrationToolList(gqlClient),
|
289636
289430
|
read: integrationToolRead(gqlClient),
|
289637
289431
|
create: integrationToolCreate(gqlClient),
|
289638
|
-
restart: integrationToolRestart(gqlClient)
|
289639
|
-
pause: integrationToolPause(gqlClient),
|
289640
|
-
resume: integrationToolResume(gqlClient)
|
289432
|
+
restart: integrationToolRestart(gqlClient)
|
289641
289433
|
},
|
289642
289434
|
storage: {
|
289643
289435
|
list: storageList(gqlClient),
|
289644
289436
|
read: storageRead(gqlClient),
|
289645
289437
|
create: storageCreate(gqlClient),
|
289646
|
-
restart: storageRestart(gqlClient)
|
289647
|
-
pause: storagePause(gqlClient),
|
289648
|
-
resume: storageResume(gqlClient)
|
289438
|
+
restart: storageRestart(gqlClient)
|
289649
289439
|
},
|
289650
289440
|
privateKey: {
|
289651
289441
|
list: privateKeyList(gqlClient),
|
289652
289442
|
read: privatekeyRead(gqlClient),
|
289653
289443
|
create: privateKeyCreate(gqlClient),
|
289654
|
-
restart: privateKeyRestart(gqlClient)
|
289655
|
-
pause: privateKeyPause(gqlClient),
|
289656
|
-
resume: privateKeyResume(gqlClient)
|
289444
|
+
restart: privateKeyRestart(gqlClient)
|
289657
289445
|
},
|
289658
289446
|
insights: {
|
289659
289447
|
list: insightsList(gqlClient),
|
289660
289448
|
read: insightsRead(gqlClient),
|
289661
289449
|
create: insightsCreate(gqlClient),
|
289662
|
-
restart: insightsRestart(gqlClient)
|
289663
|
-
pause: insightsPause(gqlClient),
|
289664
|
-
resume: insightsResume(gqlClient)
|
289450
|
+
restart: insightsRestart(gqlClient)
|
289665
289451
|
},
|
289666
289452
|
customDeployment: {
|
289667
289453
|
list: customdeploymentList(gqlClient),
|
289668
289454
|
read: customdeploymentRead(gqlClient),
|
289669
289455
|
create: customdeploymentCreate(gqlClient),
|
289670
289456
|
update: customdeploymentUpdate(gqlClient),
|
289671
|
-
restart: customDeploymentRestart(gqlClient)
|
289672
|
-
pause: customDeploymentPause(gqlClient),
|
289673
|
-
resume: customDeploymentResume(gqlClient)
|
289457
|
+
restart: customDeploymentRestart(gqlClient)
|
289674
289458
|
},
|
289675
289459
|
foundry: { env: getEnv(gqlClient) },
|
289676
289460
|
applicationAccessToken: { create: applicationAccessTokenCreate(gqlClient) },
|
@@ -326488,17 +326272,13 @@ function addClusterServiceArgs(cmd2) {
|
|
326488
326272
|
// src/commands/platform/utils/wait-for-completion.ts
|
326489
326273
|
class TimeoutError2 extends Error {
|
326490
326274
|
}
|
326491
|
-
|
326492
|
-
class DeploymentFailedError extends Error {
|
326493
|
-
}
|
326494
326275
|
async function waitForCompletion({
|
326495
326276
|
settlemint,
|
326496
326277
|
type: type4,
|
326497
326278
|
uniqueName,
|
326498
326279
|
action,
|
326499
326280
|
maxTimeout = 10 * 60 * 1000,
|
326500
|
-
restartIfTimeout = false
|
326501
|
-
restartOnError = false
|
326281
|
+
restartIfTimeout = false
|
326502
326282
|
}) {
|
326503
326283
|
const serviceType = SETTLEMINT_CLIENT_MAP[type4];
|
326504
326284
|
if (serviceType === "workspace" || serviceType === "application" || serviceType === "foundry" || serviceType === "applicationAccessToken" || serviceType === "platform" || serviceType === "wallet") {
|
@@ -326508,7 +326288,6 @@ async function waitForCompletion({
|
|
326508
326288
|
if (!service || !("read" in service)) {
|
326509
326289
|
throw new Error(`Service ${serviceType} does not support status checking`);
|
326510
326290
|
}
|
326511
|
-
let hasRestarted = false;
|
326512
326291
|
function showSpinner() {
|
326513
326292
|
return spinner({
|
326514
326293
|
startMessage: `Waiting for ${type4} to be ${getActionLabel(action)}`,
|
@@ -326518,20 +326297,33 @@ async function waitForCompletion({
|
|
326518
326297
|
while (true) {
|
326519
326298
|
try {
|
326520
326299
|
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
|
+
}
|
326521
326308
|
if (resource.status === "FAILED") {
|
326522
|
-
|
326523
|
-
|
326524
|
-
|
326309
|
+
if (spinner2) {
|
326310
|
+
spinner2.text = `${capitalizeFirstLetter2(type4)} failed to ${getActionLabel(action)}`;
|
326311
|
+
} else {
|
326312
|
+
note(`${capitalizeFirstLetter2(type4)} failed to ${getActionLabel(action)}`);
|
326525
326313
|
}
|
326526
326314
|
return false;
|
326527
326315
|
}
|
326528
|
-
if (
|
326529
|
-
|
326530
|
-
|
326316
|
+
if (spinner2) {
|
326317
|
+
spinner2.text = `${capitalizeFirstLetter2(type4)} is not ready yet (status: ${resource.status})`;
|
326318
|
+
} else {
|
326319
|
+
note(`${capitalizeFirstLetter2(type4)} is not ready yet (status: ${resource.status})`);
|
326531
326320
|
}
|
326532
|
-
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} is not ready yet (status: ${resource.status})`);
|
326533
326321
|
} catch (_error) {
|
326534
|
-
|
326322
|
+
if (spinner2) {
|
326323
|
+
spinner2.text = `${capitalizeFirstLetter2(type4)} is not ready yet (status: UNKNOWN)`;
|
326324
|
+
} else {
|
326325
|
+
note(`${capitalizeFirstLetter2(type4)} is not ready yet (status: UNKNOWN)`);
|
326326
|
+
}
|
326535
326327
|
}
|
326536
326328
|
if (Date.now() - startTime > maxTimeout) {
|
326537
326329
|
throw new TimeoutError2(`Operation timed out after ${maxTimeout / 60000} minutes for ${type4} with unique name ${uniqueName}`);
|
@@ -326544,59 +326336,23 @@ async function waitForCompletion({
|
|
326544
326336
|
try {
|
326545
326337
|
return await showSpinner();
|
326546
326338
|
} catch (error45) {
|
326547
|
-
|
326339
|
+
const isTimeoutError = error45 instanceof SpinnerError && error45.originalError instanceof TimeoutError2;
|
326340
|
+
if (restartIfTimeout && isTimeoutError) {
|
326548
326341
|
note(`Restarting ${capitalizeFirstLetter2(type4)}`);
|
326549
|
-
hasRestarted = true;
|
326550
326342
|
await service.restart(uniqueName);
|
326551
326343
|
return showSpinner();
|
326552
326344
|
}
|
326553
326345
|
throw error45;
|
326554
326346
|
}
|
326555
326347
|
}
|
326556
|
-
function shouldRestart(error45, restartIfTimeout) {
|
326557
|
-
const isSpinnerError = error45 instanceof SpinnerError;
|
326558
|
-
const isDeploymentFailedError = error45 instanceof DeploymentFailedError || isSpinnerError && error45.originalError instanceof DeploymentFailedError;
|
326559
|
-
if (isDeploymentFailedError) {
|
326560
|
-
return true;
|
326561
|
-
}
|
326562
|
-
const isTimeoutError = error45 instanceof TimeoutError2 || isSpinnerError && error45.originalError instanceof TimeoutError2;
|
326563
|
-
return restartIfTimeout && isTimeoutError;
|
326564
|
-
}
|
326565
|
-
function updateStatus(spinner2, message) {
|
326566
|
-
if (spinner2) {
|
326567
|
-
spinner2.text = message;
|
326568
|
-
} else {
|
326569
|
-
note(message);
|
326570
|
-
}
|
326571
|
-
}
|
326572
|
-
function isActionComplete(action, status) {
|
326573
|
-
switch (action) {
|
326574
|
-
case "pause":
|
326575
|
-
return status === "PAUSED" || status === "AUTO_PAUSED";
|
326576
|
-
case "resume":
|
326577
|
-
case "deploy":
|
326578
|
-
case "destroy":
|
326579
|
-
case "restart":
|
326580
|
-
return status === "COMPLETED";
|
326581
|
-
default:
|
326582
|
-
return false;
|
326583
|
-
}
|
326584
|
-
}
|
326585
326348
|
function getActionLabel(action) {
|
326586
|
-
|
326587
|
-
|
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";
|
326349
|
+
if (action === "restart") {
|
326350
|
+
return "restarted";
|
326599
326351
|
}
|
326352
|
+
if (action === "destroy") {
|
326353
|
+
return "destroyed";
|
326354
|
+
}
|
326355
|
+
return "deployed";
|
326600
326356
|
}
|
326601
326357
|
|
326602
326358
|
// src/prompts/provider.prompt.ts
|
@@ -326677,9 +326433,9 @@ function getCreateCommand({
|
|
326677
326433
|
cmd2.alias(alias);
|
326678
326434
|
}
|
326679
326435
|
if (requiresDeployment) {
|
326680
|
-
cmd2.option("-w, --wait", "Wait until deployed").option("--restart-if-timeout", "Restart if wait time is exceeded")
|
326436
|
+
cmd2.option("-w, --wait", "Wait until deployed").option("-r, --restart-if-timeout", "Restart if wait time is exceeded");
|
326681
326437
|
}
|
326682
|
-
execute2(cmd2, async ({ acceptDefaults, prod, default: isDefault, wait: wait2, restartIfTimeout,
|
326438
|
+
execute2(cmd2, async ({ acceptDefaults, prod, default: isDefault, wait: wait2, restartIfTimeout, provider, region }, createFunction) => {
|
326683
326439
|
intro(`Creating ${type4} in the SettleMint platform`);
|
326684
326440
|
const env2 = await loadEnv(false, !!prod);
|
326685
326441
|
const instance = await instancePrompt({ env: env2, accept: acceptDefaults });
|
@@ -326723,8 +326479,7 @@ function getCreateCommand({
|
|
326723
326479
|
type: waitFor?.resourceType ?? type4,
|
326724
326480
|
uniqueName: waitFor?.uniqueName ?? result.uniqueName,
|
326725
326481
|
action: "deploy",
|
326726
|
-
restartIfTimeout
|
326727
|
-
restartOnError
|
326482
|
+
restartIfTimeout
|
326728
326483
|
});
|
326729
326484
|
if (!isDeployed) {
|
326730
326485
|
throw new Error(`Failed to deploy ${waitFor?.resourceType ?? type4} ${waitFor?.uniqueName ?? result.uniqueName}`);
|
@@ -328195,256 +327950,25 @@ function deleteCommand() {
|
|
328195
327950
|
return new Command("delete").alias("d").description("Delete a resource in the SettleMint platform").addCommand(applicationDeleteCommand()).addCommand(workspaceDeleteCommand());
|
328196
327951
|
}
|
328197
327952
|
|
328198
|
-
// src/commands/platform/common/pause-command.ts
|
328199
|
-
function getPauseCommand({
|
328200
|
-
name: name3,
|
328201
|
-
type: type4,
|
328202
|
-
alias,
|
328203
|
-
envKey,
|
328204
|
-
pauseFunction,
|
328205
|
-
usePersonalAccessToken = true
|
328206
|
-
}) {
|
328207
|
-
const commandName = sanitizeCommandName(name3);
|
328208
|
-
const typeCommandName = sanitizeCommandName(type4);
|
328209
|
-
const exampleCommandPrefix = `platform pause ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
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([
|
328211
|
-
{
|
328212
|
-
description: `Pauses the specified ${type4} by unique name`,
|
328213
|
-
command: `${exampleCommandPrefix} <unique-name>`
|
328214
|
-
},
|
328215
|
-
{
|
328216
|
-
description: `Pauses the default ${type4} in the production environment`,
|
328217
|
-
command: `${exampleCommandPrefix} default --prod`
|
328218
|
-
}
|
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 }) => {
|
328220
|
-
intro(`Pausing ${type4} in the SettleMint platform`);
|
328221
|
-
const env2 = await loadEnv(false, !!prod);
|
328222
|
-
const instance = await instancePrompt({ env: env2, accept: acceptDefaults });
|
328223
|
-
const accessToken = await getApplicationOrPersonalAccessToken({
|
328224
|
-
env: env2,
|
328225
|
-
instance,
|
328226
|
-
prefer: usePersonalAccessToken ? "personal" : "application"
|
328227
|
-
});
|
328228
|
-
const settlemint = createSettleMintClient({
|
328229
|
-
accessToken,
|
328230
|
-
instance
|
328231
|
-
});
|
328232
|
-
const isDefaultUniqueName = uniqueName === "default";
|
328233
|
-
const serviceUniqueName = isDefaultUniqueName ? typeof env2[envKey] === "string" ? env2[envKey] : null : uniqueName;
|
328234
|
-
if (!serviceUniqueName) {
|
328235
|
-
cancel2(`No default ${type4} found in your .env file. Please provide a valid ${type4} unique name or set a default ${type4} first.`);
|
328236
|
-
}
|
328237
|
-
const result = await spinner({
|
328238
|
-
startMessage: `Pausing ${type4}`,
|
328239
|
-
task: async () => {
|
328240
|
-
return pauseFunction(settlemint, serviceUniqueName);
|
328241
|
-
},
|
328242
|
-
stopMessage: `${capitalizeFirstLetter2(type4)} pause initiated`
|
328243
|
-
});
|
328244
|
-
if (wait2) {
|
328245
|
-
const isPaused = await waitForCompletion({
|
328246
|
-
settlemint,
|
328247
|
-
type: type4,
|
328248
|
-
uniqueName: serviceUniqueName,
|
328249
|
-
action: "pause"
|
328250
|
-
});
|
328251
|
-
if (!isPaused) {
|
328252
|
-
throw new Error(`Failed to pause ${type4} ${serviceUniqueName}`);
|
328253
|
-
}
|
328254
|
-
}
|
328255
|
-
outro(`${capitalizeFirstLetter2(type4)} ${result.name} pause initiated successfully`);
|
328256
|
-
});
|
328257
|
-
}
|
328258
|
-
|
328259
|
-
// src/commands/platform/blockchain-network/pause.ts
|
328260
|
-
function blockchainNetworkPauseCommand() {
|
328261
|
-
return getPauseCommand({
|
328262
|
-
name: "blockchain-network",
|
328263
|
-
type: "blockchain network",
|
328264
|
-
alias: "bnw",
|
328265
|
-
envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
|
328266
|
-
pauseFunction: async (settlemint, id) => {
|
328267
|
-
return settlemint.blockchainNetwork.pause(id);
|
328268
|
-
}
|
328269
|
-
});
|
328270
|
-
}
|
328271
|
-
|
328272
|
-
// src/commands/platform/blockchain-node/pause.ts
|
328273
|
-
function blockchainNodePauseCommand() {
|
328274
|
-
return getPauseCommand({
|
328275
|
-
name: "blockchain-node",
|
328276
|
-
type: "blockchain node",
|
328277
|
-
alias: "bn",
|
328278
|
-
envKey: "SETTLEMINT_BLOCKCHAIN_NODE",
|
328279
|
-
pauseFunction: async (settlemint, id) => {
|
328280
|
-
return settlemint.blockchainNode.pause(id);
|
328281
|
-
}
|
328282
|
-
});
|
328283
|
-
}
|
328284
|
-
|
328285
|
-
// src/commands/platform/custom-deployments/pause.ts
|
328286
|
-
function customDeploymentPauseCommand() {
|
328287
|
-
return getPauseCommand({
|
328288
|
-
name: "custom-deployment",
|
328289
|
-
type: "custom deployment",
|
328290
|
-
alias: "cd",
|
328291
|
-
envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
|
328292
|
-
pauseFunction: async (settlemint, id) => {
|
328293
|
-
return settlemint.customDeployment.pause(id);
|
328294
|
-
}
|
328295
|
-
});
|
328296
|
-
}
|
328297
|
-
|
328298
|
-
// src/commands/platform/insights/blockscout/pause.ts
|
328299
|
-
function blockscoutPauseCommand() {
|
328300
|
-
return getPauseCommand({
|
328301
|
-
name: "blockscout",
|
328302
|
-
type: "insights",
|
328303
|
-
alias: "bs",
|
328304
|
-
envKey: "SETTLEMINT_BLOCKSCOUT",
|
328305
|
-
pauseFunction: async (settlemint, id) => {
|
328306
|
-
return settlemint.insights.pause(id);
|
328307
|
-
}
|
328308
|
-
});
|
328309
|
-
}
|
328310
|
-
|
328311
|
-
// src/commands/platform/insights/pause.ts
|
328312
|
-
function insightsPauseCommand() {
|
328313
|
-
return new Command("insights").alias("in").description("Pause an insights service in the SettleMint platform").addCommand(blockscoutPauseCommand());
|
328314
|
-
}
|
328315
|
-
|
328316
|
-
// src/commands/platform/integration-tools/hasura/pause.ts
|
328317
|
-
function hasuraPauseCommand() {
|
328318
|
-
return getPauseCommand({
|
328319
|
-
name: "hasura",
|
328320
|
-
type: "integration tool",
|
328321
|
-
alias: "ha",
|
328322
|
-
envKey: "SETTLEMINT_HASURA",
|
328323
|
-
pauseFunction: async (settlemint, id) => {
|
328324
|
-
return settlemint.integrationTool.pause(id);
|
328325
|
-
}
|
328326
|
-
});
|
328327
|
-
}
|
328328
|
-
|
328329
|
-
// src/commands/platform/integration-tools/pause.ts
|
328330
|
-
function integrationToolPauseCommand() {
|
328331
|
-
return new Command("integration-tool").alias("it").description("Pause an integration tool service in the SettleMint platform").addCommand(hasuraPauseCommand());
|
328332
|
-
}
|
328333
|
-
|
328334
|
-
// src/commands/platform/load-balancer/pause.ts
|
328335
|
-
function loadBalancerPauseCommand() {
|
328336
|
-
return getPauseCommand({
|
328337
|
-
name: "evm",
|
328338
|
-
type: "load balancer",
|
328339
|
-
alias: "lb",
|
328340
|
-
envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
|
328341
|
-
pauseFunction: async (settlemint, id) => {
|
328342
|
-
return settlemint.loadBalancer.pause(id);
|
328343
|
-
}
|
328344
|
-
});
|
328345
|
-
}
|
328346
|
-
|
328347
|
-
// src/commands/platform/middleware/graph/pause.ts
|
328348
|
-
function graphMiddlewarePauseCommand() {
|
328349
|
-
return getPauseCommand({
|
328350
|
-
name: "graph",
|
328351
|
-
type: "middleware",
|
328352
|
-
alias: "gr",
|
328353
|
-
envKey: "SETTLEMINT_THEGRAPH",
|
328354
|
-
pauseFunction: async (settlemint, id) => {
|
328355
|
-
return settlemint.middleware.pause(id);
|
328356
|
-
}
|
328357
|
-
});
|
328358
|
-
}
|
328359
|
-
|
328360
|
-
// src/commands/platform/middleware/smart-contract-portal/pause.ts
|
328361
|
-
function smartContractPortalMiddlewarePauseCommand() {
|
328362
|
-
return getPauseCommand({
|
328363
|
-
name: "smart-contract-portal",
|
328364
|
-
type: "middleware",
|
328365
|
-
alias: "scp",
|
328366
|
-
envKey: "SETTLEMINT_PORTAL",
|
328367
|
-
pauseFunction: async (settlemint, id) => {
|
328368
|
-
return settlemint.middleware.pause(id);
|
328369
|
-
}
|
328370
|
-
});
|
328371
|
-
}
|
328372
|
-
|
328373
|
-
// src/commands/platform/middleware/pause.ts
|
328374
|
-
function middlewarePauseCommand() {
|
328375
|
-
return new Command("middleware").alias("mw").description("Pause a middleware service in the SettleMint platform").addCommand(graphMiddlewarePauseCommand()).addCommand(smartContractPortalMiddlewarePauseCommand());
|
328376
|
-
}
|
328377
|
-
|
328378
|
-
// src/commands/platform/private-key/pause.ts
|
328379
|
-
function privateKeyPauseCommand() {
|
328380
|
-
return getPauseCommand({
|
328381
|
-
name: "private-key",
|
328382
|
-
type: "private key",
|
328383
|
-
alias: "pk",
|
328384
|
-
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
328385
|
-
pauseFunction: async (settlemint, id) => {
|
328386
|
-
return settlemint.privateKey.pause(id);
|
328387
|
-
}
|
328388
|
-
});
|
328389
|
-
}
|
328390
|
-
|
328391
|
-
// src/commands/platform/storage/ipfs/pause.ts
|
328392
|
-
function ipfsStoragePauseCommand() {
|
328393
|
-
return getPauseCommand({
|
328394
|
-
name: "ipfs",
|
328395
|
-
type: "storage",
|
328396
|
-
alias: "ip",
|
328397
|
-
envKey: "SETTLEMINT_IPFS",
|
328398
|
-
pauseFunction: async (settlemint, id) => {
|
328399
|
-
return settlemint.storage.pause(id);
|
328400
|
-
}
|
328401
|
-
});
|
328402
|
-
}
|
328403
|
-
|
328404
|
-
// src/commands/platform/storage/minio/pause.ts
|
328405
|
-
function minioStoragePauseCommand() {
|
328406
|
-
return getPauseCommand({
|
328407
|
-
name: "minio",
|
328408
|
-
type: "storage",
|
328409
|
-
alias: "m",
|
328410
|
-
envKey: "SETTLEMINT_MINIO",
|
328411
|
-
pauseFunction: async (settlemint, id) => {
|
328412
|
-
return settlemint.storage.pause(id);
|
328413
|
-
}
|
328414
|
-
});
|
328415
|
-
}
|
328416
|
-
|
328417
|
-
// src/commands/platform/storage/pause.ts
|
328418
|
-
function storagePauseCommand() {
|
328419
|
-
return new Command("storage").alias("st").description("Pause a storage service in the SettleMint platform").addCommand(ipfsStoragePauseCommand()).addCommand(minioStoragePauseCommand());
|
328420
|
-
}
|
328421
|
-
|
328422
|
-
// src/commands/platform/pause.ts
|
328423
|
-
function pauseCommand() {
|
328424
|
-
const cmd2 = new Command("pause").description("Pause a resource in the SettleMint platform").addCommand(blockchainNodePauseCommand()).addCommand(blockchainNetworkPauseCommand()).addCommand(customDeploymentPauseCommand()).addCommand(insightsPauseCommand()).addCommand(integrationToolPauseCommand()).addCommand(loadBalancerPauseCommand()).addCommand(middlewarePauseCommand()).addCommand(privateKeyPauseCommand()).addCommand(storagePauseCommand());
|
328425
|
-
return cmd2;
|
328426
|
-
}
|
328427
|
-
|
328428
327953
|
// src/commands/platform/common/restart-command.ts
|
328429
327954
|
function getRestartCommand({
|
328430
327955
|
name: name3,
|
328431
327956
|
type: type4,
|
327957
|
+
subType,
|
328432
327958
|
alias,
|
328433
327959
|
envKey,
|
328434
327960
|
restartFunction,
|
328435
327961
|
usePersonalAccessToken = true
|
328436
327962
|
}) {
|
328437
327963
|
const commandName = sanitizeCommandName(name3);
|
328438
|
-
const typeCommandName = sanitizeCommandName(type4);
|
328439
|
-
const exampleCommandPrefix = `platform restart ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
328440
327964
|
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([
|
328441
327965
|
{
|
328442
|
-
description: `Restarts the specified ${type4} by
|
328443
|
-
command:
|
327966
|
+
description: `Restarts the specified ${type4} by id`,
|
327967
|
+
command: `platform restart ${commandName}${subType ? ` ${subType}` : ""} <${type4}-id>`
|
328444
327968
|
},
|
328445
327969
|
{
|
328446
327970
|
description: `Restarts the default ${type4} in the production environment`,
|
328447
|
-
command:
|
327971
|
+
command: `platform restart ${commandName}${subType ? ` ${subType}` : ""} default --prod`
|
328448
327972
|
}
|
328449
327973
|
])).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 }) => {
|
328450
327974
|
intro(`Restarting ${type4} in the SettleMint platform`);
|
@@ -328531,6 +328055,7 @@ function blockscoutRestartCommand() {
|
|
328531
328055
|
return getRestartCommand({
|
328532
328056
|
name: "blockscout",
|
328533
328057
|
type: "insights",
|
328058
|
+
subType: "blockscout",
|
328534
328059
|
alias: "bs",
|
328535
328060
|
envKey: "SETTLEMINT_BLOCKSCOUT",
|
328536
328061
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -328549,6 +328074,7 @@ function hasuraRestartCommand() {
|
|
328549
328074
|
return getRestartCommand({
|
328550
328075
|
name: "hasura",
|
328551
328076
|
type: "integration tool",
|
328077
|
+
subType: "hasura",
|
328552
328078
|
alias: "ha",
|
328553
328079
|
envKey: "SETTLEMINT_HASURA",
|
328554
328080
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -328580,6 +328106,7 @@ function graphRestartCommand() {
|
|
328580
328106
|
return getRestartCommand({
|
328581
328107
|
name: "graph",
|
328582
328108
|
type: "middleware",
|
328109
|
+
subType: "graph",
|
328583
328110
|
alias: "gr",
|
328584
328111
|
envKey: "SETTLEMINT_THEGRAPH",
|
328585
328112
|
restartFunction: async (settlemint, id) => {
|
@@ -328593,6 +328120,7 @@ function smartContractPortalRestartCommand() {
|
|
328593
328120
|
return getRestartCommand({
|
328594
328121
|
name: "smart-contract-portal",
|
328595
328122
|
type: "middleware",
|
328123
|
+
subType: "smart-contract-portal",
|
328596
328124
|
alias: "scp",
|
328597
328125
|
envKey: "SETTLEMINT_PORTAL",
|
328598
328126
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -328643,236 +328171,6 @@ function restartCommand() {
|
|
328643
328171
|
return cmd2;
|
328644
328172
|
}
|
328645
328173
|
|
328646
|
-
// src/commands/platform/common/resume-command.ts
|
328647
|
-
function getResumeCommand({
|
328648
|
-
name: name3,
|
328649
|
-
type: type4,
|
328650
|
-
alias,
|
328651
|
-
envKey,
|
328652
|
-
resumeFunction,
|
328653
|
-
usePersonalAccessToken = true
|
328654
|
-
}) {
|
328655
|
-
const commandName = sanitizeCommandName(name3);
|
328656
|
-
const typeCommandName = sanitizeCommandName(type4);
|
328657
|
-
const exampleCommandPrefix = `platform resume ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
328658
|
-
return new Command(commandName).alias(alias).description(`Resume a ${type4} in the SettleMint platform. Provide the ${type4} unique name or use 'default' to resume the default ${type4} from your .env file.`).usage(createExamples([
|
328659
|
-
{
|
328660
|
-
description: `Resumes the specified ${type4} by unique name`,
|
328661
|
-
command: `${exampleCommandPrefix} <unique-name>`
|
328662
|
-
},
|
328663
|
-
{
|
328664
|
-
description: `Resumes the default ${type4} in the production environment`,
|
328665
|
-
command: `${exampleCommandPrefix} default --prod`
|
328666
|
-
}
|
328667
|
-
])).argument("<unique-name>", `The unique name of the ${type4}, use 'default' to resume the default one from your .env file`).option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").option("-w, --wait", "Wait until resumed").action(async (uniqueName, { acceptDefaults, prod, wait: wait2 }) => {
|
328668
|
-
intro(`Resuming ${type4} in the SettleMint platform`);
|
328669
|
-
const env2 = await loadEnv(false, !!prod);
|
328670
|
-
const instance = await instancePrompt({ env: env2, accept: acceptDefaults });
|
328671
|
-
const accessToken = await getApplicationOrPersonalAccessToken({
|
328672
|
-
env: env2,
|
328673
|
-
instance,
|
328674
|
-
prefer: usePersonalAccessToken ? "personal" : "application"
|
328675
|
-
});
|
328676
|
-
const settlemint = createSettleMintClient({
|
328677
|
-
accessToken,
|
328678
|
-
instance
|
328679
|
-
});
|
328680
|
-
const isDefaultUniqueName = uniqueName === "default";
|
328681
|
-
const serviceUniqueName = isDefaultUniqueName ? typeof env2[envKey] === "string" ? env2[envKey] : null : uniqueName;
|
328682
|
-
if (!serviceUniqueName) {
|
328683
|
-
cancel2(`No default ${type4} found in your .env file. Please provide a valid ${type4} unique name or set a default ${type4} first.`);
|
328684
|
-
}
|
328685
|
-
const result = await spinner({
|
328686
|
-
startMessage: `Resuming ${type4}`,
|
328687
|
-
task: async () => {
|
328688
|
-
return resumeFunction(settlemint, serviceUniqueName);
|
328689
|
-
},
|
328690
|
-
stopMessage: `${capitalizeFirstLetter2(type4)} resume initiated`
|
328691
|
-
});
|
328692
|
-
if (wait2) {
|
328693
|
-
const isResumed = await waitForCompletion({
|
328694
|
-
settlemint,
|
328695
|
-
type: type4,
|
328696
|
-
uniqueName: serviceUniqueName,
|
328697
|
-
action: "resume"
|
328698
|
-
});
|
328699
|
-
if (!isResumed) {
|
328700
|
-
throw new Error(`Failed to resume ${type4} ${serviceUniqueName}`);
|
328701
|
-
}
|
328702
|
-
}
|
328703
|
-
outro(`${capitalizeFirstLetter2(type4)} ${result.name} resume initiated successfully`);
|
328704
|
-
});
|
328705
|
-
}
|
328706
|
-
|
328707
|
-
// src/commands/platform/blockchain-network/resume.ts
|
328708
|
-
function blockchainNetworkResumeCommand() {
|
328709
|
-
return getResumeCommand({
|
328710
|
-
name: "blockchain-network",
|
328711
|
-
type: "blockchain network",
|
328712
|
-
alias: "bnw",
|
328713
|
-
envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
|
328714
|
-
resumeFunction: async (settlemint, id) => {
|
328715
|
-
return settlemint.blockchainNetwork.resume(id);
|
328716
|
-
}
|
328717
|
-
});
|
328718
|
-
}
|
328719
|
-
|
328720
|
-
// src/commands/platform/blockchain-node/resume.ts
|
328721
|
-
function blockchainNodeResumeCommand() {
|
328722
|
-
return getResumeCommand({
|
328723
|
-
name: "blockchain-node",
|
328724
|
-
type: "blockchain node",
|
328725
|
-
alias: "bn",
|
328726
|
-
envKey: "SETTLEMINT_BLOCKCHAIN_NODE",
|
328727
|
-
resumeFunction: async (settlemint, id) => {
|
328728
|
-
return settlemint.blockchainNode.resume(id);
|
328729
|
-
}
|
328730
|
-
});
|
328731
|
-
}
|
328732
|
-
|
328733
|
-
// src/commands/platform/custom-deployments/resume.ts
|
328734
|
-
function customDeploymentResumeCommand() {
|
328735
|
-
return getResumeCommand({
|
328736
|
-
name: "custom-deployment",
|
328737
|
-
type: "custom deployment",
|
328738
|
-
alias: "cd",
|
328739
|
-
envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
|
328740
|
-
resumeFunction: async (settlemint, id) => {
|
328741
|
-
return settlemint.customDeployment.resume(id);
|
328742
|
-
}
|
328743
|
-
});
|
328744
|
-
}
|
328745
|
-
|
328746
|
-
// src/commands/platform/insights/blockscout/resume.ts
|
328747
|
-
function blockscoutResumeCommand() {
|
328748
|
-
return getResumeCommand({
|
328749
|
-
name: "blockscout",
|
328750
|
-
type: "insights",
|
328751
|
-
alias: "bs",
|
328752
|
-
envKey: "SETTLEMINT_BLOCKSCOUT",
|
328753
|
-
resumeFunction: async (settlemint, id) => {
|
328754
|
-
return settlemint.insights.resume(id);
|
328755
|
-
}
|
328756
|
-
});
|
328757
|
-
}
|
328758
|
-
|
328759
|
-
// src/commands/platform/insights/resume.ts
|
328760
|
-
function insightsResumeCommand() {
|
328761
|
-
return new Command("insights").alias("in").description("Resume an insights service in the SettleMint platform").addCommand(blockscoutResumeCommand());
|
328762
|
-
}
|
328763
|
-
|
328764
|
-
// src/commands/platform/integration-tools/hasura/resume.ts
|
328765
|
-
function hasuraResumeCommand() {
|
328766
|
-
return getResumeCommand({
|
328767
|
-
name: "hasura",
|
328768
|
-
type: "integration tool",
|
328769
|
-
alias: "ha",
|
328770
|
-
envKey: "SETTLEMINT_HASURA",
|
328771
|
-
resumeFunction: async (settlemint, id) => {
|
328772
|
-
return settlemint.integrationTool.resume(id);
|
328773
|
-
}
|
328774
|
-
});
|
328775
|
-
}
|
328776
|
-
|
328777
|
-
// src/commands/platform/integration-tools/resume.ts
|
328778
|
-
function integrationToolResumeCommand() {
|
328779
|
-
return new Command("integration-tool").alias("it").description("Resume an integration tool service in the SettleMint platform").addCommand(hasuraResumeCommand());
|
328780
|
-
}
|
328781
|
-
|
328782
|
-
// src/commands/platform/load-balancer/resume.ts
|
328783
|
-
function loadBalancerResumeCommand() {
|
328784
|
-
return getResumeCommand({
|
328785
|
-
name: "load-balancer",
|
328786
|
-
type: "load balancer",
|
328787
|
-
alias: "lb",
|
328788
|
-
envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
|
328789
|
-
resumeFunction: async (settlemint, id) => {
|
328790
|
-
return settlemint.loadBalancer.resume(id);
|
328791
|
-
}
|
328792
|
-
});
|
328793
|
-
}
|
328794
|
-
|
328795
|
-
// src/commands/platform/middleware/graph/resume.ts
|
328796
|
-
function graphMiddlewareResumeCommand() {
|
328797
|
-
return getResumeCommand({
|
328798
|
-
name: "graph",
|
328799
|
-
type: "middleware",
|
328800
|
-
alias: "gr",
|
328801
|
-
envKey: "SETTLEMINT_THEGRAPH",
|
328802
|
-
resumeFunction: async (settlemint, id) => {
|
328803
|
-
return settlemint.middleware.resume(id);
|
328804
|
-
}
|
328805
|
-
});
|
328806
|
-
}
|
328807
|
-
|
328808
|
-
// src/commands/platform/middleware/smart-contract-portal/resume.ts
|
328809
|
-
function smartContractPortalMiddlewareResumeCommand() {
|
328810
|
-
return getResumeCommand({
|
328811
|
-
name: "smart-contract-portal",
|
328812
|
-
type: "middleware",
|
328813
|
-
alias: "scp",
|
328814
|
-
envKey: "SETTLEMINT_PORTAL",
|
328815
|
-
resumeFunction: async (settlemint, id) => {
|
328816
|
-
return settlemint.middleware.resume(id);
|
328817
|
-
}
|
328818
|
-
});
|
328819
|
-
}
|
328820
|
-
|
328821
|
-
// src/commands/platform/middleware/resume.ts
|
328822
|
-
function middlewareResumeCommand() {
|
328823
|
-
return new Command("middleware").alias("mw").description("Resume a middleware service in the SettleMint platform").addCommand(graphMiddlewareResumeCommand()).addCommand(smartContractPortalMiddlewareResumeCommand());
|
328824
|
-
}
|
328825
|
-
|
328826
|
-
// src/commands/platform/private-key/resume.ts
|
328827
|
-
function privateKeyResumeCommand() {
|
328828
|
-
return getResumeCommand({
|
328829
|
-
name: "private-key",
|
328830
|
-
type: "private key",
|
328831
|
-
alias: "pk",
|
328832
|
-
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
328833
|
-
resumeFunction: async (settlemint, id) => {
|
328834
|
-
return settlemint.privateKey.resume(id);
|
328835
|
-
}
|
328836
|
-
});
|
328837
|
-
}
|
328838
|
-
|
328839
|
-
// src/commands/platform/storage/ipfs/resume.ts
|
328840
|
-
function ipfsStorageResumeCommand() {
|
328841
|
-
return getResumeCommand({
|
328842
|
-
name: "ipfs",
|
328843
|
-
type: "storage",
|
328844
|
-
alias: "ip",
|
328845
|
-
envKey: "SETTLEMINT_IPFS",
|
328846
|
-
resumeFunction: async (settlemint, id) => {
|
328847
|
-
return settlemint.storage.resume(id);
|
328848
|
-
}
|
328849
|
-
});
|
328850
|
-
}
|
328851
|
-
|
328852
|
-
// src/commands/platform/storage/minio/resume.ts
|
328853
|
-
function minioStorageResumeCommand() {
|
328854
|
-
return getResumeCommand({
|
328855
|
-
name: "minio",
|
328856
|
-
type: "storage",
|
328857
|
-
alias: "m",
|
328858
|
-
envKey: "SETTLEMINT_MINIO",
|
328859
|
-
resumeFunction: async (settlemint, id) => {
|
328860
|
-
return settlemint.storage.resume(id);
|
328861
|
-
}
|
328862
|
-
});
|
328863
|
-
}
|
328864
|
-
|
328865
|
-
// src/commands/platform/storage/resume.ts
|
328866
|
-
function storageResumeCommand() {
|
328867
|
-
return new Command("storage").alias("st").description("Resume a storage service in the SettleMint platform").addCommand(ipfsStorageResumeCommand()).addCommand(minioStorageResumeCommand());
|
328868
|
-
}
|
328869
|
-
|
328870
|
-
// src/commands/platform/resume.ts
|
328871
|
-
function resumeCommand() {
|
328872
|
-
const cmd2 = new Command("resume").description("Resume a resource in the SettleMint platform").addCommand(blockchainNodeResumeCommand()).addCommand(blockchainNetworkResumeCommand()).addCommand(customDeploymentResumeCommand()).addCommand(insightsResumeCommand()).addCommand(integrationToolResumeCommand()).addCommand(loadBalancerResumeCommand()).addCommand(middlewareResumeCommand()).addCommand(privateKeyResumeCommand()).addCommand(storageResumeCommand());
|
328873
|
-
return cmd2;
|
328874
|
-
}
|
328875
|
-
|
328876
328174
|
// src/commands/platform/custom-deployments/update.ts
|
328877
328175
|
function customDeploymentsUpdateCommand() {
|
328878
328176
|
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([
|
@@ -329448,7 +328746,7 @@ function listCommand() {
|
|
329448
328746
|
|
329449
328747
|
// src/commands/platform.ts
|
329450
328748
|
function platformCommand() {
|
329451
|
-
return new Command("platform").description("Manage SettleMint platform resources").addCommand(configCommand()).addCommand(createCommand3()).addCommand(deleteCommand()).addCommand(listCommand()).addCommand(
|
328749
|
+
return new Command("platform").description("Manage SettleMint platform resources").addCommand(configCommand()).addCommand(createCommand3()).addCommand(deleteCommand()).addCommand(listCommand()).addCommand(restartCommand()).addCommand(updateCommand());
|
329452
328750
|
}
|
329453
328751
|
|
329454
328752
|
// src/commands/smart-contract-set/create.ts
|
@@ -330384,12 +329682,12 @@ async function getNodeName({
|
|
330384
329682
|
|
330385
329683
|
// src/commands/smart-contract-set/subgraph/build.ts
|
330386
329684
|
function subgraphBuildCommand() {
|
330387
|
-
return new Command("build").description("Build the subgraph").
|
329685
|
+
return new Command("build").description("Build the subgraph").usage(createExamples([
|
330388
329686
|
{
|
330389
329687
|
description: "Build the subgraph",
|
330390
329688
|
command: "scs subgraph build"
|
330391
329689
|
}
|
330392
|
-
])).action(async (
|
329690
|
+
])).action(async () => {
|
330393
329691
|
intro("Building subgraph");
|
330394
329692
|
await validateIfRequiredPackagesAreInstalled(["@graphprotocol/graph-cli"]);
|
330395
329693
|
await subgraphSetup({
|
@@ -330398,7 +329696,7 @@ function subgraphBuildCommand() {
|
|
330398
329696
|
const { command, args } = await getPackageManagerExecutable();
|
330399
329697
|
const subgraphYamlFile = await getSubgraphYamlFile();
|
330400
329698
|
await executeCommand(command, [...args, "graph", "codegen", subgraphYamlFile]);
|
330401
|
-
await executeCommand(command, [...args, "graph", "build",
|
329699
|
+
await executeCommand(command, [...args, "graph", "build", subgraphYamlFile]);
|
330402
329700
|
outro("Subgraph built successfully");
|
330403
329701
|
});
|
330404
329702
|
}
|
@@ -330794,4 +330092,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
330794
330092
|
// src/cli.ts
|
330795
330093
|
sdkCliCommand();
|
330796
330094
|
|
330797
|
-
//# debugId=
|
330095
|
+
//# debugId=6F57897A3E92B9C464756E2164756E21
|