The host's in-tree Heroic scanner, lifted out into its own installable plugin
(design/library-scanner-plugins.md M5/WP5.2). One source covers all three of
Heroic's backends — legendary (Epic), gog, nile (Amazon) — because that is how
Heroic presents them and how the built-in scanner did.
The package is a config schema, a detect, a scan and a watchDirs. The store
claim, sync engine, __config surface, console registration and the
detect/scan/parity/uninstall CLI verbs all come from
@punktfunk/plugin-kit/library.
Claiming the `heroic` store keeps the entry ids the built-in scanner produced
(`heroic:<runner>:<appName>`), so GameStream app ids, Moonlight pins, cached art
and the operator's enabled/disabled state all survive the migration.
Ported behaviours worth naming, each covered by a test:
* a title counts as installed only if Heroic says so AND its install directory
still exists. The second check is the workaround for Heroic's GOG
is_installed bug (#2691), without which uninstalled games linger.
* only http(s) art is emitted. A sideloaded title can carry a local file://
path, which — unlike a path this plugin resolved itself — is not one the host
should proxy, and the client cannot fetch either. It degrades to the title
card, as in-host.
* both detect signals ride along: the install dir and the HEROIC_APP_NAME env
marker. Heroic hands off to legendary/gogdl/nile, so the host never sees the
game's own process any other way, and the env marker is what works under
Proton (verified on-glass 2026-07-27). They are a union, so a Heroic version
that stops setting it degrades rather than breaking.
The launch VALUE and the `heroic` launch kind are unchanged — the host still owns
turning `<runner>:<appName>` into a heroic://launch command, so this plugin never
constructs a command line.
Verified locally against the kit: tsc clean, biome clean, 5 tests, bundle builds,
CLI runs (detect -> absent, scan -> 0 games).
As with lutris: no lockfile and CI cannot be green until
@punktfunk/plugin-kit@0.3.0 is published. The parity gate has NOT been run — that
needs a box with Heroic installed.
51 lines
1.2 KiB
JSON
51 lines
1.2 KiB
JSON
{
|
|
"name": "@punktfunk/plugin-heroic",
|
|
"version": "0.1.0",
|
|
"private": false,
|
|
"type": "module",
|
|
"description": "Punktfunk plugin: adds your installed Heroic Games Launcher titles (Epic, GOG, Amazon) to the host's library, with their cover art.",
|
|
"license": "MIT OR Apache-2.0",
|
|
"homepage": "https://git.unom.io/unom/punktfunk-plugin-heroic",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://git.unom.io/unom/punktfunk-plugin-heroic.git"
|
|
},
|
|
"keywords": [
|
|
"punktfunk",
|
|
"plugin",
|
|
"heroic",
|
|
"epic",
|
|
"gog",
|
|
"game-library",
|
|
"game-streaming"
|
|
],
|
|
"main": "./dist/index.js",
|
|
"module": "./dist/index.js",
|
|
"bin": {
|
|
"punktfunk-plugin-heroic": "./dist/cli.js"
|
|
},
|
|
"files": [
|
|
"dist"
|
|
],
|
|
"publishConfig": {
|
|
"registry": "https://git.unom.io/api/packages/unom/npm/"
|
|
},
|
|
"scripts": {
|
|
"typecheck": "tsc --noEmit",
|
|
"test": "bun test",
|
|
"build": "bun build src/index.ts src/cli.ts --target=bun --outdir dist --external effect --external '@punktfunk/*'",
|
|
"prepublishOnly": "bun run build",
|
|
"check": "bunx biome check ."
|
|
},
|
|
"dependencies": {
|
|
"@punktfunk/host": "^0.1.2",
|
|
"@punktfunk/plugin-kit": "^0.3.0",
|
|
"effect": "4.0.0-beta.99"
|
|
},
|
|
"devDependencies": {
|
|
"@biomejs/biome": "^2.5.2",
|
|
"@types/bun": "^1.3.0",
|
|
"typescript": "^5.9.3"
|
|
}
|
|
}
|