@squiz/dxp-cli-next 2.11.0-develop.4 → 2.11.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.
@@ -1,4 +1,3 @@
1
1
  import { Command } from 'commander';
2
- export declare const buildDevModeCommand: () => Command;
3
2
  declare const devModeCommand: Command;
4
3
  export default devModeCommand;
@@ -9,10 +9,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.buildDevModeCommand = void 0;
13
12
  const commander_1 = require("commander");
14
13
  const component_cli_lib_1 = require("@squiz/component-cli-lib");
15
- const buildDevModeCommand = () => new commander_1.Command()
14
+ const devModeCommand = new commander_1.Command()
16
15
  .name('dev')
17
16
  .description('A local component runner for developing new components')
18
17
  .addHelpText('after', `
@@ -23,10 +22,8 @@ The logs are currently \`bunyan\` formatted and should be piped into the bunyan
23
22
  .argument('<source>', 'folder containing the template files in development')
24
23
  .addOption(new commander_1.Option('-p, --port <number>', 'Define port the webserver runs on')
25
24
  .default(3000)
26
- .argParser(v => parseInt(v)))
25
+ .argParser(parseInt))
27
26
  .action((source, options) => __awaiter(void 0, void 0, void 0, function* () {
28
27
  yield (0, component_cli_lib_1.startDevelopmentRender)(source, options);
29
28
  }));
30
- exports.buildDevModeCommand = buildDevModeCommand;
31
- const devModeCommand = (0, exports.buildDevModeCommand)();
32
29
  exports.default = devModeCommand;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squiz/dxp-cli-next",
3
- "version": "2.11.0-develop.4",
3
+ "version": "2.11.0",
4
4
  "repository": {
5
5
  "url": "https://gitlab.squiz.net/developer-experience/dxp-cli-next"
6
6
  },
@@ -42,22 +42,22 @@
42
42
  "@squiz/component-cli-lib": "1.2.1-alpha.68",
43
43
  "@squiz/deployment-service-lib": "1.1.5-alpha.83",
44
44
  "cli-color": "2.0.3",
45
- "commander": "9.4.0",
45
+ "commander": "9.3.0",
46
46
  "update-notifier": "5.1.0"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@semantic-release/git": "10.0.1",
50
- "@semantic-release/gitlab": "9.4.1",
50
+ "@semantic-release/gitlab": "9.3.2",
51
51
  "@semantic-release/npm": "9.0.1",
52
52
  "@types/cli-color": "2.0.2",
53
- "@types/jest": "28.1.6",
53
+ "@types/jest": "28.1.4",
54
54
  "@types/node": "17.0.45",
55
55
  "@types/update-notifier": "5.1.0",
56
+ "@typescript-eslint/eslint-plugin": "5.30.5",
57
+ "@typescript-eslint/parser": "5.30.5",
56
58
  "chalk": "4.1.2",
57
- "@typescript-eslint/eslint-plugin": "5.30.7",
58
- "@typescript-eslint/parser": "5.30.7",
59
59
  "codecov": "3.8.3",
60
- "commitizen": "4.2.5",
60
+ "commitizen": "4.2.4",
61
61
  "cz-conventional-changelog": "3.3.0",
62
62
  "eslint": "8.19.0",
63
63
  "eslint-config-prettier": "8.5.0",
@@ -65,12 +65,12 @@
65
65
  "eslint-plugin-prettier": "4.2.1",
66
66
  "execa": "5.1.1",
67
67
  "husky": "8.0.1",
68
- "jest": "28.1.3",
68
+ "jest": "28.1.2",
69
69
  "lint-staged": "13.0.3",
70
70
  "prettier": "2.7.1",
71
71
  "semantic-release": "19.0.3",
72
- "ts-jest": "28.0.7",
73
- "ts-node": "10.9.1",
72
+ "ts-jest": "28.0.5",
73
+ "ts-node": "10.8.2",
74
74
  "typescript": "4.7.4"
75
75
  },
76
76
  "config": {
@@ -1 +0,0 @@
1
- export {};
@@ -1,30 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- const dev_mode_1 = require("../../cmp/dev-mode");
13
- describe('cmp dev', () => {
14
- it('correctly parses the port', () => __awaiter(void 0, void 0, void 0, function* () {
15
- const program = (0, dev_mode_1.buildDevModeCommand)()
16
- .exitOverride()
17
- .action(() => { });
18
- program.parse(['node', 'dxp-cli', 'dev', '--port', '3005']);
19
- const opts = program.opts();
20
- expect(opts.port).toStrictEqual(3005);
21
- }));
22
- it('defaults the port to 3000', () => {
23
- const program = (0, dev_mode_1.buildDevModeCommand)()
24
- .exitOverride()
25
- .action(() => { });
26
- program.parse(['node', 'dxp-cli', 'dev']);
27
- const opts = program.opts();
28
- expect(opts.port).toStrictEqual(3000);
29
- });
30
- });