Files
punktfunk/plugin-kit/package.json
T
enricobuehler 4edb662b63
ci / rust-arm64 (pull_request) Successful in 2m40s
ci / web (pull_request) Successful in 1m13s
ci / bun-nix (pull_request) Successful in 22s
ci / docs-site (pull_request) Successful in 1m20s
ci / rust (pull_request) Successful in 11m48s
nix / flake (pull_request) Successful in 16m39s
fix(plugin-kit): regSubKeys could never return a subkey
Found on hardware by the GOG plugin's own parity gate, on a box with exactly one
GOG game installed:

    HKLM\SOFTWARE\WOW6432Node\GOG.com\Games -> 1 subkey (IRON NEST ...)
    host's built-in scanner:  1 entry
    plugin:                   detect: absent, 0 games
    parity FAILED - 1 missing, exit 1

`reg.exe` ALWAYS echoes the full hive name in its output rows, never the
abbreviation it was given: query `HKLM\SOFTWARE\...` and every line comes back
`HKEY_LOCAL_MACHINE\SOFTWARE\...`. regSubKeys built its match prefix from the
`HKLM\...` string it was handed, so no line ever matched and it returned `[]` —
on every machine, for every key, always. Measured verbatim on .173:

    reg.exe:     [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\GOG.com\Games\2013434102]
    regSubKeys:  []

Its only consumer is the GOG plugin, so the symptom was "GOG reports no games
installed" rather than an error — the same shape as the SQLite reader in 0.3.1:
a total failure that every layer degrades into an empty library.

The contract was wrong too, and the hive bug hid it. regSubKeys returned whole
key PATHS while the GOG plugin uses each result as a bare NAME
(`const key = \`${GAMES_KEY}\\${id}\``, and the subkey name IS the product id
that becomes `external_id`). Even with the prefix fixed, paths would have
composed nonsense keys. It now returns names, which is what the sole consumer
and its own comment always assumed.

Parsing is split into an exported `parseRegSubKeys(stdout, key)` for the same
reason `parseRegQuery` is exported — this is a text format that breaks quietly,
and it had NO test coverage at all. Six added, using the verbatim .173 output:
names not paths, multiple subkeys, grandchildren ignored, the queried key is not
its own subkey, case-insensitivity, and empty/error input. Four of the six FAIL
against the old behaviour.

0.3.1 -> 0.3.2. Gates: biome clean, tsc clean, 67/67 tests, build clean.
2026-08-08 02:19:30 +02:00

79 lines
1.8 KiB
JSON

{
"name": "@punktfunk/plugin-kit",
"version": "0.3.2",
"description": "Effect-based framework for punktfunk plugins: lifecycle runtime, config/state, sync engine, UI serving, CLI scaffold, and browser helpers.",
"type": "module",
"license": "MIT OR Apache-2.0",
"homepage": "https://git.unom.io/unom/punktfunk/src/branch/main/plugin-kit",
"repository": {
"type": "git",
"url": "https://git.unom.io/unom/punktfunk.git",
"directory": "plugin-kit"
},
"bugs": {
"url": "https://git.unom.io/unom/punktfunk/issues"
},
"keywords": [
"punktfunk",
"plugin",
"framework",
"effect"
],
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./react": {
"types": "./dist/react/index.d.ts",
"default": "./dist/react/index.js"
},
"./wire": {
"types": "./dist/wire.d.ts",
"default": "./dist/wire.js"
},
"./library": {
"types": "./dist/library/index.d.ts",
"default": "./dist/library/index.js"
},
"./theme.css": "./dist/theme.css"
},
"files": [
"dist",
"README.md"
],
"publishConfig": {
"registry": "https://git.unom.io/api/packages/unom/npm/"
},
"scripts": {
"typecheck": "tsc --noEmit",
"build": "tsc -p tsconfig.build.json && cp src/theme.css dist/theme.css",
"test": "bun test",
"prepublishOnly": "bun run build",
"check": "biome check ."
},
"peerDependencies": {
"effect": "^4.0.0-beta.98",
"@punktfunk/host": "^0.1.2",
"react": "^19.2.0"
},
"peerDependenciesMeta": {
"react": {
"optional": true
}
},
"devDependencies": {
"@biomejs/biome": "^2.5.2",
"@punktfunk/host": "file:../sdk",
"@types/bun": "^1.3.0",
"@types/react": "^19.2.16",
"effect": "4.0.0-beta.99",
"typescript": "^5.9.3"
},
"overrides": {
"undici": "^8.9.0"
}
}