@cartanova/qgrid-cli 1.5.1 → 1.5.2

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/cli.js +4 -3
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -20,9 +20,10 @@ program.name("qgrid").version(pkg.version).description("Qgrid — LLM subscripti
20
20
  if (!opts.skipUpdate) {
21
21
  const latest = execSync("npm view @cartanova/qgrid-cli version", { encoding: "utf-8" }).trim();
22
22
  if (latest !== pkg.version) {
23
- console.log(`@@Updating qgrid-cli: ${pkg.version} ${latest}@@`);
24
- execSync("npm i -g @cartanova/qgrid-cli@latest", { stdio: "inherit" });
25
- console.log("@@Updated. Restarting...\n@@");
23
+ const installCmd = process.env.npm_config_user_agent?.includes("pnpm") || execSync("which qgrid", { encoding: "utf-8" }).includes("pnpm") ? "pnpm add -g @cartanova/qgrid-cli@latest" : "npm i -g @cartanova/qgrid-cli@latest";
24
+ console.log(`Updating qgrid-cli: ${pkg.version} ${latest}`);
25
+ execSync(installCmd, { stdio: "inherit" });
26
+ console.log("Updated. Restarting...\n");
26
27
  execSync(`qgrid ${process.argv.slice(2).concat("--skip-update").join(" ")}`, { stdio: "inherit" });
27
28
  process.exit(0);
28
29
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cartanova/qgrid-cli",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/cartanova-ai/qgrid"