@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.
- package/dist/cli.js +4 -3
- 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
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
}
|