diff --git a/.vitepress/config.mts b/.vitepress/config.mts deleted file mode 100644 index eba67b1..0000000 --- a/.vitepress/config.mts +++ /dev/null @@ -1,52 +0,0 @@ -import { defineConfig } from "vitepress"; -import { BasicSideBar } from "./BasicSideBar.mjs"; -import { EcosystemSideBar } from "./Ecosystem.mjs"; -import { BlogSideBar } from "./Blog.mjs"; - -export default defineConfig({ - title: "ohos-rs", - description: - "A framework for building compiled OpenHarmony SDK in Rust via Node-API(Forked from napi-rs)", - srcDir: "./src", - markdown: { - image: { - lazyLoading: true, - }, - }, - head: [["link", { rel: "icon", href: "/favicon.ico" }]], - themeConfig: { - logo: "/logo.svg", - nav: [ - { text: "Home", link: "/" }, - { text: "Docs", link: "/docs/basic" }, - { text: "Ecosystem", link: "/ecosystem/" }, - { text: "Community", link: "/community/" }, - { text: "Blog", link: "/blog/" }, - { - text: "About", - items: [ - { text: "Logo", link: "/about/" }, - { text: "Issue", link: "https://github.com/ohos-rs/example/issues" }, - ], - }, - ], - sidebar: { - "/docs": BasicSideBar, - "/ecosystem": EcosystemSideBar, - "/blog": BlogSideBar, - "/about": [], - }, - socialLinks: [{ icon: "github", link: "https://github.com/ohos-rs" }], - editLink: { - pattern: - "https://github.com/ohos-rs/ohos-rs.github.io/tree/master/src/:path", - text: "Edit this page on GitHub", - }, - lastUpdated: { - text: "Last updated", - }, - search: { - provider: "local", - }, - }, -}); diff --git a/.vitepress/config.ts b/.vitepress/config.ts new file mode 100644 index 0000000..4f5554f --- /dev/null +++ b/.vitepress/config.ts @@ -0,0 +1,11 @@ +import { defineConfig } from "vitepress"; +import { shared } from "./shared"; +import { en, zh } from "./i18n"; + +export default defineConfig({ + ...shared, + locales: { + root: { label: "简体中文", ...zh }, + en: { label: "English", ...en }, + }, +}); diff --git a/.vitepress/i18n/en/BasicSideBar.ts b/.vitepress/i18n/en/BasicSideBar.ts new file mode 100644 index 0000000..83e1c09 --- /dev/null +++ b/.vitepress/i18n/en/BasicSideBar.ts @@ -0,0 +1,43 @@ +import { DefaultTheme } from "vitepress"; + +export const BasicSideBar: DefaultTheme.SidebarItem[] = [ + { + text: "Basic", + link: "/en/docs/basic", + items: [ + { text: "Quick Start", link: "/en/docs/basic/quick-start" }, + { text: "Simple Project", link: "/en/docs/basic/simple-project" }, + ], + }, + { + text: "Cli", + collapsed: false, + items: [ + { text: "Init", link: "/en/docs/cli/init" }, + { text: "Build", link: "/en/docs/cli/build" }, + { text: "Artifact", link: "/en/docs/cli/artifact" }, + ], + }, + { + text: "Usage", + collapsed: false, + items: [ + { text: "Basic", link: "/en/docs/usage/basic" }, + { text: "Task", link: "/en/docs/usage/task" }, + { text: "ThreadSafeFunction", link: "/en/docs/usage/tsfn" }, + ], + }, + { + text: "CD/CD", + collapsed: false, + items: [{ text: "CI", link: "/en/docs/ci/basic.md" }], + }, + { + text: "More", + items: [ + { text: "F & Q", link: "/en/docs/more/f&q" }, + { text: "Known issue", link: "/en/docs/more/known-issue" }, + { text: "EMU-TLS", link: "/en/docs/more/emu-tls" }, + ], + }, +]; diff --git a/.vitepress/i18n/en/Blog.ts b/.vitepress/i18n/en/Blog.ts new file mode 100644 index 0000000..ac00847 --- /dev/null +++ b/.vitepress/i18n/en/Blog.ts @@ -0,0 +1,8 @@ +import { DefaultTheme } from "vitepress"; + +export const BlogSideBar: DefaultTheme.SidebarItem[] = [ + { + text: "2024-05-27", + link: "/en/blog/2024-05-27", + }, +]; diff --git a/.vitepress/i18n/en/Ecosystem.ts b/.vitepress/i18n/en/Ecosystem.ts new file mode 100644 index 0000000..5c56159 --- /dev/null +++ b/.vitepress/i18n/en/Ecosystem.ts @@ -0,0 +1,45 @@ +import { DefaultTheme } from "vitepress"; + +export const EcosystemSideBar: DefaultTheme.SidebarItem[] = [ + { + text: "@ohos-rs", + collapsed: false, + items: [ + { text: "crc32", link: "/en/ecosystem/package/crc32" }, + { text: "jieba", link: "/en/ecosystem/package/jieba" }, + { text: "argon2", link: "/en/ecosystem/package/argon2" }, + { text: "bcrypt", link: "/en/ecosystem/package/bcrypt" }, + { text: "jsonwebtoken", link: "/en/ecosystem/package/jsonwebtoken" }, + { text: "snappy", link: "/en/ecosystem/package/snappy" }, + { text: "xxhash", link: "/en/ecosystem/package/xxhash" }, + { text: "image", link: "/en/ecosystem/package/image" }, + ], + }, + { + text: "Native-binding", + collapsed: false, + items: [ + { text: "hilog", link: "/en/ecosystem/binding/hilog" }, + { text: "init", link: "/en/ecosystem/binding/init" }, + ], + }, + { + text: "Polyfill", + collapsed: false, + items: [ + { text: "AbortController", link: "/en/ecosystem/polyfill/abort-controller" }, + ], + }, + { + text: "Third-Party", + collapsed: false, + items: [ + { text: "OpenSSL", link: "/en/ecosystem/third/openssl" }, + { text: "cURL", link: "/en/ecosystem/third/curl" }, + { text: "MMKV", link: "/en/ecosystem/third/mmkv" }, + { text: "avif", link: "/en/ecosystem/third/avif" }, + { text: "cronet", link: "/en/ecosystem/third/cronet" }, + { text: "BoringSSL", link: "/en/ecosystem/third/boringssl" }, + ], + }, +]; diff --git a/.vitepress/i18n/en/index.ts b/.vitepress/i18n/en/index.ts new file mode 100644 index 0000000..d260ba9 --- /dev/null +++ b/.vitepress/i18n/en/index.ts @@ -0,0 +1,40 @@ +import { defineConfig } from "vitepress"; +import { BasicSideBar } from "./BasicSideBar"; +import { EcosystemSideBar } from "./Ecosystem"; +import { BlogSideBar } from "./Blog"; + +export const en = defineConfig({ + lang: "en-US", + description: + "A framework for building compiled OpenHarmony SDK in Rust via Node-API(Forked from napi-rs)", + themeConfig: { + nav: [ + { text: "Home", link: "/en" }, + { text: "Docs", link: "/en/docs/basic" }, + { text: "Ecosystem", link: "/en/ecosystem/" }, + { text: "Community", link: "/en/community/" }, + { text: "Blog", link: "/en/blog/" }, + { + text: "About", + items: [ + { text: "Logo", link: "/en/about/" }, + { text: "Issue", link: "https://github.com/ohos-rs/example/issues" }, + ], + }, + ], + sidebar: { + "/en/docs": BasicSideBar, + "/en/ecosystem": EcosystemSideBar, + "/en/blog": BlogSideBar, + "/en/about": [], + }, + editLink: { + pattern: + "https://github.com/ohos-rs/ohos-rs.github.io/tree/master/src/:path", + text: "Edit this page on GitHub", + }, + lastUpdated: { + text: "Last updated", + }, + }, +}); diff --git a/.vitepress/i18n/index.ts b/.vitepress/i18n/index.ts new file mode 100644 index 0000000..279ddd2 --- /dev/null +++ b/.vitepress/i18n/index.ts @@ -0,0 +1,2 @@ +export * from './en'; +export * from './zh'; \ No newline at end of file diff --git a/.vitepress/BasicSideBar.mts b/.vitepress/i18n/zh/BasicSideBar.ts similarity index 100% rename from .vitepress/BasicSideBar.mts rename to .vitepress/i18n/zh/BasicSideBar.ts diff --git a/.vitepress/Blog.mts b/.vitepress/i18n/zh/Blog.ts similarity index 100% rename from .vitepress/Blog.mts rename to .vitepress/i18n/zh/Blog.ts diff --git a/.vitepress/Ecosystem.mts b/.vitepress/i18n/zh/Ecosystem.ts similarity index 100% rename from .vitepress/Ecosystem.mts rename to .vitepress/i18n/zh/Ecosystem.ts diff --git a/.vitepress/i18n/zh/index.ts b/.vitepress/i18n/zh/index.ts new file mode 100644 index 0000000..4ee3272 --- /dev/null +++ b/.vitepress/i18n/zh/index.ts @@ -0,0 +1,40 @@ +import { defineConfig } from "vitepress"; +import { BasicSideBar } from "./BasicSideBar"; +import { EcosystemSideBar } from "./Ecosystem"; +import { BlogSideBar } from "./Blog"; + +export const zh = defineConfig({ + lang: 'zh-Hans', + description: + "基于 Rust 实现的鸿蒙原生模块开发框架(基于 napi-rs 实现)", + themeConfig: { + nav: [ + { text: "主页", link: "/" }, + { text: "文档", link: "/docs/basic" }, + { text: "生态", link: "/ecosystem/" }, + { text: "社区", link: "/community/" }, + { text: "博客", link: "/blog/" }, + { + text: "关于", + items: [ + { text: "Logo", link: "/about/" }, + { text: "Issue", link: "https://github.com/ohos-rs/example/issues" }, + ], + }, + ], + sidebar: { + "/docs": BasicSideBar, + "/ecosystem": EcosystemSideBar, + "/blog": BlogSideBar, + "/about": [], + }, + editLink: { + pattern: + "https://github.com/ohos-rs/ohos-rs.github.io/tree/master/src/:path", + text: "编辑本页", + }, + lastUpdated: { + text: "最新更新于", + }, + }, +}); diff --git a/.vitepress/shared.ts b/.vitepress/shared.ts new file mode 100644 index 0000000..0de4f32 --- /dev/null +++ b/.vitepress/shared.ts @@ -0,0 +1,19 @@ +import { defineConfig } from "vitepress"; + +export const shared = defineConfig({ + title: "ohos-rs", + srcDir: "./src", + markdown: { + image: { + lazyLoading: true, + }, + }, + head: [["link", { rel: "icon", href: "/favicon.ico" }]], + themeConfig: { + logo: "/logo.svg", + socialLinks: [{ icon: "github", link: "https://github.com/ohos-rs" }], + search: { + provider: "local", + }, + }, +}); diff --git a/package-lock.json b/package-lock.json index d68f74f..34791f4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,8 +5,8 @@ "packages": { "": { "devDependencies": { - "@biomejs/biome": "^1.6.4", - "vitepress": "^1.1.0" + "@biomejs/biome": "^1.8.1", + "vitepress": "^1.2.3" } }, "node_modules/@algolia/autocomplete-core": { @@ -203,9 +203,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.4.tgz", - "integrity": "sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -215,9 +215,9 @@ } }, "node_modules/@biomejs/biome": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-1.6.4.tgz", - "integrity": "sha512-3groVd2oWsLC0ZU+XXgHSNbq31lUcOCBkCcA7sAQGBopHcmL+jmmdoWlY3S61zIh+f2mqQTQte1g6PZKb3JJjA==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-1.8.1.tgz", + "integrity": "sha512-fQXGfvq6DIXem12dGQCM2tNF+vsNHH1qs3C7WeOu75Pd0trduoTmoO7G4ntLJ2qDs5wuw981H+cxQhi1uHnAtA==", "dev": true, "hasInstallScript": true, "bin": { @@ -231,20 +231,20 @@ "url": "https://opencollective.com/biome" }, "optionalDependencies": { - "@biomejs/cli-darwin-arm64": "1.6.4", - "@biomejs/cli-darwin-x64": "1.6.4", - "@biomejs/cli-linux-arm64": "1.6.4", - "@biomejs/cli-linux-arm64-musl": "1.6.4", - "@biomejs/cli-linux-x64": "1.6.4", - "@biomejs/cli-linux-x64-musl": "1.6.4", - "@biomejs/cli-win32-arm64": "1.6.4", - "@biomejs/cli-win32-x64": "1.6.4" + "@biomejs/cli-darwin-arm64": "1.8.1", + "@biomejs/cli-darwin-x64": "1.8.1", + "@biomejs/cli-linux-arm64": "1.8.1", + "@biomejs/cli-linux-arm64-musl": "1.8.1", + "@biomejs/cli-linux-x64": "1.8.1", + "@biomejs/cli-linux-x64-musl": "1.8.1", + "@biomejs/cli-win32-arm64": "1.8.1", + "@biomejs/cli-win32-x64": "1.8.1" } }, "node_modules/@biomejs/cli-darwin-arm64": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.6.4.tgz", - "integrity": "sha512-2WZef8byI9NRzGajGj5RTrroW9BxtfbP9etigW1QGAtwu/6+cLkdPOWRAs7uFtaxBNiKFYA8j/BxV5zeAo5QOQ==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.8.1.tgz", + "integrity": "sha512-XLiB7Uu6GALIOBWzQ2aMD0ru4Ly5/qSeQF7kk3AabzJ/kwsEWSe33iVySBP/SS2qv25cgqNiLksjGcw2bHT3mw==", "cpu": [ "arm64" ], @@ -258,9 +258,9 @@ } }, "node_modules/@biomejs/cli-darwin-x64": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.6.4.tgz", - "integrity": "sha512-uo1zgM7jvzcoDpF6dbGizejDLCqNpUIRkCj/oEK0PB0NUw8re/cn1EnxuOLZqDpn+8G75COLQTOx8UQIBBN/Kg==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.8.1.tgz", + "integrity": "sha512-uMTSxVLMfqkBVqyc25hSn83jBbp+wtWjzM/pHFlKXt3htJuw7FErVGW0nmQ9Sxa9vJ7GcqoltLMl28VQRIMYzg==", "cpu": [ "x64" ], @@ -274,9 +274,9 @@ } }, "node_modules/@biomejs/cli-linux-arm64": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.6.4.tgz", - "integrity": "sha512-wAOieaMNIpLrxGc2/xNvM//CIZg7ueWy3V5A4T7gDZ3OL/Go27EKE59a+vMKsBCYmTt7jFl4yHz0TUkUbodA/w==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.8.1.tgz", + "integrity": "sha512-3SzZRuC/9Oi2P2IBNPsEj0KXxSXUEYRR2kfRF/Ve8QAfGgrt4qnwuWd6QQKKN5R+oYH691qjm+cXBKEcrP1v/Q==", "cpu": [ "arm64" ], @@ -290,9 +290,9 @@ } }, "node_modules/@biomejs/cli-linux-arm64-musl": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.6.4.tgz", - "integrity": "sha512-Hp8Jwt6rjj0wCcYAEN6/cfwrrPLLlGOXZ56Lei4Pt4jy39+UuPeAVFPeclrrCfxyL1wQ2xPrhd/saTHSL6DoJg==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.8.1.tgz", + "integrity": "sha512-UQ8Wc01J0wQL+5AYOc7qkJn20B4PZmQL1KrmDZh7ot0DvD6aX4+8mmfd/dG5b6Zjo/44QvCKcvkFGCMRYuhWZA==", "cpu": [ "arm64" ], @@ -306,9 +306,9 @@ } }, "node_modules/@biomejs/cli-linux-x64": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-1.6.4.tgz", - "integrity": "sha512-qTWhuIw+/ePvOkjE9Zxf5OqSCYxtAvcTJtVmZT8YQnmY2I62JKNV2m7tf6O5ViKZUOP0mOQ6NgqHKcHH1eT8jw==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-1.8.1.tgz", + "integrity": "sha512-AeBycVdNrTzsyYKEOtR2R0Ph0hCD0sCshcp2aOnfGP0hCZbtFg09D0SdKLbyzKntisY41HxKVrydYiaApp+2uw==", "cpu": [ "x64" ], @@ -322,9 +322,9 @@ } }, "node_modules/@biomejs/cli-linux-x64-musl": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-1.6.4.tgz", - "integrity": "sha512-wqi0hr8KAx5kBO0B+m5u8QqiYFFBJOSJVSuRqTeGWW+GYLVUtXNidykNqf1JsW6jJDpbkSp2xHKE/bTlVaG2Kg==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-1.8.1.tgz", + "integrity": "sha512-fYbP/kNu/rtZ4kKzWVocIdqZOtBSUEg9qUhZaao3dy3CRzafR6u6KDtBeSCnt47O+iLnks1eOR1TUxzr5+QuqA==", "cpu": [ "x64" ], @@ -338,9 +338,9 @@ } }, "node_modules/@biomejs/cli-win32-arm64": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.6.4.tgz", - "integrity": "sha512-Wp3FiEeF6v6C5qMfLkHwf4YsoNHr/n0efvoC8jCKO/kX05OXaVExj+1uVQ1eGT7Pvx0XVm/TLprRO0vq/V6UzA==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.8.1.tgz", + "integrity": "sha512-6tEd1H/iFKpgpE3OIB7oNgW5XkjiVMzMRPL8zYoZ036YfuJ5nMYm9eB9H/y81+8Z76vL48fiYzMPotJwukGPqQ==", "cpu": [ "arm64" ], @@ -354,9 +354,9 @@ } }, "node_modules/@biomejs/cli-win32-x64": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-1.6.4.tgz", - "integrity": "sha512-mz183Di5hTSGP7KjNWEhivcP1wnHLGmOxEROvoFsIxMYtDhzJDad4k5gI/1JbmA0xe4n52vsgqo09tBhrMT/Zg==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-1.8.1.tgz", + "integrity": "sha512-g2H31jJzYmS4jkvl6TiyEjEX+Nv79a5km/xn+5DARTp5MBFzC9gwceusSSB2AkJKqZzY131AiACAWjKrVt5Ijw==", "cpu": [ "x64" ], @@ -418,9 +418,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz", - "integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", "cpu": [ "ppc64" ], @@ -434,9 +434,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz", - "integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", "cpu": [ "arm" ], @@ -450,9 +450,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz", - "integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", "cpu": [ "arm64" ], @@ -466,9 +466,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.2.tgz", - "integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", "cpu": [ "x64" ], @@ -482,9 +482,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz", - "integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", "cpu": [ "arm64" ], @@ -498,9 +498,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz", - "integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", "cpu": [ "x64" ], @@ -514,9 +514,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz", - "integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", "cpu": [ "arm64" ], @@ -530,9 +530,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz", - "integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", "cpu": [ "x64" ], @@ -546,9 +546,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz", - "integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", "cpu": [ "arm" ], @@ -562,9 +562,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz", - "integrity": "sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", "cpu": [ "arm64" ], @@ -578,9 +578,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz", - "integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", "cpu": [ "ia32" ], @@ -594,9 +594,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz", - "integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", "cpu": [ "loong64" ], @@ -610,9 +610,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz", - "integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", "cpu": [ "mips64el" ], @@ -626,9 +626,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz", - "integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", "cpu": [ "ppc64" ], @@ -642,9 +642,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz", - "integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", "cpu": [ "riscv64" ], @@ -658,9 +658,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz", - "integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", "cpu": [ "s390x" ], @@ -674,9 +674,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz", - "integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", "cpu": [ "x64" ], @@ -690,9 +690,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz", - "integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", "cpu": [ "x64" ], @@ -706,9 +706,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz", - "integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", "cpu": [ "x64" ], @@ -722,9 +722,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz", - "integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", "cpu": [ "x64" ], @@ -738,9 +738,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz", - "integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", "cpu": [ "arm64" ], @@ -754,9 +754,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz", - "integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", "cpu": [ "ia32" ], @@ -770,9 +770,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz", - "integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", "cpu": [ "x64" ], @@ -792,9 +792,9 @@ "dev": true }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.14.2.tgz", - "integrity": "sha512-ahxSgCkAEk+P/AVO0vYr7DxOD3CwAQrT0Go9BJyGQ9Ef0QxVOfjDZMiF4Y2s3mLyPrjonchIMH/tbWHucJMykQ==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz", + "integrity": "sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==", "cpu": [ "arm" ], @@ -805,9 +805,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.14.2.tgz", - "integrity": "sha512-lAarIdxZWbFSHFSDao9+I/F5jDaKyCqAPMq5HqnfpBw8dKDiCaaqM0lq5h1pQTLeIqueeay4PieGR5jGZMWprw==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz", + "integrity": "sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==", "cpu": [ "arm64" ], @@ -818,9 +818,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.14.2.tgz", - "integrity": "sha512-SWsr8zEUk82KSqquIMgZEg2GE5mCSfr9sE/thDROkX6pb3QQWPp8Vw8zOq2GyxZ2t0XoSIUlvHDkrf5Gmf7x3Q==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz", + "integrity": "sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==", "cpu": [ "arm64" ], @@ -831,9 +831,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.14.2.tgz", - "integrity": "sha512-o/HAIrQq0jIxJAhgtIvV5FWviYK4WB0WwV91SLUnsliw1lSAoLsmgEEgRWzDguAFeUEUUoIWXiJrPqU7vGiVkA==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz", + "integrity": "sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==", "cpu": [ "x64" ], @@ -844,9 +844,22 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.14.2.tgz", - "integrity": "sha512-nwlJ65UY9eGq91cBi6VyDfArUJSKOYt5dJQBq8xyLhvS23qO+4Nr/RreibFHjP6t+5ap2ohZrUJcHv5zk5ju/g==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz", + "integrity": "sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz", + "integrity": "sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==", "cpu": [ "arm" ], @@ -857,9 +870,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.14.2.tgz", - "integrity": "sha512-Pg5TxxO2IVlMj79+c/9G0LREC9SY3HM+pfAwX7zj5/cAuwrbfj2Wv9JbMHIdPCfQpYsI4g9mE+2Bw/3aeSs2rQ==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz", + "integrity": "sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==", "cpu": [ "arm64" ], @@ -870,9 +883,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.14.2.tgz", - "integrity": "sha512-cAOTjGNm84gc6tS02D1EXtG7tDRsVSDTBVXOLbj31DkwfZwgTPYZ6aafSU7rD/4R2a34JOwlF9fQayuTSkoclA==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz", + "integrity": "sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==", "cpu": [ "arm64" ], @@ -883,9 +896,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.14.2.tgz", - "integrity": "sha512-4RyT6v1kXb7C0fn6zV33rvaX05P0zHoNzaXI/5oFHklfKm602j+N4mn2YvoezQViRLPnxP8M1NaY4s/5kXO5cw==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz", + "integrity": "sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==", "cpu": [ "ppc64" ], @@ -896,9 +909,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.14.2.tgz", - "integrity": "sha512-KNUH6jC/vRGAKSorySTyc/yRYlCwN/5pnMjXylfBniwtJx5O7X17KG/0efj8XM3TZU7raYRXJFFReOzNmL1n1w==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz", + "integrity": "sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==", "cpu": [ "riscv64" ], @@ -909,9 +922,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.14.2.tgz", - "integrity": "sha512-xPV4y73IBEXToNPa3h5lbgXOi/v0NcvKxU0xejiFw6DtIYQqOTMhZ2DN18/HrrP0PmiL3rGtRG9gz1QE8vFKXQ==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz", + "integrity": "sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==", "cpu": [ "s390x" ], @@ -922,9 +935,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.14.2.tgz", - "integrity": "sha512-QBhtr07iFGmF9egrPOWyO5wciwgtzKkYPNLVCFZTmr4TWmY0oY2Dm/bmhHjKRwZoGiaKdNcKhFtUMBKvlchH+Q==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz", + "integrity": "sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==", "cpu": [ "x64" ], @@ -935,9 +948,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.14.2.tgz", - "integrity": "sha512-8zfsQRQGH23O6qazZSFY5jP5gt4cFvRuKTpuBsC1ZnSWxV8ZKQpPqOZIUtdfMOugCcBvFGRa1pDC/tkf19EgBw==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz", + "integrity": "sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==", "cpu": [ "x64" ], @@ -948,9 +961,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.14.2.tgz", - "integrity": "sha512-H4s8UjgkPnlChl6JF5empNvFHp77Jx+Wfy2EtmYPe9G22XV+PMuCinZVHurNe8ggtwoaohxARJZbaH/3xjB/FA==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz", + "integrity": "sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==", "cpu": [ "arm64" ], @@ -961,9 +974,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.14.2.tgz", - "integrity": "sha512-djqpAjm/i8erWYF0K6UY4kRO3X5+T4TypIqw60Q8MTqSBaQNpNXDhxdjpZ3ikgb+wn99svA7jxcXpiyg9MUsdw==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz", + "integrity": "sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==", "cpu": [ "ia32" ], @@ -974,9 +987,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.14.2.tgz", - "integrity": "sha512-teAqzLT0yTYZa8ZP7zhFKEx4cotS8Tkk5XiqNMJhD4CpaWB1BHARE4Qy+RzwnXvSAYv+Q3jAqCVBS+PS+Yee8Q==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz", + "integrity": "sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==", "cpu": [ "x64" ], @@ -987,18 +1000,18 @@ ] }, "node_modules/@shikijs/core": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.3.0.tgz", - "integrity": "sha512-7fedsBfuILDTBmrYZNFI8B6ATTxhQAasUHllHmjvSZPnoq4bULWoTpHwmuQvZ8Aq03/tAa2IGo6RXqWtHdWaCA==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.7.0.tgz", + "integrity": "sha512-O6j27b7dGmJbR3mjwh/aHH8Ld+GQvA0OQsNO43wKWnqbAae3AYXrhFyScHGX8hXZD6vX2ngjzDFkZY5srtIJbQ==", "dev": true }, "node_modules/@shikijs/transformers": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@shikijs/transformers/-/transformers-1.3.0.tgz", - "integrity": "sha512-3mlpg2I9CjhjE96dEWQOGeCWoPcyTov3s4aAsHmgvnTHa8MBknEnCQy8/xivJPSpD+olqOqIEoHnLfbNJK29AA==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@shikijs/transformers/-/transformers-1.7.0.tgz", + "integrity": "sha512-QX3TP+CS4yYLt4X4Dk7wT0MsC7yweTYHMAAKY+ay+uuR9yRdFae/h+hivny2O+YixJHfZl57xtiZfWSrHdyVhQ==", "dev": true, "dependencies": { - "shiki": "1.3.0" + "shiki": "1.7.0" } }, "node_modules/@types/estree": { @@ -1008,25 +1021,25 @@ "dev": true }, "node_modules/@types/linkify-it": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.5.tgz", - "integrity": "sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==", "dev": true }, "node_modules/@types/markdown-it": { - "version": "13.0.7", - "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-13.0.7.tgz", - "integrity": "sha512-U/CBi2YUUcTHBt5tjO2r5QV/x0Po6nsYwQU4Y04fBS6vfoImaiZ6f8bi3CjTCxBPQSO1LMyUqkByzi8AidyxfA==", + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.1.1.tgz", + "integrity": "sha512-4NpsnpYl2Gt1ljyBGrKMxFYAYvpqbnnkgP/i/g+NLpjEUa3obn1XJCur9YbEXKDAkaXqsR1LbDnGEJ0MmKFxfg==", "dev": true, "dependencies": { - "@types/linkify-it": "*", - "@types/mdurl": "*" + "@types/linkify-it": "^5", + "@types/mdurl": "^2" } }, "node_modules/@types/mdurl": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.5.tgz", - "integrity": "sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==", "dev": true }, "node_modules/@types/web-bluetooth": { @@ -1036,9 +1049,9 @@ "dev": true }, "node_modules/@vitejs/plugin-vue": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.0.4.tgz", - "integrity": "sha512-WS3hevEszI6CEVEx28F8RjTX97k3KsrcY6kvTg7+Whm5y3oYvcqzVeGCU3hxSAn4uY2CLCkeokkGKpoctccilQ==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.0.5.tgz", + "integrity": "sha512-LOjm7XeIimLBZyzinBQ6OSm3UBCNVCpLkxGC0oWmm2YPzVZoxMsdvNVimLTBzpAnR9hl/yn1SHGuRfe6/Td9rQ==", "dev": true, "engines": { "node": "^18.0.0 || >=20.0.0" @@ -1049,157 +1062,160 @@ } }, "node_modules/@vue/compiler-core": { - "version": "3.4.21", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.21.tgz", - "integrity": "sha512-MjXawxZf2SbZszLPYxaFCjxfibYrzr3eYbKxwpLR9EQN+oaziSu3qKVbwBERj1IFIB8OLUewxB5m/BFzi613og==", + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.29.tgz", + "integrity": "sha512-TFKiRkKKsRCKvg/jTSSKK7mYLJEQdUiUfykbG49rubC9SfDyvT2JrzTReopWlz2MxqeLyxh9UZhvxEIBgAhtrg==", "dev": true, "dependencies": { - "@babel/parser": "^7.23.9", - "@vue/shared": "3.4.21", + "@babel/parser": "^7.24.7", + "@vue/shared": "3.4.29", "entities": "^4.5.0", "estree-walker": "^2.0.2", - "source-map-js": "^1.0.2" + "source-map-js": "^1.2.0" } }, "node_modules/@vue/compiler-dom": { - "version": "3.4.21", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.21.tgz", - "integrity": "sha512-IZC6FKowtT1sl0CR5DpXSiEB5ayw75oT2bma1BEhV7RRR1+cfwLrxc2Z8Zq/RGFzJ8w5r9QtCOvTjQgdn0IKmA==", + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.29.tgz", + "integrity": "sha512-A6+iZ2fKIEGnfPJejdB7b1FlJzgiD+Y/sxxKwJWg1EbJu6ZPgzaPQQ51ESGNv0CP6jm6Z7/pO6Ia8Ze6IKrX7w==", "dev": true, "dependencies": { - "@vue/compiler-core": "3.4.21", - "@vue/shared": "3.4.21" + "@vue/compiler-core": "3.4.29", + "@vue/shared": "3.4.29" } }, "node_modules/@vue/compiler-sfc": { - "version": "3.4.21", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.21.tgz", - "integrity": "sha512-me7epoTxYlY+2CUM7hy9PCDdpMPfIwrOvAXud2Upk10g4YLv9UBW7kL798TvMeDhPthkZ0CONNrK2GoeI1ODiQ==", + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.29.tgz", + "integrity": "sha512-zygDcEtn8ZimDlrEQyLUovoWgKQic6aEQqRXce2WXBvSeHbEbcAsXyCk9oG33ZkyWH4sl9D3tkYc1idoOkdqZQ==", "dev": true, "dependencies": { - "@babel/parser": "^7.23.9", - "@vue/compiler-core": "3.4.21", - "@vue/compiler-dom": "3.4.21", - "@vue/compiler-ssr": "3.4.21", - "@vue/shared": "3.4.21", + "@babel/parser": "^7.24.7", + "@vue/compiler-core": "3.4.29", + "@vue/compiler-dom": "3.4.29", + "@vue/compiler-ssr": "3.4.29", + "@vue/shared": "3.4.29", "estree-walker": "^2.0.2", - "magic-string": "^0.30.7", - "postcss": "^8.4.35", - "source-map-js": "^1.0.2" + "magic-string": "^0.30.10", + "postcss": "^8.4.38", + "source-map-js": "^1.2.0" } }, "node_modules/@vue/compiler-ssr": { - "version": "3.4.21", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.21.tgz", - "integrity": "sha512-M5+9nI2lPpAsgXOGQobnIueVqc9sisBFexh5yMIMRAPYLa7+5wEJs8iqOZc1WAa9WQbx9GR2twgznU8LTIiZ4Q==", + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.29.tgz", + "integrity": "sha512-rFbwCmxJ16tDp3N8XCx5xSQzjhidYjXllvEcqX/lopkoznlNPz3jyy0WGJCyhAaVQK677WWFt3YO/WUEkMMUFQ==", "dev": true, "dependencies": { - "@vue/compiler-dom": "3.4.21", - "@vue/shared": "3.4.21" + "@vue/compiler-dom": "3.4.29", + "@vue/shared": "3.4.29" } }, "node_modules/@vue/devtools-api": { - "version": "7.0.27", - "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-7.0.27.tgz", - "integrity": "sha512-BFCFCusSDcw2UcOFD/QeK7OxD1x2C/m+uAN30Q7jLKECSW53hmz0urzJmX834GuWDZX/hIxkyUKnLLfEIP1c/w==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-7.3.1.tgz", + "integrity": "sha512-yg2OQcnuez906E6/gDROLbUwI554PH5SWJMkomvOfGcPYjNpkK8LEy1pM1wxBtSVSlQbZKqiNgGQFp3Zw+0Jog==", "dev": true, "dependencies": { - "@vue/devtools-kit": "^7.0.27" + "@vue/devtools-kit": "^7.3.1" } }, "node_modules/@vue/devtools-kit": { - "version": "7.0.27", - "resolved": "https://registry.npmjs.org/@vue/devtools-kit/-/devtools-kit-7.0.27.tgz", - "integrity": "sha512-/A5xM38pPCFX5Yhl/lRFAzjyK6VNsH670nww2WbjFKWqlu3I+lMxWKzQkCW6A1V8bduITgl2kHORfg2gTw6QaA==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@vue/devtools-kit/-/devtools-kit-7.3.1.tgz", + "integrity": "sha512-O9LXPo0kC/PGFBRBMvT5PHiSXr6ZdJTshVuGQ1L2mnIZlIBdTjdtCRYQg/OMcEA5JDJPeJT8bnDYBBUbssGjoA==", "dev": true, "dependencies": { - "@vue/devtools-shared": "^7.0.27", + "@vue/devtools-shared": "^7.3.1", + "birpc": "^0.2.17", "hookable": "^5.5.3", "mitt": "^3.0.1", "perfect-debounce": "^1.0.0", - "speakingurl": "^14.0.1" + "speakingurl": "^14.0.1", + "superjson": "^2.2.1" }, "peerDependencies": { "vue": "^3.0.0" } }, "node_modules/@vue/devtools-shared": { - "version": "7.0.27", - "resolved": "https://registry.npmjs.org/@vue/devtools-shared/-/devtools-shared-7.0.27.tgz", - "integrity": "sha512-4VxtmZ6yjhiSloqZZq2UYU0TBGxOJ8GxWvp5OlAH70zYqi0FIAyWGPkOhvfoZ7DKQyv2UU0mmKzFHjsEkelGyQ==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@vue/devtools-shared/-/devtools-shared-7.3.1.tgz", + "integrity": "sha512-TYbJLZwBy5+SliE095T+V0IMwRu+oP7I2KAsDuNtSsjHKITZvrhz2fNEvik9NsTLcEQBBoX81NvdgpoB29JAog==", "dev": true, "dependencies": { "rfdc": "^1.3.1" } }, "node_modules/@vue/reactivity": { - "version": "3.4.21", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.21.tgz", - "integrity": "sha512-UhenImdc0L0/4ahGCyEzc/pZNwVgcglGy9HVzJ1Bq2Mm9qXOpP8RyNTjookw/gOCUlXSEtuZ2fUg5nrHcoqJcw==", + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.29.tgz", + "integrity": "sha512-w8+KV+mb1a8ornnGQitnMdLfE0kXmteaxLdccm2XwdFxXst4q/Z7SEboCV5SqJNpZbKFeaRBBJBhW24aJyGINg==", "dev": true, "dependencies": { - "@vue/shared": "3.4.21" + "@vue/shared": "3.4.29" } }, "node_modules/@vue/runtime-core": { - "version": "3.4.21", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.21.tgz", - "integrity": "sha512-pQthsuYzE1XcGZznTKn73G0s14eCJcjaLvp3/DKeYWoFacD9glJoqlNBxt3W2c5S40t6CCcpPf+jG01N3ULyrA==", + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.29.tgz", + "integrity": "sha512-s8fmX3YVR/Rk5ig0ic0NuzTNjK2M7iLuVSZyMmCzN/+Mjuqqif1JasCtEtmtoJWF32pAtUjyuT2ljNKNLeOmnQ==", "dev": true, "dependencies": { - "@vue/reactivity": "3.4.21", - "@vue/shared": "3.4.21" + "@vue/reactivity": "3.4.29", + "@vue/shared": "3.4.29" } }, "node_modules/@vue/runtime-dom": { - "version": "3.4.21", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.21.tgz", - "integrity": "sha512-gvf+C9cFpevsQxbkRBS1NpU8CqxKw0ebqMvLwcGQrNpx6gqRDodqKqA+A2VZZpQ9RpK2f9yfg8VbW/EpdFUOJw==", + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.29.tgz", + "integrity": "sha512-gI10atCrtOLf/2MPPMM+dpz3NGulo9ZZR9d1dWo4fYvm+xkfvRrw1ZmJ7mkWtiJVXSsdmPbcK1p5dZzOCKDN0g==", "dev": true, "dependencies": { - "@vue/runtime-core": "3.4.21", - "@vue/shared": "3.4.21", + "@vue/reactivity": "3.4.29", + "@vue/runtime-core": "3.4.29", + "@vue/shared": "3.4.29", "csstype": "^3.1.3" } }, "node_modules/@vue/server-renderer": { - "version": "3.4.21", - "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.21.tgz", - "integrity": "sha512-aV1gXyKSN6Rz+6kZ6kr5+Ll14YzmIbeuWe7ryJl5muJ4uwSwY/aStXTixx76TwkZFJLm1aAlA/HSWEJ4EyiMkg==", + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.29.tgz", + "integrity": "sha512-HMLCmPI2j/k8PVkSBysrA2RxcxC5DgBiCdj7n7H2QtR8bQQPqKAe8qoaxLcInzouBmzwJ+J0x20ygN/B5mYBng==", "dev": true, "dependencies": { - "@vue/compiler-ssr": "3.4.21", - "@vue/shared": "3.4.21" + "@vue/compiler-ssr": "3.4.29", + "@vue/shared": "3.4.29" }, "peerDependencies": { - "vue": "3.4.21" + "vue": "3.4.29" } }, "node_modules/@vue/shared": { - "version": "3.4.21", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.21.tgz", - "integrity": "sha512-PuJe7vDIi6VYSinuEbUIQgMIRZGgM8e4R+G+/dQTk0X1NEdvgvvgv7m+rfmDH1gZzyA1OjjoWskvHlfRNfQf3g==", + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.29.tgz", + "integrity": "sha512-hQ2gAQcBO/CDpC82DCrinJNgOHI2v+FA7BDW4lMSPeBpQ7sRe2OLHWe5cph1s7D8DUQAwRt18dBDfJJ220APEA==", "dev": true }, "node_modules/@vueuse/core": { - "version": "10.9.0", - "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.9.0.tgz", - "integrity": "sha512-/1vjTol8SXnx6xewDEKfS0Ra//ncg4Hb0DaZiwKf7drgfMsKFExQ+FnnENcN6efPen+1kIzhLQoGSy0eDUVOMg==", + "version": "10.11.0", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.11.0.tgz", + "integrity": "sha512-x3sD4Mkm7PJ+pcq3HX8PLPBadXCAlSDR/waK87dz0gQE+qJnaaFhc/dZVfJz+IUYzTMVGum2QlR7ImiJQN4s6g==", "dev": true, "dependencies": { "@types/web-bluetooth": "^0.0.20", - "@vueuse/metadata": "10.9.0", - "@vueuse/shared": "10.9.0", - "vue-demi": ">=0.14.7" + "@vueuse/metadata": "10.11.0", + "@vueuse/shared": "10.11.0", + "vue-demi": ">=0.14.8" }, "funding": { "url": "https://github.com/sponsors/antfu" } }, "node_modules/@vueuse/core/node_modules/vue-demi": { - "version": "0.14.7", - "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.7.tgz", - "integrity": "sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==", + "version": "0.14.8", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.8.tgz", + "integrity": "sha512-Uuqnk9YE9SsWeReYqK2alDI5YzciATE0r2SkA6iMAtuXvNTMNACJLJEXNXaEy94ECuBe4Sk6RzRU80kjdbIo1Q==", "dev": true, "hasInstallScript": true, "bin": { @@ -1223,31 +1239,31 @@ } }, "node_modules/@vueuse/integrations": { - "version": "10.9.0", - "resolved": "https://registry.npmjs.org/@vueuse/integrations/-/integrations-10.9.0.tgz", - "integrity": "sha512-acK+A01AYdWSvL4BZmCoJAcyHJ6EqhmkQEXbQLwev1MY7NBnS+hcEMx/BzVoR9zKI+UqEPMD9u6PsyAuiTRT4Q==", + "version": "10.11.0", + "resolved": "https://registry.npmjs.org/@vueuse/integrations/-/integrations-10.11.0.tgz", + "integrity": "sha512-Pp6MtWEIr+NDOccWd8j59Kpjy5YDXogXI61Kb1JxvSfVBO8NzFQkmrKmSZz47i+ZqHnIzxaT38L358yDHTncZg==", "dev": true, "dependencies": { - "@vueuse/core": "10.9.0", - "@vueuse/shared": "10.9.0", - "vue-demi": ">=0.14.7" + "@vueuse/core": "10.11.0", + "@vueuse/shared": "10.11.0", + "vue-demi": ">=0.14.8" }, "funding": { "url": "https://github.com/sponsors/antfu" }, "peerDependencies": { - "async-validator": "*", - "axios": "*", - "change-case": "*", - "drauu": "*", - "focus-trap": "*", - "fuse.js": "*", - "idb-keyval": "*", - "jwt-decode": "*", - "nprogress": "*", - "qrcode": "*", - "sortablejs": "*", - "universal-cookie": "*" + "async-validator": "^4", + "axios": "^1", + "change-case": "^4", + "drauu": "^0.3", + "focus-trap": "^7", + "fuse.js": "^6", + "idb-keyval": "^6", + "jwt-decode": "^3", + "nprogress": "^0.2", + "qrcode": "^1.5", + "sortablejs": "^1", + "universal-cookie": "^6" }, "peerDependenciesMeta": { "async-validator": { @@ -1289,9 +1305,9 @@ } }, "node_modules/@vueuse/integrations/node_modules/vue-demi": { - "version": "0.14.7", - "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.7.tgz", - "integrity": "sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==", + "version": "0.14.8", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.8.tgz", + "integrity": "sha512-Uuqnk9YE9SsWeReYqK2alDI5YzciATE0r2SkA6iMAtuXvNTMNACJLJEXNXaEy94ECuBe4Sk6RzRU80kjdbIo1Q==", "dev": true, "hasInstallScript": true, "bin": { @@ -1315,30 +1331,30 @@ } }, "node_modules/@vueuse/metadata": { - "version": "10.9.0", - "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.9.0.tgz", - "integrity": "sha512-iddNbg3yZM0X7qFY2sAotomgdHK7YJ6sKUvQqbvwnf7TmaVPxS4EJydcNsVejNdS8iWCtDk+fYXr7E32nyTnGA==", + "version": "10.11.0", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.11.0.tgz", + "integrity": "sha512-kQX7l6l8dVWNqlqyN3ePW3KmjCQO3ZMgXuBMddIu83CmucrsBfXlH+JoviYyRBws/yLTQO8g3Pbw+bdIoVm4oQ==", "dev": true, "funding": { "url": "https://github.com/sponsors/antfu" } }, "node_modules/@vueuse/shared": { - "version": "10.9.0", - "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.9.0.tgz", - "integrity": "sha512-Uud2IWncmAfJvRaFYzv5OHDli+FbOzxiVEQdLCKQKLyhz94PIyFC3CHcH7EDMwIn8NPtD06+PNbC/PiO0LGLtw==", + "version": "10.11.0", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.11.0.tgz", + "integrity": "sha512-fyNoIXEq3PfX1L3NkNhtVQUSRtqYwJtJg+Bp9rIzculIZWHTkKSysujrOk2J+NrRulLTQH9+3gGSfYLWSEWU1A==", "dev": true, "dependencies": { - "vue-demi": ">=0.14.7" + "vue-demi": ">=0.14.8" }, "funding": { "url": "https://github.com/sponsors/antfu" } }, "node_modules/@vueuse/shared/node_modules/vue-demi": { - "version": "0.14.7", - "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.7.tgz", - "integrity": "sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==", + "version": "0.14.8", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.8.tgz", + "integrity": "sha512-Uuqnk9YE9SsWeReYqK2alDI5YzciATE0r2SkA6iMAtuXvNTMNACJLJEXNXaEy94ECuBe4Sk6RzRU80kjdbIo1Q==", "dev": true, "hasInstallScript": true, "bin": { @@ -1384,6 +1400,30 @@ "@algolia/transporter": "4.23.3" } }, + "node_modules/birpc": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/birpc/-/birpc-0.2.17.tgz", + "integrity": "sha512-+hkTxhot+dWsLpp3gia5AkVHIsKlZybNT5gIYiDlNzJrmYPcTM9k5/w2uaj3IPpd7LlEYpmCj4Jj1nC41VhDFg==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/copy-anything": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-3.0.5.tgz", + "integrity": "sha512-yCEafptTtb4bk7GLEQoM8KVJpxAfdBJYaXyzQEgQQQgYrZiDp8SJmGKlYza6CYjEDNstAdNdKA3UuoULlEbS6w==", + "dev": true, + "dependencies": { + "is-what": "^4.1.8" + }, + "engines": { + "node": ">=12.13" + }, + "funding": { + "url": "https://github.com/sponsors/mesqueeb" + } + }, "node_modules/csstype": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", @@ -1403,9 +1443,9 @@ } }, "node_modules/esbuild": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz", - "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", "dev": true, "hasInstallScript": true, "bin": { @@ -1415,29 +1455,29 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.20.2", - "@esbuild/android-arm": "0.20.2", - "@esbuild/android-arm64": "0.20.2", - "@esbuild/android-x64": "0.20.2", - "@esbuild/darwin-arm64": "0.20.2", - "@esbuild/darwin-x64": "0.20.2", - "@esbuild/freebsd-arm64": "0.20.2", - "@esbuild/freebsd-x64": "0.20.2", - "@esbuild/linux-arm": "0.20.2", - "@esbuild/linux-arm64": "0.20.2", - "@esbuild/linux-ia32": "0.20.2", - "@esbuild/linux-loong64": "0.20.2", - "@esbuild/linux-mips64el": "0.20.2", - "@esbuild/linux-ppc64": "0.20.2", - "@esbuild/linux-riscv64": "0.20.2", - "@esbuild/linux-s390x": "0.20.2", - "@esbuild/linux-x64": "0.20.2", - "@esbuild/netbsd-x64": "0.20.2", - "@esbuild/openbsd-x64": "0.20.2", - "@esbuild/sunos-x64": "0.20.2", - "@esbuild/win32-arm64": "0.20.2", - "@esbuild/win32-ia32": "0.20.2", - "@esbuild/win32-x64": "0.20.2" + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" } }, "node_modules/estree-walker": { @@ -1475,16 +1515,25 @@ "integrity": "sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==", "dev": true }, + "node_modules/is-what": { + "version": "4.1.16", + "resolved": "https://registry.npmjs.org/is-what/-/is-what-4.1.16.tgz", + "integrity": "sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A==", + "dev": true, + "engines": { + "node": ">=12.13" + }, + "funding": { + "url": "https://github.com/sponsors/mesqueeb" + } + }, "node_modules/magic-string": { - "version": "0.30.9", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.9.tgz", - "integrity": "sha512-S1+hd+dIrC8EZqKyT9DstTH/0Z+f76kmmvZnkfQVmOpDEF9iVgdYif3Q/pIWHmCoo59bQVGW0kVL3e2nl+9+Sw==", + "version": "0.30.10", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", + "integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==", "dev": true, "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15" - }, - "engines": { - "node": ">=12" } }, "node_modules/mark.js": { @@ -1530,9 +1579,9 @@ "dev": true }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", "dev": true }, "node_modules/postcss": { @@ -1574,15 +1623,15 @@ } }, "node_modules/rfdc": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.1.tgz", - "integrity": "sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", + "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", "dev": true }, "node_modules/rollup": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.14.2.tgz", - "integrity": "sha512-WkeoTWvuBoFjFAhsEOHKRoZ3r9GfTyhh7Vff1zwebEFLEFjT1lG3784xEgKiTa7E+e70vsC81roVL2MP4tgEEQ==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.0.tgz", + "integrity": "sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==", "dev": true, "dependencies": { "@types/estree": "1.0.5" @@ -1595,21 +1644,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.14.2", - "@rollup/rollup-android-arm64": "4.14.2", - "@rollup/rollup-darwin-arm64": "4.14.2", - "@rollup/rollup-darwin-x64": "4.14.2", - "@rollup/rollup-linux-arm-gnueabihf": "4.14.2", - "@rollup/rollup-linux-arm64-gnu": "4.14.2", - "@rollup/rollup-linux-arm64-musl": "4.14.2", - "@rollup/rollup-linux-powerpc64le-gnu": "4.14.2", - "@rollup/rollup-linux-riscv64-gnu": "4.14.2", - "@rollup/rollup-linux-s390x-gnu": "4.14.2", - "@rollup/rollup-linux-x64-gnu": "4.14.2", - "@rollup/rollup-linux-x64-musl": "4.14.2", - "@rollup/rollup-win32-arm64-msvc": "4.14.2", - "@rollup/rollup-win32-ia32-msvc": "4.14.2", - "@rollup/rollup-win32-x64-msvc": "4.14.2", + "@rollup/rollup-android-arm-eabi": "4.18.0", + "@rollup/rollup-android-arm64": "4.18.0", + "@rollup/rollup-darwin-arm64": "4.18.0", + "@rollup/rollup-darwin-x64": "4.18.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.18.0", + "@rollup/rollup-linux-arm-musleabihf": "4.18.0", + "@rollup/rollup-linux-arm64-gnu": "4.18.0", + "@rollup/rollup-linux-arm64-musl": "4.18.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.18.0", + "@rollup/rollup-linux-riscv64-gnu": "4.18.0", + "@rollup/rollup-linux-s390x-gnu": "4.18.0", + "@rollup/rollup-linux-x64-gnu": "4.18.0", + "@rollup/rollup-linux-x64-musl": "4.18.0", + "@rollup/rollup-win32-arm64-msvc": "4.18.0", + "@rollup/rollup-win32-ia32-msvc": "4.18.0", + "@rollup/rollup-win32-x64-msvc": "4.18.0", "fsevents": "~2.3.2" } }, @@ -1621,12 +1671,12 @@ "peer": true }, "node_modules/shiki": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.3.0.tgz", - "integrity": "sha512-9aNdQy/etMXctnPzsje1h1XIGm9YfRcSksKOGqZWXA/qP9G18/8fpz5Bjpma8bOgz3tqIpjERAd6/lLjFyzoww==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.7.0.tgz", + "integrity": "sha512-H5pMn4JA7ayx8H0qOz1k2qANq6mZVCMl1gKLK6kWIrv1s2Ial4EmD4s4jE8QB5Dw03d/oCQUxc24sotuyR5byA==", "dev": true, "dependencies": { - "@shikijs/core": "1.3.0" + "@shikijs/core": "1.7.0" } }, "node_modules/source-map-js": { @@ -1647,6 +1697,18 @@ "node": ">=0.10.0" } }, + "node_modules/superjson": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/superjson/-/superjson-2.2.1.tgz", + "integrity": "sha512-8iGv75BYOa0xRJHK5vRLEjE2H/i4lulTjzpUXic3Eg8akftYjkmQDa8JARQ42rlczXyFR3IeRoeFCc7RxHsYZA==", + "dev": true, + "dependencies": { + "copy-anything": "^3.0.2" + }, + "engines": { + "node": ">=16" + } + }, "node_modules/tabbable": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.2.0.tgz", @@ -1654,12 +1716,12 @@ "dev": true }, "node_modules/vite": { - "version": "5.2.8", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.8.tgz", - "integrity": "sha512-OyZR+c1CE8yeHw5V5t59aXsUPPVTHMDjEZz8MgguLL/Q7NblxhZUlTu9xSPqlsUO/y+X7dlU05jdhvyycD55DA==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.3.1.tgz", + "integrity": "sha512-XBmSKRLXLxiaPYamLv3/hnP/KXDai1NDexN0FpkTaZXTfycHvkRHoenpgl/fvuK/kPbB6xAgoyiryAhQNxYmAQ==", "dev": true, "dependencies": { - "esbuild": "^0.20.1", + "esbuild": "^0.21.3", "postcss": "^8.4.38", "rollup": "^4.13.0" }, @@ -1709,26 +1771,27 @@ } }, "node_modules/vitepress": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.1.0.tgz", - "integrity": "sha512-G+NS5I2OETxC0SfGAMDO75JWNkrcir0UCptuhQMNoaZhhlqvYtTDQhph4qGc5dtiTtZkcFa/bCcSx+A2gSS3lA==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.2.3.tgz", + "integrity": "sha512-GvEsrEeNLiDE1+fuwDAYJCYLNZDAna+EtnXlPajhv/MYeTjbNK6Bvyg6NoTdO1sbwuQJ0vuJR99bOlH53bo6lg==", "dev": true, "dependencies": { "@docsearch/css": "^3.6.0", "@docsearch/js": "^3.6.0", - "@shikijs/core": "^1.2.4", - "@shikijs/transformers": "^1.2.4", - "@types/markdown-it": "^13.0.7", - "@vitejs/plugin-vue": "^5.0.4", - "@vue/devtools-api": "^7.0.25", - "@vueuse/core": "^10.9.0", - "@vueuse/integrations": "^10.9.0", + "@shikijs/core": "^1.6.2", + "@shikijs/transformers": "^1.6.2", + "@types/markdown-it": "^14.1.1", + "@vitejs/plugin-vue": "^5.0.5", + "@vue/devtools-api": "^7.2.1", + "@vue/shared": "^3.4.27", + "@vueuse/core": "^10.10.0", + "@vueuse/integrations": "^10.10.0", "focus-trap": "^7.5.4", "mark.js": "8.11.1", "minisearch": "^6.3.0", - "shiki": "^1.2.4", - "vite": "^5.2.8", - "vue": "^3.4.21" + "shiki": "^1.6.2", + "vite": "^5.2.12", + "vue": "^3.4.27" }, "bin": { "vitepress": "bin/vitepress.js" @@ -1747,16 +1810,16 @@ } }, "node_modules/vue": { - "version": "3.4.21", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.4.21.tgz", - "integrity": "sha512-5hjyV/jLEIKD/jYl4cavMcnzKwjMKohureP8ejn3hhEjwhWIhWeuzL2kJAjzl/WyVsgPY56Sy4Z40C3lVshxXA==", + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.4.29.tgz", + "integrity": "sha512-8QUYfRcYzNlYuzKPfge1UWC6nF9ym0lx7mpGVPJYNhddxEf3DD0+kU07NTL0sXuiT2HuJuKr/iEO8WvXvT0RSQ==", "dev": true, "dependencies": { - "@vue/compiler-dom": "3.4.21", - "@vue/compiler-sfc": "3.4.21", - "@vue/runtime-dom": "3.4.21", - "@vue/server-renderer": "3.4.21", - "@vue/shared": "3.4.21" + "@vue/compiler-dom": "3.4.29", + "@vue/compiler-sfc": "3.4.29", + "@vue/runtime-dom": "3.4.29", + "@vue/server-renderer": "3.4.29", + "@vue/shared": "3.4.29" }, "peerDependencies": { "typescript": "*" diff --git a/package.json b/package.json index e56396c..2d6ebb2 100644 --- a/package.json +++ b/package.json @@ -1,4 +1,5 @@ { + "type": "module", "scripts": { "docs:dev": "vitepress dev", "docs:build": "vitepress build", @@ -6,7 +7,7 @@ "format": "biome format --write ." }, "devDependencies": { - "@biomejs/biome": "^1.6.4", - "vitepress": "^1.1.0" + "@biomejs/biome": "^1.8.1", + "vitepress": "^1.2.3" } } diff --git a/src/en/about/index.md b/src/en/about/index.md new file mode 100644 index 0000000..36bba81 --- /dev/null +++ b/src/en/about/index.md @@ -0,0 +1,7 @@ +--- +editLink: true +--- + +## About Logo + +Logo is designed by `@比格招HUHV`.You can find her in `小红书/微博/站酷/Dribbble/INS/X` \ No newline at end of file diff --git a/src/en/blog/2024-05-27.md b/src/en/blog/2024-05-27.md new file mode 100644 index 0000000..5946477 --- /dev/null +++ b/src/en/blog/2024-05-27.md @@ -0,0 +1,30 @@ +--- +editLink: true +outline: "deep" +--- + +# Release Note +Today we released a major version update, bringing many new features and capabilities. + +## Scaffolding +Some issues have been fixed and some new features have been added to the scaffolding. + +### New Features +- Support for automatically copying dynamic link libraries that need to be linked, which is very important for our use of capabilities like OpenSSL, and can reduce some understanding and usage costs. + +### Issue Fixes +- Fixed the problem that the artifact command sometimes generates wrong multi-level folders. This would increase our package size and fail to get the correct final product. +SDK + +## SDK +In terms of the SDK, we have synchronized the latest code from the upstream napi-rs and added some new features. + +### New Features +- `ThreadsafeFuntion` supports setting call priority +- Support for some extended APIs of N-API on HarmonyOS, please refer to the [issue](https://github.com/ohos-rs/example/issues/15) for supported capabilities +- Removed the `JsExternal` data structure, this change is a breaking change, please use `External` instead +- Added most examples of compact mode + + +We strongly recommend you to upgrade to the latest version to ensure you get the latest capabilities. If there are any problems, please submit an [issue](https://github.com/ohos-rs/example/issues). + diff --git a/src/en/blog/index.md b/src/en/blog/index.md new file mode 100644 index 0000000..48f9c57 --- /dev/null +++ b/src/en/blog/index.md @@ -0,0 +1,5 @@ +--- +editLink: true +--- + +We'll be publishing updates about the repository changes on this blog. diff --git a/src/en/community/icons/.gitkeep b/src/en/community/icons/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/en/community/index.md b/src/en/community/index.md new file mode 100644 index 0000000..07165ff --- /dev/null +++ b/src/en/community/index.md @@ -0,0 +1,27 @@ +--- +editLink: true +--- + +Unlike the Ecosystem, the Community will serve as a hub for community-related info, such as details on applications or +packages that are utilizing this repository. + +## Application + +If you've utilized this repository to develop native features for your app, we'd love for you to submit +a [Pull Request](https://github.com/ohos-rs/ohos-rs.github.io/pulls). We'd be +thrilled to know about it and showcase it here. + +| Application Name | Icon | More Info | +|------------------|-------------------------------|-----------| +| Sample | Reference icon from subfolder | ... | + +## Package + +If you've used this repository to develop ohpm packages for higher-level applications, we'd be delighted if you could +submit a [Pull Request](https://github.com/ohos-rs/ohos-rs.github.io/pulls). We'd love to know about it and feature it +here. + +| Package Name | Description | More Info | +|--------------------------------------------------------------|-------------------------------------------------------------------------------------|---------------------------------------------------------------------------------| +| [@kingtous/reqwest](https://gitee.com/Kingtous/ohos_reqwest) | A [reqwest](https://crates.io/crates/reqwest) binding for OpenHarmony/HarmonyOS | With prebuilt [rustls](https://github.com/rustls/rustls), no openssl is needed. | +| [@kingtous/uuid](https://gitee.com/Kingtous/ohos_uuid) | The missing [UUID](https://crates.io/crates/uuid) library for OpenHarmony/HarmonyOS | UUID generation and validation. | \ No newline at end of file diff --git a/src/en/docs/basic.md b/src/en/docs/basic.md new file mode 100644 index 0000000..5a3b430 --- /dev/null +++ b/src/en/docs/basic.md @@ -0,0 +1,37 @@ +--- +editLink: true +--- +> [!IMPORTANT] Star +> **If you find this project helpful, we'd appreciate it if you could give us a [star](https://github.com/ohos-rs/ohos-rs). Thank you!** + + +## What's the `ohos-rs`? + +The runtime of HarmonyOS is very similar to Node.js, but there are slight differences in some logic, so it forked the code of [napi-rs](https://github.com/napi-rs/napi-rs) and made some modifications. The overall functions are basically aligned with napi-rs. + +::: danger +The project is in the development stage, and some capabilities may have problems, please use with caution. +::: + +## Simple example + +We can write a simple function called `add`. + +```rs +use napi_derive_ohos::napi; + +#[napi] +pub fn add(left: u32, right: u32) -> u32 { + left + right +} +``` + + +In HarmonyOS, we can call it with some code. + +```ts +import basic from 'libadd.so'; + +const result = basic.add(1,2); +// result is 3 +``` \ No newline at end of file diff --git a/src/en/docs/basic/assets/dist_tree.png b/src/en/docs/basic/assets/dist_tree.png new file mode 100644 index 0000000..dd31e62 Binary files /dev/null and b/src/en/docs/basic/assets/dist_tree.png differ diff --git a/src/en/docs/basic/quick-start.md b/src/en/docs/basic/quick-start.md new file mode 100644 index 0000000..a0a1a11 --- /dev/null +++ b/src/en/docs/basic/quick-start.md @@ -0,0 +1,71 @@ +--- +editLink: true +--- + +# Quick Start + +We provide a cli tool to simplify some action. For example: `init`, `build` and so on. + +We will now begin to introduce this capability step by step. + +## Requirement + +Before all, we need to install `Rust` and `HarmonyOS NDK`. + +### Rust + +For rust, we can use official guide to install it. + +```shell +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh +``` + +::: tip 🌈 +For more detail about rust, you can visit [link](https://www.rust-lang.org/learn/get-started) +::: + +And then we need to install some toolchain and component, which will help use to build prebuild binary for HarmonyOS. + +1. **nightly toolchain** + + OpenHarmony is `tier3` target for rust, so we must use custom toolchain or use source-code to build it. + Just run this command and set toolchain to `nightly` + ```shell + rustup default nightly + ``` +2. **rust-std** + + Then we need to install source code. Just run this command + ```shell + rustup component add rust-src + ``` + +### HarmonyOS NDK + +::: tip +For the latest SDK Version, You need `DevEco Studio NEXT Developer Beta1 (5.0.3.100)` or later. +::: + +You just need to download the latest `DevEco-Studio` and download the latest SDK. You can download it with [official website](https://developer.huawei.com/consumer/cn/deveco-studio/) + +## Install + +Now, you can install cli tool with `cargo`. + +```shell +cargo install ohrs +``` + +## Simple Project + +Using `ohrs` to init project + +```shell +ohrs init hello +``` + +And using `ohrs` to build project + +```shell +ohrs build.md +``` diff --git a/src/en/docs/basic/simple-project.md b/src/en/docs/basic/simple-project.md new file mode 100644 index 0000000..20cf837 --- /dev/null +++ b/src/en/docs/basic/simple-project.md @@ -0,0 +1,91 @@ +--- +editLink: true +--- + +# Simple Project + +We can use tool to initial our HarmonyOS's project, and it's also possible for us to initial project with standard rust project. + +Now, we will try to use standard rust project to build prebuild binary. + +## Init + +Using `cargo` to initial a binary project. + +```shell +cargo new hello --lib +``` + +## Add dependencies + +We need to add some dependencies, which provide useful functions. + +```shell +cargo add napi-ohos napi-derive-ohos + +cargo add napi-build-ohos --build +``` + +## Setup binary type + +There are many binary type for rust project, but now we use `cdylib` as final target. We need to add some config with `Cargo.toml` + +```toml +# Cargo.toml + +[lib] +crate-type=["cdylib"] +``` + +## Setup build script + +`build.rs` is a special file, that will execute before the project starts to bundle. We can use it to add some special logic to help us build the project. + +::: tip 🔆 +More info about build script , you can find it with [official book](https://doc.rust-lang.org/cargo/reference/build-scripts.html) +::: + +At first, create a file `build.rs` in project's root folder, then we need to run `setup`, which is provided by `napi-build-ohos`, and the content is below here: + +```rust +// build.rs +fn main () { + napi_build_ohos::setup(); +} +``` + +Our project may be like this: + +```txt +. +├── Cargo.lock +├── Cargo.toml +├── build.rs +└── src + └── lib.rs +``` + +## Add napi method + +Now we can write some napi method. For example, we can add a `add` method + +```rust +use napi_derive_ohos::napi; + +#[napi] +pub fn add(a: u32,b: u32) -> u32 { + a + b +} +``` + +## Build + +Just run `ohrs` to build our project. + +```shell +ohrs build +``` + +Then we can get the final prebuild binary and `.d.ts` file in `hello/dist`. + +![Dist](assets/dist_tree.png) diff --git a/src/en/docs/ci/basic.md b/src/en/docs/ci/basic.md new file mode 100644 index 0000000..9d414de --- /dev/null +++ b/src/en/docs/ci/basic.md @@ -0,0 +1,7 @@ +--- +editLink: true +--- + +# CI + +todo \ No newline at end of file diff --git a/src/en/docs/cli/artifact.md b/src/en/docs/cli/artifact.md new file mode 100644 index 0000000..9899374 --- /dev/null +++ b/src/en/docs/cli/artifact.md @@ -0,0 +1,25 @@ +--- +editLink: true +--- + +# Artifact + +This command will help us to generate the package for `ohpm`. + +## Usage + +Standard command will be: + +```shell +ohrs artifact +``` + + +## Arguments + +It supports some special options. + +| Options | description | type | default | +|---------|:--------------------------------------------------------------------------------------------------------|:---------|:----------| +| dist | The build command should be aligned and kept consistent with the `dist` parameter in the build command. | `string` | `dist` | +| package | The name of the final har package | `string` | `package` | diff --git a/src/en/docs/cli/assets/dist.png b/src/en/docs/cli/assets/dist.png new file mode 100644 index 0000000..c5b7959 Binary files /dev/null and b/src/en/docs/cli/assets/dist.png differ diff --git a/src/en/docs/cli/assets/new_folder.png b/src/en/docs/cli/assets/new_folder.png new file mode 100644 index 0000000..5f7d543 Binary files /dev/null and b/src/en/docs/cli/assets/new_folder.png differ diff --git a/src/en/docs/cli/build.md b/src/en/docs/cli/build.md new file mode 100644 index 0000000..c9d6085 --- /dev/null +++ b/src/en/docs/cli/build.md @@ -0,0 +1,66 @@ +--- +editLink: true +outline: "deep" +--- + +# Build + +As another useful subcommand, it helps us to build the final binary and generate `.d.ts`. Standard command will be: + +```shell +ohrs build +``` + +It supports some special options. + +| Options | description | type | default | +|---------|:------------------------------------------------------------------------------------------------------|:----------|:--------| +| release | build mode,if it be set with true, project will build with `release` mode | `boolean` | false | +| dist | The final binary's folder | `string` | dist | +| strip | Use `llvm-strip` to reduce the size of the binary files. Set the mode to true if it's in release mode | `boolean` | true | + + +## Usage + +Here are some examples to use them. + +### --release + +```shell +ohrs build --release +``` + +If we use `--release`, project will build with `release` mode. + +### --compact + +```shell +ohrs build --compact +``` + +If we use `--compact`, the final folder will be: + +![Dist](assets/dist.png) + +All the final binary will in a same folder. + +### --dist new_folder + +```shell +cargo build --dist new_folder +``` + +Now, the final project structure will be: + +![Dist](assets/new_folder.png) + + +### --strip + +```shell +# enabled +cargo build --strip + +# disabled +cargo build --strip=false +``` diff --git a/src/en/docs/cli/init.md b/src/en/docs/cli/init.md new file mode 100644 index 0000000..f0f0d66 --- /dev/null +++ b/src/en/docs/cli/init.md @@ -0,0 +1,37 @@ +--- +editLink: true +--- + +# Init + +`ohrs` provide some useful subcommand to help us initial and build project. + +## Usage + +`init` is a subcommand with `ohrs`, a standard command just be here: + +```shell +ohrs init xx +``` + +Tool will create a folder named `xx`, and it will be also as project's name in `Cargo.toml`. So `Cargo.toml` will be like: + +```toml +[package] +name = "xx" +version = "0.1.0" +edition = "2021" +``` + +And the final prebuild binary's name will be `libxx.so`. + +::: danger Don't do it +❌ Don't use some special name. For example: `test` `crate` `fn` etc. +::: + +## Arguments + + +| Options | description | type | default | +|---------|:----------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------|:--------| +| package | This will generate an OHPM package, which won't be created by default. If you input a string, it will replace the `name` field in oh-package.json5. | `boolean \| string` | false | diff --git a/src/en/docs/more/assets/x86_64_error.png b/src/en/docs/more/assets/x86_64_error.png new file mode 100644 index 0000000..f1ac1e8 Binary files /dev/null and b/src/en/docs/more/assets/x86_64_error.png differ diff --git a/src/en/docs/more/emu-tls.md b/src/en/docs/more/emu-tls.md new file mode 100644 index 0000000..e031921 --- /dev/null +++ b/src/en/docs/more/emu-tls.md @@ -0,0 +1,37 @@ +--- +editLink: true +outline: "deep" +--- + +# EMU-TLS + +For versions of LLVM 15 and above, emu-tls related symbols have been moved into `libc++.so` and `libclang_rt.builtins.a` files. Therefore, if you encounter errors similar to the ones below, please link to the relevant dynamic or static library. + +::: danger Error +__emutls_get_address: symbol not found +::: + +## How to solve it? + +```rust +// build.rs + +fn main() { + println!("cargo:rustc-link-lib=c++"); + // or + // println!("cargo:rustc-link-lib=static=clang_rt.builtins"); +} +``` + +### x86_64 + +When dealing with the x86_64 architecture, we might encounter an error like the one below. + +![error](assets/x86_64_error.png) + +Add `.cargo/config.toml` file in your project, and add some code. + +```toml +[unstable] +build-std-features = ["compiler-builtins-weak-intrinsics"] +``` diff --git a/src/en/docs/more/f&q.md b/src/en/docs/more/f&q.md new file mode 100644 index 0000000..7d9174c --- /dev/null +++ b/src/en/docs/more/f&q.md @@ -0,0 +1,23 @@ +--- +editLink: true +--- + +# F & Q + +## Why is the binary's size larger than C++ ? + +In fact, Rust's build products are generally about 10 times larger than C++'s build products. However, as the code functionality increases, this gap will gradually narrow. You can refer to [min-sized-rust](https://github.com/johnthagen/min-sized-rust) for optimization. + +## `Option` will cause a crash + +For optional parameters, they will be assigned to `undefined` in Node.js, but HarmonyOS lacks this step, which will cause the framework to fail to confirm the parameters and thus cause a crash. + +This error is related to the phone's ROM. **At this stage, you should avoid using optional parameters.** + +## How to migrate existing `.so` files from Android and iOS ? + +In fact, we cannot directly use any previously compiled `.so` files from **non-HarmonyOS** platforms. + +All `.so` files must be recompiled with HarmonyOS's NDK to meet the specifications, otherwise they cannot be used. + +A real example is compiling `openssl` for HarmonyOS. You can find the [example](https://github.com/ohos-rs/ohos-openssl). \ No newline at end of file diff --git a/src/en/docs/more/known-issue.md b/src/en/docs/more/known-issue.md new file mode 100644 index 0000000..d592b22 --- /dev/null +++ b/src/en/docs/more/known-issue.md @@ -0,0 +1,24 @@ +# N-API +Now, OpenHarmony's `napi` isn't aligned with `Node.js`, below is a list of unsupported methods: + +* napi_make_callback +* napi_adjust_external_memory +* napi_async_init +* napi_async_destroy +* uv_run +* napi_add_env_cleanup_hook +* napi_remove_env_cleanup_hook +* napi_open_callback_scope +* napi_close_callback_scope +* napi_add_finalizer +* napi_set_instance_data +* napi_get_instance_data +* napi_add_async_cleanup_hook +* napi_remove_async_cleanup_hook +* node_api_symbol_for +* node_api_get_module_file_name +* node_api_create_syntax_error +* node_api_throw_syntax_error +* node_api_create_external_string_latin1 + +Related issue: [I96OIQ](https://gitee.com/openharmony/docs/issues/I96OIQ) [I96ONT](https://gitee.com/openharmony/arkui_napi/issues/I96ONT) \ No newline at end of file diff --git a/src/en/docs/usage/basic.md b/src/en/docs/usage/basic.md new file mode 100644 index 0000000..737c3a7 --- /dev/null +++ b/src/en/docs/usage/basic.md @@ -0,0 +1,8 @@ +--- +editLink: true +--- + +# Basic usage + +In basic usage, we can see [napi-rs](https://napi.rs/)'s document to learn it. All the functions should be aligned with it. + diff --git a/src/en/docs/usage/task.md b/src/en/docs/usage/task.md new file mode 100644 index 0000000..d4fe47b --- /dev/null +++ b/src/en/docs/usage/task.md @@ -0,0 +1,119 @@ +--- +editLink: true +--- + +# Task + +`Task` is the most important part of the ohos-rs. It helps us to implement complex logic in `libuv`, which can avoid cause the main thread to lock. + +For example, if we perform CPU-intensive calculations in the main thread, it will cause the main thread to freeze, and the UI and other tasks cannot proceed. + +## Basic usage + +If we need to use `task`, we should implement the `Task` trait for any data. Task's trait is below here: + +```rust +pub trait Task: Send + Sized { + type Output: Send + Sized + 'static; + type JsValue: ToNapiValue + TypeName; + + /// Compute logic in libuv thread + fn compute(&mut self) -> Result; + + /// Into this method if `compute` return `Ok` + fn resolve(&mut self, env: Env, output: Self::Output) -> Result; + + /// Into this method if `compute` return `Err` + fn reject(&mut self, _env: Env, err: Error) -> Result { + Err(err) + } + + // after resolve or reject + fn finally(&mut self, _env: Env) -> Result<()> { + Ok(()) + } +} +``` + +For us, we must implement the basic method: `compute` `resolve`. + +**compute** +This method will be executed in `libuv` with sub thread. + +**resolve** +This method will be executed in the main thread. + +::: warning +You should avoid to run the complex logic in this method. +::: + +## Simple example + +Now we try to implement the `fibonacci` with task. + +At first, we need to declare a basic struct. + +```rust +fn fibonacci_native(n: u32) -> u32 { + match n { + 1 | 2 => 1, + _ => fibonacci_native(n - 1) + fibonacci_native(n - 2), + } +} + +struct ComputeFib { + n: u32, +} + +impl ComputeFib { + pub fn new(n: u32) -> ComputeFib { + ComputeFib { n } + } +} +``` + +Then, we need to implement the `Task` for `ComputeFib`. + +```rust +impl Task for ComputeFib { + type Output = u32; + type JsValue = JsNumber; + + fn compute(&mut self) -> Result { + Ok(fibonacci_native(self.n)) + } + + fn resolve(&mut self, env: Env, output: Self::Output) -> Result { + env.create_uint32(output) + } +} +``` + +Finally just to register a method for `ArkTS`, the function's sign should be below here: + +::: code-group +```rust [lib.rs] +// register method +#[napi(ts_return_type="Promise")] +pub fn fib(env: Env, init: u32) -> Result { + let task = ComputeFib::new(init); + let async_promise = env.spawn(task).unwrap(); + Ok(async_promise.promise_object()) +} +``` + +```ts [index.d.ts] +// ts declare +export function fib(init: number): Promise +``` +::: + +Now we can use it in `ArkTS`. + +```ts +import nativeFib from 'libfib.so'; + +const result = await nativeFib.fib(10); +``` + +The fibonacci will run in the `libuv`. \ No newline at end of file diff --git a/src/en/docs/usage/tsfn.md b/src/en/docs/usage/tsfn.md new file mode 100644 index 0000000..1adfe2c --- /dev/null +++ b/src/en/docs/usage/tsfn.md @@ -0,0 +1,95 @@ +--- +editLink: true +--- + +# ThreadSafeFunction + +We know that the JavaScript runtime is a single-threaded environment, making it essentially impossible to use multiple threads within this environment. However, `NAPI` enables us to have the capability to use multiple threads. To prevent the haphazard use of multiple threads in `NAPI` from causing chaos in the JavaScript runtime, the official documentation provides the capability of `ThreadSafeFunction`. This is the only way we interact between multiple threads and the JavaScript runtime. Similar implementations are also provided on HarmonyOS. + +Now, let's start to experiment with using `TSFN` to implement a native multithreaded application. + +## Basic + +Firstly, our `TSFN` will accept a callback function, which will be invoked after the multithreaded execution is completed. + +Therefore, we need to define a parameter for the callback function, as shown in the following code: + +```rust +use napi_derive_ohos::napi; +use napi_ohos::{JsFunction, Result}; + +#[napi] +pub fn run_ts_fn(cb: JsFunction) -> Result<()> { + Ok(()) +} +``` + +Then, we need to create a `TSFN` that can be safely called in a child thread. Here's how you can do it: + +```rust +use napi_derive_ohos::napi; +use napi_ohos::{ + threadsafe_function::{ErrorStrategy, ThreadsafeFunction}, + JsFunction, Result, +}; + +#[napi] +pub fn run_ts_fn(cb: JsFunction) -> Result<()> { + let ts_fn: ThreadsafeFunction = cb // [!code ++] + .create_threadsafe_function(0, |ctx| ctx.env.create_int64(ctx.value).map(|v| vec![v])) // [!code ++] + .unwrap(); // [!code ++] + + Ok(()) +} +``` + +You can see that when we create a `TSFN`, it accepts two generic parameters. The first one is used to define the current data type, which will be passed to `ctx.value` when the `TSFN` is called. The second one is used to define the response mode of the current `TSFN`. Following that, when we create it, we pass two parameters: the first one is the callback queue size of the `TSFN`. When it's set to 0, the queue will be unlimited. The second one is the final execution callback function, used to pass data back to the JS environment. + +::: tip +It's worth noting that ultimately, when returning, we need to return a list. This list will serve as the arguments passed to the callback function in the JS environment. +::: + +Now we can call this function in any child thread. + +```rust +use std::thread; + +use napi_derive_ohos::napi; +use napi_ohos::{ + threadsafe_function::{ErrorStrategy, ThreadsafeFunction, ThreadsafeFunctionCallMode}, + JsFunction, Result, +}; + +#[napi] +pub fn run_ts_fn(cb: JsFunction) -> Result<()> { + let ts_fn: ThreadsafeFunction = cb + .create_threadsafe_function(0, |ctx| ctx.env.create_int64(ctx.value).map(|v| vec![v])) + .unwrap(); + + thread::spawn(move || { // [!code ++] + ts_fn.call(Ok(1), ThreadsafeFunctionCallMode::NonBlocking); // [!code ++] + }); // [!code ++] + + Ok(()) +} +``` + +In the JavaScript code, it will look something like this: + +```ts +import tslib from 'libts_fn.so'; + +tslib.runTsFn((result) => { + console.log(result); + // result is 1; +}); +``` + +## ErrorStrategy + +In JavaScript, we generally have two ways to handle callback functions: + +1. When an error occurs, the error will be returned as the first argument of the callback function. Otherwise, the first argument will be null, indicating normal execution. +2. When an error occurs, it throws an exception directly and exits the program. + +`ErrorStrategy::CalleeHandled` is used for the first scenario, while `ErrorStrategy::Fatal` is used for the second scenario. \ No newline at end of file diff --git a/src/en/ecosystem/binding/hilog.md b/src/en/ecosystem/binding/hilog.md new file mode 100644 index 0000000..0aac1af --- /dev/null +++ b/src/en/ecosystem/binding/hilog.md @@ -0,0 +1,71 @@ +--- +editLink: true +outline: 'deep' +--- + +# ohos-hilog-binding + +This is a binding crate for HarmonyOS's `hilog`. + +## Install + +```shell +cargo add ohos-hilog-binding +``` + +## Usage + +```rust +use ohos_hilog_binding::hilog_debug; +use napi_derive_ohos::napi; + +#[napi] +pub fn add(left: u32, right: u32) -> u32 { + hilog_debug!("hello world"); + hilog_debug!( + "test", + LogOptions { + tag: Some("testTag"), + domain: None + } + ); + left + right +} +``` + +## Docs + +This crate provides some macro to log info. + +### Support method + +- `hilog_debug` +- `hilog_info` +- `hilog_warn` +- `hilog_error` +- `hilog_fatal` + +The macro is below here: + +```rust +#[macro_export] +macro_rules! hilog_info { + ($info: expr) => { + hilog_binding::info($info, None); + }; + ($info: expr,$option: expr) => { + hilog_binding::info($info, Some($option)); + }; +} + +#[derive(Default)] +pub struct LogOptions<'a> { + // domain default is 0x0000 + pub domain: Option, + /// tag default is hilog_rs + pub tag: Option<&'a str>, +} +``` + +- `info` should be `str` +- `option` should be `LogOptions` \ No newline at end of file diff --git a/src/en/ecosystem/binding/init.md b/src/en/ecosystem/binding/init.md new file mode 100644 index 0000000..b45ea97 --- /dev/null +++ b/src/en/ecosystem/binding/init.md @@ -0,0 +1,26 @@ +--- +editLink: true +--- + +# ohos-init-binding + +This is a binding crate for HarmonyOS's `init`. + + +## Install + +```shell +cargo add ohos-init-binding +``` + +## Usage + +It just provides a simple function for `canIUse`. + +```rust +use ohos_init_binding::canIUse; + +fn try_it() { + let r = canIUse("SystemCapability.Location.Location.Core"); +} +``` \ No newline at end of file diff --git a/src/en/ecosystem/index.md b/src/en/ecosystem/index.md new file mode 100644 index 0000000..6fabb2d --- /dev/null +++ b/src/en/ecosystem/index.md @@ -0,0 +1,7 @@ +--- +editLink: true +--- + +The official has provided a series of ecological content, including some out-of-the-box ohpm packages and Rust binding packages for official native modules. + +You can view the relevant package information and corresponding usage instructions on the current page. Additionally, feel free to submit a [pull request](https://github.com/ohos-rs/ohos-native-bindings/pulls) with any related content. \ No newline at end of file diff --git a/src/en/ecosystem/package/argon2.md b/src/en/ecosystem/package/argon2.md new file mode 100644 index 0000000..6c0811b --- /dev/null +++ b/src/en/ecosystem/package/argon2.md @@ -0,0 +1,108 @@ +--- +editLink: true +--- + +# @ohos-rs/argon2 + +- `@ohos-rs/argon2` supports all three algorithms: + + - Argon2i: Optimizes against GPU cracking attacks but vulnerable to side-channels. + Accesses the memory array in a password dependent order, reducing the possibility of time–memory tradeoff (TMTO) attacks. + - Argon2d: Optimized to resist side-channel attacks. + Accesses the memory array in a password independent order, increasing the possibility of time-memory tradeoff (TMTO) attacks. + - **Argon2id**: default value, this is the default algorithm for normative recommendations. + Hybrid that mixes Argon2i and Argon2d passes. + Uses the Argon2i approach for the first half pass over memory and Argon2d approach for subsequent passes. This effectively places it in the “middle” between the other two: it doesn’t provide as good TMTO/GPU cracking resistance as Argon2d, nor as good of side-channel resistance as Argon2i, but overall provides the most well-rounded approach to both classes of attacks. + +## Install + +```shell +ohpm install @ohos-rs/argon2 +``` + +## Api + +```ts +import buffer from '@ohos.buffer'; +export const enum Algorithm { + /** + * Optimizes against GPU cracking attacks but vulnerable to side-channels. + * Accesses the memory array in a password dependent order, reducing the possibility of time–memory tradeoff (TMTO) attacks. + */ + Argon2d = 0, + /** + * Optimized to resist side-channel attacks. + * Accesses the memory array in a password independent order, increasing the possibility of time-memory tradeoff (TMTO) attacks. + */ + Argon2i = 1, + /** + * Default value, this is the default algorithm for normative recommendations. + * Hybrid that mixes Argon2i and Argon2d passes. + * Uses the Argon2i approach for the first half pass over memory and Argon2d approach for subsequent passes. This effectively places it in the “middle” between the other two: it doesn’t provide as good TMTO/GPU cracking resistance as Argon2d, nor as good of side-channel resistance as Argon2i, but overall provides the most well-rounded approach to both classes of attacks. + */ + Argon2id = 2 +} +export interface Options { + /** + * The amount of memory to be used by the hash function, in kilobytes. Each thread will have a memory pool of this size. Note that large values for highly concurrent usage will cause starvation and thrashing if your system memory gets full. + * + * Value is an integer in decimal (1 to 10 digits), between 1 and (2^32)-1. + * + * The default value is 4096, meaning a pool of 4 MiB per thread. + */ + memoryCost?: number + /** + * The time cost is the amount of passes (iterations) used by the hash function. It increases hash strength at the cost of time required to compute. + * + * Value is an integer in decimal (1 to 10 digits), between 1 and (2^32)-1. + * + * The default value is 3. + */ + timeCost?: number + /** + * The hash length is the length of the hash function output in bytes. Note that the resulting hash is encoded with Base 64, so the digest will be ~1/3 longer. + * + * The default value is 32, which produces raw hashes of 32 bytes or digests of 43 characters. + */ + outputLen?: number + /** + * The amount of threads to compute the hash on. Each thread has a memory pool with memoryCost size. Note that changing it also changes the resulting hash. + * + * Value is an integer in decimal (1 to 3 digits), between 1 and 255. + * + * The default value is 1, meaning a single thread is used. + */ + parallelism?: number + algorithm?: Algorithm + version?: Version + secret?: buffer.Buffer + salt?: buffer.Buffer +} +export const enum Version { + /** Version 16 (0x10 in hex) */ + V0x10 = 0, + /** + * Default value + * Version 19 (0x13 in hex) + */ + V0x13 = 1 +} +export function hash(password: string | buffer.Buffer, options?: Options | undefined | null): Promise +export function hashRaw(password: string | buffer.Buffer, options?: Options | undefined | null): Promise +export function hashRawSync(password: string | buffer.Buffer, options?: Options | undefined | null): buffer.Buffer +export function hashSync(password: string | buffer.Buffer, options?: Options | undefined | null): string +export function verify(hashed: string | buffer.Buffer, password: string | buffer.Buffer, options?: Options | undefined | null): Promise +export function verifySync(hashed: string | buffer.Buffer, password: string | buffer.Buffer, options?: Options | undefined | null): boolean +``` + +## Usage + +```ts +import { hash, verify } from '@ohos-rs/argon2'; + +const passwordString = 'some_string123'; +const passwordBuffer = Buffer.from(passwordString); + +const hashed = await hash(passwordBuffer); +await verify(hashed, passwordString) +``` diff --git a/src/en/ecosystem/package/bcrypt.md b/src/en/ecosystem/package/bcrypt.md new file mode 100644 index 0000000..16b65bc --- /dev/null +++ b/src/en/ecosystem/package/bcrypt.md @@ -0,0 +1,42 @@ +--- +editLink: true +--- + +# @ohos-rs/bcrypt + +🚀 Fastest bcrypt in OpenHarmony. + +## Install + +```shell +ohpm install @ohos-rs/bcrypt +``` + +## API + +```ts +export const DEFAULT_COST: 12 + +export function hashSync(password: string | Buffer, round?: number): string +export function hash(password: string | Buffer, round?: number): Promise +export function verifySync(password: string | Buffer, hash: string | Buffer): boolean +export function verify(password: string | Buffer, hash: string | Buffer): Promise +/** + * The same with `verifySync` + */ +export function compareSync(password: string | Buffer, hash: string | Buffer): boolean +/** + * The same with `verify` + */ +export function compare(password: string | Buffer, hash: string | Buffer): Promise + +export type Version = '2a' | '2x' | '2y' | '2b' +/** + * @param version default '2b' + */ +export function genSaltSync(round: number, version?: Version): string +/** + * @param version default '2b' + */ +export function genSalt(round: number, version?: Version): Promise +``` diff --git a/src/en/ecosystem/package/crc32.md b/src/en/ecosystem/package/crc32.md new file mode 100644 index 0000000..cb1848d --- /dev/null +++ b/src/en/ecosystem/package/crc32.md @@ -0,0 +1,35 @@ +--- +editLink: true +--- + +# @ohos-rs/crc32 + +The fast implement crc32 in HarmonyOS using SIMD. + +## Requirement + +- NDK Version >= 10 + +## Install + +```shell +ohpm install @ohos-rs/crc32 +``` + +## Api + +```ts +import buffer from '@ohos.buffer'; + +export function crc32(input: string | buffer.Buffer, initialState?: number | undefined | null): number +export function crc32c(input: string | buffer.Buffer, initialState?: number | undefined | null): number +``` + +## Usage + +```ts +import { crc32 } from '@ohos-rs/crc32'; + +crc32("crc32c - test",0); +// 2608757237 +``` diff --git a/src/en/ecosystem/package/image.md b/src/en/ecosystem/package/image.md new file mode 100644 index 0000000..821efaa --- /dev/null +++ b/src/en/ecosystem/package/image.md @@ -0,0 +1,11 @@ +--- +editLink: true +--- + +# @ohos-rs/image + +This package is aligned with `@napi-rs/image`. You can get full document with https://image.napi.rs/docs. + +## Tip + +This package's size is over `10MB`. You can use the source code to remove useless features and build your own to reduce the package's size. \ No newline at end of file diff --git a/src/en/ecosystem/package/jieba.md b/src/en/ecosystem/package/jieba.md new file mode 100644 index 0000000..e8e2c96 --- /dev/null +++ b/src/en/ecosystem/package/jieba.md @@ -0,0 +1,43 @@ +--- +editLink: true +--- + +# @ohos-rs/jieba + +[jieba-rs](https://github.com/messense/jieba-rs) binding to OpenHarmony. + +## Install + +```shell +ohpm install @ohos-rs/jieba +``` + +## API + +```ts +import buffer from '@ohos.buffer'; +export interface Keyword { + keyword: string + weight: number +} +export interface TaggedWord { + tag: string + word: string +} +export function cut(sentence: string | buffer.Buffer, hmm?: boolean | undefined | null): string[] +export function cutAll(sentence: string | buffer.Buffer): string[] +export function cutForSearch(sentence: string | buffer.Buffer, hmm?: boolean | undefined | null): string[] +export function extract(sentence: string | buffer.Buffer, topn: number, allowedPos?: string | undefined | null): Array +export function load(): void +export function loadDict(dict: buffer.Buffer): void +export function loadTFIDFDict(dict: buffer.Buffer): void +export function tag(sentence: string | buffer.Buffer, hmm?: boolean | undefined | null): Array +``` + +## Usage + +```ts +const sentence = '我是拖拉机学院手扶拖拉机专业的。不用多久,我就会升职加薪,走上人生巅峰。' +cut(sentence); +tag(sentence); +``` \ No newline at end of file diff --git a/src/en/ecosystem/package/jsonwebtoken.md b/src/en/ecosystem/package/jsonwebtoken.md new file mode 100644 index 0000000..0f96ccc --- /dev/null +++ b/src/en/ecosystem/package/jsonwebtoken.md @@ -0,0 +1,199 @@ +--- +editLink: true +--- + +# @ohos-rs/jsonwebtoken + +🚀 Fastest jsonwebtoken in OpenHarmony. + +## Install + +```shell +ohpm install @ohos-rs/jsonwebtoken +``` + +## API + +```ts +import buffer from '@ohos.buffer'; +export const enum Algorithm { + /** HMAC using SHA-256 */ + HS256 = 0, + /** HMAC using SHA-384 */ + HS384 = 1, + /** HMAC using SHA-512 */ + HS512 = 2, + /** ECDSA using SHA-256 */ + ES256 = 3, + /** ECDSA using SHA-384 */ + ES384 = 4, + /** RSASSA-PKCS1-v1_5 using SHA-256 */ + RS256 = 5, + /** RSASSA-PKCS1-v1_5 using SHA-384 */ + RS384 = 6, + /** RSASSA-PKCS1-v1_5 using SHA-512 */ + RS512 = 7, + /** RSASSA-PSS using SHA-256 */ + PS256 = 8, + /** RSASSA-PSS using SHA-384 */ + PS384 = 9, + /** RSASSA-PSS using SHA-512 */ + PS512 = 10, + /** Edwards-curve Digital Signature Algorithm (EdDSA) */ + EdDSA = 11 +} + + +export interface Header { + /** + * The algorithm used + * + * Defined in [RFC7515#4.1.1](https://tools.ietf.org/html/rfc7515#section-4.1.1). + * Default to `HS256` + */ + algorithm?: Algorithm + /** + * Content type + * + * Defined in [RFC7519#5.2](https://tools.ietf.org/html/rfc7519#section-5.2). + */ + contentType?: string + /** + * JSON Key URL + * + * Defined in [RFC7515#4.1.2](https://tools.ietf.org/html/rfc7515#section-4.1.2). + */ + jsonKeyUrl?: string + /** + * JSON Web Key + * + * Defined in [RFC7515#4.1.3](https://tools.ietf.org/html/rfc7515#section-4.1.3). + * Key ID + * + * Defined in [RFC7515#4.1.4](https://tools.ietf.org/html/rfc7515#section-4.1.4). + */ + keyId?: string + /** + * X.509 URL + * + * Defined in [RFC7515#4.1.5](https://tools.ietf.org/html/rfc7515#section-4.1.5). + */ + x5Url?: string + /** + * X.509 certificate chain. A Vec of base64 encoded ASN.1 DER certificates. + * + * Defined in [RFC7515#4.1.6](https://tools.ietf.org/html/rfc7515#section-4.1.6). + */ + x5CertChain?: Array + /** + * X.509 SHA1 certificate thumbprint + * + * Defined in [RFC7515#4.1.7](https://tools.ietf.org/html/rfc7515#section-4.1.7). + */ + x5CertThumbprint?: string + /** + * X.509 SHA256 certificate thumbprint + * + * Defined in [RFC7515#4.1.8](https://tools.ietf.org/html/rfc7515#section-4.1.8). + * + * This will be serialized/deserialized as "x5t#S256", as defined by the RFC. + */ + x5TS256CertThumbprint?: string +} + + +export interface Validation { + /** + * If it contains a value, the validation will check that the `aud` field is a member of the + * audience provided and will error otherwise. + * + * Defaults to an empty collection. + */ + aud?: Array + /** + * Which claims are required to be present before starting the validation. + * This does not interact with the various `validate_*`. If you remove `exp` from that list, you still need + * to set `validate_exp` to `false`. + * The only value that will be used are "exp", "nbf", "aud", "iss", "sub". Anything else will be ignored. + * + * Defaults to `exp`. + */ + requiredSpecClaims?: Array + /** + * Add some leeway (in seconds) to the `exp` and `nbf` validation to + * account for clock skew. + * + * Defaults to `60`. + */ + leeway?: number + /** + * Whether to validate the `exp` field. + * + * Defaults to `true`. + */ + validateExp?: boolean + /** + * Whether to validate the `nbf` field. + * + * It will return an error if the current timestamp is before the time in the `nbf` field. + * + * Defaults to `false`. + */ + validateNbf?: boolean + /** + * If it contains a value, the validation will check that the `sub` field is the same as the + * one provided and will error otherwise. + * + * Turned off by default. + */ + sub?: string + /** + * The algorithm used to verify the signature. + * + * Defaults to `HS256`. + */ + algorithms?: Array + /** + * If it contains a value, the validation will check that the `iss` field is a member of the + * iss provided and will error otherwise. + * Use `set_issuer` to set it + * + * Defaults to an empty collection. + */ + iss?: Array + /** + * Whether to validate the JWT signature. + * + * Defaults to `true`. + */ + validateSignature?: boolean +} + + +export function decodeHeader(token: string): Header +export function sign(claims: Record, key: string | buffer.Buffer, header?: Header | undefined | null): Promise +export function signSync(claims: Record, key: string | buffer.Buffer, header?: Header | undefined | null): string +export function verify(token: string, key: string | buffer.Buffer, validation?: Validation | undefined | null): Promise> +export function verifySync(token: string, key: string | buffer.Buffer, validation?: Validation | undefined | null): Record + +``` + +## Usage + +```ts + const iat = getUtcTimestamp() +const claims = { + data: { + id: 'f81d4fae-7dec-11d0-a765-00a0c91e6bf6', + pr: 33, + isM: true, + set: ['KL', 'TV', 'JI'], + nest: { id: 'poly' }, + }, + exp: iat + oneDayInSeconds, + iat, +} +const secretKey = 'secret' +const resSync = signSync(claims, secretKey) +const resAsync = await sign(claims, secretKey) +``` \ No newline at end of file diff --git a/src/en/ecosystem/package/snappy.md b/src/en/ecosystem/package/snappy.md new file mode 100644 index 0000000..3f01da7 --- /dev/null +++ b/src/en/ecosystem/package/snappy.md @@ -0,0 +1,35 @@ +--- +editLink: true +--- + +# @ohos-rs/snappy + +Fastest Snappy compression library in `OpenHarmony`, powered by `ohos-rs` and `rust-snappy`. + +## Install + +```shell +ohpm install @ohos-rs/snappy +``` + +## API + +```ts +export function compressSync( + input: buffer.Buffer | string | ArrayBuffer | Uint8Array, +): Buffer +export function compress( + input: buffer.Buffer | string | ArrayBuffer | Uint8Array, +): Promise +export function uncompressSync(compressed: buffer.Buffer): buffer.Buffer +export function uncompress(compressed: buffer.Buffer): Promise +``` + +## Usage + +```ts +import { compressSync } from '@ohos-rs/snappy'; + +const a = compressSync("hello world", { copyOutputData: false }); +// Buffer.from([11, 40, 104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100])) +``` \ No newline at end of file diff --git a/src/en/ecosystem/package/xxhash.md b/src/en/ecosystem/package/xxhash.md new file mode 100644 index 0000000..9f0345a --- /dev/null +++ b/src/en/ecosystem/package/xxhash.md @@ -0,0 +1,65 @@ +--- +editLink: true +--- + +# @ohos-rs/xxhash + +Fastest Snappy compression library in `OpenHarmony`, powered by `ohos-rs` and `rust-snappy`. + +## Install + +```shell +ohpm install @ohos-rs/xxhash +``` +## API + +```ts +export type BufferLike = + | Buffer + | string + | Uint8Array + | ArrayBuffer + | SharedArrayBuffer + | ReadonlyArray + | number[] + +export function xxh32(input: BufferLike, seed?: number): number +export function xxh64(input: BufferLike, seed?: BigInt): BigInt + +export class Xxh32 { + constructor(seed?: number) + update(input: BufferLike): this + digest(): number + reset(): void +} + +export class Xxh64 { + constructor(seed?: BigInt) + update(input: BufferLike): this + digest(): BigInt + reset(): void +} + +export class Xxh3 { + static withSeed(seed?: BigInt): Xxh3 + static withSecret(secret: BufferLike): Xxh3 + private constructor() {} + update(input: BufferLike): this + digest(): BigInt + reset(): void +} + +export const xxh3: { + xxh64: (input: BufferLike, seed?: BigInt) => BigInt + xxh64WithSecret: (input: BufferLike, secret: BufferLike) => BigInt + xxh128: (input: BufferLike, seed?: BigInt) => BigInt + xxh128WithSecret: (input: BufferLike, secret: BufferLike) => BigInt + Xxh3: typeof Xxh3 +} +``` + +## Usage + +```ts +xxh3.xxh64('hello world'), BigInt('15296390279056496779') +``` diff --git a/src/en/ecosystem/polyfill/abort-controller.md b/src/en/ecosystem/polyfill/abort-controller.md new file mode 100644 index 0000000..669364c --- /dev/null +++ b/src/en/ecosystem/polyfill/abort-controller.md @@ -0,0 +1,29 @@ +--- +editLink: true +--- + +# @ohos-rs/abort-controller + +AbortController for OpenHarmony based on `emitter`. + +## Required + +API Version >= 11 + +## Install + +```shell +ohpm install @ohos-rs/abort-controller +``` + +## Usage + +```ts +const controller = new AbortController(); + +asyncFib(20, controller.signal).catch((e: ESObject) => { + console.error(e) // Error: AbortError +}) + +controller.abort() +``` \ No newline at end of file diff --git a/src/en/ecosystem/third/avif.md b/src/en/ecosystem/third/avif.md new file mode 100644 index 0000000..f343523 --- /dev/null +++ b/src/en/ecosystem/third/avif.md @@ -0,0 +1,24 @@ +--- +editLink: true +--- + +# AVIF + +AVIF is a new image format based on AV1 video encoding. Compared with image formats such as JPEG and WEBP, it has a higher compression ratio and better picture details. And most importantly, it is free and open source, with no licensing fees. + +The rust community also provides the corresponding crate [libavif-sys](https://github.com/njaard/libavif-rs), implemented based on [libavif](https://github.com/AOMediaCodec/libavif). The relevant openharmony adaptation has been submitted, you can refer to this [PR](https://github.com/njaard/libavif-rs/pull/99). + +You can wait for the PR to merge or directly reference through git. + +## Example + +```toml +[dependencies] +libavif = { git = "https://github.com/southorange0929/libavif-rs.git", default-features = false, features = [ + "codec-aom", +] } +``` + +## Tip + +For the `x86_64-unknown-linux-ohos` target, you need to install `yasm` or `nasm` to support assembly compilation. \ No newline at end of file diff --git a/src/en/ecosystem/third/boringssl.md b/src/en/ecosystem/third/boringssl.md new file mode 100644 index 0000000..d863454 --- /dev/null +++ b/src/en/ecosystem/third/boringssl.md @@ -0,0 +1,60 @@ +--- +editLink: true +--- + +# BoringSSL + +BoringSSL is a fork of OpenSSL that is designed to meet Google's needs. + +The rust community also provides the corresponding crate [boringssl](https://github.com/cloudflare/boring). The relevant openharmony adaptation has been submitted, you can refer to this [PR](https://github.com/cloudflare/boring/pull/231). + +You can wait for the PR to merge or directly reference through git. + +## Usage + +Before you begin, you'll need to establish two environment variables to guarantee a successful build. + +```shell +export BORING_BSSL_SYSROOT=${OHOS_NDK_HOME}/native/sysroot +export CMAKE_TOOLCHAIN_FILE=${OHOS_NDK_HOME}/native/build/cmake/ohos.toolchain.cmake +``` + +## Example + +```toml +[dependencies] +boring = { git="https://github.com/ohos-rs/boring" } +``` + +Source Code: +```rust +use boring::sha; +use napi_derive_ohos::napi; + +#[napi] +pub fn h() -> String { + let mut hasher = sha::Sha256::new(); + + hasher.update(b"Hello, "); + hasher.update(b"world"); + + let hash = hasher.finish(); + hex::encode(hash) +} +``` + +Usage code: + +```ts +import { h } from 'libboring_ssl.so'; +const a = h(); +// a: 4ae7c3b6ac0beff671efa8cf57386151c06e58ca53a78d83f36107316cec125f +``` + +You can find the example [here](https://github.com/ohos-rs/example/tree/main/example/boring_ssl). + + +## More + +We also offer precompiled build outputs, which you can either use right away or custom-build as per your requirements. You can find it with [Repo](https://github.com/ohos-rs/ohos-boringssl) + diff --git a/src/en/ecosystem/third/cronet.md b/src/en/ecosystem/third/cronet.md new file mode 100644 index 0000000..102a119 --- /dev/null +++ b/src/en/ecosystem/third/cronet.md @@ -0,0 +1,15 @@ +--- +editLink: true +--- + +# cronet + +Cronet is a network request library developed by the Google team to replace `curl` and is widely used on `Android`. It is currently also supported on HarmonyOS, but it is different from the use of `curl`. We suggest first building the corresponding `.so` file, and then directly loading the corresponding capabilities in the business code to implement the use, rather than building with the business code. + + +:::tip There are two reasons why we choose the pre-built solution. +1. Cronet merely offers a build strategy that relies on `gn` and `ninja`, while the Rust ecosystem appears to lack robust capabilities. +2. To get it operational on HarmonyOS, we need to supply some extra patches for platform compatibility, and the source code package is excessively large. +::: + +You can refer to this [guide](https://gitee.com/openharmony-sig/tpc_c_cplusplus/tree/master/thirdparty/cronet) to build the required `.so` file. \ No newline at end of file diff --git a/src/en/ecosystem/third/curl.md b/src/en/ecosystem/third/curl.md new file mode 100644 index 0000000..32a0087 --- /dev/null +++ b/src/en/ecosystem/third/curl.md @@ -0,0 +1,93 @@ +--- +editLink: true +--- + +# cURL + +There are already [rust bindings](https://github.com/alexcrichton/curl-rust) for cURL in the community, we can use it directly. + +## Basic usage + +Add `curl` crate to dependence, and create a function. + +```shell +cargo add curl +``` + +Example code: + +```rust +use curl::easy::Easy; +use napi_derive_ohos::napi; + +#[napi] +pub fn request_hello() -> String { + let mut easy = Easy::new(); + easy.ssl_verify_peer(false).unwrap(); + easy.ssl_verify_host(false).unwrap(); + easy.url("https://httpbin.org/ip").unwrap(); + easy.write_function(|data: &[u8]| Ok(data.len())).unwrap(); + let a = easy.perform(); + + match a { + Ok(()) => { + // get the content-type then print it + let con_type: &str = easy.content_type().unwrap().unwrap(); + String::from(con_type) + } + Err(e) => { + let res = format!("{:?}", e); + res + } + } +} +``` + +There are two points to note here: + +1. `curl` depends on `openssl`, so we need to set openssl. +2. If you try to request a link with `https` protocol, you can set ssl_verify to false. + +## SSL Usage + +A simple example with ssl: + +```rust +#[napi] +pub fn request_hello_with_ca() -> String { + let mut easy = Easy::new(); + + // should use root ca // [!code ++] + let mut f = File::open("/etc/ssl/certs/cacert.pem").unwrap(); // [!code ++] + let mut buf = Vec::new(); // [!code ++] + f.read_to_end(&mut buf).unwrap(); // [!code ++] + easy.ssl_cainfo_blob(&buf).unwrap(); // [!code ++] + + // some url will fail which is self-sign CA + easy.url("https://www.qq.com").unwrap(); + easy.write_function(|data: &[u8]| Ok(data.len())).unwrap(); + let a = easy.perform(); + + match a { + Ok(()) => { + // get the content-type then print it + let con_type: &str = easy.content_type().unwrap().unwrap(); + String::from(con_type) + } + Err(e) => { + let res = format!("{:?}", e); + res + } + } +} +``` + +The current system root certificate may cause the following error for some request addresses. + +::: danger Error info +Error { description: "SSL peer certificate or SSH remote key was not OK", code: 60, extra: Some("SSL certificate problem: self-signed certificate") +::: + +## Example + +All examples can be found [here](https://github.com/ohos-rs/example/tree/main/example/curl). diff --git a/src/en/ecosystem/third/mmkv.md b/src/en/ecosystem/third/mmkv.md new file mode 100644 index 0000000..11a8335 --- /dev/null +++ b/src/en/ecosystem/third/mmkv.md @@ -0,0 +1,107 @@ +--- +editLink: true +--- + +# @ohos-rs/mmkv + +MMKV is an efficient, small, easy-to-use mobile key-value storage framework used in the WeChat application. It's currently available on Android, iOS/macOS, Win32 and POSIX. + +In fact, mmkv can fully run on OpenHarmony devices. We provide a simple native binding for MMKV. + +## Install + +```shell +ohpm install @ohos-rs/mmkv +``` + +## API + +```ts +export interface InitOption { + /** mmkv instance's log level */ + logLevel?: MMKVLogLevel + /** mmkv instance mode */ + mode?: MMKVMode + /** mmkv instance id if is empty, will use default. */ + mmapId?: string +} + +/** MMKV log level */ +export const enum MMKVLogLevel { + Debug = 0, + Info = 1, + Warning = 2, + Error = 3, + None = 4 +} + +export const enum MMKVMode { + SingleProcess = 1, + MultiProcess = 2 +} + +export class MMKV { + constructor(rootDir: string, options?: InitOption | undefined | null) + enableAutoKeyExpire(expire: number): void + /** set bool to mmkv */ + encodeBool(key: string, value: boolean, expire?: number | undefined | null): void + /** get bool from mmkv */ + decodeBool(key: string): boolean + /** get string */ + decodeString(key: string): string + /** set string */ + encodeString(key: string, value: string, expire?: number | undefined | null): void + /** set number include int float etc.s */ + encodeNumber(key: string, value: number, expire?: number | undefined | null): void + /** get number */ + decodeNumber(key: string): number + /** set bigint which will store as `Vec`, and the first element is a flag, 1 for negative numbers. */ + encodeBigint(key: string, value: bigint, expire?: number | undefined | null): void + /** get bigint */ + decodeBigint(key: string): bigint + /** remove key or keys */ + removeValueForKey(key: string | Array): void + /** check key if existed */ + containsKey(key: string): boolean + /** get current mmkv instance's all keys */ + allKeys(): Array + /** get current mmkv instance's mmap id */ + getMmapId(): string + /** + * get current mmkv instance's storage size + * @default TOTAL + */ + getStorageSize(sizeType?: 'ACTUAL' | 'TOTAL'): number + /** + * get kv's count + * @default false + */ + count(filterExpire?: boolean | undefined | null): number + /** + * get key's size + * @default false + */ + getValueSize(key: string, actual?: boolean | undefined | null): number + /** clear all kv with current mmkv */ + clearAll(keepSpace?: boolean | undefined | null): void + /** clear memory cache with current mmkv */ + clearMemoryCache(keepSpace?: boolean | undefined | null): void + /** basic method to back up data */ + static backUpToDirectory(dir: string, mmapId?: string | undefined | null): void + /** basic method to restore data */ + static restoreFromDirectory(dir: string, mmapId?: string | undefined | null): void + /** remove instance */ + static removeStorage(mmapId: string): void +} +``` + +## Usage + +```ts +import { MMKV, MMKVLogLevel, MMKVMode } from '@ohos-rs/mmkv'; + +const m = new MMKV("/data/storage/el2/base/haps/entry/files/mmkv",MMKVLogLevel.Info,MMKVMode.SingleProcess); + +m.encodeBool("test",false,16000); +const a = m.decodeBool("test"); +``` \ No newline at end of file diff --git a/src/en/ecosystem/third/openssl.md b/src/en/ecosystem/third/openssl.md new file mode 100644 index 0000000..3fa97ba --- /dev/null +++ b/src/en/ecosystem/third/openssl.md @@ -0,0 +1,17 @@ +--- +editLink: true +--- + +# OpenSSL + +In OpenHarmony, the official does not provide out-of-the-box openssl capabilities, but this library exists as the basic capability of a large number of other basic capabilities. Therefore, we need to build the openssl library that can run on OpenHarmony ourselves. We provide basic pre-built products, supporting the following platforms. + +- arm64-v8a +- armeabi-v7a +- x86_64 + +We provide some simple usage examples, which are based on the `reqwest` package. You can find them in the code [here](https://github.com/ohos-rs/example/tree/main/example/reqwest). + +## Source Code + +You can find the pre-built products [here](https://github.com/ohos-rs/ohos-openssl). \ No newline at end of file diff --git a/src/en/index.md b/src/en/index.md new file mode 100644 index 0000000..114ae51 --- /dev/null +++ b/src/en/index.md @@ -0,0 +1,27 @@ +--- +# https://vitepress.dev/reference/default-theme-home-page +layout: home + +hero: + name: "ohos-rs" + tagline: A framework for building compiled OpenHarmony SDK in Rust via Node-API(Forked from napi-rs) + image: + src: /logo.svg + alt: ohos-rs + actions: + - theme: brand + text: Get started + link: /docs/basic + +features: + - icon: 🌈 + title: Comprehensive functions + details: Align with napi-rs, which is famous in Node.js + - icon: ⚡️ + title: Easy to use + details: One command line to use it and more simpler than napi with C++ + - icon: 🌰 + title: Rich examples + details: The official provides a large number of real examples +--- +