@arbidocs/cli 0.1.2 → 0.1.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.
package/dist/index.cjs CHANGED
@@ -4967,41 +4967,20 @@ Models (${data.models_health.application}):`);
4967
4967
  })
4968
4968
  );
4969
4969
  }
4970
- function findTuiEntryPoint() {
4971
- const require2 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));
4972
- try {
4973
- return require2.resolve("@arbidocs/tui");
4974
- } catch {
4975
- }
4976
- try {
4977
- const resolved = child_process.execFileSync("which", ["arbi-tui"], { encoding: "utf-8" }).trim();
4978
- if (resolved) return resolved;
4979
- } catch {
4980
- }
4981
- return null;
4982
- }
4983
4970
  function registerTuiCommand(program2) {
4984
4971
  program2.command("tui").description("Launch interactive terminal UI").option("-w, --workspace <id>", "Workspace ID to use").allowUnknownOption(true).action((opts, cmd) => {
4972
+ const require2 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));
4973
+ const entryPoint = require2.resolve("@arbidocs/tui");
4985
4974
  const args = [];
4986
4975
  if (opts.workspace) {
4987
4976
  args.push("-w", opts.workspace);
4988
4977
  }
4989
4978
  args.push(...cmd.args);
4990
- const entryPoint = findTuiEntryPoint();
4991
- if (entryPoint) {
4992
- const child = child_process.spawn(process.execPath, [entryPoint, ...args], {
4993
- stdio: "inherit",
4994
- env: process.env
4995
- });
4996
- child.on("exit", (code) => process.exit(code ?? 0));
4997
- } else {
4998
- console.log("arbi-tui not installed locally. Launching via npx...\n");
4999
- const child = child_process.spawn("npx", ["--yes", "@arbidocs/tui", ...args], {
5000
- stdio: "inherit",
5001
- env: process.env
5002
- });
5003
- child.on("exit", (code) => process.exit(code ?? 0));
5004
- }
4979
+ const child = child_process.spawn(process.execPath, [entryPoint, ...args], {
4980
+ stdio: "inherit",
4981
+ env: process.env
4982
+ });
4983
+ child.on("exit", (code) => process.exit(code ?? 0));
5005
4984
  });
5006
4985
  }
5007
4986