public function run(): string
    {
        $out = '';
        $this->_dependencies = array_unique($this->_dependencies);

        $out .= $this->getNamespaceDefinitions();
        $this->addCurrentController();

        foreach ($this->_dependencies as $dependency) {
            if (strpos($dependency, DS) !== false) {
                $dependency = str_replace(DS, '/', $dependency);
            }
            $jsFile = $this->Html->script($dependency);
            $out .= $jsFile . "\n";
        }
        $out .= $this->getAppDataJs($this->_frontendData);
        $out .= $this->Html->script('/frontend_bridge/js/bootstrap.js');

        return $out;
    }