@bobfrankston/mailx 1.0.30 → 1.0.31

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.
Files changed (2) hide show
  1. package/bin/mailx.js +20 -5
  2. package/package.json +1 -1
package/bin/mailx.js CHANGED
@@ -62,13 +62,28 @@ if (hasFlag("kill")) {
62
62
 
63
63
  // Version
64
64
  if (hasFlag("v") || hasFlag("version")) {
65
- const pkgPath = path.join(import.meta.dirname, "..", "package.json");
65
+ const root = path.join(import.meta.dirname, "..");
66
+ const ver = (pkg) => {
67
+ for (const dir of [`${root}/node_modules/${pkg}`, `${root}/node_modules/@bobfrankston/${pkg.replace("@bobfrankston/","")}`]) {
68
+ try { return JSON.parse(fs.readFileSync(`${dir}/package.json`, "utf-8")).version; } catch { /* */ }
69
+ }
70
+ // Check workspace packages
71
+ const short = pkg.replace("@bobfrankston/","");
72
+ try { return JSON.parse(fs.readFileSync(`${root}/packages/${short}/package.json`, "utf-8")).version; } catch { /* */ }
73
+ return "not found";
74
+ };
66
75
  try {
67
- const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf-8"));
76
+ const pkg = JSON.parse(fs.readFileSync(`${root}/package.json`, "utf-8"));
68
77
  console.log(`mailx v${pkg.version}`);
69
- } catch {
70
- console.log("mailx (version unknown)");
71
- }
78
+ } catch { console.log("mailx (version unknown)"); }
79
+ console.log(` node ${process.version}`);
80
+ console.log(` iflow ${ver("@bobfrankston/iflow")}`);
81
+ console.log(` miscinfo ${ver("@bobfrankston/miscinfo")}`);
82
+ console.log(` oauth ${ver("@bobfrankston/oauthsupport")}`);
83
+ console.log(` store ${ver("@bobfrankston/mailx-store")}`);
84
+ console.log(` server ${ver("@bobfrankston/mailx-server")}`);
85
+ console.log(` api ${ver("@bobfrankston/mailx-api")}`);
86
+ console.log(` platform ${process.platform} ${process.arch}`);
72
87
  process.exit(0);
73
88
  }
74
89
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "description": "Local-first email client with IMAP sync and standalone native app",
5
5
  "type": "module",
6
6
  "main": "bin/mailx.js",