feat: Implemented emulator installation
feat: Updated romm API version feat: Updated es-de rules feat: Added tabs to game details refactor: returned to global query definitions to help with typescript performance
This commit is contained in:
parent
cf6fff6fac
commit
3750e9ed8f
103 changed files with 4888 additions and 1632 deletions
|
|
@ -1,4 +1,3 @@
|
|||
// watcher.ts - run this instead of --watch
|
||||
import EventEmitter from "events";
|
||||
import browser from '../src/bun/browser';
|
||||
import { tmpdir } from "os";
|
||||
|
|
@ -13,9 +12,9 @@ let retries = 0;
|
|||
|
||||
function spawnServer ()
|
||||
{
|
||||
return Bun.spawn(["bun", "run", '--watch', "--inspect=127.0.0.1:9228/fixed-session", "./src/bun/index.ts"], {
|
||||
return Bun.spawn(["bun", '--watch', '--install=fallback', '--smol', "run", "--inspect=127.0.0.1:9228/fixed-session", "./src/bun/index.ts"], {
|
||||
env: {
|
||||
...Bun.env,
|
||||
...process.env,
|
||||
HEADLESS: "true",
|
||||
},
|
||||
stdout: "inherit",
|
||||
|
|
@ -50,7 +49,7 @@ function spawnBrowser ()
|
|||
try
|
||||
{
|
||||
|
||||
return browser(events, Bun.env.FORCE_BROWSER === "true", { configPath: path.join(tmpdir(), 'gameflow') });
|
||||
return browser(events, process.env.FORCE_BROWSER === "true", { configPath: path.join(tmpdir(), 'gameflow') });
|
||||
} catch (error)
|
||||
{
|
||||
console.error(error);
|
||||
|
|
|
|||
|
|
@ -6,8 +6,6 @@ import { Database } from "bun:sqlite";
|
|||
import * as schema from '../src/bun/api/schema/emulators';
|
||||
import { migrate } from "drizzle-orm/bun-sqlite/migrator";
|
||||
import { drizzle } from "drizzle-orm/bun-sqlite";
|
||||
import path from 'node:path';
|
||||
import { ensureDir } from 'fs-extra';
|
||||
|
||||
/** get all latest supported romm platforms */
|
||||
const rommPlatforms = await getSupportedPlatformsEndpointApiPlatformsSupportedGet({ baseUrl: "https://demo.romm.app" });
|
||||
|
|
@ -57,6 +55,7 @@ await Promise.all(platforms.map(async ([platform, arch]) =>
|
|||
const emulators = $r('ruleList emulator').toArray().map(s =>
|
||||
{
|
||||
const $emulator = $r(s);
|
||||
const comment = $emulator.contents().toArray().find((node) => node.type === 'comment');
|
||||
const $systempath = $emulator.find('rule[type=systempath] entry');
|
||||
const $staticpath = $emulator.find('rule[type=staticpath] entry');
|
||||
const $corepath = $emulator.find('rule[type=corepath] entry');
|
||||
|
|
@ -66,12 +65,14 @@ await Promise.all(platforms.map(async ([platform, arch]) =>
|
|||
const emulatorName = $emulator.attr('name');
|
||||
const emulator: typeof schema.emulators.$inferInsert = {
|
||||
name: emulatorName!,
|
||||
fullname: comment?.data.trim(),
|
||||
systempath: $systempath.toArray().map(p => $r(p).text()),
|
||||
staticpath: $staticpath.toArray().map(p => $r(p).text()),
|
||||
corepath: $corepath.toArray().map(p => $r(p).text()),
|
||||
androidpackage: $androidpackage.toArray().map(p => $r(p).text()),
|
||||
winregistrypath: $winregistrypath.toArray().map(p => $r(p).text()),
|
||||
};
|
||||
|
||||
return emulator;
|
||||
});
|
||||
|
||||
|
|
@ -143,6 +144,7 @@ await Promise.all(platforms.map(async ([platform, arch]) =>
|
|||
commands,
|
||||
mappings
|
||||
};
|
||||
|
||||
return system;
|
||||
}));
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue