{"size": 1128, "ext": "js", "max_stars_repo_path": "packages/action/dist/ActionDecoratorUtil.js", "max_stars_repo_name": "chazeprasad/lettuce", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "packages/action/dist/ActionDecoratorUtil.js", "max_issues_repo_name": "chazeprasad/lettuce", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "packages/action/dist/ActionDecoratorUtil.js", "max_forks_repo_name": "chazeprasad/lettuce", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 37.6, "max_line_length": 71, "alphanum_fraction": 0.5895390071}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ActionDecoratorUtil = void 0;
class ActionDecoratorUtil {
    static DestructRouteDecorator(args) {
        if (args.length === 0) {
            throw new Error('Missing Route path');
        }
        if (typeof args !== 'string' && typeof args[0] !== 'string') {
            throw new Error('Route path must be string');
        }
        const list = args.length > 1 ? args[1] : [];
        const path = typeof args !== 'string' ? args[0] : args;
        return { path, middlewareList: list };
    }
    static DestructApiDecorator(args) {
        if (args.length === 0) {
            throw new Error('Missing Route path');
        }
        if (typeof args !== 'string' && typeof args[0] !== 'string') {
            throw new Error('Route path must be string');
        }
        const path = typeof args !== 'string' ? args[0] : args;
        return { path };
    }
}
exports.ActionDecoratorUtil = ActionDecoratorUtil;
ActionDecoratorUtil.ROUTE_PREFIX = '$$route_';
ActionDecoratorUtil.GetClassName = (target) => target.constructor.name;
