Repository navigation
feat: add an offline asset CLI for fonts and Twemoji - #39
Merged
Merged
Conversation
Adds `miq`/`makeitaquote install|uninstall|ls|search|outdated`, so renders can run with the network down instead of always fetching fonts and Twemoji on first use. `install`/`uninstall`/`ls` cover downloading, removing and listing what's on disk (Twemoji included); `search` lists the font names miq knows how to install by name; `outdated` checks miq itself, Twemoji, and every installed font against what's currently published. Argv parsing, aliases (`add`/`i`, `remove`/`rm`/`un`, `list`, `find`/`s`) and --help/--version text are handled by cleye rather than a hand-rolled dispatcher, so the CLI's own help is assembled from structured description/examples/alias fields instead of a maintained-by-hand usage string. Command bodies stay fully dependency-injected and disk/network-free to test; only cleye's own console/process.exit-driven paths sit outside that seam. Downloaded fonts and Twemoji default to `<project root>/.makeitaquote` (nearest ancestor `package.json` from cwd) rather than a cache shared by every project on the machine, so one project's uninstall can't reach into another's, and two projects on different miq versions don't fight over the same files. MIQ_FONT_CACHE_DIR/MIQ_TWEMOJI_CACHE_DIR still override it.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
miq/makeitaquote install|uninstall|ls|search|outdatedso renders can run with the network down, instead of always fetching fonts and Twemoji on first use.install/uninstall/lscover downloading, removing and listing what's on disk (Twemoji included);searchlists the font names miq knows how to install by name;outdatedchecks miq itself, Twemoji, and every installed font against what's currently published.add/i,remove/rm/un,list,find/s) and--help/--versiontext are handled by cleye rather than a hand-rolled dispatcher, so the CLI's help is assembled from structureddescription/examples/aliasfields instead of a hand-maintained usage string. Command bodies stay fully dependency-injected and disk/network-free to test (src/cli/commands.ts); only cleye's own console/process.exit-driven paths (--help,--version, unknown args) sit outside that seam.<project root>/.makeitaquote(nearest ancestorpackage.jsonfromcwd) rather than a cache shared by every project on the machine, so one project'suninstallcan't reach into another's, and two projects on different miq versions don't fight over the same files.MIQ_FONT_CACHE_DIR/MIQ_TWEMOJI_CACHE_DIRstill override it.INFO.mdfor thecleyeand storage-location rationale, and the updatedREADME.md"Offline use" section for the full command table.Test plan
npm run typechecknpm run ci(biome lint + format)npm run test(621 tests)npm run buildnpm run check:build(63 checks — dual CJS/ESM output, native binding stays external,makeitaquote/apiexcludes the rendering stack)dist/cli/main.mjs): bare invocation,--help/-h,help,--version, an unknown command, every alias,search, and a realinstall/ls/outdatedround trip confirming project-local storage under.makeitaquote/