refactor(runtime): replace Bun dependency with Node fetch
Run Perplexity search and auth requests through pi's Node runtime instead of shelling out to Bun. Move development and CI commands to npm, add a Node test build path, and keep OTP auth fail-fast when Set-Cookie headers are not available.
This commit is contained in:
+2
-2
@@ -1,4 +1,4 @@
|
||||
import { describe, expect, test, beforeEach, afterEach } from "bun:test";
|
||||
import { afterEach, beforeEach, describe, expect, test } from "./test-helpers.js";
|
||||
import { mkdtemp, readFile, rm, stat, writeFile } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
@@ -17,7 +17,7 @@ beforeEach(async () => {
|
||||
tempDir = await mkdtemp(join(tmpdir(), "pi-perplexity-test-"));
|
||||
configPath = join(tempDir, "config.json");
|
||||
|
||||
const mod = await import(`../src/config.ts?t=${Date.now()}`);
|
||||
const mod = await import(`../src/config.js?t=${Date.now()}`);
|
||||
loadConfig = mod.loadConfig;
|
||||
saveConfig = mod.saveConfig;
|
||||
resolveSearchDefaults = mod.resolveSearchDefaults;
|
||||
|
||||
Reference in New Issue
Block a user