port 040 config (#2657)

* port 040 config, WIP

* update fixtures

* use taiga modal for backups too

* fix: update Taiga UI and refactor everything to work

* chore: package-lock

* fix interfaces and mocks for interfaces

* better mocks

* function to transform old spec to new

* delete unused fns

* delete unused FE config utils

* fix exports from sdk

* reorganize exports

* functions to translate config

* rename unionSelectKey and unionValueKey

* Adding in the transformation of the getConfig to the new types.

* chore: add Taiga UI to preloader

---------

Co-authored-by: waterplea <alexander@inkin.ru>
Co-authored-by: Aiden McClelland <me@drbonez.dev>
Co-authored-by: J H <dragondef@gmail.com>
This commit is contained in:
Matt Hill
2024-07-10 11:58:02 -06:00
committed by GitHub
parent 822dd5e100
commit f76e822381
173 changed files with 9761 additions and 9200 deletions

View File

@@ -1,9 +1,3 @@
import {
UnionSelectKey,
unionSelectKey,
UnionValueKey,
unionValueKey,
} from "../config/configTypes"
import { ConfigSpec, matchConfigSpec } from "./output"
import * as _I from "../index"
import { camelCase } from "../../scripts/oldSpecToBuilder"
@@ -30,13 +24,10 @@ testOutput<
ConfigSpec["advanced"]["peers"]["addnode"][0]["hostname"],
string | null | undefined
>()(null)
testOutput<
ConfigSpec["testListUnion"][0]["union"][UnionValueKey]["name"],
string
>()(null)
testOutput<ConfigSpec["testListUnion"][0]["union"][UnionSelectKey], "lnd">()(
testOutput<ConfigSpec["testListUnion"][0]["union"]["value"]["name"], string>()(
null,
)
testOutput<ConfigSpec["testListUnion"][0]["union"]["selection"], "lnd">()(null)
testOutput<ConfigSpec["mediasources"], Array<"filebrowser" | "nextcloud">>()(
null,
)
@@ -45,7 +36,7 @@ testOutput<ConfigSpec["mediasources"], Array<"filebrowser" | "nextcloud">>()(
testOutput<ConfigSpec["rpc"]["enable"], string>()(null)
// prettier-ignore
// @ts-expect-error Expect that the string is the one above
testOutput<ConfigSpec["testListUnion"][0][UnionSelectKey][UnionSelectKey], "unionSelectKey">()(null);
testOutput<ConfigSpec["testListUnion"][0]['selection']['selection'], "selection">()(null);
/// Here we test the output of the matchConfigSpec function
describe("Inputs", () => {
@@ -53,7 +44,7 @@ describe("Inputs", () => {
mediasources: ["filebrowser"],
testListUnion: [
{
union: { [unionSelectKey]: "lnd", [unionValueKey]: { name: "string" } },
union: { selection: "lnd", value: { name: "string" } },
},
],
rpc: {
@@ -92,8 +83,8 @@ describe("Inputs", () => {
},
dbcache: 5,
pruning: {
unionSelectKey: "disabled",
unionValueKey: {},
selection: "disabled",
value: {},
},
blockfilters: {
blockfilterindex: false,