public function makeEngine($type, array $script_config = [])
    {
        if (!empty($disable = config('df.scripting.disable'))) {
            switch (strtolower($disable)) {
                case 'all':
                    throw new ServiceUnavailableException("All scripting is disabled for this instance.");
                    break;
                default:
                    if (!empty($type) && (false !== stripos($disable, $type))) {
                        throw new ServiceUnavailableException("Scripting with $type is disabled for this instance.");
                    }
                    break;
            }
        }

        $config = $this->getConfig($type);

        // Next we will check to see if a type extension has been registered for a engine type
        // and will call the factory Closure if so, which allows us to have a more generic
        // resolver for the engine types themselves which applies to all scripting.
        if (isset($this->types[$type])) {
            return $this->types[$type]->make(array_merge($config, $script_config));
        }

        throw new InvalidArgumentException("Unsupported script engine type '$type'.");
    }