@danhachuel/thunderbolt 0.5.3 → 0.5.4

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/scripts/cli.mjs +12 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danhachuel/thunderbolt",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
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
@@ -187,6 +187,18 @@ const supportedLanguages = new Set(["en", "zh", "de", "vi", "tr", "pt", "ru", "e
187
187
  const proxy = http.createServer((request, response) => {
188
188
  const requestUrl = new URL(request.url || "/", `http://localhost:${publicPort}`);
189
189
  const pathParts = requestUrl.pathname.split("/").filter(Boolean);
190
+ if (requestUrl.pathname === "/oauth/redirect") {
191
+ requestUrl.pathname = "/";
192
+ requestUrl.searchParams.set("page", "Configuração API");
193
+ response.writeHead(302, {
194
+ Location: `${requestUrl.pathname}${requestUrl.search}`,
195
+ "Cache-Control": "no-store, no-cache, must-revalidate, max-age=0",
196
+ Pragma: "no-cache",
197
+ Expires: "0",
198
+ });
199
+ response.end();
200
+ return;
201
+ }
190
202
  const languagePrefix = pathParts.length === 1 && supportedLanguages.has(pathParts[0]) ? pathParts[0] : "";
191
203
  if (languagePrefix) {
192
204
  requestUrl.pathname = "/";