diff --git a/libs/zhi-blog-api/CHANGELOG.md b/libs/zhi-blog-api/CHANGELOG.md index 2efe4912..81f1f106 100644 --- a/libs/zhi-blog-api/CHANGELOG.md +++ b/libs/zhi-blog-api/CHANGELOG.md @@ -1,5 +1,54 @@ # zhi-blog-api +## 1.67.0 + +### Minor Changes + +- feat: support outline and docTree +- feat: add outline and docTree + +## 1.66.0 + +### Minor Changes + +- feat: change uploadFile + +## 1.65.0 + +### Minor Changes + +- feat: passwordLabel default as undefined + +## 1.64.0 + +### Minor Changes + +- feat: add usernameLabel and passwordLabel option + +## 1.63.0 + +### Minor Changes + +- feat: fix post status + +## 1.62.0 + +### Minor Changes + +- feat: add post status enum + +## 1.61.0 + +### Minor Changes + +- feat: add forceProxy for telegra.ph like platforms + +## 1.60.0 + +### Minor Changes + +- feat: add image store path support for github and gitlab + ## 1.59.0 ### Minor Changes diff --git a/libs/zhi-blog-api/package.json b/libs/zhi-blog-api/package.json index e205d804..1f5dac0e 100644 --- a/libs/zhi-blog-api/package.json +++ b/libs/zhi-blog-api/package.json @@ -1,6 +1,6 @@ { "name": "zhi-blog-api", - "version": "1.59.0", + "version": "1.67.0", "type": "module", "description": "a common blog interface", "main": "./dist/index.js", diff --git a/libs/zhi-blog-api/src/lib/IWebApi.ts b/libs/zhi-blog-api/src/lib/IWebApi.ts index f34f4a51..9ede741b 100644 --- a/libs/zhi-blog-api/src/lib/IWebApi.ts +++ b/libs/zhi-blog-api/src/lib/IWebApi.ts @@ -27,6 +27,7 @@ import { IBlogApi } from "./IBlogApi" import Post from "./models/post" import ElectronCookie from "./models/ElectronCookie" import WebConfig from "./WebConfig" +import MediaObject from "./models/mediaObject" /** * 通用博客接口 @@ -79,11 +80,10 @@ interface IWebApi extends IBlogApi { /** * 上传图片:调用平台 API 上传图片 * - * @param file 图片文件 - * @param filename 文件名,可选 + * @param mediaObject * @returns Promise<string> 上传后的图片地址 */ - uploadFile(file: File, filename?: string): Promise<any> + uploadFile(mediaObject: MediaObject): Promise<any> /** * 更新文章:调用平台 API 更新文章(发布工具内部通过该接口替换文章内图片地址) diff --git a/libs/zhi-blog-api/src/lib/PreferenceConfig.ts b/libs/zhi-blog-api/src/lib/PreferenceConfig.ts index b253ba6b..d86c6784 100644 --- a/libs/zhi-blog-api/src/lib/PreferenceConfig.ts +++ b/libs/zhi-blog-api/src/lib/PreferenceConfig.ts @@ -47,11 +47,35 @@ class PreferenceConfig { */ public removeMdWidgetTag: boolean + /** + * 是否启用目录 + */ + public outlineEnable: boolean + + /** + * 目录层级 + */ + public outlineLevel: number + + /** + * 是否启用文档树 + */ + public docTreeEnable: boolean + + /** + * 文档树层级 + */ + public docTreeLevel: number + constructor() { this.fixTitle = false this.keepTitle = false this.removeFirstH1 = false this.removeMdWidgetTag = false + this.outlineEnable = false + this.outlineLevel = 3 + this.docTreeEnable = false + this.docTreeLevel = 3 } } diff --git a/libs/zhi-blog-api/src/lib/blogConfig.ts b/libs/zhi-blog-api/src/lib/blogConfig.ts index 7226b4bf..6950655f 100644 --- a/libs/zhi-blog-api/src/lib/blogConfig.ts +++ b/libs/zhi-blog-api/src/lib/blogConfig.ts @@ -100,6 +100,11 @@ abstract class BlogConfig { */ public username?: string + /** + * 用户名标题,不设置自动选择,默认 undefined + */ + public usernameLabel?: string + /** * 密码类型 */ @@ -110,6 +115,11 @@ abstract class BlogConfig { */ public password: string + /** + * 密码标题,不设置自动选择,默认 undefined + */ + public passwordLabel?: string + /** * 密码/token设置地址 */ @@ -275,11 +285,21 @@ abstract class BlogConfig { */ public bundledPicbedSupported?: boolean + /** + * 图片存储目录,部分平台会用到,相对于文章存储目录,默认为 images + */ + public imageStorePath?: string + /** * 图床服务类型 */ public picbedService?: PicbedServiceTypeEnum + /** + * 强制使用代理 + */ + public forceProxy?: boolean + protected constructor() { this.home = "" this.apiUrl = "" @@ -318,6 +338,8 @@ abstract class BlogConfig { this.picgoPicbedSupported = false this.bundledPicbedSupported = false this.picbedService = PicbedServiceTypeEnum.None + this.imageStorePath = "images" + this.forceProxy = false } } diff --git a/libs/zhi-blog-api/src/lib/enums/postStatusEnum.ts b/libs/zhi-blog-api/src/lib/enums/postStatusEnum.ts index fbd53909..934104fd 100644 --- a/libs/zhi-blog-api/src/lib/enums/postStatusEnum.ts +++ b/libs/zhi-blog-api/src/lib/enums/postStatusEnum.ts @@ -25,20 +25,42 @@ /** * 文章状态枚举 + * + * @link https://codex.wordpress.org/Post_Status_Transitions */ enum PostStatusEnum { /** - * 已发布 + * 无先前状态 + */ + PostStatusEnum_New = "new", + /** + * 发布 */ PostStatusEnum_Publish = "publish", + /** + * 待审核 + */ + PostStatusEnum_Pending = "pending", /** * 草稿 */ PostStatusEnum_Draft = "draft", /** - * 继承 + * 自动草稿 + */ + PostStatusEnum_AutoDraft = "auto-draft", + /** + * 定时发布 + */ + PostStatusEnum_Future = "future", + /** + * 私密 + */ + PostStatusEnum_Private = "private", + /** + * 垃圾箱 */ - PostStatusEnum_Inherit = "inherit", + PostStatusEnum_Trash = "trash", } export default PostStatusEnum diff --git a/libs/zhi-blog-api/src/lib/models/post.ts b/libs/zhi-blog-api/src/lib/models/post.ts index 9c3865d8..4e06367d 100644 --- a/libs/zhi-blog-api/src/lib/models/post.ts +++ b/libs/zhi-blog-api/src/lib/models/post.ts @@ -23,9 +23,9 @@ * questions. */ -import PostStatusEnum from "../enums/postStatusEnum"; -import PageEditMode from "./pageEditMode"; -import YamlStrategy from "./yamlStrategy"; +import PostStatusEnum from "../enums/postStatusEnum" +import PageEditMode from "./pageEditMode" +import YamlStrategy from "./yamlStrategy" /** * 通用文章模型定义 @@ -173,6 +173,24 @@ class Post { */ yamlType?: YamlStrategy + /** + * 目录 + */ + outline?: any[] + /** + * 目录层级 + */ + outlineLevel?: number + + /** + * 文档树 + */ + docTree?: any[] + /** + * 文档树层级 + */ + docTreeLevel?: number + constructor() { this.postid = "" this.originalId = "" @@ -197,6 +215,10 @@ class Post { this.attrs = "{}" this.editMode = PageEditMode.EditMode_simple this.yamlType = YamlStrategy.YAML_default + this.outline = [] + this.outlineLevel = 3 + this.docTree = [] + this.docTreeLevel = 3 } } diff --git a/libs/zhi-blog-api/src/lib/webAdaptor.ts b/libs/zhi-blog-api/src/lib/webAdaptor.ts index bb0e480b..9744d84d 100644 --- a/libs/zhi-blog-api/src/lib/webAdaptor.ts +++ b/libs/zhi-blog-api/src/lib/webAdaptor.ts @@ -29,6 +29,7 @@ import { simpleLogger } from "zhi-lib-base" import ElectronCookie from "./models/ElectronCookie" import WebConfig from "./WebConfig" import WebApi from "./webApi" +import MediaObject from "./models/mediaObject"; /** * 网页授权核心基类 @@ -81,8 +82,8 @@ class WebAdaptor extends BlogAdaptor { return await this.webAdaptor.addPost(post) } - public async uploadFile(file: File, filename?: string): Promise<any> { - return await this.webAdaptor.uploadFile(file, filename) + public async uploadFile(mediaObject: MediaObject): Promise<any> { + return await this.webAdaptor.uploadFile(mediaObject) } public async editPost(postid: string, post: Post, publish?: boolean): Promise<boolean> { diff --git a/libs/zhi-blog-api/src/lib/webApi.ts b/libs/zhi-blog-api/src/lib/webApi.ts index b24f2399..226c482c 100644 --- a/libs/zhi-blog-api/src/lib/webApi.ts +++ b/libs/zhi-blog-api/src/lib/webApi.ts @@ -29,6 +29,7 @@ import { NotImplementedException } from "zhi-lib-base" import ElectronCookie from "./models/ElectronCookie" import WebConfig from "./WebConfig" import BlogApi from "./blogApi" +import MediaObject from "./models/mediaObject"; /** * 网页授权基类 @@ -54,7 +55,7 @@ class WebApi extends BlogApi implements IWebApi { throw new NotImplementedException("You must implement addPost in sub class") } - public async uploadFile(file: File, filename?: string): Promise<any> { + public async uploadFile(mediaObject: MediaObject): Promise<any> { throw new NotImplementedException("You must implement uploadFile in sub class") } diff --git a/libs/zhi-fetch-middleware/CHANGELOG.md b/libs/zhi-fetch-middleware/CHANGELOG.md index 2df28830..2ae21e69 100644 --- a/libs/zhi-fetch-middleware/CHANGELOG.md +++ b/libs/zhi-fetch-middleware/CHANGELOG.md @@ -1,5 +1,17 @@ # zhi-fetch-middleware +## 0.12.0 + +### Minor Changes + +- feat: check is resp is text + +## 0.11.0 + +### Minor Changes + +- feat: handle fetch for text/xml + ## 0.10.0 ### Minor Changes diff --git a/libs/zhi-fetch-middleware/package.json b/libs/zhi-fetch-middleware/package.json index 5d669a22..fdec0ae5 100644 --- a/libs/zhi-fetch-middleware/package.json +++ b/libs/zhi-fetch-middleware/package.json @@ -1,6 +1,6 @@ { "name": "zhi-fetch-middleware", - "version": "0.10.0", + "version": "0.12.0", "type": "module", "description": "an intermediate tier prepared for fetch requests", "main": "./dist/index.js", diff --git a/libs/zhi-fetch-middleware/src/lib/commonFetchClient.ts b/libs/zhi-fetch-middleware/src/lib/commonFetchClient.ts index 20b9913d..38ff4c3e 100644 --- a/libs/zhi-fetch-middleware/src/lib/commonFetchClient.ts +++ b/libs/zhi-fetch-middleware/src/lib/commonFetchClient.ts @@ -106,7 +106,7 @@ class CommonFetchClient implements ICommonFetchClient { throw new Error("请求异常,response is undefined") } - let resJson: any + let resp: any const isResponse = response?.status !== undefined && response?.headers !== undefined && response?.url !== undefined const isStream = !isResponse && response?.body instanceof ReadableStream @@ -115,7 +115,7 @@ class CommonFetchClient implements ICommonFetchClient { if (isStream) { this.logger.info("检测到response不是Response的实例", typeof response) - resJson = response + resp = response } else { // 解析响应体并返回响应结果 const statusCode = response.status @@ -148,24 +148,28 @@ class CommonFetchClient implements ICommonFetchClient { } } + const contentType = fetchOptions.headers["Content-Type"] + const isText = contentType === "text/xml" || contentType === "text/html" || contentType === "text/plain" + + this.logger.info("isText=>", isText) this.logger.info("isNode=>", BrowserUtil.isNode) this.logger.info("isElectron=>", BrowserUtil.isElectron()) this.logger.info("isInSiyuanWidget=>", SiyuanDevice.isInSiyuanWidget()) - if (BrowserUtil.isNode) { - resJson = await this.safeParseBodyJson(response) - } else if (BrowserUtil.isElectron()) { - resJson = await this.safeParseBodyJson(response) - } else if (SiyuanDevice.isInSiyuanWidget()) { - resJson = await this.safeParseBodyJson(response) + if (BrowserUtil.isNode || BrowserUtil.isElectron() || SiyuanDevice.isInSiyuanWidget()) { + if (isText) { + resp = await response.text() + } else { + resp = await this.safeParseBodyJson(response) + } } else { this.logger.debug("开始解析CORSBody") const corsJson = await this.safeParseBodyJson(response) - resJson = this.parseCORSBody(corsJson) + resp = this.parseCORSBody(corsJson) } } - this.logger.debug("全部处理完毕,resJson=>", resJson) - return resJson + this.logger.debug("全部处理完毕,resJson=>", resp) + return resp } /** diff --git a/libs/zhi-github-middleware/CHANGELOG.md b/libs/zhi-github-middleware/CHANGELOG.md index d7e7b12b..c71f02cf 100644 --- a/libs/zhi-github-middleware/CHANGELOG.md +++ b/libs/zhi-github-middleware/CHANGELOG.md @@ -1,5 +1,11 @@ # zhi-github-middleware +## 0.5.0 + +### Minor Changes + +- feat: add encoding support for github and gitlab + ## 0.4.17 ### Patch Changes diff --git a/libs/zhi-github-middleware/package.json b/libs/zhi-github-middleware/package.json index 49780c50..4df53b7a 100644 --- a/libs/zhi-github-middleware/package.json +++ b/libs/zhi-github-middleware/package.json @@ -1,6 +1,6 @@ { "name": "zhi-github-middleware", - "version": "0.4.17", + "version": "0.5.0", "type": "module", "description": "a middleware for github api", "main": "./dist/index.js", diff --git a/libs/zhi-github-middleware/src/lib/commonGithubClient.ts b/libs/zhi-github-middleware/src/lib/commonGithubClient.ts index 6d5f90cb..9a6b554b 100644 --- a/libs/zhi-github-middleware/src/lib/commonGithubClient.ts +++ b/libs/zhi-github-middleware/src/lib/commonGithubClient.ts @@ -104,14 +104,17 @@ class CommonGithubClient { * 子类API使用,应用层面不建议直接调用 * * @param docPath 页面路径,相对于根仓库的完整路径 - * @param mdContent Markdown文本 + * @param content 文本 * @param sha 文件的sha,undefined表示新建,更新需要传sha字符串 + * @param encoding base64 或者 text */ - protected async createOrUpdatePage(docPath: string, mdContent: string, sha: any): Promise<any> { + protected async createOrUpdatePage(docPath: string, content: string, sha: any, encoding = "text"): Promise<any> { let data - // const base64 = Buffer.from(mdContent).toString('base64'); - const base64 = Base64.toBase64(mdContent) + let base64 = content + if (encoding === "text") { + base64 = Base64.toBase64(content) + } const route = "PUT /repos/" + this.githubConfig.githubUser + "/" + this.githubConfig.githubRepo + "/contents/" + docPath const options = { @@ -182,12 +185,13 @@ class CommonGithubClient { * 发布文章到Github * * @param docPath 相对于根仓库的完整路径,包括文件名和扩展名 - * @param mdContent Markdown文本 + * @param content Markdown文本 + * @param encoding */ - public async publishGithubPage(docPath: string, mdContent: string): Promise<any> { + public async publishGithubPage(docPath: string, content: string, encoding = "text"): Promise<any> { // https://github.com/terwer/src-sy-post-publisher/issues/21 const sha = undefined - const res = await this.createOrUpdatePage(docPath, mdContent, sha) + const res = await this.createOrUpdatePage(docPath, content, sha, encoding) this.logger.debug("Github publishPage,res=>", res) return res } @@ -196,13 +200,14 @@ class CommonGithubClient { * 更新文章到Github * * @param docPath - * @param mdContent + * @param content + * @param encoding */ - public async updateGithubPage(docPath: string, mdContent: string): Promise<any> { + public async updateGithubPage(docPath: string, content: string, encoding = "text"): Promise<any> { // https://github.com/terwer/src-sy-post-publisher/issues/21 const sha = await this.getPageSha(docPath) - const res = await this.createOrUpdatePage(docPath, mdContent, sha) + const res = await this.createOrUpdatePage(docPath, content, sha, encoding) this.logger.debug("Github updatePage,res=>", res) return res } diff --git a/libs/zhi-gitlab-middleware/CHANGELOG.md b/libs/zhi-gitlab-middleware/CHANGELOG.md index e51fd915..81f1080d 100644 --- a/libs/zhi-gitlab-middleware/CHANGELOG.md +++ b/libs/zhi-gitlab-middleware/CHANGELOG.md @@ -1,5 +1,29 @@ # zhi-gitlab-middleware +## 0.10.0 + +### Minor Changes + +- feat: check is resp is text + +### Patch Changes + +- Updated dependencies + - zhi-fetch-middleware@0.12.0 + +## 0.9.1 + +### Patch Changes + +- Updated dependencies + - zhi-fetch-middleware@0.11.0 + +## 0.9.0 + +### Minor Changes + +- feat: add encoding support for github and gitlab + ## 0.8.0 ### Minor Changes diff --git a/libs/zhi-gitlab-middleware/package.json b/libs/zhi-gitlab-middleware/package.json index eeed2c35..953e1dcb 100644 --- a/libs/zhi-gitlab-middleware/package.json +++ b/libs/zhi-gitlab-middleware/package.json @@ -1,6 +1,6 @@ { "name": "zhi-gitlab-middleware", - "version": "0.8.0", + "version": "0.10.0", "type": "module", "description": "a middleware for gitlab api ", "main": "./dist/index.js", diff --git a/libs/zhi-gitlab-middleware/src/lib/commonGitlabClient.ts b/libs/zhi-gitlab-middleware/src/lib/commonGitlabClient.ts index 2c8dd319..e742444c 100644 --- a/libs/zhi-gitlab-middleware/src/lib/commonGitlabClient.ts +++ b/libs/zhi-gitlab-middleware/src/lib/commonGitlabClient.ts @@ -108,9 +108,10 @@ class CommonGitlabClient { * * @param filePath - 文件路径 * @param content - 文件内容 + * @param encoding - base64 或者 text * @returns 创建文件的响应 */ - public async createRepositoryFile(filePath: string, content: string): Promise<any> { + public async createRepositoryFile(filePath: string, content: string, encoding = "text"): Promise<any> { const id = `${this.user}/${this.repo}` const endpointUrl = `/api/v4/projects/${encodeURIComponent(id)}/repository/files/` + `${encodeURIComponent(filePath)}` @@ -118,6 +119,7 @@ class CommonGitlabClient { branch: this.branch, author_email: this.authorEmail, author_name: this.authorName, + encoding: encoding, content: content, commit_message: this.commitMessage, } diff --git a/libs/zhi-siyuan-api/CHANGELOG.md b/libs/zhi-siyuan-api/CHANGELOG.md index e5e9d949..ec0efa6c 100644 --- a/libs/zhi-siyuan-api/CHANGELOG.md +++ b/libs/zhi-siyuan-api/CHANGELOG.md @@ -1,5 +1,79 @@ # zhi-siyuan-api +## 2.23.0 + +### Minor Changes + +- feat: support outline and docTree +- feat: add outline and docTree + +### Patch Changes + +- Updated dependencies +- Updated dependencies + - zhi-blog-api@1.67.0 + +## 2.22.0 + +### Minor Changes + +- add doc limit from 128 to 20480 + +## 2.21.0 + +### Minor Changes + +- fix: cfg file mod time error + +## 2.20.10 + +### Patch Changes + +- Updated dependencies + - zhi-blog-api@1.66.0 + +## 2.20.9 + +### Patch Changes + +- Updated dependencies + - zhi-blog-api@1.65.0 + +## 2.20.8 + +### Patch Changes + +- Updated dependencies + - zhi-blog-api@1.64.0 + +## 2.20.7 + +### Patch Changes + +- Updated dependencies + - zhi-blog-api@1.63.0 + +## 2.20.6 + +### Patch Changes + +- Updated dependencies + - zhi-blog-api@1.62.0 + +## 2.20.5 + +### Patch Changes + +- Updated dependencies + - zhi-blog-api@1.61.0 + +## 2.20.4 + +### Patch Changes + +- Updated dependencies + - zhi-blog-api@1.60.0 + ## 2.20.3 ### Patch Changes diff --git a/libs/zhi-siyuan-api/package.json b/libs/zhi-siyuan-api/package.json index 670ee60f..75385512 100644 --- a/libs/zhi-siyuan-api/package.json +++ b/libs/zhi-siyuan-api/package.json @@ -1,6 +1,6 @@ { "name": "zhi-siyuan-api", - "version": "2.20.3", + "version": "2.23.0", "type": "module", "description": "a siyuan-note api including both kernel and client", "main": "./dist/index.js", diff --git a/libs/zhi-siyuan-api/src/lib/adaptor/siYuanApiAdaptor.spec.ts b/libs/zhi-siyuan-api/src/lib/adaptor/siYuanApiAdaptor.spec.ts index a4b87e3c..4ce17bdd 100644 --- a/libs/zhi-siyuan-api/src/lib/adaptor/siYuanApiAdaptor.spec.ts +++ b/libs/zhi-siyuan-api/src/lib/adaptor/siYuanApiAdaptor.spec.ts @@ -93,9 +93,13 @@ describe("SiYuanApiAdaptor", async () => { it("test siyuan getPost", async () => { const siyuanConfig = new SiyuanConfig("http://127.0.0.1:6806", "") + siyuanConfig.preferenceConfig.outlineEnable = true + siyuanConfig.preferenceConfig.outlineLevel = 2 + siyuanConfig.preferenceConfig.docTreeEnable = true + siyuanConfig.preferenceConfig.docTreeLevel = 6 const apiAdaptor = new SiYuanApiAdaptor(siyuanConfig) - const postid = "20230722212237-oc9s0y8" + const postid = "20241111132349-y6pic5l" const post = await apiAdaptor.getPost(postid) console.log(post) }) diff --git a/libs/zhi-siyuan-api/src/lib/adaptor/siYuanApiAdaptor.ts b/libs/zhi-siyuan-api/src/lib/adaptor/siYuanApiAdaptor.ts index 7159f322..8cb6dd4b 100644 --- a/libs/zhi-siyuan-api/src/lib/adaptor/siYuanApiAdaptor.ts +++ b/libs/zhi-siyuan-api/src/lib/adaptor/siYuanApiAdaptor.ts @@ -170,6 +170,66 @@ class SiYuanApiAdaptor extends BlogApi { } } + // 处理目录 + let outline = [] + let outlineLevel = 3 + if (this.cfg?.preferenceConfig.outlineEnable) { + outlineLevel = this.cfg?.preferenceConfig.outlineLevel ?? 3 + outline = await this.siyuanKernelApi.getOutline(pid, outlineLevel) + this.logger.info("检测到配置,目录已获取") + } + + // 处理文档树 + let docTree = [] + let docTreeLevel = 3 + if (this.cfg?.preferenceConfig.docTreeEnable) { + docTreeLevel = this.cfg?.preferenceConfig.docTreeLevel ?? 3 + const hpaths = siyuanPost.hpath.replace(".sy", "").split("/") + const paths = siyuanPost.path.replace(".sy", "").split("/") + const parentPathArray = [] + + // let parentId = "" + // for (let i = 0; i < hpaths.length; i++) { + // const hpath = hpaths[i] + // const path = paths[i] + // if (StrUtil.isEmptyString(hpath)) { + // continue + // } + // parentPathArray.push({ + // id: path, + // parentId: parentId, + // name: hpath, + // }) + // parentId = path + // } + + let currentLevel = 0 + for (let i = hpaths.length - 1; i >= 0; i--) { + const hpath = hpaths[i] + const path = paths[i] + if (StrUtil.isEmptyString(hpath)) { + continue + } + if (currentLevel < docTreeLevel) { + parentPathArray.push({ + id: path, + // 确保第一个节点的 parentId 为空 + parentId: i > 0 ? paths[i - 1] : "", + name: hpath, + }) + currentLevel++ + } else { + break // 达到最大层级,退出循环 + } + } + + // 如果需要保持原来的顺序,可以在最后反转数组 + parentPathArray.reverse() + + docTree = await this.siyuanKernelApi.getDocTree(siyuanPost.box, siyuanPost.path, docTreeLevel, parentPathArray) + this.logger.info("检测到配置,文档树已获取") + } + // 别名(Custom_Slug优先,没有默认获取Sys_alias) const alias = ObjectUtil.getProperty(attrs, SiyuanAttr.Sys_alias, "") const slug = ObjectUtil.getProperty(attrs, SiyuanAttr.Custom_slug, alias) @@ -223,6 +283,10 @@ class SiYuanApiAdaptor extends BlogApi { // 为了安全,密码需要在页面实时设置 commonPost.wp_password = "" commonPost.attrs = JSON.stringify(publicAttrs) + commonPost.outline = outline + commonPost.outlineLevel = outlineLevel + commonPost.docTree = docTree + commonPost.docTreeLevel = docTreeLevel // yaml 适配 const yamlObj = PostUtil.toYamlObj(commonPost) diff --git a/libs/zhi-siyuan-api/src/lib/kernel/ISiyuanKernelApi.ts b/libs/zhi-siyuan-api/src/lib/kernel/ISiyuanKernelApi.ts index 65edf541..2c8e3f5c 100644 --- a/libs/zhi-siyuan-api/src/lib/kernel/ISiyuanKernelApi.ts +++ b/libs/zhi-siyuan-api/src/lib/kernel/ISiyuanKernelApi.ts @@ -111,6 +111,11 @@ interface ISiyuanKernelApi { getBlockKramdown(id: string): Promise<SiyuanData["data"]> // /api/block/updateBlock updateBlock(id: string, data: string, dataType?: "markdown" | "dom"): Promise<SiyuanData["data"]> + + // /api/outline/getDocOutline + getOutline(blockId: string, level?: number): Promise<any[]> + // 先直接解析 path 读取父级向上 level 级,再使用 /api/filetree/listDocsByPath 获取子级向下 level 级 + getDocTree(notebook: string, path: string, level?: number, parentPathArray?: any[]): Promise<any[]> } export default ISiyuanKernelApi diff --git a/libs/zhi-siyuan-api/src/lib/kernel/siyuanKernelApi.ts b/libs/zhi-siyuan-api/src/lib/kernel/siyuanKernelApi.ts index 7b02645f..99e4b02d 100644 --- a/libs/zhi-siyuan-api/src/lib/kernel/siyuanKernelApi.ts +++ b/libs/zhi-siyuan-api/src/lib/kernel/siyuanKernelApi.ts @@ -294,7 +294,7 @@ class SiyuanKernelApi implements ISiyuanKernelApi { id: docId, isBacklink: false, mode: 0, - size: 128, + size: 20480, } const url = "/api/filetree/getDoc" return await this.siyuanRequest(url, params) @@ -686,7 +686,7 @@ class SiyuanKernelApi implements ISiyuanKernelApi { const formData = new FormData() formData.append("path", path) formData.append("isDir", "false") - formData.append("modTime", Math.floor(Date.now() / 1000).toString()) + formData.append("modTime", Date.now().toString()) formData.append("file", file) return await this.siyuanRequestForm("/api/file/putFile", formData) } @@ -824,6 +824,50 @@ class SiyuanKernelApi implements ISiyuanKernelApi { } return await this.siyuanRequest("/api/format/netAssets2LocalAssets", params) } + + public async getDocTree(notebook: string, path: string, level?: number, parentPathArray?: any[]): Promise<any[]> { + const params = { + notebook: notebook, + path: path, + } + const childrenPathArray = await this.getChildrenPathArray(params, level) + return parentPathArray?.concat(childrenPathArray) ?? childrenPathArray + } + + private async getChildrenPathArray(params: any, depth: number = 1, currentDepth: number = 1): Promise<any[]> { + if (depth < currentDepth) { + return [] + } + + const data = await this.siyuanRequest("/api/filetree/listDocsByPath", params) + let paths: any[] = [] + + for (const item of data["files"]) { + const curPaths = item.path.replace(".sy", "").split("/") + paths.push({ + id: curPaths[curPaths.length - 1], + parentId: curPaths[curPaths.length - 2], + name: item.name.replace(".sy", ""), + }) + + const childParams = { + notebook: data.box, + path: item.path, + } + const childPaths = await this.getChildrenPathArray(childParams, depth, currentDepth + 1) + paths = paths.concat(childPaths) + } + + return paths + } + + public async getOutline(blockId: string, level?: number): Promise<any[]> { + const params = { + id: blockId, + preview: false, + } + return await this.siyuanRequest("/api/outline/getDocOutline", params) + } } export default SiyuanKernelApi diff --git a/package.json b/package.json index d975f4d9..e6e9faab 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,6 @@ "@changesets/cli": "^2.27.1", "@terwer/commit-config-custom": "workspace:*", "@terwer/eslint-config-custom": "workspace:*", - "turbo": "^1.13.0" + "turbo": "^1.13.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3e3276d7..7960af36 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,8 +18,8 @@ importers: specifier: workspace:* version: link:tools/eslint-config-custom turbo: - specifier: ^1.13.0 - version: 1.13.0 + specifier: ^1.13.2 + version: 1.13.2 apps/zhi-cli: dependencies: @@ -505,7 +505,7 @@ importers: version: 17.6.1 commitizen: specifier: ^4.3.0 - version: 4.3.0(@types/node@20.11.30)(typescript@5.4.3) + version: 4.3.0(@types/node@20.12.5)(typescript@5.4.4) husky: specifier: ^8.0.3 version: 8.0.3 @@ -532,7 +532,7 @@ importers: version: 2.1.1(esbuild@0.19.11) esbuild-plugin-d.ts: specifier: ^1.1.0 - version: 1.2.2(typescript@5.4.3) + version: 1.2.2(typescript@5.4.4) esbuild-plugin-ifdef: specifier: ^1.0.1 version: 1.0.1 @@ -1828,8 +1828,8 @@ packages: regenerator-runtime: 0.14.0 dev: true - /@babel/runtime@7.24.1: - resolution: {integrity: sha512-+BIznRzyqBf+2wCTxcKE3wDjfGeCoVE61KSHGpkzqrLi8qxqFwBeUFyId2cxkTmm55fzDGnm0+yCxaxygrLUnQ==} + /@babel/runtime@7.24.4: + resolution: {integrity: sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA==} engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.14.1 @@ -1895,7 +1895,7 @@ packages: /@changesets/apply-release-plan@7.0.0: resolution: {integrity: sha512-vfi69JR416qC9hWmFGSxj7N6wA5J222XNBmezSVATPWDVPIF7gkd4d8CpbEbXmRWbVrkoli3oerGS6dcL/BGsQ==} dependencies: - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 '@changesets/config': 3.0.0 '@changesets/get-version-range-type': 0.4.0 '@changesets/git': 3.0.0 @@ -1913,7 +1913,7 @@ packages: /@changesets/assemble-release-plan@6.0.0: resolution: {integrity: sha512-4QG7NuisAjisbW4hkLCmGW2lRYdPrKzro+fCtZaILX+3zdUELSvYjpL4GTv0E4aM9Mef3PuIQp89VmHJ4y2bfw==} dependencies: - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 '@changesets/errors': 0.2.0 '@changesets/get-dependents-graph': 2.0.0 '@changesets/types': 6.0.0 @@ -1931,7 +1931,7 @@ packages: resolution: {integrity: sha512-iJ91xlvRnnrJnELTp4eJJEOPjgpF3NOh4qeQehM6Ugiz9gJPRZ2t+TsXun6E3AMN4hScZKjqVXl0TX+C7AB3ZQ==} hasBin: true dependencies: - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 '@changesets/apply-release-plan': 7.0.0 '@changesets/assemble-release-plan': 6.0.0 '@changesets/changelog-git': 0.2.0 @@ -1996,7 +1996,7 @@ packages: /@changesets/get-release-plan@4.0.0: resolution: {integrity: sha512-9L9xCUeD/Tb6L/oKmpm8nyzsOzhdNBBbt/ZNcjynbHC07WW4E1eX8NMGC5g5SbM5z/V+MOrYsJ4lRW41GCbg3w==} dependencies: - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 '@changesets/assemble-release-plan': 6.0.0 '@changesets/config': 3.0.0 '@changesets/pre': 2.0.0 @@ -2012,7 +2012,7 @@ packages: /@changesets/git@3.0.0: resolution: {integrity: sha512-vvhnZDHe2eiBNRFHEgMiGd2CT+164dfYyrJDhwwxTVD/OW0FUD6G7+4DIx1dNwkwjHyzisxGAU96q0sVNBns0w==} dependencies: - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 '@changesets/errors': 0.2.0 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 @@ -2037,7 +2037,7 @@ packages: /@changesets/pre@2.0.0: resolution: {integrity: sha512-HLTNYX/A4jZxc+Sq8D1AMBsv+1qD6rmmJtjsCJa/9MSRybdxh0mjbTvE6JYZQ/ZiQ0mMlDOlGPXTm9KLTU3jyw==} dependencies: - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 '@changesets/errors': 0.2.0 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 @@ -2047,7 +2047,7 @@ packages: /@changesets/read@0.6.0: resolution: {integrity: sha512-ZypqX8+/im1Fm98K4YcZtmLKgjs1kDQ5zHpc2U1qdtNBmZZfo/IBiG162RoP0CUF05tvp2y4IspH11PLnPxuuw==} dependencies: - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 '@changesets/git': 3.0.0 '@changesets/logger': 0.1.0 '@changesets/parse': 0.4.0 @@ -2068,7 +2068,7 @@ packages: /@changesets/write@0.3.0: resolution: {integrity: sha512-slGLb21fxZVUYbyea+94uFiD6ntQW0M2hIKNznFizDhZPDgn2c/fv1UzzlW43RVzh1BEDuIqW6hzlJ1OflNmcw==} dependencies: - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 '@changesets/types': 6.0.0 fs-extra: 7.0.1 human-id: 1.0.2 @@ -2136,7 +2136,7 @@ packages: '@commitlint/load': 17.5.0 '@commitlint/types': 17.4.4 chalk: 4.1.2 - commitizen: 4.3.0(@types/node@20.11.30)(typescript@5.4.3) + commitizen: 4.3.0(@types/node@20.12.5)(typescript@5.4.4) inquirer: 8.0.0 lodash.isplainobject: 4.0.6 word-wrap: 1.2.3 @@ -2211,14 +2211,14 @@ packages: lodash.merge: 4.6.2 lodash.uniq: 4.5.0 resolve-from: 5.0.0 - ts-node: 10.9.1(@types/node@20.11.30)(typescript@5.4.3) + ts-node: 10.9.1(@types/node@20.12.5)(typescript@5.4.4) typescript: 5.2.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' dev: false - /@commitlint/load@19.2.0(@types/node@20.11.30)(typescript@5.4.3): + /@commitlint/load@19.2.0(@types/node@20.12.5)(typescript@5.4.4): resolution: {integrity: sha512-XvxxLJTKqZojCxaBQ7u92qQLFMMZc4+p9qrIq/9kJDy8DOrEa7P1yx7Tjdc2u2JxIalqT4KOGraVgCE7eCYJyQ==} engines: {node: '>=v18'} requiresBuild: true @@ -2228,8 +2228,8 @@ packages: '@commitlint/resolve-extends': 19.1.0 '@commitlint/types': 19.0.3 chalk: 5.3.0 - cosmiconfig: 9.0.0(typescript@5.4.3) - cosmiconfig-typescript-loader: 5.0.0(@types/node@20.11.30)(cosmiconfig@9.0.0)(typescript@5.4.3) + cosmiconfig: 9.0.0(typescript@5.4.4) + cosmiconfig-typescript-loader: 5.0.0(@types/node@20.12.5)(cosmiconfig@9.0.0)(typescript@5.4.4) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -3326,7 +3326,7 @@ packages: /@manypkg/find-root@1.1.0: resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} dependencies: - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 '@types/node': 12.20.55 find-up: 4.1.0 fs-extra: 8.1.0 @@ -3335,7 +3335,7 @@ packages: /@manypkg/get-packages@1.1.3: resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} dependencies: - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 '@changesets/types': 4.1.0 '@manypkg/find-root': 1.1.0 fs-extra: 8.1.0 @@ -4122,14 +4122,14 @@ packages: dev: false optional: true - /@types/node@20.11.30: - resolution: {integrity: sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw==} + /@types/node@20.11.4: + resolution: {integrity: sha512-6I0fMH8Aoy2lOejL3s4LhyIYX34DPwY8bl5xlNjBvUEk8OHrcuzsFt+Ied4LvJihbtXPM+8zUqdydfIti86v9g==} dependencies: undici-types: 5.26.5 dev: false - /@types/node@20.11.4: - resolution: {integrity: sha512-6I0fMH8Aoy2lOejL3s4LhyIYX34DPwY8bl5xlNjBvUEk8OHrcuzsFt+Ied4LvJihbtXPM+8zUqdydfIti86v9g==} + /@types/node@20.12.5: + resolution: {integrity: sha512-BD+BjQ9LS/D8ST9p5uqBxghlN+S42iuNxjsUGjeZobe/ciXzk2qb1B6IXc6AnRLS+yFJRpN2IPEHMzwspfDJNw==} dependencies: undici-types: 5.26.5 dev: false @@ -5367,7 +5367,7 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.2 + es-abstract: 1.23.3 es-shim-unscopables: 1.0.2 dev: true @@ -5391,7 +5391,7 @@ packages: array-buffer-byte-length: 1.0.1 call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.2 + es-abstract: 1.23.3 es-errors: 1.3.0 get-intrinsic: 1.2.4 is-array-buffer: 3.0.4 @@ -6132,13 +6132,13 @@ packages: engines: {node: '>=0.10.0'} dev: true - /commitizen@4.3.0(@types/node@20.11.30)(typescript@5.4.3): + /commitizen@4.3.0(@types/node@20.12.5)(typescript@5.4.4): resolution: {integrity: sha512-H0iNtClNEhT0fotHvGV3E9tDejDeS04sN1veIebsKYGMuGscFaswRoYJKmT3eW85eIJAs0F28bG2+a/9wCOfPw==} engines: {node: '>= 12'} hasBin: true dependencies: cachedir: 2.3.0 - cz-conventional-changelog: 3.3.0(@types/node@20.11.30)(typescript@5.4.3) + cz-conventional-changelog: 3.3.0(@types/node@20.12.5)(typescript@5.4.4) dedent: 0.7.0 detect-indent: 6.1.0 find-node-modules: 2.1.3 @@ -6283,11 +6283,11 @@ packages: dependencies: '@types/node': 16.11.7 cosmiconfig: 8.2.0 - ts-node: 10.9.1(@types/node@20.11.30)(typescript@5.4.3) + ts-node: 10.9.1(@types/node@20.12.5)(typescript@5.4.4) typescript: 5.2.2 dev: false - /cosmiconfig-typescript-loader@5.0.0(@types/node@20.11.30)(cosmiconfig@9.0.0)(typescript@5.4.3): + /cosmiconfig-typescript-loader@5.0.0(@types/node@20.12.5)(cosmiconfig@9.0.0)(typescript@5.4.4): resolution: {integrity: sha512-+8cK7jRAReYkMwMiG+bxhcNKiHJDM6bR9FD/nGBXOWdMLuYawjF5cGrtLilJ+LGd3ZjCXnJjR5DkfWPoIVlqJA==} engines: {node: '>=v16'} requiresBuild: true @@ -6296,10 +6296,10 @@ packages: cosmiconfig: '>=8.2' typescript: '>=4' dependencies: - '@types/node': 20.11.30 - cosmiconfig: 9.0.0(typescript@5.4.3) + '@types/node': 20.12.5 + cosmiconfig: 9.0.0(typescript@5.4.4) jiti: 1.21.0 - typescript: 5.4.3 + typescript: 5.4.4 dev: false optional: true @@ -6313,7 +6313,7 @@ packages: path-type: 4.0.0 dev: false - /cosmiconfig@9.0.0(typescript@5.4.3): + /cosmiconfig@9.0.0(typescript@5.4.4): resolution: {integrity: sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==} engines: {node: '>=14'} requiresBuild: true @@ -6327,7 +6327,7 @@ packages: import-fresh: 3.3.0 js-yaml: 4.1.0 parse-json: 5.2.0 - typescript: 5.4.3 + typescript: 5.4.4 dev: false optional: true @@ -6495,18 +6495,18 @@ packages: lodash: 4.17.21 dev: true - /cz-conventional-changelog@3.3.0(@types/node@20.11.30)(typescript@5.4.3): + /cz-conventional-changelog@3.3.0(@types/node@20.12.5)(typescript@5.4.4): resolution: {integrity: sha512-U466fIzU5U22eES5lTNiNbZ+d8dfcHcssH4o7QsdWaCcRs/feIPCxKYSWkYBNs5mny7MvEfwpTLWjvbm94hecw==} engines: {node: '>= 10'} dependencies: chalk: 2.4.2 - commitizen: 4.3.0(@types/node@20.11.30)(typescript@5.4.3) + commitizen: 4.3.0(@types/node@20.12.5)(typescript@5.4.4) conventional-commit-types: 3.0.0 lodash.map: 4.6.0 longest: 2.0.1 word-wrap: 1.2.3 optionalDependencies: - '@commitlint/load': 19.2.0(@types/node@20.11.30)(typescript@5.4.3) + '@commitlint/load': 19.2.0(@types/node@20.12.5)(typescript@5.4.4) transitivePeerDependencies: - '@types/node' - typescript @@ -7255,8 +7255,8 @@ packages: which-typed-array: 1.1.11 dev: true - /es-abstract@1.23.2: - resolution: {integrity: sha512-60s3Xv2T2p1ICykc7c+DNDPLDMm9t4QxCOUU0K9JxiLjM3C1zB9YVdN7tjxrFd4+AkZ8CdX1ovUga4P2+1e+/w==} + /es-abstract@1.23.3: + resolution: {integrity: sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==} engines: {node: '>= 0.4'} dependencies: array-buffer-byte-length: 1.0.1 @@ -7529,7 +7529,7 @@ packages: globby: 11.1.0 dev: false - /esbuild-plugin-d.ts@1.2.2(typescript@5.4.3): + /esbuild-plugin-d.ts@1.2.2(typescript@5.4.4): resolution: {integrity: sha512-ZmJTjICZYDx5GbTsMHWKdR7CVllc0zMTM7SX7u2o8n8y6R1iez5r6Ei4ybZXSAqrXN/chD0s4B0mqQxUhiYo4g==} engines: {node: '>=12.0.0'} peerDependencies: @@ -7537,7 +7537,7 @@ packages: dependencies: chalk: 4.1.2 lodash.merge: 4.6.2 - typescript: 5.4.3 + typescript: 5.4.4 dev: false /esbuild-plugin-ifdef@1.0.1: @@ -12286,7 +12286,7 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.2 + es-abstract: 1.23.3 es-object-atoms: 1.0.0 dev: true @@ -12646,7 +12646,7 @@ packages: code-block-writer: 12.0.0 dev: false - /ts-node@10.9.1(@types/node@20.11.30)(typescript@5.4.3): + /ts-node@10.9.1(@types/node@20.12.5)(typescript@5.4.4): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -12665,14 +12665,14 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.11.30 + '@types/node': 20.12.5 acorn: 8.8.2 acorn-walk: 8.2.0 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.4.3 + typescript: 5.4.4 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 dev: false @@ -12744,65 +12744,65 @@ packages: yargs: 17.7.2 dev: true - /turbo-darwin-64@1.13.0: - resolution: {integrity: sha512-ctHeJXtQgBcgxnCXwrJTGiq57HtwF7zWz5NTuSv//5yeU01BtQIt62ArKfjudOhRefWJbX3Z5srn88XTb9hfww==} + /turbo-darwin-64@1.13.2: + resolution: {integrity: sha512-CCSuD8CfmtncpohCuIgq7eAzUas0IwSbHfI8/Q3vKObTdXyN8vAo01gwqXjDGpzG9bTEVedD0GmLbD23dR0MLA==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-darwin-arm64@1.13.0: - resolution: {integrity: sha512-/Q9/pNFkF9w83tNxwMpgapwLYdQ12p8mpty2YQRoUiS9ClWkcqe136jR0mtuMqzlNlpREOFZaoyIthjt6Sdo0g==} + /turbo-darwin-arm64@1.13.2: + resolution: {integrity: sha512-0HySm06/D2N91rJJ89FbiI/AodmY8B3WDSFTVEpu2+8spUw7hOJ8okWOT0e5iGlyayUP9gr31eOeL3VFZkpfCw==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-linux-64@1.13.0: - resolution: {integrity: sha512-hgbT7o020BGV4L7Sd8hhFTd5zVKPKxbsr0dPfel/9NkdTmptz2aGZ0Vb2MAa18SY3XaCQpDxmdYuOzvvRpo5ZA==} + /turbo-linux-64@1.13.2: + resolution: {integrity: sha512-7HnibgbqZrjn4lcfIouzlPu8ZHSBtURG4c7Bedu7WJUDeZo+RE1crlrQm8wuwO54S0siYqUqo7GNHxu4IXbioQ==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-linux-arm64@1.13.0: - resolution: {integrity: sha512-WK01i2wDZARrV+HEs495A3hNeGMwQR5suYk7G+ceqqW7b+dOTlQdvUjnI3sg7wAnZPgjafFs/hoBaZdJjVa/nw==} + /turbo-linux-arm64@1.13.2: + resolution: {integrity: sha512-sUq4dbpk6SNKg/Hkwn256Vj2AEYSQdG96repio894h5/LEfauIK2QYiC/xxAeW3WBMc6BngmvNyURIg7ltrePg==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-windows-64@1.13.0: - resolution: {integrity: sha512-hJgSZJZwlWHNwLEthaqJqJWGm4NqF5X/I7vE0sPE4i/jeDl8f0n1hcOkgJkJiNXVxhj+qy/9+4dzbPLKT9imaQ==} + /turbo-windows-64@1.13.2: + resolution: {integrity: sha512-DqzhcrciWq3dpzllJR2VVIyOhSlXYCo4mNEWl98DJ3FZ08PEzcI3ceudlH6F0t/nIcfSItK1bDP39cs7YoZHEA==} cpu: [x64] os: [win32] requiresBuild: true dev: true optional: true - /turbo-windows-arm64@1.13.0: - resolution: {integrity: sha512-L/ErxYoXeq8tmjU/AIGicC9VyBN1zdYw8JlM4yPmMI0pJdY8E4GaYK1IiIazqq7M72lmQhU/WW7fV9FqEktwrw==} + /turbo-windows-arm64@1.13.2: + resolution: {integrity: sha512-WnPMrwfCXxK69CdDfS1/j2DlzcKxSmycgDAqV0XCYpK/812KB0KlvsVAt5PjEbZGXkY88pCJ1BLZHAjF5FcbqA==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /turbo@1.13.0: - resolution: {integrity: sha512-r02GtNmkOPcQvUzVE6lg474QVLyU02r3yh3lUGqrFHf5h5ZEjgDGWILsAUqplVqjri1Y/oOkTssks4CObTAaiw==} + /turbo@1.13.2: + resolution: {integrity: sha512-rX/d9f4MgRT3yK6cERPAkfavIxbpBZowDQpgvkYwGMGDQ0Nvw1nc0NVjruE76GrzXQqoxR1UpnmEP54vBARFHQ==} hasBin: true requiresBuild: true optionalDependencies: - turbo-darwin-64: 1.13.0 - turbo-darwin-arm64: 1.13.0 - turbo-linux-64: 1.13.0 - turbo-linux-arm64: 1.13.0 - turbo-windows-64: 1.13.0 - turbo-windows-arm64: 1.13.0 + turbo-darwin-64: 1.13.2 + turbo-darwin-arm64: 1.13.2 + turbo-linux-64: 1.13.2 + turbo-linux-arm64: 1.13.2 + turbo-windows-64: 1.13.2 + turbo-windows-arm64: 1.13.2 dev: true /twikoo@1.6.22: @@ -12966,8 +12966,8 @@ packages: hasBin: true requiresBuild: true - /typescript@5.4.3: - resolution: {integrity: sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==} + /typescript@5.4.4: + resolution: {integrity: sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw==} engines: {node: '>=14.17'} hasBin: true dev: false