You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
glaze:inspect: accept a module inside an installed package, as tasty:styles --setup does #117
glaze:inspect reads its <theme> argument only as a file path from the current folder.
tasty:styles --setup also takes a module inside an installed package, such as @acme/ui/harness/theme.mjs. glaze:inspect cannot, so a library that ships its users' theme must give them a node_modules/... path that depends on the install layout.
Seen on 3.1.0 (harness/dev.harnesspm/scripts/inspect.mjs, load()).
Where we met it
@tenphi/cookbook ships harness/dev.harnesspm/theme.mjs. It loads a site's docs.config.ts and exports the site's palette as one Glaze theme, so glaze:inspect shows a Cookbook site's colors. Its patch of glaze:rules/colors has to tell agents:
npx -y @tenphi/harnesspm run glaze:inspect node_modules/@tenphi/cookbook/harness/dev.harnesspm/theme.mjs
That path is wrong in a monorepo that installs packages at the root, and in any layout where the package is not in ./node_modules. The Tasty patch can use --setup @tenphi/cookbook/harness/dev.harnesspm/theme.mjs from any folder.
Proposal
When the argument is not an existing file, resolve it as a package path, as tasty:styles does in resolveSetup(): createRequire(<cwd>/noop.js).resolve(spec), then a walk up the node_modules folders for a file the package's exports do not list. Keep #exportName working after a package path.
Also
The theme header prints the seed unrounded, for example theme (hue 186.39135859888918, saturation 93.43600947902323), when a theme's hue comes from a resolved color. Rounding to one decimal would read better.
Activity
feat(harness): let glaze:inspect take a module inside an installed pa…
chore: use the released harnesspm, Glaze and Tasty lint fixes
feat: ship an agent harness and split the docs for humans and AI agen…