Socket
Book a DemoInstallSign in
Socket

zhi-sdk

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zhi-sdk

a simple sdk for siyuan-note, blog, and more

latest
Source
npmnpm
Version
1.2.1
Version published
Maintainers
1
Created
Source

zhi-sdk

a simple sdk for siyuan-note, blog, and more

version license

Usage

pnpm add zhi-sdk
import ZhiSdk from "zhi-sdk"
import Env from "zhi-env"

// init zhiSdk
const zhiSdk = new ZhiSdk()

// init zhiSdk with env
const env = new Env(import.meta.env)
const zhiSdk = new ZhiSdk(env)

// siyuanAPI
const siyuanApi = zhiSdk.siyuanApi
console.log(siyuanApi.serverApi.VERSION)
console.log(siyuanApi.clientApi.VERSION)

// blogApi
const blogApi = zhiSdk.blogApi
console.log(blogApi.VERSION)

// common
const msg = "message"
const fmsg = zhiSdk.common.strUtil.f("This a {0}", msg)
console.log(fmsg)

Deps

├── zhi-log
├── compare-versions
├── showdown

Architecture

zhi-sdk consist a set of component apis, each component will have their own dependency trees

  • zhi-sdk
    • zhi-env
    • zhi-log
    • zhi-common
      • browserUtil
      • dateUtil
      • deviceUtil
      • electronUtil
      • strUtil
      • versionUtil
    • zhi-core
    • zhi-ui
    • zhi-middleware
    • zhi-siyuan-api
      • zhi-siyuan-server-api
      • zhi-siyuan-client-api
      • zhi-siyuan-util
    • zhi-blog-api
      • zhi-metaweblog-api
        • zhi-wordpress
        • zhi-cnblogs
      • zhi-blog-rest-api
        • zhi-yuque
      • zhi-http-custom-api
        • zhi-blog-zhihu
        • zhi-blog-csdn

Useful scripts

Build

pnpm ci

Publish to npm

pnpm package

Docs

pnpm vitepress:dev

FAQs

Package last updated on 20 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts