planche 0.7.10 → 0.7.11
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.js +10 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1690,7 +1690,7 @@ import { spawnSync } from "child_process";
|
|
|
1690
1690
|
import { existsSync as existsSync2, mkdirSync, readFileSync as readFileSync2, rmSync, writeFileSync } from "fs";
|
|
1691
1691
|
import { homedir as homedir5 } from "os";
|
|
1692
1692
|
import { createInterface } from "readline/promises";
|
|
1693
|
-
import { dirname as dirname3, join as join5, resolve as resolve3 } from "path";
|
|
1693
|
+
import { delimiter, dirname as dirname3, join as join5, resolve as resolve3 } from "path";
|
|
1694
1694
|
import { fileURLToPath } from "url";
|
|
1695
1695
|
var MANIFEST = "install.json";
|
|
1696
1696
|
var PLANCHE_DIR3 = join5(homedir5(), ".planche");
|
|
@@ -1734,12 +1734,18 @@ SQLite connections will fail until the native bindings are rebuilt \u2014 run: p
|
|
|
1734
1734
|
}
|
|
1735
1735
|
function npmCommand(manifest) {
|
|
1736
1736
|
const node = manifest.node && existsSync2(manifest.node) ? manifest.node : process.execPath;
|
|
1737
|
-
if (manifest.npmCli && existsSync2(manifest.npmCli)) return { cmd: node, args: [manifest.npmCli], shell: false };
|
|
1737
|
+
if (manifest.npmCli && existsSync2(manifest.npmCli)) return { cmd: node, args: [manifest.npmCli], shell: false, node };
|
|
1738
1738
|
if (manifest.npm && existsSync2(manifest.npm)) {
|
|
1739
|
-
return { cmd: manifest.npm, args: [], shell: process.platform === "win32" };
|
|
1739
|
+
return { cmd: manifest.npm, args: [], shell: process.platform === "win32", node };
|
|
1740
1740
|
}
|
|
1741
1741
|
return null;
|
|
1742
1742
|
}
|
|
1743
|
+
function npmEnv(node) {
|
|
1744
|
+
const env = { ...process.env };
|
|
1745
|
+
const key = Object.keys(env).find((k) => k.toUpperCase() === "PATH") ?? "PATH";
|
|
1746
|
+
env[key] = `${dirname3(node)}${delimiter}${env[key] ?? ""}`;
|
|
1747
|
+
return env;
|
|
1748
|
+
}
|
|
1743
1749
|
var VERSION_SPEC = /^(latest|next|\d+\.\d+\.\d+(-[0-9A-Za-z.]+)?)$/;
|
|
1744
1750
|
function runUpgrade(target) {
|
|
1745
1751
|
if (!VERSION_SPEC.test(target)) {
|
|
@@ -1763,7 +1769,7 @@ function runUpgrade(target) {
|
|
|
1763
1769
|
const result = spawnSync(
|
|
1764
1770
|
npm.cmd,
|
|
1765
1771
|
[...npm.args, "install", "--prefix", prefix, "--omit=dev", "--no-audit", "--no-fund", "--loglevel=error", `planche@${target}`],
|
|
1766
|
-
{ stdio: "inherit", shell: npm.shell }
|
|
1772
|
+
{ stdio: "inherit", shell: npm.shell, env: npmEnv(npm.node) }
|
|
1767
1773
|
);
|
|
1768
1774
|
if (result.status !== 0) {
|
|
1769
1775
|
console.error("Upgrade failed. Re-run the installer to repair the install:");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "planche",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.11",
|
|
4
4
|
"description": "Local agent for Planche \u2014 lets the browser-based Planche SQL client reach MySQL/MariaDB/PostgreSQL/SQLite/SQL Server/Oracle/Neon/Supabase/Cloudflare D1 databases from your machine.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"homepage": "https://planche.dev",
|