mirror of
https://github.com/Matysh/houseplan-card
synced 2026-07-31 08:28:31 +00:00
The card signs content urls because a browser cannot authenticate an <image href>. But _display() was called inside _buildModel(), and the space model is memoized on the config fingerprint — so the UNSIGNED url froze in the cache and the signature, which did arrive, never reached the element. The plan never loaded, and the browser kept hitting the unsigned path: 401, which Home Assistant reports as a failed login attempt from the viewer's own IP (that is how the owner spotted it). PDF links were unaffected: they already resolved at render time. - _buildModel() keeps the raw plan_url; the render pass calls _display(). - _display() returns '' for an unsigned content url instead of the plain path, and the <image> is not emitted at all until the signature lands — no 401, no spurious login-attempt warning. - _resign() replaces 'drop everything and re-request': the previous urls are kept until the new ones arrive, so a wall tablet never blanks. - demo/smoke_plan_signed.mjs: reproduces on v1.44.6 (href stays ?v=..., never ?authSig=), passes here. TESTING.md row added. - docs: CHANGELOG.md + CHANGELOG.ru.md + STATUS.md.
29 lines
804 B
JSON
Executable File
29 lines
804 B
JSON
Executable File
{
|
|
"name": "houseplan-card",
|
|
"version": "1.44.7",
|
|
"description": "Interactive house plan Lovelace card for Home Assistant",
|
|
"license": "MIT",
|
|
"type": "module",
|
|
"scripts": {
|
|
"build": "tsc --noEmit && rollup -c",
|
|
"watch": "rollup -c --watch",
|
|
"typecheck": "tsc --noEmit",
|
|
"test": "tsc -p tsconfig.test.json && node scripts/fix-test-build.mjs && node --test test/*.test.mjs"
|
|
},
|
|
"devDependencies": {
|
|
"@mdi/js": "^7.4.47",
|
|
"@rollup/plugin-json": "^6.1.0",
|
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
"@rollup/plugin-terser": "^0.4.4",
|
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
"playwright": "^1.62.0",
|
|
"rollup": "^4.18.0",
|
|
"tslib": "^2.6.2",
|
|
"typescript": "^5.4.5"
|
|
},
|
|
"dependencies": {
|
|
"lit": "^3.1.3",
|
|
"polyclip-ts": "^0.16.8"
|
|
}
|
|
}
|