| 41 | const mcpAppsShellHtml = join(mcpAppsShellDir, "dist/mcp-app.html"); |
| 42 | |
| 43 | const ensureMcpAppsShell = async (): Promise<string> => { |
| 44 | if (!existsSync(mcpAppsShellHtml)) { |
| 45 | console.log("Building MCP-Apps shell (mcp-app.html)..."); |
| 46 | await $`bun run --cwd ${mcpAppsShellDir} build:shell`.quiet(); |
| 47 | } |
| 48 | if (!existsSync(mcpAppsShellHtml)) { |
| 49 | throw new Error(`MCP-Apps shell missing at ${mcpAppsShellHtml} after build:shell`); |
| 50 | } |
| 51 | return mcpAppsShellHtml; |
| 52 | }; |
| 53 | |
| 54 | const resolveOnePasswordCoreWasmPath = (): string => { |
| 55 | const req = createRequire(join(repoRoot, "packages/plugins/onepassword/package.json")); |