@settlemint/sdk-cli 1.1.5-pr96027e0e → 1.1.5-pr9a741b34

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 CHANGED
@@ -274462,7 +274462,7 @@ function pruneCurrentEnv(currentEnv, env2) {
274462
274462
  var package_default = {
274463
274463
  name: "@settlemint/sdk-cli",
274464
274464
  description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
274465
- version: "1.1.5-pr96027e0e",
274465
+ version: "1.1.5-pr9a741b34",
274466
274466
  type: "module",
274467
274467
  private: false,
274468
274468
  license: "FSL-1.1-MIT",
@@ -274510,8 +274510,8 @@ var package_default = {
274510
274510
  "@inquirer/input": "4.1.5",
274511
274511
  "@inquirer/password": "4.0.8",
274512
274512
  "@inquirer/select": "4.0.8",
274513
- "@settlemint/sdk-js": "1.1.5-pr96027e0e",
274514
- "@settlemint/sdk-utils": "1.1.5-pr96027e0e",
274513
+ "@settlemint/sdk-js": "1.1.5-pr9a741b34",
274514
+ "@settlemint/sdk-utils": "1.1.5-pr9a741b34",
274515
274515
  "@types/node": "22.13.1",
274516
274516
  "@types/semver": "7.5.8",
274517
274517
  "@types/which": "3.0.4",
@@ -275760,11 +275760,6 @@ var outro = (msg) => {
275760
275760
  console.log("");
275761
275761
  };
275762
275762
  var SpinnerError = class extends Error {
275763
- constructor(message, originalError) {
275764
- super(message);
275765
- this.originalError = originalError;
275766
- this.name = "SpinnerError";
275767
- }
275768
275763
  };
275769
275764
  var spinner = async (options) => {
275770
275765
  const handleError = (error) => {
@@ -275772,7 +275767,7 @@ var spinner = async (options) => {
275772
275767
  note(redBright(`${errorMessage}
275773
275768
 
275774
275769
  ${error.stack}`));
275775
- throw new SpinnerError(errorMessage, error);
275770
+ throw new SpinnerError(errorMessage);
275776
275771
  };
275777
275772
  if (is_in_ci_default) {
275778
275773
  try {
@@ -279778,7 +279773,6 @@ async function codegenTsconfig(env2, thegraphSubgraphNames) {
279778
279773
  const tadaConfig = {
279779
279774
  name: "gql.tada/ts-plugin",
279780
279775
  trackFieldUsage: false,
279781
- shouldCheckForColocatedFragments: false,
279782
279776
  schemas: [
279783
279777
  ...hasura ? [
279784
279778
  {
@@ -282428,8 +282422,7 @@ async function waitForCompletion({
282428
282422
  try {
282429
282423
  return await showSpinner();
282430
282424
  } catch (error5) {
282431
- const isTimeoutError = error5 instanceof SpinnerError && error5.originalError instanceof TimeoutError;
282432
- if (restartIfTimeout && isTimeoutError) {
282425
+ if (restartIfTimeout && error5 instanceof TimeoutError) {
282433
282426
  note(`Restarting ${capitalizeFirstLetter2(type4)}`);
282434
282427
  await service.restart(uniqueName);
282435
282428
  return showSpinner();
@@ -285475,7 +285468,7 @@ function subgraphDeployCommand() {
285475
285468
  SETTLEMINT_THEGRAPH: theGraphMiddleware.uniqueName,
285476
285469
  ...graphEndpoints
285477
285470
  });
285478
- outro(`Subgraph ${graphName} deployed successfully`);
285471
+ outro("Subgraph deployed successfully");
285479
285472
  });
285480
285473
  }
285481
285474
  async function updateSpecVersion(specVersion) {
@@ -285484,55 +285477,6 @@ async function updateSpecVersion(specVersion) {
285484
285477
  await updateSubgraphYamlConfig(yamlConfig);
285485
285478
  }
285486
285479
 
285487
- // src/commands/smart-contract-set/subgraph/remove.ts
285488
- import { dirname as dirname13 } from "node:path";
285489
- function subgraphRemoveCommand() {
285490
- return new Command("remove").description("Remove a subgraph").usage(createExamples([
285491
- {
285492
- description: "Remove a subgraph",
285493
- command: "scs subgraph remove my-subgraph"
285494
- }
285495
- ])).option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").option("-f, --force", "Force remove the subgraph without confirmation").argument("<subgraph-name>", "The name of the subgraph to remove").action(async (subgraphName, { prod, acceptDefaults, force }) => {
285496
- intro("Removing subgraph");
285497
- await validateIfRequiredPackagesAreInstalled(["@graphprotocol/graph-cli"]);
285498
- if (!force) {
285499
- await deleteConfirmationPrompt(`the subgraph ${subgraphName}`);
285500
- }
285501
- const autoAccept = !!acceptDefaults || is_in_ci_default;
285502
- const env2 = await loadEnv(false, !!prod);
285503
- const instance = await instancePrompt(env2, true);
285504
- const accessToken = await getApplicationOrPersonalAccessToken({
285505
- env: env2,
285506
- instance,
285507
- prefer: "application"
285508
- });
285509
- const theGraphMiddleware = await getTheGraphMiddleware({ env: env2, instance, accessToken, autoAccept });
285510
- if (!theGraphMiddleware) {
285511
- return nothingSelectedError("graph middleware");
285512
- }
285513
- if (theGraphMiddleware.status !== "COMPLETED") {
285514
- serviceNotRunningError("graph middleware", theGraphMiddleware.status);
285515
- }
285516
- const subgraphYamlFile = await getSubgraphYamlFile();
285517
- const cwd2 = dirname13(subgraphYamlFile);
285518
- const { command, args } = await getPackageManagerExecutable();
285519
- const middlewareAdminUrl = new URL(`/${encodeURIComponent(accessToken)}/admin`, theGraphMiddleware.serviceUrl).toString();
285520
- await executeCommand(command, [...args, "graph", "remove", "--node", middlewareAdminUrl, subgraphName]);
285521
- const settlemintClient = createSettleMintClient({
285522
- accessToken,
285523
- instance
285524
- });
285525
- const middleware = await settlemintClient.middleware.read(theGraphMiddleware.uniqueName);
285526
- const graphEndpoints = await getGraphEndpoint(settlemintClient, middleware);
285527
- await writeEnvSpinner(!!prod, {
285528
- ...env2,
285529
- SETTLEMINT_THEGRAPH: theGraphMiddleware.uniqueName,
285530
- ...graphEndpoints
285531
- });
285532
- outro(`Subgraph ${subgraphName} removed successfully`);
285533
- });
285534
- }
285535
-
285536
285480
  // src/commands/smart-contract.set.ts
285537
285481
  function smartContractSetCommand() {
285538
285482
  const foundry = new Command("foundry").alias("f").description("Foundry commands for building and testing smart contracts");
@@ -285550,7 +285494,6 @@ function smartContractSetCommand() {
285550
285494
  subgraph.addCommand(subgraphBuildCommand());
285551
285495
  subgraph.addCommand(subgraphCodegenCommand());
285552
285496
  subgraph.addCommand(subgraphDeployCommand());
285553
- subgraph.addCommand(subgraphRemoveCommand());
285554
285497
  return new Command("smart-contract-set").alias("scs").description("Manage smart contract sets and subgraphs").addCommand(createCommand4()).addCommand(foundry).addCommand(hardhat).addCommand(subgraph);
285555
285498
  }
285556
285499
 
@@ -285608,22 +285551,12 @@ function addHooksToCommand(cmd2, rootCmd, argv) {
285608
285551
  addHooksToCommand(subcmd, rootCmd, argv);
285609
285552
  }
285610
285553
  }
285611
- var ERRORS_TO_IGNORE = [ExitPromptError, AbortPromptError, ValidationError, CancelPromptError];
285612
- var ERROR_CODES_TO_IGNORE = [
285613
- "commander.help",
285614
- "commander.missingArgument",
285615
- "commander.optionMissingArgument",
285616
- "commander.missingMandatoryOptionValue",
285617
- "commander.conflictingOption",
285618
- "commander.unknownOption",
285619
- "commander.excessArguments",
285620
- "commander.unknownCommand"
285621
- ];
285622
285554
  async function onError(sdkcli, argv, error5) {
285623
- if (ERRORS_TO_IGNORE.some((errorToIgnore) => error5 instanceof errorToIgnore)) {
285555
+ const errorsToIgnore = [ExitPromptError, AbortPromptError, ValidationError, CancelPromptError];
285556
+ if (errorsToIgnore.some((errorToIgnore) => error5 instanceof errorToIgnore)) {
285624
285557
  process.exit(0);
285625
285558
  }
285626
- if (error5 instanceof CommanderError && (error5.exitCode === 0 || ERROR_CODES_TO_IGNORE.includes(error5.code))) {
285559
+ if (error5 instanceof CommanderError && (error5.exitCode === 0 || error5.code === "commander.help")) {
285627
285560
  process.exit(error5.exitCode);
285628
285561
  }
285629
285562
  if (!(error5 instanceof CancelError2 || error5 instanceof SpinnerError)) {
@@ -285672,4 +285605,4 @@ async function sdkCliCommand(argv = process.argv) {
285672
285605
  // src/cli.ts
285673
285606
  sdkCliCommand();
285674
285607
 
285675
- //# debugId=E64417707C7034CF64756E2164756E21
285608
+ //# debugId=AE560069B1DC5A2564756E2164756E21