<commit_before>/* global tabris:false WebSocket:false debugClient:true */
(function() {

  debugClient = {

    sessionId: '{{SessionId}}',
    serverId: '{{ServerId}}',

    start() {
      this.ModulePreLoader.patchModuleClass();
      const serverUrl = tabris.app
        .getResourceLocation('package.json')
        .match(/^https?:\/\/([^/?#]+)(?:[/?#]|$)/i)[1];
      const webSocketFactory = {
        createWebSocket: () => {
          return new WebSocket(`ws://${serverUrl}/?session=${this.sessionId}&server=${this.serverId}`, '');
        }
      };
      const rc = new debugClient.RemoteConsole(webSocketFactory);
      const SUPPORTED_EVENTS = ['log', 'info', 'error', 'warn', 'debug'];<commit_msg>Enable debug-websocket on https connections<commit_after>/* global tabris:false WebSocket:false debugClient:true */
(function() {

  debugClient = {

    sessionId: '{{SessionId}}',
    serverId: '{{ServerId}}',

    start() {
      this.ModulePreLoader.patchModuleClass();
      const packageJson = tabris.app.getResourceLocation('package.json');
      const serverUrl = packageJson.match(/^https?:\/\/([^/?#]+)(?:[/?#]|$)/i)[1];
      const protocol = packageJson.indexOf('https') === 0 ? 'wss' : 'ws';
      const webSocketFactory = {
        createWebSocket: () => {
          return new WebSocket(`${protocol}://${serverUrl}/?session=${this.sessionId}&server=${this.serverId}`, '');
        }
      };
      const rc = new debugClient.RemoteConsole(webSocketFactory);
      const SUPPORTED_EVENTS = ['log', 'info', 'error', 'warn', 'debug'];
{'fraction_non_alphanumeric': 0.19897304236200256, 'fraction_numerical': 0.0019255455712451862, 'mean_word_length': 3.4670487106017194, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '1648216', 'n_tokens_mistral': 487, 'n_tokens_neox': 468, 'n_words': 80}