├── 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 | ///
15 | Edit
16 | components/HelloWorld.vue to test HMR
17 |
21 | Check out 22 | create-vue, the official Vue + Vite starter 25 |
26 |27 | Install 28 | Volar 29 | in your IDE for a better DX 30 |
31 |Click on the Vite and Vue logos to learn more
32 | 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