- one version: package.json's version is the desktop app's too (desktopVersion removed); tools/desktop-version.ts keeps the plugin manifests and the app's copies equal, desktop-release publish refuses another version, release order app first then npm publish; the unpublished desktop 0.1.0 candidate is noted in the docs and CHANGELOG - storebound desktop installs (per user, no admin: macOS DMG -> /Applications or ~/Applications, Windows NSIS /S, Linux AppImage + .desktop with the storebound:// handler), updates an older app, notes a newer one (downgrade only with --force), asks once ([Y/n], --yes, exit 3 without a terminal), opens on the folder; --dry / --json / --download; the install steps are pure plans (cli/lib/desktop-install.ts); the version's own manifest dl/<version>/latest.json - credentials: one store, the CLI's credential profiles in ~/.storebound/credentials; the desktop writes and reads them (profiles.rs, files 0600), moves old keychain accounts into profiles on first start, shows profiles the CLI made; precedence env > named profile > project file > default profile; config `account`, "account" in the project's credentials.json; storebound accounts list | import (dedup by key id / service account e-mail, key files copied 0600, project file keeps keystore and review contact, backup, --dry, never prints values) | use - app folders: one list ~/.storebound/projects.json shared by the desktop (registry.rs), storebound desktop, apps folders | add | remove, ws init and ws without a workspace file - desktop: notice when a folder pins another storebound version; storebound-desktop --version - tests: version drift, desktop decisions and per-OS plans, credential precedence and import, registry (TS + Rust), keychain migration and profile round trip (Rust), boot check with old keychain state and the new shared state
19 lines
1.1 KiB
TypeScript
19 lines
1.1 KiB
TypeScript
// Loaded before every test file (bunfig.toml): no real waiting between the re-checks of cli/lib/upsert.ts or for
|
|
// the store's list to settle after a create (cli/apple/iap.ts).
|
|
import { afterEach } from 'bun:test';
|
|
import { mkdtempSync } from 'node:fs';
|
|
import { tmpdir } from 'node:os';
|
|
import { join } from 'node:path';
|
|
|
|
process.env.STOREBOUND_UPSERT_WAIT_MS = '0';
|
|
process.env.STOREBOUND_LIST_SETTLE_MS ??= '0';
|
|
|
|
// The machine-wide stores (credential profiles, the app folder list) of the person running the tests are never read
|
|
// or written: every test process gets empty ones (a test that needs content points these at its own folder).
|
|
const machine = mkdtempSync(join(tmpdir(), 'storebound-machine-'));
|
|
process.env.STOREBOUND_CREDENTIALS_DIR = join(machine, 'credentials');
|
|
process.env.STOREBOUND_REGISTRY = join(machine, 'projects.json');
|
|
|
|
// Commands run in-process set process.exitCode on purpose (a check with problems, a declined confirmation:
|
|
// DECLINED_EXIT in cli/lib/ctx.ts). Tests assert it where it matters; it must not leak into bun test's own exit code.
|
|
afterEach(() => { process.exitCode = 0; });
|