sim 2.1.4-dev.64.1 → 2.1.4-dev.65.1

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 (2) hide show
  1. package/dist/index.js +10 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2316,6 +2316,13 @@ import { dirname } from "node:path";
2316
2316
 
2317
2317
  // src/embed-context.ts
2318
2318
  import { AsyncLocalStorage } from "node:async_hooks";
2319
+ function setSoftExitCode(code) {
2320
+ const ctx = embedStore.getStore();
2321
+ if (ctx)
2322
+ ctx.softExitCode = code;
2323
+ else
2324
+ process.exitCode = code;
2325
+ }
2319
2326
  var embedStore = new AsyncLocalStorage;
2320
2327
  function embeddedProfile() {
2321
2328
  const ctx = embedStore.getStore();
@@ -11860,7 +11867,7 @@ function whoamiCommand() {
11860
11867
  });
11861
11868
  const exitCode = WHOAMI_EXIT_CODES[verification.status];
11862
11869
  if (exitCode !== 0)
11863
- process.exitCode = exitCode;
11870
+ setSoftExitCode(exitCode);
11864
11871
  });
11865
11872
  }
11866
11873
  var PROFILE_COLUMNS = [
@@ -16089,7 +16096,7 @@ function attachWorkflowRunWait(runs) {
16089
16096
  const message = explain(outcome, runId, options.workflow, snapshot);
16090
16097
  if (message)
16091
16098
  console.error(source_default.red(message));
16092
- process.exitCode = WAIT_EXIT_CODES[outcome];
16099
+ setSoftExitCode(WAIT_EXIT_CODES[outcome]);
16093
16100
  return;
16094
16101
  }
16095
16102
  const remainingMs = deadline - Date.now();
@@ -16097,7 +16104,7 @@ function attachWorkflowRunWait(runs) {
16097
16104
  progress.finish();
16098
16105
  renderResult("getWorkflowRun", profile.output, raw, runSpec());
16099
16106
  console.error(source_default.red(`Timed out after ${timeoutSeconds}s waiting for run ${runId} (status: ${snapshot.status}${snapshot.resumeAt ? `, resuming at ${snapshot.resumeAt}` : ""}). Raise ${WAIT_TIMEOUT_FLAG}, or set it to 0 to wait indefinitely.`));
16100
- process.exitCode = WAIT_EXIT_CODES.timeout;
16107
+ setSoftExitCode(WAIT_EXIT_CODES.timeout);
16101
16108
  return;
16102
16109
  }
16103
16110
  progress.advance(snapshot.status, Date.now() - startedAt);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sim",
3
- "version": "2.1.4-dev.64.1",
3
+ "version": "2.1.4-dev.65.1",
4
4
  "description": "Sim CLI - talk to the Sim API from your terminal",
5
5
  "type": "module",
6
6
  "bin": {