• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ossia / score / 36213733900

26 Sep 2026 03:05AM UTC coverage: 42.353% (+0.1%) from 42.23%
36213733900

Pull #2310

github

web-flow
Merge 9f9d60cd9 into c0c64ec39
Pull Request #2310: bitfocus: host companion modules the way companion does

41 of 2024 new or added lines in 11 files covered. (2.03%)

210 existing lines in 15 files now uncovered.

126773 of 299323 relevant lines covered (42.35%)

118427.51 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/plugins/score-plugin-protocols/Protocols/Bitfocus/BitfocusNodeRuntime.cpp
1
#include "BitfocusContext.hpp"
2

3
#include <Library/LibrarySettings.hpp>
4

5
#include <score/application/ApplicationContext.hpp>
6

7
#include <ossia/detail/flat_map.hpp>
8

9
#include <QDir>
10
#include <QDirIterator>
11
#include <QFile>
12

13
namespace bitfocus
14
{
NEW
15
QString nodeExecutable(const QString& nodeVersion)
×
16
{
NEW
17
  static ossia::flat_map<QString, QString> node_path_cache;
×
NEW
18
  if(node_path_cache.empty())
×
19
  {
NEW
20
    const auto& set = score::AppContext().settings<Library::Settings::Model>();
×
NEW
21
    QString path = set.getPackagesPath() + "/companion-modules/node-runtime";
×
NEW
22
    if(QDir{path}.exists())
×
23
    {
NEW
24
      QDirIterator d{
×
NEW
25
          path, QDir::Dirs | QDir::NoDotAndDotDot, QDirIterator::NoIteratorFlags};
×
NEW
26
      while(d.hasNext())
×
27
      {
NEW
28
        QString name = d.next();
×
NEW
29
        auto version = QDir{name}.dirName().split('.');
×
NEW
30
        if(!version.isEmpty())
×
31
        {
NEW
32
          QString path = name;
×
33
#if defined(_WIN32)
34
          path += "/node.exe";
35
#else
NEW
36
          path += "/bin/node";
×
37
#endif
NEW
38
          node_path_cache["node" + version.front()] = path;
×
39

NEW
40
          QFile p{path};
×
NEW
41
          p.setPermissions(p.permissions() | QFile::Permission::ExeUser);
×
NEW
42
        }
×
NEW
43
      }
×
NEW
44
    }
×
NEW
45
  }
×
46

NEW
47
  if(auto it = node_path_cache.find(nodeVersion); it != node_path_cache.end())
×
NEW
48
    return it->second;
×
49

50
  // Hope it's in the PATH
51
#if defined(_WIN32)
52
  return "node.exe";
53
#else
NEW
54
  return "node";
×
55
#endif
NEW
56
}
×
57
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc