<commit_before>/*
 * This file is part of NectarJS
 * Copyright (c) 2020 <NAME>
 * http://nectarjs.com - https://nectrium.com
 *
 * sources : https://github.com/nectarjs/nectarjs
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

var NODE =
{
  name: "node",
  main: "node.cpp",
  compiler: "g++",
  stdlib: ["console", "Object", "Math", "JSON"],
  check: {
		"env": {
			"node": true,
			"es6": true
		},
		"extends": "eslint:recommended",
		"rules": {
			"no-console": "off",
			"indent": "off",
			"linebreak-style": "off",
			"semi": [
				"warn",
				"always"
			],
			"no-unused-vars": ["warn", { "vars": "all", "args": "after-used", "ignoreRestSiblings": false }],
			"no-undef": "error",
			"no-redeclare": ["error", { "builtinGlobals": false }],
		},
		"globals":
		{
			"__njs_typeof": false,
			"console": false,
			"module": false,
			"require": false,
			"__NJS_Log_Console": false,
			"__NJS_Object_Keys": false,
			"__NJS_PLATFORM": false,
			"__NJS_ENV": false,			
            "__NJS_Call_Function": false,
			"__NJS_ARGS": false,
			"JSON": false,
			"Object": false,
		}
	},
  cli: function(compiler, preset, out, _in, option)
  {
	var _stack = 0;
	if(CLI.cli["--stack"])
	{
		try 
		{
			_stack = parseInt(CLI.cli["--stack"].argument);
		}
		catch(e)
		{
			console.log("[!] Error: --stack flags required a number, received -> " + CLI.cli["--stack"].argument);
			process.exit(1);
		}
	}
	if(compiler == "cl" || compiler.indexOf("cl ") == 0)
	{
		if(_stack) _stack = "/F " + _stack;
        else _stack = "";

		if(preset == "none") return `${compiler} ${_stack} ${_in} /std:c++14 /D CL_WINDOWS=1 /I "${CONFIG.win_inc_ucrt}" "${CONFIG.win_lib_um}\\Uuid.Lib" "${CONFIG.win_lib_um}\\kernel32.Lib" "${CONFIG.win_lib_ucrt}\\libucrt.lib" /EHsc  ${COMPILER.LIBS} /o  ${out}`;
		else if(preset == "size") return `${compiler} ${_stack} ${_in} /std:c++14 /D CL_WINDOWS=1 /O1 /I "${CONFIG.win_inc_ucrt}" "${CONFIG.win_lib_um}\\Uuid.Lib" "${CONFIG.win_lib_um}\\kernel32.Lib" "${CONFIG.win_lib_ucrt}\\libucrt.lib" /EHsc ${COMPILER.LIBS} /o  ${out}`;
		else if(preset == "speed") return `${compiler} ${_stack} ${_in} /std:c++14 /D CL_WINDOWS=1 /Ox /I "${CONFIG.win_inc_ucrt}" "${CONFIG.win_lib_um}\\Uuid.Lib" "${CONFIG.win_lib_um}\\kernel32.Lib" "${CONFIG.win_lib_ucrt}\\libucrt.lib" /EHsc ${COMPILER.LIBS} /o  ${out}`;
	}

	var _uvParam = "";
	if(os.platform() == "win32") _uvParam = `-D_WIN32_WINNT=0x0600 -Wno-narrowing  -D_GNU_SOURCE -I${extern}/libuv/include/ -I${extern}/libuv/src/ -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE ${extern}/libuv/src/*.h ${extern}/libuv/src/*.c ${extern}/libuv/src/win/*.h ${extern}/libuv/src/win/*.c`;
	
	var _uvLib = "-luv ";
	if(os.platform() == "win32") _uvLib += "-lm  -ladvapi32 -liphlpapi -lpsapi -lshell32 -luser32  -luserenv -lwsock32 -lws2_32";
	if(os.platform() == "sunos") _uvLib += "-lkstat -lsendfile -lsocket -lnsl";
	
	if(_stack) _stack = "-Wl,--stack," + _stack;
    else _stack = "";

	  if(preset == "none")
	  {
		  return `${compiler} ${_stack} -std=c++11 ${_uvParam} ${_in} -O1 -fpermissive -w -s ${COMPILER.LIBS} ${_uvLib} -o a.exe && mv a.exe ${out}`;
	  }
	  else if(preset == "size")
	  {
		  return `${compiler} ${_stack} -std=c++11 ${_uvParam} ${_in} -Os -fno-rtti -fno-stack-protector -fomit-frame-pointer -fpermissive -w -s ${COMPILER.LIBS}  ${_uvLib} -o a.exe && mv a.exe ${out}`;
	  }
	  else
	  {
		var _opt = "-O";
            if(os.platform() == "darwin" || compiler.indexOf("clang") > -1) _opt += "3";
            else _opt += "fast";

            return `${compiler} ${_stack} -std=c++11 ${_uvParam} ${_in} ${_opt} -fpermissive -w -s ${COMPILER.LIBS}  ${_uvLib} -o a.exe && mv a.exe ${out}`;
	  }
  }
}

module.exports = NODE;
<commit_msg>Update node.js<commit_after>/*
 * This file is part of NectarJS
 * Copyright (c) 2020 <NAME>
 * http://nectarjs.com - https://nectrium.com
 *
 * sources : https://github.com/nectarjs/nectarjs
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

var NODE =
{
  name: "node",
  main: "node.cpp",
  compiler: "g++",
  stdlib: ["console", "Object", "Math", "JSON"],
  check: {
		"env": {
			"node": true,
			"es6": true
		},
		"extends": "eslint:recommended",
		"rules": {
			"no-console": "off",
			"indent": "off",
			"linebreak-style": "off",
			"semi": [
				"warn",
				"always"
			],
			"no-unused-vars": ["warn", { "vars": "all", "args": "after-used", "ignoreRestSiblings": false }],
			"no-undef": "error",
			"no-redeclare": ["error", { "builtinGlobals": false }],
		},
		"globals":
		{
			"__njs_typeof": false,
			"console": false,
			"module": false,
			"require": false,
			"__NJS_Log_Console": false,
			"__NJS_Object_Keys": false,
			"__NJS_PLATFORM": false,
			"__NJS_ENV": false,			
            "__NJS_Call_Function": false,
			"__NJS_ARGS": false,
			"JSON": false,
			"Object": false,
		}
	},
  cli: function(compiler, preset, out, _in, option)
  {
	var _stack = 0;
	if(CLI.cli["--stack"])
	{
		try 
		{
			_stack = parseInt(CLI.cli["--stack"].argument);
		}
		catch(e)
		{
			console.log("[!] Error: --stack flags required a number, received -> " + CLI.cli["--stack"].argument);
			process.exit(1);
		}
	}
	if(compiler == "cl" || compiler.indexOf("cl ") == 0)
	{
		if(_stack) _stack = "/F " + _stack;
        else _stack = "";

		if(preset == "none") return `${compiler} ${_stack} ${_in} /std:c++14 /D CL_WINDOWS=1 /I "${CONFIG.win_inc_ucrt}" "${CONFIG.win_lib_um}\\Uuid.Lib" "${CONFIG.win_lib_um}\\kernel32.Lib" "${CONFIG.win_lib_ucrt}\\libucrt.lib" /EHsc  ${COMPILER.LIBS} /o  ${out}`;
		else if(preset == "size") return `${compiler} ${_stack} ${_in} /std:c++14 /D CL_WINDOWS=1 /O1 /I "${CONFIG.win_inc_ucrt}" "${CONFIG.win_lib_um}\\Uuid.Lib" "${CONFIG.win_lib_um}\\kernel32.Lib" "${CONFIG.win_lib_ucrt}\\libucrt.lib" /EHsc ${COMPILER.LIBS} /o  ${out}`;
		else if(preset == "speed") return `${compiler} ${_stack} ${_in} /std:c++14 /D CL_WINDOWS=1 /Ox /I "${CONFIG.win_inc_ucrt}" "${CONFIG.win_lib_um}\\Uuid.Lib" "${CONFIG.win_lib_um}\\kernel32.Lib" "${CONFIG.win_lib_ucrt}\\libucrt.lib" /EHsc ${COMPILER.LIBS} /o  ${out}`;
	}

	var _uvParam = "";
	if(os.platform() == "win32") _uvParam = `-D_WIN32_WINNT=0x0600 -Wno-narrowing  -D_GNU_SOURCE -I${extern}/libuv/include/ -I${extern}/libuv/src/ -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE ${extern}/libuv/src/*.h ${extern}/libuv/src/*.c ${extern}/libuv/src/win/*.h ${extern}/libuv/src/win/*.c`;
	
	var _uvLib = "-luv ";
	if(os.platform() == "win32") _uvLib = "-lm  -ladvapi32 -liphlpapi -lpsapi -lshell32 -luser32  -luserenv -lwsock32 -lws2_32";
	if(os.platform() == "sunos") _uvLib += "-lkstat -lsendfile -lsocket -lnsl";
	
	if(_stack) _stack = "-Wl,--stack," + _stack;
    else _stack = "";

	  if(preset == "none")
	  {
		  return `${compiler} ${_stack} -std=c++11 ${_uvParam} ${_in} -O1 -fpermissive -w -s ${COMPILER.LIBS} ${_uvLib} -o a.exe && mv a.exe ${out}`;
	  }
	  else if(preset == "size")
	  {
		  return `${compiler} ${_stack} -std=c++11 ${_uvParam} ${_in} -Os -fno-rtti -fno-stack-protector -fomit-frame-pointer -fpermissive -w -s ${COMPILER.LIBS}  ${_uvLib} -o a.exe && mv a.exe ${out}`;
	  }
	  else
	  {
		var _opt = "-O";
            if(os.platform() == "darwin" || compiler.indexOf("clang") > -1) _opt += "3";
            else _opt += "fast";

            return `${compiler} ${_stack} -std=c++11 ${_uvParam} ${_in} ${_opt} -fpermissive -w -s ${COMPILER.LIBS}  ${_uvLib} -o a.exe && mv a.exe ${out}`;
	  }
  }
}

module.exports = NODE;

{'fraction_non_alphanumeric': 0.20174431948588478, 'fraction_numerical': 0.012852880422308928, 'mean_word_length': 3.4081942336874054, 'pattern_counts': {'":': 58, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, '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': '895139', 'n_tokens_mistral': 3688, 'n_tokens_neox': 3413, 'n_words': 795}