function fetchPlugins()

in scripts/fetchPlugins.js [8:24]


function fetchPlugins() {
  fetch(url)
    .then(function(response) {
      if (!response.ok) {
        throw new Error('HTTP error! status:', response.status);
      }
      return response.text();
    })
    .then(function(data) {
      fs.mkdirSync(path.dirname(outputPath), { recursive: true });
      fs.writeFileSync(outputPath, data, 'utf8');
      console.log('Data fetched and saved to', outputPath);
    })
    .catch(function (error) {
      console.error('Error fetching data:', error.message);
    });
}