@danhachuel/thunderbolt 0.4.94 → 0.4.95
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/app/main.py +1 -0
- package/package.json +1 -1
- package/scripts/cli.mjs +4 -3
- package/scripts/install.mjs +1 -1
package/app/main.py
CHANGED
package/package.json
CHANGED
package/scripts/cli.mjs
CHANGED
|
@@ -26,13 +26,13 @@ const venvPython = platform() === "win32" ? join(venvDir, "Scripts", "python.exe
|
|
|
26
26
|
const python = process.env.THUNDERBOLT_PYTHON || process.env.HERMES_PYTHON || (existsSync(venvPython) ? venvPython : (platform() === "win32" ? "python" : "python3"));
|
|
27
27
|
const main = resolve(root, "app", "main.py");
|
|
28
28
|
const settingsPath = join(thunderboltHome, "storage", "state", "settings.json");
|
|
29
|
-
const pythonEnvironment = { ...process.env, PYTHONIOENCODING: "utf-8", PYTHONUTF8: "1", CLICK_NO_WIN_CONSOLE: "1" };
|
|
29
|
+
const pythonEnvironment = { ...process.env, PYTHONIOENCODING: "utf-8", PYTHONUTF8: "1", PYTHONLEGACYWINDOWSSTDIO: "1", CLICK_NO_WIN_CONSOLE: "1" };
|
|
30
30
|
|
|
31
31
|
function run(command, commandArgs, label = "comando", environment = process.env) {
|
|
32
32
|
console.log(`Thunderbolt: a iniciar ${label}...`);
|
|
33
33
|
const result = spawnSync(command, commandArgs, {
|
|
34
34
|
stdio: "inherit",
|
|
35
|
-
env: { ...pythonEnvironment, ...environment, PYTHONIOENCODING: "utf-8", PYTHONUTF8: "1" },
|
|
35
|
+
env: { ...pythonEnvironment, ...environment, PYTHONIOENCODING: "utf-8", PYTHONUTF8: "1", PYTHONLEGACYWINDOWSSTDIO: "1", CLICK_NO_WIN_CONSOLE: "1" },
|
|
36
36
|
cwd: root,
|
|
37
37
|
windowsHide: false,
|
|
38
38
|
});
|
|
@@ -155,6 +155,7 @@ const runtimeEnv = {
|
|
|
155
155
|
...process.env,
|
|
156
156
|
PYTHONIOENCODING: "utf-8",
|
|
157
157
|
PYTHONUTF8: "1",
|
|
158
|
+
PYTHONLEGACYWINDOWSSTDIO: "1",
|
|
158
159
|
CLICK_NO_WIN_CONSOLE: "1",
|
|
159
160
|
THUNDERBOLT_STORAGE_DIR: storageDir,
|
|
160
161
|
STREAMLIT_BROWSER_GATHER_USAGE_STATS: "false",
|
|
@@ -258,7 +259,7 @@ function startStreamlit() {
|
|
|
258
259
|
child = spawn(python, ["-m", "streamlit", "run", main, "--server.port", String(backendPort), "--server.address", "127.0.0.1"], {
|
|
259
260
|
cwd: root,
|
|
260
261
|
stdio: "inherit",
|
|
261
|
-
env: { ...runtimeEnv, PYTHONIOENCODING: "utf-8", PYTHONUTF8: "1", CLICK_NO_WIN_CONSOLE: "1", THUNDERBOLT_LAUNCHER_RESTART: "1" },
|
|
262
|
+
env: { ...runtimeEnv, PYTHONIOENCODING: "utf-8", PYTHONUTF8: "1", PYTHONLEGACYWINDOWSSTDIO: "1", CLICK_NO_WIN_CONSOLE: "1", THUNDERBOLT_LAUNCHER_RESTART: "1" },
|
|
262
263
|
windowsHide: false,
|
|
263
264
|
});
|
|
264
265
|
child.on("error", (error) => {
|
package/scripts/install.mjs
CHANGED
|
@@ -42,7 +42,7 @@ const defaultMpt = process.env.MONEYPRINTER_PATH || join(thunderboltHome, "Money
|
|
|
42
42
|
const dependencyStatePath = join(thunderboltHome, "storage", "state", "install-state.json");
|
|
43
43
|
const forceDeps = args.includes("--force-deps");
|
|
44
44
|
const refreshMoneyPrinter = args.includes("--refresh-moneyprinter");
|
|
45
|
-
const pythonEnvironment = { ...process.env, PYTHONIOENCODING: "utf-8", PYTHONUTF8: "1", CLICK_NO_WIN_CONSOLE: "1" };
|
|
45
|
+
const pythonEnvironment = { ...process.env, PYTHONIOENCODING: "utf-8", PYTHONUTF8: "1", PYTHONLEGACYWINDOWSSTDIO: "1", CLICK_NO_WIN_CONSOLE: "1" };
|
|
46
46
|
|
|
47
47
|
function legacyRoots() {
|
|
48
48
|
const userProfile = process.env.USERPROFILE || home;
|