@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 +2 -2
- package/dist/hooks/init/check-for-updates.js +10 -23
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
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
|
|
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
|
|
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
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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;
|
package/oclif.manifest.json
CHANGED