UNPKG

@sodacore/cli

Version:

Sodacore CLI is a plugin that offers CLI functionality within the framework.

9 lines (8 loc) 329 B
import { Utils } from '@sodacore/di'; export function Command(test) { return (target, propertyKey) => { const methods = Utils.getMeta('methods', 'cli')(target, undefined, []); methods.push({ key: String(propertyKey), method: 'GET', test }); Utils.setMeta('methods', 'http')(target, methods); }; }