@danhachuel/thunderbolt 0.2.94 → 0.2.96

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 CHANGED
@@ -180,9 +180,10 @@ st.markdown("""
180
180
  [data-testid="stSidebar"] [data-testid="stExpander"] summary p { margin:0; line-height:1; }
181
181
  [data-testid="stSidebar"] [data-testid="stExpander"] > div { padding:0 0 0 0.42rem !important; }
182
182
  [data-testid="stSidebar"] [data-testid="stExpander"] > div [data-testid="stButton"] button { padding-left:0.92rem; font-size:0.83rem; min-height:1.62rem; height:1.62rem; }
183
- .content-card { padding:1rem 1.1rem; border:1px solid color-mix(in srgb, currentColor 16%, transparent); border-radius:14px; background:color-mix(in srgb, currentColor 4%, transparent); min-height:110px; }
184
- .content-label { color:inherit; opacity:.62; font-size:.8rem; text-transform:uppercase; letter-spacing:.07em; }
185
- .content-value { color:inherit; font-size:1.8rem; font-weight:700; margin-top:.3rem; }
183
+ .content-card { box-sizing:border-box; padding:1rem 1.1rem; border:1px solid #2b3b4d; border-radius:14px; background:#121b26; min-height:110px; box-shadow:0 4px 14px rgba(0,0,0,.18); }
184
+ .content-label { color:#b9c7d6; opacity:.92; font-size:.8rem; text-transform:uppercase; letter-spacing:.07em; }
185
+ .content-value { color:#f4f8fb; font-size:1.8rem; font-weight:700; margin-top:.3rem; }
186
+ .content-card .small-muted { color:#a9b8c8; opacity:.9; }
186
187
  .stage { border-left:3px solid var(--tb-accent); padding:.65rem .8rem; margin:.4rem 0; background:color-mix(in srgb, currentColor 4%, transparent); border-radius:8px; }
187
188
  .small-muted { color:inherit; opacity:.65; font-size:.85rem; }
188
189
  .tb-cuts-hero { max-width:860px; margin:0 auto 1.1rem; padding:1.6rem 1.4rem 1.35rem; text-align:center; border:1px solid color-mix(in srgb, currentColor 18%, transparent); border-radius:18px; background:radial-gradient(circle at 50% 0, color-mix(in srgb, var(--tb-gold) 16%, transparent), transparent 58%), color-mix(in srgb, currentColor 4%, transparent); box-shadow:0 18px 48px color-mix(in srgb, currentColor 12%, transparent); }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danhachuel/thunderbolt",
3
- "version": "0.2.94",
3
+ "version": "0.2.96",
4
4
  "description": "Thunderbolt — interface local para operação de canais faceless e motor MoneyPrinterTurbo",
5
5
  "license": "MIT",
6
6
  "main": "scripts/cli.mjs",
package/scripts/cli.mjs CHANGED
@@ -153,7 +153,15 @@ if (args[0] === "pipeline-worker" || args.includes("--pipeline-worker")) {
153
153
 
154
154
  const port = process.env.THUNDERBOLT_PORT || process.env.HERMES_PORT || "3030";
155
155
  const publicPort = Number.parseInt(String(port), 10);
156
- const backendPort = Number.isFinite(publicPort) ? publicPort + 1 : 3031;
156
+ const backendPort = await new Promise((resolve, reject) => {
157
+ const reservation = net.createServer();
158
+ reservation.once("error", reject);
159
+ reservation.listen(0, "127.0.0.1", () => {
160
+ const address = reservation.address();
161
+ const selectedPort = address && typeof address === "object" ? address.port : 0;
162
+ reservation.close((error) => error ? reject(error) : resolve(selectedPort));
163
+ });
164
+ });
157
165
  const supportedLanguages = new Set(["en", "zh", "de", "vi", "tr", "pt", "ru", "es", "id", "it"]);
158
166
 
159
167
  const proxy = http.createServer((request, response) => {
@@ -196,7 +204,9 @@ proxy.on("upgrade", (request, clientSocket, head) => {
196
204
  upstreamSocket.on("error", () => clientSocket.destroy());
197
205
  });
198
206
 
199
- proxy.listen(publicPort, "127.0.0.1");
207
+ proxy.listen(publicPort, "127.0.0.1", () => {
208
+ console.log(`Thunderbolt: interface disponível em http://localhost:${publicPort}/`);
209
+ });
200
210
  const worker = spawn(python, ["-m", "hermes_ui.automation_worker"], {
201
211
  cwd: root,
202
212
  stdio: "inherit",
@@ -211,7 +221,7 @@ const pipelineWorker = spawn(python, ["-m", "hermes_ui.pipeline_worker"], {
211
221
  });
212
222
  const child = spawn(python, ["-m", "streamlit", "run", main, "--server.port", String(backendPort), "--server.address", "127.0.0.1"], {
213
223
  cwd: root,
214
- stdio: "inherit",
224
+ stdio: "ignore",
215
225
  env: runtimeEnv,
216
226
  windowsHide: false,
217
227
  });