saveinme 1.3.2 → 1.3.3

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/package.json +1 -1
  2. package/src/display.js +14 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saveinme",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "description": "Your personal terminal notebook — save anything, permanently.",
5
5
  "type": "module",
6
6
  "main": "./bin/saveinme.js",
package/src/display.js CHANGED
@@ -1,6 +1,13 @@
1
1
  import chalk from 'chalk';
2
2
  import boxen from 'boxen';
3
3
  import Table from 'cli-table3';
4
+ import { readFileSync } from 'fs';
5
+ import { join, dirname } from 'path';
6
+ import { fileURLToPath } from 'url';
7
+
8
+ const __dirname = dirname(fileURLToPath(import.meta.url));
9
+ const pkg = JSON.parse(readFileSync(join(__dirname, '../package.json'), 'utf-8'));
10
+ const VERSION = pkg.version;
4
11
 
5
12
  // ─── Color palettes ────────────────────────────────────────────────────────────
6
13
 
@@ -48,8 +55,8 @@ export function formatDate(iso) {
48
55
 
49
56
  export function showHeader() {
50
57
  const logo =
51
- chalk.bold.cyanBright('💾 saveinme') +
52
- chalk.dim(' v1.0.0') +
58
+ chalk.bold.cyanBright('💾 saveinme (sim)') +
59
+ chalk.dim(` v${VERSION}`) +
53
60
  '\n' +
54
61
  chalk.dim('your personal terminal notebook');
55
62
 
@@ -135,11 +142,11 @@ export function showNotesList(notes, heading = null) {
135
142
  console.log(
136
143
  chalk.dim(
137
144
  `\n ${notes.length} note${notes.length !== 1 ? 's' : ''} saved` +
138
- ` · saveinme -c create` +
139
- ` · saveinme -cl paste clip` +
140
- ` · saveinme -v <title> view` +
141
- ` · saveinme -f <term> search` +
142
- ` · saveinme -h help\n`
145
+ ` · sim -c create` +
146
+ ` · sim -cl paste clip` +
147
+ ` · sim -v <title> view` +
148
+ ` · sim -f <term> search` +
149
+ ` · sim -h help\n`
143
150
  )
144
151
  );
145
152
  }