···5555 echo "-> Debug: node $(node --version 2>/dev/null || echo 'node-not-found')"
5656 echo "-> Debug: pnpm $(pnpm --version 2>/dev/null || echo 'pnpm-not-found')"
5757 echo "-> Debug: pwd $(pwd)"
5858- echo "-> Running pnpm exec for openapi-ts (workspace-aware if available)"
5959- # Use `pnpm -w exec` when available so the CLI binary from the workspace is resolved in CI
6060- if pnpm -w -s --version >/dev/null 2>&1; then
6161- pnpm -w -s exec openapi-ts
5858+ echo "-> Running pnpm run openapi-ts (invokes package script in example)"
5959+ # Run the example's package script so pnpm resolves the workspace binary correctly
6060+ # Use silent mode to keep logs concise but preserve errors
6161+ echo "--- begin openapi-ts output ---"
6262+ if pnpm -s --version >/dev/null 2>&1; then
6363+ pnpm -s run openapi-ts || rc=$?
6264 else
6363- pnpm -s exec openapi-ts
6565+ pnpm run openapi-ts || rc=$?
6666+ fi
6767+ rc=${rc:-0}
6868+ echo "--- end openapi-ts output (rc=$rc) ---"
6969+ if [ "$rc" -ne 0 ]; then
7070+ echo "openapi-ts failed with exit code $rc"
7171+ exit $rc
6472 fi
65736674 # Format generated files in this example only to keep the step fast