(env: PiIsolatedEnv)
| 106 | } |
| 107 | |
| 108 | export function ensurePluginAvailable(env: PiIsolatedEnv): void { |
| 109 | const distEntry = join(PI_PLUGIN_ROOT, "dist", "index.js"); |
| 110 | if (!existsSync(distEntry)) { |
| 111 | throw new Error(`${distEntry} is missing. Run: cd packages/pi-plugin && bun run build`); |
| 112 | } |
| 113 | if (!existsSync(env.pluginDir)) { |
| 114 | symlinkSync(PI_PLUGIN_ROOT, env.pluginDir, "dir"); |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | export function writeConfigs(env: PiIsolatedEnv, opts: PiRunnerOptions): void { |
| 119 | ensurePluginAvailable(env); |