Get the details of a published repository.

    :param str name: The distribution name of the published repository.
    :param str config_path: The path to the configuration file for the aptly instance.
    :param str endpoint: The publishing endpoint.
    :param str prefix: The prefix for publishing.

    :return: A dictionary containing information about the published repository.
    :rtype: dict

    CLI Example:

    .. code-block:: bash

        salt '*' aptly.get_published name="test-dist"

def get_published(name, config_path=_DEFAULT_CONFIG_PATH, endpoint='', prefix=None):
    '''
    Get the details of a published repository.

    :param str name: The distribution name of the published repository.
    :param str config_path: The path to the configuration file for the aptly instance.
    :param str endpoint: The publishing endpoint.
    :param str prefix: The prefix for publishing.

    :return: A dictionary containing information about the published repository.
    :rtype: dict

    CLI Example:

    .. code-block:: bash

        salt '*' aptly.get_published name="test-dist"
    '''
    _validate_config(config_path)

    ret = dict()
    sources = list()
    cmd = ['publish', 'show', '-config={}'.format(config_path), name]

    if prefix:
        cmd.append('{}:{}'.format(endpoint, prefix))

    cmd_ret = _cmd_run(cmd)

    ret = _parse_show_output(cmd_ret=cmd_ret)

    if ret:
        log.debug('Found published repository: %s', name)
    else:
        log.debug('Unable to find published repository: %s', name)

    return ret