@pikaa-ai/pikaa 0.3.28 → 0.4.0

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.
package/bin/pikaa.js CHANGED
@@ -153,10 +153,13 @@ function launchBinary(binPath) {
153
153
 
154
154
  function tryLaunchWithBun() {
155
155
  const jsEntry = join(rootDir, "dist", "cli.js");
156
- if (existsSync(jsEntry)) {
156
+ const tsEntry = join(rootDir, "src", "cli", "index.ts");
157
+ const targetEntry = existsSync(jsEntry) ? jsEntry : (existsSync(tsEntry) ? tsEntry : null);
158
+
159
+ if (targetEntry) {
157
160
  const probe = spawnSync("bun", ["--version"], { encoding: "utf8" });
158
161
  if (!probe.error) {
159
- const r = spawnSync("bun", ["run", jsEntry, ...process.argv.slice(2)], {
162
+ const r = spawnSync("bun", ["run", targetEntry, ...process.argv.slice(2)], {
160
163
  stdio: "inherit",
161
164
  env: process.env,
162
165
  });