-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
4,509 additions
and
13,391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,30 @@ | ||
import { Env } from "zhi-env"; | ||
import { ZhiUtil } from "zhi-common"; | ||
/** | ||
* 工具类统一入口,每个应用自己实现 | ||
* | ||
* @public | ||
* @author terwer | ||
* @since 1.0.0 | ||
*/ | ||
declare class ZhiSiyuanApiUtil extends ZhiUtil { | ||
static zhiEnv(): Env; | ||
declare class ZhiSiyuanApiUtil { | ||
private static env; | ||
/** | ||
* 通用环境变量 | ||
* | ||
* @param appInstance - 插件实例 | ||
*/ | ||
static zhiEnv(appInstance: any): any; | ||
/** | ||
* 通用日志 | ||
* | ||
* @param appInstance - 应用实例 | ||
* @param loggerName - 日志名称 | ||
*/ | ||
static zhiLog(appInstance: any, loggerName: string): any; | ||
/** | ||
* 通用工具入口 | ||
* | ||
* @param appInstance - 应用实例 | ||
*/ | ||
static zhiCommon(appInstance: any): any; | ||
} | ||
export default ZhiSiyuanApiUtil; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Utils } from "~/src/utils/utils" | ||
import PublisherPlugin from "~/src/index" | ||
|
||
/** | ||
* 初始化工具类 | ||
* | ||
* @param appInstance - 应用实例 | ||
*/ | ||
export const initTools = async (appInstance: PublisherPlugin) => { | ||
// this.env = Utils.zhiEnv(this) | ||
appInstance.logger = Utils.zhiLog(appInstance, "publisher-index") | ||
// this.common = Utils.zhiCommon(appInstance) | ||
|
||
// blogApi | ||
appInstance.blogApi = Utils.blogApi(appInstance) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters