Skip to content

Commit

Permalink
Add envinfo command (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
tscpp authored Jun 14, 2024
1 parent c129ca3 commit a97efcc
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/cold-buses-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@knuckles/cli": minor
---

Add envinfo command
2 changes: 2 additions & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
},
"dependencies": {
"chalk": "^5.3.0",
"envinfo": "^7.13.0",
"execa": "^8.0.1",
"globby": "^14.0.1",
"import-meta-resolve": "^4.0.0",
Expand All @@ -18,6 +19,7 @@
"yargs": "^17.7.2"
},
"devDependencies": {
"@types/envinfo": "^7.8.4",
"@types/yargs": "^17.0.32"
},
"peerDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/cli/src/commands.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export default [
await import("./commands/add/command.js"),
await import("./commands/analyze/command.js"),
await import("./commands/envinfo/command.js"),
await import("./commands/render/command.js"),
];
23 changes: 23 additions & 0 deletions packages/cli/src/commands/envinfo/command.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import command from "../../command.js";
import * as envinfo from "envinfo";

export default command({
command: "envinfo",
builder: (yargs) => yargs,
handler: async () => {
await envinfo.run(
{
Binaries: ["Node"],
npmPackages: [
"@knuckles/analyzer",
"@knuckles/cli",
"@knuckles/eslint",
"@knuckles/typescript",
],
},
{
console: true,
},
);
},
});
18 changes: 18 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a97efcc

Please sign in to comment.