mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-08 07:29:13 +00:00
fix(furniture): correct exercise and shelf artwork (#606)
Publish corrected 0.4.1 pack, preserve old cactus objects as a read-only alias, and cover the catalog, renderers, editor, PDF and visual scene. Issue: #606 User-Visible: yes
This commit is contained in:
@@ -6,7 +6,7 @@ import process from 'node:process';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
||||
const PACK = path.join(ROOT, 'assets', 'furniture', 'houseplan-0.4.0');
|
||||
const PACK = path.join(ROOT, 'assets', 'furniture', 'houseplan-0.4.1');
|
||||
// Deliberately not named *manifest.json: HACS rejects a repository that
|
||||
// contains any second file matching that suffix outside the integration.
|
||||
const MANIFEST = path.join(PACK, 'pack.json');
|
||||
@@ -128,7 +128,7 @@ function loadPack() {
|
||||
exactKeys(manifest,
|
||||
['schema_version', 'view_schema', 'pack_id', 'pack_version', 'title_ru', 'title_en', 'author', 'license', 'source_url', 'menu_icons', 'symbols'],
|
||||
[], 'manifest');
|
||||
if (manifest.schema_version !== 1 || manifest.view_schema !== 2 || manifest.pack_id !== 'houseplan' || manifest.pack_version !== '0.4.0') fail('unsupported manifest identity');
|
||||
if (manifest.schema_version !== 1 || manifest.view_schema !== 2 || manifest.pack_id !== 'houseplan' || manifest.pack_version !== '0.4.1') fail('unsupported manifest identity');
|
||||
if (manifest.author !== 'Sergey Matyunin (Matysh)' || manifest.license !== 'MIT') fail('release provenance is incomplete');
|
||||
text(manifest.title_ru, 'manifest.title_ru'); text(manifest.title_en, 'manifest.title_en'); text(manifest.source_url, 'manifest.source_url');
|
||||
if (!Array.isArray(manifest.menu_icons) || manifest.menu_icons.length !== 33) fail('exactly 33 menu icons are required');
|
||||
|
||||
@@ -8722,14 +8722,14 @@ const MUTANT_DEFINITIONS = [
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'furniture-cactus-lands-in-exercise',
|
||||
id: 'furniture-exercise-misfiled-in-plant',
|
||||
guard: 'node --test test/furniture-assets.test.mjs',
|
||||
because: '#593: плитка категории «Тренажёр» рисует тренажёр. Открывать её на кактус — '
|
||||
+ 'врать о содержимом палитры; решение владельца — кактус в «Растении»',
|
||||
because: '#606: рисунок прежнего cactus — тренажёр; перенос его в «Растение» снова '
|
||||
+ 'скроет категорию «Тренажёр» и покажет неверный вариант растения',
|
||||
patches: [{
|
||||
file: 'assets/furniture/houseplan-0.4.0/pack.json',
|
||||
find: ' "file": "svg/plan/cactus.svg",\n "menu_icon": "plant",',
|
||||
replace: ' "file": "svg/plan/cactus.svg",\n "menu_icon": "exercise",',
|
||||
file: 'assets/furniture/houseplan-0.4.1/pack.json',
|
||||
find: ' "file": "svg/plan/exercise.svg",\n "menu_icon": "exercise",',
|
||||
replace: ' "file": "svg/plan/exercise.svg",\n "menu_icon": "plant",',
|
||||
}],
|
||||
},
|
||||
{
|
||||
@@ -8739,7 +8739,7 @@ const MUTANT_DEFINITIONS = [
|
||||
+ 'исполнимая защита от повторения истории #159. Если тест их не сверяет, документ '
|
||||
+ 'провенанса можно переписать под любую поставку, и никто не заметит',
|
||||
patches: [{
|
||||
file: 'assets/furniture/houseplan-0.4.0/README.md',
|
||||
file: 'assets/furniture/houseplan-0.4.1/README.md',
|
||||
find: '`69BA5E0C398542D59F24269F637F57B8EBF31C2836C9D493F084AD29AB299FDE`',
|
||||
replace: '`0000000000000000000000000000000000000000000000000000000000000000`',
|
||||
}],
|
||||
@@ -8771,8 +8771,8 @@ const MUTANT_DEFINITIONS = [
|
||||
// A well-meaning "fall back to the bundled artwork" is exactly how the
|
||||
// chunk would creep back into the initial graph.
|
||||
file: 'src/furniture.ts',
|
||||
find: ' return FURNITURE_ART_RUNTIME.art(id, host) ?? null;',
|
||||
replace: ' return FURNITURE_ART_RUNTIME.art(id, host) ?? EAGER_ART[id] ?? null;',
|
||||
find: ' return FURNITURE_ART_RUNTIME.art(canonicalFurnitureId(id), host) ?? null;',
|
||||
replace: ' return FURNITURE_ART_RUNTIME.art(canonicalFurnitureId(id), host) ?? EAGER_ART[canonicalFurnitureId(id)] ?? null;',
|
||||
}],
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user