stampui add <block> in a directory without package.json currently proceeds and writes files into cwd. Expected: a short error naming the problem ("no package.json found in ") and pointing to stampui doctor, with a --force escape hatch for intentional bare-directory use.
Good first issue: the check belongs at the top of the add/update actions; readPackageJson in src/lib.ts already returns {} for missing files, and has tests.
stampui add <block>in a directory without package.json currently proceeds and writes files into cwd. Expected: a short error naming the problem ("no package.json found in ") and pointing tostampui doctor, with a--forceescape hatch for intentional bare-directory use.Good first issue: the check belongs at the top of the add/update actions;
readPackageJsoninsrc/lib.tsalready returns{}for missing files, and has tests.