mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 16:02:26 +00:00
Refactored `js/userBlocks.js` to handle NIP-07 decryption timeouts gracefully. Previously, if a background decryption timed out (common with busy extensions or queues), the user's block list was reset to an empty state, exposing them to blocked content until the next successful retry. The fix ensures that if a timeout occurs, the existing (stale) block list is preserved while a retry is scheduled in the background. Also increased the `BACKGROUND_DECRYPT_TIMEOUT_MS` from 2500ms to 5000ms to reduce false positives. Added `tests/user-blocks-decryption.test.mjs` to verify the fix and audit the decryption flow. Co-authored-by: PR0M3TH3AN <[email protected]>
61 lines
2.9 KiB
JSON
61 lines
2.9 KiB
JSON
{
|
|
"name": "bitvid",
|
|
"private": true,
|
|
"type": "module",
|
|
"version": "1.0.0",
|
|
"scripts": {
|
|
"start": "npm run build && npx serve dist",
|
|
"serve": "npx serve",
|
|
"build": "node scripts/build-dist.mjs",
|
|
"build:css": "tailwindcss -c tailwind.config.cjs -i css/tailwind.source.css -o css/tailwind.generated.css --minify",
|
|
"build:beacon:bundle": "node scripts/build-beacon.mjs",
|
|
"build:beacon": "npm run build:beacon:bundle && npm run lint:inline-styles",
|
|
"ci:beacon": "npm run build:beacon",
|
|
"format": "prettier --cache --write css/tailwind.source.css css/tokens.css css/docs.css \"docs/**/*.html\" tailwind.config.cjs README.md CONTRIBUTING.md",
|
|
"audit": "node scripts/daily-design-system-audit.mjs",
|
|
"lint": "npm run lint:css && npm run lint:hex && npm run lint:inline-styles && npm run lint:tokens && npm run lint:tailwind-brackets && npm run lint:tailwind-colors",
|
|
"lint:css": "stylelint css/tailwind.source.css css/tokens.css css/docs.css",
|
|
"lint:hex": "node scripts/check-hex.js",
|
|
"lint:inline-styles": "node scripts/check-inline-styles.mjs",
|
|
"lint:tokens": "node scripts/check-design-tokens.mjs --check=tokens",
|
|
"lint:tailwind-brackets": "node scripts/check-design-tokens.mjs --check=brackets",
|
|
"lint:tailwind-colors": "node scripts/check-tailwind-colors.mjs",
|
|
"check:css": "npm run build:css",
|
|
"test:visual": "npm run build && npx playwright test",
|
|
"test:visual:update": "npm run build && cross-env UPDATE_VISUAL_BASELINES=1 npx playwright test",
|
|
"test:e2e": "npm run build && npx playwright test tests/e2e",
|
|
"test:dm:unit": "node scripts/run-targeted-tests.mjs tests/dm-db.test.mjs tests/dm-decryptor.test.mjs tests/dm-normalization.test.mjs tests/nostr-send-direct-message.test.mjs",
|
|
"test:dm:integration": "node scripts/run-targeted-tests.mjs tests/nostr/dm-direct-message-flow.test.mjs",
|
|
"test:unit": "node scripts/run-unit-tests.mjs",
|
|
"test:unit:shard1": "cross-env UNIT_TEST_SHARD=1/3 node scripts/run-unit-tests.mjs",
|
|
"test:unit:shard2": "cross-env UNIT_TEST_SHARD=2/3 node scripts/run-unit-tests.mjs",
|
|
"test:unit:shard3": "cross-env UNIT_TEST_SHARD=3/3 node scripts/run-unit-tests.mjs",
|
|
"telemetry:aggregate": "node scripts/agent/telemetry-aggregator.mjs"
|
|
},
|
|
"devDependencies": {
|
|
"@playwright/test": "^1.58.0",
|
|
"fake-indexeddb": "^6.2.5",
|
|
"jsdom": "^28.0.0",
|
|
"pixelmatch": "^5.3.0",
|
|
"playwright": "^1.58.0",
|
|
"pngjs": "^7.0.0",
|
|
"prettier": "^3.8.1",
|
|
"prettier-plugin-tailwindcss": "^0.6.5",
|
|
"serve": "^14.2.5",
|
|
"stylelint": "^16.26.1",
|
|
"vitest": "^4.0.18"
|
|
},
|
|
"license": "GPL-3.0-or-later",
|
|
"dependencies": {
|
|
"@floating-ui/dom": "^1.7.4",
|
|
"@tailwindcss/typography": "^0.5.19",
|
|
"autoprefixer": "^10.4.24",
|
|
"cross-env": "^10.1.0",
|
|
"esbuild": "^0.27.2",
|
|
"nostr-tools": "2.19.4",
|
|
"postcss": "^8.5.6",
|
|
"tailwindcss": "^3.4.19",
|
|
"ws": "^8.19.0"
|
|
}
|
|
}
|