@settlemint/sdk-cli 2.4.0-pr7cd97e38 → 2.4.0-pr85903089
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 +818 -127
- package/dist/cli.js.map +79 -51
- package/package.json +10 -8
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;
|
@@ -258129,9 +258129,9 @@ ${formattedErrors}`);
|
|
258129
258129
|
throw error$37;
|
258130
258130
|
}
|
258131
258131
|
}
|
258132
|
-
var ApplicationAccessTokenSchema = string$1().regex(/^sm_aat_
|
258133
|
-
var PersonalAccessTokenSchema = string$1().regex(/^sm_pat_
|
258134
|
-
var AccessTokenSchema = string$1().regex(/^sm_pat_
|
258132
|
+
var ApplicationAccessTokenSchema = string$1().regex(/^sm_aat_.+$/);
|
258133
|
+
var PersonalAccessTokenSchema = string$1().regex(/^sm_pat_.+$/);
|
258134
|
+
var AccessTokenSchema = string$1().regex(/^(sm_pat_.+|sm_aat_.+)$/);
|
258135
258135
|
function tryParseJson(value, defaultValue = null) {
|
258136
258136
|
try {
|
258137
258137
|
const parsed = JSON.parse(value);
|
@@ -258139,7 +258139,7 @@ function tryParseJson(value, defaultValue = null) {
|
|
258139
258139
|
return defaultValue;
|
258140
258140
|
}
|
258141
258141
|
return parsed;
|
258142
|
-
} catch (
|
258142
|
+
} catch (_err) {
|
258143
258143
|
return defaultValue;
|
258144
258144
|
}
|
258145
258145
|
}
|
@@ -263769,7 +263769,7 @@ async function findMonoRepoPackages(projectDir) {
|
|
263769
263769
|
}));
|
263770
263770
|
const allPaths = packagePaths.flat();
|
263771
263771
|
return allPaths.length === 0 ? [projectDir] : [monoRepoRoot, ...allPaths];
|
263772
|
-
} catch (
|
263772
|
+
} catch (_error) {
|
263773
263773
|
return [projectDir];
|
263774
263774
|
}
|
263775
263775
|
}
|
@@ -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-pr85903089",
|
263844
263844
|
type: "module",
|
263845
263845
|
private: false,
|
263846
263846
|
license: "FSL-1.1-MIT",
|
@@ -263859,7 +263859,9 @@ var package_default = {
|
|
263859
263859
|
url: "https://github.com/settlemint/sdk/issues",
|
263860
263860
|
email: "support@settlemint.com"
|
263861
263861
|
},
|
263862
|
-
files: [
|
263862
|
+
files: [
|
263863
|
+
"dist"
|
263864
|
+
],
|
263863
263865
|
exports: {
|
263864
263866
|
"./*": {
|
263865
263867
|
types: "./dist/*.d.ts",
|
@@ -263889,10 +263891,10 @@ var package_default = {
|
|
263889
263891
|
"@inquirer/input": "4.1.12",
|
263890
263892
|
"@inquirer/password": "4.0.15",
|
263891
263893
|
"@inquirer/select": "4.2.3",
|
263892
|
-
"@settlemint/sdk-js": "2.4.0-
|
263893
|
-
"@settlemint/sdk-utils": "2.4.0-
|
263894
|
-
"@settlemint/sdk-viem": "2.4.0-
|
263895
|
-
"@types/node": "24.0.
|
263894
|
+
"@settlemint/sdk-js": "2.4.0-pr85903089",
|
263895
|
+
"@settlemint/sdk-utils": "2.4.0-pr85903089",
|
263896
|
+
"@settlemint/sdk-viem": "2.4.0-pr85903089",
|
263897
|
+
"@types/node": "24.0.10",
|
263896
263898
|
"@types/semver": "7.7.0",
|
263897
263899
|
"@types/which": "3.0.4",
|
263898
263900
|
"get-tsconfig": "4.10.1",
|
@@ -263900,13 +263902,13 @@ var package_default = {
|
|
263900
263902
|
"is-in-ci": "1.0.0",
|
263901
263903
|
semver: "7.7.2",
|
263902
263904
|
slugify: "1.6.6",
|
263903
|
-
viem: "2.31.
|
263905
|
+
viem: "2.31.6",
|
263904
263906
|
which: "5.0.0",
|
263905
263907
|
yaml: "2.8.0",
|
263906
263908
|
yoctocolors: "2.1.1"
|
263907
263909
|
},
|
263908
263910
|
peerDependencies: {
|
263909
|
-
hardhat: "2.
|
263911
|
+
hardhat: "2.25.0"
|
263910
263912
|
},
|
263911
263913
|
peerDependenciesMeta: {
|
263912
263914
|
hardhat: {
|
@@ -263961,7 +263963,7 @@ async function telemetry(data) {
|
|
263961
263963
|
signal: controller.signal
|
263962
263964
|
});
|
263963
263965
|
clearTimeout(timeout);
|
263964
|
-
} catch (
|
263966
|
+
} catch (_error) {}
|
263965
263967
|
}
|
263966
263968
|
|
263967
263969
|
// ../../node_modules/@commander-js/extra-typings/esm.mjs
|
@@ -276513,9 +276515,9 @@ ${formattedErrors}`);
|
|
276513
276515
|
throw error$372;
|
276514
276516
|
}
|
276515
276517
|
}
|
276516
|
-
var ApplicationAccessTokenSchema2 = string$12().regex(/^sm_aat_
|
276517
|
-
var PersonalAccessTokenSchema2 = string$12().regex(/^sm_pat_
|
276518
|
-
var AccessTokenSchema2 = string$12().regex(/^sm_pat_
|
276518
|
+
var ApplicationAccessTokenSchema2 = string$12().regex(/^sm_aat_.+$/);
|
276519
|
+
var PersonalAccessTokenSchema2 = string$12().regex(/^sm_pat_.+$/);
|
276520
|
+
var AccessTokenSchema2 = string$12().regex(/^(sm_pat_.+|sm_aat_.+)$/);
|
276519
276521
|
function tryParseJson2(value, defaultValue = null) {
|
276520
276522
|
try {
|
276521
276523
|
const parsed = JSON.parse(value);
|
@@ -276523,7 +276525,7 @@ function tryParseJson2(value, defaultValue = null) {
|
|
276523
276525
|
return defaultValue;
|
276524
276526
|
}
|
276525
276527
|
return parsed;
|
276526
|
-
} catch (
|
276528
|
+
} catch (_err) {
|
276527
276529
|
return defaultValue;
|
276528
276530
|
}
|
276529
276531
|
}
|
@@ -288289,6 +288291,20 @@ var restartBlockchainNetwork = graphql(`
|
|
288289
288291
|
}
|
288290
288292
|
}
|
288291
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]);
|
288292
288308
|
var blockchainNetworkList = (gqlClient) => {
|
288293
288309
|
return async (applicationUniqueName) => {
|
288294
288310
|
const { blockchainNetworksByUniqueName: { items } } = await gqlClient.request(getBlockchainNetworks, { applicationUniqueName });
|
@@ -288323,6 +288339,14 @@ var blockchainNetworkRestart = (gqlClient) => async (blockchainNetworkUniqueName
|
|
288323
288339
|
const { restartBlockchainNetworkByUniqueName: blockchainNetwork } = await gqlClient.request(restartBlockchainNetwork, { uniqueName: blockchainNetworkUniqueName });
|
288324
288340
|
return blockchainNetwork;
|
288325
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
|
+
};
|
288326
288350
|
var BlockchainNodeFragment = graphql(`
|
288327
288351
|
fragment BlockchainNode on BlockchainNode {
|
288328
288352
|
__typename
|
@@ -288456,6 +288480,20 @@ var restartBlockchainNode = graphql(`
|
|
288456
288480
|
}
|
288457
288481
|
}
|
288458
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]);
|
288459
288497
|
var blockchainNodeList = (gqlClient) => {
|
288460
288498
|
return async (applicationUniqueName) => {
|
288461
288499
|
const { blockchainNodesByUniqueName: { items } } = await gqlClient.request(getBlockchainNodes, { applicationUniqueName });
|
@@ -288484,6 +288522,14 @@ var blockchainNodeRestart = (gqlClient) => async (blockchainNodeUniqueName) => {
|
|
288484
288522
|
const { restartBlockchainNodeByUniqueName: blockchainNode } = await gqlClient.request(restartBlockchainNode, { uniqueName: blockchainNodeUniqueName });
|
288485
288523
|
return blockchainNode;
|
288486
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
|
+
};
|
288487
288533
|
var CustomDeploymentFragment = graphql(`
|
288488
288534
|
fragment CustomDeployment on CustomDeployment {
|
288489
288535
|
id
|
@@ -288566,6 +288612,20 @@ var restartCustomDeployment = graphql(`
|
|
288566
288612
|
}
|
288567
288613
|
}
|
288568
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]);
|
288569
288629
|
var customdeploymentList = (gqlClient) => {
|
288570
288630
|
return async (applicationUniqueName) => {
|
288571
288631
|
const { customDeploymentsByUniqueName: { items } } = await gqlClient.request(getCustomDeployments, { applicationUniqueName });
|
@@ -288602,6 +288662,14 @@ var customDeploymentRestart = (gqlClient) => async (customDeploymentUniqueName)
|
|
288602
288662
|
const { restartCustomDeploymentByUniqueName: customDeployment } = await gqlClient.request(restartCustomDeployment, { uniqueName: customDeploymentUniqueName });
|
288603
288663
|
return customDeployment;
|
288604
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
|
+
};
|
288605
288673
|
var getFoundryEnvConfig = graphql(`
|
288606
288674
|
query GetFoundryEnvConfig($blockchainNodeUniqueName: String!) {
|
288607
288675
|
foundryEnvConfigByUniqueName(blockchainNodeUniqueName: $blockchainNodeUniqueName)
|
@@ -288678,6 +288746,20 @@ var restartLoadBalancer = graphql(`
|
|
288678
288746
|
}
|
288679
288747
|
}
|
288680
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]);
|
288681
288763
|
var loadBalancerRead = (gqlClient) => {
|
288682
288764
|
return async (loadBalancerUniqueName) => {
|
288683
288765
|
const { loadBalancerByUniqueName: loadBalancer } = await gqlClient.request(getLoadBalancer, { uniqueName: loadBalancerUniqueName });
|
@@ -288711,6 +288793,14 @@ var loadBalancerRestart = (gqlClient) => async (loadBalancerUniqueName) => {
|
|
288711
288793
|
const { restartLoadBalancerByUniqueName: loadBalancer } = await gqlClient.request(restartLoadBalancer, { uniqueName: loadBalancerUniqueName });
|
288712
288794
|
return loadBalancer;
|
288713
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
|
+
};
|
288714
288804
|
var InsightsFragment = graphql(`
|
288715
288805
|
fragment Insights on Insights {
|
288716
288806
|
__typename
|
@@ -288784,6 +288874,20 @@ var restartInsights = graphql(`
|
|
288784
288874
|
}
|
288785
288875
|
}
|
288786
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]);
|
288787
288891
|
var insightsList = (gqlClient) => {
|
288788
288892
|
return async (applicationUniqueName) => {
|
288789
288893
|
const { insightsListByUniqueName: { items } } = await gqlClient.request(getInsights, { applicationUniqueName });
|
@@ -288817,6 +288921,14 @@ var insightsRestart = (gqlClient) => async (insightsUniqueName) => {
|
|
288817
288921
|
const { restartInsightsByUniqueName: insights } = await gqlClient.request(restartInsights, { uniqueName: insightsUniqueName });
|
288818
288922
|
return insights;
|
288819
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
|
+
};
|
288820
288932
|
var IntegrationFragment = graphql(`
|
288821
288933
|
fragment Integration on Integration {
|
288822
288934
|
__typename
|
@@ -288886,6 +288998,20 @@ var restartIntegrationTool = graphql(`
|
|
288886
288998
|
}
|
288887
288999
|
}
|
288888
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]);
|
288889
289015
|
var integrationToolList = (gqlClient) => {
|
288890
289016
|
return async (applicationUniqueName) => {
|
288891
289017
|
const { integrationsByUniqueName: { items } } = await gqlClient.request(getIntegrations, { applicationUniqueName });
|
@@ -288913,6 +289039,14 @@ var integrationToolRestart = (gqlClient) => async (integrationUniqueName) => {
|
|
288913
289039
|
const { restartIntegrationByUniqueName: integration } = await gqlClient.request(restartIntegrationTool, { uniqueName: integrationUniqueName });
|
288914
289040
|
return integration;
|
288915
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
|
+
};
|
288916
289050
|
var StorageFragment = graphql(`
|
288917
289051
|
fragment Storage on Storage {
|
288918
289052
|
__typename
|
@@ -288982,6 +289116,20 @@ var restartStorage = graphql(`
|
|
288982
289116
|
}
|
288983
289117
|
}
|
288984
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]);
|
288985
289133
|
var storageList = (gqlClient) => {
|
288986
289134
|
return async (applicationUniqueName) => {
|
288987
289135
|
const { storagesByUniqueName: { items } } = await gqlClient.request(getStorages, { applicationUniqueName });
|
@@ -289009,6 +289157,14 @@ var storageRestart = (gqlClient) => async (storageUniqueName) => {
|
|
289009
289157
|
const { restartStorageByUniqueName: storage } = await gqlClient.request(restartStorage, { uniqueName: storageUniqueName });
|
289010
289158
|
return storage;
|
289011
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
|
+
};
|
289012
289168
|
var MiddlewareFragment = graphql(`
|
289013
289169
|
fragment Middleware on Middleware {
|
289014
289170
|
__typename
|
@@ -289109,6 +289265,20 @@ var restartMiddleware = graphql(`
|
|
289109
289265
|
}
|
289110
289266
|
}
|
289111
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]);
|
289112
289282
|
var middlewareList = (gqlClient) => {
|
289113
289283
|
return async (applicationUniqueName) => {
|
289114
289284
|
const { middlewaresByUniqueName: { items } } = await gqlClient.request(getMiddlewares, { applicationUniqueName });
|
@@ -289153,6 +289323,14 @@ var middlewareRestart = (gqlClient) => async (middlewareUniqueName) => {
|
|
289153
289323
|
const { restartMiddlewareByUniqueName: middleware } = await gqlClient.request(restartMiddleware, { uniqueName: middlewareUniqueName });
|
289154
289324
|
return middleware;
|
289155
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
|
+
};
|
289156
289334
|
var getPlatformConfigQuery = graphql(`
|
289157
289335
|
query platformConfig {
|
289158
289336
|
config {
|
@@ -289285,6 +289463,20 @@ var restartPrivateKey = graphql(`
|
|
289285
289463
|
}
|
289286
289464
|
}
|
289287
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]);
|
289288
289480
|
var privateKeyList = (gqlClient) => {
|
289289
289481
|
return async (applicationUniqueName) => {
|
289290
289482
|
const { privateKeysByUniqueName: { items } } = await gqlClient.request(getPrivateKeys, { applicationUniqueName });
|
@@ -289323,6 +289515,14 @@ var privateKeyRestart = (gqlClient) => async (privateKeyUniqueName) => {
|
|
289323
289515
|
const { restartPrivateKeyByUniqueName: privateKey } = await gqlClient.request(restartPrivateKey, { uniqueName: privateKeyUniqueName });
|
289324
289516
|
return privateKey;
|
289325
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
|
+
};
|
289326
289526
|
var ClientOptionsSchema = exports_external.object({
|
289327
289527
|
accessToken: AccessTokenSchema2,
|
289328
289528
|
instance: UrlSchema2
|
@@ -289402,57 +289602,75 @@ function createSettleMintClient(options) {
|
|
289402
289602
|
read: blockchainNetworkRead(gqlClient),
|
289403
289603
|
create: blockchainNetworkCreate(gqlClient),
|
289404
289604
|
delete: blockchainNetworkDelete(gqlClient),
|
289405
|
-
restart: blockchainNetworkRestart(gqlClient)
|
289605
|
+
restart: blockchainNetworkRestart(gqlClient),
|
289606
|
+
pause: blockchainNetworkPause(gqlClient),
|
289607
|
+
resume: blockchainNetworkResume(gqlClient)
|
289406
289608
|
},
|
289407
289609
|
blockchainNode: {
|
289408
289610
|
list: blockchainNodeList(gqlClient),
|
289409
289611
|
read: blockchainNodeRead(gqlClient),
|
289410
289612
|
create: blockchainNodeCreate(gqlClient),
|
289411
|
-
restart: blockchainNodeRestart(gqlClient)
|
289613
|
+
restart: blockchainNodeRestart(gqlClient),
|
289614
|
+
pause: blockchainNodePause(gqlClient),
|
289615
|
+
resume: blockchainNodeResume(gqlClient)
|
289412
289616
|
},
|
289413
289617
|
loadBalancer: {
|
289414
289618
|
list: loadBalancerList(gqlClient),
|
289415
289619
|
read: loadBalancerRead(gqlClient),
|
289416
289620
|
create: loadBalancerCreate(gqlClient),
|
289417
|
-
restart: loadBalancerRestart(gqlClient)
|
289621
|
+
restart: loadBalancerRestart(gqlClient),
|
289622
|
+
pause: loadBalancerPause(gqlClient),
|
289623
|
+
resume: loadBalancerResume(gqlClient)
|
289418
289624
|
},
|
289419
289625
|
middleware: {
|
289420
289626
|
list: middlewareList(gqlClient),
|
289421
289627
|
read: middlewareRead(gqlClient),
|
289422
289628
|
graphSubgraphs: graphMiddlewareSubgraphs(gqlClient),
|
289423
289629
|
create: middlewareCreate(gqlClient),
|
289424
|
-
restart: middlewareRestart(gqlClient)
|
289630
|
+
restart: middlewareRestart(gqlClient),
|
289631
|
+
pause: middlewarePause(gqlClient),
|
289632
|
+
resume: middlewareResume(gqlClient)
|
289425
289633
|
},
|
289426
289634
|
integrationTool: {
|
289427
289635
|
list: integrationToolList(gqlClient),
|
289428
289636
|
read: integrationToolRead(gqlClient),
|
289429
289637
|
create: integrationToolCreate(gqlClient),
|
289430
|
-
restart: integrationToolRestart(gqlClient)
|
289638
|
+
restart: integrationToolRestart(gqlClient),
|
289639
|
+
pause: integrationToolPause(gqlClient),
|
289640
|
+
resume: integrationToolResume(gqlClient)
|
289431
289641
|
},
|
289432
289642
|
storage: {
|
289433
289643
|
list: storageList(gqlClient),
|
289434
289644
|
read: storageRead(gqlClient),
|
289435
289645
|
create: storageCreate(gqlClient),
|
289436
|
-
restart: storageRestart(gqlClient)
|
289646
|
+
restart: storageRestart(gqlClient),
|
289647
|
+
pause: storagePause(gqlClient),
|
289648
|
+
resume: storageResume(gqlClient)
|
289437
289649
|
},
|
289438
289650
|
privateKey: {
|
289439
289651
|
list: privateKeyList(gqlClient),
|
289440
289652
|
read: privatekeyRead(gqlClient),
|
289441
289653
|
create: privateKeyCreate(gqlClient),
|
289442
|
-
restart: privateKeyRestart(gqlClient)
|
289654
|
+
restart: privateKeyRestart(gqlClient),
|
289655
|
+
pause: privateKeyPause(gqlClient),
|
289656
|
+
resume: privateKeyResume(gqlClient)
|
289443
289657
|
},
|
289444
289658
|
insights: {
|
289445
289659
|
list: insightsList(gqlClient),
|
289446
289660
|
read: insightsRead(gqlClient),
|
289447
289661
|
create: insightsCreate(gqlClient),
|
289448
|
-
restart: insightsRestart(gqlClient)
|
289662
|
+
restart: insightsRestart(gqlClient),
|
289663
|
+
pause: insightsPause(gqlClient),
|
289664
|
+
resume: insightsResume(gqlClient)
|
289449
289665
|
},
|
289450
289666
|
customDeployment: {
|
289451
289667
|
list: customdeploymentList(gqlClient),
|
289452
289668
|
read: customdeploymentRead(gqlClient),
|
289453
289669
|
create: customdeploymentCreate(gqlClient),
|
289454
289670
|
update: customdeploymentUpdate(gqlClient),
|
289455
|
-
restart: customDeploymentRestart(gqlClient)
|
289671
|
+
restart: customDeploymentRestart(gqlClient),
|
289672
|
+
pause: customDeploymentPause(gqlClient),
|
289673
|
+
resume: customDeploymentResume(gqlClient)
|
289456
289674
|
},
|
289457
289675
|
foundry: { env: getEnv(gqlClient) },
|
289458
289676
|
applicationAccessToken: { create: applicationAccessTokenCreate(gqlClient) },
|
@@ -295869,17 +296087,6 @@ async function exists3(path$1) {
|
|
295869
296087
|
return false;
|
295870
296088
|
}
|
295871
296089
|
}
|
295872
|
-
function tryParseJson3(value2, defaultValue = null) {
|
295873
|
-
try {
|
295874
|
-
const parsed = JSON.parse(value2);
|
295875
|
-
if (parsed === undefined || parsed === null) {
|
295876
|
-
return defaultValue;
|
295877
|
-
}
|
295878
|
-
return parsed;
|
295879
|
-
} catch (err) {
|
295880
|
-
return defaultValue;
|
295881
|
-
}
|
295882
|
-
}
|
295883
296090
|
var require_balanced_match4 = __commonJS4({ "../../node_modules/balanced-match/index.js"(exports, module) {
|
295884
296091
|
module.exports = balanced$1;
|
295885
296092
|
function balanced$1(a3, b, str) {
|
@@ -301358,6 +301565,17 @@ var glob3 = Object.assign(glob_3, {
|
|
301358
301565
|
unescape: unescape4
|
301359
301566
|
});
|
301360
301567
|
glob3.glob = glob3;
|
301568
|
+
function tryParseJson3(value2, defaultValue = null) {
|
301569
|
+
try {
|
301570
|
+
const parsed = JSON.parse(value2);
|
301571
|
+
if (parsed === undefined || parsed === null) {
|
301572
|
+
return defaultValue;
|
301573
|
+
}
|
301574
|
+
return parsed;
|
301575
|
+
} catch (_err) {
|
301576
|
+
return defaultValue;
|
301577
|
+
}
|
301578
|
+
}
|
301361
301579
|
async function findMonoRepoRoot2(startDir) {
|
301362
301580
|
const lockFilePath = await findUp([
|
301363
301581
|
"package-lock.json",
|
@@ -301403,7 +301621,7 @@ function tryParseJson4(value2, defaultValue = null) {
|
|
301403
301621
|
return defaultValue;
|
301404
301622
|
}
|
301405
301623
|
return parsed;
|
301406
|
-
} catch (
|
301624
|
+
} catch (_err) {
|
301407
301625
|
return defaultValue;
|
301408
301626
|
}
|
301409
301627
|
}
|
@@ -301431,7 +301649,7 @@ async function readConfig() {
|
|
301431
301649
|
try {
|
301432
301650
|
const content = await readFile4(CONFIG_FILE, "utf-8");
|
301433
301651
|
return tryParseJson4(content, { instances: {} });
|
301434
|
-
} catch (
|
301652
|
+
} catch (_error) {
|
301435
301653
|
return { instances: {} };
|
301436
301654
|
}
|
301437
301655
|
}
|
@@ -305154,9 +305372,9 @@ function watchContractEvent(client, parameters) {
|
|
305154
305372
|
return poll_;
|
305155
305373
|
if (typeof fromBlock === "bigint")
|
305156
305374
|
return true;
|
305157
|
-
if (client.transport.type === "webSocket")
|
305375
|
+
if (client.transport.type === "webSocket" || client.transport.type === "ipc")
|
305158
305376
|
return false;
|
305159
|
-
if (client.transport.type === "fallback" && client.transport.transports[0].config.type === "webSocket")
|
305377
|
+
if (client.transport.type === "fallback" && (client.transport.transports[0].config.type === "webSocket" || client.transport.transports[0].config.type === "ipc"))
|
305160
305378
|
return false;
|
305161
305379
|
return true;
|
305162
305380
|
})();
|
@@ -305257,7 +305475,7 @@ function watchContractEvent(client, parameters) {
|
|
305257
305475
|
try {
|
305258
305476
|
const transport = (() => {
|
305259
305477
|
if (client.transport.type === "fallback") {
|
305260
|
-
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket");
|
305478
|
+
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket" || transport3.config.type === "ipc");
|
305261
305479
|
if (!transport2)
|
305262
305480
|
return client.transport;
|
305263
305481
|
return transport2.value;
|
@@ -307145,9 +307363,10 @@ async function simulateBlocks(client, parameters) {
|
|
307145
307363
|
const calls = block2.calls.map((call_) => {
|
307146
307364
|
const call2 = call_;
|
307147
307365
|
const account = call2.account ? parseAccount(call2.account) : undefined;
|
307366
|
+
const data = call2.abi ? encodeFunctionData(call2) : call2.data;
|
307148
307367
|
const request2 = {
|
307149
307368
|
...call2,
|
307150
|
-
data: call2.
|
307369
|
+
data: call2.dataSuffix ? concat2([data || "0x", call2.dataSuffix]) : data,
|
307151
307370
|
from: call2.from ?? account?.address
|
307152
307371
|
};
|
307153
307372
|
assertRequest(request2);
|
@@ -308417,9 +308636,9 @@ function watchBlockNumber(client, { emitOnBegin = false, emitMissed = false, onB
|
|
308417
308636
|
const enablePolling = (() => {
|
308418
308637
|
if (typeof poll_ !== "undefined")
|
308419
308638
|
return poll_;
|
308420
|
-
if (client.transport.type === "webSocket")
|
308639
|
+
if (client.transport.type === "webSocket" || client.transport.type === "ipc")
|
308421
308640
|
return false;
|
308422
|
-
if (client.transport.type === "fallback" && client.transport.transports[0].config.type === "webSocket")
|
308641
|
+
if (client.transport.type === "fallback" && (client.transport.transports[0].config.type === "webSocket" || client.transport.transports[0].config.type === "ipc"))
|
308423
308642
|
return false;
|
308424
308643
|
return true;
|
308425
308644
|
})();
|
@@ -308471,7 +308690,7 @@ function watchBlockNumber(client, { emitOnBegin = false, emitMissed = false, onB
|
|
308471
308690
|
try {
|
308472
308691
|
const transport = (() => {
|
308473
308692
|
if (client.transport.type === "fallback") {
|
308474
|
-
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket");
|
308693
|
+
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket" || transport3.config.type === "ipc");
|
308475
308694
|
if (!transport2)
|
308476
308695
|
return client.transport;
|
308477
308696
|
return transport2.value;
|
@@ -308624,9 +308843,9 @@ function watchBlocks(client, { blockTag = "latest", emitMissed = false, emitOnBe
|
|
308624
308843
|
const enablePolling = (() => {
|
308625
308844
|
if (typeof poll_ !== "undefined")
|
308626
308845
|
return poll_;
|
308627
|
-
if (client.transport.type === "webSocket")
|
308846
|
+
if (client.transport.type === "webSocket" || client.transport.type === "ipc")
|
308628
308847
|
return false;
|
308629
|
-
if (client.transport.type === "fallback" && client.transport.transports[0].config.type === "webSocket")
|
308848
|
+
if (client.transport.type === "fallback" && (client.transport.transports[0].config.type === "webSocket" || client.transport.transports[0].config.type === "ipc"))
|
308630
308849
|
return false;
|
308631
308850
|
return true;
|
308632
308851
|
})();
|
@@ -308695,7 +308914,7 @@ function watchBlocks(client, { blockTag = "latest", emitMissed = false, emitOnBe
|
|
308695
308914
|
}
|
308696
308915
|
const transport = (() => {
|
308697
308916
|
if (client.transport.type === "fallback") {
|
308698
|
-
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket");
|
308917
|
+
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket" || transport3.config.type === "ipc");
|
308699
308918
|
if (!transport2)
|
308700
308919
|
return client.transport;
|
308701
308920
|
return transport2.value;
|
@@ -308742,9 +308961,9 @@ function watchEvent(client, { address, args, batch = true, event, events, fromBl
|
|
308742
308961
|
return poll_;
|
308743
308962
|
if (typeof fromBlock === "bigint")
|
308744
308963
|
return true;
|
308745
|
-
if (client.transport.type === "webSocket")
|
308964
|
+
if (client.transport.type === "webSocket" || client.transport.type === "ipc")
|
308746
308965
|
return false;
|
308747
|
-
if (client.transport.type === "fallback" && client.transport.transports[0].config.type === "webSocket")
|
308966
|
+
if (client.transport.type === "fallback" && (client.transport.transports[0].config.type === "webSocket" || client.transport.transports[0].config.type === "ipc"))
|
308748
308967
|
return false;
|
308749
308968
|
return true;
|
308750
308969
|
})();
|
@@ -308831,7 +309050,7 @@ function watchEvent(client, { address, args, batch = true, event, events, fromBl
|
|
308831
309050
|
try {
|
308832
309051
|
const transport = (() => {
|
308833
309052
|
if (client.transport.type === "fallback") {
|
308834
|
-
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket");
|
309053
|
+
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket" || transport3.config.type === "ipc");
|
308835
309054
|
if (!transport2)
|
308836
309055
|
return client.transport;
|
308837
309056
|
return transport2.value;
|
@@ -308898,7 +309117,7 @@ function watchEvent(client, { address, args, batch = true, event, events, fromBl
|
|
308898
309117
|
}
|
308899
309118
|
// ../../node_modules/viem/_esm/actions/public/watchPendingTransactions.js
|
308900
309119
|
function watchPendingTransactions(client, { batch = true, onError, onTransactions, poll: poll_, pollingInterval = client.pollingInterval }) {
|
308901
|
-
const enablePolling = typeof poll_ !== "undefined" ? poll_ : client.transport.type !== "webSocket";
|
309120
|
+
const enablePolling = typeof poll_ !== "undefined" ? poll_ : client.transport.type !== "webSocket" && client.transport.type !== "ipc";
|
308902
309121
|
const pollPendingTransactions = () => {
|
308903
309122
|
const observerId = stringify3([
|
308904
309123
|
"watchPendingTransactions",
|
@@ -320556,7 +320775,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
320556
320775
|
try {
|
320557
320776
|
validate2(exports_external.string(), value4);
|
320558
320777
|
return true;
|
320559
|
-
} catch (
|
320778
|
+
} catch (_error) {
|
320560
320779
|
return "Invalid token name";
|
320561
320780
|
}
|
320562
320781
|
}
|
@@ -320609,7 +320828,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
320609
320828
|
try {
|
320610
320829
|
validate2(ApplicationAccessTokenSchema2, aat);
|
320611
320830
|
return aat;
|
320612
|
-
} catch (
|
320831
|
+
} catch (_error) {}
|
320613
320832
|
}
|
320614
320833
|
return esm_default5({
|
320615
320834
|
message: "What is the application access token for your application in SettleMint? (format: sm_aat_...)",
|
@@ -320617,7 +320836,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
320617
320836
|
try {
|
320618
320837
|
validate2(ApplicationAccessTokenSchema2, value4);
|
320619
320838
|
return true;
|
320620
|
-
} catch (
|
320839
|
+
} catch (_error) {
|
320621
320840
|
return "Invalid application access token, it should start with sm_aat_...";
|
320622
320841
|
}
|
320623
320842
|
}
|
@@ -321022,7 +321241,7 @@ async function instancePrompt({
|
|
321022
321241
|
try {
|
321023
321242
|
validate2(UrlSchema2, value4);
|
321024
321243
|
return true;
|
321025
|
-
} catch (
|
321244
|
+
} catch (_error) {
|
321026
321245
|
return "Invalid URL";
|
321027
321246
|
}
|
321028
321247
|
},
|
@@ -321106,7 +321325,7 @@ async function serviceUrlPrompt({
|
|
321106
321325
|
try {
|
321107
321326
|
validate2(UrlSchema2, value4);
|
321108
321327
|
return true;
|
321109
|
-
} catch (
|
321328
|
+
} catch (_error) {
|
321110
321329
|
return "Invalid URL";
|
321111
321330
|
}
|
321112
321331
|
},
|
@@ -322050,7 +322269,7 @@ async function projectNamePrompt(env2, argument) {
|
|
322050
322269
|
try {
|
322051
322270
|
validate2(exports_external.string(), value4);
|
322052
322271
|
return true;
|
322053
|
-
} catch (
|
322272
|
+
} catch (_error) {
|
322054
322273
|
return "Invalid projectname";
|
322055
322274
|
}
|
322056
322275
|
}
|
@@ -326038,7 +326257,7 @@ async function personalAccessTokenPrompt(env2, instance, accept) {
|
|
326038
326257
|
try {
|
326039
326258
|
validate2(PersonalAccessTokenSchema2, value4);
|
326040
326259
|
return true;
|
326041
|
-
} catch (
|
326260
|
+
} catch (_error) {
|
326042
326261
|
return "Invalid personal access token, it should start with sm_pat_...";
|
326043
326262
|
}
|
326044
326263
|
}
|
@@ -326119,7 +326338,7 @@ function loginCommand() {
|
|
326119
326338
|
});
|
326120
326339
|
try {
|
326121
326340
|
await loginSpinner(client);
|
326122
|
-
} catch (
|
326341
|
+
} catch (_error) {
|
326123
326342
|
cancel2(`Invalid personal access token for instance ${selectedInstance}`);
|
326124
326343
|
}
|
326125
326344
|
await storeCredentials(personalAccessToken, selectedInstance);
|
@@ -326269,13 +326488,17 @@ function addClusterServiceArgs(cmd2) {
|
|
326269
326488
|
// src/commands/platform/utils/wait-for-completion.ts
|
326270
326489
|
class TimeoutError2 extends Error {
|
326271
326490
|
}
|
326491
|
+
|
326492
|
+
class DeploymentFailedError extends Error {
|
326493
|
+
}
|
326272
326494
|
async function waitForCompletion({
|
326273
326495
|
settlemint,
|
326274
326496
|
type: type4,
|
326275
326497
|
uniqueName,
|
326276
326498
|
action,
|
326277
326499
|
maxTimeout = 10 * 60 * 1000,
|
326278
|
-
restartIfTimeout = false
|
326500
|
+
restartIfTimeout = false,
|
326501
|
+
restartOnError = false
|
326279
326502
|
}) {
|
326280
326503
|
const serviceType = SETTLEMINT_CLIENT_MAP[type4];
|
326281
326504
|
if (serviceType === "workspace" || serviceType === "application" || serviceType === "foundry" || serviceType === "applicationAccessToken" || serviceType === "platform" || serviceType === "wallet") {
|
@@ -326285,6 +326508,7 @@ async function waitForCompletion({
|
|
326285
326508
|
if (!service || !("read" in service)) {
|
326286
326509
|
throw new Error(`Service ${serviceType} does not support status checking`);
|
326287
326510
|
}
|
326511
|
+
let hasRestarted = false;
|
326288
326512
|
function showSpinner() {
|
326289
326513
|
return spinner({
|
326290
326514
|
startMessage: `Waiting for ${type4} to be ${getActionLabel(action)}`,
|
@@ -326294,33 +326518,20 @@ async function waitForCompletion({
|
|
326294
326518
|
while (true) {
|
326295
326519
|
try {
|
326296
326520
|
const resource = await service.read(uniqueName);
|
326297
|
-
if (resource.status === "COMPLETED") {
|
326298
|
-
if (spinner2) {
|
326299
|
-
spinner2.text = `${capitalizeFirstLetter2(type4)} is ${getActionLabel(action)}`;
|
326300
|
-
} else {
|
326301
|
-
note(`${capitalizeFirstLetter2(type4)} is ${getActionLabel(action)}`);
|
326302
|
-
}
|
326303
|
-
return true;
|
326304
|
-
}
|
326305
326521
|
if (resource.status === "FAILED") {
|
326306
|
-
|
326307
|
-
|
326308
|
-
|
326309
|
-
note(`${capitalizeFirstLetter2(type4)} failed to ${getActionLabel(action)}`);
|
326522
|
+
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} failed to ${getActionLabel(action)}`);
|
326523
|
+
if (restartOnError) {
|
326524
|
+
throw new DeploymentFailedError;
|
326310
326525
|
}
|
326311
326526
|
return false;
|
326312
326527
|
}
|
326313
|
-
if (
|
326314
|
-
spinner2
|
326315
|
-
|
326316
|
-
note(`${capitalizeFirstLetter2(type4)} is not ready yet (status: ${resource.status})`);
|
326317
|
-
}
|
326318
|
-
} catch (error45) {
|
326319
|
-
if (spinner2) {
|
326320
|
-
spinner2.text = `${capitalizeFirstLetter2(type4)} is not ready yet (status: UNKNOWN)`;
|
326321
|
-
} else {
|
326322
|
-
note(`${capitalizeFirstLetter2(type4)} is not ready yet (status: UNKNOWN)`);
|
326528
|
+
if (isActionComplete(action, resource.status)) {
|
326529
|
+
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} is ${getActionLabel(action)}`);
|
326530
|
+
return true;
|
326323
326531
|
}
|
326532
|
+
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} is not ready yet (status: ${resource.status})`);
|
326533
|
+
} catch (_error) {
|
326534
|
+
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} is not ready yet (status: UNKNOWN)`);
|
326324
326535
|
}
|
326325
326536
|
if (Date.now() - startTime > maxTimeout) {
|
326326
326537
|
throw new TimeoutError2(`Operation timed out after ${maxTimeout / 60000} minutes for ${type4} with unique name ${uniqueName}`);
|
@@ -326333,23 +326544,59 @@ async function waitForCompletion({
|
|
326333
326544
|
try {
|
326334
326545
|
return await showSpinner();
|
326335
326546
|
} catch (error45) {
|
326336
|
-
|
326337
|
-
if (restartIfTimeout && isTimeoutError) {
|
326547
|
+
if (!hasRestarted && shouldRestart(error45, restartIfTimeout)) {
|
326338
326548
|
note(`Restarting ${capitalizeFirstLetter2(type4)}`);
|
326549
|
+
hasRestarted = true;
|
326339
326550
|
await service.restart(uniqueName);
|
326340
326551
|
return showSpinner();
|
326341
326552
|
}
|
326342
326553
|
throw error45;
|
326343
326554
|
}
|
326344
326555
|
}
|
326345
|
-
function
|
326346
|
-
|
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;
|
326348
326561
|
}
|
326349
|
-
|
326350
|
-
|
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
|
+
function getActionLabel(action) {
|
326586
|
+
switch (action) {
|
326587
|
+
case "restart":
|
326588
|
+
return "restarted";
|
326589
|
+
case "destroy":
|
326590
|
+
return "destroyed";
|
326591
|
+
case "pause":
|
326592
|
+
return "paused";
|
326593
|
+
case "resume":
|
326594
|
+
return "resumed";
|
326595
|
+
case "deploy":
|
326596
|
+
return "deployed";
|
326597
|
+
default:
|
326598
|
+
return "deployed";
|
326351
326599
|
}
|
326352
|
-
return "deployed";
|
326353
326600
|
}
|
326354
326601
|
|
326355
326602
|
// src/prompts/provider.prompt.ts
|
@@ -326430,9 +326677,9 @@ function getCreateCommand({
|
|
326430
326677
|
cmd2.alias(alias);
|
326431
326678
|
}
|
326432
326679
|
if (requiresDeployment) {
|
326433
|
-
cmd2.option("-w, --wait", "Wait until deployed").option("
|
326680
|
+
cmd2.option("-w, --wait", "Wait until deployed").option("--restart-if-timeout", "Restart if wait time is exceeded").option("--restart-on-error", "Restart if deployment fails");
|
326434
326681
|
}
|
326435
|
-
execute2(cmd2, async ({ acceptDefaults, prod, default: isDefault, wait: wait2, restartIfTimeout, provider, region }, createFunction) => {
|
326682
|
+
execute2(cmd2, async ({ acceptDefaults, prod, default: isDefault, wait: wait2, restartIfTimeout, restartOnError, provider, region }, createFunction) => {
|
326436
326683
|
intro(`Creating ${type4} in the SettleMint platform`);
|
326437
326684
|
const env2 = await loadEnv(false, !!prod);
|
326438
326685
|
const instance = await instancePrompt({ env: env2, accept: acceptDefaults });
|
@@ -326446,8 +326693,8 @@ function getCreateCommand({
|
|
326446
326693
|
instance
|
326447
326694
|
});
|
326448
326695
|
const platformConfig = await settlemint.platform.config();
|
326449
|
-
let selectedProvider
|
326450
|
-
let selectedRegion
|
326696
|
+
let selectedProvider;
|
326697
|
+
let selectedRegion;
|
326451
326698
|
if (cmd2.options.some((option) => option.long === "--provider")) {
|
326452
326699
|
selectedProvider = await providerPrompt(platformConfig, provider);
|
326453
326700
|
if (!selectedProvider) {
|
@@ -326476,7 +326723,8 @@ function getCreateCommand({
|
|
326476
326723
|
type: waitFor?.resourceType ?? type4,
|
326477
326724
|
uniqueName: waitFor?.uniqueName ?? result.uniqueName,
|
326478
326725
|
action: "deploy",
|
326479
|
-
restartIfTimeout
|
326726
|
+
restartIfTimeout,
|
326727
|
+
restartOnError
|
326480
326728
|
});
|
326481
326729
|
if (!isDeployed) {
|
326482
326730
|
throw new Error(`Failed to deploy ${waitFor?.resourceType ?? type4} ${waitFor?.uniqueName ?? result.uniqueName}`);
|
@@ -327658,7 +327906,7 @@ function privateKeyHsmCreateCommand() {
|
|
327658
327906
|
return baseAction({
|
327659
327907
|
...defaultArgs,
|
327660
327908
|
acceptDefaults
|
327661
|
-
}, async ({ settlemint, env: env2, showSpinner, provider, region }) => {
|
327909
|
+
}, async ({ settlemint, env: env2, showSpinner, provider: _provider, region: _region }) => {
|
327662
327910
|
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
327663
327911
|
if (!applicationUniqueName) {
|
327664
327912
|
return missingApplication();
|
@@ -327947,25 +328195,249 @@ function deleteCommand() {
|
|
327947
328195
|
return new Command("delete").alias("d").description("Delete a resource in the SettleMint platform").addCommand(applicationDeleteCommand()).addCommand(workspaceDeleteCommand());
|
327948
328196
|
}
|
327949
328197
|
|
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/integration-tools/hasura/pause.ts
|
328312
|
+
function hasuraPauseCommand() {
|
328313
|
+
return getPauseCommand({
|
328314
|
+
name: "hasura",
|
328315
|
+
type: "integration tool",
|
328316
|
+
alias: "ha",
|
328317
|
+
envKey: "SETTLEMINT_HASURA",
|
328318
|
+
pauseFunction: async (settlemint, id) => {
|
328319
|
+
return settlemint.integrationTool.pause(id);
|
328320
|
+
}
|
328321
|
+
});
|
328322
|
+
}
|
328323
|
+
|
328324
|
+
// src/commands/platform/load-balancer/evm/pause.ts
|
328325
|
+
function evmLoadBalancerPauseCommand() {
|
328326
|
+
return getPauseCommand({
|
328327
|
+
name: "evm",
|
328328
|
+
type: "load balancer",
|
328329
|
+
alias: "lb",
|
328330
|
+
envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
|
328331
|
+
pauseFunction: async (settlemint, id) => {
|
328332
|
+
return settlemint.loadBalancer.pause(id);
|
328333
|
+
}
|
328334
|
+
});
|
328335
|
+
}
|
328336
|
+
|
328337
|
+
// src/commands/platform/middleware/graph/pause.ts
|
328338
|
+
function graphMiddlewarePauseCommand() {
|
328339
|
+
return getPauseCommand({
|
328340
|
+
name: "graph",
|
328341
|
+
type: "middleware",
|
328342
|
+
alias: "gr",
|
328343
|
+
envKey: "SETTLEMINT_THEGRAPH",
|
328344
|
+
pauseFunction: async (settlemint, id) => {
|
328345
|
+
return settlemint.middleware.pause(id);
|
328346
|
+
}
|
328347
|
+
});
|
328348
|
+
}
|
328349
|
+
|
328350
|
+
// src/commands/platform/middleware/smart-contract-portal/pause.ts
|
328351
|
+
function smartContractPortalMiddlewarePauseCommand() {
|
328352
|
+
return getPauseCommand({
|
328353
|
+
name: "smart-contract-portal",
|
328354
|
+
type: "middleware",
|
328355
|
+
alias: "scp",
|
328356
|
+
envKey: "SETTLEMINT_PORTAL",
|
328357
|
+
pauseFunction: async (settlemint, id) => {
|
328358
|
+
return settlemint.middleware.pause(id);
|
328359
|
+
}
|
328360
|
+
});
|
328361
|
+
}
|
328362
|
+
|
328363
|
+
// src/commands/platform/private-key/accessible-ecdsa-p256/pause.ts
|
328364
|
+
function accessibleEcdsaP256PrivateKeyPauseCommand() {
|
328365
|
+
return getPauseCommand({
|
328366
|
+
name: "accessible-ecdsa-p256",
|
328367
|
+
type: "private key",
|
328368
|
+
alias: "acc",
|
328369
|
+
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
328370
|
+
pauseFunction: async (settlemint, id) => {
|
328371
|
+
return settlemint.privateKey.pause(id);
|
328372
|
+
}
|
328373
|
+
});
|
328374
|
+
}
|
328375
|
+
|
328376
|
+
// src/commands/platform/private-key/hd-ecdsa-p256/pause.ts
|
328377
|
+
function hdEcdsaP256PrivateKeyPauseCommand() {
|
328378
|
+
return getPauseCommand({
|
328379
|
+
name: "hd-ecdsa-p256",
|
328380
|
+
type: "private key",
|
328381
|
+
alias: "hd",
|
328382
|
+
envKey: "SETTLEMINT_HD_PRIVATE_KEY",
|
328383
|
+
pauseFunction: async (settlemint, id) => {
|
328384
|
+
return settlemint.privateKey.pause(id);
|
328385
|
+
}
|
328386
|
+
});
|
328387
|
+
}
|
328388
|
+
|
328389
|
+
// src/commands/platform/storage/ipfs/pause.ts
|
328390
|
+
function ipfsStoragePauseCommand() {
|
328391
|
+
return getPauseCommand({
|
328392
|
+
name: "ipfs",
|
328393
|
+
type: "storage",
|
328394
|
+
alias: "ip",
|
328395
|
+
envKey: "SETTLEMINT_IPFS",
|
328396
|
+
pauseFunction: async (settlemint, id) => {
|
328397
|
+
return settlemint.storage.pause(id);
|
328398
|
+
}
|
328399
|
+
});
|
328400
|
+
}
|
328401
|
+
|
328402
|
+
// src/commands/platform/storage/minio/pause.ts
|
328403
|
+
function minioStoragePauseCommand() {
|
328404
|
+
return getPauseCommand({
|
328405
|
+
name: "minio",
|
328406
|
+
type: "storage",
|
328407
|
+
alias: "m",
|
328408
|
+
envKey: "SETTLEMINT_MINIO",
|
328409
|
+
pauseFunction: async (settlemint, id) => {
|
328410
|
+
return settlemint.storage.pause(id);
|
328411
|
+
}
|
328412
|
+
});
|
328413
|
+
}
|
328414
|
+
|
328415
|
+
// src/commands/platform/pause.ts
|
328416
|
+
function pauseCommand() {
|
328417
|
+
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());
|
328418
|
+
return cmd2;
|
328419
|
+
}
|
328420
|
+
|
327950
328421
|
// src/commands/platform/common/restart-command.ts
|
327951
328422
|
function getRestartCommand({
|
327952
328423
|
name: name3,
|
327953
328424
|
type: type4,
|
327954
|
-
subType,
|
327955
328425
|
alias,
|
327956
328426
|
envKey,
|
327957
328427
|
restartFunction,
|
327958
328428
|
usePersonalAccessToken = true
|
327959
328429
|
}) {
|
327960
328430
|
const commandName = sanitizeCommandName(name3);
|
328431
|
+
const typeCommandName = sanitizeCommandName(type4);
|
328432
|
+
const exampleCommandPrefix = `platform restart ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
327961
328433
|
return new Command(commandName).alias(alias).description(`Restart a ${type4} in the SettleMint platform. Provide the ${type4} unique name or use 'default' to restart the default ${type4} from your .env file.`).usage(createExamples([
|
327962
328434
|
{
|
327963
|
-
description: `Restarts the specified ${type4} by
|
327964
|
-
command:
|
328435
|
+
description: `Restarts the specified ${type4} by unique name`,
|
328436
|
+
command: `${exampleCommandPrefix} <unique-name>`
|
327965
328437
|
},
|
327966
328438
|
{
|
327967
328439
|
description: `Restarts the default ${type4} in the production environment`,
|
327968
|
-
command:
|
328440
|
+
command: `${exampleCommandPrefix} default --prod`
|
327969
328441
|
}
|
327970
328442
|
])).argument("<unique-name>", `The unique name of the ${type4}, use 'default' to restart the default one from your .env file`).option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").option("-w, --wait", "Wait until restarted").action(async (uniqueName, { acceptDefaults, prod, wait: wait2 }) => {
|
327971
328443
|
intro(`Restarting ${type4} in the SettleMint platform`);
|
@@ -328052,7 +328524,6 @@ function blockscoutRestartCommand() {
|
|
328052
328524
|
return getRestartCommand({
|
328053
328525
|
name: "blockscout",
|
328054
328526
|
type: "insights",
|
328055
|
-
subType: "blockscout",
|
328056
328527
|
alias: "bs",
|
328057
328528
|
envKey: "SETTLEMINT_BLOCKSCOUT",
|
328058
328529
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -328071,7 +328542,6 @@ function hasuraRestartCommand() {
|
|
328071
328542
|
return getRestartCommand({
|
328072
328543
|
name: "hasura",
|
328073
328544
|
type: "integration tool",
|
328074
|
-
subType: "hasura",
|
328075
328545
|
alias: "ha",
|
328076
328546
|
envKey: "SETTLEMINT_HASURA",
|
328077
328547
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -328103,7 +328573,6 @@ function graphRestartCommand() {
|
|
328103
328573
|
return getRestartCommand({
|
328104
328574
|
name: "graph",
|
328105
328575
|
type: "middleware",
|
328106
|
-
subType: "graph",
|
328107
328576
|
alias: "gr",
|
328108
328577
|
envKey: "SETTLEMINT_THEGRAPH",
|
328109
328578
|
restartFunction: async (settlemint, id) => {
|
@@ -328117,7 +328586,6 @@ function smartContractPortalRestartCommand() {
|
|
328117
328586
|
return getRestartCommand({
|
328118
328587
|
name: "smart-contract-portal",
|
328119
328588
|
type: "middleware",
|
328120
|
-
subType: "smart-contract-portal",
|
328121
328589
|
alias: "scp",
|
328122
328590
|
envKey: "SETTLEMINT_PORTAL",
|
328123
328591
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -328168,6 +328636,229 @@ function restartCommand() {
|
|
328168
328636
|
return cmd2;
|
328169
328637
|
}
|
328170
328638
|
|
328639
|
+
// src/commands/platform/common/resume-command.ts
|
328640
|
+
function getResumeCommand({
|
328641
|
+
name: name3,
|
328642
|
+
type: type4,
|
328643
|
+
alias,
|
328644
|
+
envKey,
|
328645
|
+
resumeFunction,
|
328646
|
+
usePersonalAccessToken = true
|
328647
|
+
}) {
|
328648
|
+
const commandName = sanitizeCommandName(name3);
|
328649
|
+
const typeCommandName = sanitizeCommandName(type4);
|
328650
|
+
const exampleCommandPrefix = `platform resume ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
328651
|
+
return new Command(commandName).alias(alias).description(`Resume a ${type4} in the SettleMint platform. Provide the ${type4} unique name or use 'default' to resume the default ${type4} from your .env file.`).usage(createExamples([
|
328652
|
+
{
|
328653
|
+
description: `Resumes the specified ${type4} by unique name`,
|
328654
|
+
command: `${exampleCommandPrefix} <unique-name>`
|
328655
|
+
},
|
328656
|
+
{
|
328657
|
+
description: `Resumes the default ${type4} in the production environment`,
|
328658
|
+
command: `${exampleCommandPrefix} default --prod`
|
328659
|
+
}
|
328660
|
+
])).argument("<unique-name>", `The unique name of the ${type4}, use 'default' to resume the default one from your .env file`).option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").option("-w, --wait", "Wait until resumed").action(async (uniqueName, { acceptDefaults, prod, wait: wait2 }) => {
|
328661
|
+
intro(`Resuming ${type4} in the SettleMint platform`);
|
328662
|
+
const env2 = await loadEnv(false, !!prod);
|
328663
|
+
const instance = await instancePrompt({ env: env2, accept: acceptDefaults });
|
328664
|
+
const accessToken = await getApplicationOrPersonalAccessToken({
|
328665
|
+
env: env2,
|
328666
|
+
instance,
|
328667
|
+
prefer: usePersonalAccessToken ? "personal" : "application"
|
328668
|
+
});
|
328669
|
+
const settlemint = createSettleMintClient({
|
328670
|
+
accessToken,
|
328671
|
+
instance
|
328672
|
+
});
|
328673
|
+
const isDefaultUniqueName = uniqueName === "default";
|
328674
|
+
const serviceUniqueName = isDefaultUniqueName ? typeof env2[envKey] === "string" ? env2[envKey] : null : uniqueName;
|
328675
|
+
if (!serviceUniqueName) {
|
328676
|
+
cancel2(`No default ${type4} found in your .env file. Please provide a valid ${type4} unique name or set a default ${type4} first.`);
|
328677
|
+
}
|
328678
|
+
const result = await spinner({
|
328679
|
+
startMessage: `Resuming ${type4}`,
|
328680
|
+
task: async () => {
|
328681
|
+
return resumeFunction(settlemint, serviceUniqueName);
|
328682
|
+
},
|
328683
|
+
stopMessage: `${capitalizeFirstLetter2(type4)} resume initiated`
|
328684
|
+
});
|
328685
|
+
if (wait2) {
|
328686
|
+
const isResumed = await waitForCompletion({
|
328687
|
+
settlemint,
|
328688
|
+
type: type4,
|
328689
|
+
uniqueName: serviceUniqueName,
|
328690
|
+
action: "resume"
|
328691
|
+
});
|
328692
|
+
if (!isResumed) {
|
328693
|
+
throw new Error(`Failed to resume ${type4} ${serviceUniqueName}`);
|
328694
|
+
}
|
328695
|
+
}
|
328696
|
+
outro(`${capitalizeFirstLetter2(type4)} ${result.name} resume initiated successfully`);
|
328697
|
+
});
|
328698
|
+
}
|
328699
|
+
|
328700
|
+
// src/commands/platform/blockchain-network/resume.ts
|
328701
|
+
function blockchainNetworkResumeCommand() {
|
328702
|
+
return getResumeCommand({
|
328703
|
+
name: "blockchain-network",
|
328704
|
+
type: "blockchain network",
|
328705
|
+
alias: "bnw",
|
328706
|
+
envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
|
328707
|
+
resumeFunction: async (settlemint, id) => {
|
328708
|
+
return settlemint.blockchainNetwork.resume(id);
|
328709
|
+
}
|
328710
|
+
});
|
328711
|
+
}
|
328712
|
+
|
328713
|
+
// src/commands/platform/blockchain-node/resume.ts
|
328714
|
+
function blockchainNodeResumeCommand() {
|
328715
|
+
return getResumeCommand({
|
328716
|
+
name: "blockchain-node",
|
328717
|
+
type: "blockchain node",
|
328718
|
+
alias: "bn",
|
328719
|
+
envKey: "SETTLEMINT_BLOCKCHAIN_NODE",
|
328720
|
+
resumeFunction: async (settlemint, id) => {
|
328721
|
+
return settlemint.blockchainNode.resume(id);
|
328722
|
+
}
|
328723
|
+
});
|
328724
|
+
}
|
328725
|
+
|
328726
|
+
// src/commands/platform/custom-deployments/resume.ts
|
328727
|
+
function customDeploymentResumeCommand() {
|
328728
|
+
return getResumeCommand({
|
328729
|
+
name: "custom-deployment",
|
328730
|
+
type: "custom deployment",
|
328731
|
+
alias: "cd",
|
328732
|
+
envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
|
328733
|
+
resumeFunction: async (settlemint, id) => {
|
328734
|
+
return settlemint.customDeployment.resume(id);
|
328735
|
+
}
|
328736
|
+
});
|
328737
|
+
}
|
328738
|
+
|
328739
|
+
// src/commands/platform/insights/blockscout/resume.ts
|
328740
|
+
function blockscoutResumeCommand() {
|
328741
|
+
return getResumeCommand({
|
328742
|
+
name: "blockscout",
|
328743
|
+
type: "insights",
|
328744
|
+
alias: "bs",
|
328745
|
+
envKey: "SETTLEMINT_BLOCKSCOUT",
|
328746
|
+
resumeFunction: async (settlemint, id) => {
|
328747
|
+
return settlemint.insights.resume(id);
|
328748
|
+
}
|
328749
|
+
});
|
328750
|
+
}
|
328751
|
+
|
328752
|
+
// src/commands/platform/integration-tools/hasura/resume.ts
|
328753
|
+
function hasuraResumeCommand() {
|
328754
|
+
return getResumeCommand({
|
328755
|
+
name: "hasura",
|
328756
|
+
type: "integration tool",
|
328757
|
+
alias: "ha",
|
328758
|
+
envKey: "SETTLEMINT_HASURA",
|
328759
|
+
resumeFunction: async (settlemint, id) => {
|
328760
|
+
return settlemint.integrationTool.resume(id);
|
328761
|
+
}
|
328762
|
+
});
|
328763
|
+
}
|
328764
|
+
|
328765
|
+
// src/commands/platform/load-balancer/evm/resume.ts
|
328766
|
+
function evmLoadBalancerResumeCommand() {
|
328767
|
+
return getResumeCommand({
|
328768
|
+
name: "evm",
|
328769
|
+
type: "load balancer",
|
328770
|
+
alias: "lb",
|
328771
|
+
envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
|
328772
|
+
resumeFunction: async (settlemint, id) => {
|
328773
|
+
return settlemint.loadBalancer.resume(id);
|
328774
|
+
}
|
328775
|
+
});
|
328776
|
+
}
|
328777
|
+
|
328778
|
+
// src/commands/platform/middleware/graph/resume.ts
|
328779
|
+
function graphMiddlewareResumeCommand() {
|
328780
|
+
return getResumeCommand({
|
328781
|
+
name: "graph",
|
328782
|
+
type: "middleware",
|
328783
|
+
alias: "gr",
|
328784
|
+
envKey: "SETTLEMINT_THEGRAPH",
|
328785
|
+
resumeFunction: async (settlemint, id) => {
|
328786
|
+
return settlemint.middleware.resume(id);
|
328787
|
+
}
|
328788
|
+
});
|
328789
|
+
}
|
328790
|
+
|
328791
|
+
// src/commands/platform/middleware/smart-contract-portal/resume.ts
|
328792
|
+
function smartContractPortalMiddlewareResumeCommand() {
|
328793
|
+
return getResumeCommand({
|
328794
|
+
name: "smart-contract-portal",
|
328795
|
+
type: "middleware",
|
328796
|
+
alias: "scp",
|
328797
|
+
envKey: "SETTLEMINT_PORTAL",
|
328798
|
+
resumeFunction: async (settlemint, id) => {
|
328799
|
+
return settlemint.middleware.resume(id);
|
328800
|
+
}
|
328801
|
+
});
|
328802
|
+
}
|
328803
|
+
|
328804
|
+
// src/commands/platform/private-key/accessible-ecdsa-p256/resume.ts
|
328805
|
+
function accessibleEcdsaP256PrivateKeyResumeCommand() {
|
328806
|
+
return getResumeCommand({
|
328807
|
+
name: "accessible-ecdsa-p256",
|
328808
|
+
type: "private key",
|
328809
|
+
alias: "acc",
|
328810
|
+
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
328811
|
+
resumeFunction: async (settlemint, id) => {
|
328812
|
+
return settlemint.privateKey.resume(id);
|
328813
|
+
}
|
328814
|
+
});
|
328815
|
+
}
|
328816
|
+
|
328817
|
+
// src/commands/platform/private-key/hd-ecdsa-p256/resume.ts
|
328818
|
+
function hdEcdsaP256PrivateKeyResumeCommand() {
|
328819
|
+
return getResumeCommand({
|
328820
|
+
name: "hd-ecdsa-p256",
|
328821
|
+
type: "private key",
|
328822
|
+
alias: "hd",
|
328823
|
+
envKey: "SETTLEMINT_HD_PRIVATE_KEY",
|
328824
|
+
resumeFunction: async (settlemint, id) => {
|
328825
|
+
return settlemint.privateKey.resume(id);
|
328826
|
+
}
|
328827
|
+
});
|
328828
|
+
}
|
328829
|
+
|
328830
|
+
// src/commands/platform/storage/ipfs/resume.ts
|
328831
|
+
function ipfsStorageResumeCommand() {
|
328832
|
+
return getResumeCommand({
|
328833
|
+
name: "ipfs",
|
328834
|
+
type: "storage",
|
328835
|
+
alias: "ip",
|
328836
|
+
envKey: "SETTLEMINT_IPFS",
|
328837
|
+
resumeFunction: async (settlemint, id) => {
|
328838
|
+
return settlemint.storage.resume(id);
|
328839
|
+
}
|
328840
|
+
});
|
328841
|
+
}
|
328842
|
+
|
328843
|
+
// src/commands/platform/storage/minio/resume.ts
|
328844
|
+
function minioStorageResumeCommand() {
|
328845
|
+
return getResumeCommand({
|
328846
|
+
name: "minio",
|
328847
|
+
type: "storage",
|
328848
|
+
alias: "m",
|
328849
|
+
envKey: "SETTLEMINT_MINIO",
|
328850
|
+
resumeFunction: async (settlemint, id) => {
|
328851
|
+
return settlemint.storage.resume(id);
|
328852
|
+
}
|
328853
|
+
});
|
328854
|
+
}
|
328855
|
+
|
328856
|
+
// src/commands/platform/resume.ts
|
328857
|
+
function resumeCommand() {
|
328858
|
+
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());
|
328859
|
+
return cmd2;
|
328860
|
+
}
|
328861
|
+
|
328171
328862
|
// src/commands/platform/custom-deployments/update.ts
|
328172
328863
|
function customDeploymentsUpdateCommand() {
|
328173
328864
|
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([
|
@@ -328558,7 +329249,7 @@ function servicesCommand() {
|
|
328558
329249
|
if (!applicationUniqueName) {
|
328559
329250
|
return nothingSelectedError("application");
|
328560
329251
|
}
|
328561
|
-
let effectiveTypes
|
329252
|
+
let effectiveTypes;
|
328562
329253
|
if (options.type && options.type.length > 0) {
|
328563
329254
|
effectiveTypes = options.type;
|
328564
329255
|
} else if (typeOperands && typeOperands.length > 0) {
|
@@ -328616,7 +329307,7 @@ async function getServicesAndMapResults({
|
|
328616
329307
|
const application = await settlemint.application.read(applicationUniqueName);
|
328617
329308
|
const services = await servicesSpinner(settlemint, applicationUniqueName, types4);
|
328618
329309
|
const results = (types4 ?? SERVICE_TYPES).filter((serviceType) => !types4 || types4.includes(serviceType)).map((serviceType) => {
|
328619
|
-
const [_6, labels] = Object.entries(LABELS_MAP).find(([
|
329310
|
+
const [_6, labels] = Object.entries(LABELS_MAP).find(([_key, value4]) => value4.command === serviceType) ?? [
|
328620
329311
|
null,
|
328621
329312
|
{ plural: serviceType }
|
328622
329313
|
];
|
@@ -328743,7 +329434,7 @@ function listCommand() {
|
|
328743
329434
|
|
328744
329435
|
// src/commands/platform.ts
|
328745
329436
|
function platformCommand() {
|
328746
|
-
return new Command("platform").description("Manage SettleMint platform resources").addCommand(configCommand()).addCommand(createCommand3()).addCommand(deleteCommand()).addCommand(listCommand()).addCommand(restartCommand()).addCommand(updateCommand());
|
329437
|
+
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());
|
328747
329438
|
}
|
328748
329439
|
|
328749
329440
|
// src/commands/smart-contract-set/create.ts
|
@@ -328793,7 +329484,7 @@ var import_which = __toESM(require_lib5(), 1);
|
|
328793
329484
|
async function executeFoundryCommand(command, args) {
|
328794
329485
|
try {
|
328795
329486
|
await import_which.default(command);
|
328796
|
-
} catch (
|
329487
|
+
} catch (_error) {
|
328797
329488
|
cancel2("Foundry is not installed. Instructions to install Foundry can be found here: https://book.getfoundry.sh/getting-started/installation");
|
328798
329489
|
}
|
328799
329490
|
return executeCommand(command, args);
|
@@ -328881,7 +329572,7 @@ function foundryBuildCommand() {
|
|
328881
329572
|
description: "Build the smart contracts with additional Forge options",
|
328882
329573
|
command: "scs foundry build --optimize --force"
|
328883
329574
|
}
|
328884
|
-
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
329575
|
+
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, _cmd) => {
|
328885
329576
|
intro("Building smart contracts using Foundry");
|
328886
329577
|
const forgeOptions = mapPassthroughOptions(options, { args: operands });
|
328887
329578
|
await executeFoundryCommand("forge", ["build", ...forgeOptions]);
|
@@ -328904,7 +329595,7 @@ function foundryFormatCommand() {
|
|
328904
329595
|
description: "Format the smart contracts with additional Forge options",
|
328905
329596
|
command: "scs foundry format --check"
|
328906
329597
|
}
|
328907
|
-
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
329598
|
+
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, _cmd) => {
|
328908
329599
|
intro("Formatting smart contracts using Foundry");
|
328909
329600
|
const forgeOptions = mapPassthroughOptions(options, { args: operands });
|
328910
329601
|
await executeFoundryCommand("forge", ["fmt", ...forgeOptions]);
|
@@ -328927,7 +329618,7 @@ function foundryNetworkCommand() {
|
|
328927
329618
|
description: "Start a development network using Foundry with a specific port",
|
328928
329619
|
command: "scs foundry network --port 3000"
|
328929
329620
|
}
|
328930
|
-
])).helpOption(false).option("-h, --help", "Get list of possible anvil options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
329621
|
+
])).helpOption(false).option("-h, --help", "Get list of possible anvil options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, _cmd) => {
|
328931
329622
|
const anvilOptions = mapPassthroughOptions(options, { args: operands });
|
328932
329623
|
await executeFoundryCommand("anvil", anvilOptions);
|
328933
329624
|
});
|
@@ -328948,7 +329639,7 @@ function foundryTestCommand() {
|
|
328948
329639
|
description: "Run a specific test function",
|
328949
329640
|
command: "scs foundry test --match-test testToken"
|
328950
329641
|
}
|
328951
|
-
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
329642
|
+
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, _cmd) => {
|
328952
329643
|
intro("Running smart contract tests using Foundry");
|
328953
329644
|
const forgeOptions = mapPassthroughOptions(options, { args: operands });
|
328954
329645
|
await executeFoundryCommand("forge", ["test", ...forgeOptions]);
|
@@ -328962,7 +329653,7 @@ var validateIfRequiredPackagesAreInstalled = async (packages, cwd2) => {
|
|
328962
329653
|
try {
|
328963
329654
|
const isInstalled = await isPackageInstalled(pkg, cwd2);
|
328964
329655
|
return { packageName: pkg, isInstalled };
|
328965
|
-
} catch (
|
329656
|
+
} catch (_err) {
|
328966
329657
|
return { packageName: pkg, isInstalled: false };
|
328967
329658
|
}
|
328968
329659
|
}));
|
@@ -328987,7 +329678,7 @@ function hardhatBuildCommand() {
|
|
328987
329678
|
description: "Build the smart contracts using additional options to the Hardhat compile command",
|
328988
329679
|
command: "scs hardhat build --concurrency 2"
|
328989
329680
|
}
|
328990
|
-
])).helpOption(false).option("-h, --help", "Get list of possible hardhat compile options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
329681
|
+
])).helpOption(false).option("-h, --help", "Get list of possible hardhat compile options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, _cmd) => {
|
328991
329682
|
intro("Building smart contracts using Hardhat");
|
328992
329683
|
await validateIfRequiredPackagesAreInstalled(["hardhat"]);
|
328993
329684
|
const hardhatOptions = mapPassthroughOptions(options, { args: operands });
|
@@ -329058,7 +329749,7 @@ async function selectTargetNode({
|
|
329058
329749
|
settlemint
|
329059
329750
|
}) {
|
329060
329751
|
const nodeUniqueName = blockchainNodeUniqueName ?? (autoAccept ? env2.SETTLEMINT_BLOCKCHAIN_NODE : undefined);
|
329061
|
-
let node
|
329752
|
+
let node;
|
329062
329753
|
if (!nodeUniqueName) {
|
329063
329754
|
if (!env2.SETTLEMINT_APPLICATION) {
|
329064
329755
|
return missingApplication();
|
@@ -329282,7 +329973,7 @@ function hardhatDeployRemoteCommand() {
|
|
329282
329973
|
} else {
|
329283
329974
|
note("Smart contract deployment was cancelled");
|
329284
329975
|
}
|
329285
|
-
} catch (
|
329976
|
+
} catch (_error) {
|
329286
329977
|
cancel2("The smart contract deployment was unsuccessful. Please check the error details above and try again. You may need to review your contract code or deployment configuration.");
|
329287
329978
|
}
|
329288
329979
|
});
|
@@ -329312,7 +330003,7 @@ function hardhatNetworkCommand() {
|
|
329312
330003
|
description: "Start a development network using Hardhat with a specific port",
|
329313
330004
|
command: "scs hardhat network --port 3000"
|
329314
330005
|
}
|
329315
|
-
])).helpOption(false).option("-h, --help", "Get list of possible hardhat node options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
330006
|
+
])).helpOption(false).option("-h, --help", "Get list of possible hardhat node options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, _cmd) => {
|
329316
330007
|
intro("Starting development network using Hardhat");
|
329317
330008
|
await validateIfRequiredPackagesAreInstalled(["hardhat"]);
|
329318
330009
|
const hardhatOptions = mapPassthroughOptions(options, { args: operands });
|
@@ -329421,7 +330112,7 @@ function hardhatTestCommand() {
|
|
329421
330112
|
description: "Run a specific test file",
|
329422
330113
|
command: "scs hardhat test test/token.test.ts"
|
329423
330114
|
}
|
329424
|
-
])).helpOption(false).option("-h, --help", "Get list of possible hardhat test options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
330115
|
+
])).helpOption(false).option("-h, --help", "Get list of possible hardhat test options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, _cmd) => {
|
329425
330116
|
intro("Running smart contract tests using Hardhat");
|
329426
330117
|
await validateIfRequiredPackagesAreInstalled(["hardhat"]);
|
329427
330118
|
const hardhatOptions = mapPassthroughOptions(options, { args: operands });
|
@@ -329679,12 +330370,12 @@ async function getNodeName({
|
|
329679
330370
|
|
329680
330371
|
// src/commands/smart-contract-set/subgraph/build.ts
|
329681
330372
|
function subgraphBuildCommand() {
|
329682
|
-
return new Command("build").description("Build the subgraph").usage(createExamples([
|
330373
|
+
return new Command("build").description("Build the subgraph").option("--ipfs <ipfs-url>", "The IPFS URL to use for the subgraph deployment").usage(createExamples([
|
329683
330374
|
{
|
329684
330375
|
description: "Build the subgraph",
|
329685
330376
|
command: "scs subgraph build"
|
329686
330377
|
}
|
329687
|
-
])).action(async () => {
|
330378
|
+
])).action(async ({ ipfs }) => {
|
329688
330379
|
intro("Building subgraph");
|
329689
330380
|
await validateIfRequiredPackagesAreInstalled(["@graphprotocol/graph-cli"]);
|
329690
330381
|
await subgraphSetup({
|
@@ -329693,7 +330384,7 @@ function subgraphBuildCommand() {
|
|
329693
330384
|
const { command, args } = await getPackageManagerExecutable();
|
329694
330385
|
const subgraphYamlFile = await getSubgraphYamlFile();
|
329695
330386
|
await executeCommand(command, [...args, "graph", "codegen", subgraphYamlFile]);
|
329696
|
-
await executeCommand(command, [...args, "graph", "build", subgraphYamlFile]);
|
330387
|
+
await executeCommand(command, [...args, "graph", "build", ...ipfs ? ["--ipfs", ipfs] : [], subgraphYamlFile]);
|
329697
330388
|
outro("Subgraph built successfully");
|
329698
330389
|
});
|
329699
330390
|
}
|
@@ -330089,4 +330780,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
330089
330780
|
// src/cli.ts
|
330090
330781
|
sdkCliCommand();
|
330091
330782
|
|
330092
|
-
//# debugId=
|
330783
|
+
//# debugId=B36877A9EE01A29164756E2164756E21
|