@tommy-ca/lazypi 0.6.5 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -54,6 +54,12 @@ There is nothing to "uninstall" for LazyPi itself — `npx` doesn't leave it aro
54
54
 
55
55
  Run the built-in health check with `npx @tommy-ca/lazypi doctor`.
56
56
 
57
+ **Stale `bunx` after a release?** bun caches resolved package versions, so a
58
+ bare `bunx @tommy-ca/lazypi` can keep serving the previous release until the
59
+ cache is cleared. Run `bun pm cache rm`, pin `@tommy-ca/lazypi@latest`, and
60
+ check `npx @tommy-ca/lazypi --version` to see which release is actually
61
+ running.
62
+
57
63
  ## Site / docs
58
64
 
59
65
  The site at [lazypi.org](https://lazypi.org) lives in `docs/` and is a Jekyll site compiled by GitHub Pages automatically on push to `master`.
package/bin/lazypi.mjs CHANGED
@@ -96,6 +96,7 @@ function parseArgs(args) {
96
96
  yes: false,
97
97
  help: false,
98
98
  badArg: false,
99
+ version: false,
99
100
  only: null,
100
101
  except: null,
101
102
  targets: [],
@@ -111,6 +112,7 @@ function parseArgs(args) {
111
112
  const arg = args[i];
112
113
  if (arg === "-l" || arg === "--local") flags.local = true;
113
114
  else if (arg === "-y" || arg === "--yes") flags.yes = true;
115
+ else if (arg === "-V" || arg === "--version") flags.version = true;
114
116
  else if (arg === "-h" || arg === "--help") flags.help = true;
115
117
  else if (arg === "--only") flags.only = parseList(args[++i]);
116
118
  else if (arg.startsWith("--only=")) flags.only = parseList(arg.slice("--only=".length));
@@ -185,6 +187,7 @@ ${bold("Install options:")}
185
187
  -l, --local Install into the current project (.pi/settings.json)
186
188
  -y, --yes Skip the picker and any confirmation prompt
187
189
  -h, --help Show this help
190
+ -V, --version Show the installed version
188
191
 
189
192
  ${bold("Default behaviour:")}
190
193
  - Every catalog package is installed (lazy on purpose).
@@ -210,6 +213,7 @@ ${bold("Examples:")}
210
213
  // ---------------------------------------------------------------------------
211
214
  // Pi / settings plumbing
212
215
  // ---------------------------------------------------------------------------
216
+ const VERSION = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
213
217
  // On Windows, package-manager CLIs and global Node bins are usually `.cmd`
214
218
  // shims. Node's child_process docs note that those need to be launched via a
215
219
  // shell, so we route spawned commands through the platform shell there while
@@ -872,6 +876,10 @@ async function cmdRemove(flags, targets) {
872
876
  // ---------------------------------------------------------------------------
873
877
  async function main() {
874
878
  const flags = parseArgs(argv.slice(2));
879
+ if (flags.version) {
880
+ console.log(`@tommy-ca/lazypi ${VERSION}`);
881
+ return 0;
882
+ }
875
883
  if (flags.help) {
876
884
  printHelp();
877
885
  return flags.badArg ? 2 : 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tommy-ca/lazypi",
3
- "version": "0.6.5",
3
+ "version": "0.7.0",
4
4
  "description": "Opinionated one-shot installer for a full-featured Pi coding agent setup.",
5
5
  "license": "MIT",
6
6
  "repository": {