@settlemint/sdk-cli 2.6.3-pr88f1ab51 → 2.6.3-pre3cdc339

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
@@ -263167,8 +263167,13 @@ var CommandError = class extends Error {
263167
263167
  this.output = output;
263168
263168
  }
263169
263169
  };
263170
+ function isQuietMode() {
263171
+ return !!(process.env.CLAUDECODE || process.env.REPL_ID || process.env.AGENT);
263172
+ }
263170
263173
  async function executeCommand(command, args, options) {
263171
263174
  const { silent, ...spawnOptions } = options ?? {};
263175
+ const quietMode = isQuietMode();
263176
+ const shouldSuppressOutput = quietMode ? silent !== false : !!silent;
263172
263177
  const child = spawn(command, args, {
263173
263178
  ...spawnOptions,
263174
263179
  env: {
@@ -263178,23 +263183,38 @@ async function executeCommand(command, args, options) {
263178
263183
  });
263179
263184
  process.stdin.pipe(child.stdin);
263180
263185
  const output = [];
263186
+ const stdoutOutput = [];
263187
+ const stderrOutput = [];
263181
263188
  return new Promise((resolve, reject) => {
263182
263189
  child.stdout.on("data", (data) => {
263183
263190
  const maskedData = maskTokens(data.toString());
263184
- if (!silent) {
263191
+ if (!shouldSuppressOutput) {
263185
263192
  process.stdout.write(maskedData);
263186
263193
  }
263187
263194
  output.push(maskedData);
263195
+ stdoutOutput.push(maskedData);
263188
263196
  });
263189
263197
  child.stderr.on("data", (data) => {
263190
263198
  const maskedData = maskTokens(data.toString());
263191
- if (!silent) {
263199
+ if (!shouldSuppressOutput) {
263192
263200
  process.stderr.write(maskedData);
263193
263201
  }
263194
263202
  output.push(maskedData);
263203
+ stderrOutput.push(maskedData);
263195
263204
  });
263205
+ const showErrorOutput = () => {
263206
+ if (quietMode && shouldSuppressOutput && output.length > 0) {
263207
+ if (stdoutOutput.length > 0) {
263208
+ process.stdout.write(stdoutOutput.join(""));
263209
+ }
263210
+ if (stderrOutput.length > 0) {
263211
+ process.stderr.write(stderrOutput.join(""));
263212
+ }
263213
+ }
263214
+ };
263196
263215
  child.on("error", (err) => {
263197
263216
  process.stdin.unpipe(child.stdin);
263217
+ showErrorOutput();
263198
263218
  reject(new CommandError(err.message, "code" in err && typeof err.code === "number" ? err.code : 1, output));
263199
263219
  });
263200
263220
  child.on("close", (code) => {
@@ -263203,6 +263223,7 @@ async function executeCommand(command, args, options) {
263203
263223
  resolve(output);
263204
263224
  return;
263205
263225
  }
263226
+ showErrorOutput();
263206
263227
  reject(new CommandError(`Command "${command}" exited with code ${code}`, code, output));
263207
263228
  });
263208
263229
  });
@@ -282031,7 +282052,7 @@ function pruneCurrentEnv(currentEnv, env2) {
282031
282052
  var package_default = {
282032
282053
  name: "@settlemint/sdk-cli",
282033
282054
  description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
282034
- version: "2.6.3-pr88f1ab51",
282055
+ version: "2.6.3-pre3cdc339",
282035
282056
  type: "module",
282036
282057
  private: false,
282037
282058
  license: "FSL-1.1-MIT",
@@ -282085,10 +282106,10 @@ var package_default = {
282085
282106
  "@inquirer/input": "4.2.5",
282086
282107
  "@inquirer/password": "4.0.21",
282087
282108
  "@inquirer/select": "4.4.0",
282088
- "@settlemint/sdk-hasura": "2.6.3-pr88f1ab51",
282089
- "@settlemint/sdk-js": "2.6.3-pr88f1ab51",
282090
- "@settlemint/sdk-utils": "2.6.3-pr88f1ab51",
282091
- "@settlemint/sdk-viem": "2.6.3-pr88f1ab51",
282109
+ "@settlemint/sdk-hasura": "2.6.3-pre3cdc339",
282110
+ "@settlemint/sdk-js": "2.6.3-pre3cdc339",
282111
+ "@settlemint/sdk-utils": "2.6.3-pre3cdc339",
282112
+ "@settlemint/sdk-viem": "2.6.3-pre3cdc339",
282092
282113
  "@types/node": "24.10.0",
282093
282114
  "@types/semver": "7.7.1",
282094
282115
  "@types/which": "3.0.4",
@@ -282105,7 +282126,7 @@ var package_default = {
282105
282126
  },
282106
282127
  peerDependencies: {
282107
282128
  hardhat: "<= 4",
282108
- "@settlemint/sdk-js": "2.6.3-pr88f1ab51"
282129
+ "@settlemint/sdk-js": "2.6.3-pre3cdc339"
282109
282130
  },
282110
282131
  peerDependenciesMeta: {
282111
282132
  hardhat: {
@@ -323414,4 +323435,4 @@ async function sdkCliCommand(argv = process.argv) {
323414
323435
  // src/cli.ts
323415
323436
  sdkCliCommand();
323416
323437
 
323417
- //# debugId=43E1D8728748CAA864756E2164756E21
323438
+ //# debugId=071C576217AE95C964756E2164756E21