-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #386 from terwer/dev
docs: update deps
- Loading branch information
Showing
39 changed files
with
1,938 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
# zhi-cli | ||
|
||
## 1.5.8 | ||
|
||
### Patch Changes | ||
|
||
- zhi-log@1.14.8 | ||
|
||
## 1.5.7 | ||
|
||
### Patch Changes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
# zhi-device | ||
|
||
## 2.1.0 | ||
|
||
### Minor Changes | ||
|
||
- fix hashcquery | ||
|
||
## 2.0.0 | ||
|
||
### Major Changes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
# zhi-log | ||
|
||
## 1.14.8 | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies | ||
- zhi-device@2.1.0 | ||
|
||
## 1.14.7 | ||
|
||
### Patch Changes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
VITE_DEBUG_MODE=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ["./node_modules/@terwer/eslint-config-custom/typescript/index.cjs"], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.idea | ||
.DS_Store | ||
testdata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# zhi-siyuan-api | ||
|
||
## 1.9.1 | ||
|
||
### Patch Changes | ||
|
||
- add get image blocks | ||
|
||
## 1.9.0 | ||
|
||
### Minor Changes | ||
|
||
- remove unused appinstance | ||
|
||
## 1.8.0 | ||
|
||
### Minor Changes | ||
|
||
- new kernel api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# zhi-siyuan-api | ||
|
||
a siyuan-note api including both kernel and client | ||
|
||
## Usage | ||
|
||
```ts | ||
import { SiyuanKernelApi } from "zhi-siyuan-api" | ||
import { ZhiUtil } from "zhi-common" | ||
|
||
// appInstance | ||
const appInstance: any = {} | ||
appInstance.zhiCommon = { | ||
ZhiUtil: ZhiUtil | ||
} | ||
console.log(appInstance) | ||
|
||
// kernelApi | ||
const siyuanConfig = new SiyuanConfig("http://127.0.0.1:6806", "") | ||
const kernelApi = new SiyuanKernelApi(appInstance, siyuanConfig) | ||
const result = await kernelApi.lsNotebooks() | ||
console.log("result=>", result) | ||
``` | ||
|
||
dynamic invoke | ||
|
||
```ts | ||
import { SiyuanKernelApi } from "zhi-siyuan-api" | ||
|
||
// appInstance也可以动态加载,减小打包体积 | ||
const appInstance: any = {} | ||
|
||
// polyfills | ||
const moduleBase = "" | ||
console.log("moduleBase=>", moduleBase) | ||
// https://github.com/terwer/siyuan-plugin-publisher/blob/main/public/polyfills/fs.js | ||
appInstance.fs = (await import(`${moduleBase}/polyfills/fs.js`))["default"] | ||
// https://github.com/terwer/siyuan-plugin-publisher/blob/main/public/polyfills/path.js | ||
appInstance.path = (await import(`${moduleBase}/polyfills/path.js`))["default"] | ||
appInstance.importDep = async (moduleName) => { | ||
return await import(appInstance.path.join(moduleBase, moduleName)) | ||
} | ||
|
||
const zhiCommon = (await appInstance.importDep("./libs/zhi-common/index.js")) as any | ||
appInstance.zhiCommon = { | ||
ZhiUtil: zhiCommon["ZhiUtil"], | ||
} | ||
console.log(appInstance) | ||
|
||
// kernelApi | ||
const siyuanConfig = new SiyuanConfig("http://127.0.0.1:6806", "") | ||
const kernelApi = new SiyuanKernelApi(appInstance, siyuanConfig) | ||
const result = await kernelApi.lsNotebooks() | ||
console.log("result=>", result) | ||
``` | ||
|
||
## Deps | ||
|
||
``` | ||
├── zhi-common - [dynaminc dependency] | ||
├── zhi-blog-api | ||
├── zhi-lib-base | ||
``` | ||
|
||
## Dev | ||
|
||
```bash | ||
pnpm dev -F zhi-siyuan-api | ||
``` | ||
|
||
## Build | ||
|
||
```bash | ||
pnpm build -F zhi-siyuan-api | ||
``` | ||
|
||
## Test | ||
|
||
Execute the unit tests via [vitest](https://vitest.dev) | ||
|
||
```bash | ||
pnpm test -F zhi-siyuan-api | ||
``` | ||
|
||
## Publish | ||
|
||
```bash | ||
pnpm publish -F zhi-siyuan-api --tag latest | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite + Vue + TS</title> | ||
</head> | ||
<body> | ||
This file is for lib hot-load test only, see <a href="/src/index.ts">/src/index.ts</a> | ||
<script type="module" src="/src/index.ts"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"name": "zhi-siyuan-api", | ||
"version": "1.9.1", | ||
"type": "module", | ||
"description": "a siyuan-note api including both kernel and client", | ||
"main": "./dist/index.js", | ||
"typings": "./dist/index.d.ts", | ||
"repository": "terwer/zhi", | ||
"homepage": "https://github.com/terwer/zhi/tree/main/libs/zhi-siyuan-api", | ||
"author": "terwer", | ||
"license": "GPL", | ||
"files": [ | ||
"dist", | ||
"README.md" | ||
], | ||
"keywords": [ | ||
"zhi", | ||
"lib", | ||
"siyuan", | ||
"note", | ||
"api" | ||
], | ||
"scripts": { | ||
"serve": "vite", | ||
"dev": "vite build --watch", | ||
"build": "vite build", | ||
"start": "vite preview", | ||
"test": "vitest --watch" | ||
}, | ||
"devDependencies": { | ||
"@terwer/eslint-config-custom": "workspace:*", | ||
"@terwer/tsconfig": "workspace:*", | ||
"@terwer/vite-config-custom": "workspace:*", | ||
"form-data": "^4.0.0" | ||
}, | ||
"dependencies": { | ||
"cross-fetch": "^3.1.6", | ||
"zhi-blog-api": "workspace:*", | ||
"zhi-common": "workspace:*", | ||
"zhi-lib-base": "workspace:*" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright (c) 2023, Terwer . All rights reserved. | ||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
* | ||
* This code is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License version 2 only, as | ||
* published by the Free Software Foundation. Terwer designates this | ||
* particular file as subject to the "Classpath" exception as provided | ||
* by Terwer in the LICENSE file that accompanied this code. | ||
* | ||
* This code is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
* version 2 for more details (a copy is included in the LICENSE file that | ||
* accompanied this code). | ||
* | ||
* You should have received a copy of the GNU General Public License version | ||
* 2 along with this work; if not, write to the Free Software Foundation, | ||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
* | ||
* Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com | ||
* or visit www.terwer.space if you need additional information or have any | ||
* questions. | ||
*/ | ||
|
||
import { describe, it } from "vitest" | ||
|
||
describe("zhi-siyuan-api", () => { | ||
it("index", () => { | ||
console.log("hello world") | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import SiyuanApi from "./lib/zhi-siyuan-api" | ||
import SiyuanKernelApi from "./lib/kernel/siyuanKernelApi" | ||
import type { SiyuanData } from "./lib/kernel/ISiyuanKernelApi" | ||
import SiyuanConfig from "./lib/config/siyuanConfig" | ||
import SiYuanApiAdaptor from "./lib/adaptor/siYuanApiAdaptor" | ||
import SiyuanConstants from "./lib/siyuanConstants" | ||
|
||
export { SiyuanApi } | ||
export { SiyuanData, SiyuanKernelApi } | ||
export { SiyuanConstants, SiyuanConfig, SiYuanApiAdaptor } |
Oops, something went wrong.