protected function resolveExtensionName($path)
    {
        preg_match("/src(.*?)src/", dirname($path), $match);
        if (!isset($match[1])) {
            throw new \Exception('Unable to resolve valid module path');
        }
        $name = trim($match[1], DIRECTORY_SEPARATOR);
        if (!starts_with($name, ['components', 'modules'])) {
            return false;
        }
        return str_replace('\\', '/', $name);
    }