From d2a6e6d3198cba9f56097d3559baec24c90edcf1 Mon Sep 17 00:00:00 2001 From: terwer Date: Sat, 24 Jun 2023 18:46:02 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E7=89=88=E6=8C=82=E4=BB=B6-?= =?UTF-8?q?=E9=9B=86=E6=88=90=20API=20=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/adaptors/github/GithubApiAdaptor.ts | 4 +-- .../wordpress/adaptor/wordpressApiAdaptor.ts | 4 +-- src/adaptors/wordpress/wordpressConstants.ts | 4 +-- src/adaptors/yuque/adaptor/yuqueApiAdaptor.ts | 33 +++++++++++++++++++ src/adaptors/yuque/config/yuqueConfig.ts | 33 +++++++++++++++++++ src/adaptors/yuque/config/yuquePlaceHolder.ts | 33 +++++++++++++++++++ src/stores/common/commonStorage.ts | 4 +-- src/utils/appLogger.ts | 4 +-- 8 files changed, 109 insertions(+), 10 deletions(-) create mode 100644 src/adaptors/yuque/adaptor/yuqueApiAdaptor.ts create mode 100644 src/adaptors/yuque/config/yuqueConfig.ts create mode 100644 src/adaptors/yuque/config/yuquePlaceHolder.ts diff --git a/src/adaptors/github/GithubApiAdaptor.ts b/src/adaptors/github/GithubApiAdaptor.ts index 76a637c..feeed9e 100644 --- a/src/adaptors/github/GithubApiAdaptor.ts +++ b/src/adaptors/github/GithubApiAdaptor.ts @@ -29,8 +29,8 @@ import { BlogApi } from "zhi-blog-api" * Github API 适配器 * * @author terwer - * @version 1.0.0 - * @since 1.0.0 + * @version 0.9.0 + * @since 0.9.0 */ class GithubApiAdaptor extends BlogApi { diff --git a/src/adaptors/wordpress/adaptor/wordpressApiAdaptor.ts b/src/adaptors/wordpress/adaptor/wordpressApiAdaptor.ts index 02ad0c1..55722f8 100644 --- a/src/adaptors/wordpress/adaptor/wordpressApiAdaptor.ts +++ b/src/adaptors/wordpress/adaptor/wordpressApiAdaptor.ts @@ -34,8 +34,8 @@ import { WordpressConstants } from "~/src/adaptors/wordpress/wordpressConstants. * WordPress API 适配器 * * @author terwer - * @version 1.0.0 - * @since 1.0.0 + * @version 0.9.0 + * @since 0.9.0 */ class WordpressApiAdaptor extends BlogApi { private readonly logger diff --git a/src/adaptors/wordpress/wordpressConstants.ts b/src/adaptors/wordpress/wordpressConstants.ts index a89e016..b581df2 100644 --- a/src/adaptors/wordpress/wordpressConstants.ts +++ b/src/adaptors/wordpress/wordpressConstants.ts @@ -27,8 +27,8 @@ * 预定义 WordPress 变量 * * @author terwer - * @version 1.0.0 - * @since 1.0.0 + * @version 0.9.0 + * @since 0.9.0 */ class WordpressConstants { public static METHOD_GET_USERS_BLOGS = "metaWeblog.getUsersBlogs" diff --git a/src/adaptors/yuque/adaptor/yuqueApiAdaptor.ts b/src/adaptors/yuque/adaptor/yuqueApiAdaptor.ts new file mode 100644 index 0000000..02e22f9 --- /dev/null +++ b/src/adaptors/yuque/adaptor/yuqueApiAdaptor.ts @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2023, Terwer . All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Terwer designates this + * particular file as subject to the "Classpath" exception as provided + * by Terwer in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com + * or visit www.terwer.space if you need additional information or have any + * questions. + */ + +import { BlogAdaptor } from "zhi-blog-api" + +/** + * Yuque API 适配器 + */ +class YuqueApiAdaptor extends BlogAdaptor {} + +export { YuqueApiAdaptor } diff --git a/src/adaptors/yuque/config/yuqueConfig.ts b/src/adaptors/yuque/config/yuqueConfig.ts new file mode 100644 index 0000000..954e77b --- /dev/null +++ b/src/adaptors/yuque/config/yuqueConfig.ts @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2023, Terwer . All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Terwer designates this + * particular file as subject to the "Classpath" exception as provided + * by Terwer in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com + * or visit www.terwer.space if you need additional information or have any + * questions. + */ + +import { BlogConfig } from "zhi-blog-api" + +/** + * Yuque 配置 + */ +class YuqueConfig extends BlogConfig {} + +export { YuqueConfig } diff --git a/src/adaptors/yuque/config/yuquePlaceHolder.ts b/src/adaptors/yuque/config/yuquePlaceHolder.ts new file mode 100644 index 0000000..d4b8d48 --- /dev/null +++ b/src/adaptors/yuque/config/yuquePlaceHolder.ts @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2023, Terwer . All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Terwer designates this + * particular file as subject to the "Classpath" exception as provided + * by Terwer in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com + * or visit www.terwer.space if you need additional information or have any + * questions. + */ + +import { BlogPlaceholder } from "zhi-blog-api" + +/** + * Yuque 配置提示 + */ +class YuquePlaceHolder extends BlogPlaceholder {} + +export { YuquePlaceHolder } diff --git a/src/stores/common/commonStorage.ts b/src/stores/common/commonStorage.ts index ed7170d..867d4b5 100644 --- a/src/stores/common/commonStorage.ts +++ b/src/stores/common/commonStorage.ts @@ -34,8 +34,8 @@ import { SiyuanDevice } from "zhi-device" * https://github.com/vueuse/vueuse/blob/main/packages/core/ssr-handlers.ts#L11 * * @author terwer - * @version 1.0.0 - * @since 1.0.0 + * @version 0.9.0 + * @since 0.9.0 */ class CommonStorage implements StorageLikeAsync { private readonly logger diff --git a/src/utils/appLogger.ts b/src/utils/appLogger.ts index 6b465ca..daf14cf 100644 --- a/src/utils/appLogger.ts +++ b/src/utils/appLogger.ts @@ -45,8 +45,8 @@ interface ILogger { * 一个简单轻量级的日志记录器 * * @author terwer - * @version 1.0.0 - * @since 1.0.0 + * @version 0.9.0 + * @since 0.9.0 */ export const createAppLogger = (name: string): ILogger => { return simpleLogger(name, "publisher-widget", isDev)