@settlemint/sdk-cli 2.4.0-pr7c98613c → 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 +142 -861
- package/dist/cli.js.map +55 -89
- 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
|
}
|
@@ -287954,9 +287952,8 @@ var workspaceList = (gqlClient) => {
|
|
287954
287952
|
const { workspaces } = await gqlClient.request(getWorkspacesAndApplications);
|
287955
287953
|
const allWorkspaces = workspaces.reduce((acc, workspace) => {
|
287956
287954
|
acc.push(workspace);
|
287957
|
-
if (workspace.childWorkspaces)
|
287955
|
+
if (workspace.childWorkspaces)
|
287958
287956
|
acc.push(...workspace.childWorkspaces);
|
287959
|
-
}
|
287960
287957
|
return acc;
|
287961
287958
|
}, []);
|
287962
287959
|
return allWorkspaces.sort((a3, b) => a3.name.localeCompare(b.name));
|
@@ -287983,9 +287980,8 @@ var workspaceDelete = (gqlClient) => {
|
|
287983
287980
|
var workspaceAddCredits = (gqlClient) => {
|
287984
287981
|
return async (workspaceId, amount) => {
|
287985
287982
|
const id = validate2(IdSchema2, workspaceId);
|
287986
|
-
if (amount <= 0)
|
287983
|
+
if (amount <= 0)
|
287987
287984
|
throw new Error("Credit amount must be a positive number");
|
287988
|
-
}
|
287989
287985
|
const { addCredits: result } = await gqlClient.request(addCredits, {
|
287990
287986
|
workspaceId: id,
|
287991
287987
|
amount
|
@@ -288107,9 +288103,8 @@ var applicationAccessTokenCreate = (gqlClient) => {
|
|
288107
288103
|
...otherArgs,
|
288108
288104
|
applicationId: application.id
|
288109
288105
|
});
|
288110
|
-
if (!applicationAccessToken.token)
|
288106
|
+
if (!applicationAccessToken.token)
|
288111
288107
|
throw new Error("Failed to create application access token");
|
288112
|
-
}
|
288113
288108
|
return applicationAccessToken.token;
|
288114
288109
|
};
|
288115
288110
|
};
|
@@ -288122,7 +288117,7 @@ function setClusterServiceDefaults(args) {
|
|
288122
288117
|
}
|
288123
288118
|
function setNetworkDefaults(args) {
|
288124
288119
|
const clusterServiceArgs = setClusterServiceDefaults(args);
|
288125
|
-
if (args.consensusAlgorithm === "BESU_QBFT")
|
288120
|
+
if (args.consensusAlgorithm === "BESU_QBFT")
|
288126
288121
|
return {
|
288127
288122
|
...clusterServiceArgs,
|
288128
288123
|
chainId: args.chainId ?? 46040,
|
@@ -288132,7 +288127,6 @@ function setNetworkDefaults(args) {
|
|
288132
288127
|
gasPrice: args.gasPrice ?? 0,
|
288133
288128
|
secondsPerBlock: args.secondsPerBlock ?? 2
|
288134
288129
|
};
|
288135
|
-
}
|
288136
288130
|
return clusterServiceArgs;
|
288137
288131
|
}
|
288138
288132
|
var BlockchainNetworkFragment = graphql(`
|
@@ -288295,20 +288289,6 @@ var restartBlockchainNetwork = graphql(`
|
|
288295
288289
|
}
|
288296
288290
|
}
|
288297
288291
|
`, [BlockchainNetworkFragment]);
|
288298
|
-
var pauseBlockchainNetwork = graphql(`
|
288299
|
-
mutation PauseBlockchainNetwork($uniqueName: String!) {
|
288300
|
-
pauseBlockchainNetworkByUniqueName(uniqueName: $uniqueName) {
|
288301
|
-
...BlockchainNetwork
|
288302
|
-
}
|
288303
|
-
}
|
288304
|
-
`, [BlockchainNetworkFragment]);
|
288305
|
-
var resumeBlockchainNetwork = graphql(`
|
288306
|
-
mutation ResumeBlockchainNetwork($uniqueName: String!) {
|
288307
|
-
resumeBlockchainNetworkByUniqueName(uniqueName: $uniqueName) {
|
288308
|
-
...BlockchainNetwork
|
288309
|
-
}
|
288310
|
-
}
|
288311
|
-
`, [BlockchainNetworkFragment]);
|
288312
288292
|
var blockchainNetworkList = (gqlClient) => {
|
288313
288293
|
return async (applicationUniqueName) => {
|
288314
288294
|
const { blockchainNetworksByUniqueName: { items } } = await gqlClient.request(getBlockchainNetworks, { applicationUniqueName });
|
@@ -288343,14 +288323,6 @@ var blockchainNetworkRestart = (gqlClient) => async (blockchainNetworkUniqueName
|
|
288343
288323
|
const { restartBlockchainNetworkByUniqueName: blockchainNetwork } = await gqlClient.request(restartBlockchainNetwork, { uniqueName: blockchainNetworkUniqueName });
|
288344
288324
|
return blockchainNetwork;
|
288345
288325
|
};
|
288346
|
-
var blockchainNetworkPause = (gqlClient) => async (blockchainNetworkUniqueName) => {
|
288347
|
-
const { pauseBlockchainNetworkByUniqueName: blockchainNetwork } = await gqlClient.request(pauseBlockchainNetwork, { uniqueName: blockchainNetworkUniqueName });
|
288348
|
-
return blockchainNetwork;
|
288349
|
-
};
|
288350
|
-
var blockchainNetworkResume = (gqlClient) => async (blockchainNetworkUniqueName) => {
|
288351
|
-
const { resumeBlockchainNetworkByUniqueName: blockchainNetwork } = await gqlClient.request(resumeBlockchainNetwork, { uniqueName: blockchainNetworkUniqueName });
|
288352
|
-
return blockchainNetwork;
|
288353
|
-
};
|
288354
288326
|
var BlockchainNodeFragment = graphql(`
|
288355
288327
|
fragment BlockchainNode on BlockchainNode {
|
288356
288328
|
__typename
|
@@ -288484,20 +288456,6 @@ var restartBlockchainNode = graphql(`
|
|
288484
288456
|
}
|
288485
288457
|
}
|
288486
288458
|
`, [BlockchainNodeFragment]);
|
288487
|
-
var pauseBlockchainNode = graphql(`
|
288488
|
-
mutation PauseBlockchainNode($uniqueName: String!) {
|
288489
|
-
pauseBlockchainNodeByUniqueName(uniqueName: $uniqueName) {
|
288490
|
-
...BlockchainNode
|
288491
|
-
}
|
288492
|
-
}
|
288493
|
-
`, [BlockchainNodeFragment]);
|
288494
|
-
var resumeBlockchainNode = graphql(`
|
288495
|
-
mutation ResumeBlockchainNode($uniqueName: String!) {
|
288496
|
-
resumeBlockchainNodeByUniqueName(uniqueName: $uniqueName) {
|
288497
|
-
...BlockchainNode
|
288498
|
-
}
|
288499
|
-
}
|
288500
|
-
`, [BlockchainNodeFragment]);
|
288501
288459
|
var blockchainNodeList = (gqlClient) => {
|
288502
288460
|
return async (applicationUniqueName) => {
|
288503
288461
|
const { blockchainNodesByUniqueName: { items } } = await gqlClient.request(getBlockchainNodes, { applicationUniqueName });
|
@@ -288526,14 +288484,6 @@ var blockchainNodeRestart = (gqlClient) => async (blockchainNodeUniqueName) => {
|
|
288526
288484
|
const { restartBlockchainNodeByUniqueName: blockchainNode } = await gqlClient.request(restartBlockchainNode, { uniqueName: blockchainNodeUniqueName });
|
288527
288485
|
return blockchainNode;
|
288528
288486
|
};
|
288529
|
-
var blockchainNodePause = (gqlClient) => async (blockchainNodeUniqueName) => {
|
288530
|
-
const { pauseBlockchainNodeByUniqueName: blockchainNode } = await gqlClient.request(pauseBlockchainNode, { uniqueName: blockchainNodeUniqueName });
|
288531
|
-
return blockchainNode;
|
288532
|
-
};
|
288533
|
-
var blockchainNodeResume = (gqlClient) => async (blockchainNodeUniqueName) => {
|
288534
|
-
const { resumeBlockchainNodeByUniqueName: blockchainNode } = await gqlClient.request(resumeBlockchainNode, { uniqueName: blockchainNodeUniqueName });
|
288535
|
-
return blockchainNode;
|
288536
|
-
};
|
288537
288487
|
var CustomDeploymentFragment = graphql(`
|
288538
288488
|
fragment CustomDeployment on CustomDeployment {
|
288539
288489
|
id
|
@@ -288616,20 +288566,6 @@ var restartCustomDeployment = graphql(`
|
|
288616
288566
|
}
|
288617
288567
|
}
|
288618
288568
|
`, [CustomDeploymentFragment]);
|
288619
|
-
var pauseCustomDeployment = graphql(`
|
288620
|
-
mutation PauseCustomDeployment($uniqueName: String!) {
|
288621
|
-
pauseCustomDeploymentByUniqueName(uniqueName: $uniqueName) {
|
288622
|
-
...CustomDeployment
|
288623
|
-
}
|
288624
|
-
}
|
288625
|
-
`, [CustomDeploymentFragment]);
|
288626
|
-
var resumeCustomDeployment = graphql(`
|
288627
|
-
mutation ResumeCustomDeployment($uniqueName: String!) {
|
288628
|
-
resumeCustomDeploymentByUniqueName(uniqueName: $uniqueName) {
|
288629
|
-
...CustomDeployment
|
288630
|
-
}
|
288631
|
-
}
|
288632
|
-
`, [CustomDeploymentFragment]);
|
288633
288569
|
var customdeploymentList = (gqlClient) => {
|
288634
288570
|
return async (applicationUniqueName) => {
|
288635
288571
|
const { customDeploymentsByUniqueName: { items } } = await gqlClient.request(getCustomDeployments, { applicationUniqueName });
|
@@ -288666,14 +288602,6 @@ var customDeploymentRestart = (gqlClient) => async (customDeploymentUniqueName)
|
|
288666
288602
|
const { restartCustomDeploymentByUniqueName: customDeployment } = await gqlClient.request(restartCustomDeployment, { uniqueName: customDeploymentUniqueName });
|
288667
288603
|
return customDeployment;
|
288668
288604
|
};
|
288669
|
-
var customDeploymentPause = (gqlClient) => async (customDeploymentUniqueName) => {
|
288670
|
-
const { pauseCustomDeploymentByUniqueName: customDeployment } = await gqlClient.request(pauseCustomDeployment, { uniqueName: customDeploymentUniqueName });
|
288671
|
-
return customDeployment;
|
288672
|
-
};
|
288673
|
-
var customDeploymentResume = (gqlClient) => async (customDeploymentUniqueName) => {
|
288674
|
-
const { resumeCustomDeploymentByUniqueName: customDeployment } = await gqlClient.request(resumeCustomDeployment, { uniqueName: customDeploymentUniqueName });
|
288675
|
-
return customDeployment;
|
288676
|
-
};
|
288677
288605
|
var getFoundryEnvConfig = graphql(`
|
288678
288606
|
query GetFoundryEnvConfig($blockchainNodeUniqueName: String!) {
|
288679
288607
|
foundryEnvConfigByUniqueName(blockchainNodeUniqueName: $blockchainNodeUniqueName)
|
@@ -288750,20 +288678,6 @@ var restartLoadBalancer = graphql(`
|
|
288750
288678
|
}
|
288751
288679
|
}
|
288752
288680
|
`, [LoadBalancerFragment]);
|
288753
|
-
var pauseLoadBalancer = graphql(`
|
288754
|
-
mutation PauseLoadBalancer($uniqueName: String!) {
|
288755
|
-
pauseLoadBalancerByUniqueName(uniqueName: $uniqueName) {
|
288756
|
-
...LoadBalancer
|
288757
|
-
}
|
288758
|
-
}
|
288759
|
-
`, [LoadBalancerFragment]);
|
288760
|
-
var resumeLoadBalancer = graphql(`
|
288761
|
-
mutation ResumeLoadBalancer($uniqueName: String!) {
|
288762
|
-
resumeLoadBalancerByUniqueName(uniqueName: $uniqueName) {
|
288763
|
-
...LoadBalancer
|
288764
|
-
}
|
288765
|
-
}
|
288766
|
-
`, [LoadBalancerFragment]);
|
288767
288681
|
var loadBalancerRead = (gqlClient) => {
|
288768
288682
|
return async (loadBalancerUniqueName) => {
|
288769
288683
|
const { loadBalancerByUniqueName: loadBalancer } = await gqlClient.request(getLoadBalancer, { uniqueName: loadBalancerUniqueName });
|
@@ -288797,14 +288711,6 @@ var loadBalancerRestart = (gqlClient) => async (loadBalancerUniqueName) => {
|
|
288797
288711
|
const { restartLoadBalancerByUniqueName: loadBalancer } = await gqlClient.request(restartLoadBalancer, { uniqueName: loadBalancerUniqueName });
|
288798
288712
|
return loadBalancer;
|
288799
288713
|
};
|
288800
|
-
var loadBalancerPause = (gqlClient) => async (loadBalancerUniqueName) => {
|
288801
|
-
const { pauseLoadBalancerByUniqueName: loadBalancer } = await gqlClient.request(pauseLoadBalancer, { uniqueName: loadBalancerUniqueName });
|
288802
|
-
return loadBalancer;
|
288803
|
-
};
|
288804
|
-
var loadBalancerResume = (gqlClient) => async (loadBalancerUniqueName) => {
|
288805
|
-
const { resumeLoadBalancerByUniqueName: loadBalancer } = await gqlClient.request(resumeLoadBalancer, { uniqueName: loadBalancerUniqueName });
|
288806
|
-
return loadBalancer;
|
288807
|
-
};
|
288808
288714
|
var InsightsFragment = graphql(`
|
288809
288715
|
fragment Insights on Insights {
|
288810
288716
|
__typename
|
@@ -288878,20 +288784,6 @@ var restartInsights = graphql(`
|
|
288878
288784
|
}
|
288879
288785
|
}
|
288880
288786
|
`, [InsightsFragment]);
|
288881
|
-
var pauseInsights = graphql(`
|
288882
|
-
mutation PauseInsights($uniqueName: String!) {
|
288883
|
-
pauseInsightsByUniqueName(uniqueName: $uniqueName) {
|
288884
|
-
...Insights
|
288885
|
-
}
|
288886
|
-
}
|
288887
|
-
`, [InsightsFragment]);
|
288888
|
-
var resumeInsights = graphql(`
|
288889
|
-
mutation ResumeInsights($uniqueName: String!) {
|
288890
|
-
resumeInsightsByUniqueName(uniqueName: $uniqueName) {
|
288891
|
-
...Insights
|
288892
|
-
}
|
288893
|
-
}
|
288894
|
-
`, [InsightsFragment]);
|
288895
288787
|
var insightsList = (gqlClient) => {
|
288896
288788
|
return async (applicationUniqueName) => {
|
288897
288789
|
const { insightsListByUniqueName: { items } } = await gqlClient.request(getInsights, { applicationUniqueName });
|
@@ -288925,14 +288817,6 @@ var insightsRestart = (gqlClient) => async (insightsUniqueName) => {
|
|
288925
288817
|
const { restartInsightsByUniqueName: insights } = await gqlClient.request(restartInsights, { uniqueName: insightsUniqueName });
|
288926
288818
|
return insights;
|
288927
288819
|
};
|
288928
|
-
var insightsPause = (gqlClient) => async (insightsUniqueName) => {
|
288929
|
-
const { pauseInsightsByUniqueName: insights } = await gqlClient.request(pauseInsights, { uniqueName: insightsUniqueName });
|
288930
|
-
return insights;
|
288931
|
-
};
|
288932
|
-
var insightsResume = (gqlClient) => async (insightsUniqueName) => {
|
288933
|
-
const { resumeInsightsByUniqueName: insights } = await gqlClient.request(resumeInsights, { uniqueName: insightsUniqueName });
|
288934
|
-
return insights;
|
288935
|
-
};
|
288936
288820
|
var IntegrationFragment = graphql(`
|
288937
288821
|
fragment Integration on Integration {
|
288938
288822
|
__typename
|
@@ -289002,20 +288886,6 @@ var restartIntegrationTool = graphql(`
|
|
289002
288886
|
}
|
289003
288887
|
}
|
289004
288888
|
`, [IntegrationFragment]);
|
289005
|
-
var pauseIntegrationTool = graphql(`
|
289006
|
-
mutation PauseIntegrationTool($uniqueName: String!) {
|
289007
|
-
pauseIntegrationByUniqueName(uniqueName: $uniqueName) {
|
289008
|
-
...Integration
|
289009
|
-
}
|
289010
|
-
}
|
289011
|
-
`, [IntegrationFragment]);
|
289012
|
-
var resumeIntegrationTool = graphql(`
|
289013
|
-
mutation ResumeIntegrationTool($uniqueName: String!) {
|
289014
|
-
resumeIntegrationByUniqueName(uniqueName: $uniqueName) {
|
289015
|
-
...Integration
|
289016
|
-
}
|
289017
|
-
}
|
289018
|
-
`, [IntegrationFragment]);
|
289019
288889
|
var integrationToolList = (gqlClient) => {
|
289020
288890
|
return async (applicationUniqueName) => {
|
289021
288891
|
const { integrationsByUniqueName: { items } } = await gqlClient.request(getIntegrations, { applicationUniqueName });
|
@@ -289043,14 +288913,6 @@ var integrationToolRestart = (gqlClient) => async (integrationUniqueName) => {
|
|
289043
288913
|
const { restartIntegrationByUniqueName: integration } = await gqlClient.request(restartIntegrationTool, { uniqueName: integrationUniqueName });
|
289044
288914
|
return integration;
|
289045
288915
|
};
|
289046
|
-
var integrationToolPause = (gqlClient) => async (integrationUniqueName) => {
|
289047
|
-
const { pauseIntegrationByUniqueName: integration } = await gqlClient.request(pauseIntegrationTool, { uniqueName: integrationUniqueName });
|
289048
|
-
return integration;
|
289049
|
-
};
|
289050
|
-
var integrationToolResume = (gqlClient) => async (integrationUniqueName) => {
|
289051
|
-
const { resumeIntegrationByUniqueName: integration } = await gqlClient.request(resumeIntegrationTool, { uniqueName: integrationUniqueName });
|
289052
|
-
return integration;
|
289053
|
-
};
|
289054
288916
|
var StorageFragment = graphql(`
|
289055
288917
|
fragment Storage on Storage {
|
289056
288918
|
__typename
|
@@ -289120,20 +288982,6 @@ var restartStorage = graphql(`
|
|
289120
288982
|
}
|
289121
288983
|
}
|
289122
288984
|
`, [StorageFragment]);
|
289123
|
-
var pauseStorage = graphql(`
|
289124
|
-
mutation PauseStorage($uniqueName: String!) {
|
289125
|
-
pauseStorageByUniqueName(uniqueName: $uniqueName) {
|
289126
|
-
...Storage
|
289127
|
-
}
|
289128
|
-
}
|
289129
|
-
`, [StorageFragment]);
|
289130
|
-
var resumeStorage = graphql(`
|
289131
|
-
mutation ResumeStorage($uniqueName: String!) {
|
289132
|
-
resumeStorageByUniqueName(uniqueName: $uniqueName) {
|
289133
|
-
...Storage
|
289134
|
-
}
|
289135
|
-
}
|
289136
|
-
`, [StorageFragment]);
|
289137
288985
|
var storageList = (gqlClient) => {
|
289138
288986
|
return async (applicationUniqueName) => {
|
289139
288987
|
const { storagesByUniqueName: { items } } = await gqlClient.request(getStorages, { applicationUniqueName });
|
@@ -289161,14 +289009,6 @@ var storageRestart = (gqlClient) => async (storageUniqueName) => {
|
|
289161
289009
|
const { restartStorageByUniqueName: storage } = await gqlClient.request(restartStorage, { uniqueName: storageUniqueName });
|
289162
289010
|
return storage;
|
289163
289011
|
};
|
289164
|
-
var storagePause = (gqlClient) => async (storageUniqueName) => {
|
289165
|
-
const { pauseStorageByUniqueName: storage } = await gqlClient.request(pauseStorage, { uniqueName: storageUniqueName });
|
289166
|
-
return storage;
|
289167
|
-
};
|
289168
|
-
var storageResume = (gqlClient) => async (storageUniqueName) => {
|
289169
|
-
const { resumeStorageByUniqueName: storage } = await gqlClient.request(resumeStorage, { uniqueName: storageUniqueName });
|
289170
|
-
return storage;
|
289171
|
-
};
|
289172
289012
|
var MiddlewareFragment = graphql(`
|
289173
289013
|
fragment Middleware on Middleware {
|
289174
289014
|
__typename
|
@@ -289269,20 +289109,6 @@ var restartMiddleware = graphql(`
|
|
289269
289109
|
}
|
289270
289110
|
}
|
289271
289111
|
`, [MiddlewareFragment]);
|
289272
|
-
var pauseMiddleware = graphql(`
|
289273
|
-
mutation PauseMiddleware($uniqueName: String!) {
|
289274
|
-
pauseMiddlewareByUniqueName(uniqueName: $uniqueName) {
|
289275
|
-
...Middleware
|
289276
|
-
}
|
289277
|
-
}
|
289278
|
-
`, [MiddlewareFragment]);
|
289279
|
-
var resumeMiddleware = graphql(`
|
289280
|
-
mutation ResumeMiddleware($uniqueName: String!) {
|
289281
|
-
resumeMiddlewareByUniqueName(uniqueName: $uniqueName) {
|
289282
|
-
...Middleware
|
289283
|
-
}
|
289284
|
-
}
|
289285
|
-
`, [MiddlewareFragment]);
|
289286
289112
|
var middlewareList = (gqlClient) => {
|
289287
289113
|
return async (applicationUniqueName) => {
|
289288
289114
|
const { middlewaresByUniqueName: { items } } = await gqlClient.request(getMiddlewares, { applicationUniqueName });
|
@@ -289327,14 +289153,6 @@ var middlewareRestart = (gqlClient) => async (middlewareUniqueName) => {
|
|
289327
289153
|
const { restartMiddlewareByUniqueName: middleware } = await gqlClient.request(restartMiddleware, { uniqueName: middlewareUniqueName });
|
289328
289154
|
return middleware;
|
289329
289155
|
};
|
289330
|
-
var middlewarePause = (gqlClient) => async (middlewareUniqueName) => {
|
289331
|
-
const { pauseMiddlewareByUniqueName: middleware } = await gqlClient.request(pauseMiddleware, { uniqueName: middlewareUniqueName });
|
289332
|
-
return middleware;
|
289333
|
-
};
|
289334
|
-
var middlewareResume = (gqlClient) => async (middlewareUniqueName) => {
|
289335
|
-
const { resumeMiddlewareByUniqueName: middleware } = await gqlClient.request(resumeMiddleware, { uniqueName: middlewareUniqueName });
|
289336
|
-
return middleware;
|
289337
|
-
};
|
289338
289156
|
var getPlatformConfigQuery = graphql(`
|
289339
289157
|
query platformConfig {
|
289340
289158
|
config {
|
@@ -289467,20 +289285,6 @@ var restartPrivateKey = graphql(`
|
|
289467
289285
|
}
|
289468
289286
|
}
|
289469
289287
|
`, [PrivateKeyFragment]);
|
289470
|
-
var pausePrivateKey = graphql(`
|
289471
|
-
mutation PausePrivateKey($uniqueName: String!) {
|
289472
|
-
pausePrivateKeyByUniqueName(uniqueName: $uniqueName) {
|
289473
|
-
...PrivateKey
|
289474
|
-
}
|
289475
|
-
}
|
289476
|
-
`, [PrivateKeyFragment]);
|
289477
|
-
var resumePrivateKey = graphql(`
|
289478
|
-
mutation ResumePrivateKey($uniqueName: String!) {
|
289479
|
-
resumePrivateKeyByUniqueName(uniqueName: $uniqueName) {
|
289480
|
-
...PrivateKey
|
289481
|
-
}
|
289482
|
-
}
|
289483
|
-
`, [PrivateKeyFragment]);
|
289484
289288
|
var privateKeyList = (gqlClient) => {
|
289485
289289
|
return async (applicationUniqueName) => {
|
289486
289290
|
const { privateKeysByUniqueName: { items } } = await gqlClient.request(getPrivateKeys, { applicationUniqueName });
|
@@ -289519,14 +289323,6 @@ var privateKeyRestart = (gqlClient) => async (privateKeyUniqueName) => {
|
|
289519
289323
|
const { restartPrivateKeyByUniqueName: privateKey } = await gqlClient.request(restartPrivateKey, { uniqueName: privateKeyUniqueName });
|
289520
289324
|
return privateKey;
|
289521
289325
|
};
|
289522
|
-
var privateKeyPause = (gqlClient) => async (privateKeyUniqueName) => {
|
289523
|
-
const { pausePrivateKeyByUniqueName: privateKey } = await gqlClient.request(pausePrivateKey, { uniqueName: privateKeyUniqueName });
|
289524
|
-
return privateKey;
|
289525
|
-
};
|
289526
|
-
var privateKeyResume = (gqlClient) => async (privateKeyUniqueName) => {
|
289527
|
-
const { resumePrivateKeyByUniqueName: privateKey } = await gqlClient.request(resumePrivateKey, { uniqueName: privateKeyUniqueName });
|
289528
|
-
return privateKey;
|
289529
|
-
};
|
289530
289326
|
var ClientOptionsSchema = exports_external.object({
|
289531
289327
|
accessToken: AccessTokenSchema2,
|
289532
289328
|
instance: UrlSchema2
|
@@ -289547,30 +289343,26 @@ async function getPincodeVerificationChallenges({ userWalletAddress, accessToken
|
|
289547
289343
|
}
|
289548
289344
|
});
|
289549
289345
|
if (!response.ok) {
|
289550
|
-
if (response.status === 404)
|
289346
|
+
if (response.status === 404)
|
289551
289347
|
throw new Error(`No user wallet found with address '${userWalletAddress}' for node '${nodeId}'`);
|
289552
|
-
}
|
289553
289348
|
throw new Error("Failed to get verification challenge");
|
289554
289349
|
}
|
289555
289350
|
const verificationChallenges = await response.json();
|
289556
289351
|
return verificationChallenges;
|
289557
289352
|
}
|
289558
289353
|
function getPincodeVerificationChallengeResponse({ verificationChallenge, pincode }) {
|
289559
|
-
if (!verificationChallenge?.challenge?.secret || !verificationChallenge?.challenge?.salt)
|
289354
|
+
if (!verificationChallenge?.challenge?.secret || !verificationChallenge?.challenge?.salt)
|
289560
289355
|
throw new Error("Could not authenticate pin code, invalid challenge format");
|
289561
|
-
}
|
289562
289356
|
const { secret, salt } = verificationChallenge.challenge;
|
289563
289357
|
return generateResponse(pincode, salt, secret);
|
289564
289358
|
}
|
289565
289359
|
function createSettleMintClient(options) {
|
289566
289360
|
ensureServer();
|
289567
|
-
if (options.instance === STANDALONE_INSTANCE2 || options.instance === LOCAL_INSTANCE2)
|
289568
|
-
if (options.anonymous)
|
289361
|
+
if (options.instance === STANDALONE_INSTANCE2 || options.instance === LOCAL_INSTANCE2)
|
289362
|
+
if (options.anonymous)
|
289569
289363
|
options.instance = "https://console.settlemint.com";
|
289570
|
-
|
289364
|
+
else
|
289571
289365
|
throw new Error("Standalone and local instances cannot connect to the SettleMint platform");
|
289572
|
-
}
|
289573
|
-
}
|
289574
289366
|
const validatedOptions = options.anonymous ? validate2(exports_external.object({
|
289575
289367
|
...ClientOptionsSchema.shape,
|
289576
289368
|
accessToken: exports_external.literal("")
|
@@ -289610,75 +289402,57 @@ function createSettleMintClient(options) {
|
|
289610
289402
|
read: blockchainNetworkRead(gqlClient),
|
289611
289403
|
create: blockchainNetworkCreate(gqlClient),
|
289612
289404
|
delete: blockchainNetworkDelete(gqlClient),
|
289613
|
-
restart: blockchainNetworkRestart(gqlClient)
|
289614
|
-
pause: blockchainNetworkPause(gqlClient),
|
289615
|
-
resume: blockchainNetworkResume(gqlClient)
|
289405
|
+
restart: blockchainNetworkRestart(gqlClient)
|
289616
289406
|
},
|
289617
289407
|
blockchainNode: {
|
289618
289408
|
list: blockchainNodeList(gqlClient),
|
289619
289409
|
read: blockchainNodeRead(gqlClient),
|
289620
289410
|
create: blockchainNodeCreate(gqlClient),
|
289621
|
-
restart: blockchainNodeRestart(gqlClient)
|
289622
|
-
pause: blockchainNodePause(gqlClient),
|
289623
|
-
resume: blockchainNodeResume(gqlClient)
|
289411
|
+
restart: blockchainNodeRestart(gqlClient)
|
289624
289412
|
},
|
289625
289413
|
loadBalancer: {
|
289626
289414
|
list: loadBalancerList(gqlClient),
|
289627
289415
|
read: loadBalancerRead(gqlClient),
|
289628
289416
|
create: loadBalancerCreate(gqlClient),
|
289629
|
-
restart: loadBalancerRestart(gqlClient)
|
289630
|
-
pause: loadBalancerPause(gqlClient),
|
289631
|
-
resume: loadBalancerResume(gqlClient)
|
289417
|
+
restart: loadBalancerRestart(gqlClient)
|
289632
289418
|
},
|
289633
289419
|
middleware: {
|
289634
289420
|
list: middlewareList(gqlClient),
|
289635
289421
|
read: middlewareRead(gqlClient),
|
289636
289422
|
graphSubgraphs: graphMiddlewareSubgraphs(gqlClient),
|
289637
289423
|
create: middlewareCreate(gqlClient),
|
289638
|
-
restart: middlewareRestart(gqlClient)
|
289639
|
-
pause: middlewarePause(gqlClient),
|
289640
|
-
resume: middlewareResume(gqlClient)
|
289424
|
+
restart: middlewareRestart(gqlClient)
|
289641
289425
|
},
|
289642
289426
|
integrationTool: {
|
289643
289427
|
list: integrationToolList(gqlClient),
|
289644
289428
|
read: integrationToolRead(gqlClient),
|
289645
289429
|
create: integrationToolCreate(gqlClient),
|
289646
|
-
restart: integrationToolRestart(gqlClient)
|
289647
|
-
pause: integrationToolPause(gqlClient),
|
289648
|
-
resume: integrationToolResume(gqlClient)
|
289430
|
+
restart: integrationToolRestart(gqlClient)
|
289649
289431
|
},
|
289650
289432
|
storage: {
|
289651
289433
|
list: storageList(gqlClient),
|
289652
289434
|
read: storageRead(gqlClient),
|
289653
289435
|
create: storageCreate(gqlClient),
|
289654
|
-
restart: storageRestart(gqlClient)
|
289655
|
-
pause: storagePause(gqlClient),
|
289656
|
-
resume: storageResume(gqlClient)
|
289436
|
+
restart: storageRestart(gqlClient)
|
289657
289437
|
},
|
289658
289438
|
privateKey: {
|
289659
289439
|
list: privateKeyList(gqlClient),
|
289660
289440
|
read: privatekeyRead(gqlClient),
|
289661
289441
|
create: privateKeyCreate(gqlClient),
|
289662
|
-
restart: privateKeyRestart(gqlClient)
|
289663
|
-
pause: privateKeyPause(gqlClient),
|
289664
|
-
resume: privateKeyResume(gqlClient)
|
289442
|
+
restart: privateKeyRestart(gqlClient)
|
289665
289443
|
},
|
289666
289444
|
insights: {
|
289667
289445
|
list: insightsList(gqlClient),
|
289668
289446
|
read: insightsRead(gqlClient),
|
289669
289447
|
create: insightsCreate(gqlClient),
|
289670
|
-
restart: insightsRestart(gqlClient)
|
289671
|
-
pause: insightsPause(gqlClient),
|
289672
|
-
resume: insightsResume(gqlClient)
|
289448
|
+
restart: insightsRestart(gqlClient)
|
289673
289449
|
},
|
289674
289450
|
customDeployment: {
|
289675
289451
|
list: customdeploymentList(gqlClient),
|
289676
289452
|
read: customdeploymentRead(gqlClient),
|
289677
289453
|
create: customdeploymentCreate(gqlClient),
|
289678
289454
|
update: customdeploymentUpdate(gqlClient),
|
289679
|
-
restart: customDeploymentRestart(gqlClient)
|
289680
|
-
pause: customDeploymentPause(gqlClient),
|
289681
|
-
resume: customDeploymentResume(gqlClient)
|
289455
|
+
restart: customDeploymentRestart(gqlClient)
|
289682
289456
|
},
|
289683
289457
|
foundry: { env: getEnv(gqlClient) },
|
289684
289458
|
applicationAccessToken: { create: applicationAccessTokenCreate(gqlClient) },
|
@@ -296095,6 +295869,17 @@ async function exists3(path$1) {
|
|
296095
295869
|
return false;
|
296096
295870
|
}
|
296097
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
|
+
}
|
296098
295883
|
var require_balanced_match4 = __commonJS4({ "../../node_modules/balanced-match/index.js"(exports, module) {
|
296099
295884
|
module.exports = balanced$1;
|
296100
295885
|
function balanced$1(a3, b, str) {
|
@@ -301573,17 +301358,6 @@ var glob3 = Object.assign(glob_3, {
|
|
301573
301358
|
unescape: unescape4
|
301574
301359
|
});
|
301575
301360
|
glob3.glob = glob3;
|
301576
|
-
function tryParseJson3(value2, defaultValue = null) {
|
301577
|
-
try {
|
301578
|
-
const parsed = JSON.parse(value2);
|
301579
|
-
if (parsed === undefined || parsed === null) {
|
301580
|
-
return defaultValue;
|
301581
|
-
}
|
301582
|
-
return parsed;
|
301583
|
-
} catch (_err) {
|
301584
|
-
return defaultValue;
|
301585
|
-
}
|
301586
|
-
}
|
301587
301361
|
async function findMonoRepoRoot2(startDir) {
|
301588
301362
|
const lockFilePath = await findUp([
|
301589
301363
|
"package-lock.json",
|
@@ -301629,7 +301403,7 @@ function tryParseJson4(value2, defaultValue = null) {
|
|
301629
301403
|
return defaultValue;
|
301630
301404
|
}
|
301631
301405
|
return parsed;
|
301632
|
-
} catch (
|
301406
|
+
} catch (err) {
|
301633
301407
|
return defaultValue;
|
301634
301408
|
}
|
301635
301409
|
}
|
@@ -301657,7 +301431,7 @@ async function readConfig() {
|
|
301657
301431
|
try {
|
301658
301432
|
const content = await readFile4(CONFIG_FILE, "utf-8");
|
301659
301433
|
return tryParseJson4(content, { instances: {} });
|
301660
|
-
} catch (
|
301434
|
+
} catch (error41) {
|
301661
301435
|
return { instances: {} };
|
301662
301436
|
}
|
301663
301437
|
}
|
@@ -301827,7 +301601,7 @@ var getApplicationOrPersonalAccessToken = async ({
|
|
301827
301601
|
}) => {
|
301828
301602
|
const applicationAccessToken = env2.SETTLEMINT_ACCESS_TOKEN;
|
301829
301603
|
const instanceUrl = sanitizeInstanceUrl(instance);
|
301830
|
-
const personalAccessToken = (await getInstanceCredentials(instanceUrl
|
301604
|
+
const personalAccessToken = (await getInstanceCredentials(instanceUrl))?.personalAccessToken;
|
301831
301605
|
const preferredToken = prefer === "application" ? applicationAccessToken : personalAccessToken;
|
301832
301606
|
const fallbackToken = prefer === "application" ? personalAccessToken : applicationAccessToken;
|
301833
301607
|
const allowFallback = prefer === "application";
|
@@ -303242,7 +303016,7 @@ var inputTheme = {
|
|
303242
303016
|
validationFailureMode: "keep"
|
303243
303017
|
};
|
303244
303018
|
var esm_default2 = createPrompt((config4, done) => {
|
303245
|
-
const { required: required4, validate: validate3 = () => true
|
303019
|
+
const { required: required4, validate: validate3 = () => true } = config4;
|
303246
303020
|
const theme = makeTheme(inputTheme, config4.theme);
|
303247
303021
|
const [status, setStatus] = useState("idle");
|
303248
303022
|
const [defaultValue = "", setDefaultValue] = useState(config4.default);
|
@@ -303282,12 +303056,6 @@ var esm_default2 = createPrompt((config4, done) => {
|
|
303282
303056
|
setError(undefined);
|
303283
303057
|
}
|
303284
303058
|
});
|
303285
|
-
useEffect((rl) => {
|
303286
|
-
if (prefill === "editable" && defaultValue) {
|
303287
|
-
rl.write(defaultValue);
|
303288
|
-
setValue(defaultValue);
|
303289
|
-
}
|
303290
|
-
}, []);
|
303291
303059
|
const message = theme.style.message(config4.message, status);
|
303292
303060
|
let formattedValue = value4;
|
303293
303061
|
if (typeof config4.transformer === "function") {
|
@@ -305386,9 +305154,9 @@ function watchContractEvent(client, parameters) {
|
|
305386
305154
|
return poll_;
|
305387
305155
|
if (typeof fromBlock === "bigint")
|
305388
305156
|
return true;
|
305389
|
-
if (client.transport.type === "webSocket"
|
305157
|
+
if (client.transport.type === "webSocket")
|
305390
305158
|
return false;
|
305391
|
-
if (client.transport.type === "fallback" &&
|
305159
|
+
if (client.transport.type === "fallback" && client.transport.transports[0].config.type === "webSocket")
|
305392
305160
|
return false;
|
305393
305161
|
return true;
|
305394
305162
|
})();
|
@@ -305489,7 +305257,7 @@ function watchContractEvent(client, parameters) {
|
|
305489
305257
|
try {
|
305490
305258
|
const transport = (() => {
|
305491
305259
|
if (client.transport.type === "fallback") {
|
305492
|
-
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket"
|
305260
|
+
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket");
|
305493
305261
|
if (!transport2)
|
305494
305262
|
return client.transport;
|
305495
305263
|
return transport2.value;
|
@@ -307377,10 +307145,9 @@ async function simulateBlocks(client, parameters) {
|
|
307377
307145
|
const calls = block2.calls.map((call_) => {
|
307378
307146
|
const call2 = call_;
|
307379
307147
|
const account = call2.account ? parseAccount(call2.account) : undefined;
|
307380
|
-
const data = call2.abi ? encodeFunctionData(call2) : call2.data;
|
307381
307148
|
const request2 = {
|
307382
307149
|
...call2,
|
307383
|
-
data: call2.
|
307150
|
+
data: call2.abi ? encodeFunctionData(call2) : call2.data,
|
307384
307151
|
from: call2.from ?? account?.address
|
307385
307152
|
};
|
307386
307153
|
assertRequest(request2);
|
@@ -308650,9 +308417,9 @@ function watchBlockNumber(client, { emitOnBegin = false, emitMissed = false, onB
|
|
308650
308417
|
const enablePolling = (() => {
|
308651
308418
|
if (typeof poll_ !== "undefined")
|
308652
308419
|
return poll_;
|
308653
|
-
if (client.transport.type === "webSocket"
|
308420
|
+
if (client.transport.type === "webSocket")
|
308654
308421
|
return false;
|
308655
|
-
if (client.transport.type === "fallback" &&
|
308422
|
+
if (client.transport.type === "fallback" && client.transport.transports[0].config.type === "webSocket")
|
308656
308423
|
return false;
|
308657
308424
|
return true;
|
308658
308425
|
})();
|
@@ -308704,7 +308471,7 @@ function watchBlockNumber(client, { emitOnBegin = false, emitMissed = false, onB
|
|
308704
308471
|
try {
|
308705
308472
|
const transport = (() => {
|
308706
308473
|
if (client.transport.type === "fallback") {
|
308707
|
-
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket"
|
308474
|
+
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket");
|
308708
308475
|
if (!transport2)
|
308709
308476
|
return client.transport;
|
308710
308477
|
return transport2.value;
|
@@ -308857,9 +308624,9 @@ function watchBlocks(client, { blockTag = "latest", emitMissed = false, emitOnBe
|
|
308857
308624
|
const enablePolling = (() => {
|
308858
308625
|
if (typeof poll_ !== "undefined")
|
308859
308626
|
return poll_;
|
308860
|
-
if (client.transport.type === "webSocket"
|
308627
|
+
if (client.transport.type === "webSocket")
|
308861
308628
|
return false;
|
308862
|
-
if (client.transport.type === "fallback" &&
|
308629
|
+
if (client.transport.type === "fallback" && client.transport.transports[0].config.type === "webSocket")
|
308863
308630
|
return false;
|
308864
308631
|
return true;
|
308865
308632
|
})();
|
@@ -308928,7 +308695,7 @@ function watchBlocks(client, { blockTag = "latest", emitMissed = false, emitOnBe
|
|
308928
308695
|
}
|
308929
308696
|
const transport = (() => {
|
308930
308697
|
if (client.transport.type === "fallback") {
|
308931
|
-
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket"
|
308698
|
+
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket");
|
308932
308699
|
if (!transport2)
|
308933
308700
|
return client.transport;
|
308934
308701
|
return transport2.value;
|
@@ -308975,9 +308742,9 @@ function watchEvent(client, { address, args, batch = true, event, events, fromBl
|
|
308975
308742
|
return poll_;
|
308976
308743
|
if (typeof fromBlock === "bigint")
|
308977
308744
|
return true;
|
308978
|
-
if (client.transport.type === "webSocket"
|
308745
|
+
if (client.transport.type === "webSocket")
|
308979
308746
|
return false;
|
308980
|
-
if (client.transport.type === "fallback" &&
|
308747
|
+
if (client.transport.type === "fallback" && client.transport.transports[0].config.type === "webSocket")
|
308981
308748
|
return false;
|
308982
308749
|
return true;
|
308983
308750
|
})();
|
@@ -309064,7 +308831,7 @@ function watchEvent(client, { address, args, batch = true, event, events, fromBl
|
|
309064
308831
|
try {
|
309065
308832
|
const transport = (() => {
|
309066
308833
|
if (client.transport.type === "fallback") {
|
309067
|
-
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket"
|
308834
|
+
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket");
|
309068
308835
|
if (!transport2)
|
309069
308836
|
return client.transport;
|
309070
308837
|
return transport2.value;
|
@@ -309131,7 +308898,7 @@ function watchEvent(client, { address, args, batch = true, event, events, fromBl
|
|
309131
308898
|
}
|
309132
308899
|
// ../../node_modules/viem/_esm/actions/public/watchPendingTransactions.js
|
309133
308900
|
function watchPendingTransactions(client, { batch = true, onError, onTransactions, poll: poll_, pollingInterval = client.pollingInterval }) {
|
309134
|
-
const enablePolling = typeof poll_ !== "undefined" ? poll_ : client.transport.type !== "webSocket"
|
308901
|
+
const enablePolling = typeof poll_ !== "undefined" ? poll_ : client.transport.type !== "webSocket";
|
309135
308902
|
const pollPendingTransactions = () => {
|
309136
308903
|
const observerId = stringify3([
|
309137
308904
|
"watchPendingTransactions",
|
@@ -320789,7 +320556,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
320789
320556
|
try {
|
320790
320557
|
validate2(exports_external.string(), value4);
|
320791
320558
|
return true;
|
320792
|
-
} catch (
|
320559
|
+
} catch (error45) {
|
320793
320560
|
return "Invalid token name";
|
320794
320561
|
}
|
320795
320562
|
}
|
@@ -320842,7 +320609,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
320842
320609
|
try {
|
320843
320610
|
validate2(ApplicationAccessTokenSchema2, aat);
|
320844
320611
|
return aat;
|
320845
|
-
} catch (
|
320612
|
+
} catch (error45) {}
|
320846
320613
|
}
|
320847
320614
|
return esm_default5({
|
320848
320615
|
message: "What is the application access token for your application in SettleMint? (format: sm_aat_...)",
|
@@ -320850,7 +320617,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
320850
320617
|
try {
|
320851
320618
|
validate2(ApplicationAccessTokenSchema2, value4);
|
320852
320619
|
return true;
|
320853
|
-
} catch (
|
320620
|
+
} catch (error45) {
|
320854
320621
|
return "Invalid application access token, it should start with sm_aat_...";
|
320855
320622
|
}
|
320856
320623
|
}
|
@@ -321255,7 +321022,7 @@ async function instancePrompt({
|
|
321255
321022
|
try {
|
321256
321023
|
validate2(UrlSchema2, value4);
|
321257
321024
|
return true;
|
321258
|
-
} catch (
|
321025
|
+
} catch (error45) {
|
321259
321026
|
return "Invalid URL";
|
321260
321027
|
}
|
321261
321028
|
},
|
@@ -321339,7 +321106,7 @@ async function serviceUrlPrompt({
|
|
321339
321106
|
try {
|
321340
321107
|
validate2(UrlSchema2, value4);
|
321341
321108
|
return true;
|
321342
|
-
} catch (
|
321109
|
+
} catch (error45) {
|
321343
321110
|
return "Invalid URL";
|
321344
321111
|
}
|
321345
321112
|
},
|
@@ -322283,7 +322050,7 @@ async function projectNamePrompt(env2, argument) {
|
|
322283
322050
|
try {
|
322284
322051
|
validate2(exports_external.string(), value4);
|
322285
322052
|
return true;
|
322286
|
-
} catch (
|
322053
|
+
} catch (error45) {
|
322287
322054
|
return "Invalid projectname";
|
322288
322055
|
}
|
322289
322056
|
}
|
@@ -326271,7 +326038,7 @@ async function personalAccessTokenPrompt(env2, instance, accept) {
|
|
326271
326038
|
try {
|
326272
326039
|
validate2(PersonalAccessTokenSchema2, value4);
|
326273
326040
|
return true;
|
326274
|
-
} catch (
|
326041
|
+
} catch (error45) {
|
326275
326042
|
return "Invalid personal access token, it should start with sm_pat_...";
|
326276
326043
|
}
|
326277
326044
|
}
|
@@ -326352,7 +326119,7 @@ function loginCommand() {
|
|
326352
326119
|
});
|
326353
326120
|
try {
|
326354
326121
|
await loginSpinner(client);
|
326355
|
-
} catch (
|
326122
|
+
} catch (error45) {
|
326356
326123
|
cancel2(`Invalid personal access token for instance ${selectedInstance}`);
|
326357
326124
|
}
|
326358
326125
|
await storeCredentials(personalAccessToken, selectedInstance);
|
@@ -326502,17 +326269,13 @@ function addClusterServiceArgs(cmd2) {
|
|
326502
326269
|
// src/commands/platform/utils/wait-for-completion.ts
|
326503
326270
|
class TimeoutError2 extends Error {
|
326504
326271
|
}
|
326505
|
-
|
326506
|
-
class DeploymentFailedError extends Error {
|
326507
|
-
}
|
326508
326272
|
async function waitForCompletion({
|
326509
326273
|
settlemint,
|
326510
326274
|
type: type4,
|
326511
326275
|
uniqueName,
|
326512
326276
|
action,
|
326513
326277
|
maxTimeout = 10 * 60 * 1000,
|
326514
|
-
restartIfTimeout = false
|
326515
|
-
restartOnError = false
|
326278
|
+
restartIfTimeout = false
|
326516
326279
|
}) {
|
326517
326280
|
const serviceType = SETTLEMINT_CLIENT_MAP[type4];
|
326518
326281
|
if (serviceType === "workspace" || serviceType === "application" || serviceType === "foundry" || serviceType === "applicationAccessToken" || serviceType === "platform" || serviceType === "wallet") {
|
@@ -326522,7 +326285,6 @@ async function waitForCompletion({
|
|
326522
326285
|
if (!service || !("read" in service)) {
|
326523
326286
|
throw new Error(`Service ${serviceType} does not support status checking`);
|
326524
326287
|
}
|
326525
|
-
let hasRestarted = false;
|
326526
326288
|
function showSpinner() {
|
326527
326289
|
return spinner({
|
326528
326290
|
startMessage: `Waiting for ${type4} to be ${getActionLabel(action)}`,
|
@@ -326532,20 +326294,33 @@ async function waitForCompletion({
|
|
326532
326294
|
while (true) {
|
326533
326295
|
try {
|
326534
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
|
+
}
|
326535
326305
|
if (resource.status === "FAILED") {
|
326536
|
-
|
326537
|
-
|
326538
|
-
|
326306
|
+
if (spinner2) {
|
326307
|
+
spinner2.text = `${capitalizeFirstLetter2(type4)} failed to ${getActionLabel(action)}`;
|
326308
|
+
} else {
|
326309
|
+
note(`${capitalizeFirstLetter2(type4)} failed to ${getActionLabel(action)}`);
|
326539
326310
|
}
|
326540
326311
|
return false;
|
326541
326312
|
}
|
326542
|
-
if (
|
326543
|
-
|
326544
|
-
|
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)`);
|
326545
326323
|
}
|
326546
|
-
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} is not ready yet (status: ${resource.status})`);
|
326547
|
-
} catch (_error) {
|
326548
|
-
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} is not ready yet (status: UNKNOWN)`);
|
326549
326324
|
}
|
326550
326325
|
if (Date.now() - startTime > maxTimeout) {
|
326551
326326
|
throw new TimeoutError2(`Operation timed out after ${maxTimeout / 60000} minutes for ${type4} with unique name ${uniqueName}`);
|
@@ -326558,59 +326333,23 @@ async function waitForCompletion({
|
|
326558
326333
|
try {
|
326559
326334
|
return await showSpinner();
|
326560
326335
|
} catch (error45) {
|
326561
|
-
|
326336
|
+
const isTimeoutError = error45 instanceof SpinnerError && error45.originalError instanceof TimeoutError2;
|
326337
|
+
if (restartIfTimeout && isTimeoutError) {
|
326562
326338
|
note(`Restarting ${capitalizeFirstLetter2(type4)}`);
|
326563
|
-
hasRestarted = true;
|
326564
326339
|
await service.restart(uniqueName);
|
326565
326340
|
return showSpinner();
|
326566
326341
|
}
|
326567
326342
|
throw error45;
|
326568
326343
|
}
|
326569
326344
|
}
|
326570
|
-
function shouldRestart(error45, restartIfTimeout) {
|
326571
|
-
const isSpinnerError = error45 instanceof SpinnerError;
|
326572
|
-
const isDeploymentFailedError = error45 instanceof DeploymentFailedError || isSpinnerError && error45.originalError instanceof DeploymentFailedError;
|
326573
|
-
if (isDeploymentFailedError) {
|
326574
|
-
return true;
|
326575
|
-
}
|
326576
|
-
const isTimeoutError = error45 instanceof TimeoutError2 || isSpinnerError && error45.originalError instanceof TimeoutError2;
|
326577
|
-
return restartIfTimeout && isTimeoutError;
|
326578
|
-
}
|
326579
|
-
function updateStatus(spinner2, message) {
|
326580
|
-
if (spinner2) {
|
326581
|
-
spinner2.text = message;
|
326582
|
-
} else {
|
326583
|
-
note(message);
|
326584
|
-
}
|
326585
|
-
}
|
326586
|
-
function isActionComplete(action, status) {
|
326587
|
-
switch (action) {
|
326588
|
-
case "pause":
|
326589
|
-
return status === "PAUSED" || status === "AUTO_PAUSED";
|
326590
|
-
case "resume":
|
326591
|
-
case "deploy":
|
326592
|
-
case "destroy":
|
326593
|
-
case "restart":
|
326594
|
-
return status === "COMPLETED";
|
326595
|
-
default:
|
326596
|
-
return false;
|
326597
|
-
}
|
326598
|
-
}
|
326599
326345
|
function getActionLabel(action) {
|
326600
|
-
|
326601
|
-
|
326602
|
-
return "restarted";
|
326603
|
-
case "destroy":
|
326604
|
-
return "destroyed";
|
326605
|
-
case "pause":
|
326606
|
-
return "paused";
|
326607
|
-
case "resume":
|
326608
|
-
return "resumed";
|
326609
|
-
case "deploy":
|
326610
|
-
return "deployed";
|
326611
|
-
default:
|
326612
|
-
return "deployed";
|
326346
|
+
if (action === "restart") {
|
326347
|
+
return "restarted";
|
326613
326348
|
}
|
326349
|
+
if (action === "destroy") {
|
326350
|
+
return "destroyed";
|
326351
|
+
}
|
326352
|
+
return "deployed";
|
326614
326353
|
}
|
326615
326354
|
|
326616
326355
|
// src/prompts/provider.prompt.ts
|
@@ -326691,9 +326430,9 @@ function getCreateCommand({
|
|
326691
326430
|
cmd2.alias(alias);
|
326692
326431
|
}
|
326693
326432
|
if (requiresDeployment) {
|
326694
|
-
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");
|
326695
326434
|
}
|
326696
|
-
execute2(cmd2, async ({ acceptDefaults, prod, default: isDefault, wait: wait2, restartIfTimeout,
|
326435
|
+
execute2(cmd2, async ({ acceptDefaults, prod, default: isDefault, wait: wait2, restartIfTimeout, provider, region }, createFunction) => {
|
326697
326436
|
intro(`Creating ${type4} in the SettleMint platform`);
|
326698
326437
|
const env2 = await loadEnv(false, !!prod);
|
326699
326438
|
const instance = await instancePrompt({ env: env2, accept: acceptDefaults });
|
@@ -326707,8 +326446,8 @@ function getCreateCommand({
|
|
326707
326446
|
instance
|
326708
326447
|
});
|
326709
326448
|
const platformConfig = await settlemint.platform.config();
|
326710
|
-
let selectedProvider;
|
326711
|
-
let selectedRegion;
|
326449
|
+
let selectedProvider = undefined;
|
326450
|
+
let selectedRegion = undefined;
|
326712
326451
|
if (cmd2.options.some((option) => option.long === "--provider")) {
|
326713
326452
|
selectedProvider = await providerPrompt(platformConfig, provider);
|
326714
326453
|
if (!selectedProvider) {
|
@@ -326737,8 +326476,7 @@ function getCreateCommand({
|
|
326737
326476
|
type: waitFor?.resourceType ?? type4,
|
326738
326477
|
uniqueName: waitFor?.uniqueName ?? result.uniqueName,
|
326739
326478
|
action: "deploy",
|
326740
|
-
restartIfTimeout
|
326741
|
-
restartOnError
|
326479
|
+
restartIfTimeout
|
326742
326480
|
});
|
326743
326481
|
if (!isDeployed) {
|
326744
326482
|
throw new Error(`Failed to deploy ${waitFor?.resourceType ?? type4} ${waitFor?.uniqueName ?? result.uniqueName}`);
|
@@ -327920,7 +327658,7 @@ function privateKeyHsmCreateCommand() {
|
|
327920
327658
|
return baseAction({
|
327921
327659
|
...defaultArgs,
|
327922
327660
|
acceptDefaults
|
327923
|
-
}, async ({ settlemint, env: env2, showSpinner, provider
|
327661
|
+
}, async ({ settlemint, env: env2, showSpinner, provider, region }) => {
|
327924
327662
|
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
327925
327663
|
if (!applicationUniqueName) {
|
327926
327664
|
return missingApplication();
|
@@ -328209,256 +327947,25 @@ function deleteCommand() {
|
|
328209
327947
|
return new Command("delete").alias("d").description("Delete a resource in the SettleMint platform").addCommand(applicationDeleteCommand()).addCommand(workspaceDeleteCommand());
|
328210
327948
|
}
|
328211
327949
|
|
328212
|
-
// src/commands/platform/common/pause-command.ts
|
328213
|
-
function getPauseCommand({
|
328214
|
-
name: name3,
|
328215
|
-
type: type4,
|
328216
|
-
alias,
|
328217
|
-
envKey,
|
328218
|
-
pauseFunction,
|
328219
|
-
usePersonalAccessToken = true
|
328220
|
-
}) {
|
328221
|
-
const commandName = sanitizeCommandName(name3);
|
328222
|
-
const typeCommandName = sanitizeCommandName(type4);
|
328223
|
-
const exampleCommandPrefix = `platform pause ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
328224
|
-
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([
|
328225
|
-
{
|
328226
|
-
description: `Pauses the specified ${type4} by unique name`,
|
328227
|
-
command: `${exampleCommandPrefix} <unique-name>`
|
328228
|
-
},
|
328229
|
-
{
|
328230
|
-
description: `Pauses the default ${type4} in the production environment`,
|
328231
|
-
command: `${exampleCommandPrefix} default --prod`
|
328232
|
-
}
|
328233
|
-
])).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 }) => {
|
328234
|
-
intro(`Pausing ${type4} in the SettleMint platform`);
|
328235
|
-
const env2 = await loadEnv(false, !!prod);
|
328236
|
-
const instance = await instancePrompt({ env: env2, accept: acceptDefaults });
|
328237
|
-
const accessToken = await getApplicationOrPersonalAccessToken({
|
328238
|
-
env: env2,
|
328239
|
-
instance,
|
328240
|
-
prefer: usePersonalAccessToken ? "personal" : "application"
|
328241
|
-
});
|
328242
|
-
const settlemint = createSettleMintClient({
|
328243
|
-
accessToken,
|
328244
|
-
instance
|
328245
|
-
});
|
328246
|
-
const isDefaultUniqueName = uniqueName === "default";
|
328247
|
-
const serviceUniqueName = isDefaultUniqueName ? typeof env2[envKey] === "string" ? env2[envKey] : null : uniqueName;
|
328248
|
-
if (!serviceUniqueName) {
|
328249
|
-
cancel2(`No default ${type4} found in your .env file. Please provide a valid ${type4} unique name or set a default ${type4} first.`);
|
328250
|
-
}
|
328251
|
-
const result = await spinner({
|
328252
|
-
startMessage: `Pausing ${type4}`,
|
328253
|
-
task: async () => {
|
328254
|
-
return pauseFunction(settlemint, serviceUniqueName);
|
328255
|
-
},
|
328256
|
-
stopMessage: `${capitalizeFirstLetter2(type4)} pause initiated`
|
328257
|
-
});
|
328258
|
-
if (wait2) {
|
328259
|
-
const isPaused = await waitForCompletion({
|
328260
|
-
settlemint,
|
328261
|
-
type: type4,
|
328262
|
-
uniqueName: serviceUniqueName,
|
328263
|
-
action: "pause"
|
328264
|
-
});
|
328265
|
-
if (!isPaused) {
|
328266
|
-
throw new Error(`Failed to pause ${type4} ${serviceUniqueName}`);
|
328267
|
-
}
|
328268
|
-
}
|
328269
|
-
outro(`${capitalizeFirstLetter2(type4)} ${result.name} pause initiated successfully`);
|
328270
|
-
});
|
328271
|
-
}
|
328272
|
-
|
328273
|
-
// src/commands/platform/blockchain-network/pause.ts
|
328274
|
-
function blockchainNetworkPauseCommand() {
|
328275
|
-
return getPauseCommand({
|
328276
|
-
name: "blockchain-network",
|
328277
|
-
type: "blockchain network",
|
328278
|
-
alias: "bnw",
|
328279
|
-
envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
|
328280
|
-
pauseFunction: async (settlemint, id) => {
|
328281
|
-
return settlemint.blockchainNetwork.pause(id);
|
328282
|
-
}
|
328283
|
-
});
|
328284
|
-
}
|
328285
|
-
|
328286
|
-
// src/commands/platform/blockchain-node/pause.ts
|
328287
|
-
function blockchainNodePauseCommand() {
|
328288
|
-
return getPauseCommand({
|
328289
|
-
name: "blockchain-node",
|
328290
|
-
type: "blockchain node",
|
328291
|
-
alias: "bn",
|
328292
|
-
envKey: "SETTLEMINT_BLOCKCHAIN_NODE",
|
328293
|
-
pauseFunction: async (settlemint, id) => {
|
328294
|
-
return settlemint.blockchainNode.pause(id);
|
328295
|
-
}
|
328296
|
-
});
|
328297
|
-
}
|
328298
|
-
|
328299
|
-
// src/commands/platform/custom-deployments/pause.ts
|
328300
|
-
function customDeploymentPauseCommand() {
|
328301
|
-
return getPauseCommand({
|
328302
|
-
name: "custom-deployment",
|
328303
|
-
type: "custom deployment",
|
328304
|
-
alias: "cd",
|
328305
|
-
envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
|
328306
|
-
pauseFunction: async (settlemint, id) => {
|
328307
|
-
return settlemint.customDeployment.pause(id);
|
328308
|
-
}
|
328309
|
-
});
|
328310
|
-
}
|
328311
|
-
|
328312
|
-
// src/commands/platform/insights/blockscout/pause.ts
|
328313
|
-
function blockscoutPauseCommand() {
|
328314
|
-
return getPauseCommand({
|
328315
|
-
name: "blockscout",
|
328316
|
-
type: "insights",
|
328317
|
-
alias: "bs",
|
328318
|
-
envKey: "SETTLEMINT_BLOCKSCOUT",
|
328319
|
-
pauseFunction: async (settlemint, id) => {
|
328320
|
-
return settlemint.insights.pause(id);
|
328321
|
-
}
|
328322
|
-
});
|
328323
|
-
}
|
328324
|
-
|
328325
|
-
// src/commands/platform/insights/pause.ts
|
328326
|
-
function insightsPauseCommand() {
|
328327
|
-
return new Command("insights").alias("in").description("Pause an insights service in the SettleMint platform").addCommand(blockscoutPauseCommand());
|
328328
|
-
}
|
328329
|
-
|
328330
|
-
// src/commands/platform/integration-tools/hasura/pause.ts
|
328331
|
-
function hasuraPauseCommand() {
|
328332
|
-
return getPauseCommand({
|
328333
|
-
name: "hasura",
|
328334
|
-
type: "integration tool",
|
328335
|
-
alias: "ha",
|
328336
|
-
envKey: "SETTLEMINT_HASURA",
|
328337
|
-
pauseFunction: async (settlemint, id) => {
|
328338
|
-
return settlemint.integrationTool.pause(id);
|
328339
|
-
}
|
328340
|
-
});
|
328341
|
-
}
|
328342
|
-
|
328343
|
-
// src/commands/platform/integration-tools/pause.ts
|
328344
|
-
function integrationToolPauseCommand() {
|
328345
|
-
return new Command("integration-tool").alias("it").description("Pause an integration tool service in the SettleMint platform").addCommand(hasuraPauseCommand());
|
328346
|
-
}
|
328347
|
-
|
328348
|
-
// src/commands/platform/load-balancer/pause.ts
|
328349
|
-
function loadBalancerPauseCommand() {
|
328350
|
-
return getPauseCommand({
|
328351
|
-
name: "evm",
|
328352
|
-
type: "load balancer",
|
328353
|
-
alias: "lb",
|
328354
|
-
envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
|
328355
|
-
pauseFunction: async (settlemint, id) => {
|
328356
|
-
return settlemint.loadBalancer.pause(id);
|
328357
|
-
}
|
328358
|
-
});
|
328359
|
-
}
|
328360
|
-
|
328361
|
-
// src/commands/platform/middleware/graph/pause.ts
|
328362
|
-
function graphMiddlewarePauseCommand() {
|
328363
|
-
return getPauseCommand({
|
328364
|
-
name: "graph",
|
328365
|
-
type: "middleware",
|
328366
|
-
alias: "gr",
|
328367
|
-
envKey: "SETTLEMINT_THEGRAPH",
|
328368
|
-
pauseFunction: async (settlemint, id) => {
|
328369
|
-
return settlemint.middleware.pause(id);
|
328370
|
-
}
|
328371
|
-
});
|
328372
|
-
}
|
328373
|
-
|
328374
|
-
// src/commands/platform/middleware/smart-contract-portal/pause.ts
|
328375
|
-
function smartContractPortalMiddlewarePauseCommand() {
|
328376
|
-
return getPauseCommand({
|
328377
|
-
name: "smart-contract-portal",
|
328378
|
-
type: "middleware",
|
328379
|
-
alias: "scp",
|
328380
|
-
envKey: "SETTLEMINT_PORTAL",
|
328381
|
-
pauseFunction: async (settlemint, id) => {
|
328382
|
-
return settlemint.middleware.pause(id);
|
328383
|
-
}
|
328384
|
-
});
|
328385
|
-
}
|
328386
|
-
|
328387
|
-
// src/commands/platform/middleware/pause.ts
|
328388
|
-
function middlewarePauseCommand() {
|
328389
|
-
return new Command("middleware").alias("mw").description("Pause a middleware service in the SettleMint platform").addCommand(graphMiddlewarePauseCommand()).addCommand(smartContractPortalMiddlewarePauseCommand());
|
328390
|
-
}
|
328391
|
-
|
328392
|
-
// src/commands/platform/private-key/pause.ts
|
328393
|
-
function privateKeyPauseCommand() {
|
328394
|
-
return getPauseCommand({
|
328395
|
-
name: "private-key",
|
328396
|
-
type: "private key",
|
328397
|
-
alias: "pk",
|
328398
|
-
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
328399
|
-
pauseFunction: async (settlemint, id) => {
|
328400
|
-
return settlemint.privateKey.pause(id);
|
328401
|
-
}
|
328402
|
-
});
|
328403
|
-
}
|
328404
|
-
|
328405
|
-
// src/commands/platform/storage/ipfs/pause.ts
|
328406
|
-
function ipfsStoragePauseCommand() {
|
328407
|
-
return getPauseCommand({
|
328408
|
-
name: "ipfs",
|
328409
|
-
type: "storage",
|
328410
|
-
alias: "ip",
|
328411
|
-
envKey: "SETTLEMINT_IPFS",
|
328412
|
-
pauseFunction: async (settlemint, id) => {
|
328413
|
-
return settlemint.storage.pause(id);
|
328414
|
-
}
|
328415
|
-
});
|
328416
|
-
}
|
328417
|
-
|
328418
|
-
// src/commands/platform/storage/minio/pause.ts
|
328419
|
-
function minioStoragePauseCommand() {
|
328420
|
-
return getPauseCommand({
|
328421
|
-
name: "minio",
|
328422
|
-
type: "storage",
|
328423
|
-
alias: "m",
|
328424
|
-
envKey: "SETTLEMINT_MINIO",
|
328425
|
-
pauseFunction: async (settlemint, id) => {
|
328426
|
-
return settlemint.storage.pause(id);
|
328427
|
-
}
|
328428
|
-
});
|
328429
|
-
}
|
328430
|
-
|
328431
|
-
// src/commands/platform/storage/pause.ts
|
328432
|
-
function storagePauseCommand() {
|
328433
|
-
return new Command("storage").alias("st").description("Pause a storage service in the SettleMint platform").addCommand(ipfsStoragePauseCommand()).addCommand(minioStoragePauseCommand());
|
328434
|
-
}
|
328435
|
-
|
328436
|
-
// src/commands/platform/pause.ts
|
328437
|
-
function pauseCommand() {
|
328438
|
-
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());
|
328439
|
-
return cmd2;
|
328440
|
-
}
|
328441
|
-
|
328442
327950
|
// src/commands/platform/common/restart-command.ts
|
328443
327951
|
function getRestartCommand({
|
328444
327952
|
name: name3,
|
328445
327953
|
type: type4,
|
327954
|
+
subType,
|
328446
327955
|
alias,
|
328447
327956
|
envKey,
|
328448
327957
|
restartFunction,
|
328449
327958
|
usePersonalAccessToken = true
|
328450
327959
|
}) {
|
328451
327960
|
const commandName = sanitizeCommandName(name3);
|
328452
|
-
const typeCommandName = sanitizeCommandName(type4);
|
328453
|
-
const exampleCommandPrefix = `platform restart ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
328454
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([
|
328455
327962
|
{
|
328456
|
-
description: `Restarts the specified ${type4} by
|
328457
|
-
command:
|
327963
|
+
description: `Restarts the specified ${type4} by id`,
|
327964
|
+
command: `platform restart ${commandName}${subType ? ` ${subType}` : ""} <${type4}-id>`
|
328458
327965
|
},
|
328459
327966
|
{
|
328460
327967
|
description: `Restarts the default ${type4} in the production environment`,
|
328461
|
-
command:
|
327968
|
+
command: `platform restart ${commandName}${subType ? ` ${subType}` : ""} default --prod`
|
328462
327969
|
}
|
328463
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 }) => {
|
328464
327971
|
intro(`Restarting ${type4} in the SettleMint platform`);
|
@@ -328545,6 +328052,7 @@ function blockscoutRestartCommand() {
|
|
328545
328052
|
return getRestartCommand({
|
328546
328053
|
name: "blockscout",
|
328547
328054
|
type: "insights",
|
328055
|
+
subType: "blockscout",
|
328548
328056
|
alias: "bs",
|
328549
328057
|
envKey: "SETTLEMINT_BLOCKSCOUT",
|
328550
328058
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -328563,6 +328071,7 @@ function hasuraRestartCommand() {
|
|
328563
328071
|
return getRestartCommand({
|
328564
328072
|
name: "hasura",
|
328565
328073
|
type: "integration tool",
|
328074
|
+
subType: "hasura",
|
328566
328075
|
alias: "ha",
|
328567
328076
|
envKey: "SETTLEMINT_HASURA",
|
328568
328077
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -328594,6 +328103,7 @@ function graphRestartCommand() {
|
|
328594
328103
|
return getRestartCommand({
|
328595
328104
|
name: "graph",
|
328596
328105
|
type: "middleware",
|
328106
|
+
subType: "graph",
|
328597
328107
|
alias: "gr",
|
328598
328108
|
envKey: "SETTLEMINT_THEGRAPH",
|
328599
328109
|
restartFunction: async (settlemint, id) => {
|
@@ -328607,6 +328117,7 @@ function smartContractPortalRestartCommand() {
|
|
328607
328117
|
return getRestartCommand({
|
328608
328118
|
name: "smart-contract-portal",
|
328609
328119
|
type: "middleware",
|
328120
|
+
subType: "smart-contract-portal",
|
328610
328121
|
alias: "scp",
|
328611
328122
|
envKey: "SETTLEMINT_PORTAL",
|
328612
328123
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -328657,236 +328168,6 @@ function restartCommand() {
|
|
328657
328168
|
return cmd2;
|
328658
328169
|
}
|
328659
328170
|
|
328660
|
-
// src/commands/platform/common/resume-command.ts
|
328661
|
-
function getResumeCommand({
|
328662
|
-
name: name3,
|
328663
|
-
type: type4,
|
328664
|
-
alias,
|
328665
|
-
envKey,
|
328666
|
-
resumeFunction,
|
328667
|
-
usePersonalAccessToken = true
|
328668
|
-
}) {
|
328669
|
-
const commandName = sanitizeCommandName(name3);
|
328670
|
-
const typeCommandName = sanitizeCommandName(type4);
|
328671
|
-
const exampleCommandPrefix = `platform resume ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
328672
|
-
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([
|
328673
|
-
{
|
328674
|
-
description: `Resumes the specified ${type4} by unique name`,
|
328675
|
-
command: `${exampleCommandPrefix} <unique-name>`
|
328676
|
-
},
|
328677
|
-
{
|
328678
|
-
description: `Resumes the default ${type4} in the production environment`,
|
328679
|
-
command: `${exampleCommandPrefix} default --prod`
|
328680
|
-
}
|
328681
|
-
])).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 }) => {
|
328682
|
-
intro(`Resuming ${type4} in the SettleMint platform`);
|
328683
|
-
const env2 = await loadEnv(false, !!prod);
|
328684
|
-
const instance = await instancePrompt({ env: env2, accept: acceptDefaults });
|
328685
|
-
const accessToken = await getApplicationOrPersonalAccessToken({
|
328686
|
-
env: env2,
|
328687
|
-
instance,
|
328688
|
-
prefer: usePersonalAccessToken ? "personal" : "application"
|
328689
|
-
});
|
328690
|
-
const settlemint = createSettleMintClient({
|
328691
|
-
accessToken,
|
328692
|
-
instance
|
328693
|
-
});
|
328694
|
-
const isDefaultUniqueName = uniqueName === "default";
|
328695
|
-
const serviceUniqueName = isDefaultUniqueName ? typeof env2[envKey] === "string" ? env2[envKey] : null : uniqueName;
|
328696
|
-
if (!serviceUniqueName) {
|
328697
|
-
cancel2(`No default ${type4} found in your .env file. Please provide a valid ${type4} unique name or set a default ${type4} first.`);
|
328698
|
-
}
|
328699
|
-
const result = await spinner({
|
328700
|
-
startMessage: `Resuming ${type4}`,
|
328701
|
-
task: async () => {
|
328702
|
-
return resumeFunction(settlemint, serviceUniqueName);
|
328703
|
-
},
|
328704
|
-
stopMessage: `${capitalizeFirstLetter2(type4)} resume initiated`
|
328705
|
-
});
|
328706
|
-
if (wait2) {
|
328707
|
-
const isResumed = await waitForCompletion({
|
328708
|
-
settlemint,
|
328709
|
-
type: type4,
|
328710
|
-
uniqueName: serviceUniqueName,
|
328711
|
-
action: "resume"
|
328712
|
-
});
|
328713
|
-
if (!isResumed) {
|
328714
|
-
throw new Error(`Failed to resume ${type4} ${serviceUniqueName}`);
|
328715
|
-
}
|
328716
|
-
}
|
328717
|
-
outro(`${capitalizeFirstLetter2(type4)} ${result.name} resume initiated successfully`);
|
328718
|
-
});
|
328719
|
-
}
|
328720
|
-
|
328721
|
-
// src/commands/platform/blockchain-network/resume.ts
|
328722
|
-
function blockchainNetworkResumeCommand() {
|
328723
|
-
return getResumeCommand({
|
328724
|
-
name: "blockchain-network",
|
328725
|
-
type: "blockchain network",
|
328726
|
-
alias: "bnw",
|
328727
|
-
envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
|
328728
|
-
resumeFunction: async (settlemint, id) => {
|
328729
|
-
return settlemint.blockchainNetwork.resume(id);
|
328730
|
-
}
|
328731
|
-
});
|
328732
|
-
}
|
328733
|
-
|
328734
|
-
// src/commands/platform/blockchain-node/resume.ts
|
328735
|
-
function blockchainNodeResumeCommand() {
|
328736
|
-
return getResumeCommand({
|
328737
|
-
name: "blockchain-node",
|
328738
|
-
type: "blockchain node",
|
328739
|
-
alias: "bn",
|
328740
|
-
envKey: "SETTLEMINT_BLOCKCHAIN_NODE",
|
328741
|
-
resumeFunction: async (settlemint, id) => {
|
328742
|
-
return settlemint.blockchainNode.resume(id);
|
328743
|
-
}
|
328744
|
-
});
|
328745
|
-
}
|
328746
|
-
|
328747
|
-
// src/commands/platform/custom-deployments/resume.ts
|
328748
|
-
function customDeploymentResumeCommand() {
|
328749
|
-
return getResumeCommand({
|
328750
|
-
name: "custom-deployment",
|
328751
|
-
type: "custom deployment",
|
328752
|
-
alias: "cd",
|
328753
|
-
envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
|
328754
|
-
resumeFunction: async (settlemint, id) => {
|
328755
|
-
return settlemint.customDeployment.resume(id);
|
328756
|
-
}
|
328757
|
-
});
|
328758
|
-
}
|
328759
|
-
|
328760
|
-
// src/commands/platform/insights/blockscout/resume.ts
|
328761
|
-
function blockscoutResumeCommand() {
|
328762
|
-
return getResumeCommand({
|
328763
|
-
name: "blockscout",
|
328764
|
-
type: "insights",
|
328765
|
-
alias: "bs",
|
328766
|
-
envKey: "SETTLEMINT_BLOCKSCOUT",
|
328767
|
-
resumeFunction: async (settlemint, id) => {
|
328768
|
-
return settlemint.insights.resume(id);
|
328769
|
-
}
|
328770
|
-
});
|
328771
|
-
}
|
328772
|
-
|
328773
|
-
// src/commands/platform/insights/resume.ts
|
328774
|
-
function insightsResumeCommand() {
|
328775
|
-
return new Command("insights").alias("in").description("Resume an insights service in the SettleMint platform").addCommand(blockscoutResumeCommand());
|
328776
|
-
}
|
328777
|
-
|
328778
|
-
// src/commands/platform/integration-tools/hasura/resume.ts
|
328779
|
-
function hasuraResumeCommand() {
|
328780
|
-
return getResumeCommand({
|
328781
|
-
name: "hasura",
|
328782
|
-
type: "integration tool",
|
328783
|
-
alias: "ha",
|
328784
|
-
envKey: "SETTLEMINT_HASURA",
|
328785
|
-
resumeFunction: async (settlemint, id) => {
|
328786
|
-
return settlemint.integrationTool.resume(id);
|
328787
|
-
}
|
328788
|
-
});
|
328789
|
-
}
|
328790
|
-
|
328791
|
-
// src/commands/platform/integration-tools/resume.ts
|
328792
|
-
function integrationToolResumeCommand() {
|
328793
|
-
return new Command("integration-tool").alias("it").description("Resume an integration tool service in the SettleMint platform").addCommand(hasuraResumeCommand());
|
328794
|
-
}
|
328795
|
-
|
328796
|
-
// src/commands/platform/load-balancer/resume.ts
|
328797
|
-
function loadBalancerResumeCommand() {
|
328798
|
-
return getResumeCommand({
|
328799
|
-
name: "load-balancer",
|
328800
|
-
type: "load balancer",
|
328801
|
-
alias: "lb",
|
328802
|
-
envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
|
328803
|
-
resumeFunction: async (settlemint, id) => {
|
328804
|
-
return settlemint.loadBalancer.resume(id);
|
328805
|
-
}
|
328806
|
-
});
|
328807
|
-
}
|
328808
|
-
|
328809
|
-
// src/commands/platform/middleware/graph/resume.ts
|
328810
|
-
function graphMiddlewareResumeCommand() {
|
328811
|
-
return getResumeCommand({
|
328812
|
-
name: "graph",
|
328813
|
-
type: "middleware",
|
328814
|
-
alias: "gr",
|
328815
|
-
envKey: "SETTLEMINT_THEGRAPH",
|
328816
|
-
resumeFunction: async (settlemint, id) => {
|
328817
|
-
return settlemint.middleware.resume(id);
|
328818
|
-
}
|
328819
|
-
});
|
328820
|
-
}
|
328821
|
-
|
328822
|
-
// src/commands/platform/middleware/smart-contract-portal/resume.ts
|
328823
|
-
function smartContractPortalMiddlewareResumeCommand() {
|
328824
|
-
return getResumeCommand({
|
328825
|
-
name: "smart-contract-portal",
|
328826
|
-
type: "middleware",
|
328827
|
-
alias: "scp",
|
328828
|
-
envKey: "SETTLEMINT_PORTAL",
|
328829
|
-
resumeFunction: async (settlemint, id) => {
|
328830
|
-
return settlemint.middleware.resume(id);
|
328831
|
-
}
|
328832
|
-
});
|
328833
|
-
}
|
328834
|
-
|
328835
|
-
// src/commands/platform/middleware/resume.ts
|
328836
|
-
function middlewareResumeCommand() {
|
328837
|
-
return new Command("middleware").alias("mw").description("Resume a middleware service in the SettleMint platform").addCommand(graphMiddlewareResumeCommand()).addCommand(smartContractPortalMiddlewareResumeCommand());
|
328838
|
-
}
|
328839
|
-
|
328840
|
-
// src/commands/platform/private-key/resume.ts
|
328841
|
-
function privateKeyResumeCommand() {
|
328842
|
-
return getResumeCommand({
|
328843
|
-
name: "private-key",
|
328844
|
-
type: "private key",
|
328845
|
-
alias: "pk",
|
328846
|
-
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
328847
|
-
resumeFunction: async (settlemint, id) => {
|
328848
|
-
return settlemint.privateKey.resume(id);
|
328849
|
-
}
|
328850
|
-
});
|
328851
|
-
}
|
328852
|
-
|
328853
|
-
// src/commands/platform/storage/ipfs/resume.ts
|
328854
|
-
function ipfsStorageResumeCommand() {
|
328855
|
-
return getResumeCommand({
|
328856
|
-
name: "ipfs",
|
328857
|
-
type: "storage",
|
328858
|
-
alias: "ip",
|
328859
|
-
envKey: "SETTLEMINT_IPFS",
|
328860
|
-
resumeFunction: async (settlemint, id) => {
|
328861
|
-
return settlemint.storage.resume(id);
|
328862
|
-
}
|
328863
|
-
});
|
328864
|
-
}
|
328865
|
-
|
328866
|
-
// src/commands/platform/storage/minio/resume.ts
|
328867
|
-
function minioStorageResumeCommand() {
|
328868
|
-
return getResumeCommand({
|
328869
|
-
name: "minio",
|
328870
|
-
type: "storage",
|
328871
|
-
alias: "m",
|
328872
|
-
envKey: "SETTLEMINT_MINIO",
|
328873
|
-
resumeFunction: async (settlemint, id) => {
|
328874
|
-
return settlemint.storage.resume(id);
|
328875
|
-
}
|
328876
|
-
});
|
328877
|
-
}
|
328878
|
-
|
328879
|
-
// src/commands/platform/storage/resume.ts
|
328880
|
-
function storageResumeCommand() {
|
328881
|
-
return new Command("storage").alias("st").description("Resume a storage service in the SettleMint platform").addCommand(ipfsStorageResumeCommand()).addCommand(minioStorageResumeCommand());
|
328882
|
-
}
|
328883
|
-
|
328884
|
-
// src/commands/platform/resume.ts
|
328885
|
-
function resumeCommand() {
|
328886
|
-
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());
|
328887
|
-
return cmd2;
|
328888
|
-
}
|
328889
|
-
|
328890
328171
|
// src/commands/platform/custom-deployments/update.ts
|
328891
328172
|
function customDeploymentsUpdateCommand() {
|
328892
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([
|
@@ -329277,7 +328558,7 @@ function servicesCommand() {
|
|
329277
328558
|
if (!applicationUniqueName) {
|
329278
328559
|
return nothingSelectedError("application");
|
329279
328560
|
}
|
329280
|
-
let effectiveTypes;
|
328561
|
+
let effectiveTypes = undefined;
|
329281
328562
|
if (options.type && options.type.length > 0) {
|
329282
328563
|
effectiveTypes = options.type;
|
329283
328564
|
} else if (typeOperands && typeOperands.length > 0) {
|
@@ -329335,7 +328616,7 @@ async function getServicesAndMapResults({
|
|
329335
328616
|
const application = await settlemint.application.read(applicationUniqueName);
|
329336
328617
|
const services = await servicesSpinner(settlemint, applicationUniqueName, types4);
|
329337
328618
|
const results = (types4 ?? SERVICE_TYPES).filter((serviceType) => !types4 || types4.includes(serviceType)).map((serviceType) => {
|
329338
|
-
const [_6, labels] = Object.entries(LABELS_MAP).find(([
|
328619
|
+
const [_6, labels] = Object.entries(LABELS_MAP).find(([key2, value4]) => value4.command === serviceType) ?? [
|
329339
328620
|
null,
|
329340
328621
|
{ plural: serviceType }
|
329341
328622
|
];
|
@@ -329462,7 +328743,7 @@ function listCommand() {
|
|
329462
328743
|
|
329463
328744
|
// src/commands/platform.ts
|
329464
328745
|
function platformCommand() {
|
329465
|
-
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());
|
329466
328747
|
}
|
329467
328748
|
|
329468
328749
|
// src/commands/smart-contract-set/create.ts
|
@@ -329512,7 +328793,7 @@ var import_which = __toESM(require_lib5(), 1);
|
|
329512
328793
|
async function executeFoundryCommand(command, args) {
|
329513
328794
|
try {
|
329514
328795
|
await import_which.default(command);
|
329515
|
-
} catch (
|
328796
|
+
} catch (error45) {
|
329516
328797
|
cancel2("Foundry is not installed. Instructions to install Foundry can be found here: https://book.getfoundry.sh/getting-started/installation");
|
329517
328798
|
}
|
329518
328799
|
return executeCommand(command, args);
|
@@ -329600,7 +328881,7 @@ function foundryBuildCommand() {
|
|
329600
328881
|
description: "Build the smart contracts with additional Forge options",
|
329601
328882
|
command: "scs foundry build --optimize --force"
|
329602
328883
|
}
|
329603
|
-
])).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) => {
|
329604
328885
|
intro("Building smart contracts using Foundry");
|
329605
328886
|
const forgeOptions = mapPassthroughOptions(options, { args: operands });
|
329606
328887
|
await executeFoundryCommand("forge", ["build", ...forgeOptions]);
|
@@ -329623,7 +328904,7 @@ function foundryFormatCommand() {
|
|
329623
328904
|
description: "Format the smart contracts with additional Forge options",
|
329624
328905
|
command: "scs foundry format --check"
|
329625
328906
|
}
|
329626
|
-
])).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) => {
|
329627
328908
|
intro("Formatting smart contracts using Foundry");
|
329628
328909
|
const forgeOptions = mapPassthroughOptions(options, { args: operands });
|
329629
328910
|
await executeFoundryCommand("forge", ["fmt", ...forgeOptions]);
|
@@ -329646,7 +328927,7 @@ function foundryNetworkCommand() {
|
|
329646
328927
|
description: "Start a development network using Foundry with a specific port",
|
329647
328928
|
command: "scs foundry network --port 3000"
|
329648
328929
|
}
|
329649
|
-
])).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) => {
|
329650
328931
|
const anvilOptions = mapPassthroughOptions(options, { args: operands });
|
329651
328932
|
await executeFoundryCommand("anvil", anvilOptions);
|
329652
328933
|
});
|
@@ -329667,7 +328948,7 @@ function foundryTestCommand() {
|
|
329667
328948
|
description: "Run a specific test function",
|
329668
328949
|
command: "scs foundry test --match-test testToken"
|
329669
328950
|
}
|
329670
|
-
])).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) => {
|
329671
328952
|
intro("Running smart contract tests using Foundry");
|
329672
328953
|
const forgeOptions = mapPassthroughOptions(options, { args: operands });
|
329673
328954
|
await executeFoundryCommand("forge", ["test", ...forgeOptions]);
|
@@ -329681,7 +328962,7 @@ var validateIfRequiredPackagesAreInstalled = async (packages, cwd2) => {
|
|
329681
328962
|
try {
|
329682
328963
|
const isInstalled = await isPackageInstalled(pkg, cwd2);
|
329683
328964
|
return { packageName: pkg, isInstalled };
|
329684
|
-
} catch (
|
328965
|
+
} catch (err) {
|
329685
328966
|
return { packageName: pkg, isInstalled: false };
|
329686
328967
|
}
|
329687
328968
|
}));
|
@@ -329706,7 +328987,7 @@ function hardhatBuildCommand() {
|
|
329706
328987
|
description: "Build the smart contracts using additional options to the Hardhat compile command",
|
329707
328988
|
command: "scs hardhat build --concurrency 2"
|
329708
328989
|
}
|
329709
|
-
])).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) => {
|
329710
328991
|
intro("Building smart contracts using Hardhat");
|
329711
328992
|
await validateIfRequiredPackagesAreInstalled(["hardhat"]);
|
329712
328993
|
const hardhatOptions = mapPassthroughOptions(options, { args: operands });
|
@@ -329777,7 +329058,7 @@ async function selectTargetNode({
|
|
329777
329058
|
settlemint
|
329778
329059
|
}) {
|
329779
329060
|
const nodeUniqueName = blockchainNodeUniqueName ?? (autoAccept ? env2.SETTLEMINT_BLOCKCHAIN_NODE : undefined);
|
329780
|
-
let node;
|
329061
|
+
let node = undefined;
|
329781
329062
|
if (!nodeUniqueName) {
|
329782
329063
|
if (!env2.SETTLEMINT_APPLICATION) {
|
329783
329064
|
return missingApplication();
|
@@ -330001,7 +329282,7 @@ function hardhatDeployRemoteCommand() {
|
|
330001
329282
|
} else {
|
330002
329283
|
note("Smart contract deployment was cancelled");
|
330003
329284
|
}
|
330004
|
-
} catch (
|
329285
|
+
} catch (error45) {
|
330005
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.");
|
330006
329287
|
}
|
330007
329288
|
});
|
@@ -330031,7 +329312,7 @@ function hardhatNetworkCommand() {
|
|
330031
329312
|
description: "Start a development network using Hardhat with a specific port",
|
330032
329313
|
command: "scs hardhat network --port 3000"
|
330033
329314
|
}
|
330034
|
-
])).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) => {
|
330035
329316
|
intro("Starting development network using Hardhat");
|
330036
329317
|
await validateIfRequiredPackagesAreInstalled(["hardhat"]);
|
330037
329318
|
const hardhatOptions = mapPassthroughOptions(options, { args: operands });
|
@@ -330140,7 +329421,7 @@ function hardhatTestCommand() {
|
|
330140
329421
|
description: "Run a specific test file",
|
330141
329422
|
command: "scs hardhat test test/token.test.ts"
|
330142
329423
|
}
|
330143
|
-
])).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) => {
|
330144
329425
|
intro("Running smart contract tests using Hardhat");
|
330145
329426
|
await validateIfRequiredPackagesAreInstalled(["hardhat"]);
|
330146
329427
|
const hardhatOptions = mapPassthroughOptions(options, { args: operands });
|
@@ -330398,12 +329679,12 @@ async function getNodeName({
|
|
330398
329679
|
|
330399
329680
|
// src/commands/smart-contract-set/subgraph/build.ts
|
330400
329681
|
function subgraphBuildCommand() {
|
330401
|
-
return new Command("build").description("Build the subgraph").
|
329682
|
+
return new Command("build").description("Build the subgraph").usage(createExamples([
|
330402
329683
|
{
|
330403
329684
|
description: "Build the subgraph",
|
330404
329685
|
command: "scs subgraph build"
|
330405
329686
|
}
|
330406
|
-
])).action(async (
|
329687
|
+
])).action(async () => {
|
330407
329688
|
intro("Building subgraph");
|
330408
329689
|
await validateIfRequiredPackagesAreInstalled(["@graphprotocol/graph-cli"]);
|
330409
329690
|
await subgraphSetup({
|
@@ -330412,7 +329693,7 @@ function subgraphBuildCommand() {
|
|
330412
329693
|
const { command, args } = await getPackageManagerExecutable();
|
330413
329694
|
const subgraphYamlFile = await getSubgraphYamlFile();
|
330414
329695
|
await executeCommand(command, [...args, "graph", "codegen", subgraphYamlFile]);
|
330415
|
-
await executeCommand(command, [...args, "graph", "build",
|
329696
|
+
await executeCommand(command, [...args, "graph", "build", subgraphYamlFile]);
|
330416
329697
|
outro("Subgraph built successfully");
|
330417
329698
|
});
|
330418
329699
|
}
|
@@ -330808,4 +330089,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
330808
330089
|
// src/cli.ts
|
330809
330090
|
sdkCliCommand();
|
330810
330091
|
|
330811
|
-
//# debugId=
|
330092
|
+
//# debugId=53D78AB4747A93C864756E2164756E21
|