Files
scrying-pool/package.json
T
uberwald 61f362004e Story 4.1: Task 1 Complete - PlayerPrivacyManager Core Logic
- Created src/contracts/privacy-settings.js with:
  - PrivacySettings typedef
  - PRIVACY_SETTINGS_DEFAULT (both flags false)
  - PRIVACY_SETTING_KEYS and FEATURE_NAME_MAP constants
  - createPrivacySettings() factory
  - isValidPrivacySettings() validator
  - validateSettingKey(), validateSettingValue(), validateFeatureName() helpers
- Created src/core/PlayerPrivacyManager.js with:
  - Constructor with FoundryAdapter DI validation
  - getSettings(userId) - retrieves settings from user flags
  - setSetting(userId, key, value) - async, validates, persists via user.setFlag
  - isOptedIn(userId, feature) - convenience method for feature checks
  - getAllSettings() - aggregates all users' settings (GM view)
  - onChange(callback) - subscription pattern for change events
  - teardown() - cleanup
- Created tests/unit/contracts/privacy-settings.test.js - 44 tests
- Created tests/unit/core/PlayerPrivacyManager.test.js - 35 tests
- All tests passing, lint clean
- Updated sprint-status.yaml: 4-1 from ready-for-dev to in-progress
- Updated story file: Task 1 subtasks 1.1-1.8 marked complete

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-05-23 21:11:55 +02:00

30 lines
950 B
JSON

{
"name": "video-view-manager",
"version": "0.1.0",
"description": "FoundryVTT v14 module — Scrying Pool camera visibility control",
"type": "module",
"scripts": {
"build": "lessc styles/scrying-pool.less dist/styles/scrying-pool.css",
"watch": "chokidar 'styles/**/*.less' -c 'lessc styles/scrying-pool.less dist/styles/scrying-pool.css'",
"typecheck": "tsc --noEmit",
"lint": "eslint src/ module.js scripts/ tests/",
"test": "vitest run",
"test:watch": "vitest",
"release": "node scripts/package.mjs"
},
"devDependencies": {
"@league-of-foundry-developers/foundry-vtt-types": "9.280.1",
"@playwright/test": "^1.60.0",
"@types/node": "22.x",
"chokidar": "5.0.0",
"eslint": "^9.0.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jsdoc": "^50.0.0",
"happy-dom": "^20.0.0",
"less": "4.6.4",
"typescript": "5.9.3",
"vitest": "2.1.8",
"zip": "^1.0.0"
}
}