HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux WebLive 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wptoho/wp-content/plugins/defender-security/extra/shared-tasks/loader.js
module.exports = function (grunt) {
	'use strict';

	var wpmudev = {};

	wpmudev.files = require('./files')(grunt);
	wpmudev.environment = require('./environment')(grunt);

	wpmudev.loader = {
		dependencies: {
			"makepot": "grunt-wp-i18n",
			"clean": "grunt-contrib-clean",
			"compress": "grunt-contrib-compress",
			"copy": "grunt-contrib-copy"
		},
		load: function () {
			grunt.verbose.subhead("Loading WPMU DEV tasks");

			grunt.file.expand({
				filter: 'isFile'
			}, wpmudev.files.stem_path('external', 'shared-tasks') + '/**/wpmudev_*.js').forEach(function (task) {
				grunt.verbose.writeln("Loading task definition file", task);
				require('../' + task)(grunt, wpmudev);
			});
		},
		setup: function () {
			grunt.verbose.subhead("Checking WPMU DEV task dependencies");
			var spawn = require('child_process').spawnSync,
				which = require('which').sync,
				has_missing = false
			;

			for (var task in wpmudev.loader.dependencies) {
				if (wpmudev.environment.has_task(task)) continue;

				var dep = wpmudev.loader.dependencies[task];

				has_missing = true;
				grunt.log.warn("Missing task dependency:", dep);

				spawn(
					which('npm'),
					['install', '--save-dev', dep],
					{
						stdio: 'inherit',
						shell: true
					}
				);
				grunt.verbose.writeln("Loading npm-defined tasks for", dep);
				grunt.task.loadNpmTasks(dep);
			}

			if (has_missing) {
				grunt.log.writeln("Some missing dependencies installed, please make sure you commit your package.json".red.bold);
			}

			return wpmudev.loader.load();
		},
	};

	wpmudev.loader.setup();

	return wpmudev;

};