Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/Browser/api/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,28 @@ import pkg from '../../../package.json';
* @type {string}

@cubic-dev-ai cubic-dev-ai Bot Aug 11, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: These fallbacks are dead branches for required, statically initialized imports and create duplicate sources of truth; the version fallback is already unrelated to the package version. Keeping the direct property exports avoids future drift across configuration files.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At lib/Browser/api/http.ts, line 15:

<comment>These fallbacks are dead branches for required, statically initialized imports and create duplicate sources of truth; the version fallback is already unrelated to the package version. Keeping the direct property exports avoids future drift across configuration files.</comment>

<file context>
@@ -12,28 +12,28 @@ import pkg from '../../../package.json';
  * @memberof module:BrowserInternal
  */
-export const API_URL = configData.config.baseUrl;
+export const API_URL = configData.config.baseUrl || "https://backend1.tioo.eu.org";
 
 /**
</file context>
Fix with cubic

* @memberof module:BrowserInternal
*/
export const API_URL = configData.config.baseUrl;
export const API_URL = configData.config.baseUrl || "https://backend1.tioo.eu.org";

/**
* The developer signature for the library.
* @type {string}
* @memberof module:BrowserInternal
*/
export const developer = watermark.dev;
export const developer = watermark.dev || "BOTCAHX";

/**
* The URL for reporting issues.
* @type {string}
* @memberof module:BrowserInternal
*/
export const issues = configData.issues;
export const issues = configData.issues || "https://github.com/hostinger-bot/btch-downloader/issues";

/**
* The current version of the library.
* @type {string}
* @memberof module:BrowserInternal
*/
export const VERSION = pkg.version;
export const VERSION = pkg.version || "1.0.0";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Keep the VERSION fallback aligned with the package version.

package.json declares version 6.3.6, but this fallback returns 1.0.0. When pkg.version is unavailable, consumers receive incorrect library metadata. Use one version source, or update the fallback to the release version and keep it synchronized.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@lib/Browser/api/http.ts` at line 36, Update the VERSION constant in the
package metadata export to avoid the stale "1.0.0" fallback: either reuse a
single package version source or change the fallback to the declared release
version 6.3.6 and keep it synchronized with package.json.


/**
* Performs a GET request to the backend API.
Expand Down
Loading