okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
061a28583
main
1/** 2* Import this FIRST in a test that builds the host's native control or starts the host: it points the per-user places the host writes to 3* (the settings file Control reads, the components folder, the app's local data) at a scratch folder. 4* On 2026-10-24 a host test run rewrote the owner's real %LOCALAPPDATA%\Strata\app-settings.json (its data_dir became a deleted test folder). 5*/ 6import { mkdtempSync } from 'node:fs' ; 7import { tmpdir } from 'node:os' ; 8import { join } from 'node:path' ; 9 10if ( ! process . env . STRATA_TEST_KEEP_PROFILE ) { 11const scratch = mkdtempSync ( join ( tmpdir (), 'strata-host-test-profile-' )); 12process . env . STRATA_SETTINGS_FILE = join ( scratch , 'app-settings.json' ); 13process . env . STRATA_COMPONENTS_DIR = join ( scratch , 'components' ); 14process . env . LOCALAPPDATA = join ( scratch , 'Local' ); 15process . env . APPDATA = join ( scratch , 'Roaming' ); 16process . env . XDG_DATA_HOME = join ( scratch , 'xdg-data' ); 17process . env . XDG_STATE_HOME = join ( scratch , 'xdg-state' ); 18process . env . XDG_CONFIG_HOME = join ( scratch , 'xdg-config' ); 19}