<commit_before>'use strict';

const db = require('./db');
const semver = require('semver');
const axios = require('axios').create({
  timeout: 30000,
});
const axiosRetry = require('axios-retry');

axiosRetry(axios, {
  retries: 3,
  retryDelay: axiosRetry.exponentialDelay,
  shouldResetTimeout: true,
});

const GH_ACCOUNT = process.env.GH_ACCOUNT || 'CoinSpace/CoinSpace';
const { GH_TOKEN } = process.env;

const TYPE_FILE = 'file';
const TYPE_LINK = 'link';


const platforms = [{
  // Windows application, update from app
  distribution: 'win',
  arch: 'x64',
  app: 'app',
  type: TYPE_FILE,
  pattern: /Setup\.exe$/i,
}, {
  // Windows application, electron auto update
  // Special case, we cache file content
  distribution: 'win',
  arch: 'x64',
  app: 'electron',
  type: TYPE_FILE,
  pattern: /^RELEASES$/i,
}, {
  // macOS application, electron auto update
  distribution: 'mac',
  arch: 'x64',
  app: 'electron',
  type: TYPE_FILE,
  pattern: /-darwin-x64-.*\.zip$/i,
}, {
  // macOS application, update from app
  distribution: 'mac',
  arch: 'x64',<commit_msg>feat(server): add web to update API<commit_after>'use strict';

const db = require('./db');
const semver = require('semver');
const axios = require('axios').create({
  timeout: 30000,
});
const axiosRetry = require('axios-retry');

axiosRetry(axios, {
  retries: 3,
  retryDelay: axiosRetry.exponentialDelay,
  shouldResetTimeout: true,
});

const GH_ACCOUNT = process.env.GH_ACCOUNT || 'CoinSpace/CoinSpace';
const { GH_TOKEN } = process.env;

const TYPE_FILE = 'file';
const TYPE_LINK = 'link';


const platforms = [{
  // Web wallet
  distribution: 'web',
  arch: 'any',
  app: 'app',
  type: TYPE_LINK,
  pattern: /coin\.space\/wallet/ig,
  link: 'https://coin.space/wallet/',
}, {
  // Windows application, update from app
  distribution: 'win',
  arch: 'x64',
  app: 'app',
  type: TYPE_FILE,
  pattern: /Setup\.exe$/i,
}, {
  // Windows application, electron auto update
  // Special case, we cache file content
  distribution: 'win',
  arch: 'x64',
  app: 'electron',
  type: TYPE_FILE,
  pattern: /^RELEASES$/i,
}, {
  // macOS application, electron auto update
  distribution: 'mac',
  arch: 'x64',
  app: 'electron',
  type: TYPE_FILE,
  pattern: /-darwin-x64-.*\.zip$/i,
}, {
  // macOS application, update from app
  distribution: 'mac',
  arch: 'x64',
{'fraction_non_alphanumeric': 0.1682322801024765, 'fraction_numerical': 0.013663535439795047, 'mean_word_length': 3.88125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7023000', 'n_tokens_mistral': 858, 'n_tokens_neox': 828, 'n_words': 214}