@firenet-designs/fnd-cli 1.0.1 → 1.1.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
@@ -20,7 +20,7 @@ $ npm install -g @firenet-designs/fnd-cli
20
20
  $ fnd-cli COMMAND
21
21
  running command...
22
22
  $ fnd-cli (--version)
23
- @firenet-designs/fnd-cli/1.0.1 darwin-x64 node-v24.12.0
23
+ @firenet-designs/fnd-cli/1.1.0 darwin-x64 node-v24.12.0
24
24
  $ fnd-cli --help [COMMAND]
25
25
  USAGE
26
26
  $ fnd-cli COMMAND
@@ -51,7 +51,7 @@ EXAMPLES
51
51
  $ fnd-cli create-app
52
52
  ```
53
53
 
54
- _See code: [src/commands/create-app.ts](https://github.com/FireNet-Designs/fnd-cli/blob/v1.0.1/src/commands/create-app.ts)_
54
+ _See code: [src/commands/create-app.ts](https://github.com/FireNet-Designs/fnd-cli/blob/v1.1.0/src/commands/create-app.ts)_
55
55
 
56
56
  ## `fnd-cli help [COMMAND]`
57
57
 
@@ -1,28 +1,15 @@
1
- import { simpleGit } from 'simple-git';
2
- import os from 'node:os';
3
- import { join } from 'node:path';
4
- import { rmSync, readFileSync } from 'node:fs';
5
1
  import chalk from 'chalk';
2
+ import { exec } from 'node:child_process';
6
3
  const hook = async function (opts) {
7
- const tempRepo = join(os.tmpdir(), 'fnd-cli');
8
- try {
9
- const git = simpleGit({ binary: 'git' });
10
- await git.clone('git@github.com:FireNet-Designs/fnd-cli.git', tempRepo, { '--depth': 1 });
11
- // Getting package.json file to check version
12
- const pjson = JSON.parse(readFileSync(join(tempRepo, 'package.json'), 'utf-8'));
13
- const newestVersion = pjson.version;
14
- const ourVersion = opts.config.pjson.version;
15
- if (newestVersion !== ourVersion) {
16
- console.log(chalk.yellow('💡 Version', chalk.green(newestVersion), 'available! Run', chalk.green('`npm i -g git@github.com:FireNet-Designs/fnd-cli.git`'), 'to update to the latest version!\n'));
17
- }
18
- }
19
- finally {
20
- // Deleting the temp repo but ignoring errors
21
- try {
22
- rmSync(tempRepo, { recursive: true });
23
- }
24
- catch { }
25
- ;
4
+ const newestVersion = await new Promise((resolve, reject) => {
5
+ exec(`npm view @firenet-designs/fnd-cli version`, (error, stdout) => {
6
+ if (error)
7
+ return reject(error);
8
+ resolve(stdout.trim());
9
+ });
10
+ });
11
+ if (newestVersion !== opts.config.pjson.version) {
12
+ console.log(chalk.yellow('💡 Version', chalk.green(newestVersion), 'available! Run', chalk.green('`npm i -g git@github.com:FireNet-Designs/fnd-cli.git`'), 'to update to the latest version!\n'));
26
13
  }
27
14
  };
28
15
  export default hook;
@@ -41,5 +41,5 @@
41
41
  ]
42
42
  }
43
43
  },
44
- "version": "1.0.1"
44
+ "version": "1.1.0"
45
45
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@firenet-designs/fnd-cli",
3
3
  "description": "A new CLI generated with oclif",
4
- "version": "1.0.1",
4
+ "version": "1.1.0",
5
5
  "author": "Cole Denslow",
6
6
  "bin": {
7
7
  "fnd-cli": "bin/run.js"