@atomicsmash/cli 2.0.0 → 2.1.1

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/dist/index.js CHANGED
@@ -39,5 +39,6 @@ switch (commandArg) {
39
39
  break;
40
40
  default:
41
41
  console.error(noCommandFound);
42
+ process.exitCode = 1;
42
43
  break;
43
44
  }
package/dist/utils.js CHANGED
@@ -16,13 +16,10 @@ export function hasHelpFlag(args) {
16
16
  export async function execute(command) {
17
17
  return new Promise((resolve, reject) => {
18
18
  exec(command, (error, stdout, stderr) => {
19
- if (stderr !== "") {
20
- reject(stderr);
19
+ if (error) {
20
+ reject({ error, stdout, stderr });
21
21
  }
22
- if (stdout !== "") {
23
- resolve(stdout);
24
- }
25
- reject("No stdout or stderr.");
22
+ resolve({ error, stdout, stderr });
26
23
  });
27
24
  });
28
25
  }
package/package.json CHANGED
@@ -1,12 +1,9 @@
1
1
  {
2
2
  "name": "@atomicsmash/cli",
3
- "version": "2.0.0",
3
+ "version": "2.1.1",
4
4
  "description": "A collection of CLI tools by Atomic Smash.",
5
5
  "keywords": [],
6
- "homepage": "",
7
- "bugs": {
8
- "url": "https://clients.atomicsmash.co.uk/atomicsmash/cli/-/issues"
9
- },
6
+ "homepage": "https://www.atomicsmash.co.uk/",
10
7
  "license": "GPL-3.0-or-later",
11
8
  "author": {
12
9
  "name": "Atomic Smash",
@@ -21,21 +18,20 @@
21
18
  "smash-cli": "./dist/index.js",
22
19
  "@atomicsmash/cli": "./dist/index.js"
23
20
  },
24
- "repository": {
25
- "type": "git",
26
- "url": "https://clients.atomicsmash.co.uk/atomicsmash/cli"
27
- },
28
21
  "type": "module",
29
22
  "publishConfig": {
30
23
  "access": "public"
31
24
  },
32
25
  "scripts": {
33
26
  "prepare": "husky install",
34
- "dev": "tsc --project tsconfig.build.json --watch",
27
+ "dev": "npm run compile -- --watch",
28
+ "build": "npm-run-all clean compile",
29
+ "clean": "del-cli ./dist/",
30
+ "compile": "tsc --project tsconfig.build.json",
35
31
  "test": "vitest run",
36
32
  "test:ui": "vitest --ui",
37
33
  "test:coverage": "vitest run --coverage",
38
- "release": "standard-version"
34
+ "release": "standard-version --skip.commit --skip.tag"
39
35
  },
40
36
  "dependencies": {
41
37
  "fs": "^0.0.1-security",
@@ -53,16 +49,21 @@
53
49
  "@typescript-eslint/eslint-plugin": "^5.31.0",
54
50
  "@typescript-eslint/parser": "^5.31.0",
55
51
  "@vitest/ui": "^0.23.4",
52
+ "del-cli": "^5.0.0",
56
53
  "eslint": "^8.20.0",
57
54
  "eslint-config-prettier": "^8.5.0",
58
55
  "eslint-import-resolver-typescript": "^3.3.0",
59
56
  "eslint-plugin-import": "^2.26.0",
60
57
  "eslint-plugin-prefer-type-alias": "^0.1.0",
61
58
  "husky": "^8.0.1",
59
+ "npm-run-all": "^4.1.5",
62
60
  "prettier": "^2.7.1",
63
61
  "standard-version": "^9.5.0",
64
62
  "type-fest": "^3.0.0",
65
63
  "vite": "^3.0.4",
66
64
  "vitest": "^0.23.4"
65
+ },
66
+ "engines": {
67
+ "node": ">=16"
67
68
  }
68
69
  }