fix: Fixed tests

feat: Added RClone integration
feat: Implemented plugin settings
feat: Updated minimal store version
test: Fixed tests
feat: Moved store and igdb and es-de to their own plugins
This commit is contained in:
Simeon Radivoev 2026-04-17 21:21:14 +03:00
parent 444d8c4c27
commit c09fbd3dc8
Signed by: simeonradivoev
GPG key ID: 7611A451D2A5D37A
115 changed files with 4139 additions and 1502 deletions

View file

@ -20,7 +20,7 @@ function spawnServer ()
HEADLESS: "true",
},
stdout: "pipe",
stderr: "inherit",
stderr: "pipe",
stdin: "pipe",
signal: abortController.signal,
killSignal: 'SIGUSR1',
@ -40,6 +40,11 @@ function spawnServer ()
console.log(e);
}
});
const rle = createInterface({ input: Readable.fromWeb(s.stderr as any) });
rle.on('line', e =>
{
console.error(e);
});
return s;
}

View file

@ -0,0 +1,34 @@
CREATE TABLE `commands` (
`system` text,
`label` text,
`command` text NOT NULL,
FOREIGN KEY (`system`) REFERENCES `systems`(`name`) ON UPDATE cascade ON DELETE cascade
);
--> statement-breakpoint
CREATE TABLE `emulators` (
`name` text PRIMARY KEY NOT NULL,
`fullname` text,
`systempath` text DEFAULT (json_array()) NOT NULL,
`staticpath` text DEFAULT (json_array()) NOT NULL,
`corepath` text DEFAULT (json_array()) NOT NULL,
`androidpackage` text DEFAULT (json_array()) NOT NULL,
`winregistrypath` text DEFAULT (json_array()) NOT NULL
);
--> statement-breakpoint
CREATE UNIQUE INDEX `emulators_name_unique` ON `emulators` (`name`);--> statement-breakpoint
CREATE TABLE `systemMappings` (
`source` text,
`sourceSlug` text,
`sourceId` integer,
`system` text NOT NULL,
FOREIGN KEY (`system`) REFERENCES `systems`(`name`) ON UPDATE no action ON DELETE no action
);
--> statement-breakpoint
CREATE TABLE `systems` (
`name` text PRIMARY KEY NOT NULL,
`fullname` text,
`path` text,
`extension` text DEFAULT (json_array()) NOT NULL
);
--> statement-breakpoint
CREATE UNIQUE INDEX `systems_name_unique` ON `systems` (`name`);

View file

@ -0,0 +1,234 @@
{
"version": "6",
"dialect": "sqlite",
"id": "b4ee710f-eaa5-4bbb-9e69-13d490c7142c",
"prevId": "00000000-0000-0000-0000-000000000000",
"tables": {
"commands": {
"name": "commands",
"columns": {
"system": {
"name": "system",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"label": {
"name": "label",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"command": {
"name": "command",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {
"commands_system_systems_name_fk": {
"name": "commands_system_systems_name_fk",
"tableFrom": "commands",
"tableTo": "systems",
"columnsFrom": [
"system"
],
"columnsTo": [
"name"
],
"onDelete": "cascade",
"onUpdate": "cascade"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"emulators": {
"name": "emulators",
"columns": {
"name": {
"name": "name",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"fullname": {
"name": "fullname",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"systempath": {
"name": "systempath",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(json_array())"
},
"staticpath": {
"name": "staticpath",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(json_array())"
},
"corepath": {
"name": "corepath",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(json_array())"
},
"androidpackage": {
"name": "androidpackage",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(json_array())"
},
"winregistrypath": {
"name": "winregistrypath",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(json_array())"
}
},
"indexes": {
"emulators_name_unique": {
"name": "emulators_name_unique",
"columns": [
"name"
],
"isUnique": true
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"systemMappings": {
"name": "systemMappings",
"columns": {
"source": {
"name": "source",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"sourceSlug": {
"name": "sourceSlug",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"sourceId": {
"name": "sourceId",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"system": {
"name": "system",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {
"systemMappings_system_systems_name_fk": {
"name": "systemMappings_system_systems_name_fk",
"tableFrom": "systemMappings",
"tableTo": "systems",
"columnsFrom": [
"system"
],
"columnsTo": [
"name"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"systems": {
"name": "systems",
"columns": {
"name": {
"name": "name",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"fullname": {
"name": "fullname",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"path": {
"name": "path",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"extension": {
"name": "extension",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(json_array())"
}
},
"indexes": {
"systems_name_unique": {
"name": "systems_name_unique",
"columns": [
"name"
],
"isUnique": true
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
}
},
"views": {},
"enums": {},
"_meta": {
"schemas": {},
"tables": {},
"columns": {}
},
"internal": {
"indexes": {}
}
}

View file

@ -0,0 +1,13 @@
{
"version": "7",
"dialect": "sqlite",
"entries": [
{
"idx": 0,
"version": "6",
"when": 1776039605377,
"tag": "0000_sparkling_banshee",
"breakpoints": true
}
]
}

View file

@ -96,12 +96,18 @@ await Promise.all(platforms.map(async ([platform, arch]) =>
});
const rommMapping = rommPlatforms.data?.find(p =>
p.slug === (customMappings as any)[name] ||
p.slug === name ||
p.igdb_slug === name ||
p.hltb_slug === name ||
p.moby_slug === name ||
p.display_name === fullname
{
const custom = (customMappings as any)[name];
if (Array.isArray(custom) && custom.some(m => m === p.slug))
{
return true;
}
return p.slug === custom ||
p.slug === name ||
p.igdb_slug === name ||
p.display_name === fullname;
}
);
const mappings: {