@squiz/dxp-cli-next 0.0.0-development → 1.0.0-develop.2

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/bin/dxp.js CHANGED
File without changes
@@ -1,9 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const helpers_1 = require("../helpers");
4
- describe('my-command', () => {
4
+ describe('dxp', () => {
5
5
  it('should display the help contents', () => {
6
6
  const { stdout } = (0, helpers_1.runCLI)(process.cwd(), ['--help']);
7
- expect(stdout).toContain('Usage: my-command [options]');
7
+ expect(stdout).toContain('Usage: dxp [options] [command]');
8
+ });
9
+ it('should show all available commands', () => {
10
+ var _a;
11
+ const { stdout } = (0, helpers_1.runCLI)(process.cwd(), ['--help']);
12
+ const commandsText = (_a = stdout
13
+ .match(/Commands\:(.*)/is)) === null || _a === void 0 ? void 0 : _a[1].split('\n').map(a => a.trim()).filter(a => !!a);
14
+ expect(commandsText).toEqual([
15
+ 'auth log into the sxc',
16
+ 'td Template deployment commands',
17
+ ]);
8
18
  });
9
19
  });
package/lib/dxp.js CHANGED
@@ -4,6 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const commander_1 = __importDefault(require("commander"));
7
+ const update_notifier_1 = __importDefault(require("update-notifier"));
8
+ const pkg = require('../package.json');
9
+ (0, update_notifier_1.default)({ pkg }).notify();
7
10
  const auth_1 = __importDefault(require("./auth"));
8
11
  const td_1 = __importDefault(require("./td"));
9
12
  const program = new commander_1.default.Command();
package/package.json CHANGED
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "name": "@squiz/dxp-cli-next",
3
- "version": "0.0.0-development",
3
+ "version": "1.0.0-develop.2",
4
+ "repository": {
5
+ "url": "https://gitlab.squiz.net/developer-experience/dxp-cli-next"
6
+ },
4
7
  "files": [
5
8
  "!lib/__tests__/**/*",
6
9
  "lib/**/*",
@@ -22,7 +25,7 @@
22
25
  "typecheck": "tsc --noEmit"
23
26
  },
24
27
  "engines": {
25
- "node": ">=12.0"
28
+ "node": ">=14.0"
26
29
  },
27
30
  "keywords": [
28
31
  "cli",
@@ -36,11 +39,16 @@
36
39
  "codecov"
37
40
  ],
38
41
  "dependencies": {
39
- "commander": "^9.0.0"
42
+ "commander": "^9.0.0",
43
+ "update-notifier": "^5.1.0"
40
44
  },
41
45
  "devDependencies": {
46
+ "@semantic-release/git": "^10.0.1",
47
+ "@semantic-release/gitlab": "^7.0.4",
48
+ "@semantic-release/npm": "^9.0.0",
42
49
  "@types/jest": "^27.4.0",
43
50
  "@types/node": "^17.0.14",
51
+ "@types/update-notifier": "^5.1.0",
44
52
  "@typescript-eslint/eslint-plugin": "^5.10.2",
45
53
  "@typescript-eslint/parser": "^5.10.2",
46
54
  "chalk": "^4.1.2",
@@ -71,7 +79,26 @@
71
79
  },
72
80
  "release": {
73
81
  "branches": [
74
- "main"
82
+ "master",
83
+ {
84
+ "name": "develop",
85
+ "prerelease": true
86
+ }
87
+ ],
88
+ "plugins": [
89
+ "@semantic-release/commit-analyzer",
90
+ "@semantic-release/release-notes-generator",
91
+ "@semantic-release/npm",
92
+ [
93
+ "@semantic-release/git",
94
+ {
95
+ "assets": [
96
+ "docs",
97
+ "package.json"
98
+ ],
99
+ "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
100
+ }
101
+ ]
75
102
  ]
76
103
  }
77
104
  }