feedBack-desktop/package.json
Byron Gamatos 5188aab938
feat(config): real config reset/repair + migration framework (drop manual-delete) (#38)
Eliminates the fragile "delete the config folder before upgrading" tester
instruction, which was wrong-by-OS because the userData folder name was
derived inconsistently per platform (fee[dB]ack on macOS, slopsmith-desktop
on Linux/Windows).

A. Deterministic paths + migration framework
- Pin the userData name on every OS via app.setName('feedback-desktop') +
  build.extraMetadata.name; brand (productName 'fee[dB]ack') unchanged.
- One-time userData migration copies a legacy folder into the new one so
  upgraded users don't start fresh (atomic copy-then-rename, fail-soft).
  Runs before the single-instance lock / crashReporter, which would otherwise
  create userData and defeat the "new dir doesn't exist" gate.
- config-migrations.ts: versioned, ordered, idempotent, fail-soft migration
  runner stamped in CONFIG_DIR/config_version.json; logs the active CONFIG_DIR
  at startup (closes the Linux ~/.local/share/slopsmith shared-config gap).

B. In-app "Reset / repair configuration" (Settings panel)
- Granular options: reset app settings & caches, clear plugin state & cached
  Python deps, and full reset with default-OFF opt-ins for installed plugins /
  song library / ML caches.
- config-paths.ts is the single source of truth for per-OS path enumeration;
  the song library, installed plugins and ML caches are structurally confined
  to optInExtras and never wiped by the safe/full categories.
- Reset stops the backend, deletes immediate paths, includes SQLite WAL/SHM
  sidecars + the migration stamp on full reset, and defers Chromium/Crashpad
  state to next launch (consumed before any window reopens it). ML caches honor
  TORCH_HOME/HF_HOME. Empty selection is a no-op (backend left running).
- SECURITY: destructive resets require a native main-process confirmation
  dialog — the renderer bridge is reachable by plugin scripts, so a
  renderer-only confirm is not a sufficient gate.

Tests: node:test suites for path enumeration (per-OS + library/plugins
preserved), migration idempotency/fail-soft, reset delete pipeline guarantees,
userData migration, and deferred-deletion schedule/consume. `npm test` green
(adds a test script). codex review --base origin/main clean.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 22:13:24 +02:00

158 lines
4.7 KiB
JSON

{
"name": "slopsmith-desktop",
"version": "0.2.9",
"description": "fee[dB]ack desktop app with integrated audio engine, VST hosting, and amp modeling",
"author": {
"name": "Byron",
"email": "byron@ougsoft.com"
},
"license": "AGPL-3.0-only",
"main": "dist/main/main.js",
"scripts": {
"typecheck": "tsc --noEmit",
"test": "node --test \"tests/*.test.js\"",
"build:ts": "tsc && node -e \"const fs=require('fs'),path=require('path');fs.copyFileSync('src/main/splash.html','dist/main/splash.html');fs.copyFileSync('src/main/spinner.json','dist/main/spinner.json');fs.copyFileSync('node_modules/lottie-web/build/player/lottie.min.js','dist/main/lottie.min.js');const dst='dist/main/images';if(fs.existsSync(dst))fs.rmSync(dst,{recursive:true});fs.mkdirSync(dst,{recursive:true});fs.readdirSync('src/main/images',{withFileTypes:true}).filter(d=>d.isFile()&&d.name.endsWith('.webp')).forEach(d=>fs.copyFileSync(path.join('src/main/images',d.name),path.join(dst,d.name)))\"",
"build:audio": "bash scripts/build-audio.sh Release",
"build:audio:debug": "bash scripts/build-audio.sh Debug",
"rebuild:audio": "rm -rf build && bash scripts/build-audio.sh Release",
"build:native": "npm run build:audio",
"bundle:slopsmith": "bash scripts/bundle-slopsmith.sh",
"bundle:python": "bash scripts/bundle-python.sh",
"bundle:binaries": "bash scripts/bundle-binaries.sh",
"bundle:soundfont": "bash scripts/bundle-soundfont.sh",
"bundle": "bash scripts/bundle.sh",
"start": "npm run build:ts && electron .",
"dev": "npm run build:ts && electron .",
"dist": "npm run build:native && npm run bundle && npm run build:ts && electron-builder",
"dist:linux": "npm run dist -- --linux",
"dist:mac": "npm run dist -- --mac",
"dist:win": "npm run dist -- --win",
"postinstall": "electron-builder install-app-deps"
},
"build": {
"appId": "com.byron.slopsmith-desktop",
"productName": "fee[dB]ack",
"executableName": "feedback",
"extraMetadata": {
"name": "feedback-desktop"
},
"artifactName": "feedback-${version}-${arch}.${ext}",
"directories": {
"output": "release"
},
"files": [
"dist/**/*",
"build/Release/*.node",
"build/Release/libonnxruntime*",
"build/Release/onnxruntime*.dll"
],
"extraResources": [
{
"from": "LICENSE",
"to": "LICENSE"
},
{
"from": "THIRD_PARTY_LICENSES.md",
"to": "THIRD_PARTY_LICENSES.md"
},
{
"from": "README.md",
"to": "README.md"
},
{
"from": "resources/slopsmith",
"to": "slopsmith"
},
{
"from": "resources/python",
"to": "python"
},
{
"from": "resources/bin",
"to": "bin"
},
{
"from": "resources/default-irs",
"to": "default-irs"
},
{
"from": "resources/soundfonts",
"to": "soundfonts"
},
{
"from": "resources/models",
"to": "models"
}
],
"asarUnpack": [
"build/Release/*.node",
"build/Release/libonnxruntime*",
"build/Release/onnxruntime*.dll"
],
"linux": {
"target": [
"AppImage",
"deb"
],
"category": "Audio",
"icon": "resources/icons",
"files": [
"build/Release/slopsmith-vst-host"
],
"asarUnpack": [
"build/Release/slopsmith-vst-host"
]
},
"mac": {
"target": [
"dir"
],
"category": "public.app-category.music",
"icon": "resources/icons/icon.icns",
"hardenedRuntime": true,
"gatekeeperAssess": false,
"entitlements": "resources/entitlements.mac.plist",
"entitlementsInherit": "resources/entitlements.mac.plist",
"notarize": true,
"extendInfo": {
"NSMicrophoneUsageDescription": "fee[dB]ack needs microphone access for guitar input and note detection."
},
"files": [
"build/Release/slopsmith-vst-scan",
"build/Release/slopsmith-vst-host"
],
"asarUnpack": [
"build/Release/slopsmith-vst-scan",
"build/Release/slopsmith-vst-host"
]
},
"win": {
"target": [
"dir"
],
"icon": "resources/icons/icon.ico",
"files": [
"build/Release/slopsmith-vst-host.exe"
],
"asarUnpack": [
"build/Release/slopsmith-vst-host.exe"
]
}
},
"dependencies": {
"lottie-web": "^5.13.0",
"node-addon-api": "^8.3.1",
"velopack": "0.0.1589-ga2c5a97"
},
"devDependencies": {
"@types/node": "^22.0.0",
"cmake-js": "^7.3.0",
"electron": "^35.0.0",
"electron-builder": "^25.1.8",
"typescript": "^5.7.0"
},
"cmake-js": {
"runtime": "electron"
}
}