├── apps ├── .gitkeep ├── zhi-cli │ ├── .env.test.example │ ├── .env.development.example │ ├── .env.production.example │ ├── .eslintrc.cjs │ ├── template.json │ ├── .gitignore │ ├── tsconfig.json │ ├── README.md │ ├── env.d.ts │ └── package.json ├── zhi-docs │ ├── src │ │ ├── .vuepress │ │ │ ├── styles │ │ │ │ ├── index.scss │ │ │ │ ├── palette.scss │ │ │ │ └── config.scss │ │ │ ├── navbar │ │ │ │ ├── index.ts │ │ │ │ ├── en.ts │ │ │ │ └── zh.ts │ │ │ ├── sidebar │ │ │ │ ├── index.ts │ │ │ │ ├── en.ts │ │ │ │ └── zh.ts │ │ │ ├── public │ │ │ │ ├── logo.png │ │ │ │ ├── favicon.ico │ │ │ │ └── assets │ │ │ │ │ └── icon │ │ │ │ │ ├── chrome-192.png │ │ │ │ │ ├── chrome-512.png │ │ │ │ │ ├── ms-icon-144.png │ │ │ │ │ ├── apple-icon-152.png │ │ │ │ │ ├── chrome-mask-192.png │ │ │ │ │ ├── chrome-mask-512.png │ │ │ │ │ └── guide-maskable.png │ │ │ └── config.ts │ │ ├── zh │ │ │ ├── guide │ │ │ │ ├── bar │ │ │ │ │ ├── baz.md │ │ │ │ │ └── README.md │ │ │ │ ├── foo │ │ │ │ │ ├── ray.md │ │ │ │ │ └── README.md │ │ │ │ └── README.md │ │ │ └── demo │ │ │ │ ├── README.md │ │ │ │ ├── encrypt.md │ │ │ │ └── disable.md │ │ └── docs │ │ │ ├── usage │ │ │ ├── README.md │ │ │ └── installation.md │ │ │ ├── configuration │ │ │ ├── README.md │ │ │ └── theme.md │ │ │ └── introduction │ │ │ ├── README.md │ │ │ └── motivation.md │ ├── .eslintrc.cjs │ ├── .gitignore │ ├── tsconfig.json │ └── package.json └── zhi-infra │ ├── .eslintrc.cjs │ ├── src │ └── index.spec.ts │ ├── .gitignore │ ├── tsconfig.json │ ├── README.md │ ├── env.d.ts │ └── package.json ├── libs ├── zhi-blog-api │ ├── .gitignore │ ├── .eslintrc.cjs │ ├── tsconfig.node.json │ ├── index.html │ ├── README.md │ ├── tsconfig.json │ ├── package.json │ └── src │ │ ├── lib │ │ ├── zhi-blog-api.ts │ │ ├── PostUtil.spec.ts │ │ ├── WebPlaceholder.ts │ │ ├── zhi-blog-api.spec.ts │ │ ├── enums │ │ │ └── pageTypeEnum.ts │ │ └── blogConstants.ts │ │ └── index.spec.ts ├── zhi-chatgpt │ ├── .gitignore │ ├── src │ │ ├── index.ts │ │ └── index.spec.ts │ ├── .eslintrc.cjs │ ├── .prettierignore │ ├── CHANGELOG.md │ ├── tsconfig.node.json │ ├── index.html │ ├── README.md │ ├── package.json │ ├── tsconfig.json │ └── .prettierrc.cjs ├── zhi-common │ ├── .gitignore │ ├── .eslintrc.cjs │ ├── tsconfig.node.json │ ├── index.html │ ├── README.md │ ├── tsconfig.json │ ├── package.json │ ├── custom.d.ts │ └── src │ │ └── index.spec.ts ├── zhi-lib-base │ ├── .gitignore │ ├── .eslintrc.cjs │ ├── .prettierignore │ ├── tsconfig.node.json │ ├── index.html │ ├── README.md │ ├── package.json │ ├── tsconfig.json │ ├── .prettierrc.cjs │ ├── CHANGELOG.md │ └── src │ │ └── interfaces │ │ └── mainFunction.ts ├── zhi-common-version │ ├── .gitignore │ ├── src │ │ ├── index.ts │ │ └── index.spec.ts │ ├── CHANGELOG.md │ ├── .eslintrc.cjs │ ├── .prettierignore │ ├── tsconfig.node.json │ ├── index.html │ ├── README.md │ ├── tsconfig.json │ ├── package.json │ └── .prettierrc.cjs ├── zhi-common-markdown │ ├── .gitignore │ ├── .env.development.local.example │ ├── .eslintrc.cjs │ ├── .prettierignore │ ├── tsconfig.node.json │ ├── index.html │ ├── README.md │ ├── tsconfig.json │ ├── package.json │ ├── CHANGELOG.md │ ├── src │ │ ├── index.ts │ │ └── index.spec.ts │ └── .prettierrc.cjs ├── zhi-fetch-middleware │ ├── .gitignore │ ├── .eslintrc.cjs │ ├── src │ │ ├── index.spec.ts │ │ ├── index.ts │ │ └── lib │ │ │ └── types │ │ │ └── index.d.ts │ ├── .prettierignore │ ├── tsconfig.node.json │ ├── index.html │ ├── README.md │ ├── tsconfig.json │ ├── package.json │ └── .prettierrc.cjs ├── zhi-github-middleware │ ├── .gitignore │ ├── .eslintrc.cjs │ ├── src │ │ ├── index.spec.ts │ │ └── index.ts │ ├── .prettierignore │ ├── tsconfig.node.json │ ├── index.html │ ├── README.md │ ├── tsconfig.json │ ├── package.json │ └── .prettierrc.cjs ├── zhi-gitlab-middleware │ ├── .gitignore │ ├── src │ │ ├── index.ts │ │ └── index.spec.ts │ ├── .eslintrc.cjs │ ├── .prettierignore │ ├── tsconfig.node.json │ ├── index.html │ ├── README.md │ ├── tsconfig.json │ ├── package.json │ └── .prettierrc.cjs ├── zhi-notion-markdown │ ├── .gitignore │ ├── src │ │ ├── index.ts │ │ └── index.spec.ts │ ├── .eslintrc.cjs │ ├── .prettierignore │ ├── tsconfig.node.json │ ├── index.html │ ├── CHANGELOG.md │ ├── tsconfig.json │ ├── package.json │ ├── README.md │ ├── custom.d.ts │ └── .prettierrc.cjs ├── zhi-rubick-core │ ├── .env.test.example │ ├── .env.development.example │ ├── .env.production.example │ ├── src │ │ ├── index.ts │ │ ├── index.spec.ts │ │ └── browsers │ │ │ ├── runner.ts │ │ │ ├── detach.ts │ │ │ ├── guide.ts │ │ │ └── index.ts │ ├── .eslintrc.cjs │ ├── README.md │ ├── .gitignore │ ├── tsconfig.json │ ├── CHANGELOG.md │ ├── env.d.ts │ └── package.json ├── zhi-xmlrpc-middleware │ ├── .gitignore │ ├── .eslintrc.cjs │ ├── .prettierignore │ ├── tsconfig.node.json │ ├── index.html │ ├── tsconfig.json │ ├── README.md │ ├── package.json │ ├── .prettierrc.cjs │ └── src │ │ ├── index.ts │ │ ├── lib │ │ └── impl │ │ │ ├── chromeXmlrpc.spec.ts │ │ │ ├── middlewareXmlrpc.spec.ts │ │ │ └── chromeMiddlewareXmlrpc.spec.ts │ │ └── index.spec.ts ├── zhi-common-json-validate │ ├── .gitignore │ ├── src │ │ ├── index.ts │ │ └── index.spec.ts │ ├── CHANGELOG.md │ ├── .eslintrc.cjs │ ├── .prettierignore │ ├── tsconfig.node.json │ ├── index.html │ ├── README.md │ ├── package.json │ ├── tsconfig.json │ └── .prettierrc.cjs ├── zhi-siyuan-api │ ├── .gitignore │ ├── .env.development.local.example │ ├── .eslintrc.cjs │ ├── tsconfig.node.json │ ├── index.html │ ├── src │ │ ├── index.ts │ │ ├── lib │ │ │ ├── zhi-siyuan-api.ts │ │ │ └── config │ │ │ │ └── siyuanPlaceholder.ts │ │ └── index.spec.ts │ ├── tsconfig.json │ ├── README.md │ └── package.json ├── zhi-env │ ├── .env.development.local.example │ ├── .eslintrc.cjs │ ├── tsconfig.node.json │ ├── index.html │ ├── CHANGELOG.md │ ├── tsconfig.json │ ├── package.json │ └── src │ │ └── index.ts ├── zhi-log │ ├── .env.development.local.example │ ├── .eslintrc.cjs │ ├── tsconfig.node.json │ ├── index.html │ ├── tsconfig.json │ ├── README.md │ └── package.json ├── zhi-rubick-ui │ ├── src │ │ ├── vite-env.d.ts │ │ ├── main.ts │ │ ├── assets │ │ │ └── vue.svg │ │ ├── App.vue │ │ └── components │ │ │ └── HelloWorld.vue │ ├── .vscode │ │ └── extensions.json │ ├── public │ │ ├── README.md │ │ └── vite.svg │ ├── vite.config.ts │ ├── tsconfig.node.json │ ├── .gitignore │ ├── index.html │ ├── tsconfig.json │ └── package.json ├── zhi-cmd │ ├── src │ │ ├── index.ts │ │ └── index.spec.ts │ ├── .eslintrc.cjs │ ├── .gitignore │ ├── tsconfig.json │ ├── package.json │ └── env.d.ts └── zhi-device │ ├── .eslintrc.cjs │ ├── tsconfig.node.json │ ├── index.html │ ├── tsconfig.json │ ├── README.md │ └── package.json ├── tools ├── vite-config-custom │ ├── README.md │ ├── CHANGELOG.md │ ├── package.json │ └── vite.config.ts ├── eslint-config-custom │ ├── next │ │ ├── .prettierignore │ │ └── .prettierrc.cjs │ ├── vue │ │ ├── .prettierignore │ │ ├── .eslintrc.cjs │ │ └── .prettierrc.cjs │ ├── astro │ │ ├── .prettierignore │ │ ├── .eslintrc.cjs │ │ └── .prettierrc.cjs │ ├── svelte │ │ ├── .prettierignore │ │ ├── .eslintrc.cjs │ │ └── .prettierrc.cjs │ ├── typescript │ │ ├── .prettierignore │ │ ├── index.cjs │ │ └── .prettierrc.cjs │ ├── CHANGELOG.md │ ├── package.json │ └── README.md ├── tsconfig │ ├── package.json │ ├── CHANGELOG.md │ ├── base.json │ └── nextjs.json ├── vitest-config-custom │ ├── package.json │ ├── CHANGELOG.md │ └── vitest.config.ts ├── commit-config-custom │ ├── CHANGELOG.md │ └── package.json └── esbuild-config-custom │ ├── package.json │ └── README.md ├── pnpm-workspace.yaml ├── .eslintrc.cjs ├── .npmrc ├── .prettierignore ├── .changeset ├── config.json └── README.md ├── turbo.json ├── .gitignore ├── package.json └── .prettierrc.cjs /apps/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /libs/zhi-blog-api/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .DS_Store -------------------------------------------------------------------------------- /libs/zhi-chatgpt/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .DS_Store -------------------------------------------------------------------------------- /libs/zhi-common/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .DS_Store -------------------------------------------------------------------------------- /libs/zhi-lib-base/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .DS_Store -------------------------------------------------------------------------------- /apps/zhi-cli/.env.test.example: -------------------------------------------------------------------------------- 1 | VITE_DEBUG_MODE=true -------------------------------------------------------------------------------- /libs/zhi-common-version/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .DS_Store -------------------------------------------------------------------------------- /apps/zhi-cli/.env.development.example: -------------------------------------------------------------------------------- 1 | VITE_DEBUG_MODE=true -------------------------------------------------------------------------------- /apps/zhi-cli/.env.production.example: -------------------------------------------------------------------------------- 1 | VITE_DEBUG_MODE=false -------------------------------------------------------------------------------- /libs/zhi-chatgpt/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "chatgpt" 2 | -------------------------------------------------------------------------------- /libs/zhi-common-markdown/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .DS_Store -------------------------------------------------------------------------------- /libs/zhi-fetch-middleware/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .DS_Store -------------------------------------------------------------------------------- /libs/zhi-github-middleware/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .DS_Store -------------------------------------------------------------------------------- /libs/zhi-gitlab-middleware/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .DS_Store -------------------------------------------------------------------------------- /libs/zhi-notion-markdown/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .DS_Store -------------------------------------------------------------------------------- /libs/zhi-rubick-core/.env.test.example: -------------------------------------------------------------------------------- 1 | VITE_DEBUG_MODE=true -------------------------------------------------------------------------------- /libs/zhi-xmlrpc-middleware/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .DS_Store -------------------------------------------------------------------------------- /libs/zhi-common-json-validate/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .DS_Store -------------------------------------------------------------------------------- /libs/zhi-siyuan-api/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .DS_Store 3 | testdata -------------------------------------------------------------------------------- /libs/zhi-env/.env.development.local.example: -------------------------------------------------------------------------------- 1 | VITE_DEBUG_MODE=true 2 | -------------------------------------------------------------------------------- /libs/zhi-log/.env.development.local.example: -------------------------------------------------------------------------------- 1 | VITE_DEBUG_MODE=true 2 | -------------------------------------------------------------------------------- /libs/zhi-rubick-core/.env.development.example: -------------------------------------------------------------------------------- 1 | VITE_DEBUG_MODE=true -------------------------------------------------------------------------------- /libs/zhi-rubick-core/.env.production.example: -------------------------------------------------------------------------------- 1 | VITE_DEBUG_MODE=false -------------------------------------------------------------------------------- /libs/zhi-rubick-ui/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /libs/zhi-siyuan-api/.env.development.local.example: -------------------------------------------------------------------------------- 1 | VITE_DEBUG_MODE=true 2 | -------------------------------------------------------------------------------- /apps/zhi-docs/src/.vuepress/styles/index.scss: -------------------------------------------------------------------------------- 1 | // place your custom styles here 2 | -------------------------------------------------------------------------------- /libs/zhi-common-markdown/.env.development.local.example: -------------------------------------------------------------------------------- 1 | VITE_DEBUG_MODE=true 2 | -------------------------------------------------------------------------------- /tools/vite-config-custom/README.md: -------------------------------------------------------------------------------- 1 | # vite-config-custom 2 | 3 | custom config for vite -------------------------------------------------------------------------------- /apps/zhi-docs/src/.vuepress/navbar/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./en.js"; 2 | export * from "./zh.js"; 3 | -------------------------------------------------------------------------------- /apps/zhi-docs/src/.vuepress/sidebar/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./en.js"; 2 | export * from "./zh.js"; 3 | -------------------------------------------------------------------------------- /apps/zhi-docs/src/zh/guide/bar/baz.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Baz 3 | icon: info 4 | --- 5 | 6 | 功能详情... 7 | -------------------------------------------------------------------------------- /apps/zhi-docs/src/zh/guide/foo/ray.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Ray 3 | icon: config 4 | --- 5 | 6 | 功能详情... 7 | -------------------------------------------------------------------------------- /libs/zhi-cmd/src/index.ts: -------------------------------------------------------------------------------- 1 | import { CustomCmd } from "./lib/customCmd" 2 | 3 | export { CustomCmd } 4 | -------------------------------------------------------------------------------- /apps/zhi-docs/src/.vuepress/styles/palette.scss: -------------------------------------------------------------------------------- 1 | // you can change colors here 2 | $theme-color: #096dd9; 3 | -------------------------------------------------------------------------------- /apps/zhi-docs/src/docs/usage/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Usage 3 | dir: 4 | order: 2 5 | index: false 6 | --- -------------------------------------------------------------------------------- /libs/zhi-common-version/src/index.ts: -------------------------------------------------------------------------------- 1 | import VersionUtil from "./lib/versionUtil" 2 | 3 | export { VersionUtil } 4 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - "tools/*" # tools 3 | - "libs/*" # libraries 4 | - "apps/*" # apps -------------------------------------------------------------------------------- /apps/zhi-docs/src/docs/configuration/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Configuration 3 | dir: 4 | order: 3 5 | index: false 6 | --- -------------------------------------------------------------------------------- /apps/zhi-docs/src/docs/introduction/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Introduction 3 | dir: 4 | order: 1 5 | index: false 6 | --- -------------------------------------------------------------------------------- /apps/zhi-docs/src/.vuepress/public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/terwer/zhi/HEAD/apps/zhi-docs/src/.vuepress/public/logo.png -------------------------------------------------------------------------------- /libs/zhi-common-json-validate/src/index.ts: -------------------------------------------------------------------------------- 1 | import JsonValidateUtil from "./lib/jsonValidateUtil" 2 | export { JsonValidateUtil } 3 | -------------------------------------------------------------------------------- /libs/zhi-rubick-ui/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"] 3 | } 4 | -------------------------------------------------------------------------------- /apps/zhi-docs/src/.vuepress/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/terwer/zhi/HEAD/apps/zhi-docs/src/.vuepress/public/favicon.ico -------------------------------------------------------------------------------- /libs/zhi-rubick-core/src/index.ts: -------------------------------------------------------------------------------- 1 | import app from "./main/index" 2 | 3 | /** 4 | * rubick 实例入口 5 | */ 6 | export { app as rubick } 7 | -------------------------------------------------------------------------------- /libs/zhi-gitlab-middleware/src/index.ts: -------------------------------------------------------------------------------- 1 | import CommonGitlabClient from "./lib/commonGitlabClient" 2 | 3 | export { CommonGitlabClient } 4 | -------------------------------------------------------------------------------- /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ["./node_modules/@terwer/eslint-config-custom/typescript/index.cjs"], 4 | } 5 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | electron_mirror=https://cdn.npmmirror.com/binaries/electron/ 3 | electron_custom_dir=26.0.0 4 | shamefully-hoist=true -------------------------------------------------------------------------------- /libs/zhi-common-version/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # zhi-common-version 2 | 3 | ## 0.1.0 4 | 5 | ### Minor Changes 6 | 7 | - feat: add json validate and version 8 | -------------------------------------------------------------------------------- /libs/zhi-notion-markdown/src/index.ts: -------------------------------------------------------------------------------- 1 | import NotionMarkdownConverter from "./lib/notionMarkdownConverter" 2 | 3 | export { NotionMarkdownConverter } 4 | -------------------------------------------------------------------------------- /apps/zhi-cli/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ["./node_modules/@terwer/eslint-config-custom/typescript/index.cjs"], 4 | } 5 | -------------------------------------------------------------------------------- /libs/zhi-cmd/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ["./node_modules/@terwer/eslint-config-custom/typescript/index.cjs"], 4 | } 5 | -------------------------------------------------------------------------------- /libs/zhi-env/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ["./node_modules/@terwer/eslint-config-custom/typescript/index.cjs"], 4 | } 5 | -------------------------------------------------------------------------------- /libs/zhi-log/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ["./node_modules/@terwer/eslint-config-custom/typescript/index.cjs"], 4 | } 5 | -------------------------------------------------------------------------------- /apps/zhi-docs/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ["./node_modules/@terwer/eslint-config-custom/typescript/index.cjs"], 4 | } 5 | -------------------------------------------------------------------------------- /apps/zhi-docs/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | node_modules/ 3 | src/.vuepress/.cache/ 4 | src/.vuepress/.temp/ 5 | src/.vuepress/dist/ 6 | src/api 7 | !src/.vuepress/dist/.gitkeep -------------------------------------------------------------------------------- /apps/zhi-infra/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ["./node_modules/@terwer/eslint-config-custom/typescript/index.cjs"], 4 | } 5 | -------------------------------------------------------------------------------- /libs/zhi-blog-api/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ["./node_modules/@terwer/eslint-config-custom/typescript/index.cjs"], 4 | } 5 | -------------------------------------------------------------------------------- /libs/zhi-chatgpt/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ["./node_modules/@terwer/eslint-config-custom/typescript/index.cjs"], 4 | } 5 | -------------------------------------------------------------------------------- /libs/zhi-common/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ["./node_modules/@terwer/eslint-config-custom/typescript/index.cjs"], 4 | } 5 | -------------------------------------------------------------------------------- /libs/zhi-device/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ["./node_modules/@terwer/eslint-config-custom/typescript/index.cjs"], 4 | } 5 | -------------------------------------------------------------------------------- /libs/zhi-lib-base/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ["./node_modules/@terwer/eslint-config-custom/typescript/index.cjs"], 4 | } 5 | -------------------------------------------------------------------------------- /libs/zhi-rubick-ui/src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from "vue" 2 | import "./style.css" 3 | import App from "./App.vue" 4 | 5 | createApp(App).mount("#app") 6 | -------------------------------------------------------------------------------- /apps/zhi-docs/src/.vuepress/public/assets/icon/chrome-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/terwer/zhi/HEAD/apps/zhi-docs/src/.vuepress/public/assets/icon/chrome-192.png -------------------------------------------------------------------------------- /apps/zhi-docs/src/.vuepress/public/assets/icon/chrome-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/terwer/zhi/HEAD/apps/zhi-docs/src/.vuepress/public/assets/icon/chrome-512.png -------------------------------------------------------------------------------- /apps/zhi-docs/src/.vuepress/sidebar/en.ts: -------------------------------------------------------------------------------- 1 | import { sidebar } from "vuepress-theme-hope" 2 | 3 | export const enSidebar = sidebar({ 4 | "/": "structure", 5 | }) 6 | -------------------------------------------------------------------------------- /libs/zhi-common-json-validate/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # zhi-common-json-validate 2 | 3 | ## 0.1.0 4 | 5 | ### Minor Changes 6 | 7 | - feat: add json validate and version 8 | -------------------------------------------------------------------------------- /libs/zhi-rubick-core/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ["./node_modules/@terwer/eslint-config-custom/typescript/index.cjs"], 4 | } 5 | -------------------------------------------------------------------------------- /libs/zhi-siyuan-api/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ["./node_modules/@terwer/eslint-config-custom/typescript/index.cjs"], 4 | } 5 | -------------------------------------------------------------------------------- /apps/zhi-docs/src/.vuepress/public/assets/icon/ms-icon-144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/terwer/zhi/HEAD/apps/zhi-docs/src/.vuepress/public/assets/icon/ms-icon-144.png -------------------------------------------------------------------------------- /apps/zhi-docs/src/.vuepress/sidebar/zh.ts: -------------------------------------------------------------------------------- 1 | import { sidebar } from "vuepress-theme-hope" 2 | 3 | export const zhSidebar = sidebar({ 4 | "/zh/": "structure", 5 | }) 6 | -------------------------------------------------------------------------------- /libs/zhi-common-markdown/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ["./node_modules/@terwer/eslint-config-custom/typescript/index.cjs"], 4 | } 5 | -------------------------------------------------------------------------------- /libs/zhi-common-version/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ["./node_modules/@terwer/eslint-config-custom/typescript/index.cjs"], 4 | } 5 | -------------------------------------------------------------------------------- /libs/zhi-fetch-middleware/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ["./node_modules/@terwer/eslint-config-custom/typescript/index.cjs"], 4 | } 5 | -------------------------------------------------------------------------------- /libs/zhi-github-middleware/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ["./node_modules/@terwer/eslint-config-custom/typescript/index.cjs"], 4 | } 5 | -------------------------------------------------------------------------------- /libs/zhi-gitlab-middleware/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ["./node_modules/@terwer/eslint-config-custom/typescript/index.cjs"], 4 | } 5 | -------------------------------------------------------------------------------- /libs/zhi-notion-markdown/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ["./node_modules/@terwer/eslint-config-custom/typescript/index.cjs"], 4 | } 5 | -------------------------------------------------------------------------------- /libs/zhi-xmlrpc-middleware/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ["./node_modules/@terwer/eslint-config-custom/typescript/index.cjs"], 4 | } 5 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | # platform 2 | 3 | # Ignore artifacts: 4 | dist 5 | node_modules 6 | 7 | # Ignore all dts files: 8 | *.d.ts 9 | 10 | # lib 11 | /pnpm-lock.yaml 12 | -------------------------------------------------------------------------------- /apps/zhi-docs/src/.vuepress/public/assets/icon/apple-icon-152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/terwer/zhi/HEAD/apps/zhi-docs/src/.vuepress/public/assets/icon/apple-icon-152.png -------------------------------------------------------------------------------- /apps/zhi-docs/src/.vuepress/public/assets/icon/chrome-mask-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/terwer/zhi/HEAD/apps/zhi-docs/src/.vuepress/public/assets/icon/chrome-mask-192.png -------------------------------------------------------------------------------- /apps/zhi-docs/src/.vuepress/public/assets/icon/chrome-mask-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/terwer/zhi/HEAD/apps/zhi-docs/src/.vuepress/public/assets/icon/chrome-mask-512.png -------------------------------------------------------------------------------- /apps/zhi-docs/src/.vuepress/public/assets/icon/guide-maskable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/terwer/zhi/HEAD/apps/zhi-docs/src/.vuepress/public/assets/icon/guide-maskable.png -------------------------------------------------------------------------------- /apps/zhi-docs/src/docs/configuration/theme.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Theme 3 | # icon: creative 4 | order: 1 5 | dir: 6 | order: 3 7 | --- 8 | 9 | ## Theme config 10 | 11 | -------------------------------------------------------------------------------- /apps/zhi-docs/src/docs/introduction/motivation.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Motivation 3 | # icon: creative 4 | order: 1 5 | --- 6 | 7 | ## Why do I make this theme 8 | 9 | 10 | -------------------------------------------------------------------------------- /libs/zhi-common-json-validate/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ["./node_modules/@terwer/eslint-config-custom/typescript/index.cjs"], 4 | } 5 | -------------------------------------------------------------------------------- /apps/zhi-docs/src/docs/usage/installation.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Motivation 3 | # icon: creative 4 | order: 1 5 | dir: 6 | order: 2 7 | --- 8 | 9 | ## How to use 10 | 11 | -------------------------------------------------------------------------------- /libs/zhi-chatgpt/src/index.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, it } from "vitest" 2 | 3 | describe("index", () => { 4 | it("test index", () => { 5 | console.log("hello") 6 | }) 7 | }) -------------------------------------------------------------------------------- /apps/zhi-docs/src/.vuepress/styles/config.scss: -------------------------------------------------------------------------------- 1 | // you can change config here 2 | $colors: #c0392b, #d35400, #f39c12, #27ae60, #16a085, #2980b9, #8e44ad, #2c3e50, 3 | #7f8c8d !default; 4 | -------------------------------------------------------------------------------- /libs/zhi-chatgpt/.prettierignore: -------------------------------------------------------------------------------- 1 | # platform 2 | 3 | # Ignore artifacts: 4 | dist 5 | node_modules 6 | 7 | # Ignore all dts files: 8 | *.d.ts 9 | 10 | # lib 11 | /pnpm-lock.yaml 12 | -------------------------------------------------------------------------------- /libs/zhi-common-version/src/index.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, it } from "vitest" 2 | 3 | describe("index", () => { 4 | it("test index", () => { 5 | console.log("hello") 6 | }) 7 | }) -------------------------------------------------------------------------------- /libs/zhi-fetch-middleware/src/index.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, it } from "vitest" 2 | 3 | describe("index", () => { 4 | it("test index", () => { 5 | console.log("hello") 6 | }) 7 | }) -------------------------------------------------------------------------------- /libs/zhi-github-middleware/src/index.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, it } from "vitest" 2 | 3 | describe("index", () => { 4 | it("test index", () => { 5 | console.log("hello") 6 | }) 7 | }) -------------------------------------------------------------------------------- /libs/zhi-gitlab-middleware/src/index.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, it } from "vitest" 2 | 3 | describe("index", () => { 4 | it("test index", () => { 5 | console.log("hello") 6 | }) 7 | }) -------------------------------------------------------------------------------- /libs/zhi-notion-markdown/src/index.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, it } from "vitest" 2 | 3 | describe("index", () => { 4 | it("test index", () => { 5 | console.log("hello") 6 | }) 7 | }) -------------------------------------------------------------------------------- /apps/zhi-docs/src/zh/guide/bar/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Bar 功能 3 | icon: creative 4 | --- 5 | 6 | ## 介绍 7 | 8 | 我们支持 bar 功能,... 9 | 10 | ## 详情 11 | 12 | - [baz](baz.md) 13 | - ... 14 | -------------------------------------------------------------------------------- /apps/zhi-docs/src/zh/guide/foo/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Foo 功能 3 | icon: config 4 | --- 5 | 6 | ## 介绍 7 | 8 | 我们支持 foo 功能,... 9 | 10 | ## 详情 11 | 12 | - [ray](ray.md) 13 | - ... 14 | -------------------------------------------------------------------------------- /libs/zhi-common-json-validate/src/index.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, it } from "vitest" 2 | 3 | describe("index", () => { 4 | it("test index", () => { 5 | console.log("hello") 6 | }) 7 | }) -------------------------------------------------------------------------------- /libs/zhi-lib-base/.prettierignore: -------------------------------------------------------------------------------- 1 | # platform 2 | 3 | # Ignore artifacts: 4 | dist 5 | node_modules 6 | 7 | # Ignore all dts files: 8 | *.d.ts 9 | 10 | # lib 11 | /pnpm-lock.yaml 12 | -------------------------------------------------------------------------------- /libs/zhi-rubick-core/README.md: -------------------------------------------------------------------------------- 1 | # zhi-rubick-core 2 | plugin container core 3 | 4 | ## How to use 5 | 6 | For more detail, please go to [zhi-cli](https://github.com/terwer/zhi/tree/dev/apps/zhi-cli) -------------------------------------------------------------------------------- /libs/zhi-common-markdown/.prettierignore: -------------------------------------------------------------------------------- 1 | # platform 2 | 3 | # Ignore artifacts: 4 | dist 5 | node_modules 6 | 7 | # Ignore all dts files: 8 | *.d.ts 9 | 10 | # lib 11 | /pnpm-lock.yaml 12 | -------------------------------------------------------------------------------- /libs/zhi-common-version/.prettierignore: -------------------------------------------------------------------------------- 1 | # platform 2 | 3 | # Ignore artifacts: 4 | dist 5 | node_modules 6 | 7 | # Ignore all dts files: 8 | *.d.ts 9 | 10 | # lib 11 | /pnpm-lock.yaml 12 | -------------------------------------------------------------------------------- /libs/zhi-fetch-middleware/.prettierignore: -------------------------------------------------------------------------------- 1 | # platform 2 | 3 | # Ignore artifacts: 4 | dist 5 | node_modules 6 | 7 | # Ignore all dts files: 8 | *.d.ts 9 | 10 | # lib 11 | /pnpm-lock.yaml 12 | -------------------------------------------------------------------------------- /libs/zhi-github-middleware/.prettierignore: -------------------------------------------------------------------------------- 1 | # platform 2 | 3 | # Ignore artifacts: 4 | dist 5 | node_modules 6 | 7 | # Ignore all dts files: 8 | *.d.ts 9 | 10 | # lib 11 | /pnpm-lock.yaml 12 | -------------------------------------------------------------------------------- /libs/zhi-gitlab-middleware/.prettierignore: -------------------------------------------------------------------------------- 1 | # platform 2 | 3 | # Ignore artifacts: 4 | dist 5 | node_modules 6 | 7 | # Ignore all dts files: 8 | *.d.ts 9 | 10 | # lib 11 | /pnpm-lock.yaml 12 | -------------------------------------------------------------------------------- /libs/zhi-notion-markdown/.prettierignore: -------------------------------------------------------------------------------- 1 | # platform 2 | 3 | # Ignore artifacts: 4 | dist 5 | node_modules 6 | 7 | # Ignore all dts files: 8 | *.d.ts 9 | 10 | # lib 11 | /pnpm-lock.yaml 12 | -------------------------------------------------------------------------------- /libs/zhi-rubick-ui/public/README.md: -------------------------------------------------------------------------------- 1 | # zhi-rubick-core 2 | plugin container core 3 | 4 | ## How to use 5 | 6 | For more detail, please go to [zhi-cli](https://github.com/terwer/zhi/tree/dev/apps/zhi-cli) -------------------------------------------------------------------------------- /libs/zhi-xmlrpc-middleware/.prettierignore: -------------------------------------------------------------------------------- 1 | # platform 2 | 3 | # Ignore artifacts: 4 | dist 5 | node_modules 6 | 7 | # Ignore all dts files: 8 | *.d.ts 9 | 10 | # lib 11 | /pnpm-lock.yaml 12 | -------------------------------------------------------------------------------- /libs/zhi-common-json-validate/.prettierignore: -------------------------------------------------------------------------------- 1 | # platform 2 | 3 | # Ignore artifacts: 4 | dist 5 | node_modules 6 | 7 | # Ignore all dts files: 8 | *.d.ts 9 | 10 | # lib 11 | /pnpm-lock.yaml 12 | -------------------------------------------------------------------------------- /libs/zhi-github-middleware/src/index.ts: -------------------------------------------------------------------------------- 1 | import CommonGithubClient from "./lib/commonGithubClient" 2 | import GithubConfig from "./lib/githubConfig" 3 | 4 | export { CommonGithubClient, GithubConfig } 5 | -------------------------------------------------------------------------------- /tools/eslint-config-custom/next/.prettierignore: -------------------------------------------------------------------------------- 1 | # platform 2 | 3 | # Ignore artifacts: 4 | dist 5 | node_modules 6 | 7 | # Ignore all dts files: 8 | *.d.ts 9 | 10 | # lib 11 | /pnpm-lock.yaml 12 | -------------------------------------------------------------------------------- /tools/eslint-config-custom/vue/.prettierignore: -------------------------------------------------------------------------------- 1 | # platform 2 | 3 | # Ignore artifacts: 4 | dist 5 | node_modules 6 | 7 | # Ignore all dts files: 8 | *.d.ts 9 | 10 | # lib 11 | /pnpm-lock.yaml 12 | -------------------------------------------------------------------------------- /apps/zhi-cli/template.json: -------------------------------------------------------------------------------- 1 | [ 2 | "turbo-workspace-simple", 3 | "ts-esbuild-lib", 4 | "ts-vite-lib", 5 | "ts-vite-siyuan-plugin", 6 | "ts-vite-obsidian-plugin", 7 | "ts-vite-publisher-pro-plugin" 8 | ] -------------------------------------------------------------------------------- /tools/eslint-config-custom/astro/.prettierignore: -------------------------------------------------------------------------------- 1 | # platform 2 | 3 | # Ignore artifacts: 4 | dist 5 | node_modules 6 | 7 | # Ignore all dts files: 8 | *.d.ts 9 | 10 | # lib 11 | /pnpm-lock.yaml 12 | -------------------------------------------------------------------------------- /tools/eslint-config-custom/svelte/.prettierignore: -------------------------------------------------------------------------------- 1 | # platform 2 | 3 | # Ignore artifacts: 4 | dist 5 | node_modules 6 | 7 | # Ignore all dts files: 8 | *.d.ts 9 | 10 | # lib 11 | /pnpm-lock.yaml 12 | -------------------------------------------------------------------------------- /tools/eslint-config-custom/typescript/.prettierignore: -------------------------------------------------------------------------------- 1 | # platform 2 | 3 | # Ignore artifacts: 4 | dist 5 | node_modules 6 | 7 | # Ignore all dts files: 8 | *.d.ts 9 | 10 | # lib 11 | /pnpm-lock.yaml 12 | -------------------------------------------------------------------------------- /libs/zhi-cmd/src/index.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, it } from "vitest" 2 | import init from "./index" 3 | 4 | describe("zhi-cmd", () => { 5 | it("index", () => { 6 | expect(init()).toBe("ok") 7 | }) 8 | }) 9 | -------------------------------------------------------------------------------- /libs/zhi-fetch-middleware/src/index.ts: -------------------------------------------------------------------------------- 1 | import CommonFetchClient from "./lib/commonFetchClient" 2 | import { ICommonFetchClient } from "./lib/types" 3 | 4 | export { CommonFetchClient } 5 | export { type ICommonFetchClient } 6 | -------------------------------------------------------------------------------- /apps/zhi-docs/src/zh/guide/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 指南 3 | icon: creative 4 | --- 5 | 6 | ## 功能亮点 7 | 8 | ### Bar 9 | 10 | - [baz](bar/baz.md) 11 | - ... 12 | 13 | ### Foo 14 | 15 | - [ray](foo/ray.md) 16 | - ... 17 | -------------------------------------------------------------------------------- /apps/zhi-infra/src/index.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, it } from "vitest" 2 | import init from "./index" 3 | 4 | describe("zhi-server-infra", () => { 5 | it("index", () => { 6 | expect(init()).toBe("ok") 7 | }) 8 | }) 9 | -------------------------------------------------------------------------------- /libs/zhi-chatgpt/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # zhi-chatgpt 2 | 3 | ## 0.0.3 4 | 5 | ### Patch Changes 6 | 7 | - feat: add zhi-infra 8 | - add zhi-chatgpt zhi-infra 9 | 10 | ## 0.0.2 11 | 12 | ### Patch Changes 13 | 14 | - feat: add zhi-chatgpt 15 | -------------------------------------------------------------------------------- /tools/tsconfig/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@terwer/tsconfig", 3 | "version": "0.1.0", 4 | "description": "a common typescript config define", 5 | "license": "MIT", 6 | "publishConfig": { 7 | "access": "public" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /apps/zhi-cli/.gitignore: -------------------------------------------------------------------------------- 1 | # idea 2 | .idea 3 | 4 | # build 5 | dist 6 | lib 7 | !src/lib 8 | node_modules 9 | 10 | # api-extractor 11 | etc 12 | temp 13 | tsdoc-metadata.json 14 | 15 | # env 16 | .env.development 17 | .env.production 18 | .env.test -------------------------------------------------------------------------------- /libs/zhi-cmd/.gitignore: -------------------------------------------------------------------------------- 1 | # idea 2 | .idea 3 | 4 | # build 5 | dist 6 | lib 7 | !src/lib 8 | node_modules 9 | 10 | # api-extractor 11 | etc 12 | temp 13 | tsdoc-metadata.json 14 | 15 | # env 16 | .env.development 17 | .env.production 18 | .env.test -------------------------------------------------------------------------------- /libs/zhi-rubick-core/src/index.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, it } from "vitest" 2 | import main from "./index" 3 | 4 | describe("zhi-rubick-core", () => { 5 | it("index", async () => { 6 | expect(await main([])).toBe("ok") 7 | }) 8 | }) 9 | -------------------------------------------------------------------------------- /apps/zhi-infra/.gitignore: -------------------------------------------------------------------------------- 1 | # idea 2 | .idea 3 | 4 | # build 5 | dist 6 | lib 7 | !src/lib 8 | node_modules 9 | 10 | # api-extractor 11 | etc 12 | temp 13 | tsdoc-metadata.json 14 | 15 | # env 16 | .env.development 17 | .env.production 18 | .env.test -------------------------------------------------------------------------------- /libs/zhi-rubick-ui/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite" 2 | import vue from "@vitejs/plugin-vue" 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [vue()], 7 | // 使用相对路径 8 | base: "", 9 | }) 10 | -------------------------------------------------------------------------------- /libs/zhi-rubick-core/.gitignore: -------------------------------------------------------------------------------- 1 | # idea 2 | .idea 3 | 4 | # build 5 | dist 6 | lib 7 | !src/lib 8 | node_modules 9 | 10 | # api-extractor 11 | etc 12 | temp 13 | tsdoc-metadata.json 14 | 15 | # env 16 | .env.development 17 | .env.production 18 | .env.test -------------------------------------------------------------------------------- /apps/zhi-docs/src/zh/demo/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 主要功能与配置演示 3 | index: false 4 | icon: discover 5 | category: 6 | - 使用指南 7 | --- 8 | 9 | ## 目录 10 | 11 | - [Markdown 展示](markdown.md) 12 | 13 | - [页面展示](page.md) 14 | 15 | - [禁用展示](disable.md) 16 | 17 | - [加密展示](encrypt.md) 18 | -------------------------------------------------------------------------------- /libs/zhi-env/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "Node", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/zhi-log/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "Node", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/zhi-blog-api/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "Node", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/zhi-chatgpt/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "Node", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/zhi-common/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "Node", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/zhi-device/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "Node", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/zhi-lib-base/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "Node", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/zhi-rubick-ui/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "Node", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/zhi-common-version/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "Node", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/zhi-siyuan-api/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "Node", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/zhi-common-markdown/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "Node", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/zhi-fetch-middleware/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "Node", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/zhi-github-middleware/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "Node", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/zhi-gitlab-middleware/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "Node", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/zhi-notion-markdown/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "Node", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/zhi-xmlrpc-middleware/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "Node", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/zhi-common-json-validate/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "Node", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /apps/zhi-docs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tools/tsconfig/base.json", 3 | "compilerOptions": { 4 | "target": "esnext", 5 | "module": "esnext", 6 | "isolatedModules": false, 7 | "esModuleInterop": true 8 | }, 9 | "include": ["src/**/*.ts"], 10 | "exclude": ["node_modules"] 11 | } 12 | -------------------------------------------------------------------------------- /.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json", 3 | "changelog": "@changesets/cli/changelog", 4 | "commit": false, 5 | "fixed": [], 6 | "linked": [], 7 | "access": "restricted", 8 | "baseBranch": "dev", 9 | "updateInternalDependencies": "patch", 10 | "ignore": [] 11 | } 12 | -------------------------------------------------------------------------------- /apps/zhi-docs/src/zh/demo/encrypt.md: -------------------------------------------------------------------------------- 1 | --- 2 | icon: lock 3 | category: 4 | - 使用指南 5 | tag: 6 | - 文章加密 7 | --- 8 | 9 | # 密码加密的文章 10 | 11 | 实际的文章内容。 12 | 13 | 段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字。 14 | 15 | 段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字。 16 | -------------------------------------------------------------------------------- /libs/zhi-rubick-ui/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "globalDependencies": ["**/.env.*local"], 4 | "pipeline": { 5 | "lint": {}, 6 | "dev": { 7 | "cache": false, 8 | "persistent": true 9 | }, 10 | "build": { 11 | "dependsOn": ["^build"] 12 | }, 13 | "localBuild": { 14 | "dependsOn": ["^build"] 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /libs/zhi-env/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Vite + Vue + TS 7 | 8 | 9 | This file is for lib hot-load test only, see /src/index.ts 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /libs/zhi-log/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Vite + Vue + TS 7 | 8 | 9 | This file is for lib hot-load test only, see /src/index.ts 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /apps/zhi-infra/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tools/tsconfig/base.json", 3 | "compilerOptions": { 4 | "target": "esnext", 5 | "module": "esnext", 6 | "moduleResolution": "node", 7 | "isolatedModules": false, 8 | "esModuleInterop": true, 9 | "resolveJsonModule": true, 10 | "outDir": "./dist" 11 | }, 12 | "include": ["./**/*.vue", "./**/*.ts", "./**/*.spec.ts"], 13 | "exclude": ["./dist"] 14 | } 15 | -------------------------------------------------------------------------------- /libs/zhi-blog-api/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Vite + Vue + TS 7 | 8 | 9 | This file is for lib hot-load test only, see /src/index.ts 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /libs/zhi-chatgpt/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Vite + Vue + TS 7 | 8 | 9 | This file is for lib hot-load test only, see /src/index.ts 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /libs/zhi-common/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Vite + Vue + TS 7 | 8 | 9 | This file is for lib hot-load test only, see /src/index.ts 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /libs/zhi-device/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Vite + Vue + TS 7 | 8 | 9 | This file is for lib hot-load test only, see /src/index.ts 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /libs/zhi-lib-base/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Vite + Vue + TS 7 | 8 | 9 | This file is for lib hot-load test only, see /src/index.ts 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /libs/zhi-rubick-ui/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + Vue + TS 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /libs/zhi-siyuan-api/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Vite + Vue + TS 7 | 8 | 9 | This file is for lib hot-load test only, see /src/index.ts 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /libs/zhi-common-markdown/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Vite + Vue + TS 7 | 8 | 9 | This file is for lib hot-load test only, see /src/index.ts 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /libs/zhi-common-version/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Vite + Vue + TS 7 | 8 | 9 | This file is for lib hot-load test only, see /src/index.ts 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /libs/zhi-notion-markdown/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Vite + Vue + TS 7 | 8 | 9 | This file is for lib hot-load test only, see /src/index.ts 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /libs/zhi-cmd/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tools/tsconfig/base.json", 3 | "compilerOptions": { 4 | "target": "esnext", 5 | "module": "esnext", 6 | "moduleResolution": "node", 7 | "isolatedModules": false, 8 | "esModuleInterop": true, 9 | "outDir": "./dist" 10 | }, 11 | "include": [ 12 | "./**/*.vue", 13 | "./**/*.ts", 14 | "./**/*.spec.ts" 15 | ], 16 | "exclude": [ 17 | "./dist" 18 | ] 19 | } -------------------------------------------------------------------------------- /libs/zhi-common-json-validate/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Vite + Vue + TS 7 | 8 | 9 | This file is for lib hot-load test only, see /src/index.ts 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /libs/zhi-fetch-middleware/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Vite + Vue + TS 7 | 8 | 9 | This file is for lib hot-load test only, see /src/index.ts 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /libs/zhi-github-middleware/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Vite + Vue + TS 7 | 8 | 9 | This file is for lib hot-load test only, see /src/index.ts 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /libs/zhi-gitlab-middleware/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Vite + Vue + TS 7 | 8 | 9 | This file is for lib hot-load test only, see /src/index.ts 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /libs/zhi-xmlrpc-middleware/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Vite + Vue + TS 7 | 8 | 9 | This file is for lib hot-load test only, see /src/index.ts 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /libs/zhi-rubick-core/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tools/tsconfig/base.json", 3 | "compilerOptions": { 4 | "target": "esnext", 5 | "module": "esnext", 6 | "moduleResolution": "node", 7 | "isolatedModules": false, 8 | "esModuleInterop": true, 9 | "outDir": "./dist" 10 | }, 11 | "include": [ 12 | "./**/*.vue", 13 | "./**/*.ts", 14 | "./**/*.spec.ts" 15 | ], 16 | "exclude": [ 17 | "./dist" 18 | ] 19 | } -------------------------------------------------------------------------------- /libs/zhi-notion-markdown/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # zhi-notion-markdown 2 | 3 | ## 0.1.4 4 | 5 | ### Patch Changes 6 | 7 | - update deps 8 | 9 | ## 0.1.3 10 | 11 | ### Patch Changes 12 | 13 | - polifill path and url 14 | 15 | ## 0.1.2 16 | 17 | ### Patch Changes 18 | 19 | - fix packaging format errors 20 | 21 | ## 0.1.1 22 | 23 | ### Patch Changes 24 | 25 | - fix type 26 | 27 | ## 0.1.0 28 | 29 | ### Minor Changes 30 | 31 | - add notion markdown converter 32 | -------------------------------------------------------------------------------- /tools/vitest-config-custom/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@terwer/vitest-config-custom", 3 | "version": "1.0.6", 4 | "description": "custom config for vitest", 5 | "keywords": [ 6 | "vite", 7 | "vitest" 8 | ], 9 | "author": "terwer", 10 | "license": "MIT", 11 | "peerDependencies": { 12 | "jsdom": "^21.1.1", 13 | "vite": "^4.2.2", 14 | "vitest": "^0.31.1" 15 | }, 16 | "publishConfig": { 17 | "access": "public" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /apps/zhi-cli/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tools/tsconfig/base.json", 3 | "compilerOptions": { 4 | "target": "esnext", 5 | "module": "esnext", 6 | "moduleResolution": "node", 7 | "isolatedModules": false, 8 | "esModuleInterop": true, 9 | "resolveJsonModule": true, 10 | "outDir": "./dist" 11 | }, 12 | "include": [ 13 | "./**/*.vue", 14 | "./**/*.ts", 15 | "./**/*.spec.ts" 16 | ], 17 | "exclude": [ 18 | "./dist" 19 | ] 20 | } -------------------------------------------------------------------------------- /libs/zhi-env/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # zhi-env 2 | 3 | ## 1.18.6 4 | 5 | ### Patch Changes 6 | 7 | - add hash query string 8 | 9 | ## 1.18.5 10 | 11 | ### Patch Changes 12 | 13 | - fix esbuild deps 14 | 15 | ## 1.18.4 16 | 17 | ### Patch Changes 18 | 19 | - update deps 20 | 21 | ## 1.18.3 22 | 23 | ### Patch Changes 24 | 25 | - update deps 26 | 27 | ## 1.18.2 28 | 29 | ### Patch Changes 30 | 31 | - update deps 32 | 33 | ## 1.18.1 34 | 35 | ### Patch Changes 36 | 37 | - update deps 38 | -------------------------------------------------------------------------------- /libs/zhi-rubick-ui/src/assets/vue.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/commit-config-custom/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @terwer/commit-config-custom 2 | 3 | ## 1.0.9 4 | 5 | ### Patch Changes 6 | 7 | - add hash query string 8 | 9 | ## 1.0.8 10 | 11 | ### Patch Changes 12 | 13 | - fix esbuild deps 14 | 15 | ## 1.0.7 16 | 17 | ### Patch Changes 18 | 19 | - update deps 20 | 21 | ## 1.0.6 22 | 23 | ### Patch Changes 24 | 25 | - update deps 26 | 27 | ## 1.0.5 28 | 29 | ### Patch Changes 30 | 31 | - update deps 32 | 33 | ## 1.0.4 34 | 35 | ### Patch Changes 36 | 37 | - update deps 38 | -------------------------------------------------------------------------------- /tools/eslint-config-custom/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @terwer/eslint-config-custom 2 | 3 | ## 1.3.6 4 | 5 | ### Patch Changes 6 | 7 | - add hash query string 8 | 9 | ## 1.3.5 10 | 11 | ### Patch Changes 12 | 13 | - fix esbuild deps 14 | 15 | ## 1.3.4 16 | 17 | ### Patch Changes 18 | 19 | - update deps 20 | 21 | ## 1.3.3 22 | 23 | ### Patch Changes 24 | 25 | - update deps 26 | 27 | ## 1.3.2 28 | 29 | ### Patch Changes 30 | 31 | - update deps 32 | 33 | ## 1.3.1 34 | 35 | ### Patch Changes 36 | 37 | - update deps 38 | -------------------------------------------------------------------------------- /tools/vitest-config-custom/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @terwer/vitest-config-custom 2 | 3 | ## 1.0.6 4 | 5 | ### Patch Changes 6 | 7 | - add hash query string 8 | 9 | ## 1.0.5 10 | 11 | ### Patch Changes 12 | 13 | - fix esbuild deps 14 | 15 | ## 1.0.4 16 | 17 | ### Patch Changes 18 | 19 | - update deps 20 | 21 | ## 1.0.3 22 | 23 | ### Patch Changes 24 | 25 | - update deps 26 | 27 | ## 1.0.2 28 | 29 | ### Patch Changes 30 | 31 | - update deps 32 | 33 | ## 1.0.1 34 | 35 | ### Patch Changes 36 | 37 | - update deps 38 | -------------------------------------------------------------------------------- /apps/zhi-docs/src/.vuepress/navbar/en.ts: -------------------------------------------------------------------------------- 1 | import { navbar } from "vuepress-theme-hope" 2 | 3 | export const enNavbar = navbar([ 4 | "/", 5 | { 6 | text: "Api", 7 | icon: "creative", 8 | prefix: "/api/", 9 | children: [ 10 | { 11 | text: "Zhi core", 12 | icon: "creative", 13 | prefix: "zhi-core/", 14 | children: ["zhi-core"], 15 | }, 16 | ], 17 | }, 18 | { 19 | text: "Blog", 20 | icon: "note", 21 | link: "https://terwer.space", 22 | }, 23 | ]) 24 | -------------------------------------------------------------------------------- /.changeset/README.md: -------------------------------------------------------------------------------- 1 | # Changesets 2 | 3 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works 4 | with multi-package repos, or single-package repos to help you version and publish your code. You can 5 | find the full documentation for it [in our repository](https://github.com/changesets/changesets) 6 | 7 | We have a quick list of common questions to get you started engaging with this project in 8 | [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) 9 | -------------------------------------------------------------------------------- /tools/tsconfig/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @terwer/tsconfig 2 | 3 | ## 0.1.0 4 | 5 | ### Minor Changes 6 | 7 | - publish @terwer/tsconfig 8 | 9 | ## 0.0.7 10 | 11 | ### Patch Changes 12 | 13 | - add hash query string 14 | 15 | ## 0.0.6 16 | 17 | ### Patch Changes 18 | 19 | - fix esbuild deps 20 | 21 | ## 0.0.5 22 | 23 | ### Patch Changes 24 | 25 | - update deps 26 | 27 | ## 0.0.4 28 | 29 | ### Patch Changes 30 | 31 | - update deps 32 | 33 | ## 0.0.3 34 | 35 | ### Patch Changes 36 | 37 | - update deps 38 | 39 | ## 0.0.2 40 | 41 | ### Patch Changes 42 | 43 | - update deps 44 | -------------------------------------------------------------------------------- /libs/zhi-siyuan-api/src/index.ts: -------------------------------------------------------------------------------- 1 | import SiyuanApi from "./lib/zhi-siyuan-api" 2 | import SiyuanKernelApi from "./lib/kernel/siyuanKernelApi" 3 | import SiyuanConfig from "./lib/config/siyuanConfig" 4 | import SiYuanApiAdaptor from "./lib/adaptor/siYuanApiAdaptor" 5 | import SiyuanConstants from "./lib/siyuanConstants" 6 | import SiyuanAttr from "./lib/adaptor/siyuanAttr" 7 | import { SiyuanData } from "./lib/kernel/ISiyuanKernelApi" 8 | 9 | export { SiyuanApi } 10 | export { type SiyuanData, SiyuanAttr, SiyuanKernelApi } 11 | export { SiyuanConstants, SiyuanConfig, SiYuanApiAdaptor } 12 | -------------------------------------------------------------------------------- /tools/vite-config-custom/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @terwer/vite-config-custom 2 | 3 | ## 0.7.6 4 | 5 | ### Patch Changes 6 | 7 | - add hash query string 8 | 9 | ## 0.7.5 10 | 11 | ### Patch Changes 12 | 13 | - fix esbuild deps 14 | 15 | ## 0.7.4 16 | 17 | ### Patch Changes 18 | 19 | - update deps 20 | 21 | ## 0.7.3 22 | 23 | ### Patch Changes 24 | 25 | - update deps 26 | 27 | ## 0.7.2 28 | 29 | ### Patch Changes 30 | 31 | - update deps 32 | 33 | ## 0.7.1 34 | 35 | ### Patch Changes 36 | 37 | - update deps 38 | 39 | ## 0.7.0 40 | 41 | ### Minor Changes 42 | 43 | - update deps 44 | -------------------------------------------------------------------------------- /apps/zhi-docs/src/.vuepress/config.ts: -------------------------------------------------------------------------------- 1 | import { defineUserConfig } from "vuepress" 2 | import theme from "./theme.js" 3 | 4 | export default defineUserConfig({ 5 | base: "/", 6 | 7 | dest: "src/.vuepress/dist", 8 | 9 | locales: { 10 | "/": { 11 | lang: "en-US", 12 | title: "Zhi docs", 13 | description: "Docs for zhi framework", 14 | }, 15 | "/zh/": { 16 | lang: "zh-CN", 17 | title: "Zhi文档", 18 | description: "zhi 框架的文档", 19 | }, 20 | }, 21 | 22 | theme, 23 | 24 | // Enable it with pwa 25 | // shouldPrefetch: false, 26 | }) 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | .pnp 6 | .pnp.js 7 | 8 | # testing 9 | coverage 10 | 11 | # build 12 | out/ 13 | build 14 | dist 15 | cache 16 | 17 | # misc 18 | .DS_Store 19 | *.pem 20 | 21 | # debug 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | 26 | # local env files 27 | .env 28 | .env.local 29 | .env.development.local 30 | .env.test.local 31 | .env.production.local 32 | 33 | # turbo 34 | .turbo 35 | 36 | # vercel 37 | .vercel 38 | 39 | # IDE 40 | .idea 41 | temps 42 | -------------------------------------------------------------------------------- /libs/zhi-rubick-core/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # zhi-rubick-core 2 | 3 | ## 0.3.2 4 | 5 | ### Patch Changes 6 | 7 | - Updated dependencies 8 | - zhi-device@2.12.0 9 | 10 | ## 0.3.1 11 | 12 | ### Patch Changes 13 | 14 | - Updated dependencies 15 | - zhi-device@2.11.0 16 | 17 | ## 0.3.0 18 | 19 | ### Minor Changes 20 | 21 | - feat: support event and path def for rubick 22 | 23 | ## 0.2.1 24 | 25 | ### Patch Changes 26 | 27 | - fix: auto invoke 28 | 29 | ## 0.2.0 30 | 31 | ### Minor Changes 32 | 33 | - feat: add cmd log 34 | 35 | ## 0.1.1 36 | 37 | ### Patch Changes 38 | 39 | - feat: add zhi-rubick-core 40 | -------------------------------------------------------------------------------- /libs/zhi-blog-api/README.md: -------------------------------------------------------------------------------- 1 | # zhi-blog-api 2 | 3 | a common blog interface 4 | 5 | Note: BlogApi should be implemented as a specific BlogApi, it cannot be used directly 6 | 7 | ## Deps 8 | 9 | ``` 10 | ├── zhi-lib-base 11 | ``` 12 | 13 | ## Dev 14 | 15 | ```bash 16 | pnpm dev -F zhi-blog-api 17 | ``` 18 | 19 | ## Build 20 | 21 | ```bash 22 | pnpm build -F zhi-blog-api 23 | ``` 24 | 25 | ## Test 26 | 27 | Execute the unit tests via [vitest](https://vitest.dev) 28 | 29 | ```bash 30 | pnpm test -F zhi-blog-api 31 | ``` 32 | 33 | ## Publish 34 | 35 | ```bash 36 | pnpm publish -F zhi-blog-api --tag latest 37 | ``` -------------------------------------------------------------------------------- /tools/tsconfig/base.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "Default", 4 | "compilerOptions": { 5 | "composite": false, 6 | "declaration": true, 7 | "declarationMap": true, 8 | "esModuleInterop": true, 9 | "forceConsistentCasingInFileNames": true, 10 | "inlineSources": false, 11 | "isolatedModules": true, 12 | "moduleResolution": "node", 13 | "noUnusedLocals": false, 14 | "noUnusedParameters": false, 15 | "preserveWatchOutput": true, 16 | "skipLibCheck": true, 17 | "strict": true 18 | }, 19 | "exclude": ["node_modules"] 20 | } 21 | -------------------------------------------------------------------------------- /libs/zhi-chatgpt/README.md: -------------------------------------------------------------------------------- 1 | # zhi-chatgpt 2 | 3 | chatgpt api for siyuan-note 4 | 5 | ## Usage 6 | 7 | ```js 8 | // usage 9 | ``` 10 | 11 | ## Deps 12 | 13 | ``` 14 | ## Congregations! zhi-chatgpt need no deps, it is just pure js code 🎉 15 | ``` 16 | 17 | ## Dev 18 | 19 | ```bash 20 | pnpm dev -F zhi-chatgpt 21 | ``` 22 | 23 | ## Build 24 | 25 | ```bash 26 | pnpm build -F zhi-chatgpt 27 | ``` 28 | 29 | ## Test 30 | 31 | Execute the unit tests via [vitest](https://vitest.dev) 32 | 33 | ```bash 34 | pnpm test -F zhi-chatgpt 35 | ``` 36 | 37 | ## Publish 38 | 39 | ```bash 40 | pnpm publish -F zhi-chatgpt --tag latest 41 | ``` -------------------------------------------------------------------------------- /tools/tsconfig/nextjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "Next.js", 4 | "extends": "./base.json", 5 | "compilerOptions": { 6 | "plugins": [{ "name": "next" }], 7 | "allowJs": true, 8 | "declaration": false, 9 | "declarationMap": false, 10 | "incremental": true, 11 | "jsx": "preserve", 12 | "lib": ["dom", "dom.iterable", "esnext"], 13 | "module": "esnext", 14 | "noEmit": true, 15 | "resolveJsonModule": true, 16 | "strict": false, 17 | "target": "es5" 18 | }, 19 | "include": ["src", "next-env.d.ts"], 20 | "exclude": ["node_modules"] 21 | } 22 | -------------------------------------------------------------------------------- /apps/zhi-docs/src/zh/demo/disable.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 布局与功能禁用 3 | icon: config 4 | order: 3 5 | category: 6 | - 使用指南 7 | tag: 8 | - 禁用 9 | 10 | navbar: false 11 | sidebar: false 12 | 13 | breadcrumb: false 14 | pageInfo: false 15 | contributors: false 16 | editLink: false 17 | lastUpdated: false 18 | prev: false 19 | next: false 20 | comment: false 21 | footer: false 22 | 23 | backtotop: false 24 | --- 25 | 26 | 你可以通过设置页面的 Frontmatter,在页面禁用功能与布局。 27 | 28 | 29 | 30 | 本页面就是一个示例,禁用了如下功能: 31 | 32 | - 导航栏 33 | - 侧边栏 34 | - 路径导航 35 | - 页面信息 36 | - 贡献者 37 | - 编辑此页链接 38 | - 更新时间 39 | - 上一篇/下一篇 链接 40 | - 评论 41 | - 页脚 42 | - 返回顶部按钮 43 | -------------------------------------------------------------------------------- /libs/zhi-lib-base/README.md: -------------------------------------------------------------------------------- 1 | # zhi-lib-base 2 | 3 | minimization dependencies for class library 4 | 5 | ## Usage 6 | 7 | ```js 8 | // usage 9 | ``` 10 | 11 | ## Deps 12 | 13 | ``` 14 | ## Congregations! zhi-lib-base need no deps, it is just pure js code 🎉 15 | ``` 16 | 17 | ## Dev 18 | 19 | ```bash 20 | pnpm dev -F zhi-lib-base 21 | ``` 22 | 23 | ## Build 24 | 25 | ```bash 26 | pnpm build -F zhi-lib-base 27 | ``` 28 | 29 | ## Test 30 | 31 | Execute the unit tests via [vitest](https://vitest.dev) 32 | 33 | ```bash 34 | pnpm test -F zhi-lib-base 35 | ``` 36 | 37 | ## Publish 38 | 39 | ```bash 40 | pnpm publish -F zhi-lib-base --tag latest 41 | ``` -------------------------------------------------------------------------------- /libs/zhi-common-markdown/README.md: -------------------------------------------------------------------------------- 1 | # zhi-common-markdown 2 | 3 | a universal Markdown parsing tool 4 | 5 | ## Usage 6 | 7 | ```js 8 | // usage 9 | ``` 10 | 11 | ## Deps 12 | 13 | ``` 14 | ## Congregations! zhi-common-markdown need no deps, it is just pure js code 🎉 15 | ``` 16 | 17 | ## Dev 18 | 19 | ```bash 20 | pnpm dev -F zhi-common-markdown 21 | ``` 22 | 23 | ## Build 24 | 25 | ```bash 26 | pnpm build -F zhi-common-markdown 27 | ``` 28 | 29 | ## Test 30 | 31 | Execute the unit tests via [vitest](https://vitest.dev) 32 | 33 | ```bash 34 | pnpm test -F zhi-common-markdown 35 | ``` 36 | 37 | ## Publish 38 | 39 | ```bash 40 | pnpm publish -F zhi-common-markdown --tag latest 41 | ``` -------------------------------------------------------------------------------- /libs/zhi-gitlab-middleware/README.md: -------------------------------------------------------------------------------- 1 | # zhi-gitlab-middleware 2 | 3 | a middleware for gitlab api 4 | 5 | ## Usage 6 | 7 | ```js 8 | // usage 9 | ``` 10 | 11 | ## Deps 12 | 13 | ``` 14 | ## Congregations! zhi-gitlab-middleware need no deps, it is just pure js code 🎉 15 | ``` 16 | 17 | ## Dev 18 | 19 | ```bash 20 | pnpm dev -F zhi-gitlab-middleware 21 | ``` 22 | 23 | ## Build 24 | 25 | ```bash 26 | pnpm build -F zhi-gitlab-middleware 27 | ``` 28 | 29 | ## Test 30 | 31 | Execute the unit tests via [vitest](https://vitest.dev) 32 | 33 | ```bash 34 | pnpm test -F zhi-gitlab-middleware 35 | ``` 36 | 37 | ## Publish 38 | 39 | ```bash 40 | pnpm publish -F zhi-gitlab-middleware --tag latest 41 | ``` -------------------------------------------------------------------------------- /apps/zhi-docs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zhi-docs", 3 | "version": "1.0.0", 4 | "description": "a collection of zhi-docs auto build", 5 | "license": "MIT", 6 | "type": "module", 7 | "scripts": { 8 | "apidev": "vuepress dev src --clean-cache", 9 | "apibuild": "vuepress build src", 10 | "update": "pnpm dlx vp-update" 11 | }, 12 | "devDependencies": { 13 | "@vuepress/client": "2.0.0-beta.61", 14 | "@terwer/eslint-config-custom": "workspace:*", 15 | "@terwer/tsconfig": "workspace:*", 16 | "vue": "^3.2.47", 17 | "vuepress": "2.0.0-beta.61", 18 | "vuepress-theme-hope": "2.0.0-beta.206" 19 | }, 20 | "publishConfig": { 21 | "access": "public" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /libs/zhi-common-version/README.md: -------------------------------------------------------------------------------- 1 | # zhi-common-version 2 | 3 | comparison and computation pertaining to version related aspects 4 | 5 | ## Usage 6 | 7 | ```js 8 | // usage 9 | ``` 10 | 11 | ## Deps 12 | 13 | ``` 14 | ## Congregations! zhi-common-version need no deps, it is just pure js code 🎉 15 | ``` 16 | 17 | ## Dev 18 | 19 | ```bash 20 | pnpm dev -F zhi-common-version 21 | ``` 22 | 23 | ## Build 24 | 25 | ```bash 26 | pnpm build -F zhi-common-version 27 | ``` 28 | 29 | ## Test 30 | 31 | Execute the unit tests via [vitest](https://vitest.dev) 32 | 33 | ```bash 34 | pnpm test -F zhi-common-version 35 | ``` 36 | 37 | ## Publish 38 | 39 | ```bash 40 | pnpm publish -F zhi-common-version --tag latest 41 | ``` -------------------------------------------------------------------------------- /libs/zhi-fetch-middleware/README.md: -------------------------------------------------------------------------------- 1 | # zhi-fetch-middleware 2 | 3 | an intermediate tier prepared for fetch requests 4 | 5 | ## Usage 6 | 7 | ```js 8 | // usage 9 | ``` 10 | 11 | ## Deps 12 | 13 | ``` 14 | ## Congregations! zhi-fetch-middleware need no deps, it is just pure js code 🎉 15 | ``` 16 | 17 | ## Dev 18 | 19 | ```bash 20 | pnpm dev -F zhi-fetch-middleware 21 | ``` 22 | 23 | ## Build 24 | 25 | ```bash 26 | pnpm build -F zhi-fetch-middleware 27 | ``` 28 | 29 | ## Test 30 | 31 | Execute the unit tests via [vitest](https://vitest.dev) 32 | 33 | ```bash 34 | pnpm test -F zhi-fetch-middleware 35 | ``` 36 | 37 | ## Publish 38 | 39 | ```bash 40 | pnpm publish -F zhi-fetch-middleware --tag latest 41 | ``` -------------------------------------------------------------------------------- /tools/commit-config-custom/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@terwer/commit-config-custom", 3 | "version": "1.0.9", 4 | "type": "module", 5 | "description": "commitlint custom config", 6 | "keywords": [ 7 | "commitlint", 8 | "commit", 9 | "lint" 10 | ], 11 | "author": "terwer", 12 | "license": "MIT", 13 | "peerDependencies": { 14 | "@commitlint/cli": "^17.6.1", 15 | "@commitlint/config-angular": "^17.6.1", 16 | "@commitlint/cz-commitlint": "^17.5.0", 17 | "@commitlint/prompt-cli": "^17.6.1", 18 | "commitizen": "^4.3.0", 19 | "husky": "^8.0.3", 20 | "inquirer": "8", 21 | "is-ci": "^3.0.1" 22 | }, 23 | "publishConfig": { 24 | "access": "public" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /libs/zhi-common-json-validate/README.md: -------------------------------------------------------------------------------- 1 | # zhi-common-json-validate 2 | 3 | utilized for the execution of json schema validation 4 | 5 | ## Usage 6 | 7 | ```js 8 | // usage 9 | ``` 10 | 11 | ## Deps 12 | 13 | ``` 14 | ## Congregations! zhi-common-json-validate need no deps, it is just pure js code 🎉 15 | ``` 16 | 17 | ## Dev 18 | 19 | ```bash 20 | pnpm dev -F zhi-common-json-validate 21 | ``` 22 | 23 | ## Build 24 | 25 | ```bash 26 | pnpm build -F zhi-common-json-validate 27 | ``` 28 | 29 | ## Test 30 | 31 | Execute the unit tests via [vitest](https://vitest.dev) 32 | 33 | ```bash 34 | pnpm test -F zhi-common-json-validate 35 | ``` 36 | 37 | ## Publish 38 | 39 | ```bash 40 | pnpm publish -F zhi-common-json-validate --tag latest 41 | ``` -------------------------------------------------------------------------------- /libs/zhi-common/README.md: -------------------------------------------------------------------------------- 1 | # zhi-common 2 | 3 | a collection of util tools 4 | 5 | ## Usage 6 | 7 | ```ts 8 | import { zhiCommon } from "zhi-common" 9 | 10 | const dateUtil = zhiCommon.dateUtil 11 | const now = dateUtil.nowDateZh() 12 | console.log("now=>", now) 13 | ``` 14 | 15 | ## Deps 16 | 17 | ``` 18 | ## Congregations! zhi-env need no deps, it is just pure js code 🎉 19 | ``` 20 | 21 | ## Dev 22 | 23 | ```bash 24 | pnpm dev -F zhi-common 25 | ``` 26 | 27 | ## Build 28 | 29 | ```bash 30 | pnpm build -F zhi-common 31 | ``` 32 | 33 | ## Test 34 | 35 | Execute the unit tests via [vitest](https://vitest.dev) 36 | 37 | ```bash 38 | pnpm test -F zhi-common 39 | ``` 40 | 41 | ## Publish 42 | 43 | ```bash 44 | pnpm publish -F zhi-common --tag latest 45 | ``` -------------------------------------------------------------------------------- /libs/zhi-rubick-ui/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "Node", 11 | "allowImportingTsExtensions": true, 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "noEmit": true, 15 | "jsx": "preserve", 16 | 17 | /* Linting */ 18 | "strict": true, 19 | "noUnusedLocals": true, 20 | "noUnusedParameters": true, 21 | "noFallthroughCasesInSwitch": true 22 | }, 23 | "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"], 24 | "references": [{ "path": "./tsconfig.node.json" }] 25 | } 26 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zhi-framework", 3 | "private": true, 4 | "version": "1.0.0", 5 | "packageManager": "pnpm@7.15.0", 6 | "scripts": { 7 | "lint": "turbo run lint", 8 | "dev": "turbo run dev", 9 | "build": "turbo run build", 10 | "localBuild": "turbo run localBuild", 11 | "cz": "git-cz", 12 | "add-changeset": "changeset", 13 | "publish-packages": "turbo run build lint && changeset version && changeset publish" 14 | }, 15 | "config": { 16 | "commitizen": { 17 | "path": "@commitlint/cz-commitlint" 18 | } 19 | }, 20 | "devDependencies": { 21 | "@changesets/cli": "^2.27.1", 22 | "@terwer/commit-config-custom": "workspace:*", 23 | "@terwer/eslint-config-custom": "workspace:*", 24 | "turbo": "^1.13.2" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /libs/zhi-rubick-ui/src/App.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 16 | 17 | 31 | -------------------------------------------------------------------------------- /apps/zhi-docs/src/.vuepress/navbar/zh.ts: -------------------------------------------------------------------------------- 1 | import { navbar } from "vuepress-theme-hope"; 2 | 3 | export const zhNavbar = navbar([ 4 | "/zh/", 5 | { text: "案例", icon: "discover", link: "/zh/demo/" }, 6 | { 7 | text: "指南", 8 | icon: "creative", 9 | prefix: "/zh/guide/", 10 | children: [ 11 | { 12 | text: "Bar", 13 | icon: "creative", 14 | prefix: "bar/", 15 | children: ["baz", { text: "...", icon: "more", link: "" }], 16 | }, 17 | { 18 | text: "Foo", 19 | icon: "config", 20 | prefix: "foo/", 21 | children: ["ray", { text: "...", icon: "more", link: "" }], 22 | }, 23 | ], 24 | }, 25 | { 26 | text: "V2 文档", 27 | icon: "note", 28 | link: "https://theme-hope.vuejs.press/zh/", 29 | }, 30 | ]); 31 | -------------------------------------------------------------------------------- /libs/zhi-rubick-ui/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zhi-rubick-ui", 3 | "private": true, 4 | "version": "0.0.1", 5 | "type": "module", 6 | "scripts": { 7 | "serve": "vite", 8 | "dev": "vue-tsc && vite build --watch --outDir=/Users/terwer/Documents/mydocs/SiYuanWorkspace/test/data/plugins/siyuan-plugin-local-service/libs/zhi-rubick-ui", 9 | "build": "vue-tsc && vite build", 10 | "localBuild": "vue-tsc && vite build --outDir=/Users/terwer/Documents/mydocs/siyuan-plugins/siyuan-plugin-local-service/public/libs/zhi-rubick-ui", 11 | "preview": "vite preview" 12 | }, 13 | "dependencies": { 14 | "vue": "^3.3.4" 15 | }, 16 | "devDependencies": { 17 | "@vitejs/plugin-vue": "^4.2.3", 18 | "typescript": "^5.0.2", 19 | "vite": "^4.4.5", 20 | "vue-tsc": "^1.8.5" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tools/vite-config-custom/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@terwer/vite-config-custom", 3 | "version": "0.7.6", 4 | "description": "custom config for vite", 5 | "main": "./vite.config.ts", 6 | "keywords": [ 7 | "vite", 8 | "vitest", 9 | "typescript" 10 | ], 11 | "author": "terwer", 12 | "license": "MIT", 13 | "peerDependencies": { 14 | "@types/minimist": "1.2.2", 15 | "jsdom": "^22.0.0", 16 | "minimist": "^1.2.8", 17 | "rollup-plugin-livereload": "^2.0.5", 18 | "typescript": "^5.0.4", 19 | "vite": "^4.3.5", 20 | "vite-plugin-dts": "^2.3.0", 21 | "vite-plugin-node-polyfills": "^0.15.0", 22 | "vite-plugin-static-copy": "^0.15.0", 23 | "vite-tsconfig-paths": "^4.2.0", 24 | "vitest": "^0.31.0" 25 | }, 26 | "publishConfig": { 27 | "access": "public" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /libs/zhi-blog-api/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "Node", 11 | // "allowImportingTsExtensions": true, 12 | "allowSyntheticDefaultImports": true, 13 | "resolveJsonModule": true, 14 | "isolatedModules": true, 15 | "noEmit": true, 16 | "jsx": "preserve", 17 | 18 | /* Linting */ 19 | "strict": false, 20 | "noUnusedLocals": false, 21 | "noUnusedParameters": false, 22 | "noFallthroughCasesInSwitch": false, 23 | 24 | "types": ["vite/client"] 25 | }, 26 | "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"], 27 | "references": [{ "path": "./tsconfig.node.json" }] 28 | } 29 | -------------------------------------------------------------------------------- /libs/zhi-env/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "Node", 11 | // "allowImportingTsExtensions": true, 12 | "allowSyntheticDefaultImports": true, 13 | "resolveJsonModule": true, 14 | "isolatedModules": true, 15 | "noEmit": true, 16 | "jsx": "preserve", 17 | 18 | /* Linting */ 19 | "strict": true, 20 | "noUnusedLocals": true, 21 | "noUnusedParameters": true, 22 | "noFallthroughCasesInSwitch": true, 23 | 24 | "types": ["node", "vite/client"] 25 | }, 26 | "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"], 27 | "references": [{ "path": "./tsconfig.node.json" }] 28 | } 29 | -------------------------------------------------------------------------------- /libs/zhi-log/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "Node", 11 | // "allowImportingTsExtensions": true, 12 | "allowSyntheticDefaultImports": true, 13 | "resolveJsonModule": true, 14 | "isolatedModules": true, 15 | "noEmit": true, 16 | "jsx": "preserve", 17 | 18 | /* Linting */ 19 | "strict": true, 20 | "noUnusedLocals": true, 21 | "noUnusedParameters": true, 22 | "noFallthroughCasesInSwitch": true, 23 | 24 | "types": ["node", "vite/client"] 25 | }, 26 | "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"], 27 | "references": [{ "path": "./tsconfig.node.json" }] 28 | } 29 | -------------------------------------------------------------------------------- /libs/zhi-device/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "Node", 11 | // "allowImportingTsExtensions": true, 12 | "allowSyntheticDefaultImports": true, 13 | "resolveJsonModule": true, 14 | "isolatedModules": true, 15 | "noEmit": true, 16 | "jsx": "preserve", 17 | 18 | /* Linting */ 19 | "strict": true, 20 | // "noUnusedLocals": true, 21 | // "noUnusedParameters": true, 22 | "noFallthroughCasesInSwitch": true, 23 | 24 | "types": ["node", "vite/client"] 25 | }, 26 | "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"], 27 | "references": [{ "path": "./tsconfig.node.json" }] 28 | } 29 | -------------------------------------------------------------------------------- /tools/eslint-config-custom/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@terwer/eslint-config-custom", 3 | "version": "1.3.6", 4 | "description": "custom config for eslint, support typescript, vue, astro, svelte, next etc.default is typescript", 5 | "main": "./typescript/index.cjs", 6 | "license": "MIT", 7 | "peerDependencies": { 8 | "@nuxt/eslint-config": "^0.1.1", 9 | "@typescript-eslint/eslint-plugin": "^5.57.1", 10 | "astro-eslint-parser": "^0.13.3", 11 | "eslint": "^8.38.0", 12 | "eslint-config-prettier": "^8.3.0", 13 | "eslint-config-turbo": "^1.8.8", 14 | "eslint-plugin-prettier": "^4.2.1", 15 | "eslint-plugin-svelte": "^2.28.0", 16 | "eslint-plugin-vue": "^9.11.0", 17 | "prettier": "^2.8.7", 18 | "prettier-plugin-svelte": "^2.10.0", 19 | "typescript": "^5.0.4" 20 | }, 21 | "publishConfig": { 22 | "access": "public" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /libs/zhi-siyuan-api/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "Node", 11 | // "allowImportingTsExtensions": true, 12 | "allowSyntheticDefaultImports": true, 13 | "resolveJsonModule": true, 14 | "isolatedModules": true, 15 | "noEmit": true, 16 | "jsx": "preserve", 17 | 18 | /* Linting */ 19 | "strict": false, 20 | "noUnusedLocals": false, 21 | "noUnusedParameters": false, 22 | "noFallthroughCasesInSwitch": false, 23 | 24 | "types": ["node", "vite/client"] 25 | }, 26 | "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"], 27 | "references": [{ "path": "./tsconfig.node.json" }] 28 | } 29 | -------------------------------------------------------------------------------- /libs/zhi-common/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "Node", 11 | // "allowImportingTsExtensions": true, 12 | "allowSyntheticDefaultImports": true, 13 | "resolveJsonModule": true, 14 | "isolatedModules": true, 15 | "noEmit": true, 16 | "jsx": "preserve", 17 | 18 | /* Linting */ 19 | "strict": true, 20 | "noUnusedLocals": true, 21 | "noUnusedParameters": true, 22 | "noFallthroughCasesInSwitch": true, 23 | 24 | "types": ["node", "vite/client"] 25 | }, 26 | "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue", "custom.d.ts"], 27 | "references": [{ "path": "./tsconfig.node.json" }] 28 | } 29 | -------------------------------------------------------------------------------- /tools/eslint-config-custom/typescript/index.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: [ 3 | "eslint:recommended", 4 | "plugin:@typescript-eslint/recommended", 5 | "turbo", 6 | "prettier", 7 | ], 8 | 9 | parser: "@typescript-eslint/parser", 10 | 11 | plugins: ["@typescript-eslint", "prettier"], 12 | 13 | rules: { 14 | // Note: you must disable the base rule as it can report incorrect errors 15 | semi: "off", 16 | quotes: "off", 17 | "no-undef": "off", 18 | "@typescript-eslint/explicit-module-boundary-types": "off", 19 | "@typescript-eslint/no-var-requires": "off", 20 | "@typescript-eslint/no-this-alias": "off", 21 | "@typescript-eslint/no-non-null-assertion": "off", 22 | "@typescript-eslint/no-unused-vars": "off", 23 | "@typescript-eslint/no-explicit-any": "off", 24 | "turbo/no-undeclared-env-vars": "off", 25 | "prettier/prettier": "error", 26 | }, 27 | } -------------------------------------------------------------------------------- /apps/zhi-infra/README.md: -------------------------------------------------------------------------------- 1 | # zhi-server-infra 2 | 3 | basic issues for zhi 4 | 5 | ## How to use from electron 6 | 7 | ```js 8 | (async () => { 9 | const initZhiInfra = require("/Users/terwer/Documents/mydocs/zhi-framework/zhi/libs/zhi-infra/dist/index.cjs").default 10 | const path = require("path") 11 | const zhiNpmPath = "/Users/terwer/Documents/mydocs/zhi-framework/zhi/libs/zhi-infra/dist/deps/npm" 12 | await initZhiInfra(zhiNpmPath, true) 13 | })() 14 | ``` 15 | 16 | 可用的 npm 包地址: 17 | 18 | ``` 19 | Available zhi node_modules path1 => [工作空间]/node_modules 20 | Available zhi node_modules path2 => [zhiNpmPath]/node_modules 21 | Available zhi node_modules path3 => [zhiAppNpmPath]/node_modules 22 | 23 | 备注: 24 | Mac上 [zhiAppNpmPath]=/Users/[Mac用户名]/Library/Application Support/siyuancommunity 25 | Windows上 [zhiAppNpmPath]=[用户目录]/siyuancommunity 26 | Linux上 [zhiAppNpmPath]=[用户目录]/siyuancommunity 27 | ``` 28 | 29 | -------------------------------------------------------------------------------- /libs/zhi-github-middleware/README.md: -------------------------------------------------------------------------------- 1 | # zhi-github-middleware 2 | 3 | a middleware for github api 4 | 5 | ## Usage 6 | 7 | ```js 8 | // usage 9 | import { CommonGithubClient } from "zhi-github-middleware" 10 | 11 | const githubConfig = new GithubConfig("terwer", "hexo-blog", "") 12 | const commonGithubClient = new CommonGithubClient(githubConfig) 13 | const result = await commonGithubClient.getGithubPageTreeNode("") 14 | ``` 15 | 16 | ## Deps 17 | 18 | ``` 19 | @octokit/core 20 | js-base64 21 | ``` 22 | 23 | ## Dev 24 | 25 | ```bash 26 | pnpm dev -F zhi-github-middleware 27 | ``` 28 | 29 | ## Build 30 | 31 | ```bash 32 | pnpm build -F zhi-github-middleware 33 | ``` 34 | 35 | ## Test 36 | 37 | Execute the unit tests via [vitest](https://vitest.dev) 38 | 39 | ```bash 40 | pnpm test -F zhi-github-middleware 41 | ``` 42 | 43 | ## Publish 44 | 45 | ```bash 46 | pnpm publish -F zhi-github-middleware --tag latest 47 | ``` -------------------------------------------------------------------------------- /libs/zhi-lib-base/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zhi-lib-base", 3 | "version": "0.8.0", 4 | "type": "module", 5 | "description": "minimization dependencies for class library", 6 | "main": "./dist/index.js", 7 | "typings": "./dist/index.d.ts", 8 | "repository": "terwer/zhi", 9 | "homepage": "https://github.com/terwer/zhi/tree/main/libs/zhi-lib-base", 10 | "author": "terwer", 11 | "license": "MIT", 12 | "files": [ 13 | "dist", 14 | "README.md" 15 | ], 16 | "keywords": [ 17 | "zhi", 18 | "lib" 19 | ], 20 | "scripts": { 21 | "serve": "vite", 22 | "dev": "vite build --watch", 23 | "build": "vite build", 24 | "start": "vite preview", 25 | "test": "npx vitest --watch" 26 | }, 27 | "devDependencies": { 28 | "@terwer/eslint-config-custom": "workspace:*", 29 | "@terwer/vite-config-custom": "workspace:*" 30 | }, 31 | "publishConfig": { 32 | "access": "public" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /tools/vite-config-custom/vite.config.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | import { resolve } from "path" 4 | import { defineConfig } from "vite" 5 | import dts from "vite-plugin-dts" 6 | 7 | export default defineConfig({ 8 | plugins: [dts()], 9 | 10 | build: { 11 | lib: { 12 | // Could also be a dictionary or array of multiple entry points 13 | entry: resolve(__dirname, "src/index.ts"), 14 | // the proper extensions will be added 15 | fileName: "index", 16 | formats: ["cjs"], 17 | }, 18 | rollupOptions: { 19 | // make sure to externalize deps that shouldn't be bundled 20 | // into your library 21 | external: [], 22 | output: { 23 | entryFileNames: "[name].js", 24 | }, 25 | }, 26 | }, 27 | 28 | test: { 29 | globals: true, 30 | environment: "jsdom", 31 | include: ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], 32 | }, 33 | }) -------------------------------------------------------------------------------- /libs/zhi-notion-markdown/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 7 | "skipLibCheck": true, 8 | /* Bundler mode */ 9 | "moduleResolution": "Node", 10 | // "allowImportingTsExtensions": true, 11 | "allowSyntheticDefaultImports": true, 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "noEmit": true, 15 | "jsx": "preserve", 16 | /* Linting */ 17 | "strict": true, 18 | "noUnusedLocals": true, 19 | "noUnusedParameters": true, 20 | "noFallthroughCasesInSwitch": true, 21 | "types": ["node", "vite/client"] 22 | }, 23 | "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue", "custom.d.ts"], 24 | "references": [ 25 | { 26 | "path": "./tsconfig.node.json" 27 | } 28 | ], 29 | "root": "." 30 | } 31 | -------------------------------------------------------------------------------- /libs/zhi-siyuan-api/README.md: -------------------------------------------------------------------------------- 1 | # zhi-siyuan-api 2 | 3 | a siyuan-note api including both kernel api and blog adaptor 4 | 5 | ## Usage 6 | 7 | ```ts 8 | import { SiyuanConfig, SiyuanKernelApi } from "zhi-siyuan-api" 9 | 10 | // kernelApi 11 | const siyuanConfig = new SiyuanConfig("http://127.0.0.1:6806", "") 12 | const kernelApi = new SiyuanKernelApi(siyuanConfig) 13 | const result = await kernelApi.lsNotebooks() 14 | console.log("result=>", result) 15 | ``` 16 | 17 | ## Deps 18 | 19 | ``` 20 | ├── zhi-blog-api 21 | ├── zhi-common 22 | ├── zhi-lib-base 23 | ``` 24 | 25 | ## Dev 26 | 27 | ```bash 28 | pnpm dev -F zhi-siyuan-api 29 | ``` 30 | 31 | ## Build 32 | 33 | ```bash 34 | pnpm build -F zhi-siyuan-api 35 | ``` 36 | 37 | ## Test 38 | 39 | Execute the unit tests via [vitest](https://vitest.dev) 40 | 41 | ```bash 42 | pnpm test -F zhi-siyuan-api 43 | ``` 44 | 45 | ## Publish 46 | 47 | ```bash 48 | pnpm publish -F zhi-siyuan-api --tag latest 49 | ``` -------------------------------------------------------------------------------- /libs/zhi-gitlab-middleware/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 7 | "skipLibCheck": true, 8 | /* Bundler mode */ 9 | "moduleResolution": "Node", 10 | // "allowImportingTsExtensions": true, 11 | "allowSyntheticDefaultImports": true, 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "noEmit": true, 15 | "jsx": "preserve", 16 | /* Linting */ 17 | "strict": true, 18 | "noUnusedLocals": true, 19 | "noUnusedParameters": true, 20 | "noFallthroughCasesInSwitch": true, 21 | "types": ["node", "vite/client"], 22 | "outDir": "dist" 23 | }, 24 | "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"], 25 | "references": [ 26 | { 27 | "path": "./tsconfig.node.json" 28 | } 29 | ], 30 | "root": "." 31 | } 32 | -------------------------------------------------------------------------------- /libs/zhi-env/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zhi-env", 3 | "version": "1.18.6", 4 | "type": "module", 5 | "main": "./dist/index.js", 6 | "typings": "./dist/index.d.ts", 7 | "description": "a cross-platform env config lib", 8 | "repository": "terwer/zhi", 9 | "homepage": "https://github.com/terwer/zhi/tree/main/libs/zhi-env", 10 | "author": "terwer", 11 | "license": "MIT", 12 | "files": [ 13 | "dist", 14 | "README.md" 15 | ], 16 | "keywords": [ 17 | "zhi-env", 18 | "zhi", 19 | "env" 20 | ], 21 | "scripts": { 22 | "serve": "vite", 23 | "dev": "vite build --watch", 24 | "build": "vite build", 25 | "start": "vite preview", 26 | "test": "vitest --watch" 27 | }, 28 | "devDependencies": { 29 | "@terwer/eslint-config-custom": "workspace:*", 30 | "@terwer/tsconfig": "workspace:*", 31 | "@terwer/vite-config-custom": "workspace:*" 32 | }, 33 | "publishConfig": { 34 | "access": "public" 35 | } 36 | } -------------------------------------------------------------------------------- /libs/zhi-log/README.md: -------------------------------------------------------------------------------- 1 | # zhi-log 2 | 3 | a simple logger for Node and Browser 4 | 5 | ## Usage 6 | 7 | ```ts 8 | import { LogFactory } from "zhi-log" 9 | 10 | const env = new Env(import.meta.env) 11 | const logger = LogFactory.defaultLogger(env) 12 | logger.debug("debug msg") 13 | logger.info("info msg") 14 | logger.error("error msg") 15 | ``` 16 | 17 | ## Deps 18 | 19 | ``` 20 | ├── zhi-device 21 | ├── zhi-env 22 | ├── loglevel 23 | ├── callsites 24 | ├── loglevel-plugin-prefix 25 | ├── ansi-colors 26 | ├── kleur 27 | ``` 28 | 29 | ## Dev 30 | 31 | ```bash 32 | pnpm dev -F zhi-log 33 | ``` 34 | 35 | ## Build 36 | 37 | ```bash 38 | pnpm build -F zhi-log 39 | ``` 40 | 41 | ## Api 42 | 43 | ```bash 44 | pnpm doc -F zhi-log 45 | pnpm md -F zhi-log 46 | ``` 47 | 48 | ## Test 49 | 50 | Execute the unit tests via [vitest](https://vitest.dev) 51 | 52 | ```bash 53 | pnpm test -F zhi-log 54 | ``` 55 | 56 | ## Publish 57 | 58 | ``` 59 | pnpm publish -F zhi-log --tag=latest 60 | ``` -------------------------------------------------------------------------------- /libs/zhi-chatgpt/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zhi-chatgpt", 3 | "version": "0.0.3", 4 | "type": "module", 5 | "description": "chatgpt api for siyuan-note", 6 | "main": "./dist/index.js", 7 | "typings": "./dist/index.d.ts", 8 | "repository": "terwer/zhi", 9 | "homepage": "https://github.com/terwer/zhi/tree/main/libs/zhi-chatgpt", 10 | "author": "terwer", 11 | "license": "MIT", 12 | "files": [ 13 | "dist", 14 | "README.md" 15 | ], 16 | "keywords": [ 17 | "zhi", 18 | "lib" 19 | ], 20 | "scripts": { 21 | "serve": "vite", 22 | "dev": "vite build --watch", 23 | "build": "vite build", 24 | "start": "vite preview", 25 | "test": "npx vitest --watch" 26 | }, 27 | "devDependencies": { 28 | "@terwer/eslint-config-custom": "workspace:*", 29 | "@terwer/vite-config-custom": "workspace:*" 30 | }, 31 | "dependencies": { 32 | "chatgpt": "^5.2.5" 33 | }, 34 | "publishConfig": { 35 | "access": "public" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /libs/zhi-rubick-ui/src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 33 | 34 | 39 | -------------------------------------------------------------------------------- /libs/zhi-cmd/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zhi-cmd", 3 | "version": "0.8.2", 4 | "type": "module", 5 | "description": "commond utils for siyuan-note", 6 | "main": "./dist/index.cjs", 7 | "typings": "./dist/index.d.ts", 8 | "repository": "terwer/zhi", 9 | "homepage": "https://github.com/terwer/zhi/tree/main/apps/zhi-cmd", 10 | "author": "terwer", 11 | "license": "MIT", 12 | "keywords": [ 13 | "zhi", 14 | "cmd" 15 | ], 16 | "scripts": { 17 | "dev": "zhi-build --watch", 18 | "build": "zhi-build --production", 19 | "test": "vitest" 20 | }, 21 | "devDependencies": { 22 | "@terwer/esbuild-config-custom": "workspace:*", 23 | "@terwer/eslint-config-custom": "workspace:*", 24 | "@terwer/vitest-config-custom": "workspace:*", 25 | "@terwer/tsconfig": "workspace:*" 26 | }, 27 | "dependencies": { 28 | "zhi-device": "workspace:*", 29 | "zhi-lib-base": "workspace:*" 30 | }, 31 | "publishConfig": { 32 | "access": "public" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /tools/eslint-config-custom/vue/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: [ 3 | "eslint:recommended", 4 | "plugin:@typescript-eslint/recommended", 5 | "plugin:vue/vue3-recommended", 6 | "turbo", 7 | "prettier", 8 | ], 9 | 10 | // https://eslint.vuejs.org/user-guide/#how-to-use-a-custom-parser 11 | parser: "vue-eslint-parser", 12 | parserOptions: { 13 | parser: "@typescript-eslint/parser", 14 | }, 15 | 16 | plugins: ["@typescript-eslint", "vue", "prettier"], 17 | 18 | rules: { 19 | // Note: you must disable the base rule as it can report incorrect errors 20 | semi: "off", 21 | quotes: "off", 22 | "no-undef": "off", 23 | "@typescript-eslint/no-var-requires": "off", 24 | "@typescript-eslint/no-this-alias": "off", 25 | "@typescript-eslint/no-non-null-assertion": "off", 26 | "@typescript-eslint/no-unused-vars": "off", 27 | "@typescript-eslint/no-explicit-any": "off", 28 | "turbo/no-undeclared-env-vars": "off", 29 | "prettier/prettier": "error", 30 | }, 31 | } -------------------------------------------------------------------------------- /libs/zhi-chatgpt/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": [ 7 | "ES2020", 8 | "DOM", 9 | "DOM.Iterable" 10 | ], 11 | "skipLibCheck": true, 12 | /* Bundler mode */ 13 | "moduleResolution": "Node", 14 | // "allowImportingTsExtensions": true, 15 | "allowSyntheticDefaultImports": true, 16 | "resolveJsonModule": true, 17 | "isolatedModules": true, 18 | "noEmit": true, 19 | "jsx": "preserve", 20 | /* Linting */ 21 | "strict": true, 22 | "noUnusedLocals": true, 23 | "noUnusedParameters": true, 24 | "noFallthroughCasesInSwitch": true, 25 | "types": [ 26 | "node", 27 | "vite/client" 28 | ] 29 | }, 30 | "include": [ 31 | "src/**/*.ts", 32 | "src/**/*.d.ts", 33 | "src/**/*.tsx", 34 | "src/**/*.vue" 35 | ], 36 | "references": [ 37 | { 38 | "path": "./tsconfig.node.json" 39 | } 40 | ], 41 | "root": "." 42 | } 43 | -------------------------------------------------------------------------------- /libs/zhi-lib-base/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": [ 7 | "ES2020", 8 | "DOM", 9 | "DOM.Iterable" 10 | ], 11 | "skipLibCheck": true, 12 | /* Bundler mode */ 13 | "moduleResolution": "Node", 14 | // "allowImportingTsExtensions": true, 15 | "allowSyntheticDefaultImports": true, 16 | "resolveJsonModule": true, 17 | "isolatedModules": true, 18 | "noEmit": true, 19 | "jsx": "preserve", 20 | /* Linting */ 21 | "strict": true, 22 | "noUnusedLocals": true, 23 | "noUnusedParameters": true, 24 | "noFallthroughCasesInSwitch": true, 25 | "types": [ 26 | "node", 27 | "vite/client" 28 | ] 29 | }, 30 | "include": [ 31 | "src/**/*.ts", 32 | "src/**/*.d.ts", 33 | "src/**/*.tsx", 34 | "src/**/*.vue" 35 | ], 36 | "references": [ 37 | { 38 | "path": "./tsconfig.node.json" 39 | } 40 | ], 41 | "root": "." 42 | } 43 | -------------------------------------------------------------------------------- /libs/zhi-common-json-validate/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zhi-common-json-validate", 3 | "version": "0.1.0", 4 | "type": "module", 5 | "description": "utilized for the execution of json schema validation", 6 | "main": "./dist/index.cjs", 7 | "typings": "./dist/index.d.ts", 8 | "repository": "terwer/zhi", 9 | "homepage": "https://github.com/terwer/zhi/tree/main/libs/zhi-common-json-validate", 10 | "author": "terwer", 11 | "license": "MIT", 12 | "files": [ 13 | "dist", 14 | "README.md" 15 | ], 16 | "keywords": [ 17 | "zhi", 18 | "lib" 19 | ], 20 | "scripts": { 21 | "serve": "vite", 22 | "dev": "vite build --watch", 23 | "build": "vite build", 24 | "start": "vite preview", 25 | "test": "npx vitest --watch" 26 | }, 27 | "devDependencies": { 28 | "@terwer/eslint-config-custom": "workspace:*", 29 | "@terwer/vite-config-custom": "workspace:*" 30 | }, 31 | "dependencies": { 32 | "ajv": "^8.12.0" 33 | }, 34 | "publishConfig": { 35 | "access": "public" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /libs/zhi-common-markdown/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": [ 7 | "ES2020", 8 | "DOM", 9 | "DOM.Iterable" 10 | ], 11 | "skipLibCheck": true, 12 | /* Bundler mode */ 13 | "moduleResolution": "Node", 14 | // "allowImportingTsExtensions": true, 15 | "allowSyntheticDefaultImports": true, 16 | "resolveJsonModule": true, 17 | "isolatedModules": true, 18 | "noEmit": true, 19 | "jsx": "preserve", 20 | /* Linting */ 21 | "strict": true, 22 | "noUnusedLocals": true, 23 | "noUnusedParameters": true, 24 | "noFallthroughCasesInSwitch": true, 25 | "types": [ 26 | "node", 27 | "vite/client" 28 | ] 29 | }, 30 | "include": [ 31 | "src/**/*.ts", 32 | "src/**/*.d.ts", 33 | "src/**/*.tsx", 34 | "src/**/*.vue" 35 | ], 36 | "references": [ 37 | { 38 | "path": "./tsconfig.node.json" 39 | } 40 | ], 41 | "root": "." 42 | } 43 | -------------------------------------------------------------------------------- /libs/zhi-common-version/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": [ 7 | "ES2020", 8 | "DOM", 9 | "DOM.Iterable" 10 | ], 11 | "skipLibCheck": true, 12 | /* Bundler mode */ 13 | "moduleResolution": "Node", 14 | // "allowImportingTsExtensions": true, 15 | "allowSyntheticDefaultImports": true, 16 | "resolveJsonModule": true, 17 | "isolatedModules": true, 18 | "noEmit": true, 19 | "jsx": "preserve", 20 | /* Linting */ 21 | "strict": true, 22 | "noUnusedLocals": true, 23 | "noUnusedParameters": true, 24 | "noFallthroughCasesInSwitch": true, 25 | "types": [ 26 | "node", 27 | "vite/client" 28 | ] 29 | }, 30 | "include": [ 31 | "src/**/*.ts", 32 | "src/**/*.d.ts", 33 | "src/**/*.tsx", 34 | "src/**/*.vue" 35 | ], 36 | "references": [ 37 | { 38 | "path": "./tsconfig.node.json" 39 | } 40 | ], 41 | "root": "." 42 | } 43 | -------------------------------------------------------------------------------- /libs/zhi-common-json-validate/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": [ 7 | "ES2020", 8 | "DOM", 9 | "DOM.Iterable" 10 | ], 11 | "skipLibCheck": true, 12 | /* Bundler mode */ 13 | "moduleResolution": "Node", 14 | // "allowImportingTsExtensions": true, 15 | "allowSyntheticDefaultImports": true, 16 | "resolveJsonModule": true, 17 | "isolatedModules": true, 18 | "noEmit": true, 19 | "jsx": "preserve", 20 | /* Linting */ 21 | "strict": true, 22 | "noUnusedLocals": true, 23 | "noUnusedParameters": true, 24 | "noFallthroughCasesInSwitch": true, 25 | "types": [ 26 | "node", 27 | "vite/client" 28 | ] 29 | }, 30 | "include": [ 31 | "src/**/*.ts", 32 | "src/**/*.d.ts", 33 | "src/**/*.tsx", 34 | "src/**/*.vue" 35 | ], 36 | "references": [ 37 | { 38 | "path": "./tsconfig.node.json" 39 | } 40 | ], 41 | "root": "." 42 | } 43 | -------------------------------------------------------------------------------- /libs/zhi-common-version/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zhi-common-version", 3 | "version": "0.1.0", 4 | "type": "module", 5 | "description": "comparison and computation pertaining to version related aspects", 6 | "main": "./dist/index.cjs", 7 | "typings": "./dist/index.d.ts", 8 | "repository": "terwer/zhi", 9 | "homepage": "https://github.com/terwer/zhi/tree/main/libs/zhi-common-version", 10 | "author": "terwer", 11 | "license": "MIT", 12 | "files": [ 13 | "dist", 14 | "README.md" 15 | ], 16 | "keywords": [ 17 | "zhi", 18 | "lib" 19 | ], 20 | "scripts": { 21 | "serve": "vite", 22 | "dev": "vite build --watch", 23 | "build": "vite build", 24 | "start": "vite preview", 25 | "test": "npx vitest --watch" 26 | }, 27 | "devDependencies": { 28 | "@terwer/eslint-config-custom": "workspace:*", 29 | "@terwer/vite-config-custom": "workspace:*" 30 | }, 31 | "dependencies": { 32 | "compare-versions": "^6.1.0" 33 | }, 34 | "publishConfig": { 35 | "access": "public" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /libs/zhi-github-middleware/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": [ 7 | "ES2020", 8 | "DOM", 9 | "DOM.Iterable" 10 | ], 11 | "skipLibCheck": true, 12 | /* Bundler mode */ 13 | "moduleResolution": "Node", 14 | // "allowImportingTsExtensions": true, 15 | "allowSyntheticDefaultImports": true, 16 | "resolveJsonModule": true, 17 | "isolatedModules": true, 18 | "noEmit": true, 19 | "jsx": "preserve", 20 | /* Linting */ 21 | "strict": true, 22 | "noUnusedLocals": true, 23 | "noUnusedParameters": true, 24 | "noFallthroughCasesInSwitch": true, 25 | "types": [ 26 | "node", 27 | "vite/client" 28 | ] 29 | }, 30 | "include": [ 31 | "src/**/*.ts", 32 | "src/**/*.d.ts", 33 | "src/**/*.tsx", 34 | "src/**/*.vue" 35 | ], 36 | "references": [ 37 | { 38 | "path": "./tsconfig.node.json" 39 | } 40 | ], 41 | "root": "." 42 | } 43 | -------------------------------------------------------------------------------- /libs/zhi-xmlrpc-middleware/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": [ 7 | "ES2020", 8 | "DOM", 9 | "DOM.Iterable" 10 | ], 11 | "skipLibCheck": true, 12 | /* Bundler mode */ 13 | "moduleResolution": "Node", 14 | // "allowImportingTsExtensions": true, 15 | "allowSyntheticDefaultImports": true, 16 | "resolveJsonModule": true, 17 | "isolatedModules": true, 18 | "noEmit": true, 19 | "jsx": "preserve", 20 | /* Linting */ 21 | "strict": true, 22 | "noUnusedLocals": true, 23 | "noUnusedParameters": true, 24 | "noFallthroughCasesInSwitch": true, 25 | "types": [ 26 | "node", 27 | "vite/client" 28 | ] 29 | }, 30 | "include": [ 31 | "src/**/*.ts", 32 | "src/**/*.d.ts", 33 | "src/**/*.tsx", 34 | "src/**/*.vue" 35 | ], 36 | "references": [ 37 | { 38 | "path": "./tsconfig.node.json" 39 | } 40 | ], 41 | "root": "." 42 | } 43 | -------------------------------------------------------------------------------- /tools/esbuild-config-custom/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@terwer/esbuild-config-custom", 3 | "version": "2.2.0", 4 | "type": "module", 5 | "description": "universal esbuild tool for library", 6 | "bin": { 7 | "zhi-build": "./build.js" 8 | }, 9 | "keywords": [ 10 | "esbuild", 11 | "config", 12 | "build" 13 | ], 14 | "repository": "terwer/zhi", 15 | "homepage": "https://github.com/terwer/zhi/tree/main/tools/esbuild-config-custom", 16 | "author": "terwer", 17 | "license": "MIT", 18 | "peerDependencies": { 19 | "@types/minimist": "^1.2.2", 20 | "dotenv": "^16.0.3", 21 | "esbuild": "^0.19.11", 22 | "esbuild-plugin-copy": "^2.1.1", 23 | "esbuild-plugin-d.ts": "^1.1.0", 24 | "esbuild-plugin-ifdef": "^1.0.1", 25 | "esbuild-plugin-inline-image": "^0.0.9", 26 | "esbuild-plugin-vue3": "0.4.0", 27 | "esbuild-style-plugin": "^1.6.2", 28 | "minimist": "^1.2.8", 29 | "rimraf": "^5.0.5", 30 | "stylus": "^0.62.0" 31 | }, 32 | "publishConfig": { 33 | "access": "public" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /libs/zhi-notion-markdown/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zhi-notion-markdown", 3 | "version": "0.1.4", 4 | "type": "module", 5 | "description": "convert md to notion blocks and back", 6 | "main": "./dist/index.js", 7 | "typings": "./dist/index.d.ts", 8 | "repository": "terwer/zhi", 9 | "homepage": "https://github.com/terwer/zhi/tree/main/libs/zhi-notion-markdown", 10 | "author": "terwer", 11 | "license": "MIT", 12 | "files": [ 13 | "dist", 14 | "README.md" 15 | ], 16 | "keywords": [ 17 | "zhi", 18 | "lib" 19 | ], 20 | "scripts": { 21 | "serve": "vite", 22 | "dev": "vite build --watch", 23 | "build": "vite build", 24 | "start": "vite preview", 25 | "test": "npx vitest --watch" 26 | }, 27 | "devDependencies": { 28 | "@terwer/eslint-config-custom": "workspace:*", 29 | "@terwer/vite-config-custom": "workspace:*" 30 | }, 31 | "dependencies": { 32 | "@tryfabric/martian": "^1.2.4", 33 | "notion-to-md": "^3.1.1" 34 | }, 35 | "publishConfig": { 36 | "access": "public" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /tools/eslint-config-custom/README.md: -------------------------------------------------------------------------------- 1 | # eslint-config-custom 2 | 3 | custom config for eslint, support typescript, vue, astro, svelte, next etc.default is typescript 4 | 5 | ## Plugins 6 | 7 | ```bash 8 | ## eslint 9 | pnpm add -D eslint -F eslint-config-custom 10 | pnpm add -D eslint-plugin-vue -F eslint-config-custom 11 | pnpm add -D astro-eslint-parser -F eslint-config-custom 12 | pnpm add -D eslint-plugin-svelte -F eslint-config-custom 13 | 14 | ## prettier 15 | pnpm add -D prettier -F eslint-config-custom 16 | pnpm add -D eslint-plugin-svelte -F eslint-config-custom 17 | pnpm add -D prettier-plugin-svelte -F eslint-config-custom 18 | ``` 19 | 20 | ## Usage 21 | 22 | ``` 23 | ## default 24 | typescript - ts rule 25 | vue - vue rile 26 | astro - astro rule 27 | svelte - svelte rule 28 | next - next rule 29 | ``` 30 | 31 | ## Thanks 32 | 33 | - [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) 34 | - [astro-eslint-parser](https://github.com/ota-meshi/astro-eslint-parser) 35 | - [eslint-plugin-svelte](https://github.com/sveltejs/eslint-plugin-svelte) -------------------------------------------------------------------------------- /libs/zhi-fetch-middleware/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": [ 7 | "ES2020", 8 | "DOM", 9 | "DOM.Iterable" 10 | ], 11 | "skipLibCheck": true, 12 | 13 | /* Bundler mode */ 14 | "moduleResolution": "Node", 15 | // "allowImportingTsExtensions": true, 16 | "allowSyntheticDefaultImports": true, 17 | "resolveJsonModule": true, 18 | "isolatedModules": true, 19 | "noEmit": true, 20 | "jsx": "preserve", 21 | 22 | /* Linting */ 23 | "strict": false, 24 | "noUnusedLocals": false, 25 | "noUnusedParameters": false, 26 | "noFallthroughCasesInSwitch": true, 27 | "types": [ 28 | "node", 29 | "vite/client" 30 | ] 31 | }, 32 | "include": [ 33 | "src/**/*.ts", 34 | "src/**/*.d.ts", 35 | "src/**/*.tsx", 36 | "src/**/*.vue" 37 | ], 38 | "references": [ 39 | { 40 | "path": "./tsconfig.node.json" 41 | } 42 | ], 43 | "root": "." 44 | } 45 | -------------------------------------------------------------------------------- /libs/zhi-xmlrpc-middleware/README.md: -------------------------------------------------------------------------------- 1 | # zhi-xmlrpc-middleware 2 | 3 | abstract xmlrpc middle layer for all devices 4 | 5 | ## Usage 6 | 7 | ``` 8 | ## Node 9 | https://github.com/terwer/zhi/blob/dev/libs/zhi-xmlrpc-middleware/src/lib/commonXmlrpcClient.spec.ts 10 | 11 | ## Chrome Extension 12 | https://github.com/terwer/node-demos/blob/main/xmlrpc-middleware-demo/src/components/ChromeXmlrpcTest.vue 13 | 14 | ## Browser 15 | https://github.com/terwer/node-demos/blob/main/xmlrpc-middleware-demo/src/components/MiddlewareXmlrpcTest.vue 16 | ``` 17 | 18 | ## Deps 19 | 20 | ``` 21 | ## Congregations! zhi-xmlrpc-middleware need no deps, it is just pure js code 🎉 22 | ``` 23 | 24 | ## Dev 25 | 26 | ```bash 27 | pnpm dev -F zhi-xmlrpc-middleware 28 | ``` 29 | 30 | ## Build 31 | 32 | ```bash 33 | pnpm build -F zhi-xmlrpc-middleware 34 | ``` 35 | 36 | ## Test 37 | 38 | Execute the unit tests via [vitest](https://vitest.dev) 39 | 40 | ```bash 41 | pnpm test -F zhi-xmlrpc-middleware 42 | ``` 43 | 44 | ## Publish 45 | 46 | ```bash 47 | pnpm publish -F zhi-xmlrpc-middleware --tag latest 48 | ``` -------------------------------------------------------------------------------- /libs/zhi-common-markdown/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zhi-common-markdown", 3 | "version": "0.1.9", 4 | "type": "module", 5 | "description": "a universal Markdown parsing tool", 6 | "main": "./dist/index.js", 7 | "typings": "./dist/index.d.ts", 8 | "repository": "terwer/zhi", 9 | "homepage": "https://github.com/terwer/zhi/tree/main/libs/zhi-common-markdown", 10 | "author": "terwer", 11 | "license": "MIT", 12 | "files": [ 13 | "dist", 14 | "README.md" 15 | ], 16 | "keywords": [ 17 | "zhi", 18 | "lib" 19 | ], 20 | "scripts": { 21 | "serve": "vite", 22 | "dev": "vite build --watch", 23 | "build": "vite build", 24 | "start": "vite preview", 25 | "test": "npx vitest --watch" 26 | }, 27 | "devDependencies": { 28 | "@terwer/eslint-config-custom": "workspace:*", 29 | "@terwer/vite-config-custom": "workspace:*", 30 | "@types/showdown": "^2.0.1" 31 | }, 32 | "dependencies": { 33 | "showdown": "^2.1.0", 34 | "zhi-lib-base": "workspace:*" 35 | }, 36 | "publishConfig": { 37 | "access": "public" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /libs/zhi-blog-api/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zhi-blog-api", 3 | "version": "1.74.2", 4 | "type": "module", 5 | "description": "a common blog interface", 6 | "main": "./dist/index.js", 7 | "typings": "./dist/index.d.ts", 8 | "repository": "terwer/zhi", 9 | "homepage": "https://github.com/terwer/zhi/tree/main/libs/zhi-blog-api", 10 | "author": "terwer", 11 | "license": "MIT", 12 | "files": [ 13 | "dist", 14 | "README.md" 15 | ], 16 | "keywords": [ 17 | "zhi", 18 | "lib", 19 | "blog", 20 | "api" 21 | ], 22 | "scripts": { 23 | "serve": "vite", 24 | "dev": "vite build --watch", 25 | "build": "vite build", 26 | "start": "vite preview", 27 | "test": "vitest --watch" 28 | }, 29 | "devDependencies": { 30 | "@terwer/eslint-config-custom": "workspace:*", 31 | "@terwer/tsconfig": "workspace:*", 32 | "@terwer/vite-config-custom": "workspace:*" 33 | }, 34 | "dependencies": { 35 | "zhi-common": "workspace:*", 36 | "zhi-lib-base": "workspace:*" 37 | }, 38 | "publishConfig": { 39 | "access": "public" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /libs/zhi-gitlab-middleware/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zhi-gitlab-middleware", 3 | "version": "0.12.4", 4 | "type": "module", 5 | "description": "a middleware for gitlab api ", 6 | "main": "./dist/index.js", 7 | "typings": "./dist/index.d.ts", 8 | "repository": "terwer/zhi", 9 | "homepage": "https://github.com/terwer/zhi/tree/main/libs/zhi-gitlab-middleware", 10 | "author": "terwer", 11 | "license": "MIT", 12 | "files": [ 13 | "dist", 14 | "README.md" 15 | ], 16 | "keywords": [ 17 | "zhi", 18 | "lib" 19 | ], 20 | "scripts": { 21 | "serve": "vite", 22 | "dev": "vite build --watch", 23 | "build": "vite build", 24 | "start": "vite preview", 25 | "test": "npx vitest --watch" 26 | }, 27 | "devDependencies": { 28 | "@terwer/eslint-config-custom": "workspace:*", 29 | "@terwer/vite-config-custom": "workspace:*", 30 | "js-base64": "^3.7.5" 31 | }, 32 | "dependencies": { 33 | "zhi-fetch-middleware": "workspace:*", 34 | "zhi-lib-base": "workspace:*" 35 | }, 36 | "publishConfig": { 37 | "access": "public" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /libs/zhi-notion-markdown/README.md: -------------------------------------------------------------------------------- 1 | # zhi-notion-markdown 2 | 3 | convert md to notion blocks and back 4 | 5 | ## Usage 6 | 7 | ```js 8 | import { NotionMarkdownConverter } from "zhi-notion-markdown" 9 | 10 | const markdownString = await NotionMarkdownConverter.notionToMarkdown(notionBlocks) 11 | console.log("Converted markdown string:", markdownString) 12 | ``` 13 | 14 | ```js 15 | import { NotionMarkdownConverter } from "zhi-notion-markdown" 16 | 17 | const notionBlocks = NotionMarkdownConverter.markdownToNotion(markdownString) 18 | console.log("Converted notion blocks:", notionBlocks) 19 | ``` 20 | 21 | ## Deps 22 | 23 | ``` 24 | ├── @tryfabric/martian 25 | ├── notion-to-md 26 | ``` 27 | 28 | ## Dev 29 | 30 | ```bash 31 | pnpm dev -F zhi-notion-markdown 32 | ``` 33 | 34 | ## Build 35 | 36 | ```bash 37 | pnpm build -F zhi-notion-markdown 38 | ``` 39 | 40 | ## Test 41 | 42 | Execute the unit tests via [vitest](https://vitest.dev) 43 | 44 | ```bash 45 | pnpm test -F zhi-notion-markdown 46 | ``` 47 | 48 | ## Publish 49 | 50 | ```bash 51 | pnpm publish -F zhi-notion-markdown --tag latest 52 | ``` 53 | -------------------------------------------------------------------------------- /libs/zhi-fetch-middleware/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zhi-fetch-middleware", 3 | "version": "0.13.5", 4 | "type": "module", 5 | "description": "an intermediate tier prepared for fetch requests", 6 | "main": "./dist/index.js", 7 | "typings": "./dist/index.d.ts", 8 | "repository": "terwer/zhi", 9 | "homepage": "https://github.com/terwer/zhi/tree/main/libs/zhi-fetch-middleware", 10 | "author": "terwer", 11 | "license": "GPL", 12 | "files": [ 13 | "dist", 14 | "README.md" 15 | ], 16 | "keywords": [ 17 | "zhi", 18 | "lib" 19 | ], 20 | "scripts": { 21 | "serve": "vite", 22 | "dev": "vite build --watch", 23 | "build": "vite build", 24 | "start": "vite preview", 25 | "test": "npx vitest --watch" 26 | }, 27 | "devDependencies": { 28 | "@terwer/eslint-config-custom": "workspace:*", 29 | "@terwer/vite-config-custom": "workspace:*", 30 | "js-base64": "^3.7.5" 31 | }, 32 | "dependencies": { 33 | "zhi-common": "workspace:*", 34 | "zhi-device": "workspace:*", 35 | "zhi-lib-base": "workspace:*" 36 | }, 37 | "publishConfig": { 38 | "access": "public" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /tools/eslint-config-custom/astro/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: [ 3 | "eslint:recommended", 4 | "plugin:@typescript-eslint/recommended", 5 | "turbo", 6 | "prettier", 7 | ], 8 | 9 | parser: "@typescript-eslint/parser", 10 | 11 | overrides: [ 12 | { 13 | files: ["*.astro"], 14 | parser: "astro-eslint-parser", 15 | // Parse the script in `.astro` as TypeScript by adding the following configuration. 16 | parserOptions: { 17 | parser: "@typescript-eslint/parser", 18 | }, 19 | }, 20 | ], 21 | 22 | plugins: ["@typescript-eslint", "prettier"], 23 | 24 | rules: { 25 | // Note: you must disable the base rule as it can report incorrect errors 26 | semi: "off", 27 | quotes: "off", 28 | "no-undef": "off", 29 | "@typescript-eslint/no-var-requires": "off", 30 | "@typescript-eslint/no-this-alias": "off", 31 | "@typescript-eslint/no-non-null-assertion": "off", 32 | "@typescript-eslint/no-unused-vars": "off", 33 | "@typescript-eslint/no-explicit-any": "off", 34 | "turbo/no-undeclared-env-vars": "off", 35 | "prettier/prettier": "error", 36 | }, 37 | } -------------------------------------------------------------------------------- /libs/zhi-github-middleware/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zhi-github-middleware", 3 | "version": "0.5.4", 4 | "type": "module", 5 | "description": "a middleware for github api", 6 | "main": "./dist/index.js", 7 | "typings": "./dist/index.d.ts", 8 | "repository": "terwer/zhi", 9 | "homepage": "https://github.com/terwer/zhi/tree/main/libs/zhi-github-middleware", 10 | "author": "terwer", 11 | "license": "MIT", 12 | "files": [ 13 | "dist", 14 | "README.md" 15 | ], 16 | "keywords": [ 17 | "zhi", 18 | "lib", 19 | "github", 20 | "api" 21 | ], 22 | "scripts": { 23 | "serve": "vite", 24 | "dev": "vite build --watch", 25 | "build": "vite build", 26 | "start": "vite preview", 27 | "test": "npx vitest --watch" 28 | }, 29 | "devDependencies": { 30 | "@terwer/eslint-config-custom": "workspace:*", 31 | "@terwer/vite-config-custom": "workspace:*" 32 | }, 33 | "dependencies": { 34 | "@octokit/core": "^5.0.0", 35 | "js-base64": "^3.7.5", 36 | "zhi-common": "workspace:*", 37 | "zhi-lib-base": "workspace:*" 38 | }, 39 | "publishConfig": { 40 | "access": "public" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /tools/esbuild-config-custom/README.md: -------------------------------------------------------------------------------- 1 | # esbuild-config-custom 2 | 3 | universal esbuild tool for library 4 | 5 | ## Usages 6 | 7 | 1 install dependency 8 | 9 | ```bash 10 | pnpm add @terwer/esbuild-config-custom@latest -D 11 | ``` 12 | 13 | 2 add `esbuild.config.js` to project root 14 | 15 | for lib 16 | 17 | ```js 18 | import { dtsPlugin } from "esbuild-plugin-d.ts" 19 | 20 | export default { 21 | esbuildConfig: { 22 | entryPoints: ["src/index.ts"], 23 | outfile: "dist/index.cjs", 24 | bundle: true, 25 | format: "cjs", 26 | plugins: [dtsPlugin()], 27 | } 28 | } 29 | ``` 30 | 31 | for node 32 | 33 | ```js 34 | import { dtsPlugin } from "esbuild-plugin-d.ts" 35 | 36 | export default { 37 | esbuildConfig: { 38 | entryPoints: ["src/index.ts"], 39 | outfile: "dist/index.cjs", 40 | bundle: true, 41 | format: "cjs", 42 | platform: "node", 43 | banner: { 44 | js: "#!/usr/bin/env node", 45 | }, 46 | plugins: [dtsPlugin()], 47 | } 48 | } 49 | ``` 50 | 51 | 3 add build script 52 | 53 | ```bash 54 | "scripts": { 55 | "dev": "zhi-build --watch", 56 | "build": "zhi-build --production" 57 | } 58 | ``` -------------------------------------------------------------------------------- /libs/zhi-common/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zhi-common", 3 | "version": "1.35.0", 4 | "type": "module", 5 | "description": "a collection of util tools", 6 | "main": "./dist/index.js", 7 | "typings": "./dist/index.d.ts", 8 | "repository": "terwer/zhi", 9 | "homepage": "https://github.com/terwer/zhi/tree/main/libs/zhi-common", 10 | "author": "terwer", 11 | "license": "MIT", 12 | "files": [ 13 | "dist", 14 | "README.md" 15 | ], 16 | "keywords": [ 17 | "zhi", 18 | "lib" 19 | ], 20 | "scripts": { 21 | "serve": "vite", 22 | "dev": "vite build --watch", 23 | "build": "vite build", 24 | "start": "vite preview", 25 | "test": "vitest --watch" 26 | }, 27 | "devDependencies": { 28 | "@terwer/eslint-config-custom": "workspace:*", 29 | "@terwer/tsconfig": "workspace:*", 30 | "@terwer/vite-config-custom": "workspace:*", 31 | "@types/js-yaml": "^4.0.5" 32 | }, 33 | "dependencies": { 34 | "js-yaml": "^4.1.0", 35 | "shorthash2": "^1.0.3", 36 | "transliteration": "^2.3.5", 37 | "vue": "^3.3.4", 38 | "zhi-lib-base": "workspace:*" 39 | }, 40 | "publishConfig": { 41 | "access": "public" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /libs/zhi-device/README.md: -------------------------------------------------------------------------------- 1 | # zhi-device 2 | 3 | auto check environment whether in browser, browser extension, electron, node and more 4 | 5 | ## Usage 6 | 7 | ```ts 8 | import { DeviceDetection, BrowserUtil, DeviceTypeEnum } from "zhi-device" 9 | 10 | console.log("isInBrowser=>", BrowserUtil.isInBrowser) 11 | 12 | const deviceType: DeviceTypeEnum = DeviceDetection.getDevice() 13 | console.log("deviceType=>", deviceType) 14 | 15 | // supported platforms 16 | // Mobile 17 | // Siyuan_Widget 18 | // Siyuan_NewWindow 19 | // Siyuan_MainWindow 20 | // Chrome_Extension 21 | // Chrome_Browser 22 | // Node 23 | ``` 24 | 25 | ## Deps 26 | 27 | ``` 28 | ## Congregations! zhi-device need no deps, it is just pure js code 🎉 29 | ``` 30 | 31 | ## Dev 32 | 33 | ```bash 34 | pnpm dev -F zhi-device 35 | ``` 36 | 37 | ## Build 38 | 39 | ```bash 40 | pnpm build -F zhi-device 41 | ``` 42 | 43 | ## Api 44 | 45 | ```bash 46 | pnpm doc -F zhi-device 47 | pnpm md -F zhi-device 48 | ``` 49 | 50 | ## Test 51 | 52 | Execute the unit tests via [vitest](https://vitest.dev) 53 | 54 | ```bash 55 | pnpm test -F zhi-device 56 | ``` 57 | 58 | ## Publish 59 | 60 | ```bash 61 | pnpm publish -F zhi-device --tag=latest 62 | ``` -------------------------------------------------------------------------------- /libs/zhi-xmlrpc-middleware/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zhi-xmlrpc-middleware", 3 | "version": "0.6.26", 4 | "type": "module", 5 | "description": "abstract xmlrpc middle layer", 6 | "main": "./dist/index.js", 7 | "typings": "./dist/index.d.ts", 8 | "repository": "terwer/zhi", 9 | "homepage": "https://github.com/terwer/zhi/tree/main/libs/zhi-xmlrpc-middleware", 10 | "author": "terwer", 11 | "license": "GPL", 12 | "files": [ 13 | "dist", 14 | "README.md" 15 | ], 16 | "keywords": [ 17 | "zhi", 18 | "lib" 19 | ], 20 | "scripts": { 21 | "serve": "vite", 22 | "dev": "vite build --watch", 23 | "build": "vite build", 24 | "start": "vite preview", 25 | "test": "npx vitest --watch" 26 | }, 27 | "devDependencies": { 28 | "@terwer/eslint-config-custom": "workspace:*", 29 | "@terwer/vite-config-custom": "workspace:*", 30 | "cross-fetch": "^3.1.6", 31 | "simple-xmlrpc": "^1.2.2", 32 | "xmlbuilder2": "^3.1.1" 33 | }, 34 | "dependencies": { 35 | "zhi-common": "workspace:*", 36 | "zhi-device": "workspace:*", 37 | "zhi-lib-base": "workspace:*" 38 | }, 39 | "publishConfig": { 40 | "access": "public" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /libs/zhi-common-markdown/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # zhi-common-markdown 2 | 3 | ## 0.1.9 4 | 5 | ### Patch Changes 6 | 7 | - Updated dependencies 8 | - zhi-lib-base@0.8.0 9 | 10 | ## 0.1.8 11 | 12 | ### Patch Changes 13 | 14 | - Updated dependencies 15 | - zhi-lib-base@0.7.0 16 | 17 | ## 0.1.7 18 | 19 | ### Patch Changes 20 | 21 | - Updated dependencies 22 | - Updated dependencies 23 | - zhi-lib-base@0.6.0 24 | 25 | ## 0.1.6 26 | 27 | ### Patch Changes 28 | 29 | - Updated dependencies 30 | - zhi-lib-base@0.5.0 31 | 32 | ## 0.1.5 33 | 34 | ### Patch Changes 35 | 36 | - Updated dependencies 37 | - zhi-lib-base@0.4.4 38 | 39 | ## 0.1.4 40 | 41 | ### Patch Changes 42 | 43 | - Updated dependencies 44 | - zhi-lib-base@0.4.3 45 | 46 | ## 0.1.3 47 | 48 | ### Patch Changes 49 | 50 | - Updated dependencies 51 | - zhi-lib-base@0.4.2 52 | 53 | ## 0.1.2 54 | 55 | ### Patch Changes 56 | 57 | - fix markdown lib type to es 58 | 59 | ## 0.1.1 60 | 61 | ### Patch Changes 62 | 63 | - fix deps 64 | - Updated dependencies 65 | - zhi-lib-base@0.4.1 66 | 67 | ## 0.1.0 68 | 69 | ### Minor Changes 70 | 71 | - fix log msg 72 | 73 | ### Patch Changes 74 | 75 | - Updated dependencies 76 | - zhi-lib-base@0.4.0 77 | -------------------------------------------------------------------------------- /libs/zhi-device/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zhi-device", 3 | "version": "2.12.0", 4 | "type": "module", 5 | "main": "./dist/index.cjs", 6 | "module": "./dist/index.js", 7 | "exports": { 8 | ".": { 9 | "import": "./dist/index.js", 10 | "require": "./dist/index.cjs" 11 | } 12 | }, 13 | "typings": "./dist/index.d.ts", 14 | "description": "auto check environment whether in browser, browser extension, electron, node and more", 15 | "repository": "terwer/zhi", 16 | "homepage": "https://github.com/terwer/zhi/tree/main/libs/zhi-device", 17 | "author": "terwer", 18 | "license": "MIT", 19 | "files": [ 20 | "dist", 21 | "README.md" 22 | ], 23 | "keywords": [ 24 | "zhi", 25 | "device", 26 | "browser", 27 | "node", 28 | "electron" 29 | ], 30 | "scripts": { 31 | "serve": "vite", 32 | "dev": "vite build --watch", 33 | "build": "vite build", 34 | "start": "vite preview", 35 | "test": "vitest --watch" 36 | }, 37 | "devDependencies": { 38 | "@terwer/eslint-config-custom": "workspace:*", 39 | "@terwer/tsconfig": "workspace:*", 40 | "@terwer/vite-config-custom": "workspace:*" 41 | }, 42 | "publishConfig": { 43 | "access": "public" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /libs/zhi-log/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zhi-log", 3 | "version": "1.14.22", 4 | "type": "module", 5 | "main": "./dist/index.js", 6 | "typings": "./dist/index.d.ts", 7 | "description": "a simple logger for Node and Browser", 8 | "repository": "terwer/zhi", 9 | "homepage": "https://github.com/terwer/zhi/tree/main/libs/zhi-log", 10 | "author": "terwer", 11 | "license": "MIT", 12 | "files": [ 13 | "dist", 14 | "README.md" 15 | ], 16 | "keywords": [ 17 | "zhi-log", 18 | "zhi", 19 | "log" 20 | ], 21 | "scripts": { 22 | "serve": "vite", 23 | "dev": "vite build --watch", 24 | "build": "vite build", 25 | "start": "vite preview", 26 | "test": "vitest --watch" 27 | }, 28 | "devDependencies": { 29 | "@terwer/eslint-config-custom": "workspace:*", 30 | "@terwer/tsconfig": "workspace:*", 31 | "@terwer/vite-config-custom": "workspace:*" 32 | }, 33 | "dependencies": { 34 | "ansi-colors": "^4.1.3", 35 | "callsites": "^4.0.0", 36 | "kleur": "^4.1.5", 37 | "loglevel": "^1.8.1", 38 | "loglevel-plugin-prefix": "^0.8.4", 39 | "zhi-device": "workspace:*", 40 | "zhi-env": "workspace:*" 41 | }, 42 | "publishConfig": { 43 | "access": "public" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /libs/zhi-siyuan-api/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zhi-siyuan-api", 3 | "version": "2.30.0", 4 | "type": "module", 5 | "description": "a siyuan-note api including both kernel and client", 6 | "main": "./dist/index.js", 7 | "typings": "./dist/index.d.ts", 8 | "repository": "terwer/zhi", 9 | "homepage": "https://github.com/terwer/zhi/tree/main/libs/zhi-siyuan-api", 10 | "author": "terwer", 11 | "license": "MIT", 12 | "files": [ 13 | "dist", 14 | "README.md" 15 | ], 16 | "keywords": [ 17 | "zhi", 18 | "lib", 19 | "siyuan", 20 | "note", 21 | "api" 22 | ], 23 | "scripts": { 24 | "serve": "vite", 25 | "dev": "vite build --watch", 26 | "build": "vite build", 27 | "start": "vite preview", 28 | "test": "vitest --watch" 29 | }, 30 | "runAs": [ 31 | "node", 32 | "browser" 33 | ], 34 | "devDependencies": { 35 | "@terwer/eslint-config-custom": "workspace:*", 36 | "@terwer/tsconfig": "workspace:*", 37 | "@terwer/vite-config-custom": "workspace:*", 38 | "form-data": "^4.0.0" 39 | }, 40 | "dependencies": { 41 | "zhi-blog-api": "workspace:*", 42 | "zhi-common": "workspace:*", 43 | "zhi-lib-base": "workspace:*" 44 | }, 45 | "publishConfig": { 46 | "access": "public" 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /libs/zhi-common/custom.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | declare module "js-yaml" 27 | -------------------------------------------------------------------------------- /tools/eslint-config-custom/svelte/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: [ 3 | "eslint:recommended", 4 | "plugin:@typescript-eslint/recommended", 5 | "plugin:svelte/recommended", 6 | "turbo", 7 | "prettier", 8 | ], 9 | 10 | parser: "@typescript-eslint/parser", 11 | 12 | overrides: [ 13 | { 14 | files: ["*.svelte"], 15 | parser: "svelte-eslint-parser", 16 | // Parse the script in `.svelte` as TypeScript by adding the following configuration. 17 | parserOptions: { 18 | parser: "@typescript-eslint/parser", 19 | }, 20 | }, 21 | ], 22 | 23 | plugins: ["@typescript-eslint", "prettier"], 24 | 25 | rules: { 26 | // Note: you must disable the base rule as it can report incorrect errors 27 | semi: "off", 28 | quotes: "off", 29 | "no-undef": "off", 30 | "@typescript-eslint/no-var-requires": "off", 31 | "@typescript-eslint/no-this-alias": "off", 32 | "@typescript-eslint/no-non-null-assertion": "off", 33 | "@typescript-eslint/no-unused-vars": "off", 34 | "@typescript-eslint/no-explicit-any": "off", 35 | "turbo/no-undeclared-env-vars": "off", 36 | "prettier/prettier": "error", 37 | "svelte/valid-compile": ["error", { ignoreWarnings: true }], 38 | "@typescript-eslint/no-empty-function": "off", 39 | }, 40 | } 41 | -------------------------------------------------------------------------------- /apps/zhi-cli/README.md: -------------------------------------------------------------------------------- 1 | # zhi-cli 2 | a tool for generating zhi framework related projects 3 | 4 | [Read more about node with cli](https://www.terwer.space/post/use-typescript-to-develop-a-custom-nodejs-frontend-development-scaffold-1i5fne.html) 5 | 6 | [Read more about nx vite with cli](https://www.terwer.space/post/use-nrwlnxworkspace-to-create-a-nodejscommand-line-library-1urtj8.html) 7 | 8 | [Read more about turbo esbuild with cli](https://www.terwer.space/implement-a-general-environment-variable-settings-tool-2bxmkh.html) 9 | 10 | ## Usage 11 | 12 | ```bash 13 | brew install n 14 | n 16 15 | npm i -g zhi-cli 16 | ``` 17 | 18 | Creating project use the following commands 19 | 20 | ```bash 21 | ## turbo-workspace 22 | zhi-cli init my-turbo-workspace turbo-workspace-simple 23 | 24 | ## ts-vite-lib 25 | zhi-cli init my-project ts-esbuild-lib 26 | 27 | ## ts-vite-lib 28 | zhi-cli init my-project ts-vite-lib 29 | 30 | ## ts-vite-siyuan-plugin 31 | zhi-cli init my-siyuan-plugin ts-vite-siyuan-plugin 32 | ``` 33 | 34 | ## Dev 35 | 36 | ```bash 37 | pnpm dev -F zhi-cli 38 | ``` 39 | 40 | ## Build 41 | 42 | ```bash 43 | pnpm build -F zhi-cli 44 | ``` 45 | 46 | ## Test 47 | 48 | ``` 49 | chmod u+x apps/zhi-cli/dist/index.cjs 50 | zhi-cli -h 51 | ``` 52 | 53 | ## Publish 54 | 55 | ``` 56 | pnpm publish -F zhi-cli --tag=latest 57 | ``` -------------------------------------------------------------------------------- /apps/zhi-cli/env.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | declare module "enquirer/lib/prompts/select" 27 | -------------------------------------------------------------------------------- /apps/zhi-cli/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zhi-cli", 3 | "version": "1.8.2", 4 | "description": "a tool for generating zhi framework related projects", 5 | "type": "module", 6 | "bin": { 7 | "zhi-cli": "dist/index.cjs" 8 | }, 9 | "files": [ 10 | "dist", 11 | "README.md" 12 | ], 13 | "main": "./dist/index.cjs", 14 | "typings": "./dist/index.d.ts", 15 | "repository": "terwer/zhi", 16 | "homepage": "https://github.com/terwer/zhi/tree/main/apps/zhi-cli", 17 | "author": "terwer", 18 | "license": "MIT", 19 | "keywords": [ 20 | "zhi", 21 | "cli" 22 | ], 23 | "scripts": { 24 | "dev": "zhi-build --watch", 25 | "build": "zhi-build --production", 26 | "test": "npm link && zhi-cli -h" 27 | }, 28 | "devDependencies": { 29 | "@terwer/esbuild-config-custom": "workspace:*", 30 | "@terwer/eslint-config-custom": "workspace:*", 31 | "@terwer/vitest-config-custom": "workspace:*", 32 | "@terwer/tsconfig": "workspace:*", 33 | "@types/fs-extra": "^11.0.1", 34 | "@types/git-clone": "^0.2.0" 35 | }, 36 | "dependencies": { 37 | "commander": "^10.0.0", 38 | "enquirer": "^2.3.6", 39 | "fs-extra": "^11.1.1", 40 | "git-clone": "^0.2.0", 41 | "handlebars": "^4.7.7", 42 | "zhi-log": "workspace:*" 43 | }, 44 | "publishConfig": { 45 | "access": "public" 46 | } 47 | } -------------------------------------------------------------------------------- /libs/zhi-notion-markdown/custom.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | declare module "markdown-to-notion" 27 | 28 | -------------------------------------------------------------------------------- /libs/zhi-cmd/env.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | interface ImportMeta { 27 | readonly env: ImportMetaEnv 28 | } 29 | -------------------------------------------------------------------------------- /apps/zhi-infra/env.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | interface ImportMeta { 27 | readonly env: ImportMetaEnv 28 | } 29 | -------------------------------------------------------------------------------- /apps/zhi-infra/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zhi-infra", 3 | "version": "0.21.11", 4 | "type": "module", 5 | "description": "basic issues for zhi", 6 | "main": "./dist/index.cjs", 7 | "typings": "./dist/index.d.ts", 8 | "repository": "terwer/zhi", 9 | "homepage": "https://github.com/terwer/zhi/tree/main/apps/zhi-server-infra", 10 | "author": "terwer", 11 | "license": "GPL", 12 | "keywords": [ 13 | "zhi", 14 | "server", 15 | "infra" 16 | ], 17 | "scripts": { 18 | "dev": "zhi-build --watch --outDir=/Users/terwer/Documents/mydocs/SiYuanWorkspace/test/data/plugins/siyuan-plugin-local-service/libs/zhi-infra", 19 | "build": "zhi-build --production", 20 | "localBuild": "zhi-build --production --outDir=/Users/terwer/Documents/mydocs/siyuan-plugins/siyuan-plugin-local-service/public/libs/zhi-infra" 21 | }, 22 | "devDependencies": { 23 | "@terwer/esbuild-config-custom": "workspace:*", 24 | "@terwer/eslint-config-custom": "workspace:*", 25 | "@terwer/tsconfig": "workspace:*", 26 | "@terwer/vitest-config-custom": "workspace:*" 27 | }, 28 | "dependencies": { 29 | "fix-path": "^4.0.0", 30 | "zhi-cmd": "workspace:*", 31 | "zhi-common": "workspace:*", 32 | "zhi-device": "workspace:*", 33 | "zhi-lib-base": "workspace:*" 34 | }, 35 | "publishConfig": { 36 | "access": "public" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /libs/zhi-rubick-core/env.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | interface ImportMeta { 27 | readonly env: ImportMetaEnv 28 | } -------------------------------------------------------------------------------- /libs/zhi-rubick-core/src/browsers/runner.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | export default () => { 27 | let view 28 | } 29 | -------------------------------------------------------------------------------- /libs/zhi-rubick-core/src/browsers/detach.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | export default () => { 27 | let win: any 28 | } 29 | -------------------------------------------------------------------------------- /.prettierrc.cjs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | module.exports = { 27 | semi: false, 28 | singleQuote: false, 29 | printWidth: 120 30 | } 31 | -------------------------------------------------------------------------------- /libs/zhi-common-markdown/src/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | import MarkdownUtil from "./lib/markdownUtil" 27 | export { MarkdownUtil } 28 | -------------------------------------------------------------------------------- /libs/zhi-siyuan-api/src/lib/zhi-siyuan-api.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | import SiyuanApi from "./siyuanApi" 27 | export default SiyuanApi 28 | -------------------------------------------------------------------------------- /libs/zhi-blog-api/src/lib/zhi-blog-api.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | import BlogAdaptor from "./blogAdaptor" 27 | export default BlogAdaptor 28 | -------------------------------------------------------------------------------- /libs/zhi-rubick-core/src/browsers/guide.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | let win: any 27 | 28 | export default () => { 29 | console.log("guide") 30 | } 31 | -------------------------------------------------------------------------------- /libs/zhi-chatgpt/.prettierrc.cjs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | module.exports = { 27 | semi: false, 28 | singleQuote: false, 29 | printWidth: 120 30 | } 31 | -------------------------------------------------------------------------------- /libs/zhi-lib-base/.prettierrc.cjs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | module.exports = { 27 | semi: false, 28 | singleQuote: false, 29 | printWidth: 120 30 | } 31 | -------------------------------------------------------------------------------- /libs/zhi-rubick-core/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zhi-rubick-core", 3 | "version": "0.3.2", 4 | "type": "module", 5 | "description": "plugin container core", 6 | "main": "./dist/index.cjs", 7 | "typings": "./dist/index.d.ts", 8 | "repository": "terwer/zhi", 9 | "homepage": "https://github.com/terwer/zhi/tree/main/apps/zhi-rubick-core", 10 | "author": "terwer", 11 | "license": "MIT", 12 | "keywords": [ 13 | "zhi", 14 | "rubick", 15 | "plugin" 16 | ], 17 | "scripts": { 18 | "dev": "zhi-build --watch --outDir=/Users/terwer/Documents/mydocs/SiYuanWorkspace/test/data/plugins/siyuan-plugin-local-service/libs/zhi-rubick-ui", 19 | "build": "zhi-build --production", 20 | "localBuild": "zhi-build --production --outDir=/Users/terwer/Documents/mydocs/zhi-framework/zhi/libs/zhi-rubick-ui/public", 21 | "test": "vitest", 22 | "lint": "eslint 'src/**/*.{ts,js}' --fix" 23 | }, 24 | "devDependencies": { 25 | "@terwer/esbuild-config-custom": "workspace:*", 26 | "@terwer/eslint-config-custom": "workspace:*", 27 | "@terwer/vitest-config-custom": "workspace:*", 28 | "@terwer/tsconfig": "workspace:*", 29 | "electron": "26.0.0", 30 | "@electron/remote": "2.0.12" 31 | }, 32 | "dependencies": { 33 | "zhi-device": "workspace:*", 34 | "zhi-lib-base": "workspace:*" 35 | }, 36 | "publishConfig": { 37 | "access": "public" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /libs/zhi-common-markdown/.prettierrc.cjs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | module.exports = { 27 | semi: false, 28 | singleQuote: false, 29 | printWidth: 120 30 | } 31 | -------------------------------------------------------------------------------- /libs/zhi-common-version/.prettierrc.cjs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | module.exports = { 27 | semi: false, 28 | singleQuote: false, 29 | printWidth: 120 30 | } 31 | -------------------------------------------------------------------------------- /libs/zhi-fetch-middleware/.prettierrc.cjs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | module.exports = { 27 | semi: false, 28 | singleQuote: false, 29 | printWidth: 120 30 | } 31 | -------------------------------------------------------------------------------- /libs/zhi-notion-markdown/.prettierrc.cjs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | module.exports = { 27 | semi: false, 28 | singleQuote: false, 29 | printWidth: 120 30 | } 31 | -------------------------------------------------------------------------------- /libs/zhi-common-json-validate/.prettierrc.cjs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | module.exports = { 27 | semi: false, 28 | singleQuote: false, 29 | printWidth: 120 30 | } 31 | -------------------------------------------------------------------------------- /libs/zhi-github-middleware/.prettierrc.cjs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | module.exports = { 27 | semi: false, 28 | singleQuote: false, 29 | printWidth: 120 30 | } 31 | -------------------------------------------------------------------------------- /libs/zhi-gitlab-middleware/.prettierrc.cjs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | module.exports = { 27 | semi: false, 28 | singleQuote: false, 29 | printWidth: 120 30 | } 31 | -------------------------------------------------------------------------------- /libs/zhi-xmlrpc-middleware/.prettierrc.cjs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | module.exports = { 27 | semi: false, 28 | singleQuote: false, 29 | printWidth: 120 30 | } 31 | -------------------------------------------------------------------------------- /libs/zhi-xmlrpc-middleware/src/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | import CommonXmlrpcClient from "./lib/commonXmlrpcClient" 27 | 28 | export { CommonXmlrpcClient } 29 | -------------------------------------------------------------------------------- /tools/eslint-config-custom/typescript/.prettierrc.cjs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | module.exports = { 27 | semi: false, 28 | singleQuote: false, 29 | printWidth: 120 30 | } 31 | -------------------------------------------------------------------------------- /tools/eslint-config-custom/vue/.prettierrc.cjs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | module.exports = { 27 | semi: false, 28 | singleQuote: false, 29 | printWidth: 120, 30 | } 31 | -------------------------------------------------------------------------------- /libs/zhi-xmlrpc-middleware/src/lib/impl/chromeXmlrpc.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | // see 27 | // https://github.com/terwer/node-demos/blob/main/xmlrpc-middleware-demo/src/components/ChromeXmlrpcTest.vue 28 | -------------------------------------------------------------------------------- /tools/vitest-config-custom/vitest.config.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | import { defineConfig } from "vitest/config" 27 | 28 | export default defineConfig({ 29 | test: { 30 | // ... 31 | }, 32 | }) 33 | -------------------------------------------------------------------------------- /libs/zhi-blog-api/src/lib/PostUtil.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | import { describe, it } from "vitest" 27 | 28 | describe("test PostUtil", () => { 29 | it("test fromYaml", () => { 30 | 31 | }) 32 | }) 33 | -------------------------------------------------------------------------------- /libs/zhi-common-markdown/src/index.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | import { describe, it } from "vitest" 27 | 28 | describe("index", () => { 29 | it("test index", () => { 30 | console.log("hello") 31 | }) 32 | }) -------------------------------------------------------------------------------- /libs/zhi-common/src/index.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | import { describe, it } from "vitest" 27 | 28 | describe("zhi-common", () => { 29 | it("index", () => { 30 | console.log("hello") 31 | }) 32 | }) 33 | -------------------------------------------------------------------------------- /libs/zhi-xmlrpc-middleware/src/lib/impl/middlewareXmlrpc.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | // see 27 | // https://github.com/terwer/node-demos/blob/main/xmlrpc-middleware-demo/src/components/MiddlewareXmlrpcTest.vue 28 | -------------------------------------------------------------------------------- /tools/eslint-config-custom/astro/.prettierrc.cjs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | module.exports = { 27 | semi: false, 28 | singleQuote: false, 29 | printWidth: 120, 30 | plugins: ["prettier-plugin-svelte"] 31 | } 32 | -------------------------------------------------------------------------------- /tools/eslint-config-custom/next/.prettierrc.cjs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | module.exports = { 27 | semi: false, 28 | singleQuote: false, 29 | printWidth: 120, 30 | plugins: ["prettier-plugin-svelte"] 31 | } 32 | -------------------------------------------------------------------------------- /tools/eslint-config-custom/svelte/.prettierrc.cjs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | module.exports = { 27 | semi: false, 28 | singleQuote: false, 29 | printWidth: 120, 30 | plugins: ["prettier-plugin-svelte"] 31 | } 32 | -------------------------------------------------------------------------------- /libs/zhi-blog-api/src/index.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | import { describe, it } from "vitest" 27 | 28 | describe("zhi-blog-api", () => { 29 | it("index", () => { 30 | console.log("hello world") 31 | }) 32 | }) 33 | -------------------------------------------------------------------------------- /libs/zhi-siyuan-api/src/index.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | import { describe, it } from "vitest" 27 | 28 | describe("zhi-siyuan-api", () => { 29 | it("index", () => { 30 | console.log("hello world") 31 | }) 32 | }) 33 | -------------------------------------------------------------------------------- /libs/zhi-xmlrpc-middleware/src/index.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | import { describe, it } from "vitest" 27 | 28 | describe("index", () => { 29 | it("test index", () => { 30 | console.log("hello") 31 | }) 32 | }) 33 | -------------------------------------------------------------------------------- /libs/zhi-xmlrpc-middleware/src/lib/impl/chromeMiddlewareXmlrpc.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | // see 27 | // https://github.com/terwer/node-demos/blob/main/xmlrpc-middleware-demo/src/components/ChromeMiddlewareXmlrpcTest.vue 28 | -------------------------------------------------------------------------------- /libs/zhi-rubick-core/src/browsers/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | import main from "./main" 26 | import runner from "./runner" 27 | import detach from "./detach" 28 | import guide from "./guide" 29 | export { main, runner, detach, guide } 30 | -------------------------------------------------------------------------------- /libs/zhi-rubick-ui/public/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /libs/zhi-blog-api/src/lib/WebPlaceholder.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | import BlogPlaceholder from "./blogPlaceholder"; 26 | 27 | /** 28 | * 网页授权操作提示 29 | */ 30 | class WebPlaceholder extends BlogPlaceholder {} 31 | 32 | export default WebPlaceholder 33 | -------------------------------------------------------------------------------- /libs/zhi-env/src/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | /** 27 | * @packageDocumentation 28 | * zhi-env 通用环境变量模块 29 | */ 30 | 31 | import EnvConstants from "./lib/EnvConstants" 32 | import Env from "./lib/zhi-env" 33 | 34 | export { Env } 35 | export { EnvConstants } 36 | -------------------------------------------------------------------------------- /libs/zhi-lib-base/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # zhi-lib-base 2 | 3 | ## 0.8.0 4 | 5 | ### Minor Changes 6 | 7 | - feat: fix arg parse 8 | 9 | ## 0.7.0 10 | 11 | ### Minor Changes 12 | 13 | - feat: add logger define 14 | 15 | ## 0.6.0 16 | 17 | ### Minor Changes 18 | 19 | - feat: add MainFunction 20 | - feat: add MainFunction 21 | 22 | ## 0.5.0 23 | 24 | ### Minor Changes 25 | 26 | - fix: set shamefully-hoist to true to avoid build error 27 | 28 | ## 0.4.4 29 | 30 | ### Patch Changes 31 | 32 | - fix parameter 33 | 34 | ## 0.4.3 35 | 36 | ### Patch Changes 37 | 38 | - change error log type 39 | 40 | ## 0.4.2 41 | 42 | ### Patch Changes 43 | 44 | - fix debug log 45 | 46 | ## 0.4.1 47 | 48 | ### Patch Changes 49 | 50 | - fix deps 51 | 52 | ## 0.4.0 53 | 54 | ### Minor Changes 55 | 56 | - fix log msg 57 | 58 | ## 0.3.1 59 | 60 | ### Patch Changes 61 | 62 | - fix boolean msg 63 | 64 | ## 0.3.0 65 | 66 | ### Minor Changes 67 | 68 | - deal with boolean in log 69 | 70 | ## 0.2.6 71 | 72 | ### Patch Changes 73 | 74 | - add hash query string 75 | 76 | ## 0.2.5 77 | 78 | ### Patch Changes 79 | 80 | - fix esbuild deps 81 | 82 | ## 0.2.4 83 | 84 | ### Patch Changes 85 | 86 | - update deps 87 | 88 | ## 0.2.3 89 | 90 | ### Patch Changes 91 | 92 | - update deps 93 | 94 | ## 0.2.2 95 | 96 | ### Patch Changes 97 | 98 | - update deps 99 | 100 | ## 0.2.1 101 | 102 | ### Patch Changes 103 | 104 | - update deps 105 | -------------------------------------------------------------------------------- /libs/zhi-siyuan-api/src/lib/config/siyuanPlaceholder.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | import { BlogPlaceholder } from "zhi-blog-api" 27 | 28 | /** 29 | * 思源笔记操作提示 30 | */ 31 | class SiyuanPlaceholder extends BlogPlaceholder {} 32 | 33 | export default SiyuanPlaceholder 34 | -------------------------------------------------------------------------------- /libs/zhi-fetch-middleware/src/lib/types/index.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | /** 27 | * 通用的 Fetch 接口 28 | */ 29 | interface ICommonFetchClient { 30 | fetchCall(endpointUrl: string, fetchOptions: RequestInit, forceProxy?: boolean): Promise 31 | } 32 | 33 | export {ICommonFetchClient} -------------------------------------------------------------------------------- /libs/zhi-blog-api/src/lib/zhi-blog-api.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | import { describe, it } from "vitest" 27 | 28 | describe("zhiBlogApi", () => { 29 | it("blogApi", () => { 30 | console.log("blogApi should be implemented as a specific BlogApi, it cannot be used directly") 31 | }) 32 | }) 33 | -------------------------------------------------------------------------------- /libs/zhi-blog-api/src/lib/enums/pageTypeEnum.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | /** 27 | * 页面类型 28 | * 29 | * @author terwer 30 | * @version 0.9.0 31 | * @since 0.0.1 32 | */ 33 | enum PageTypeEnum { 34 | Kramdown = "kramdown", 35 | Markdown = "markdown", 36 | Html = "html", 37 | } 38 | 39 | export default PageTypeEnum 40 | -------------------------------------------------------------------------------- /libs/zhi-lib-base/src/interfaces/mainFunction.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | /** 27 | * 入口函数 28 | * 29 | * @param args 参数数组 30 | * @returns 返回一个 Promise 包含任何类型的结果 31 | * @author terwer 32 | * @since 1.0.0 33 | */ 34 | interface MainFunction { 35 | (args: any[]): Promise 36 | } 37 | 38 | export default MainFunction 39 | -------------------------------------------------------------------------------- /libs/zhi-blog-api/src/lib/blogConstants.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Terwer . All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Terwer designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Terwer in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com 22 | * or visit www.terwer.space if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | /** 27 | * 博客通用常量定义 28 | * 29 | * @author terwer 30 | * @version 1.0.0 31 | * @since 1.0.0 32 | */ 33 | class BlogConstants { 34 | /** 35 | * 博客类型 36 | */ 37 | public static DEFAULT_BLOG_TYPE_KEY = "VITE_DEFAULT_TYPE" 38 | } 39 | 40 | export default BlogConstants 41 | --------------------------------------------------------------------------------