@zzznpm/clavis 1.2.2 → 1.2.3

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 (2) hide show
  1. package/dist/index.js +11 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1713,6 +1713,7 @@ import { program } from "commander";
1713
1713
  import { createInterface } from "readline";
1714
1714
  import { spawn } from "child_process";
1715
1715
  import { createRequire } from "module";
1716
+ import { dirname, join } from "path";
1716
1717
  import { fileURLToPath } from "url";
1717
1718
  import { promises as fs3 } from "fs";
1718
1719
 
@@ -1787,9 +1788,18 @@ import { setPassword as setPassword2, getPassword as getPassword3 } from "cross-
1787
1788
  var require2 = createRequire(import.meta.url);
1788
1789
  var { version } = require2("../package.json");
1789
1790
  var storage = new SecretStorage_default();
1791
+ var resolveSolidPreload = () => {
1792
+ try {
1793
+ const solidEntry = require2.resolve("@opentui/solid");
1794
+ return join(dirname(solidEntry), "scripts", "preload.js");
1795
+ } catch {
1796
+ return "@opentui/solid/preload";
1797
+ }
1798
+ };
1790
1799
  var startTUIWithBun = () => new Promise((resolve, reject) => {
1791
1800
  const entryFile = fileURLToPath(import.meta.url);
1792
- const child = spawn("bun", ["--preload", "@opentui/solid/preload", entryFile, ...process.argv.slice(2)], { stdio: "inherit" });
1801
+ const preloadFile = resolveSolidPreload();
1802
+ const child = spawn("bun", ["--preload", preloadFile, entryFile, ...process.argv.slice(2)], { stdio: "inherit" });
1793
1803
  child.on("error", (error) => {
1794
1804
  if (error.code === "ENOENT") reject(new Error("Bun is required for the TUI. Install it from https://bun.sh."));
1795
1805
  else reject(error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zzznpm/clavis",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "API Token Management System CLI",
5
5
  "main": "dist/index.js",
6
6
  "bin": {