@binblink/wasmnest-plugin-sdk-desktop 0.0.0-stage → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/README.md +287 -2
  2. package/README_en.md +284 -0
  3. package/bin/cli.js +602 -0
  4. package/bin/manifest-gen.js +454 -0
  5. package/bin/manifest-validate.js +432 -0
  6. package/bin/permission-vocabulary.json +5 -0
  7. package/bin/plugin-watch.js +331 -0
  8. package/bin/wasm-hash.js +124 -0
  9. package/dev-shell/README.md +121 -0
  10. package/dev-shell/index.html +12 -0
  11. package/dev-shell/package.json +28 -0
  12. package/dev-shell/pnpm-workspace.yaml +9 -0
  13. package/dev-shell/postcss.config.js +6 -0
  14. package/dev-shell/src/App.vue +90 -0
  15. package/dev-shell/src/components/LogPanel.vue +90 -0
  16. package/dev-shell/src/loader.ts +109 -0
  17. package/dev-shell/src/locale.ts +29 -0
  18. package/dev-shell/src/locales.ts +50 -0
  19. package/dev-shell/src/main.ts +46 -0
  20. package/dev-shell/src/mock/agent-hub-commands.ts +1065 -0
  21. package/dev-shell/src/mock/agent-hub.ts +42 -0
  22. package/dev-shell/src/mock/app-env.ts +102 -0
  23. package/dev-shell/src/mock/commands.ts +54 -0
  24. package/dev-shell/src/mock/domain-context.ts +46 -0
  25. package/dev-shell/src/mock/events.ts +16 -0
  26. package/dev-shell/src/mock/file-transfer.ts +512 -0
  27. package/dev-shell/src/mock/tauri-ipc.ts +109 -0
  28. package/dev-shell/src/registry.ts +90 -0
  29. package/dev-shell/src/shell/components/AppMountSlot.vue +241 -0
  30. package/dev-shell/src/shell/components/ShellIcon.vue +141 -0
  31. package/dev-shell/src/shell/components/ShellStatusBar.vue +87 -0
  32. package/dev-shell/src/shell/components/ShellToolbar.vue +287 -0
  33. package/dev-shell/src/shell/mount/appSession.ts +45 -0
  34. package/dev-shell/src/shell/mount/devAppMount.ts +80 -0
  35. package/dev-shell/src/shell/types.ts +132 -0
  36. package/dev-shell/src/styles/dev.css +27 -0
  37. package/dev-shell/src/styles/shell.css +546 -0
  38. package/dev-shell/src/styles/style.css +1132 -0
  39. package/dev-shell/src/theme.ts +140 -0
  40. package/dev-shell/src/vite-env.d.ts +24 -0
  41. package/dev-shell/tailwind.config.js +98 -0
  42. package/dev-shell/vite.config.ts +174 -0
  43. package/dist/index.d.ts +109 -0
  44. package/dist/index.js +170 -0
  45. package/dist/types.d.ts +585 -0
  46. package/dist/types.js +0 -0
  47. package/dist/vite-plugin.d.ts +25 -0
  48. package/dist/vite-plugin.js +80 -0
  49. package/package.json +89 -3
  50. package/src/config.ts +49 -0
  51. package/src/global-dialog.ts +169 -0
  52. package/src/index.ts +80 -0
  53. package/src/runtime.ts +54 -0
  54. package/src/types.ts +630 -0
  55. package/src/ui/MarkdownEditor.vue +520 -0
  56. package/src/ui/PluginGlobalDialog.vue +401 -0
  57. package/src/ui/Select.d.ts +36 -0
  58. package/src/ui/Select.vue +220 -0
  59. package/src/ui/TerminalInputRail.vue +184 -0
  60. package/src/ui/apply-select-position.ts +65 -0
  61. package/src/ui/markdown-editor-syntax.ts +234 -0
  62. package/src/ui/markdown-editor.d.ts +36 -0
  63. package/src/ui/plugin-global-dialog.d.ts +12 -0
  64. package/src/ui/select-position.ts +79 -0
  65. package/src/ui/terminal-input-rail.d.ts +30 -0
  66. package/src/ui/zoom-compensation.d.ts +9 -0
  67. package/src/ui/zoom-compensation.ts +52 -0
  68. package/src/vite-plugin.ts +124 -0
  69. package/template/README.md +39 -0
  70. package/template/package.json +23 -0
  71. package/template/plugin.json +14 -0
  72. package/template/rust/Cargo.toml +21 -0
  73. package/template/rust/src/lib.rs +39 -0
  74. package/template/src/env.d.ts +24 -0
  75. package/template/src/index.ts +37 -0
  76. package/template/tsconfig.json +17 -0
  77. package/template/vite.config.ts +21 -0
  78. package/tools/componentize/Cargo.lock +270 -0
  79. package/tools/componentize/Cargo.toml +15 -0
  80. package/tools/componentize/src/main.rs +94 -0
@@ -0,0 +1,52 @@
1
+ /**
2
+ * fixed 定位覆盖层在根元素 CSS zoom 下的坐标换算(自校准,无 zoom 时自动退回 F=1)
3
+ *
4
+ * 背景:曾因 Linux 桌面端 style.css 给 html.platform-linux 加 zoom: 1.15(修正
5
+ * WebKitGTK 字号观感)而引入本补偿。issue 06 已移除该 zoom(改 font-size +
6
+ * --ui-scale 体系,避免破坏 xterm 鼠标坐标系);此后探针实测 F=1、补偿自动成为
7
+ * no-op,本机制保留作防御(未来若根级 zoom 回归,调用方无需改动即可自愈)。
8
+ * WebKitGTK 2.52 采用标准化 zoom 语义(对齐 Chrome 128+):
9
+ * - getBoundingClientRect() 返回视觉坐标(已含 zoom 放大);
10
+ * - 而给 fixed 元素赋 top/left/width 等长度值时,渲染会再次乘以祖先链 zoom。
11
+ * 两者叠加:把 gBCR 读数直接赋给 fixed 面板,会向右下漂移 (zoom-1)×坐标、
12
+ * 尺寸放大 zoom 倍(WebKitGTK 2.52.6 实测:F=1.15,左缘漂 20.7px、宽 +15%,
13
+ * 贴底场景面板下溢窗口底约 39px——用户视角即"没贴住触发器、上拉判定失效")。
14
+ *
15
+ * 解法:自校准换算因子 F。放一个 set 宽 100px 的 fixed 探针读回 gBCR 宽度,
16
+ * F = 读回值 / 100。核心不变式:视觉坐标 = 赋值 px × F = 设计坐标 × F——
17
+ * gBCR 读数 ÷ F 得设计坐标;赋值用设计坐标(赋值 px 渲染时 ×F,与触发器
18
+ * 同一坐标系)。若选择全程在视觉空间计算(如 Tooltip),则最终赋值 = 视觉值 ÷ F。
19
+ * 两端引擎下都自洽:
20
+ * - 标准化 zoom 引擎:F = zoom,gBCR(视觉)/F → 设计 px,赋值渲染 ×zoom 落回视觉位置;
21
+ * - 旧式 zoom 引擎(used-value 乘法、gBCR 报本地坐标):F = 1,读数本就是设计 px;
22
+ * - 无 zoom 环境(macOS/Windows):F = 1,行为与历史实现完全一致。
23
+ * 页面缩放(Ctrl+=/-)对读数与赋值同比例缩放,不影响 F;根 zoom 每次打开时
24
+ * 重新实测一次,开销量级为单次 gBCR 调用,可忽略。
25
+ */
26
+
27
+ let probeEl: HTMLDivElement | null = null
28
+
29
+ /**
30
+ * 获取当前文档下 fixed 赋值坐标 → 视觉坐标的换算因子(赋值 px = 设计 px / F)
31
+ *
32
+ * 探针元素常驻 body(不可见、不可交互);测试框架清空 body 后下次调用自动重挂载。
33
+ */
34
+ export function getFixedZoomCompensation(): number {
35
+ if (!probeEl) {
36
+ probeEl = document.createElement('div')
37
+ probeEl.setAttribute('aria-hidden', 'true')
38
+ probeEl.style.cssText =
39
+ 'position:fixed;top:0;left:0;width:100px;height:0;visibility:hidden;pointer-events:none;'
40
+ }
41
+ if (!probeEl.isConnected) {
42
+ document.body.appendChild(probeEl)
43
+ }
44
+ const width = probeEl.getBoundingClientRect().width
45
+ // 无布局引擎的环境(happy-dom/jsdom 测试)gBCR 恒为 0 → 退回 1,保持无缩放行为
46
+ return Number.isFinite(width) && width > 0 ? width / 100 : 1
47
+ }
48
+
49
+ /** 重置探针缓存(测试隔离用;生产代码无需调用) */
50
+ export function resetFixedZoomProbe(): void {
51
+ probeEl = null
52
+ }
@@ -0,0 +1,124 @@
1
+ /**
2
+ * @binblink/wasmnest-plugin-sdk-desktop Vite 插件
3
+ *
4
+ * 处理插件构建时的共享模块外部化:
5
+ * 1. 将 vue/vue-i18n/pinia 标记为 rollup external
6
+ * 2. 构建后将 import 语句替换为 window.__WASMNEST_SHARED__ 读取
7
+ */
8
+ import type { Plugin, UserConfig } from 'vite'
9
+ import MagicString from 'magic-string'
10
+
11
+ /**
12
+ * 共享模块映射:模块名 → 全局变量访问表达式
13
+ *
14
+ * 收录标准:模块内部持有进程级单例状态,第二份实例导致状态错位——
15
+ * vue / vue-i18n / pinia 为运行时本体;`vue-sonner` 为 toast 队列本体
16
+ * (插件自带第二份 → toast 入自家队列,宿主 `<Toaster>` 收不到;票 13)。
17
+ * 宿主 `shared-runtime.ts` 必须同步收录同名条目,否则插件构建期外部化后
18
+ * 运行时取到 undefined。
19
+ */
20
+ const SHARED_MODULES: Record<string, string> = {
21
+ vue: 'window.__WASMNEST_SHARED__["vue"]',
22
+ 'vue-i18n': 'window.__WASMNEST_SHARED__["vue-i18n"]',
23
+ pinia: 'window.__WASMNEST_SHARED__["pinia"]',
24
+ 'vue-sonner': 'window.__WASMNEST_SHARED__["vue-sonner"]',
25
+ }
26
+
27
+ /**
28
+ * WasmNest 插件构建 Vite 插件
29
+ *
30
+ * 在插件 vite.config.ts 中使用:
31
+ * ```ts
32
+ * import { wasmnestPlugin } from '@binblink/wasmnest-plugin-sdk-desktop/vite'
33
+ * export default defineConfig({
34
+ * plugins: [vue(), wasmnestPlugin()],
35
+ * build: { ... }
36
+ * })
37
+ * ```
38
+ */
39
+ export function wasmnestPlugin(): Plugin {
40
+ const externalModules = Object.keys(SHARED_MODULES)
41
+
42
+ return {
43
+ name: 'wasmnest-shared-modules',
44
+ enforce: 'pre',
45
+
46
+ // 注入 rollup external 配置
47
+ config(config: UserConfig) {
48
+ const existingExternal = config.build?.rollupOptions?.external
49
+ const externalArray = Array.isArray(existingExternal)
50
+ ? existingExternal
51
+ : typeof existingExternal === 'string'
52
+ ? [existingExternal]
53
+ : []
54
+
55
+ return {
56
+ build: {
57
+ rollupOptions: {
58
+ external: [...externalArray, ...externalModules],
59
+ },
60
+ },
61
+ }
62
+ },
63
+
64
+ // 构建后替换 import 为全局变量读取
65
+ renderChunk(code, chunk) {
66
+ let modified = false
67
+ const s = new MagicString(code)
68
+
69
+ for (const [modName, globalExpr] of Object.entries(SHARED_MODULES)) {
70
+ const escapedName = modName.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
71
+
72
+ // import X from 'vue' → const X = window.__WASMNEST_SHARED__["vue"]
73
+ const defaultRe = new RegExp(`import\\s+(\\w+)\\s+from\\s+['"]${escapedName}['"]`, 'gm')
74
+ let match: RegExpExecArray | null
75
+ while ((match = defaultRe.exec(code)) !== null) {
76
+ const varName = match[1]
77
+ s.overwrite(
78
+ match.index,
79
+ match.index + match[0].length,
80
+ `const ${varName} = ${globalExpr}`,
81
+ )
82
+ modified = true
83
+ }
84
+
85
+ // import { X, Y } from 'vue' → const { X, Y } = window.__WASMNEST_SHARED__["vue"]
86
+ const namedRe = new RegExp(
87
+ `import\\s*\\{([^}]+)\\}\\s*from\\s+['"]${escapedName}['"]`,
88
+ 'gm',
89
+ )
90
+ while ((match = namedRe.exec(code)) !== null) {
91
+ const imports = match[1]
92
+ s.overwrite(
93
+ match.index,
94
+ match.index + match[0].length,
95
+ `const { ${imports} } = ${globalExpr}`,
96
+ )
97
+ modified = true
98
+ }
99
+
100
+ // import * as X from 'vue' → const X = window.__WASMNEST_SHARED__["vue"]
101
+ const namespaceRe = new RegExp(
102
+ `import\\s+\\*\\s+as\\s+(\\w+)\\s+from\\s+['"]${escapedName}['"]`,
103
+ 'gm',
104
+ )
105
+ while ((match = namespaceRe.exec(code)) !== null) {
106
+ const varName = match[1]
107
+ s.overwrite(
108
+ match.index,
109
+ match.index + match[0].length,
110
+ `const ${varName} = ${globalExpr}`,
111
+ )
112
+ modified = true
113
+ }
114
+ }
115
+
116
+ if (!modified) return null
117
+
118
+ return {
119
+ code: s.toString(),
120
+ map: s.generateMap({ hires: true }),
121
+ }
122
+ },
123
+ }
124
+ }
@@ -0,0 +1,39 @@
1
+ # {{NAME}}
2
+
3
+ {{NAME}} wasm 应用 — WasmNest Desktop wasm 应用工程(由 `wasmnest-plugin-desktop create` 生成)。
4
+
5
+ > 术语:本仓把「插件」称为 wasm 应用;`plugin.json` / CLI 命令 / SDK 包名仍用 `plugin` 原词。
6
+
7
+ ## 快速开始
8
+
9
+ ```bash
10
+ pnpm install # 安装依赖(含 SDK、vite、vue)
11
+ pnpm run dev # 浏览器开发环境(Dev Shell:空壳宿主 + 桌面端骨架,HMR)
12
+ pnpm run build # 构建:vite(前端)+ cargo(WASM,仅 rust-ts 插件)
13
+ pnpm run manifest # 按源码自动填充 plugin.json 的 contributes/permissions
14
+ ```
15
+
16
+ ## 目录结构
17
+
18
+ ```
19
+ ├── plugin.json # 应用清单(id/name/权限/扩展点声明)
20
+ ├── package.json # 工程脚本:dev / build / manifest
21
+ ├── vite.config.ts # 前端构建配置(产物 dist/index.js,vue 等外部化到宿主)
22
+ ├── tsconfig.json
23
+ ├── src/
24
+ │ ├── index.ts # 前端入口:activate(context) / deactivate()
25
+ │ └── env.d.ts # 环境类型声明
26
+ └── rust/ # WASM 后端(--rust 创建;ts-only 应用无此目录)
27
+ ├── Cargo.toml
28
+ └── src/lib.rs # WasmPlugin 实现(含 manifest 声明)
29
+ ```
30
+
31
+ ## 安装到 WasmNest Desktop
32
+
33
+ `pnpm run build -- --resources-dir <宿主资源父目录>` 把产物复制到
34
+ `<父目录>/{id}/`(内置应用随安装包分发);用户安装走宿主应用管理。
35
+
36
+ > 权限提醒:桌面端**无默认授予**——`storage` 等权限均需写入 `plugin.json` 的 `permissions`,
37
+ > 未声明即被拒(内置应用均显式声明了 `storage`)。
38
+
39
+ 完整开发指南见仓库文档 `../../../docs/wasm-app-dev-desktop.md`。
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "{{PKG_NAME}}",
3
+ "version": "0.0.1",
4
+ "license": "MIT",
5
+ "private": true,
6
+ "type": "module",
7
+ "scripts": {
8
+ "dev": "wasmnest-plugin-desktop dev",
9
+ "build": "wasmnest-plugin-desktop build",
10
+ "manifest": "wasmnest-plugin-desktop manifest"
11
+ },
12
+ "dependencies": {
13
+ "@binblink/wasmnest-plugin-sdk-desktop": "{{SDK_JS}}"
14
+ },
15
+ "devDependencies": {
16
+ "@vitejs/plugin-vue": "^6.0.0",
17
+ "vite": "^8.0.0",
18
+ "vue": "^3.4.0",
19
+ "vue-i18n": "^9.0.0",
20
+ "typescript": "^5.0.0",
21
+ "terser": "^5.0.0"
22
+ }
23
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "id": "{{ID}}",
3
+ "name": "{{NAME}}",
4
+ "version": "0.0.1",
5
+ "platform": "desktop",
6
+ "description": "",
7
+ "author": "{{AUTHOR}}",
8
+ "main": "index.js",
9
+ "sandbox": "inline",
10
+ "pluginType": "{{PLUGIN_TYPE}}",
11
+ {{RUST_LIBRARY_LINE}} "icon": "",
12
+ "permissions": ["storage"],
13
+ "contributes": {}
14
+ }
@@ -0,0 +1,21 @@
1
+ [package]
2
+ name = "{{CRATE}}"
3
+ version = "0.0.1"
4
+ license = "MIT"
5
+ description = "{{NAME}} 插件 WASM 后端"
6
+ authors = ["{{AUTHOR}}"]
7
+ edition = "2021"
8
+
9
+ [features]
10
+ default = []
11
+ # wasm:启用 WasmPlugin trait / wasm_entry! 宏(WASM 插件必开)
12
+ wasm = []
13
+
14
+ [lib]
15
+ crate-type = ["cdylib"]
16
+
17
+ [dependencies]
18
+ wasmnest-plugin-api = {{SDK_RUST}}
19
+ serde = { version = "1", features = ["derive"] }
20
+ serde_json = "1"
21
+ anyhow = "1"
@@ -0,0 +1,39 @@
1
+ //! {{NAME}} 插件后端(WASM)
2
+ //!
3
+ //! 最小可编译实现:激活/停用日志,命令返回未知命令错误。
4
+ //! 通过 wasmnest-plugin-api 的 WasmPlugin trait 实现,wasm_entry! 宏生成 ABI 导出。
5
+
6
+ use wasmnest_plugin_api::types::PluginManifest;
7
+ use wasmnest_plugin_api::{WasmHost, WasmPlugin};
8
+
9
+ struct {{STRUCT}};
10
+
11
+ impl WasmPlugin for {{STRUCT}} {
12
+ const ID: &'static str = "{{ID}}";
13
+
14
+ fn manifest() -> PluginManifest {
15
+ // plugin.json 为 manifest 单一事实来源(wasmnest-plugin-desktop build 时自动填充)
16
+ serde_json::from_str(include_str!("../../plugin.json"))
17
+ .expect("plugin.json must be valid PluginManifest")
18
+ }
19
+
20
+ fn activate() -> anyhow::Result<()> {
21
+ WasmHost.log_info("{{NAME}} plugin activated (wasm)");
22
+ Ok(())
23
+ }
24
+
25
+ fn deactivate() -> anyhow::Result<()> {
26
+ WasmHost.log_info("{{NAME}} plugin deactivated (wasm)");
27
+ Ok(())
28
+ }
29
+
30
+ fn invoke_command(_name: &str, _args: serde_json::Value) -> anyhow::Result<serde_json::Value> {
31
+ // 业务失败请携带业务语义码(ADR 0030 决定 6,零 ABI)——用户看到的是友好文案,
32
+ // 详情只进日志;code = 插件 i18n 注册后的完整 key:
33
+ // bail_with_code!("{{ID}}.errors.unknownCommand");
34
+ // bail_with_code!("{{ID}}.errors.throttled", serde_json::json!({ "waitSecs": 5 }));
35
+ Err(anyhow::anyhow!("No commands implemented"))
36
+ }
37
+ }
38
+
39
+ wasmnest_plugin_api::wasm_entry!({{STRUCT}});
@@ -0,0 +1,24 @@
1
+ /**
2
+ * SDK 类型环境声明(模板自身用)
3
+ *
4
+ * 模板是 create 命令生成的样板工程,生成前不依赖 node_modules——本声明让
5
+ * tsserver 在模板目录内可解析 SDK 包名(避免 Cannot find module 假阳性)。
6
+ * 生成的插件工程 `pnpm install` 后以真实 SDK 类型为准(ambient 声明优先级
7
+ * 低于实际模块解析,自动被覆盖),此文件仅作模板开发期的类型兜底。
8
+ */
9
+ declare module '@binblink/wasmnest-plugin-sdk-desktop' {
10
+ /** 插件上下文(最小可编译形状;生成工程以 SDK 真实类型为准) */
11
+ export interface PluginContext {
12
+ [key: string]: unknown
13
+ }
14
+ }
15
+
16
+ declare module '@binblink/wasmnest-plugin-sdk-desktop/ui' {
17
+ import type { DefineComponent } from 'vue'
18
+ const component: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>
19
+ export default component
20
+ }
21
+
22
+ declare module '@binblink/wasmnest-plugin-sdk-desktop/vite' {
23
+ export function wasmnestPlugin(options?: Record<string, unknown>): unknown
24
+ }
@@ -0,0 +1,37 @@
1
+ /**
2
+ * {{NAME}} 插件入口 (Desktop)
3
+ *
4
+ * 最小可编译模板:注册一个侧边栏面板(内联渲染函数组件,
5
+ * 面板 UI 较大时建议拆成独立 .vue 组件引入)。
6
+ */
7
+ import { defineComponent, h } from 'vue'
8
+ import type { PluginContext } from '@binblink/wasmnest-plugin-sdk-desktop'
9
+
10
+ let _ctx: PluginContext
11
+
12
+ export async function activate(context: PluginContext): Promise<void> {
13
+ _ctx = context
14
+
15
+ // 注册侧边栏面板(宿主经 PluginViewHost provide pluginContext,组件内可 inject)
16
+ context.ui.registerSidebarPanel({
17
+ id: '{{ID}}.sidebar',
18
+ title: '{{NAME}}',
19
+ icon: 'M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z',
20
+ order: 600,
21
+ component: defineComponent({
22
+ name: '{{STRUCT}}Panel',
23
+ render: () =>
24
+ h(
25
+ 'div',
26
+ { style: 'padding: 16px; color: var(--text-secondary); font-size: 13px' },
27
+ '{{NAME}} 面板内容 — 在这里编写你的插件 UI',
28
+ ),
29
+ }),
30
+ })
31
+
32
+ console.log('[{{ID}}] Plugin activated')
33
+ }
34
+
35
+ export async function deactivate(): Promise<void> {
36
+ console.log('[{{ID}}] Plugin deactivated')
37
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "strict": true,
7
+ "jsx": "preserve",
8
+ "resolveJsonModule": true,
9
+ "isolatedModules": true,
10
+ "esModuleInterop": true,
11
+ "lib": ["ES2020", "DOM", "DOM.Iterable"],
12
+ "skipLibCheck": true,
13
+ "noEmit": true
14
+ },
15
+ "include": ["src/**/*.ts", "src/**/*.vue"],
16
+ "exclude": ["node_modules", "rust"]
17
+ }
@@ -0,0 +1,21 @@
1
+ import { defineConfig } from 'vite'
2
+ import vue from '@vitejs/plugin-vue'
3
+ import { resolve } from 'node:path'
4
+ import { wasmnestPlugin } from '@binblink/wasmnest-plugin-sdk-desktop/vite'
5
+
6
+ export default defineConfig({
7
+ plugins: [vue(), wasmnestPlugin()],
8
+ define: {
9
+ 'process.env.NODE_ENV': JSON.stringify('production'),
10
+ },
11
+ build: {
12
+ lib: {
13
+ entry: resolve(__dirname, 'src/index.ts'),
14
+ formats: ['es'],
15
+ fileName: () => 'index.js',
16
+ },
17
+ outDir: resolve(__dirname, 'dist'),
18
+ emptyOutDir: true,
19
+ minify: 'terser',
20
+ },
21
+ })
@@ -0,0 +1,270 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "anyhow"
7
+ version = "1.0.104"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470"
10
+
11
+ [[package]]
12
+ name = "bitflags"
13
+ version = "2.13.1"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da"
16
+
17
+ [[package]]
18
+ name = "equivalent"
19
+ version = "1.0.2"
20
+ source = "registry+https://github.com/rust-lang/crates.io-index"
21
+ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
22
+
23
+ [[package]]
24
+ name = "foldhash"
25
+ version = "0.2.0"
26
+ source = "registry+https://github.com/rust-lang/crates.io-index"
27
+ checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
28
+
29
+ [[package]]
30
+ name = "hashbrown"
31
+ version = "0.17.1"
32
+ source = "registry+https://github.com/rust-lang/crates.io-index"
33
+ checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
34
+ dependencies = [
35
+ "foldhash",
36
+ ]
37
+
38
+ [[package]]
39
+ name = "id-arena"
40
+ version = "2.3.0"
41
+ source = "registry+https://github.com/rust-lang/crates.io-index"
42
+ checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954"
43
+
44
+ [[package]]
45
+ name = "indexmap"
46
+ version = "2.14.0"
47
+ source = "registry+https://github.com/rust-lang/crates.io-index"
48
+ checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9"
49
+ dependencies = [
50
+ "equivalent",
51
+ "hashbrown",
52
+ "serde",
53
+ "serde_core",
54
+ ]
55
+
56
+ [[package]]
57
+ name = "itoa"
58
+ version = "1.0.18"
59
+ source = "registry+https://github.com/rust-lang/crates.io-index"
60
+ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
61
+
62
+ [[package]]
63
+ name = "leb128fmt"
64
+ version = "0.1.0"
65
+ source = "registry+https://github.com/rust-lang/crates.io-index"
66
+ checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2"
67
+
68
+ [[package]]
69
+ name = "log"
70
+ version = "0.4.33"
71
+ source = "registry+https://github.com/rust-lang/crates.io-index"
72
+ checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad"
73
+
74
+ [[package]]
75
+ name = "memchr"
76
+ version = "2.8.3"
77
+ source = "registry+https://github.com/rust-lang/crates.io-index"
78
+ checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
79
+
80
+ [[package]]
81
+ name = "proc-macro2"
82
+ version = "1.0.107"
83
+ source = "registry+https://github.com/rust-lang/crates.io-index"
84
+ checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
85
+ dependencies = [
86
+ "unicode-ident",
87
+ ]
88
+
89
+ [[package]]
90
+ name = "quote"
91
+ version = "1.0.47"
92
+ source = "registry+https://github.com/rust-lang/crates.io-index"
93
+ checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
94
+ dependencies = [
95
+ "proc-macro2",
96
+ ]
97
+
98
+ [[package]]
99
+ name = "semver"
100
+ version = "1.0.28"
101
+ source = "registry+https://github.com/rust-lang/crates.io-index"
102
+ checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd"
103
+
104
+ [[package]]
105
+ name = "serde"
106
+ version = "1.0.229"
107
+ source = "registry+https://github.com/rust-lang/crates.io-index"
108
+ checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
109
+ dependencies = [
110
+ "serde_core",
111
+ ]
112
+
113
+ [[package]]
114
+ name = "serde_core"
115
+ version = "1.0.229"
116
+ source = "registry+https://github.com/rust-lang/crates.io-index"
117
+ checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
118
+ dependencies = [
119
+ "serde_derive",
120
+ ]
121
+
122
+ [[package]]
123
+ name = "serde_derive"
124
+ version = "1.0.229"
125
+ source = "registry+https://github.com/rust-lang/crates.io-index"
126
+ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
127
+ dependencies = [
128
+ "proc-macro2",
129
+ "quote",
130
+ "syn",
131
+ ]
132
+
133
+ [[package]]
134
+ name = "serde_json"
135
+ version = "1.0.151"
136
+ source = "registry+https://github.com/rust-lang/crates.io-index"
137
+ checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14"
138
+ dependencies = [
139
+ "itoa",
140
+ "memchr",
141
+ "serde",
142
+ "serde_core",
143
+ "zmij",
144
+ ]
145
+
146
+ [[package]]
147
+ name = "syn"
148
+ version = "3.0.3"
149
+ source = "registry+https://github.com/rust-lang/crates.io-index"
150
+ checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3"
151
+ dependencies = [
152
+ "proc-macro2",
153
+ "quote",
154
+ "unicode-ident",
155
+ ]
156
+
157
+ [[package]]
158
+ name = "unicode-ident"
159
+ version = "1.0.24"
160
+ source = "registry+https://github.com/rust-lang/crates.io-index"
161
+ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
162
+
163
+ [[package]]
164
+ name = "wasm-encoder"
165
+ version = "0.256.0"
166
+ source = "registry+https://github.com/rust-lang/crates.io-index"
167
+ checksum = "ec1492381bfd5ea51c2a99a919b676662559925cb8d7490547ec2e14c1ad3eb1"
168
+ dependencies = [
169
+ "leb128fmt",
170
+ "wasmparser",
171
+ ]
172
+
173
+ [[package]]
174
+ name = "wasm-metadata"
175
+ version = "0.256.0"
176
+ source = "registry+https://github.com/rust-lang/crates.io-index"
177
+ checksum = "d6187f9fce741db43bea48f1ec42174897d763b8cdea7df726f2dd05561848d7"
178
+ dependencies = [
179
+ "anyhow",
180
+ "indexmap",
181
+ "wasm-encoder",
182
+ "wasmparser",
183
+ ]
184
+
185
+ [[package]]
186
+ name = "wasmnest-componentize"
187
+ version = "0.0.1"
188
+ dependencies = [
189
+ "wit-component",
190
+ ]
191
+
192
+ [[package]]
193
+ name = "wasmparser"
194
+ version = "0.256.0"
195
+ source = "registry+https://github.com/rust-lang/crates.io-index"
196
+ checksum = "60bd825ffedc6cba8a642924ba7ae424afbc47811cffbcb7b92031ec24e59b4c"
197
+ dependencies = [
198
+ "bitflags",
199
+ "hashbrown",
200
+ "indexmap",
201
+ "semver",
202
+ ]
203
+
204
+ [[package]]
205
+ name = "wit-component"
206
+ version = "0.256.0"
207
+ source = "registry+https://github.com/rust-lang/crates.io-index"
208
+ checksum = "c3d537ec182eed18f560184b870287cf443c4eccc315af178db3eae8811c3b6c"
209
+ dependencies = [
210
+ "anyhow",
211
+ "bitflags",
212
+ "indexmap",
213
+ "log",
214
+ "serde",
215
+ "serde_derive",
216
+ "serde_json",
217
+ "wasm-encoder",
218
+ "wasm-metadata",
219
+ "wasmparser",
220
+ "wit-parser",
221
+ ]
222
+
223
+ [[package]]
224
+ name = "wit-parser"
225
+ version = "0.256.0"
226
+ source = "registry+https://github.com/rust-lang/crates.io-index"
227
+ checksum = "fa073dadefba859cb03f689a0c2e3efc51f883bf86b907eaa9709bfd9e3a00a9"
228
+ dependencies = [
229
+ "anyhow",
230
+ "hashbrown",
231
+ "id-arena",
232
+ "indexmap",
233
+ "log",
234
+ "semver",
235
+ "serde",
236
+ "serde_derive",
237
+ "serde_json",
238
+ "unicode-ident",
239
+ "wasmparser",
240
+ ]
241
+
242
+ [[package]]
243
+ name = "zmij"
244
+ version = "1.0.23"
245
+ source = "registry+https://github.com/rust-lang/crates.io-index"
246
+ checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
247
+
248
+ [[patch.unused]]
249
+ name = "wasmnest-plugin-api"
250
+ version = "0.0.1"
251
+
252
+ [[patch.unused]]
253
+ name = "wasmnest-plugin-api-macros"
254
+ version = "0.0.1"
255
+
256
+ [[patch.unused]]
257
+ name = "wasmnest-server-base"
258
+ version = "0.0.1"
259
+
260
+ [[patch.unused]]
261
+ name = "wasmnest-server-core"
262
+ version = "0.0.1"
263
+
264
+ [[patch.unused]]
265
+ name = "wasmnest-server-http"
266
+ version = "0.0.1"
267
+
268
+ [[patch.unused]]
269
+ name = "wasmnest-server-websocket"
270
+ version = "0.0.1"