Skip to content

Commit 5614ece

Browse files
committed
perf(api): 调整 API /api/inbox/getShorthand | Adjust API /api/inbox/getShorthand
1 parent 74f3afa commit 5614ece

File tree

9 files changed

+340
-201
lines changed

9 files changed

+340
-201
lines changed

node/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,14 @@
8282
"@ltd/j-toml": "^1.38.0",
8383
"@nodelib/fs.walk": "^1.2.8",
8484
"@types/node": "^20.10.5",
85-
"@typescript-eslint/eslint-plugin": "^6.15.0",
86-
"@typescript-eslint/parser": "^6.15.0",
85+
"@typescript-eslint/eslint-plugin": "^6.16.0",
86+
"@typescript-eslint/parser": "^6.16.0",
8787
"@vitest/coverage-istanbul": "^0.33.0",
8888
"@vitest/ui": "^0.33.0",
8989
"ajv": "^8.12.0",
9090
"ajv-formats": "^2.1.1",
9191
"chokidar": "^3.5.3",
92-
"cspell": "^8.1.3",
92+
"cspell": "^8.2.3",
9393
"dotenv": "^16.3.1",
9494
"eslint": "^8.56.0",
9595
"json5": "^2.2.3",
@@ -98,7 +98,7 @@
9898
"ts-node": "^10.9.2",
9999
"typescript": "^5.3.3",
100100
"vite": "^5.0.10",
101-
"vite-plugin-dts": "^3.6.4",
101+
"vite-plugin-dts": "^3.7.0",
102102
"vite-plugin-static-copy": "^0.16.0",
103103
"vitest": "^0.34.6",
104104
"ws": "^8.15.1"

node/pnpm-lock.yaml

Lines changed: 326 additions & 185 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node/tests/utils/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ interface ITestKernelAPIOptions<P, R> {
7171
* @param payload: 请求体对象
7272
* @param validate: ajv 校验函数
7373
*/
74-
export function testKernelAPI<P, R>(options: ITestKernelAPIOptions<P, R>) {
75-
describe(options.name, async () => {
74+
export async function testKernelAPI<P, R>(options: ITestKernelAPIOptions<P, R>) {
75+
describe.sequential(options.name, async () => {
7676
try {
7777
/* 测试请求体 */
7878
if (options.payload) {

schemas/kernel/api/inbox/getShorthand/payload.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://json-schema.org/draft/2020-12/schema",
33
"$id": "https://github.com/siyuan-community/siyuan-sdk/raw/main/schemas/kernel/api/inbox/getShorthand/payload.schema.json",
4-
"$comment": "v2.9.7",
4+
"$comment": "v2.11.1",
55
"$ref": "#/$defs/root",
66
"$defs": {
77
"root": {

schemas/kernel/api/inbox/getShorthand/payload.schema.json5

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
/**
22
* schemas/kernel/api/inbox/getShorthand/payload.schema.json5
33
* 获得一则收集箱的速记内容
4-
* REF: https://github.com/siyuan-note/siyuan/blob/v2.9.7/kernel/api/index.go#L51-L68
4+
* REF: https://github.com/siyuan-note/siyuan/blob/v2.11.1/kernel/api/index.go#L51-L68
55
* @pathname: /api/inbox/getShorthand
6-
* @version: 2.9.7
6+
* @version: 2.11.1
77
*/
88
{
99
$schema: 'https://json-schema.org/draft/2020-12/schema',
1010
$id: 'https://github.com/siyuan-community/siyuan-sdk/raw/main/schemas/kernel/api/inbox/getShorthand/payload.schema.json5',
11-
$comment: 'v2.9.7',
11+
$comment: 'v2.11.1',
1212
$ref: '#/$defs/root',
1313
$defs: {
1414
root: {

schemas/kernel/api/inbox/getShorthand/response.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://json-schema.org/draft/2020-12/schema",
33
"$id": "https://github.com/siyuan-community/siyuan-sdk/raw/main/schemas/kernel/api/inbox/getShorthand/response.schema.json",
4-
"$comment": "v2.9.7",
4+
"$comment": "v2.11.1",
55
"$ref": "#/$defs/root",
66
"$defs": {
77
"root": {

schemas/kernel/api/inbox/getShorthand/response.schema.json5

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
/**
22
* schemas/kernel/api/inbox/getShorthand/response.schema.json5
33
* 获得一则收集箱的速记内容
4-
* REF: https://github.com/siyuan-note/siyuan/blob/v2.9.7/kernel/api/index.go#L51-L68
4+
* REF: https://github.com/siyuan-note/siyuan/blob/v2.11.1/kernel/api/index.go#L51-L68
55
* @pathname: /api/inbox/getShorthand
6-
* @version: 2.9.7
6+
* @version: 2.11.1
77
*/
88
{
99
$schema: 'https://json-schema.org/draft/2020-12/schema',
1010
$id: 'https://github.com/siyuan-community/siyuan-sdk/raw/main/schemas/kernel/api/inbox/getShorthand/response.schema.json5',
11-
$comment: 'v2.9.7',
11+
$comment: 'v2.11.1',
1212
$ref: '#/$defs/root',
1313
$defs: {
1414
root: {

schemas/kernel/api/system/getConf/response.schema.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@
144144
"description": "A list of the IP addresses of the devices on which the kernel resides",
145145
"items": {
146146
"type": "string",
147-
"format": "ip",
148147
"description": "IP addresses (IPv4 & IPv6)",
149148
"examples": [
150149
"127.0.0.1",

schemas/kernel/api/system/getConf/response.schema.json5

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@
136136
description: 'A list of the IP addresses of the devices on which the kernel resides',
137137
items: {
138138
type: 'string',
139-
format: 'ip',
140139
description: 'IP addresses (IPv4 & IPv6)',
141140
examples: [
142141
'127.0.0.1', //

0 commit comments

Comments
 (0)