release: publish v2.0.35 settings validation fix
This commit is contained in:
@@ -2,6 +2,18 @@
|
|||||||
|
|
||||||
All notable changes to Multi-Debrid Downloader are documented in this file.
|
All notable changes to Multi-Debrid Downloader are documented in this file.
|
||||||
|
|
||||||
|
## [2.0.35] - 2026-08-13
|
||||||
|
|
||||||
|
### Settings reliability
|
||||||
|
|
||||||
|
- Accepted omitted optional values inside nested account status records when saving a complete settings draft.
|
||||||
|
- Prevented valid Debrid-Link and Mega-Debrid account states from triggering an invalid settings payload after account checks or provider changes.
|
||||||
|
|
||||||
|
### Release validation
|
||||||
|
|
||||||
|
- Added a full renderer-settings regression fixture with a checked Debrid-Link account and an omitted optional e-mail field.
|
||||||
|
- Verified account toggle sequencing, renderer settings validation, and the packaged main-process build.
|
||||||
|
|
||||||
## [2.0.34] - 2026-08-13
|
## [2.0.34] - 2026-08-13
|
||||||
|
|
||||||
### Account recovery and rotation
|
### Account recovery and rotation
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "real-debrid-downloader",
|
"name": "real-debrid-downloader",
|
||||||
"version": "2.0.34",
|
"version": "2.0.35",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "real-debrid-downloader",
|
"name": "real-debrid-downloader",
|
||||||
"version": "2.0.34",
|
"version": "2.0.35",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"adm-zip": "0.6.0",
|
"adm-zip": "0.6.0",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "real-debrid-downloader",
|
"name": "real-debrid-downloader",
|
||||||
"version": "2.0.34",
|
"version": "2.0.35",
|
||||||
"description": "Desktop downloader",
|
"description": "Desktop downloader",
|
||||||
"main": "build/main/main/main.js",
|
"main": "build/main/main/main.js",
|
||||||
"author": "Sucukdeluxe",
|
"author": "Sucukdeluxe",
|
||||||
|
|||||||
@@ -30,7 +30,11 @@ function validateJsonValue(value: unknown, depth = 0): void {
|
|||||||
}
|
}
|
||||||
const entries = Object.entries(value as Record<string, unknown>);
|
const entries = Object.entries(value as Record<string, unknown>);
|
||||||
if (entries.length > 10_000) invalid();
|
if (entries.length > 10_000) invalid();
|
||||||
entries.forEach(([, entry]) => validateJsonValue(entry, depth + 1));
|
entries.forEach(([, entry]) => {
|
||||||
|
if (entry !== undefined) {
|
||||||
|
validateJsonValue(entry, depth + 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function validateTopLevelType(value: unknown, expected: unknown): void {
|
function validateTopLevelType(value: unknown, expected: unknown): void {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { describe, expect, it } from "vitest";
|
import { describe, expect, it } from "vitest";
|
||||||
import { defaultSettings } from "../src/main/constants";
|
import { defaultSettings } from "../src/main/constants";
|
||||||
import { validateRendererSettingsUpdate } from "../src/main/renderer-settings";
|
import { validateRendererSettingsUpdate } from "../src/main/renderer-settings";
|
||||||
|
import { createRendererSettings } from "../src/main/renderer-state";
|
||||||
|
|
||||||
describe("renderer settings validation", () => {
|
describe("renderer settings validation", () => {
|
||||||
it("ignores undefined optional fields from a stale renderer draft", () => {
|
it("ignores undefined optional fields from a stale renderer draft", () => {
|
||||||
@@ -17,4 +18,26 @@ describe("renderer settings validation", () => {
|
|||||||
debridLinkDisabledKeyIds: []
|
debridLinkDisabledKeyIds: []
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("accepts a complete renderer draft with an optional nested account status field omitted", () => {
|
||||||
|
const current = defaultSettings();
|
||||||
|
current.debridAccountStatuses = {
|
||||||
|
"debridlink-key": {
|
||||||
|
accountId: "debridlink-key",
|
||||||
|
provider: "debridlink",
|
||||||
|
label: "Debrid-Link",
|
||||||
|
maskedLogin: "abc***xyz",
|
||||||
|
valid: true,
|
||||||
|
isPremium: true,
|
||||||
|
premiumUntilMs: null,
|
||||||
|
message: "Premium",
|
||||||
|
checkedAt: 1
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const rendererDraft = createRendererSettings(current);
|
||||||
|
|
||||||
|
const result = validateRendererSettingsUpdate(rendererDraft, current);
|
||||||
|
|
||||||
|
expect(result.debridAccountStatuses).toEqual(rendererDraft.debridAccountStatuses);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user