add($data); } /** * 编辑插件开发 * @param int $id * @param array $data * @return SysAttachment */ public function edit(string $key, array $data) { return (new CoreAddonDevelopService($key))->edit($data); } /** * 删除插件开发 * @param int $id * @return mixed */ public function del(string $key) { return (new CoreAddonDevelopService($key))->del(); } /** * 开发中插件 * @return array */ public function getList(string $search = '') { return (new CoreAddonService())->getAddonDevelopList($search); } /** * 查询 * @param $key * @return void */ public function getInfo($key){ return (new CoreAddonService())->getAddonDevelopInfo($key); } /** * 打包 * @param string $key * @return array */ public function build(string $key){ return (new CoreAddonDevelopBuildService())->build($key); } /** * 下载 * @param string $key * @return true */ public function download(string $key){ return (new CoreAddonDevelopBuildService())->download($key); } /** * 校验key是否被占用 * @param $key * @return array|\core\util\niucloud\http\Response|false|object|\Psr\Http\Message\ResponseInterface * @throws \GuzzleHttp\Exception\GuzzleException */ public function checkKey($key) { return ( new CoreModuleService() )->checkKey($key); } }