@danhachuel/thunderbolt 0.5.90 → 0.5.91
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/package.json +1 -1
- package/scripts/cli.mjs +4 -4
package/package.json
CHANGED
package/scripts/cli.mjs
CHANGED
|
@@ -26,7 +26,8 @@ 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 streamlitBootstrap = resolve(root, "scripts", "streamlit_bootstrap.py");
|
|
29
|
-
const
|
|
29
|
+
const storageDir = process.env.THUNDERBOLT_STORAGE_DIR || join(thunderboltHome, "storage");
|
|
30
|
+
const settingsPath = join(storageDir, "state", "settings.json");
|
|
30
31
|
const pythonEnvironment = { ...process.env, PYTHONIOENCODING: "utf-8", PYTHONUTF8: "1", PYTHONLEGACYWINDOWSSTDIO: "1", CLICK_NO_WIN_CONSOLE: "1" };
|
|
31
32
|
|
|
32
33
|
function run(command, commandArgs, label = "comando", environment = process.env) {
|
|
@@ -68,7 +69,7 @@ function configuredMoneyPrinterPath() {
|
|
|
68
69
|
}
|
|
69
70
|
|
|
70
71
|
function readStateJson(filename, fallback = []) {
|
|
71
|
-
try { return JSON.parse(readFileSync(join(
|
|
72
|
+
try { return JSON.parse(readFileSync(join(storageDir, "state", filename), "utf8")); }
|
|
72
73
|
catch { return fallback; }
|
|
73
74
|
}
|
|
74
75
|
|
|
@@ -85,7 +86,7 @@ function hasPendingPipelineWork() {
|
|
|
85
86
|
}
|
|
86
87
|
|
|
87
88
|
function ensureRuntimeStorage() {
|
|
88
|
-
const storageRoot =
|
|
89
|
+
const storageRoot = storageDir;
|
|
89
90
|
const directories = [
|
|
90
91
|
storageRoot,
|
|
91
92
|
join(storageRoot, "state"),
|
|
@@ -168,7 +169,6 @@ if (!existsSync(main)) {
|
|
|
168
169
|
process.exit(1);
|
|
169
170
|
}
|
|
170
171
|
ensureRuntimeStorage();
|
|
171
|
-
const storageDir = process.env.THUNDERBOLT_STORAGE_DIR || join(thunderboltHome, "storage");
|
|
172
172
|
const runtimeEnv = {
|
|
173
173
|
...process.env,
|
|
174
174
|
PYTHONIOENCODING: "utf-8",
|