@settlemint/sdk-cli 2.4.0-prb71b2280 → 2.4.0-prb7837cfe

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.
Files changed (3) hide show
  1. package/dist/cli.js +765 -63
  2. package/dist/cli.js.map +66 -38
  3. package/package.json +9 -7
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.4";
231626
+ var version5 = "2.31.6";
231627
231627
 
231628
231628
  // ../../node_modules/viem/_esm/errors/base.js
231629
231629
  function walk(err, fn) {
@@ -238855,7 +238855,7 @@ async function localBatchGatewayRequest(parameters) {
238855
238855
  const responses = [];
238856
238856
  await Promise.all(queries.map(async (query, i6) => {
238857
238857
  try {
238858
- responses[i6] = await ccipRequest(query);
238858
+ responses[i6] = query.urls.includes(localBatchGatewayUrl) ? await localBatchGatewayRequest({ data: query.data, ccipRequest }) : await ccipRequest(query);
238859
238859
  failures[i6] = false;
238860
238860
  } catch (err) {
238861
238861
  failures[i6] = true;
@@ -258139,7 +258139,7 @@ function tryParseJson(value, defaultValue = null) {
258139
258139
  return defaultValue;
258140
258140
  }
258141
258141
  return parsed;
258142
- } catch (err) {
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 (error$37) {
263772
+ } catch (_error) {
263773
263773
  return [projectDir];
263774
263774
  }
263775
263775
  }
@@ -263840,7 +263840,7 @@ function pruneCurrentEnv(currentEnv, env2) {
263840
263840
  var package_default = {
263841
263841
  name: "@settlemint/sdk-cli",
263842
263842
  description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
263843
- version: "2.4.0-prb71b2280",
263843
+ version: "2.4.0-prb7837cfe",
263844
263844
  type: "module",
263845
263845
  private: false,
263846
263846
  license: "FSL-1.1-MIT",
@@ -263859,7 +263859,9 @@ var package_default = {
263859
263859
  url: "https://github.com/settlemint/sdk/issues",
263860
263860
  email: "support@settlemint.com"
263861
263861
  },
263862
- files: ["dist"],
263862
+ files: [
263863
+ "dist"
263864
+ ],
263863
263865
  exports: {
263864
263866
  "./*": {
263865
263867
  types: "./dist/*.d.ts",
@@ -263889,10 +263891,10 @@ var package_default = {
263889
263891
  "@inquirer/input": "4.1.12",
263890
263892
  "@inquirer/password": "4.0.15",
263891
263893
  "@inquirer/select": "4.2.3",
263892
- "@settlemint/sdk-js": "2.4.0-prb71b2280",
263893
- "@settlemint/sdk-utils": "2.4.0-prb71b2280",
263894
- "@settlemint/sdk-viem": "2.4.0-prb71b2280",
263895
- "@types/node": "24.0.4",
263894
+ "@settlemint/sdk-js": "2.4.0-prb7837cfe",
263895
+ "@settlemint/sdk-utils": "2.4.0-prb7837cfe",
263896
+ "@settlemint/sdk-viem": "2.4.0-prb7837cfe",
263897
+ "@types/node": "24.0.8",
263896
263898
  "@types/semver": "7.7.0",
263897
263899
  "@types/which": "3.0.4",
263898
263900
  "get-tsconfig": "4.10.1",
@@ -263900,7 +263902,7 @@ var package_default = {
263900
263902
  "is-in-ci": "1.0.0",
263901
263903
  semver: "7.7.2",
263902
263904
  slugify: "1.6.6",
263903
- viem: "2.31.4",
263905
+ viem: "2.31.6",
263904
263906
  which: "5.0.0",
263905
263907
  yaml: "2.8.0",
263906
263908
  yoctocolors: "2.1.1"
@@ -263961,7 +263963,7 @@ async function telemetry(data) {
263961
263963
  signal: controller.signal
263962
263964
  });
263963
263965
  clearTimeout(timeout);
263964
- } catch (error2) {}
263966
+ } catch (_error) {}
263965
263967
  }
263966
263968
 
263967
263969
  // ../../node_modules/@commander-js/extra-typings/esm.mjs
@@ -276523,7 +276525,7 @@ function tryParseJson2(value, defaultValue = null) {
276523
276525
  return defaultValue;
276524
276526
  }
276525
276527
  return parsed;
276526
- } catch (err) {
276528
+ } catch (_err) {
276527
276529
  return defaultValue;
276528
276530
  }
276529
276531
  }
@@ -288289,6 +288291,20 @@ var restartBlockchainNetwork = graphql(`
288289
288291
  }
288290
288292
  }
288291
288293
  `, [BlockchainNetworkFragment]);
288294
+ var pauseBlockchainNetwork = graphql(`
288295
+ mutation PauseBlockchainNetwork($uniqueName: String!) {
288296
+ pauseBlockchainNetworkByUniqueName(uniqueName: $uniqueName) {
288297
+ ...BlockchainNetwork
288298
+ }
288299
+ }
288300
+ `, [BlockchainNetworkFragment]);
288301
+ var resumeBlockchainNetwork = graphql(`
288302
+ mutation ResumeBlockchainNetwork($uniqueName: String!) {
288303
+ resumeBlockchainNetworkByUniqueName(uniqueName: $uniqueName) {
288304
+ ...BlockchainNetwork
288305
+ }
288306
+ }
288307
+ `, [BlockchainNetworkFragment]);
288292
288308
  var blockchainNetworkList = (gqlClient) => {
288293
288309
  return async (applicationUniqueName) => {
288294
288310
  const { blockchainNetworksByUniqueName: { items } } = await gqlClient.request(getBlockchainNetworks, { applicationUniqueName });
@@ -288323,6 +288339,14 @@ var blockchainNetworkRestart = (gqlClient) => async (blockchainNetworkUniqueName
288323
288339
  const { restartBlockchainNetworkByUniqueName: blockchainNetwork } = await gqlClient.request(restartBlockchainNetwork, { uniqueName: blockchainNetworkUniqueName });
288324
288340
  return blockchainNetwork;
288325
288341
  };
288342
+ var blockchainNetworkPause = (gqlClient) => async (blockchainNetworkUniqueName) => {
288343
+ const { pauseBlockchainNetworkByUniqueName: blockchainNetwork } = await gqlClient.request(pauseBlockchainNetwork, { uniqueName: blockchainNetworkUniqueName });
288344
+ return blockchainNetwork;
288345
+ };
288346
+ var blockchainNetworkResume = (gqlClient) => async (blockchainNetworkUniqueName) => {
288347
+ const { resumeBlockchainNetworkByUniqueName: blockchainNetwork } = await gqlClient.request(resumeBlockchainNetwork, { uniqueName: blockchainNetworkUniqueName });
288348
+ return blockchainNetwork;
288349
+ };
288326
288350
  var BlockchainNodeFragment = graphql(`
288327
288351
  fragment BlockchainNode on BlockchainNode {
288328
288352
  __typename
@@ -288456,6 +288480,20 @@ var restartBlockchainNode = graphql(`
288456
288480
  }
288457
288481
  }
288458
288482
  `, [BlockchainNodeFragment]);
288483
+ var pauseBlockchainNode = graphql(`
288484
+ mutation PauseBlockchainNode($uniqueName: String!) {
288485
+ pauseBlockchainNodeByUniqueName(uniqueName: $uniqueName) {
288486
+ ...BlockchainNode
288487
+ }
288488
+ }
288489
+ `, [BlockchainNodeFragment]);
288490
+ var resumeBlockchainNode = graphql(`
288491
+ mutation ResumeBlockchainNode($uniqueName: String!) {
288492
+ resumeBlockchainNodeByUniqueName(uniqueName: $uniqueName) {
288493
+ ...BlockchainNode
288494
+ }
288495
+ }
288496
+ `, [BlockchainNodeFragment]);
288459
288497
  var blockchainNodeList = (gqlClient) => {
288460
288498
  return async (applicationUniqueName) => {
288461
288499
  const { blockchainNodesByUniqueName: { items } } = await gqlClient.request(getBlockchainNodes, { applicationUniqueName });
@@ -288484,6 +288522,14 @@ var blockchainNodeRestart = (gqlClient) => async (blockchainNodeUniqueName) => {
288484
288522
  const { restartBlockchainNodeByUniqueName: blockchainNode } = await gqlClient.request(restartBlockchainNode, { uniqueName: blockchainNodeUniqueName });
288485
288523
  return blockchainNode;
288486
288524
  };
288525
+ var blockchainNodePause = (gqlClient) => async (blockchainNodeUniqueName) => {
288526
+ const { pauseBlockchainNodeByUniqueName: blockchainNode } = await gqlClient.request(pauseBlockchainNode, { uniqueName: blockchainNodeUniqueName });
288527
+ return blockchainNode;
288528
+ };
288529
+ var blockchainNodeResume = (gqlClient) => async (blockchainNodeUniqueName) => {
288530
+ const { resumeBlockchainNodeByUniqueName: blockchainNode } = await gqlClient.request(resumeBlockchainNode, { uniqueName: blockchainNodeUniqueName });
288531
+ return blockchainNode;
288532
+ };
288487
288533
  var CustomDeploymentFragment = graphql(`
288488
288534
  fragment CustomDeployment on CustomDeployment {
288489
288535
  id
@@ -288566,6 +288612,20 @@ var restartCustomDeployment = graphql(`
288566
288612
  }
288567
288613
  }
288568
288614
  `, [CustomDeploymentFragment]);
288615
+ var pauseCustomDeployment = graphql(`
288616
+ mutation PauseCustomDeployment($uniqueName: String!) {
288617
+ pauseCustomDeploymentByUniqueName(uniqueName: $uniqueName) {
288618
+ ...CustomDeployment
288619
+ }
288620
+ }
288621
+ `, [CustomDeploymentFragment]);
288622
+ var resumeCustomDeployment = graphql(`
288623
+ mutation ResumeCustomDeployment($uniqueName: String!) {
288624
+ resumeCustomDeploymentByUniqueName(uniqueName: $uniqueName) {
288625
+ ...CustomDeployment
288626
+ }
288627
+ }
288628
+ `, [CustomDeploymentFragment]);
288569
288629
  var customdeploymentList = (gqlClient) => {
288570
288630
  return async (applicationUniqueName) => {
288571
288631
  const { customDeploymentsByUniqueName: { items } } = await gqlClient.request(getCustomDeployments, { applicationUniqueName });
@@ -288602,6 +288662,14 @@ var customDeploymentRestart = (gqlClient) => async (customDeploymentUniqueName)
288602
288662
  const { restartCustomDeploymentByUniqueName: customDeployment } = await gqlClient.request(restartCustomDeployment, { uniqueName: customDeploymentUniqueName });
288603
288663
  return customDeployment;
288604
288664
  };
288665
+ var customDeploymentPause = (gqlClient) => async (customDeploymentUniqueName) => {
288666
+ const { pauseCustomDeploymentByUniqueName: customDeployment } = await gqlClient.request(pauseCustomDeployment, { uniqueName: customDeploymentUniqueName });
288667
+ return customDeployment;
288668
+ };
288669
+ var customDeploymentResume = (gqlClient) => async (customDeploymentUniqueName) => {
288670
+ const { resumeCustomDeploymentByUniqueName: customDeployment } = await gqlClient.request(resumeCustomDeployment, { uniqueName: customDeploymentUniqueName });
288671
+ return customDeployment;
288672
+ };
288605
288673
  var getFoundryEnvConfig = graphql(`
288606
288674
  query GetFoundryEnvConfig($blockchainNodeUniqueName: String!) {
288607
288675
  foundryEnvConfigByUniqueName(blockchainNodeUniqueName: $blockchainNodeUniqueName)
@@ -288678,6 +288746,20 @@ var restartLoadBalancer = graphql(`
288678
288746
  }
288679
288747
  }
288680
288748
  `, [LoadBalancerFragment]);
288749
+ var pauseLoadBalancer = graphql(`
288750
+ mutation PauseLoadBalancer($uniqueName: String!) {
288751
+ pauseLoadBalancerByUniqueName(uniqueName: $uniqueName) {
288752
+ ...LoadBalancer
288753
+ }
288754
+ }
288755
+ `, [LoadBalancerFragment]);
288756
+ var resumeLoadBalancer = graphql(`
288757
+ mutation ResumeLoadBalancer($uniqueName: String!) {
288758
+ resumeLoadBalancerByUniqueName(uniqueName: $uniqueName) {
288759
+ ...LoadBalancer
288760
+ }
288761
+ }
288762
+ `, [LoadBalancerFragment]);
288681
288763
  var loadBalancerRead = (gqlClient) => {
288682
288764
  return async (loadBalancerUniqueName) => {
288683
288765
  const { loadBalancerByUniqueName: loadBalancer } = await gqlClient.request(getLoadBalancer, { uniqueName: loadBalancerUniqueName });
@@ -288711,6 +288793,14 @@ var loadBalancerRestart = (gqlClient) => async (loadBalancerUniqueName) => {
288711
288793
  const { restartLoadBalancerByUniqueName: loadBalancer } = await gqlClient.request(restartLoadBalancer, { uniqueName: loadBalancerUniqueName });
288712
288794
  return loadBalancer;
288713
288795
  };
288796
+ var loadBalancerPause = (gqlClient) => async (loadBalancerUniqueName) => {
288797
+ const { pauseLoadBalancerByUniqueName: loadBalancer } = await gqlClient.request(pauseLoadBalancer, { uniqueName: loadBalancerUniqueName });
288798
+ return loadBalancer;
288799
+ };
288800
+ var loadBalancerResume = (gqlClient) => async (loadBalancerUniqueName) => {
288801
+ const { resumeLoadBalancerByUniqueName: loadBalancer } = await gqlClient.request(resumeLoadBalancer, { uniqueName: loadBalancerUniqueName });
288802
+ return loadBalancer;
288803
+ };
288714
288804
  var InsightsFragment = graphql(`
288715
288805
  fragment Insights on Insights {
288716
288806
  __typename
@@ -288784,6 +288874,20 @@ var restartInsights = graphql(`
288784
288874
  }
288785
288875
  }
288786
288876
  `, [InsightsFragment]);
288877
+ var pauseInsights = graphql(`
288878
+ mutation PauseInsights($uniqueName: String!) {
288879
+ pauseInsightsByUniqueName(uniqueName: $uniqueName) {
288880
+ ...Insights
288881
+ }
288882
+ }
288883
+ `, [InsightsFragment]);
288884
+ var resumeInsights = graphql(`
288885
+ mutation ResumeInsights($uniqueName: String!) {
288886
+ resumeInsightsByUniqueName(uniqueName: $uniqueName) {
288887
+ ...Insights
288888
+ }
288889
+ }
288890
+ `, [InsightsFragment]);
288787
288891
  var insightsList = (gqlClient) => {
288788
288892
  return async (applicationUniqueName) => {
288789
288893
  const { insightsListByUniqueName: { items } } = await gqlClient.request(getInsights, { applicationUniqueName });
@@ -288817,6 +288921,14 @@ var insightsRestart = (gqlClient) => async (insightsUniqueName) => {
288817
288921
  const { restartInsightsByUniqueName: insights } = await gqlClient.request(restartInsights, { uniqueName: insightsUniqueName });
288818
288922
  return insights;
288819
288923
  };
288924
+ var insightsPause = (gqlClient) => async (insightsUniqueName) => {
288925
+ const { pauseInsightsByUniqueName: insights } = await gqlClient.request(pauseInsights, { uniqueName: insightsUniqueName });
288926
+ return insights;
288927
+ };
288928
+ var insightsResume = (gqlClient) => async (insightsUniqueName) => {
288929
+ const { resumeInsightsByUniqueName: insights } = await gqlClient.request(resumeInsights, { uniqueName: insightsUniqueName });
288930
+ return insights;
288931
+ };
288820
288932
  var IntegrationFragment = graphql(`
288821
288933
  fragment Integration on Integration {
288822
288934
  __typename
@@ -288886,6 +288998,20 @@ var restartIntegrationTool = graphql(`
288886
288998
  }
288887
288999
  }
288888
289000
  `, [IntegrationFragment]);
289001
+ var pauseIntegrationTool = graphql(`
289002
+ mutation PauseIntegrationTool($uniqueName: String!) {
289003
+ pauseIntegrationByUniqueName(uniqueName: $uniqueName) {
289004
+ ...Integration
289005
+ }
289006
+ }
289007
+ `, [IntegrationFragment]);
289008
+ var resumeIntegrationTool = graphql(`
289009
+ mutation ResumeIntegrationTool($uniqueName: String!) {
289010
+ resumeIntegrationByUniqueName(uniqueName: $uniqueName) {
289011
+ ...Integration
289012
+ }
289013
+ }
289014
+ `, [IntegrationFragment]);
288889
289015
  var integrationToolList = (gqlClient) => {
288890
289016
  return async (applicationUniqueName) => {
288891
289017
  const { integrationsByUniqueName: { items } } = await gqlClient.request(getIntegrations, { applicationUniqueName });
@@ -288913,6 +289039,14 @@ var integrationToolRestart = (gqlClient) => async (integrationUniqueName) => {
288913
289039
  const { restartIntegrationByUniqueName: integration } = await gqlClient.request(restartIntegrationTool, { uniqueName: integrationUniqueName });
288914
289040
  return integration;
288915
289041
  };
289042
+ var integrationToolPause = (gqlClient) => async (integrationUniqueName) => {
289043
+ const { pauseIntegrationByUniqueName: integration } = await gqlClient.request(pauseIntegrationTool, { uniqueName: integrationUniqueName });
289044
+ return integration;
289045
+ };
289046
+ var integrationToolResume = (gqlClient) => async (integrationUniqueName) => {
289047
+ const { resumeIntegrationByUniqueName: integration } = await gqlClient.request(resumeIntegrationTool, { uniqueName: integrationUniqueName });
289048
+ return integration;
289049
+ };
288916
289050
  var StorageFragment = graphql(`
288917
289051
  fragment Storage on Storage {
288918
289052
  __typename
@@ -288982,6 +289116,20 @@ var restartStorage = graphql(`
288982
289116
  }
288983
289117
  }
288984
289118
  `, [StorageFragment]);
289119
+ var pauseStorage = graphql(`
289120
+ mutation PauseStorage($uniqueName: String!) {
289121
+ pauseStorageByUniqueName(uniqueName: $uniqueName) {
289122
+ ...Storage
289123
+ }
289124
+ }
289125
+ `, [StorageFragment]);
289126
+ var resumeStorage = graphql(`
289127
+ mutation ResumeStorage($uniqueName: String!) {
289128
+ resumeStorageByUniqueName(uniqueName: $uniqueName) {
289129
+ ...Storage
289130
+ }
289131
+ }
289132
+ `, [StorageFragment]);
288985
289133
  var storageList = (gqlClient) => {
288986
289134
  return async (applicationUniqueName) => {
288987
289135
  const { storagesByUniqueName: { items } } = await gqlClient.request(getStorages, { applicationUniqueName });
@@ -289009,6 +289157,14 @@ var storageRestart = (gqlClient) => async (storageUniqueName) => {
289009
289157
  const { restartStorageByUniqueName: storage } = await gqlClient.request(restartStorage, { uniqueName: storageUniqueName });
289010
289158
  return storage;
289011
289159
  };
289160
+ var storagePause = (gqlClient) => async (storageUniqueName) => {
289161
+ const { pauseStorageByUniqueName: storage } = await gqlClient.request(pauseStorage, { uniqueName: storageUniqueName });
289162
+ return storage;
289163
+ };
289164
+ var storageResume = (gqlClient) => async (storageUniqueName) => {
289165
+ const { resumeStorageByUniqueName: storage } = await gqlClient.request(resumeStorage, { uniqueName: storageUniqueName });
289166
+ return storage;
289167
+ };
289012
289168
  var MiddlewareFragment = graphql(`
289013
289169
  fragment Middleware on Middleware {
289014
289170
  __typename
@@ -289109,6 +289265,20 @@ var restartMiddleware = graphql(`
289109
289265
  }
289110
289266
  }
289111
289267
  `, [MiddlewareFragment]);
289268
+ var pauseMiddleware = graphql(`
289269
+ mutation PauseMiddleware($uniqueName: String!) {
289270
+ pauseMiddlewareByUniqueName(uniqueName: $uniqueName) {
289271
+ ...Middleware
289272
+ }
289273
+ }
289274
+ `, [MiddlewareFragment]);
289275
+ var resumeMiddleware = graphql(`
289276
+ mutation ResumeMiddleware($uniqueName: String!) {
289277
+ resumeMiddlewareByUniqueName(uniqueName: $uniqueName) {
289278
+ ...Middleware
289279
+ }
289280
+ }
289281
+ `, [MiddlewareFragment]);
289112
289282
  var middlewareList = (gqlClient) => {
289113
289283
  return async (applicationUniqueName) => {
289114
289284
  const { middlewaresByUniqueName: { items } } = await gqlClient.request(getMiddlewares, { applicationUniqueName });
@@ -289153,6 +289323,14 @@ var middlewareRestart = (gqlClient) => async (middlewareUniqueName) => {
289153
289323
  const { restartMiddlewareByUniqueName: middleware } = await gqlClient.request(restartMiddleware, { uniqueName: middlewareUniqueName });
289154
289324
  return middleware;
289155
289325
  };
289326
+ var middlewarePause = (gqlClient) => async (middlewareUniqueName) => {
289327
+ const { pauseMiddlewareByUniqueName: middleware } = await gqlClient.request(pauseMiddleware, { uniqueName: middlewareUniqueName });
289328
+ return middleware;
289329
+ };
289330
+ var middlewareResume = (gqlClient) => async (middlewareUniqueName) => {
289331
+ const { resumeMiddlewareByUniqueName: middleware } = await gqlClient.request(resumeMiddleware, { uniqueName: middlewareUniqueName });
289332
+ return middleware;
289333
+ };
289156
289334
  var getPlatformConfigQuery = graphql(`
289157
289335
  query platformConfig {
289158
289336
  config {
@@ -289285,6 +289463,20 @@ var restartPrivateKey = graphql(`
289285
289463
  }
289286
289464
  }
289287
289465
  `, [PrivateKeyFragment]);
289466
+ var pausePrivateKey = graphql(`
289467
+ mutation PausePrivateKey($uniqueName: String!) {
289468
+ pausePrivateKeyByUniqueName(uniqueName: $uniqueName) {
289469
+ ...PrivateKey
289470
+ }
289471
+ }
289472
+ `, [PrivateKeyFragment]);
289473
+ var resumePrivateKey = graphql(`
289474
+ mutation ResumePrivateKey($uniqueName: String!) {
289475
+ resumePrivateKeyByUniqueName(uniqueName: $uniqueName) {
289476
+ ...PrivateKey
289477
+ }
289478
+ }
289479
+ `, [PrivateKeyFragment]);
289288
289480
  var privateKeyList = (gqlClient) => {
289289
289481
  return async (applicationUniqueName) => {
289290
289482
  const { privateKeysByUniqueName: { items } } = await gqlClient.request(getPrivateKeys, { applicationUniqueName });
@@ -289323,6 +289515,14 @@ var privateKeyRestart = (gqlClient) => async (privateKeyUniqueName) => {
289323
289515
  const { restartPrivateKeyByUniqueName: privateKey } = await gqlClient.request(restartPrivateKey, { uniqueName: privateKeyUniqueName });
289324
289516
  return privateKey;
289325
289517
  };
289518
+ var privateKeyPause = (gqlClient) => async (privateKeyUniqueName) => {
289519
+ const { pausePrivateKeyByUniqueName: privateKey } = await gqlClient.request(pausePrivateKey, { uniqueName: privateKeyUniqueName });
289520
+ return privateKey;
289521
+ };
289522
+ var privateKeyResume = (gqlClient) => async (privateKeyUniqueName) => {
289523
+ const { resumePrivateKeyByUniqueName: privateKey } = await gqlClient.request(resumePrivateKey, { uniqueName: privateKeyUniqueName });
289524
+ return privateKey;
289525
+ };
289326
289526
  var ClientOptionsSchema = exports_external.object({
289327
289527
  accessToken: AccessTokenSchema2,
289328
289528
  instance: UrlSchema2
@@ -289402,57 +289602,75 @@ function createSettleMintClient(options) {
289402
289602
  read: blockchainNetworkRead(gqlClient),
289403
289603
  create: blockchainNetworkCreate(gqlClient),
289404
289604
  delete: blockchainNetworkDelete(gqlClient),
289405
- restart: blockchainNetworkRestart(gqlClient)
289605
+ restart: blockchainNetworkRestart(gqlClient),
289606
+ pause: blockchainNetworkPause(gqlClient),
289607
+ resume: blockchainNetworkResume(gqlClient)
289406
289608
  },
289407
289609
  blockchainNode: {
289408
289610
  list: blockchainNodeList(gqlClient),
289409
289611
  read: blockchainNodeRead(gqlClient),
289410
289612
  create: blockchainNodeCreate(gqlClient),
289411
- restart: blockchainNodeRestart(gqlClient)
289613
+ restart: blockchainNodeRestart(gqlClient),
289614
+ pause: blockchainNodePause(gqlClient),
289615
+ resume: blockchainNodeResume(gqlClient)
289412
289616
  },
289413
289617
  loadBalancer: {
289414
289618
  list: loadBalancerList(gqlClient),
289415
289619
  read: loadBalancerRead(gqlClient),
289416
289620
  create: loadBalancerCreate(gqlClient),
289417
- restart: loadBalancerRestart(gqlClient)
289621
+ restart: loadBalancerRestart(gqlClient),
289622
+ pause: loadBalancerPause(gqlClient),
289623
+ resume: loadBalancerResume(gqlClient)
289418
289624
  },
289419
289625
  middleware: {
289420
289626
  list: middlewareList(gqlClient),
289421
289627
  read: middlewareRead(gqlClient),
289422
289628
  graphSubgraphs: graphMiddlewareSubgraphs(gqlClient),
289423
289629
  create: middlewareCreate(gqlClient),
289424
- restart: middlewareRestart(gqlClient)
289630
+ restart: middlewareRestart(gqlClient),
289631
+ pause: middlewarePause(gqlClient),
289632
+ resume: middlewareResume(gqlClient)
289425
289633
  },
289426
289634
  integrationTool: {
289427
289635
  list: integrationToolList(gqlClient),
289428
289636
  read: integrationToolRead(gqlClient),
289429
289637
  create: integrationToolCreate(gqlClient),
289430
- restart: integrationToolRestart(gqlClient)
289638
+ restart: integrationToolRestart(gqlClient),
289639
+ pause: integrationToolPause(gqlClient),
289640
+ resume: integrationToolResume(gqlClient)
289431
289641
  },
289432
289642
  storage: {
289433
289643
  list: storageList(gqlClient),
289434
289644
  read: storageRead(gqlClient),
289435
289645
  create: storageCreate(gqlClient),
289436
- restart: storageRestart(gqlClient)
289646
+ restart: storageRestart(gqlClient),
289647
+ pause: storagePause(gqlClient),
289648
+ resume: storageResume(gqlClient)
289437
289649
  },
289438
289650
  privateKey: {
289439
289651
  list: privateKeyList(gqlClient),
289440
289652
  read: privatekeyRead(gqlClient),
289441
289653
  create: privateKeyCreate(gqlClient),
289442
- restart: privateKeyRestart(gqlClient)
289654
+ restart: privateKeyRestart(gqlClient),
289655
+ pause: privateKeyPause(gqlClient),
289656
+ resume: privateKeyResume(gqlClient)
289443
289657
  },
289444
289658
  insights: {
289445
289659
  list: insightsList(gqlClient),
289446
289660
  read: insightsRead(gqlClient),
289447
289661
  create: insightsCreate(gqlClient),
289448
- restart: insightsRestart(gqlClient)
289662
+ restart: insightsRestart(gqlClient),
289663
+ pause: insightsPause(gqlClient),
289664
+ resume: insightsResume(gqlClient)
289449
289665
  },
289450
289666
  customDeployment: {
289451
289667
  list: customdeploymentList(gqlClient),
289452
289668
  read: customdeploymentRead(gqlClient),
289453
289669
  create: customdeploymentCreate(gqlClient),
289454
289670
  update: customdeploymentUpdate(gqlClient),
289455
- restart: customDeploymentRestart(gqlClient)
289671
+ restart: customDeploymentRestart(gqlClient),
289672
+ pause: customDeploymentPause(gqlClient),
289673
+ resume: customDeploymentResume(gqlClient)
289456
289674
  },
289457
289675
  foundry: { env: getEnv(gqlClient) },
289458
289676
  applicationAccessToken: { create: applicationAccessTokenCreate(gqlClient) },
@@ -295869,17 +296087,6 @@ async function exists3(path$1) {
295869
296087
  return false;
295870
296088
  }
295871
296089
  }
295872
- function tryParseJson3(value2, defaultValue = null) {
295873
- try {
295874
- const parsed = JSON.parse(value2);
295875
- if (parsed === undefined || parsed === null) {
295876
- return defaultValue;
295877
- }
295878
- return parsed;
295879
- } catch (err) {
295880
- return defaultValue;
295881
- }
295882
- }
295883
296090
  var require_balanced_match4 = __commonJS4({ "../../node_modules/balanced-match/index.js"(exports, module) {
295884
296091
  module.exports = balanced$1;
295885
296092
  function balanced$1(a3, b, str) {
@@ -301358,6 +301565,17 @@ var glob3 = Object.assign(glob_3, {
301358
301565
  unescape: unescape4
301359
301566
  });
301360
301567
  glob3.glob = glob3;
301568
+ function tryParseJson3(value2, defaultValue = null) {
301569
+ try {
301570
+ const parsed = JSON.parse(value2);
301571
+ if (parsed === undefined || parsed === null) {
301572
+ return defaultValue;
301573
+ }
301574
+ return parsed;
301575
+ } catch (_err) {
301576
+ return defaultValue;
301577
+ }
301578
+ }
301361
301579
  async function findMonoRepoRoot2(startDir) {
301362
301580
  const lockFilePath = await findUp([
301363
301581
  "package-lock.json",
@@ -301403,7 +301621,7 @@ function tryParseJson4(value2, defaultValue = null) {
301403
301621
  return defaultValue;
301404
301622
  }
301405
301623
  return parsed;
301406
- } catch (err) {
301624
+ } catch (_err) {
301407
301625
  return defaultValue;
301408
301626
  }
301409
301627
  }
@@ -301431,7 +301649,7 @@ async function readConfig() {
301431
301649
  try {
301432
301650
  const content = await readFile4(CONFIG_FILE, "utf-8");
301433
301651
  return tryParseJson4(content, { instances: {} });
301434
- } catch (error41) {
301652
+ } catch (_error) {
301435
301653
  return { instances: {} };
301436
301654
  }
301437
301655
  }
@@ -320557,7 +320775,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
320557
320775
  try {
320558
320776
  validate2(exports_external.string(), value4);
320559
320777
  return true;
320560
- } catch (error45) {
320778
+ } catch (_error) {
320561
320779
  return "Invalid token name";
320562
320780
  }
320563
320781
  }
@@ -320610,7 +320828,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
320610
320828
  try {
320611
320829
  validate2(ApplicationAccessTokenSchema2, aat);
320612
320830
  return aat;
320613
- } catch (error45) {}
320831
+ } catch (_error) {}
320614
320832
  }
320615
320833
  return esm_default5({
320616
320834
  message: "What is the application access token for your application in SettleMint? (format: sm_aat_...)",
@@ -320618,7 +320836,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
320618
320836
  try {
320619
320837
  validate2(ApplicationAccessTokenSchema2, value4);
320620
320838
  return true;
320621
- } catch (error45) {
320839
+ } catch (_error) {
320622
320840
  return "Invalid application access token, it should start with sm_aat_...";
320623
320841
  }
320624
320842
  }
@@ -321023,7 +321241,7 @@ async function instancePrompt({
321023
321241
  try {
321024
321242
  validate2(UrlSchema2, value4);
321025
321243
  return true;
321026
- } catch (error45) {
321244
+ } catch (_error) {
321027
321245
  return "Invalid URL";
321028
321246
  }
321029
321247
  },
@@ -321107,7 +321325,7 @@ async function serviceUrlPrompt({
321107
321325
  try {
321108
321326
  validate2(UrlSchema2, value4);
321109
321327
  return true;
321110
- } catch (error45) {
321328
+ } catch (_error) {
321111
321329
  return "Invalid URL";
321112
321330
  }
321113
321331
  },
@@ -322051,7 +322269,7 @@ async function projectNamePrompt(env2, argument) {
322051
322269
  try {
322052
322270
  validate2(exports_external.string(), value4);
322053
322271
  return true;
322054
- } catch (error45) {
322272
+ } catch (_error) {
322055
322273
  return "Invalid projectname";
322056
322274
  }
322057
322275
  }
@@ -326039,7 +326257,7 @@ async function personalAccessTokenPrompt(env2, instance, accept) {
326039
326257
  try {
326040
326258
  validate2(PersonalAccessTokenSchema2, value4);
326041
326259
  return true;
326042
- } catch (error45) {
326260
+ } catch (_error) {
326043
326261
  return "Invalid personal access token, it should start with sm_pat_...";
326044
326262
  }
326045
326263
  }
@@ -326120,7 +326338,7 @@ function loginCommand() {
326120
326338
  });
326121
326339
  try {
326122
326340
  await loginSpinner(client);
326123
- } catch (error45) {
326341
+ } catch (_error) {
326124
326342
  cancel2(`Invalid personal access token for instance ${selectedInstance}`);
326125
326343
  }
326126
326344
  await storeCredentials(personalAccessToken, selectedInstance);
@@ -326295,7 +326513,23 @@ async function waitForCompletion({
326295
326513
  while (true) {
326296
326514
  try {
326297
326515
  const resource = await service.read(uniqueName);
326298
- if (resource.status === "COMPLETED") {
326516
+ if (action === "pause" && (resource.status === "PAUSED" || resource.status === "AUTO_PAUSED")) {
326517
+ if (spinner2) {
326518
+ spinner2.text = `${capitalizeFirstLetter2(type4)} is ${getActionLabel(action)}`;
326519
+ } else {
326520
+ note(`${capitalizeFirstLetter2(type4)} is ${getActionLabel(action)}`);
326521
+ }
326522
+ return true;
326523
+ }
326524
+ if (action === "resume" && resource.status === "COMPLETED") {
326525
+ if (spinner2) {
326526
+ spinner2.text = `${capitalizeFirstLetter2(type4)} is ${getActionLabel(action)}`;
326527
+ } else {
326528
+ note(`${capitalizeFirstLetter2(type4)} is ${getActionLabel(action)}`);
326529
+ }
326530
+ return true;
326531
+ }
326532
+ if ((action === "deploy" || action === "destroy" || action === "restart") && resource.status === "COMPLETED") {
326299
326533
  if (spinner2) {
326300
326534
  spinner2.text = `${capitalizeFirstLetter2(type4)} is ${getActionLabel(action)}`;
326301
326535
  } else {
@@ -326316,7 +326550,7 @@ async function waitForCompletion({
326316
326550
  } else {
326317
326551
  note(`${capitalizeFirstLetter2(type4)} is not ready yet (status: ${resource.status})`);
326318
326552
  }
326319
- } catch (error45) {
326553
+ } catch (_error) {
326320
326554
  if (spinner2) {
326321
326555
  spinner2.text = `${capitalizeFirstLetter2(type4)} is not ready yet (status: UNKNOWN)`;
326322
326556
  } else {
@@ -326350,6 +326584,12 @@ function getActionLabel(action) {
326350
326584
  if (action === "destroy") {
326351
326585
  return "destroyed";
326352
326586
  }
326587
+ if (action === "pause") {
326588
+ return "paused";
326589
+ }
326590
+ if (action === "resume") {
326591
+ return "resumed";
326592
+ }
326353
326593
  return "deployed";
326354
326594
  }
326355
326595
 
@@ -326447,8 +326687,8 @@ function getCreateCommand({
326447
326687
  instance
326448
326688
  });
326449
326689
  const platformConfig = await settlemint.platform.config();
326450
- let selectedProvider = undefined;
326451
- let selectedRegion = undefined;
326690
+ let selectedProvider;
326691
+ let selectedRegion;
326452
326692
  if (cmd2.options.some((option) => option.long === "--provider")) {
326453
326693
  selectedProvider = await providerPrompt(platformConfig, provider);
326454
326694
  if (!selectedProvider) {
@@ -327659,7 +327899,7 @@ function privateKeyHsmCreateCommand() {
327659
327899
  return baseAction({
327660
327900
  ...defaultArgs,
327661
327901
  acceptDefaults
327662
- }, async ({ settlemint, env: env2, showSpinner, provider, region }) => {
327902
+ }, async ({ settlemint, env: env2, showSpinner, provider: _provider, region: _region }) => {
327663
327903
  const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
327664
327904
  if (!applicationUniqueName) {
327665
327905
  return missingApplication();
@@ -327948,6 +328188,237 @@ function deleteCommand() {
327948
328188
  return new Command("delete").alias("d").description("Delete a resource in the SettleMint platform").addCommand(applicationDeleteCommand()).addCommand(workspaceDeleteCommand());
327949
328189
  }
327950
328190
 
328191
+ // src/commands/platform/common/pause-command.ts
328192
+ function getPauseCommand({
328193
+ name: name3,
328194
+ type: type4,
328195
+ subType,
328196
+ alias,
328197
+ envKey,
328198
+ pauseFunction,
328199
+ usePersonalAccessToken = true
328200
+ }) {
328201
+ const commandName = sanitizeCommandName(name3);
328202
+ 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([
328203
+ {
328204
+ description: `Pauses the specified ${type4} by id`,
328205
+ command: `platform pause ${commandName} <${type4}-id>`
328206
+ },
328207
+ {
328208
+ description: `Pauses the default ${type4} in the production environment`,
328209
+ command: `platform pause ${commandName} default --prod`
328210
+ }
328211
+ ])).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 }) => {
328212
+ intro(`Pausing ${type4} in the SettleMint platform`);
328213
+ const env2 = await loadEnv(false, !!prod);
328214
+ const instance = await instancePrompt({ env: env2, accept: acceptDefaults });
328215
+ const accessToken = await getApplicationOrPersonalAccessToken({
328216
+ env: env2,
328217
+ instance,
328218
+ prefer: usePersonalAccessToken ? "personal" : "application"
328219
+ });
328220
+ const settlemint = createSettleMintClient({
328221
+ accessToken,
328222
+ instance
328223
+ });
328224
+ const isDefaultUniqueName = uniqueName === "default";
328225
+ const serviceUniqueName = isDefaultUniqueName ? typeof env2[envKey] === "string" ? env2[envKey] : null : uniqueName;
328226
+ if (!serviceUniqueName) {
328227
+ cancel2(`No default ${type4} found in your .env file. Please provide a valid ${type4} unique name or set a default ${type4} first.`);
328228
+ }
328229
+ const result = await spinner({
328230
+ startMessage: `Pausing ${type4}`,
328231
+ task: async () => {
328232
+ return pauseFunction(settlemint, serviceUniqueName);
328233
+ },
328234
+ stopMessage: `${capitalizeFirstLetter2(type4)} pause initiated`
328235
+ });
328236
+ if (wait2) {
328237
+ const isPaused = await waitForCompletion({
328238
+ settlemint,
328239
+ type: type4,
328240
+ uniqueName: serviceUniqueName,
328241
+ action: "pause"
328242
+ });
328243
+ if (!isPaused) {
328244
+ throw new Error(`Failed to pause ${type4} ${serviceUniqueName}`);
328245
+ }
328246
+ }
328247
+ outro(`${capitalizeFirstLetter2(type4)} ${result.name} pause initiated successfully`);
328248
+ });
328249
+ }
328250
+
328251
+ // src/commands/platform/blockchain-network/pause.ts
328252
+ function blockchainNetworkPauseCommand() {
328253
+ return getPauseCommand({
328254
+ name: "blockchain-network",
328255
+ type: "blockchain network",
328256
+ alias: "bnw",
328257
+ envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
328258
+ pauseFunction: async (settlemint, id) => {
328259
+ return settlemint.blockchainNetwork.pause(id);
328260
+ }
328261
+ });
328262
+ }
328263
+
328264
+ // src/commands/platform/blockchain-node/pause.ts
328265
+ function blockchainNodePauseCommand() {
328266
+ return getPauseCommand({
328267
+ name: "blockchain-node",
328268
+ type: "blockchain node",
328269
+ alias: "bn",
328270
+ envKey: "SETTLEMINT_BLOCKCHAIN_NODE",
328271
+ pauseFunction: async (settlemint, id) => {
328272
+ return settlemint.blockchainNode.pause(id);
328273
+ }
328274
+ });
328275
+ }
328276
+
328277
+ // src/commands/platform/custom-deployments/pause.ts
328278
+ function customDeploymentPauseCommand() {
328279
+ return getPauseCommand({
328280
+ name: "custom-deployment",
328281
+ type: "custom deployment",
328282
+ alias: "cd",
328283
+ envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
328284
+ pauseFunction: async (settlemint, id) => {
328285
+ return settlemint.customDeployment.pause(id);
328286
+ }
328287
+ });
328288
+ }
328289
+
328290
+ // src/commands/platform/insights/blockscout/pause.ts
328291
+ function blockscoutPauseCommand() {
328292
+ return getPauseCommand({
328293
+ name: "blockscout",
328294
+ type: "insights",
328295
+ subType: "blockscout",
328296
+ alias: "bs",
328297
+ envKey: "SETTLEMINT_BLOCKSCOUT",
328298
+ pauseFunction: async (settlemint, id) => {
328299
+ return settlemint.insights.pause(id);
328300
+ }
328301
+ });
328302
+ }
328303
+
328304
+ // src/commands/platform/integration-tools/hasura/pause.ts
328305
+ function hasuraPauseCommand() {
328306
+ return getPauseCommand({
328307
+ name: "hasura",
328308
+ type: "integration tool",
328309
+ subType: "hasura",
328310
+ alias: "ha",
328311
+ envKey: "SETTLEMINT_HASURA",
328312
+ pauseFunction: async (settlemint, id) => {
328313
+ return settlemint.integrationTool.pause(id);
328314
+ }
328315
+ });
328316
+ }
328317
+
328318
+ // src/commands/platform/load-balancer/evm/pause.ts
328319
+ function evmLoadBalancerPauseCommand() {
328320
+ return getPauseCommand({
328321
+ name: "evm",
328322
+ type: "load balancer",
328323
+ subType: "evm",
328324
+ alias: "lb",
328325
+ envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
328326
+ pauseFunction: async (settlemint, id) => {
328327
+ return settlemint.loadBalancer.pause(id);
328328
+ }
328329
+ });
328330
+ }
328331
+
328332
+ // src/commands/platform/middleware/graph/pause.ts
328333
+ function graphMiddlewarePauseCommand() {
328334
+ return getPauseCommand({
328335
+ name: "graph",
328336
+ type: "middleware",
328337
+ subType: "graph",
328338
+ alias: "gr",
328339
+ envKey: "SETTLEMINT_THEGRAPH",
328340
+ pauseFunction: async (settlemint, id) => {
328341
+ return settlemint.middleware.pause(id);
328342
+ }
328343
+ });
328344
+ }
328345
+
328346
+ // src/commands/platform/middleware/smart-contract-portal/pause.ts
328347
+ function smartContractPortalMiddlewarePauseCommand() {
328348
+ return getPauseCommand({
328349
+ name: "smart-contract-portal",
328350
+ type: "middleware",
328351
+ subType: "smart-contract-portal",
328352
+ alias: "scp",
328353
+ envKey: "SETTLEMINT_PORTAL",
328354
+ pauseFunction: async (settlemint, id) => {
328355
+ return settlemint.middleware.pause(id);
328356
+ }
328357
+ });
328358
+ }
328359
+
328360
+ // src/commands/platform/private-key/accessible-ecdsa-p256/pause.ts
328361
+ function accessibleEcdsaP256PrivateKeyPauseCommand() {
328362
+ return getPauseCommand({
328363
+ name: "accessible-ecdsa-p256",
328364
+ type: "private key",
328365
+ subType: "accessible-ecdsa-p256",
328366
+ alias: "acc",
328367
+ envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
328368
+ pauseFunction: async (settlemint, id) => {
328369
+ return settlemint.privateKey.pause(id);
328370
+ }
328371
+ });
328372
+ }
328373
+
328374
+ // src/commands/platform/private-key/hd-ecdsa-p256/pause.ts
328375
+ function hdEcdsaP256PrivateKeyPauseCommand() {
328376
+ return getPauseCommand({
328377
+ name: "hd-ecdsa-p256",
328378
+ type: "private key",
328379
+ subType: "hd-ecdsa-p256",
328380
+ alias: "hd",
328381
+ envKey: "SETTLEMINT_HD_PRIVATE_KEY",
328382
+ pauseFunction: async (settlemint, id) => {
328383
+ return settlemint.privateKey.pause(id);
328384
+ }
328385
+ });
328386
+ }
328387
+
328388
+ // src/commands/platform/storage/ipfs/pause.ts
328389
+ function ipfsStoragePauseCommand() {
328390
+ return getPauseCommand({
328391
+ name: "ipfs",
328392
+ type: "storage",
328393
+ subType: "ipfs",
328394
+ alias: "ip",
328395
+ envKey: "SETTLEMINT_IPFS",
328396
+ pauseFunction: async (settlemint, id) => {
328397
+ return settlemint.storage.pause(id);
328398
+ }
328399
+ });
328400
+ }
328401
+
328402
+ // src/commands/platform/storage/minio/pause.ts
328403
+ function minioStoragePauseCommand() {
328404
+ return getPauseCommand({
328405
+ name: "minio",
328406
+ type: "storage",
328407
+ subType: "minio",
328408
+ alias: "m",
328409
+ envKey: "SETTLEMINT_MINIO",
328410
+ pauseFunction: async (settlemint, id) => {
328411
+ return settlemint.storage.pause(id);
328412
+ }
328413
+ });
328414
+ }
328415
+
328416
+ // src/commands/platform/pause.ts
328417
+ function pauseCommand() {
328418
+ const cmd2 = new Command("pause").description("Pause a resource in the SettleMint platform").addCommand(blockchainNodePauseCommand()).addCommand(blockchainNetworkPauseCommand()).addCommand(customDeploymentPauseCommand()).addCommand(blockscoutPauseCommand()).addCommand(hasuraPauseCommand()).addCommand(evmLoadBalancerPauseCommand()).addCommand(graphMiddlewarePauseCommand()).addCommand(smartContractPortalMiddlewarePauseCommand()).addCommand(accessibleEcdsaP256PrivateKeyPauseCommand()).addCommand(hdEcdsaP256PrivateKeyPauseCommand()).addCommand(ipfsStoragePauseCommand()).addCommand(minioStoragePauseCommand());
328419
+ return cmd2;
328420
+ }
328421
+
327951
328422
  // src/commands/platform/common/restart-command.ts
327952
328423
  function getRestartCommand({
327953
328424
  name: name3,
@@ -328169,6 +328640,237 @@ function restartCommand() {
328169
328640
  return cmd2;
328170
328641
  }
328171
328642
 
328643
+ // src/commands/platform/common/resume-command.ts
328644
+ function getResumeCommand({
328645
+ name: name3,
328646
+ type: type4,
328647
+ subType,
328648
+ alias,
328649
+ envKey,
328650
+ resumeFunction,
328651
+ usePersonalAccessToken = true
328652
+ }) {
328653
+ const commandName = sanitizeCommandName(name3);
328654
+ 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([
328655
+ {
328656
+ description: `Resumes the specified ${type4} by id`,
328657
+ command: `platform resume ${commandName} <${type4}-id>`
328658
+ },
328659
+ {
328660
+ description: `Resumes the default ${type4} in the production environment`,
328661
+ command: `platform resume ${commandName} default --prod`
328662
+ }
328663
+ ])).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 }) => {
328664
+ intro(`Resuming ${type4} in the SettleMint platform`);
328665
+ const env2 = await loadEnv(false, !!prod);
328666
+ const instance = await instancePrompt({ env: env2, accept: acceptDefaults });
328667
+ const accessToken = await getApplicationOrPersonalAccessToken({
328668
+ env: env2,
328669
+ instance,
328670
+ prefer: usePersonalAccessToken ? "personal" : "application"
328671
+ });
328672
+ const settlemint = createSettleMintClient({
328673
+ accessToken,
328674
+ instance
328675
+ });
328676
+ const isDefaultUniqueName = uniqueName === "default";
328677
+ const serviceUniqueName = isDefaultUniqueName ? typeof env2[envKey] === "string" ? env2[envKey] : null : uniqueName;
328678
+ if (!serviceUniqueName) {
328679
+ cancel2(`No default ${type4} found in your .env file. Please provide a valid ${type4} unique name or set a default ${type4} first.`);
328680
+ }
328681
+ const result = await spinner({
328682
+ startMessage: `Resuming ${type4}`,
328683
+ task: async () => {
328684
+ return resumeFunction(settlemint, serviceUniqueName);
328685
+ },
328686
+ stopMessage: `${capitalizeFirstLetter2(type4)} resume initiated`
328687
+ });
328688
+ if (wait2) {
328689
+ const isResumed = await waitForCompletion({
328690
+ settlemint,
328691
+ type: type4,
328692
+ uniqueName: serviceUniqueName,
328693
+ action: "resume"
328694
+ });
328695
+ if (!isResumed) {
328696
+ throw new Error(`Failed to resume ${type4} ${serviceUniqueName}`);
328697
+ }
328698
+ }
328699
+ outro(`${capitalizeFirstLetter2(type4)} ${result.name} resume initiated successfully`);
328700
+ });
328701
+ }
328702
+
328703
+ // src/commands/platform/blockchain-network/resume.ts
328704
+ function blockchainNetworkResumeCommand() {
328705
+ return getResumeCommand({
328706
+ name: "blockchain-network",
328707
+ type: "blockchain network",
328708
+ alias: "bnw",
328709
+ envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
328710
+ resumeFunction: async (settlemint, id) => {
328711
+ return settlemint.blockchainNetwork.resume(id);
328712
+ }
328713
+ });
328714
+ }
328715
+
328716
+ // src/commands/platform/blockchain-node/resume.ts
328717
+ function blockchainNodeResumeCommand() {
328718
+ return getResumeCommand({
328719
+ name: "blockchain-node",
328720
+ type: "blockchain node",
328721
+ alias: "bn",
328722
+ envKey: "SETTLEMINT_BLOCKCHAIN_NODE",
328723
+ resumeFunction: async (settlemint, id) => {
328724
+ return settlemint.blockchainNode.resume(id);
328725
+ }
328726
+ });
328727
+ }
328728
+
328729
+ // src/commands/platform/custom-deployments/resume.ts
328730
+ function customDeploymentResumeCommand() {
328731
+ return getResumeCommand({
328732
+ name: "custom-deployment",
328733
+ type: "custom deployment",
328734
+ alias: "cd",
328735
+ envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
328736
+ resumeFunction: async (settlemint, id) => {
328737
+ return settlemint.customDeployment.resume(id);
328738
+ }
328739
+ });
328740
+ }
328741
+
328742
+ // src/commands/platform/insights/blockscout/resume.ts
328743
+ function blockscoutResumeCommand() {
328744
+ return getResumeCommand({
328745
+ name: "blockscout",
328746
+ type: "insights",
328747
+ subType: "blockscout",
328748
+ alias: "bs",
328749
+ envKey: "SETTLEMINT_BLOCKSCOUT",
328750
+ resumeFunction: async (settlemint, id) => {
328751
+ return settlemint.insights.resume(id);
328752
+ }
328753
+ });
328754
+ }
328755
+
328756
+ // src/commands/platform/integration-tools/hasura/resume.ts
328757
+ function hasuraResumeCommand() {
328758
+ return getResumeCommand({
328759
+ name: "hasura",
328760
+ type: "integration tool",
328761
+ subType: "hasura",
328762
+ alias: "ha",
328763
+ envKey: "SETTLEMINT_HASURA",
328764
+ resumeFunction: async (settlemint, id) => {
328765
+ return settlemint.integrationTool.resume(id);
328766
+ }
328767
+ });
328768
+ }
328769
+
328770
+ // src/commands/platform/load-balancer/evm/resume.ts
328771
+ function evmLoadBalancerResumeCommand() {
328772
+ return getResumeCommand({
328773
+ name: "evm",
328774
+ type: "load balancer",
328775
+ subType: "evm",
328776
+ alias: "lb",
328777
+ envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
328778
+ resumeFunction: async (settlemint, id) => {
328779
+ return settlemint.loadBalancer.resume(id);
328780
+ }
328781
+ });
328782
+ }
328783
+
328784
+ // src/commands/platform/middleware/graph/resume.ts
328785
+ function graphMiddlewareResumeCommand() {
328786
+ return getResumeCommand({
328787
+ name: "graph",
328788
+ type: "middleware",
328789
+ subType: "graph",
328790
+ alias: "gr",
328791
+ envKey: "SETTLEMINT_THEGRAPH",
328792
+ resumeFunction: async (settlemint, id) => {
328793
+ return settlemint.middleware.resume(id);
328794
+ }
328795
+ });
328796
+ }
328797
+
328798
+ // src/commands/platform/middleware/smart-contract-portal/resume.ts
328799
+ function smartContractPortalMiddlewareResumeCommand() {
328800
+ return getResumeCommand({
328801
+ name: "smart-contract-portal",
328802
+ type: "middleware",
328803
+ subType: "smart-contract-portal",
328804
+ alias: "scp",
328805
+ envKey: "SETTLEMINT_PORTAL",
328806
+ resumeFunction: async (settlemint, id) => {
328807
+ return settlemint.middleware.resume(id);
328808
+ }
328809
+ });
328810
+ }
328811
+
328812
+ // src/commands/platform/private-key/accessible-ecdsa-p256/resume.ts
328813
+ function accessibleEcdsaP256PrivateKeyResumeCommand() {
328814
+ return getResumeCommand({
328815
+ name: "accessible-ecdsa-p256",
328816
+ type: "private key",
328817
+ subType: "accessible-ecdsa-p256",
328818
+ alias: "acc",
328819
+ envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
328820
+ resumeFunction: async (settlemint, id) => {
328821
+ return settlemint.privateKey.resume(id);
328822
+ }
328823
+ });
328824
+ }
328825
+
328826
+ // src/commands/platform/private-key/hd-ecdsa-p256/resume.ts
328827
+ function hdEcdsaP256PrivateKeyResumeCommand() {
328828
+ return getResumeCommand({
328829
+ name: "hd-ecdsa-p256",
328830
+ type: "private key",
328831
+ subType: "hd-ecdsa-p256",
328832
+ alias: "hd",
328833
+ envKey: "SETTLEMINT_HD_PRIVATE_KEY",
328834
+ resumeFunction: async (settlemint, id) => {
328835
+ return settlemint.privateKey.resume(id);
328836
+ }
328837
+ });
328838
+ }
328839
+
328840
+ // src/commands/platform/storage/ipfs/resume.ts
328841
+ function ipfsStorageResumeCommand() {
328842
+ return getResumeCommand({
328843
+ name: "ipfs",
328844
+ type: "storage",
328845
+ subType: "ipfs",
328846
+ alias: "ip",
328847
+ envKey: "SETTLEMINT_IPFS",
328848
+ resumeFunction: async (settlemint, id) => {
328849
+ return settlemint.storage.resume(id);
328850
+ }
328851
+ });
328852
+ }
328853
+
328854
+ // src/commands/platform/storage/minio/resume.ts
328855
+ function minioStorageResumeCommand() {
328856
+ return getResumeCommand({
328857
+ name: "minio",
328858
+ type: "storage",
328859
+ subType: "minio",
328860
+ alias: "m",
328861
+ envKey: "SETTLEMINT_MINIO",
328862
+ resumeFunction: async (settlemint, id) => {
328863
+ return settlemint.storage.resume(id);
328864
+ }
328865
+ });
328866
+ }
328867
+
328868
+ // src/commands/platform/resume.ts
328869
+ function resumeCommand() {
328870
+ const cmd2 = new Command("resume").description("Resume a resource in the SettleMint platform").addCommand(blockchainNodeResumeCommand()).addCommand(blockchainNetworkResumeCommand()).addCommand(customDeploymentResumeCommand()).addCommand(blockscoutResumeCommand()).addCommand(hasuraResumeCommand()).addCommand(evmLoadBalancerResumeCommand()).addCommand(graphMiddlewareResumeCommand()).addCommand(smartContractPortalMiddlewareResumeCommand()).addCommand(accessibleEcdsaP256PrivateKeyResumeCommand()).addCommand(hdEcdsaP256PrivateKeyResumeCommand()).addCommand(ipfsStorageResumeCommand()).addCommand(minioStorageResumeCommand());
328871
+ return cmd2;
328872
+ }
328873
+
328172
328874
  // src/commands/platform/custom-deployments/update.ts
328173
328875
  function customDeploymentsUpdateCommand() {
328174
328876
  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([
@@ -328559,7 +329261,7 @@ function servicesCommand() {
328559
329261
  if (!applicationUniqueName) {
328560
329262
  return nothingSelectedError("application");
328561
329263
  }
328562
- let effectiveTypes = undefined;
329264
+ let effectiveTypes;
328563
329265
  if (options.type && options.type.length > 0) {
328564
329266
  effectiveTypes = options.type;
328565
329267
  } else if (typeOperands && typeOperands.length > 0) {
@@ -328617,7 +329319,7 @@ async function getServicesAndMapResults({
328617
329319
  const application = await settlemint.application.read(applicationUniqueName);
328618
329320
  const services = await servicesSpinner(settlemint, applicationUniqueName, types4);
328619
329321
  const results = (types4 ?? SERVICE_TYPES).filter((serviceType) => !types4 || types4.includes(serviceType)).map((serviceType) => {
328620
- const [_6, labels] = Object.entries(LABELS_MAP).find(([key2, value4]) => value4.command === serviceType) ?? [
329322
+ const [_6, labels] = Object.entries(LABELS_MAP).find(([_key, value4]) => value4.command === serviceType) ?? [
328621
329323
  null,
328622
329324
  { plural: serviceType }
328623
329325
  ];
@@ -328744,7 +329446,7 @@ function listCommand() {
328744
329446
 
328745
329447
  // src/commands/platform.ts
328746
329448
  function platformCommand() {
328747
- return new Command("platform").description("Manage SettleMint platform resources").addCommand(configCommand()).addCommand(createCommand3()).addCommand(deleteCommand()).addCommand(listCommand()).addCommand(restartCommand()).addCommand(updateCommand());
329449
+ return new Command("platform").description("Manage SettleMint platform resources").addCommand(configCommand()).addCommand(createCommand3()).addCommand(deleteCommand()).addCommand(listCommand()).addCommand(pauseCommand()).addCommand(resumeCommand()).addCommand(restartCommand()).addCommand(updateCommand());
328748
329450
  }
328749
329451
 
328750
329452
  // src/commands/smart-contract-set/create.ts
@@ -328794,7 +329496,7 @@ var import_which = __toESM(require_lib5(), 1);
328794
329496
  async function executeFoundryCommand(command, args) {
328795
329497
  try {
328796
329498
  await import_which.default(command);
328797
- } catch (error45) {
329499
+ } catch (_error) {
328798
329500
  cancel2("Foundry is not installed. Instructions to install Foundry can be found here: https://book.getfoundry.sh/getting-started/installation");
328799
329501
  }
328800
329502
  return executeCommand(command, args);
@@ -328882,7 +329584,7 @@ function foundryBuildCommand() {
328882
329584
  description: "Build the smart contracts with additional Forge options",
328883
329585
  command: "scs foundry build --optimize --force"
328884
329586
  }
328885
- ])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, cmd2) => {
329587
+ ])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, _cmd) => {
328886
329588
  intro("Building smart contracts using Foundry");
328887
329589
  const forgeOptions = mapPassthroughOptions(options, { args: operands });
328888
329590
  await executeFoundryCommand("forge", ["build", ...forgeOptions]);
@@ -328905,7 +329607,7 @@ function foundryFormatCommand() {
328905
329607
  description: "Format the smart contracts with additional Forge options",
328906
329608
  command: "scs foundry format --check"
328907
329609
  }
328908
- ])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, cmd2) => {
329610
+ ])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, _cmd) => {
328909
329611
  intro("Formatting smart contracts using Foundry");
328910
329612
  const forgeOptions = mapPassthroughOptions(options, { args: operands });
328911
329613
  await executeFoundryCommand("forge", ["fmt", ...forgeOptions]);
@@ -328928,7 +329630,7 @@ function foundryNetworkCommand() {
328928
329630
  description: "Start a development network using Foundry with a specific port",
328929
329631
  command: "scs foundry network --port 3000"
328930
329632
  }
328931
- ])).helpOption(false).option("-h, --help", "Get list of possible anvil options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, cmd2) => {
329633
+ ])).helpOption(false).option("-h, --help", "Get list of possible anvil options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, _cmd) => {
328932
329634
  const anvilOptions = mapPassthroughOptions(options, { args: operands });
328933
329635
  await executeFoundryCommand("anvil", anvilOptions);
328934
329636
  });
@@ -328949,7 +329651,7 @@ function foundryTestCommand() {
328949
329651
  description: "Run a specific test function",
328950
329652
  command: "scs foundry test --match-test testToken"
328951
329653
  }
328952
- ])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, cmd2) => {
329654
+ ])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, _cmd) => {
328953
329655
  intro("Running smart contract tests using Foundry");
328954
329656
  const forgeOptions = mapPassthroughOptions(options, { args: operands });
328955
329657
  await executeFoundryCommand("forge", ["test", ...forgeOptions]);
@@ -328963,7 +329665,7 @@ var validateIfRequiredPackagesAreInstalled = async (packages, cwd2) => {
328963
329665
  try {
328964
329666
  const isInstalled = await isPackageInstalled(pkg, cwd2);
328965
329667
  return { packageName: pkg, isInstalled };
328966
- } catch (err) {
329668
+ } catch (_err) {
328967
329669
  return { packageName: pkg, isInstalled: false };
328968
329670
  }
328969
329671
  }));
@@ -328988,7 +329690,7 @@ function hardhatBuildCommand() {
328988
329690
  description: "Build the smart contracts using additional options to the Hardhat compile command",
328989
329691
  command: "scs hardhat build --concurrency 2"
328990
329692
  }
328991
- ])).helpOption(false).option("-h, --help", "Get list of possible hardhat compile options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, cmd2) => {
329693
+ ])).helpOption(false).option("-h, --help", "Get list of possible hardhat compile options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, _cmd) => {
328992
329694
  intro("Building smart contracts using Hardhat");
328993
329695
  await validateIfRequiredPackagesAreInstalled(["hardhat"]);
328994
329696
  const hardhatOptions = mapPassthroughOptions(options, { args: operands });
@@ -329059,7 +329761,7 @@ async function selectTargetNode({
329059
329761
  settlemint
329060
329762
  }) {
329061
329763
  const nodeUniqueName = blockchainNodeUniqueName ?? (autoAccept ? env2.SETTLEMINT_BLOCKCHAIN_NODE : undefined);
329062
- let node = undefined;
329764
+ let node;
329063
329765
  if (!nodeUniqueName) {
329064
329766
  if (!env2.SETTLEMINT_APPLICATION) {
329065
329767
  return missingApplication();
@@ -329283,7 +329985,7 @@ function hardhatDeployRemoteCommand() {
329283
329985
  } else {
329284
329986
  note("Smart contract deployment was cancelled");
329285
329987
  }
329286
- } catch (error45) {
329988
+ } catch (_error) {
329287
329989
  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.");
329288
329990
  }
329289
329991
  });
@@ -329313,7 +330015,7 @@ function hardhatNetworkCommand() {
329313
330015
  description: "Start a development network using Hardhat with a specific port",
329314
330016
  command: "scs hardhat network --port 3000"
329315
330017
  }
329316
- ])).helpOption(false).option("-h, --help", "Get list of possible hardhat node options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, cmd2) => {
330018
+ ])).helpOption(false).option("-h, --help", "Get list of possible hardhat node options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, _cmd) => {
329317
330019
  intro("Starting development network using Hardhat");
329318
330020
  await validateIfRequiredPackagesAreInstalled(["hardhat"]);
329319
330021
  const hardhatOptions = mapPassthroughOptions(options, { args: operands });
@@ -329422,7 +330124,7 @@ function hardhatTestCommand() {
329422
330124
  description: "Run a specific test file",
329423
330125
  command: "scs hardhat test test/token.test.ts"
329424
330126
  }
329425
- ])).helpOption(false).option("-h, --help", "Get list of possible hardhat test options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, cmd2) => {
330127
+ ])).helpOption(false).option("-h, --help", "Get list of possible hardhat test options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, _cmd) => {
329426
330128
  intro("Running smart contract tests using Hardhat");
329427
330129
  await validateIfRequiredPackagesAreInstalled(["hardhat"]);
329428
330130
  const hardhatOptions = mapPassthroughOptions(options, { args: operands });
@@ -330090,4 +330792,4 @@ async function sdkCliCommand(argv = process.argv) {
330090
330792
  // src/cli.ts
330091
330793
  sdkCliCommand();
330092
330794
 
330093
- //# debugId=6DDB46D1EB7A822364756E2164756E21
330795
+ //# debugId=1A2A907D700A916864756E2164756E21