@settlemint/sdk-cli 2.4.0-pr74203735 → 2.4.0-pr7cd97e38
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 +132 -843
- package/dist/cli.js.map +53 -87
- package/package.json +12 -14
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.2";
|
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;
|
@@ -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(/^
|
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$37) {
|
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-pr7cd97e38",
|
263844
263844
|
type: "module",
|
263845
263845
|
private: false,
|
263846
263846
|
license: "FSL-1.1-MIT",
|
@@ -263859,9 +263859,7 @@ var package_default = {
|
|
263859
263859
|
url: "https://github.com/settlemint/sdk/issues",
|
263860
263860
|
email: "support@settlemint.com"
|
263861
263861
|
},
|
263862
|
-
files: [
|
263863
|
-
"dist"
|
263864
|
-
],
|
263862
|
+
files: ["dist"],
|
263865
263863
|
exports: {
|
263866
263864
|
"./*": {
|
263867
263865
|
types: "./dist/*.d.ts",
|
@@ -263887,14 +263885,14 @@ var package_default = {
|
|
263887
263885
|
devDependencies: {
|
263888
263886
|
"@commander-js/extra-typings": "14.0.0",
|
263889
263887
|
commander: "14.0.0",
|
263890
|
-
"@inquirer/confirm": "5.1.
|
263891
|
-
"@inquirer/input": "4.
|
263892
|
-
"@inquirer/password": "4.0.
|
263893
|
-
"@inquirer/select": "4.2.
|
263894
|
-
"@settlemint/sdk-js": "2.4.0-
|
263895
|
-
"@settlemint/sdk-utils": "2.4.0-
|
263896
|
-
"@settlemint/sdk-viem": "2.4.0-
|
263897
|
-
"@types/node": "24.0.
|
263888
|
+
"@inquirer/confirm": "5.1.12",
|
263889
|
+
"@inquirer/input": "4.1.12",
|
263890
|
+
"@inquirer/password": "4.0.15",
|
263891
|
+
"@inquirer/select": "4.2.3",
|
263892
|
+
"@settlemint/sdk-js": "2.4.0-pr7cd97e38",
|
263893
|
+
"@settlemint/sdk-utils": "2.4.0-pr7cd97e38",
|
263894
|
+
"@settlemint/sdk-viem": "2.4.0-pr7cd97e38",
|
263895
|
+
"@types/node": "24.0.1",
|
263898
263896
|
"@types/semver": "7.7.0",
|
263899
263897
|
"@types/which": "3.0.4",
|
263900
263898
|
"get-tsconfig": "4.10.1",
|
@@ -263902,13 +263900,13 @@ var package_default = {
|
|
263902
263900
|
"is-in-ci": "1.0.0",
|
263903
263901
|
semver: "7.7.2",
|
263904
263902
|
slugify: "1.6.6",
|
263905
|
-
viem: "2.31.
|
263903
|
+
viem: "2.31.2",
|
263906
263904
|
which: "5.0.0",
|
263907
263905
|
yaml: "2.8.0",
|
263908
263906
|
yoctocolors: "2.1.1"
|
263909
263907
|
},
|
263910
263908
|
peerDependencies: {
|
263911
|
-
hardhat: "2.
|
263909
|
+
hardhat: "2.24.3"
|
263912
263910
|
},
|
263913
263911
|
peerDependenciesMeta: {
|
263914
263912
|
hardhat: {
|
@@ -263963,7 +263961,7 @@ async function telemetry(data) {
|
|
263963
263961
|
signal: controller.signal
|
263964
263962
|
});
|
263965
263963
|
clearTimeout(timeout);
|
263966
|
-
} catch (
|
263964
|
+
} catch (error2) {}
|
263967
263965
|
}
|
263968
263966
|
|
263969
263967
|
// ../../node_modules/@commander-js/extra-typings/esm.mjs
|
@@ -276515,9 +276513,9 @@ ${formattedErrors}`);
|
|
276515
276513
|
throw error$372;
|
276516
276514
|
}
|
276517
276515
|
}
|
276518
|
-
var ApplicationAccessTokenSchema2 = string$12().regex(/^sm_aat_
|
276519
|
-
var PersonalAccessTokenSchema2 = string$12().regex(/^sm_pat_
|
276520
|
-
var AccessTokenSchema2 = string$12().regex(/^
|
276516
|
+
var ApplicationAccessTokenSchema2 = string$12().regex(/^sm_aat_.*$/);
|
276517
|
+
var PersonalAccessTokenSchema2 = string$12().regex(/^sm_pat_.*$/);
|
276518
|
+
var AccessTokenSchema2 = string$12().regex(/^sm_pat_.*|sm_aat_.*$/);
|
276521
276519
|
function tryParseJson2(value, defaultValue = null) {
|
276522
276520
|
try {
|
276523
276521
|
const parsed = JSON.parse(value);
|
@@ -276525,7 +276523,7 @@ function tryParseJson2(value, defaultValue = null) {
|
|
276525
276523
|
return defaultValue;
|
276526
276524
|
}
|
276527
276525
|
return parsed;
|
276528
|
-
} catch (
|
276526
|
+
} catch (err) {
|
276529
276527
|
return defaultValue;
|
276530
276528
|
}
|
276531
276529
|
}
|
@@ -288291,20 +288289,6 @@ var restartBlockchainNetwork = graphql(`
|
|
288291
288289
|
}
|
288292
288290
|
}
|
288293
288291
|
`, [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
288292
|
var blockchainNetworkList = (gqlClient) => {
|
288309
288293
|
return async (applicationUniqueName) => {
|
288310
288294
|
const { blockchainNetworksByUniqueName: { items } } = await gqlClient.request(getBlockchainNetworks, { applicationUniqueName });
|
@@ -288339,14 +288323,6 @@ var blockchainNetworkRestart = (gqlClient) => async (blockchainNetworkUniqueName
|
|
288339
288323
|
const { restartBlockchainNetworkByUniqueName: blockchainNetwork } = await gqlClient.request(restartBlockchainNetwork, { uniqueName: blockchainNetworkUniqueName });
|
288340
288324
|
return blockchainNetwork;
|
288341
288325
|
};
|
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
288326
|
var BlockchainNodeFragment = graphql(`
|
288351
288327
|
fragment BlockchainNode on BlockchainNode {
|
288352
288328
|
__typename
|
@@ -288480,20 +288456,6 @@ var restartBlockchainNode = graphql(`
|
|
288480
288456
|
}
|
288481
288457
|
}
|
288482
288458
|
`, [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
288459
|
var blockchainNodeList = (gqlClient) => {
|
288498
288460
|
return async (applicationUniqueName) => {
|
288499
288461
|
const { blockchainNodesByUniqueName: { items } } = await gqlClient.request(getBlockchainNodes, { applicationUniqueName });
|
@@ -288522,14 +288484,6 @@ var blockchainNodeRestart = (gqlClient) => async (blockchainNodeUniqueName) => {
|
|
288522
288484
|
const { restartBlockchainNodeByUniqueName: blockchainNode } = await gqlClient.request(restartBlockchainNode, { uniqueName: blockchainNodeUniqueName });
|
288523
288485
|
return blockchainNode;
|
288524
288486
|
};
|
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
288487
|
var CustomDeploymentFragment = graphql(`
|
288534
288488
|
fragment CustomDeployment on CustomDeployment {
|
288535
288489
|
id
|
@@ -288612,20 +288566,6 @@ var restartCustomDeployment = graphql(`
|
|
288612
288566
|
}
|
288613
288567
|
}
|
288614
288568
|
`, [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
288569
|
var customdeploymentList = (gqlClient) => {
|
288630
288570
|
return async (applicationUniqueName) => {
|
288631
288571
|
const { customDeploymentsByUniqueName: { items } } = await gqlClient.request(getCustomDeployments, { applicationUniqueName });
|
@@ -288662,14 +288602,6 @@ var customDeploymentRestart = (gqlClient) => async (customDeploymentUniqueName)
|
|
288662
288602
|
const { restartCustomDeploymentByUniqueName: customDeployment } = await gqlClient.request(restartCustomDeployment, { uniqueName: customDeploymentUniqueName });
|
288663
288603
|
return customDeployment;
|
288664
288604
|
};
|
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
288605
|
var getFoundryEnvConfig = graphql(`
|
288674
288606
|
query GetFoundryEnvConfig($blockchainNodeUniqueName: String!) {
|
288675
288607
|
foundryEnvConfigByUniqueName(blockchainNodeUniqueName: $blockchainNodeUniqueName)
|
@@ -288746,20 +288678,6 @@ var restartLoadBalancer = graphql(`
|
|
288746
288678
|
}
|
288747
288679
|
}
|
288748
288680
|
`, [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
288681
|
var loadBalancerRead = (gqlClient) => {
|
288764
288682
|
return async (loadBalancerUniqueName) => {
|
288765
288683
|
const { loadBalancerByUniqueName: loadBalancer } = await gqlClient.request(getLoadBalancer, { uniqueName: loadBalancerUniqueName });
|
@@ -288793,14 +288711,6 @@ var loadBalancerRestart = (gqlClient) => async (loadBalancerUniqueName) => {
|
|
288793
288711
|
const { restartLoadBalancerByUniqueName: loadBalancer } = await gqlClient.request(restartLoadBalancer, { uniqueName: loadBalancerUniqueName });
|
288794
288712
|
return loadBalancer;
|
288795
288713
|
};
|
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
288714
|
var InsightsFragment = graphql(`
|
288805
288715
|
fragment Insights on Insights {
|
288806
288716
|
__typename
|
@@ -288874,20 +288784,6 @@ var restartInsights = graphql(`
|
|
288874
288784
|
}
|
288875
288785
|
}
|
288876
288786
|
`, [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
288787
|
var insightsList = (gqlClient) => {
|
288892
288788
|
return async (applicationUniqueName) => {
|
288893
288789
|
const { insightsListByUniqueName: { items } } = await gqlClient.request(getInsights, { applicationUniqueName });
|
@@ -288921,14 +288817,6 @@ var insightsRestart = (gqlClient) => async (insightsUniqueName) => {
|
|
288921
288817
|
const { restartInsightsByUniqueName: insights } = await gqlClient.request(restartInsights, { uniqueName: insightsUniqueName });
|
288922
288818
|
return insights;
|
288923
288819
|
};
|
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
288820
|
var IntegrationFragment = graphql(`
|
288933
288821
|
fragment Integration on Integration {
|
288934
288822
|
__typename
|
@@ -288998,20 +288886,6 @@ var restartIntegrationTool = graphql(`
|
|
288998
288886
|
}
|
288999
288887
|
}
|
289000
288888
|
`, [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
288889
|
var integrationToolList = (gqlClient) => {
|
289016
288890
|
return async (applicationUniqueName) => {
|
289017
288891
|
const { integrationsByUniqueName: { items } } = await gqlClient.request(getIntegrations, { applicationUniqueName });
|
@@ -289039,14 +288913,6 @@ var integrationToolRestart = (gqlClient) => async (integrationUniqueName) => {
|
|
289039
288913
|
const { restartIntegrationByUniqueName: integration } = await gqlClient.request(restartIntegrationTool, { uniqueName: integrationUniqueName });
|
289040
288914
|
return integration;
|
289041
288915
|
};
|
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
288916
|
var StorageFragment = graphql(`
|
289051
288917
|
fragment Storage on Storage {
|
289052
288918
|
__typename
|
@@ -289116,20 +288982,6 @@ var restartStorage = graphql(`
|
|
289116
288982
|
}
|
289117
288983
|
}
|
289118
288984
|
`, [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
288985
|
var storageList = (gqlClient) => {
|
289134
288986
|
return async (applicationUniqueName) => {
|
289135
288987
|
const { storagesByUniqueName: { items } } = await gqlClient.request(getStorages, { applicationUniqueName });
|
@@ -289157,14 +289009,6 @@ var storageRestart = (gqlClient) => async (storageUniqueName) => {
|
|
289157
289009
|
const { restartStorageByUniqueName: storage } = await gqlClient.request(restartStorage, { uniqueName: storageUniqueName });
|
289158
289010
|
return storage;
|
289159
289011
|
};
|
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
289012
|
var MiddlewareFragment = graphql(`
|
289169
289013
|
fragment Middleware on Middleware {
|
289170
289014
|
__typename
|
@@ -289265,20 +289109,6 @@ var restartMiddleware = graphql(`
|
|
289265
289109
|
}
|
289266
289110
|
}
|
289267
289111
|
`, [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
289112
|
var middlewareList = (gqlClient) => {
|
289283
289113
|
return async (applicationUniqueName) => {
|
289284
289114
|
const { middlewaresByUniqueName: { items } } = await gqlClient.request(getMiddlewares, { applicationUniqueName });
|
@@ -289323,14 +289153,6 @@ var middlewareRestart = (gqlClient) => async (middlewareUniqueName) => {
|
|
289323
289153
|
const { restartMiddlewareByUniqueName: middleware } = await gqlClient.request(restartMiddleware, { uniqueName: middlewareUniqueName });
|
289324
289154
|
return middleware;
|
289325
289155
|
};
|
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
289156
|
var getPlatformConfigQuery = graphql(`
|
289335
289157
|
query platformConfig {
|
289336
289158
|
config {
|
@@ -289463,20 +289285,6 @@ var restartPrivateKey = graphql(`
|
|
289463
289285
|
}
|
289464
289286
|
}
|
289465
289287
|
`, [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
289288
|
var privateKeyList = (gqlClient) => {
|
289481
289289
|
return async (applicationUniqueName) => {
|
289482
289290
|
const { privateKeysByUniqueName: { items } } = await gqlClient.request(getPrivateKeys, { applicationUniqueName });
|
@@ -289515,14 +289323,6 @@ var privateKeyRestart = (gqlClient) => async (privateKeyUniqueName) => {
|
|
289515
289323
|
const { restartPrivateKeyByUniqueName: privateKey } = await gqlClient.request(restartPrivateKey, { uniqueName: privateKeyUniqueName });
|
289516
289324
|
return privateKey;
|
289517
289325
|
};
|
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
289326
|
var ClientOptionsSchema = exports_external.object({
|
289527
289327
|
accessToken: AccessTokenSchema2,
|
289528
289328
|
instance: UrlSchema2
|
@@ -289602,75 +289402,57 @@ function createSettleMintClient(options) {
|
|
289602
289402
|
read: blockchainNetworkRead(gqlClient),
|
289603
289403
|
create: blockchainNetworkCreate(gqlClient),
|
289604
289404
|
delete: blockchainNetworkDelete(gqlClient),
|
289605
|
-
restart: blockchainNetworkRestart(gqlClient)
|
289606
|
-
pause: blockchainNetworkPause(gqlClient),
|
289607
|
-
resume: blockchainNetworkResume(gqlClient)
|
289405
|
+
restart: blockchainNetworkRestart(gqlClient)
|
289608
289406
|
},
|
289609
289407
|
blockchainNode: {
|
289610
289408
|
list: blockchainNodeList(gqlClient),
|
289611
289409
|
read: blockchainNodeRead(gqlClient),
|
289612
289410
|
create: blockchainNodeCreate(gqlClient),
|
289613
|
-
restart: blockchainNodeRestart(gqlClient)
|
289614
|
-
pause: blockchainNodePause(gqlClient),
|
289615
|
-
resume: blockchainNodeResume(gqlClient)
|
289411
|
+
restart: blockchainNodeRestart(gqlClient)
|
289616
289412
|
},
|
289617
289413
|
loadBalancer: {
|
289618
289414
|
list: loadBalancerList(gqlClient),
|
289619
289415
|
read: loadBalancerRead(gqlClient),
|
289620
289416
|
create: loadBalancerCreate(gqlClient),
|
289621
|
-
restart: loadBalancerRestart(gqlClient)
|
289622
|
-
pause: loadBalancerPause(gqlClient),
|
289623
|
-
resume: loadBalancerResume(gqlClient)
|
289417
|
+
restart: loadBalancerRestart(gqlClient)
|
289624
289418
|
},
|
289625
289419
|
middleware: {
|
289626
289420
|
list: middlewareList(gqlClient),
|
289627
289421
|
read: middlewareRead(gqlClient),
|
289628
289422
|
graphSubgraphs: graphMiddlewareSubgraphs(gqlClient),
|
289629
289423
|
create: middlewareCreate(gqlClient),
|
289630
|
-
restart: middlewareRestart(gqlClient)
|
289631
|
-
pause: middlewarePause(gqlClient),
|
289632
|
-
resume: middlewareResume(gqlClient)
|
289424
|
+
restart: middlewareRestart(gqlClient)
|
289633
289425
|
},
|
289634
289426
|
integrationTool: {
|
289635
289427
|
list: integrationToolList(gqlClient),
|
289636
289428
|
read: integrationToolRead(gqlClient),
|
289637
289429
|
create: integrationToolCreate(gqlClient),
|
289638
|
-
restart: integrationToolRestart(gqlClient)
|
289639
|
-
pause: integrationToolPause(gqlClient),
|
289640
|
-
resume: integrationToolResume(gqlClient)
|
289430
|
+
restart: integrationToolRestart(gqlClient)
|
289641
289431
|
},
|
289642
289432
|
storage: {
|
289643
289433
|
list: storageList(gqlClient),
|
289644
289434
|
read: storageRead(gqlClient),
|
289645
289435
|
create: storageCreate(gqlClient),
|
289646
|
-
restart: storageRestart(gqlClient)
|
289647
|
-
pause: storagePause(gqlClient),
|
289648
|
-
resume: storageResume(gqlClient)
|
289436
|
+
restart: storageRestart(gqlClient)
|
289649
289437
|
},
|
289650
289438
|
privateKey: {
|
289651
289439
|
list: privateKeyList(gqlClient),
|
289652
289440
|
read: privatekeyRead(gqlClient),
|
289653
289441
|
create: privateKeyCreate(gqlClient),
|
289654
|
-
restart: privateKeyRestart(gqlClient)
|
289655
|
-
pause: privateKeyPause(gqlClient),
|
289656
|
-
resume: privateKeyResume(gqlClient)
|
289442
|
+
restart: privateKeyRestart(gqlClient)
|
289657
289443
|
},
|
289658
289444
|
insights: {
|
289659
289445
|
list: insightsList(gqlClient),
|
289660
289446
|
read: insightsRead(gqlClient),
|
289661
289447
|
create: insightsCreate(gqlClient),
|
289662
|
-
restart: insightsRestart(gqlClient)
|
289663
|
-
pause: insightsPause(gqlClient),
|
289664
|
-
resume: insightsResume(gqlClient)
|
289448
|
+
restart: insightsRestart(gqlClient)
|
289665
289449
|
},
|
289666
289450
|
customDeployment: {
|
289667
289451
|
list: customdeploymentList(gqlClient),
|
289668
289452
|
read: customdeploymentRead(gqlClient),
|
289669
289453
|
create: customdeploymentCreate(gqlClient),
|
289670
289454
|
update: customdeploymentUpdate(gqlClient),
|
289671
|
-
restart: customDeploymentRestart(gqlClient)
|
289672
|
-
pause: customDeploymentPause(gqlClient),
|
289673
|
-
resume: customDeploymentResume(gqlClient)
|
289455
|
+
restart: customDeploymentRestart(gqlClient)
|
289674
289456
|
},
|
289675
289457
|
foundry: { env: getEnv(gqlClient) },
|
289676
289458
|
applicationAccessToken: { create: applicationAccessTokenCreate(gqlClient) },
|
@@ -296087,6 +295869,17 @@ async function exists3(path$1) {
|
|
296087
295869
|
return false;
|
296088
295870
|
}
|
296089
295871
|
}
|
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
|
+
}
|
296090
295883
|
var require_balanced_match4 = __commonJS4({ "../../node_modules/balanced-match/index.js"(exports, module) {
|
296091
295884
|
module.exports = balanced$1;
|
296092
295885
|
function balanced$1(a3, b, str) {
|
@@ -301565,17 +301358,6 @@ var glob3 = Object.assign(glob_3, {
|
|
301565
301358
|
unescape: unescape4
|
301566
301359
|
});
|
301567
301360
|
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
|
-
}
|
301579
301361
|
async function findMonoRepoRoot2(startDir) {
|
301580
301362
|
const lockFilePath = await findUp([
|
301581
301363
|
"package-lock.json",
|
@@ -301621,7 +301403,7 @@ function tryParseJson4(value2, defaultValue = null) {
|
|
301621
301403
|
return defaultValue;
|
301622
301404
|
}
|
301623
301405
|
return parsed;
|
301624
|
-
} catch (
|
301406
|
+
} catch (err) {
|
301625
301407
|
return defaultValue;
|
301626
301408
|
}
|
301627
301409
|
}
|
@@ -301649,7 +301431,7 @@ async function readConfig() {
|
|
301649
301431
|
try {
|
301650
301432
|
const content = await readFile4(CONFIG_FILE, "utf-8");
|
301651
301433
|
return tryParseJson4(content, { instances: {} });
|
301652
|
-
} catch (
|
301434
|
+
} catch (error41) {
|
301653
301435
|
return { instances: {} };
|
301654
301436
|
}
|
301655
301437
|
}
|
@@ -303234,7 +303016,7 @@ var inputTheme = {
|
|
303234
303016
|
validationFailureMode: "keep"
|
303235
303017
|
};
|
303236
303018
|
var esm_default2 = createPrompt((config4, done) => {
|
303237
|
-
const { required: required4, validate: validate3 = () => true
|
303019
|
+
const { required: required4, validate: validate3 = () => true } = config4;
|
303238
303020
|
const theme = makeTheme(inputTheme, config4.theme);
|
303239
303021
|
const [status, setStatus] = useState("idle");
|
303240
303022
|
const [defaultValue = "", setDefaultValue] = useState(config4.default);
|
@@ -303274,12 +303056,6 @@ var esm_default2 = createPrompt((config4, done) => {
|
|
303274
303056
|
setError(undefined);
|
303275
303057
|
}
|
303276
303058
|
});
|
303277
|
-
useEffect((rl) => {
|
303278
|
-
if (prefill === "editable" && defaultValue) {
|
303279
|
-
rl.write(defaultValue);
|
303280
|
-
setValue(defaultValue);
|
303281
|
-
}
|
303282
|
-
}, []);
|
303283
303059
|
const message = theme.style.message(config4.message, status);
|
303284
303060
|
let formattedValue = value4;
|
303285
303061
|
if (typeof config4.transformer === "function") {
|
@@ -305378,9 +305154,9 @@ function watchContractEvent(client, parameters) {
|
|
305378
305154
|
return poll_;
|
305379
305155
|
if (typeof fromBlock === "bigint")
|
305380
305156
|
return true;
|
305381
|
-
if (client.transport.type === "webSocket"
|
305157
|
+
if (client.transport.type === "webSocket")
|
305382
305158
|
return false;
|
305383
|
-
if (client.transport.type === "fallback" &&
|
305159
|
+
if (client.transport.type === "fallback" && client.transport.transports[0].config.type === "webSocket")
|
305384
305160
|
return false;
|
305385
305161
|
return true;
|
305386
305162
|
})();
|
@@ -305481,7 +305257,7 @@ function watchContractEvent(client, parameters) {
|
|
305481
305257
|
try {
|
305482
305258
|
const transport = (() => {
|
305483
305259
|
if (client.transport.type === "fallback") {
|
305484
|
-
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket"
|
305260
|
+
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket");
|
305485
305261
|
if (!transport2)
|
305486
305262
|
return client.transport;
|
305487
305263
|
return transport2.value;
|
@@ -307369,10 +307145,9 @@ async function simulateBlocks(client, parameters) {
|
|
307369
307145
|
const calls = block2.calls.map((call_) => {
|
307370
307146
|
const call2 = call_;
|
307371
307147
|
const account = call2.account ? parseAccount(call2.account) : undefined;
|
307372
|
-
const data = call2.abi ? encodeFunctionData(call2) : call2.data;
|
307373
307148
|
const request2 = {
|
307374
307149
|
...call2,
|
307375
|
-
data: call2.
|
307150
|
+
data: call2.abi ? encodeFunctionData(call2) : call2.data,
|
307376
307151
|
from: call2.from ?? account?.address
|
307377
307152
|
};
|
307378
307153
|
assertRequest(request2);
|
@@ -308642,9 +308417,9 @@ function watchBlockNumber(client, { emitOnBegin = false, emitMissed = false, onB
|
|
308642
308417
|
const enablePolling = (() => {
|
308643
308418
|
if (typeof poll_ !== "undefined")
|
308644
308419
|
return poll_;
|
308645
|
-
if (client.transport.type === "webSocket"
|
308420
|
+
if (client.transport.type === "webSocket")
|
308646
308421
|
return false;
|
308647
|
-
if (client.transport.type === "fallback" &&
|
308422
|
+
if (client.transport.type === "fallback" && client.transport.transports[0].config.type === "webSocket")
|
308648
308423
|
return false;
|
308649
308424
|
return true;
|
308650
308425
|
})();
|
@@ -308696,7 +308471,7 @@ function watchBlockNumber(client, { emitOnBegin = false, emitMissed = false, onB
|
|
308696
308471
|
try {
|
308697
308472
|
const transport = (() => {
|
308698
308473
|
if (client.transport.type === "fallback") {
|
308699
|
-
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket"
|
308474
|
+
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket");
|
308700
308475
|
if (!transport2)
|
308701
308476
|
return client.transport;
|
308702
308477
|
return transport2.value;
|
@@ -308849,9 +308624,9 @@ function watchBlocks(client, { blockTag = "latest", emitMissed = false, emitOnBe
|
|
308849
308624
|
const enablePolling = (() => {
|
308850
308625
|
if (typeof poll_ !== "undefined")
|
308851
308626
|
return poll_;
|
308852
|
-
if (client.transport.type === "webSocket"
|
308627
|
+
if (client.transport.type === "webSocket")
|
308853
308628
|
return false;
|
308854
|
-
if (client.transport.type === "fallback" &&
|
308629
|
+
if (client.transport.type === "fallback" && client.transport.transports[0].config.type === "webSocket")
|
308855
308630
|
return false;
|
308856
308631
|
return true;
|
308857
308632
|
})();
|
@@ -308920,7 +308695,7 @@ function watchBlocks(client, { blockTag = "latest", emitMissed = false, emitOnBe
|
|
308920
308695
|
}
|
308921
308696
|
const transport = (() => {
|
308922
308697
|
if (client.transport.type === "fallback") {
|
308923
|
-
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket"
|
308698
|
+
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket");
|
308924
308699
|
if (!transport2)
|
308925
308700
|
return client.transport;
|
308926
308701
|
return transport2.value;
|
@@ -308967,9 +308742,9 @@ function watchEvent(client, { address, args, batch = true, event, events, fromBl
|
|
308967
308742
|
return poll_;
|
308968
308743
|
if (typeof fromBlock === "bigint")
|
308969
308744
|
return true;
|
308970
|
-
if (client.transport.type === "webSocket"
|
308745
|
+
if (client.transport.type === "webSocket")
|
308971
308746
|
return false;
|
308972
|
-
if (client.transport.type === "fallback" &&
|
308747
|
+
if (client.transport.type === "fallback" && client.transport.transports[0].config.type === "webSocket")
|
308973
308748
|
return false;
|
308974
308749
|
return true;
|
308975
308750
|
})();
|
@@ -309056,7 +308831,7 @@ function watchEvent(client, { address, args, batch = true, event, events, fromBl
|
|
309056
308831
|
try {
|
309057
308832
|
const transport = (() => {
|
309058
308833
|
if (client.transport.type === "fallback") {
|
309059
|
-
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket"
|
308834
|
+
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket");
|
309060
308835
|
if (!transport2)
|
309061
308836
|
return client.transport;
|
309062
308837
|
return transport2.value;
|
@@ -309123,7 +308898,7 @@ function watchEvent(client, { address, args, batch = true, event, events, fromBl
|
|
309123
308898
|
}
|
309124
308899
|
// ../../node_modules/viem/_esm/actions/public/watchPendingTransactions.js
|
309125
308900
|
function watchPendingTransactions(client, { batch = true, onError, onTransactions, poll: poll_, pollingInterval = client.pollingInterval }) {
|
309126
|
-
const enablePolling = typeof poll_ !== "undefined" ? poll_ : client.transport.type !== "webSocket"
|
308901
|
+
const enablePolling = typeof poll_ !== "undefined" ? poll_ : client.transport.type !== "webSocket";
|
309127
308902
|
const pollPendingTransactions = () => {
|
309128
308903
|
const observerId = stringify3([
|
309129
308904
|
"watchPendingTransactions",
|
@@ -320781,7 +320556,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
320781
320556
|
try {
|
320782
320557
|
validate2(exports_external.string(), value4);
|
320783
320558
|
return true;
|
320784
|
-
} catch (
|
320559
|
+
} catch (error45) {
|
320785
320560
|
return "Invalid token name";
|
320786
320561
|
}
|
320787
320562
|
}
|
@@ -320834,7 +320609,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
320834
320609
|
try {
|
320835
320610
|
validate2(ApplicationAccessTokenSchema2, aat);
|
320836
320611
|
return aat;
|
320837
|
-
} catch (
|
320612
|
+
} catch (error45) {}
|
320838
320613
|
}
|
320839
320614
|
return esm_default5({
|
320840
320615
|
message: "What is the application access token for your application in SettleMint? (format: sm_aat_...)",
|
@@ -320842,7 +320617,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
320842
320617
|
try {
|
320843
320618
|
validate2(ApplicationAccessTokenSchema2, value4);
|
320844
320619
|
return true;
|
320845
|
-
} catch (
|
320620
|
+
} catch (error45) {
|
320846
320621
|
return "Invalid application access token, it should start with sm_aat_...";
|
320847
320622
|
}
|
320848
320623
|
}
|
@@ -321247,7 +321022,7 @@ async function instancePrompt({
|
|
321247
321022
|
try {
|
321248
321023
|
validate2(UrlSchema2, value4);
|
321249
321024
|
return true;
|
321250
|
-
} catch (
|
321025
|
+
} catch (error45) {
|
321251
321026
|
return "Invalid URL";
|
321252
321027
|
}
|
321253
321028
|
},
|
@@ -321331,7 +321106,7 @@ async function serviceUrlPrompt({
|
|
321331
321106
|
try {
|
321332
321107
|
validate2(UrlSchema2, value4);
|
321333
321108
|
return true;
|
321334
|
-
} catch (
|
321109
|
+
} catch (error45) {
|
321335
321110
|
return "Invalid URL";
|
321336
321111
|
}
|
321337
321112
|
},
|
@@ -322275,7 +322050,7 @@ async function projectNamePrompt(env2, argument) {
|
|
322275
322050
|
try {
|
322276
322051
|
validate2(exports_external.string(), value4);
|
322277
322052
|
return true;
|
322278
|
-
} catch (
|
322053
|
+
} catch (error45) {
|
322279
322054
|
return "Invalid projectname";
|
322280
322055
|
}
|
322281
322056
|
}
|
@@ -326263,7 +326038,7 @@ async function personalAccessTokenPrompt(env2, instance, accept) {
|
|
326263
326038
|
try {
|
326264
326039
|
validate2(PersonalAccessTokenSchema2, value4);
|
326265
326040
|
return true;
|
326266
|
-
} catch (
|
326041
|
+
} catch (error45) {
|
326267
326042
|
return "Invalid personal access token, it should start with sm_pat_...";
|
326268
326043
|
}
|
326269
326044
|
}
|
@@ -326344,7 +326119,7 @@ function loginCommand() {
|
|
326344
326119
|
});
|
326345
326120
|
try {
|
326346
326121
|
await loginSpinner(client);
|
326347
|
-
} catch (
|
326122
|
+
} catch (error45) {
|
326348
326123
|
cancel2(`Invalid personal access token for instance ${selectedInstance}`);
|
326349
326124
|
}
|
326350
326125
|
await storeCredentials(personalAccessToken, selectedInstance);
|
@@ -326494,17 +326269,13 @@ function addClusterServiceArgs(cmd2) {
|
|
326494
326269
|
// src/commands/platform/utils/wait-for-completion.ts
|
326495
326270
|
class TimeoutError2 extends Error {
|
326496
326271
|
}
|
326497
|
-
|
326498
|
-
class DeploymentFailedError extends Error {
|
326499
|
-
}
|
326500
326272
|
async function waitForCompletion({
|
326501
326273
|
settlemint,
|
326502
326274
|
type: type4,
|
326503
326275
|
uniqueName,
|
326504
326276
|
action,
|
326505
326277
|
maxTimeout = 10 * 60 * 1000,
|
326506
|
-
restartIfTimeout = false
|
326507
|
-
restartOnError = false
|
326278
|
+
restartIfTimeout = false
|
326508
326279
|
}) {
|
326509
326280
|
const serviceType = SETTLEMINT_CLIENT_MAP[type4];
|
326510
326281
|
if (serviceType === "workspace" || serviceType === "application" || serviceType === "foundry" || serviceType === "applicationAccessToken" || serviceType === "platform" || serviceType === "wallet") {
|
@@ -326514,7 +326285,6 @@ async function waitForCompletion({
|
|
326514
326285
|
if (!service || !("read" in service)) {
|
326515
326286
|
throw new Error(`Service ${serviceType} does not support status checking`);
|
326516
326287
|
}
|
326517
|
-
let hasRestarted = false;
|
326518
326288
|
function showSpinner() {
|
326519
326289
|
return spinner({
|
326520
326290
|
startMessage: `Waiting for ${type4} to be ${getActionLabel(action)}`,
|
@@ -326524,20 +326294,33 @@ async function waitForCompletion({
|
|
326524
326294
|
while (true) {
|
326525
326295
|
try {
|
326526
326296
|
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
|
+
}
|
326527
326305
|
if (resource.status === "FAILED") {
|
326528
|
-
|
326529
|
-
|
326530
|
-
|
326306
|
+
if (spinner2) {
|
326307
|
+
spinner2.text = `${capitalizeFirstLetter2(type4)} failed to ${getActionLabel(action)}`;
|
326308
|
+
} else {
|
326309
|
+
note(`${capitalizeFirstLetter2(type4)} failed to ${getActionLabel(action)}`);
|
326531
326310
|
}
|
326532
326311
|
return false;
|
326533
326312
|
}
|
326534
|
-
if (
|
326535
|
-
|
326536
|
-
|
326313
|
+
if (spinner2) {
|
326314
|
+
spinner2.text = `${capitalizeFirstLetter2(type4)} is not ready yet (status: ${resource.status})`;
|
326315
|
+
} else {
|
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)`);
|
326537
326323
|
}
|
326538
|
-
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} is not ready yet (status: ${resource.status})`);
|
326539
|
-
} catch (_error) {
|
326540
|
-
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} is not ready yet (status: UNKNOWN)`);
|
326541
326324
|
}
|
326542
326325
|
if (Date.now() - startTime > maxTimeout) {
|
326543
326326
|
throw new TimeoutError2(`Operation timed out after ${maxTimeout / 60000} minutes for ${type4} with unique name ${uniqueName}`);
|
@@ -326550,59 +326333,23 @@ async function waitForCompletion({
|
|
326550
326333
|
try {
|
326551
326334
|
return await showSpinner();
|
326552
326335
|
} catch (error45) {
|
326553
|
-
|
326336
|
+
const isTimeoutError = error45 instanceof SpinnerError && error45.originalError instanceof TimeoutError2;
|
326337
|
+
if (restartIfTimeout && isTimeoutError) {
|
326554
326338
|
note(`Restarting ${capitalizeFirstLetter2(type4)}`);
|
326555
|
-
hasRestarted = true;
|
326556
326339
|
await service.restart(uniqueName);
|
326557
326340
|
return showSpinner();
|
326558
326341
|
}
|
326559
326342
|
throw error45;
|
326560
326343
|
}
|
326561
326344
|
}
|
326562
|
-
function shouldRestart(error45, restartIfTimeout) {
|
326563
|
-
const isSpinnerError = error45 instanceof SpinnerError;
|
326564
|
-
const isDeploymentFailedError = error45 instanceof DeploymentFailedError || isSpinnerError && error45.originalError instanceof DeploymentFailedError;
|
326565
|
-
if (isDeploymentFailedError) {
|
326566
|
-
return true;
|
326567
|
-
}
|
326568
|
-
const isTimeoutError = error45 instanceof TimeoutError2 || isSpinnerError && error45.originalError instanceof TimeoutError2;
|
326569
|
-
return restartIfTimeout && isTimeoutError;
|
326570
|
-
}
|
326571
|
-
function updateStatus(spinner2, message) {
|
326572
|
-
if (spinner2) {
|
326573
|
-
spinner2.text = message;
|
326574
|
-
} else {
|
326575
|
-
note(message);
|
326576
|
-
}
|
326577
|
-
}
|
326578
|
-
function isActionComplete(action, status) {
|
326579
|
-
switch (action) {
|
326580
|
-
case "pause":
|
326581
|
-
return status === "PAUSED" || status === "AUTO_PAUSED";
|
326582
|
-
case "resume":
|
326583
|
-
case "deploy":
|
326584
|
-
case "destroy":
|
326585
|
-
case "restart":
|
326586
|
-
return status === "COMPLETED";
|
326587
|
-
default:
|
326588
|
-
return false;
|
326589
|
-
}
|
326590
|
-
}
|
326591
326345
|
function getActionLabel(action) {
|
326592
|
-
|
326593
|
-
|
326594
|
-
|
326595
|
-
|
326596
|
-
|
326597
|
-
case "pause":
|
326598
|
-
return "paused";
|
326599
|
-
case "resume":
|
326600
|
-
return "resumed";
|
326601
|
-
case "deploy":
|
326602
|
-
return "deployed";
|
326603
|
-
default:
|
326604
|
-
return "deployed";
|
326346
|
+
if (action === "restart") {
|
326347
|
+
return "restarted";
|
326348
|
+
}
|
326349
|
+
if (action === "destroy") {
|
326350
|
+
return "destroyed";
|
326605
326351
|
}
|
326352
|
+
return "deployed";
|
326606
326353
|
}
|
326607
326354
|
|
326608
326355
|
// src/prompts/provider.prompt.ts
|
@@ -326683,9 +326430,9 @@ function getCreateCommand({
|
|
326683
326430
|
cmd2.alias(alias);
|
326684
326431
|
}
|
326685
326432
|
if (requiresDeployment) {
|
326686
|
-
cmd2.option("-w, --wait", "Wait until deployed").option("--restart-if-timeout", "Restart if wait time is exceeded")
|
326433
|
+
cmd2.option("-w, --wait", "Wait until deployed").option("-r, --restart-if-timeout", "Restart if wait time is exceeded");
|
326687
326434
|
}
|
326688
|
-
execute2(cmd2, async ({ acceptDefaults, prod, default: isDefault, wait: wait2, restartIfTimeout,
|
326435
|
+
execute2(cmd2, async ({ acceptDefaults, prod, default: isDefault, wait: wait2, restartIfTimeout, provider, region }, createFunction) => {
|
326689
326436
|
intro(`Creating ${type4} in the SettleMint platform`);
|
326690
326437
|
const env2 = await loadEnv(false, !!prod);
|
326691
326438
|
const instance = await instancePrompt({ env: env2, accept: acceptDefaults });
|
@@ -326699,8 +326446,8 @@ function getCreateCommand({
|
|
326699
326446
|
instance
|
326700
326447
|
});
|
326701
326448
|
const platformConfig = await settlemint.platform.config();
|
326702
|
-
let selectedProvider;
|
326703
|
-
let selectedRegion;
|
326449
|
+
let selectedProvider = undefined;
|
326450
|
+
let selectedRegion = undefined;
|
326704
326451
|
if (cmd2.options.some((option) => option.long === "--provider")) {
|
326705
326452
|
selectedProvider = await providerPrompt(platformConfig, provider);
|
326706
326453
|
if (!selectedProvider) {
|
@@ -326729,8 +326476,7 @@ function getCreateCommand({
|
|
326729
326476
|
type: waitFor?.resourceType ?? type4,
|
326730
326477
|
uniqueName: waitFor?.uniqueName ?? result.uniqueName,
|
326731
326478
|
action: "deploy",
|
326732
|
-
restartIfTimeout
|
326733
|
-
restartOnError
|
326479
|
+
restartIfTimeout
|
326734
326480
|
});
|
326735
326481
|
if (!isDeployed) {
|
326736
326482
|
throw new Error(`Failed to deploy ${waitFor?.resourceType ?? type4} ${waitFor?.uniqueName ?? result.uniqueName}`);
|
@@ -327912,7 +327658,7 @@ function privateKeyHsmCreateCommand() {
|
|
327912
327658
|
return baseAction({
|
327913
327659
|
...defaultArgs,
|
327914
327660
|
acceptDefaults
|
327915
|
-
}, async ({ settlemint, env: env2, showSpinner, provider
|
327661
|
+
}, async ({ settlemint, env: env2, showSpinner, provider, region }) => {
|
327916
327662
|
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
327917
327663
|
if (!applicationUniqueName) {
|
327918
327664
|
return missingApplication();
|
@@ -328201,256 +327947,25 @@ function deleteCommand() {
|
|
328201
327947
|
return new Command("delete").alias("d").description("Delete a resource in the SettleMint platform").addCommand(applicationDeleteCommand()).addCommand(workspaceDeleteCommand());
|
328202
327948
|
}
|
328203
327949
|
|
328204
|
-
// src/commands/platform/common/pause-command.ts
|
328205
|
-
function getPauseCommand({
|
328206
|
-
name: name3,
|
328207
|
-
type: type4,
|
328208
|
-
alias,
|
328209
|
-
envKey,
|
328210
|
-
pauseFunction,
|
328211
|
-
usePersonalAccessToken = true
|
328212
|
-
}) {
|
328213
|
-
const commandName = sanitizeCommandName(name3);
|
328214
|
-
const typeCommandName = sanitizeCommandName(type4);
|
328215
|
-
const exampleCommandPrefix = `platform pause ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
328216
|
-
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([
|
328217
|
-
{
|
328218
|
-
description: `Pauses the specified ${type4} by unique name`,
|
328219
|
-
command: `${exampleCommandPrefix} <unique-name>`
|
328220
|
-
},
|
328221
|
-
{
|
328222
|
-
description: `Pauses the default ${type4} in the production environment`,
|
328223
|
-
command: `${exampleCommandPrefix} default --prod`
|
328224
|
-
}
|
328225
|
-
])).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 }) => {
|
328226
|
-
intro(`Pausing ${type4} in the SettleMint platform`);
|
328227
|
-
const env2 = await loadEnv(false, !!prod);
|
328228
|
-
const instance = await instancePrompt({ env: env2, accept: acceptDefaults });
|
328229
|
-
const accessToken = await getApplicationOrPersonalAccessToken({
|
328230
|
-
env: env2,
|
328231
|
-
instance,
|
328232
|
-
prefer: usePersonalAccessToken ? "personal" : "application"
|
328233
|
-
});
|
328234
|
-
const settlemint = createSettleMintClient({
|
328235
|
-
accessToken,
|
328236
|
-
instance
|
328237
|
-
});
|
328238
|
-
const isDefaultUniqueName = uniqueName === "default";
|
328239
|
-
const serviceUniqueName = isDefaultUniqueName ? typeof env2[envKey] === "string" ? env2[envKey] : null : uniqueName;
|
328240
|
-
if (!serviceUniqueName) {
|
328241
|
-
cancel2(`No default ${type4} found in your .env file. Please provide a valid ${type4} unique name or set a default ${type4} first.`);
|
328242
|
-
}
|
328243
|
-
const result = await spinner({
|
328244
|
-
startMessage: `Pausing ${type4}`,
|
328245
|
-
task: async () => {
|
328246
|
-
return pauseFunction(settlemint, serviceUniqueName);
|
328247
|
-
},
|
328248
|
-
stopMessage: `${capitalizeFirstLetter2(type4)} pause initiated`
|
328249
|
-
});
|
328250
|
-
if (wait2) {
|
328251
|
-
const isPaused = await waitForCompletion({
|
328252
|
-
settlemint,
|
328253
|
-
type: type4,
|
328254
|
-
uniqueName: serviceUniqueName,
|
328255
|
-
action: "pause"
|
328256
|
-
});
|
328257
|
-
if (!isPaused) {
|
328258
|
-
throw new Error(`Failed to pause ${type4} ${serviceUniqueName}`);
|
328259
|
-
}
|
328260
|
-
}
|
328261
|
-
outro(`${capitalizeFirstLetter2(type4)} ${result.name} pause initiated successfully`);
|
328262
|
-
});
|
328263
|
-
}
|
328264
|
-
|
328265
|
-
// src/commands/platform/blockchain-network/pause.ts
|
328266
|
-
function blockchainNetworkPauseCommand() {
|
328267
|
-
return getPauseCommand({
|
328268
|
-
name: "blockchain-network",
|
328269
|
-
type: "blockchain network",
|
328270
|
-
alias: "bnw",
|
328271
|
-
envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
|
328272
|
-
pauseFunction: async (settlemint, id) => {
|
328273
|
-
return settlemint.blockchainNetwork.pause(id);
|
328274
|
-
}
|
328275
|
-
});
|
328276
|
-
}
|
328277
|
-
|
328278
|
-
// src/commands/platform/blockchain-node/pause.ts
|
328279
|
-
function blockchainNodePauseCommand() {
|
328280
|
-
return getPauseCommand({
|
328281
|
-
name: "blockchain-node",
|
328282
|
-
type: "blockchain node",
|
328283
|
-
alias: "bn",
|
328284
|
-
envKey: "SETTLEMINT_BLOCKCHAIN_NODE",
|
328285
|
-
pauseFunction: async (settlemint, id) => {
|
328286
|
-
return settlemint.blockchainNode.pause(id);
|
328287
|
-
}
|
328288
|
-
});
|
328289
|
-
}
|
328290
|
-
|
328291
|
-
// src/commands/platform/custom-deployments/pause.ts
|
328292
|
-
function customDeploymentPauseCommand() {
|
328293
|
-
return getPauseCommand({
|
328294
|
-
name: "custom-deployment",
|
328295
|
-
type: "custom deployment",
|
328296
|
-
alias: "cd",
|
328297
|
-
envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
|
328298
|
-
pauseFunction: async (settlemint, id) => {
|
328299
|
-
return settlemint.customDeployment.pause(id);
|
328300
|
-
}
|
328301
|
-
});
|
328302
|
-
}
|
328303
|
-
|
328304
|
-
// src/commands/platform/insights/blockscout/pause.ts
|
328305
|
-
function blockscoutPauseCommand() {
|
328306
|
-
return getPauseCommand({
|
328307
|
-
name: "blockscout",
|
328308
|
-
type: "insights",
|
328309
|
-
alias: "bs",
|
328310
|
-
envKey: "SETTLEMINT_BLOCKSCOUT",
|
328311
|
-
pauseFunction: async (settlemint, id) => {
|
328312
|
-
return settlemint.insights.pause(id);
|
328313
|
-
}
|
328314
|
-
});
|
328315
|
-
}
|
328316
|
-
|
328317
|
-
// src/commands/platform/insights/pause.ts
|
328318
|
-
function insightsPauseCommand() {
|
328319
|
-
return new Command("insights").alias("in").description("Pause an insights service in the SettleMint platform").addCommand(blockscoutPauseCommand());
|
328320
|
-
}
|
328321
|
-
|
328322
|
-
// src/commands/platform/integration-tools/hasura/pause.ts
|
328323
|
-
function hasuraPauseCommand() {
|
328324
|
-
return getPauseCommand({
|
328325
|
-
name: "hasura",
|
328326
|
-
type: "integration tool",
|
328327
|
-
alias: "ha",
|
328328
|
-
envKey: "SETTLEMINT_HASURA",
|
328329
|
-
pauseFunction: async (settlemint, id) => {
|
328330
|
-
return settlemint.integrationTool.pause(id);
|
328331
|
-
}
|
328332
|
-
});
|
328333
|
-
}
|
328334
|
-
|
328335
|
-
// src/commands/platform/integration-tools/pause.ts
|
328336
|
-
function integrationToolPauseCommand() {
|
328337
|
-
return new Command("integration-tool").alias("it").description("Pause an integration tool service in the SettleMint platform").addCommand(hasuraPauseCommand());
|
328338
|
-
}
|
328339
|
-
|
328340
|
-
// src/commands/platform/load-balancer/pause.ts
|
328341
|
-
function loadBalancerPauseCommand() {
|
328342
|
-
return getPauseCommand({
|
328343
|
-
name: "evm",
|
328344
|
-
type: "load balancer",
|
328345
|
-
alias: "lb",
|
328346
|
-
envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
|
328347
|
-
pauseFunction: async (settlemint, id) => {
|
328348
|
-
return settlemint.loadBalancer.pause(id);
|
328349
|
-
}
|
328350
|
-
});
|
328351
|
-
}
|
328352
|
-
|
328353
|
-
// src/commands/platform/middleware/graph/pause.ts
|
328354
|
-
function graphMiddlewarePauseCommand() {
|
328355
|
-
return getPauseCommand({
|
328356
|
-
name: "graph",
|
328357
|
-
type: "middleware",
|
328358
|
-
alias: "gr",
|
328359
|
-
envKey: "SETTLEMINT_THEGRAPH",
|
328360
|
-
pauseFunction: async (settlemint, id) => {
|
328361
|
-
return settlemint.middleware.pause(id);
|
328362
|
-
}
|
328363
|
-
});
|
328364
|
-
}
|
328365
|
-
|
328366
|
-
// src/commands/platform/middleware/smart-contract-portal/pause.ts
|
328367
|
-
function smartContractPortalMiddlewarePauseCommand() {
|
328368
|
-
return getPauseCommand({
|
328369
|
-
name: "smart-contract-portal",
|
328370
|
-
type: "middleware",
|
328371
|
-
alias: "scp",
|
328372
|
-
envKey: "SETTLEMINT_PORTAL",
|
328373
|
-
pauseFunction: async (settlemint, id) => {
|
328374
|
-
return settlemint.middleware.pause(id);
|
328375
|
-
}
|
328376
|
-
});
|
328377
|
-
}
|
328378
|
-
|
328379
|
-
// src/commands/platform/middleware/pause.ts
|
328380
|
-
function middlewarePauseCommand() {
|
328381
|
-
return new Command("middleware").alias("mw").description("Pause a middleware service in the SettleMint platform").addCommand(graphMiddlewarePauseCommand()).addCommand(smartContractPortalMiddlewarePauseCommand());
|
328382
|
-
}
|
328383
|
-
|
328384
|
-
// src/commands/platform/private-key/pause.ts
|
328385
|
-
function privateKeyPauseCommand() {
|
328386
|
-
return getPauseCommand({
|
328387
|
-
name: "private-key",
|
328388
|
-
type: "private key",
|
328389
|
-
alias: "pk",
|
328390
|
-
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
328391
|
-
pauseFunction: async (settlemint, id) => {
|
328392
|
-
return settlemint.privateKey.pause(id);
|
328393
|
-
}
|
328394
|
-
});
|
328395
|
-
}
|
328396
|
-
|
328397
|
-
// src/commands/platform/storage/ipfs/pause.ts
|
328398
|
-
function ipfsStoragePauseCommand() {
|
328399
|
-
return getPauseCommand({
|
328400
|
-
name: "ipfs",
|
328401
|
-
type: "storage",
|
328402
|
-
alias: "ip",
|
328403
|
-
envKey: "SETTLEMINT_IPFS",
|
328404
|
-
pauseFunction: async (settlemint, id) => {
|
328405
|
-
return settlemint.storage.pause(id);
|
328406
|
-
}
|
328407
|
-
});
|
328408
|
-
}
|
328409
|
-
|
328410
|
-
// src/commands/platform/storage/minio/pause.ts
|
328411
|
-
function minioStoragePauseCommand() {
|
328412
|
-
return getPauseCommand({
|
328413
|
-
name: "minio",
|
328414
|
-
type: "storage",
|
328415
|
-
alias: "m",
|
328416
|
-
envKey: "SETTLEMINT_MINIO",
|
328417
|
-
pauseFunction: async (settlemint, id) => {
|
328418
|
-
return settlemint.storage.pause(id);
|
328419
|
-
}
|
328420
|
-
});
|
328421
|
-
}
|
328422
|
-
|
328423
|
-
// src/commands/platform/storage/pause.ts
|
328424
|
-
function storagePauseCommand() {
|
328425
|
-
return new Command("storage").alias("st").description("Pause a storage service in the SettleMint platform").addCommand(ipfsStoragePauseCommand()).addCommand(minioStoragePauseCommand());
|
328426
|
-
}
|
328427
|
-
|
328428
|
-
// src/commands/platform/pause.ts
|
328429
|
-
function pauseCommand() {
|
328430
|
-
const cmd2 = new Command("pause").description("Pause a resource in the SettleMint platform").addCommand(blockchainNodePauseCommand()).addCommand(blockchainNetworkPauseCommand()).addCommand(customDeploymentPauseCommand()).addCommand(insightsPauseCommand()).addCommand(integrationToolPauseCommand()).addCommand(loadBalancerPauseCommand()).addCommand(middlewarePauseCommand()).addCommand(privateKeyPauseCommand()).addCommand(storagePauseCommand());
|
328431
|
-
return cmd2;
|
328432
|
-
}
|
328433
|
-
|
328434
327950
|
// src/commands/platform/common/restart-command.ts
|
328435
327951
|
function getRestartCommand({
|
328436
327952
|
name: name3,
|
328437
327953
|
type: type4,
|
327954
|
+
subType,
|
328438
327955
|
alias,
|
328439
327956
|
envKey,
|
328440
327957
|
restartFunction,
|
328441
327958
|
usePersonalAccessToken = true
|
328442
327959
|
}) {
|
328443
327960
|
const commandName = sanitizeCommandName(name3);
|
328444
|
-
const typeCommandName = sanitizeCommandName(type4);
|
328445
|
-
const exampleCommandPrefix = `platform restart ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
328446
327961
|
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([
|
328447
327962
|
{
|
328448
|
-
description: `Restarts the specified ${type4} by
|
328449
|
-
command:
|
327963
|
+
description: `Restarts the specified ${type4} by id`,
|
327964
|
+
command: `platform restart ${commandName}${subType ? ` ${subType}` : ""} <${type4}-id>`
|
328450
327965
|
},
|
328451
327966
|
{
|
328452
327967
|
description: `Restarts the default ${type4} in the production environment`,
|
328453
|
-
command:
|
327968
|
+
command: `platform restart ${commandName}${subType ? ` ${subType}` : ""} default --prod`
|
328454
327969
|
}
|
328455
327970
|
])).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 }) => {
|
328456
327971
|
intro(`Restarting ${type4} in the SettleMint platform`);
|
@@ -328537,6 +328052,7 @@ function blockscoutRestartCommand() {
|
|
328537
328052
|
return getRestartCommand({
|
328538
328053
|
name: "blockscout",
|
328539
328054
|
type: "insights",
|
328055
|
+
subType: "blockscout",
|
328540
328056
|
alias: "bs",
|
328541
328057
|
envKey: "SETTLEMINT_BLOCKSCOUT",
|
328542
328058
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -328555,6 +328071,7 @@ function hasuraRestartCommand() {
|
|
328555
328071
|
return getRestartCommand({
|
328556
328072
|
name: "hasura",
|
328557
328073
|
type: "integration tool",
|
328074
|
+
subType: "hasura",
|
328558
328075
|
alias: "ha",
|
328559
328076
|
envKey: "SETTLEMINT_HASURA",
|
328560
328077
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -328586,6 +328103,7 @@ function graphRestartCommand() {
|
|
328586
328103
|
return getRestartCommand({
|
328587
328104
|
name: "graph",
|
328588
328105
|
type: "middleware",
|
328106
|
+
subType: "graph",
|
328589
328107
|
alias: "gr",
|
328590
328108
|
envKey: "SETTLEMINT_THEGRAPH",
|
328591
328109
|
restartFunction: async (settlemint, id) => {
|
@@ -328599,6 +328117,7 @@ function smartContractPortalRestartCommand() {
|
|
328599
328117
|
return getRestartCommand({
|
328600
328118
|
name: "smart-contract-portal",
|
328601
328119
|
type: "middleware",
|
328120
|
+
subType: "smart-contract-portal",
|
328602
328121
|
alias: "scp",
|
328603
328122
|
envKey: "SETTLEMINT_PORTAL",
|
328604
328123
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -328649,236 +328168,6 @@ function restartCommand() {
|
|
328649
328168
|
return cmd2;
|
328650
328169
|
}
|
328651
328170
|
|
328652
|
-
// src/commands/platform/common/resume-command.ts
|
328653
|
-
function getResumeCommand({
|
328654
|
-
name: name3,
|
328655
|
-
type: type4,
|
328656
|
-
alias,
|
328657
|
-
envKey,
|
328658
|
-
resumeFunction,
|
328659
|
-
usePersonalAccessToken = true
|
328660
|
-
}) {
|
328661
|
-
const commandName = sanitizeCommandName(name3);
|
328662
|
-
const typeCommandName = sanitizeCommandName(type4);
|
328663
|
-
const exampleCommandPrefix = `platform resume ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
328664
|
-
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([
|
328665
|
-
{
|
328666
|
-
description: `Resumes the specified ${type4} by unique name`,
|
328667
|
-
command: `${exampleCommandPrefix} <unique-name>`
|
328668
|
-
},
|
328669
|
-
{
|
328670
|
-
description: `Resumes the default ${type4} in the production environment`,
|
328671
|
-
command: `${exampleCommandPrefix} default --prod`
|
328672
|
-
}
|
328673
|
-
])).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 }) => {
|
328674
|
-
intro(`Resuming ${type4} in the SettleMint platform`);
|
328675
|
-
const env2 = await loadEnv(false, !!prod);
|
328676
|
-
const instance = await instancePrompt({ env: env2, accept: acceptDefaults });
|
328677
|
-
const accessToken = await getApplicationOrPersonalAccessToken({
|
328678
|
-
env: env2,
|
328679
|
-
instance,
|
328680
|
-
prefer: usePersonalAccessToken ? "personal" : "application"
|
328681
|
-
});
|
328682
|
-
const settlemint = createSettleMintClient({
|
328683
|
-
accessToken,
|
328684
|
-
instance
|
328685
|
-
});
|
328686
|
-
const isDefaultUniqueName = uniqueName === "default";
|
328687
|
-
const serviceUniqueName = isDefaultUniqueName ? typeof env2[envKey] === "string" ? env2[envKey] : null : uniqueName;
|
328688
|
-
if (!serviceUniqueName) {
|
328689
|
-
cancel2(`No default ${type4} found in your .env file. Please provide a valid ${type4} unique name or set a default ${type4} first.`);
|
328690
|
-
}
|
328691
|
-
const result = await spinner({
|
328692
|
-
startMessage: `Resuming ${type4}`,
|
328693
|
-
task: async () => {
|
328694
|
-
return resumeFunction(settlemint, serviceUniqueName);
|
328695
|
-
},
|
328696
|
-
stopMessage: `${capitalizeFirstLetter2(type4)} resume initiated`
|
328697
|
-
});
|
328698
|
-
if (wait2) {
|
328699
|
-
const isResumed = await waitForCompletion({
|
328700
|
-
settlemint,
|
328701
|
-
type: type4,
|
328702
|
-
uniqueName: serviceUniqueName,
|
328703
|
-
action: "resume"
|
328704
|
-
});
|
328705
|
-
if (!isResumed) {
|
328706
|
-
throw new Error(`Failed to resume ${type4} ${serviceUniqueName}`);
|
328707
|
-
}
|
328708
|
-
}
|
328709
|
-
outro(`${capitalizeFirstLetter2(type4)} ${result.name} resume initiated successfully`);
|
328710
|
-
});
|
328711
|
-
}
|
328712
|
-
|
328713
|
-
// src/commands/platform/blockchain-network/resume.ts
|
328714
|
-
function blockchainNetworkResumeCommand() {
|
328715
|
-
return getResumeCommand({
|
328716
|
-
name: "blockchain-network",
|
328717
|
-
type: "blockchain network",
|
328718
|
-
alias: "bnw",
|
328719
|
-
envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
|
328720
|
-
resumeFunction: async (settlemint, id) => {
|
328721
|
-
return settlemint.blockchainNetwork.resume(id);
|
328722
|
-
}
|
328723
|
-
});
|
328724
|
-
}
|
328725
|
-
|
328726
|
-
// src/commands/platform/blockchain-node/resume.ts
|
328727
|
-
function blockchainNodeResumeCommand() {
|
328728
|
-
return getResumeCommand({
|
328729
|
-
name: "blockchain-node",
|
328730
|
-
type: "blockchain node",
|
328731
|
-
alias: "bn",
|
328732
|
-
envKey: "SETTLEMINT_BLOCKCHAIN_NODE",
|
328733
|
-
resumeFunction: async (settlemint, id) => {
|
328734
|
-
return settlemint.blockchainNode.resume(id);
|
328735
|
-
}
|
328736
|
-
});
|
328737
|
-
}
|
328738
|
-
|
328739
|
-
// src/commands/platform/custom-deployments/resume.ts
|
328740
|
-
function customDeploymentResumeCommand() {
|
328741
|
-
return getResumeCommand({
|
328742
|
-
name: "custom-deployment",
|
328743
|
-
type: "custom deployment",
|
328744
|
-
alias: "cd",
|
328745
|
-
envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
|
328746
|
-
resumeFunction: async (settlemint, id) => {
|
328747
|
-
return settlemint.customDeployment.resume(id);
|
328748
|
-
}
|
328749
|
-
});
|
328750
|
-
}
|
328751
|
-
|
328752
|
-
// src/commands/platform/insights/blockscout/resume.ts
|
328753
|
-
function blockscoutResumeCommand() {
|
328754
|
-
return getResumeCommand({
|
328755
|
-
name: "blockscout",
|
328756
|
-
type: "insights",
|
328757
|
-
alias: "bs",
|
328758
|
-
envKey: "SETTLEMINT_BLOCKSCOUT",
|
328759
|
-
resumeFunction: async (settlemint, id) => {
|
328760
|
-
return settlemint.insights.resume(id);
|
328761
|
-
}
|
328762
|
-
});
|
328763
|
-
}
|
328764
|
-
|
328765
|
-
// src/commands/platform/insights/resume.ts
|
328766
|
-
function insightsResumeCommand() {
|
328767
|
-
return new Command("insights").alias("in").description("Resume an insights service in the SettleMint platform").addCommand(blockscoutResumeCommand());
|
328768
|
-
}
|
328769
|
-
|
328770
|
-
// src/commands/platform/integration-tools/hasura/resume.ts
|
328771
|
-
function hasuraResumeCommand() {
|
328772
|
-
return getResumeCommand({
|
328773
|
-
name: "hasura",
|
328774
|
-
type: "integration tool",
|
328775
|
-
alias: "ha",
|
328776
|
-
envKey: "SETTLEMINT_HASURA",
|
328777
|
-
resumeFunction: async (settlemint, id) => {
|
328778
|
-
return settlemint.integrationTool.resume(id);
|
328779
|
-
}
|
328780
|
-
});
|
328781
|
-
}
|
328782
|
-
|
328783
|
-
// src/commands/platform/integration-tools/resume.ts
|
328784
|
-
function integrationToolResumeCommand() {
|
328785
|
-
return new Command("integration-tool").alias("it").description("Resume an integration tool service in the SettleMint platform").addCommand(hasuraResumeCommand());
|
328786
|
-
}
|
328787
|
-
|
328788
|
-
// src/commands/platform/load-balancer/resume.ts
|
328789
|
-
function loadBalancerResumeCommand() {
|
328790
|
-
return getResumeCommand({
|
328791
|
-
name: "load-balancer",
|
328792
|
-
type: "load balancer",
|
328793
|
-
alias: "lb",
|
328794
|
-
envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
|
328795
|
-
resumeFunction: async (settlemint, id) => {
|
328796
|
-
return settlemint.loadBalancer.resume(id);
|
328797
|
-
}
|
328798
|
-
});
|
328799
|
-
}
|
328800
|
-
|
328801
|
-
// src/commands/platform/middleware/graph/resume.ts
|
328802
|
-
function graphMiddlewareResumeCommand() {
|
328803
|
-
return getResumeCommand({
|
328804
|
-
name: "graph",
|
328805
|
-
type: "middleware",
|
328806
|
-
alias: "gr",
|
328807
|
-
envKey: "SETTLEMINT_THEGRAPH",
|
328808
|
-
resumeFunction: async (settlemint, id) => {
|
328809
|
-
return settlemint.middleware.resume(id);
|
328810
|
-
}
|
328811
|
-
});
|
328812
|
-
}
|
328813
|
-
|
328814
|
-
// src/commands/platform/middleware/smart-contract-portal/resume.ts
|
328815
|
-
function smartContractPortalMiddlewareResumeCommand() {
|
328816
|
-
return getResumeCommand({
|
328817
|
-
name: "smart-contract-portal",
|
328818
|
-
type: "middleware",
|
328819
|
-
alias: "scp",
|
328820
|
-
envKey: "SETTLEMINT_PORTAL",
|
328821
|
-
resumeFunction: async (settlemint, id) => {
|
328822
|
-
return settlemint.middleware.resume(id);
|
328823
|
-
}
|
328824
|
-
});
|
328825
|
-
}
|
328826
|
-
|
328827
|
-
// src/commands/platform/middleware/resume.ts
|
328828
|
-
function middlewareResumeCommand() {
|
328829
|
-
return new Command("middleware").alias("mw").description("Resume a middleware service in the SettleMint platform").addCommand(graphMiddlewareResumeCommand()).addCommand(smartContractPortalMiddlewareResumeCommand());
|
328830
|
-
}
|
328831
|
-
|
328832
|
-
// src/commands/platform/private-key/resume.ts
|
328833
|
-
function privateKeyResumeCommand() {
|
328834
|
-
return getResumeCommand({
|
328835
|
-
name: "private-key",
|
328836
|
-
type: "private key",
|
328837
|
-
alias: "pk",
|
328838
|
-
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
328839
|
-
resumeFunction: async (settlemint, id) => {
|
328840
|
-
return settlemint.privateKey.resume(id);
|
328841
|
-
}
|
328842
|
-
});
|
328843
|
-
}
|
328844
|
-
|
328845
|
-
// src/commands/platform/storage/ipfs/resume.ts
|
328846
|
-
function ipfsStorageResumeCommand() {
|
328847
|
-
return getResumeCommand({
|
328848
|
-
name: "ipfs",
|
328849
|
-
type: "storage",
|
328850
|
-
alias: "ip",
|
328851
|
-
envKey: "SETTLEMINT_IPFS",
|
328852
|
-
resumeFunction: async (settlemint, id) => {
|
328853
|
-
return settlemint.storage.resume(id);
|
328854
|
-
}
|
328855
|
-
});
|
328856
|
-
}
|
328857
|
-
|
328858
|
-
// src/commands/platform/storage/minio/resume.ts
|
328859
|
-
function minioStorageResumeCommand() {
|
328860
|
-
return getResumeCommand({
|
328861
|
-
name: "minio",
|
328862
|
-
type: "storage",
|
328863
|
-
alias: "m",
|
328864
|
-
envKey: "SETTLEMINT_MINIO",
|
328865
|
-
resumeFunction: async (settlemint, id) => {
|
328866
|
-
return settlemint.storage.resume(id);
|
328867
|
-
}
|
328868
|
-
});
|
328869
|
-
}
|
328870
|
-
|
328871
|
-
// src/commands/platform/storage/resume.ts
|
328872
|
-
function storageResumeCommand() {
|
328873
|
-
return new Command("storage").alias("st").description("Resume a storage service in the SettleMint platform").addCommand(ipfsStorageResumeCommand()).addCommand(minioStorageResumeCommand());
|
328874
|
-
}
|
328875
|
-
|
328876
|
-
// src/commands/platform/resume.ts
|
328877
|
-
function resumeCommand() {
|
328878
|
-
const cmd2 = new Command("resume").description("Resume a resource in the SettleMint platform").addCommand(blockchainNodeResumeCommand()).addCommand(blockchainNetworkResumeCommand()).addCommand(customDeploymentResumeCommand()).addCommand(insightsResumeCommand()).addCommand(integrationToolResumeCommand()).addCommand(loadBalancerResumeCommand()).addCommand(middlewareResumeCommand()).addCommand(privateKeyResumeCommand()).addCommand(storageResumeCommand());
|
328879
|
-
return cmd2;
|
328880
|
-
}
|
328881
|
-
|
328882
328171
|
// src/commands/platform/custom-deployments/update.ts
|
328883
328172
|
function customDeploymentsUpdateCommand() {
|
328884
328173
|
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([
|
@@ -329269,7 +328558,7 @@ function servicesCommand() {
|
|
329269
328558
|
if (!applicationUniqueName) {
|
329270
328559
|
return nothingSelectedError("application");
|
329271
328560
|
}
|
329272
|
-
let effectiveTypes;
|
328561
|
+
let effectiveTypes = undefined;
|
329273
328562
|
if (options.type && options.type.length > 0) {
|
329274
328563
|
effectiveTypes = options.type;
|
329275
328564
|
} else if (typeOperands && typeOperands.length > 0) {
|
@@ -329327,7 +328616,7 @@ async function getServicesAndMapResults({
|
|
329327
328616
|
const application = await settlemint.application.read(applicationUniqueName);
|
329328
328617
|
const services = await servicesSpinner(settlemint, applicationUniqueName, types4);
|
329329
328618
|
const results = (types4 ?? SERVICE_TYPES).filter((serviceType) => !types4 || types4.includes(serviceType)).map((serviceType) => {
|
329330
|
-
const [_6, labels] = Object.entries(LABELS_MAP).find(([
|
328619
|
+
const [_6, labels] = Object.entries(LABELS_MAP).find(([key2, value4]) => value4.command === serviceType) ?? [
|
329331
328620
|
null,
|
329332
328621
|
{ plural: serviceType }
|
329333
328622
|
];
|
@@ -329454,7 +328743,7 @@ function listCommand() {
|
|
329454
328743
|
|
329455
328744
|
// src/commands/platform.ts
|
329456
328745
|
function platformCommand() {
|
329457
|
-
return new Command("platform").description("Manage SettleMint platform resources").addCommand(configCommand()).addCommand(createCommand3()).addCommand(deleteCommand()).addCommand(listCommand()).addCommand(
|
328746
|
+
return new Command("platform").description("Manage SettleMint platform resources").addCommand(configCommand()).addCommand(createCommand3()).addCommand(deleteCommand()).addCommand(listCommand()).addCommand(restartCommand()).addCommand(updateCommand());
|
329458
328747
|
}
|
329459
328748
|
|
329460
328749
|
// src/commands/smart-contract-set/create.ts
|
@@ -329504,7 +328793,7 @@ var import_which = __toESM(require_lib5(), 1);
|
|
329504
328793
|
async function executeFoundryCommand(command, args) {
|
329505
328794
|
try {
|
329506
328795
|
await import_which.default(command);
|
329507
|
-
} catch (
|
328796
|
+
} catch (error45) {
|
329508
328797
|
cancel2("Foundry is not installed. Instructions to install Foundry can be found here: https://book.getfoundry.sh/getting-started/installation");
|
329509
328798
|
}
|
329510
328799
|
return executeCommand(command, args);
|
@@ -329592,7 +328881,7 @@ function foundryBuildCommand() {
|
|
329592
328881
|
description: "Build the smart contracts with additional Forge options",
|
329593
328882
|
command: "scs foundry build --optimize --force"
|
329594
328883
|
}
|
329595
|
-
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
328884
|
+
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, cmd2) => {
|
329596
328885
|
intro("Building smart contracts using Foundry");
|
329597
328886
|
const forgeOptions = mapPassthroughOptions(options, { args: operands });
|
329598
328887
|
await executeFoundryCommand("forge", ["build", ...forgeOptions]);
|
@@ -329615,7 +328904,7 @@ function foundryFormatCommand() {
|
|
329615
328904
|
description: "Format the smart contracts with additional Forge options",
|
329616
328905
|
command: "scs foundry format --check"
|
329617
328906
|
}
|
329618
|
-
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
328907
|
+
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, cmd2) => {
|
329619
328908
|
intro("Formatting smart contracts using Foundry");
|
329620
328909
|
const forgeOptions = mapPassthroughOptions(options, { args: operands });
|
329621
328910
|
await executeFoundryCommand("forge", ["fmt", ...forgeOptions]);
|
@@ -329638,7 +328927,7 @@ function foundryNetworkCommand() {
|
|
329638
328927
|
description: "Start a development network using Foundry with a specific port",
|
329639
328928
|
command: "scs foundry network --port 3000"
|
329640
328929
|
}
|
329641
|
-
])).helpOption(false).option("-h, --help", "Get list of possible anvil options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
328930
|
+
])).helpOption(false).option("-h, --help", "Get list of possible anvil options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, cmd2) => {
|
329642
328931
|
const anvilOptions = mapPassthroughOptions(options, { args: operands });
|
329643
328932
|
await executeFoundryCommand("anvil", anvilOptions);
|
329644
328933
|
});
|
@@ -329659,7 +328948,7 @@ function foundryTestCommand() {
|
|
329659
328948
|
description: "Run a specific test function",
|
329660
328949
|
command: "scs foundry test --match-test testToken"
|
329661
328950
|
}
|
329662
|
-
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
328951
|
+
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, cmd2) => {
|
329663
328952
|
intro("Running smart contract tests using Foundry");
|
329664
328953
|
const forgeOptions = mapPassthroughOptions(options, { args: operands });
|
329665
328954
|
await executeFoundryCommand("forge", ["test", ...forgeOptions]);
|
@@ -329673,7 +328962,7 @@ var validateIfRequiredPackagesAreInstalled = async (packages, cwd2) => {
|
|
329673
328962
|
try {
|
329674
328963
|
const isInstalled = await isPackageInstalled(pkg, cwd2);
|
329675
328964
|
return { packageName: pkg, isInstalled };
|
329676
|
-
} catch (
|
328965
|
+
} catch (err) {
|
329677
328966
|
return { packageName: pkg, isInstalled: false };
|
329678
328967
|
}
|
329679
328968
|
}));
|
@@ -329698,7 +328987,7 @@ function hardhatBuildCommand() {
|
|
329698
328987
|
description: "Build the smart contracts using additional options to the Hardhat compile command",
|
329699
328988
|
command: "scs hardhat build --concurrency 2"
|
329700
328989
|
}
|
329701
|
-
])).helpOption(false).option("-h, --help", "Get list of possible hardhat compile options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
328990
|
+
])).helpOption(false).option("-h, --help", "Get list of possible hardhat compile options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, cmd2) => {
|
329702
328991
|
intro("Building smart contracts using Hardhat");
|
329703
328992
|
await validateIfRequiredPackagesAreInstalled(["hardhat"]);
|
329704
328993
|
const hardhatOptions = mapPassthroughOptions(options, { args: operands });
|
@@ -329769,7 +329058,7 @@ async function selectTargetNode({
|
|
329769
329058
|
settlemint
|
329770
329059
|
}) {
|
329771
329060
|
const nodeUniqueName = blockchainNodeUniqueName ?? (autoAccept ? env2.SETTLEMINT_BLOCKCHAIN_NODE : undefined);
|
329772
|
-
let node;
|
329061
|
+
let node = undefined;
|
329773
329062
|
if (!nodeUniqueName) {
|
329774
329063
|
if (!env2.SETTLEMINT_APPLICATION) {
|
329775
329064
|
return missingApplication();
|
@@ -329993,7 +329282,7 @@ function hardhatDeployRemoteCommand() {
|
|
329993
329282
|
} else {
|
329994
329283
|
note("Smart contract deployment was cancelled");
|
329995
329284
|
}
|
329996
|
-
} catch (
|
329285
|
+
} catch (error45) {
|
329997
329286
|
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.");
|
329998
329287
|
}
|
329999
329288
|
});
|
@@ -330023,7 +329312,7 @@ function hardhatNetworkCommand() {
|
|
330023
329312
|
description: "Start a development network using Hardhat with a specific port",
|
330024
329313
|
command: "scs hardhat network --port 3000"
|
330025
329314
|
}
|
330026
|
-
])).helpOption(false).option("-h, --help", "Get list of possible hardhat node options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
329315
|
+
])).helpOption(false).option("-h, --help", "Get list of possible hardhat node options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, cmd2) => {
|
330027
329316
|
intro("Starting development network using Hardhat");
|
330028
329317
|
await validateIfRequiredPackagesAreInstalled(["hardhat"]);
|
330029
329318
|
const hardhatOptions = mapPassthroughOptions(options, { args: operands });
|
@@ -330132,7 +329421,7 @@ function hardhatTestCommand() {
|
|
330132
329421
|
description: "Run a specific test file",
|
330133
329422
|
command: "scs hardhat test test/token.test.ts"
|
330134
329423
|
}
|
330135
|
-
])).helpOption(false).option("-h, --help", "Get list of possible hardhat test options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
329424
|
+
])).helpOption(false).option("-h, --help", "Get list of possible hardhat test options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, cmd2) => {
|
330136
329425
|
intro("Running smart contract tests using Hardhat");
|
330137
329426
|
await validateIfRequiredPackagesAreInstalled(["hardhat"]);
|
330138
329427
|
const hardhatOptions = mapPassthroughOptions(options, { args: operands });
|
@@ -330390,12 +329679,12 @@ async function getNodeName({
|
|
330390
329679
|
|
330391
329680
|
// src/commands/smart-contract-set/subgraph/build.ts
|
330392
329681
|
function subgraphBuildCommand() {
|
330393
|
-
return new Command("build").description("Build the subgraph").
|
329682
|
+
return new Command("build").description("Build the subgraph").usage(createExamples([
|
330394
329683
|
{
|
330395
329684
|
description: "Build the subgraph",
|
330396
329685
|
command: "scs subgraph build"
|
330397
329686
|
}
|
330398
|
-
])).action(async (
|
329687
|
+
])).action(async () => {
|
330399
329688
|
intro("Building subgraph");
|
330400
329689
|
await validateIfRequiredPackagesAreInstalled(["@graphprotocol/graph-cli"]);
|
330401
329690
|
await subgraphSetup({
|
@@ -330404,7 +329693,7 @@ function subgraphBuildCommand() {
|
|
330404
329693
|
const { command, args } = await getPackageManagerExecutable();
|
330405
329694
|
const subgraphYamlFile = await getSubgraphYamlFile();
|
330406
329695
|
await executeCommand(command, [...args, "graph", "codegen", subgraphYamlFile]);
|
330407
|
-
await executeCommand(command, [...args, "graph", "build",
|
329696
|
+
await executeCommand(command, [...args, "graph", "build", subgraphYamlFile]);
|
330408
329697
|
outro("Subgraph built successfully");
|
330409
329698
|
});
|
330410
329699
|
}
|
@@ -330800,4 +330089,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
330800
330089
|
// src/cli.ts
|
330801
330090
|
sdkCliCommand();
|
330802
330091
|
|
330803
|
-
//# debugId=
|
330092
|
+
//# debugId=53D78AB4747A93C864756E2164756E21
|