@squiz/dxp-cli-next 5.19.1-develop.1 → 5.20.0-develop.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.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const child_process_1 = require("child_process");
4
+ describe('Smoke Test - Validate release', () => {
5
+ const packageName = '@squiz/dxp-cli-next';
6
+ const executeDxpCommand = (command) => {
7
+ let commandOutput;
8
+ try {
9
+ commandOutput = (0, child_process_1.execSync)(command, { encoding: 'utf8' });
10
+ }
11
+ catch (error) {
12
+ // Capturing the output of the command since execSync thinks its an error due to
13
+ // it being a non-zero output
14
+ commandOutput = error.stdout || error.stderr;
15
+ console.log(error);
16
+ }
17
+ return commandOutput;
18
+ };
19
+ describe('Installation', () => {
20
+ it('should install the current latest version from the registry', () => {
21
+ // Get installed version
22
+ const installedVersion = (0, child_process_1.execSync)('dxp-next --version').toString();
23
+ // Get expected version
24
+ const expectedVersion = (0, child_process_1.execSync)(`npm view ${packageName} version`)
25
+ .toString()
26
+ .trim();
27
+ console.log('Installed Version is ', installedVersion);
28
+ console.log('Expected Version is ', expectedVersion);
29
+ // Validate version
30
+ expect(installedVersion).toContain(expectedVersion);
31
+ });
32
+ });
33
+ describe('Commands', () => {
34
+ const commandAssertionSet = [
35
+ { command: '--help', assertion: 'Usage: dxp-next [options] [command]' },
36
+ { command: 'auth', assertion: 'Authenticate into the DXP-Next CLI' },
37
+ { command: 'cmp', assertion: 'Component Service Commands' },
38
+ { command: 'job-runner', assertion: 'Job Runner Service Commands' },
39
+ { command: 'datastore', assertion: 'Datastore Service Commands' },
40
+ { command: 'cdp', assertion: 'Customer Data Platform Service Commands' },
41
+ ];
42
+ commandAssertionSet.forEach(commandSet => {
43
+ it(`should be able to execute the ${commandSet.command} successfully`, () => {
44
+ const commandResult = executeDxpCommand(`dxp-next ${commandSet.command}`);
45
+ expect(commandResult).not.toContain('error');
46
+ console.log(commandResult.trim());
47
+ expect(commandResult).toContain(commandSet.assertion);
48
+ });
49
+ });
50
+ });
51
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squiz/dxp-cli-next",
3
- "version": "5.19.1-develop.1",
3
+ "version": "5.20.0-develop.1",
4
4
  "repository": {
5
5
  "url": "https://gitlab.squiz.net/dxp/dxp-cli-next"
6
6
  },
@@ -21,7 +21,8 @@
21
21
  "prepare": "husky install",
22
22
  "semantic-release": "semantic-release",
23
23
  "test:watch": "jest --watch",
24
- "test": "jest",
24
+ "test": "jest --testPathIgnorePatterns=src/__tests__/smoke/validate.spec.ts",
25
+ "test:smoke": "jest src/__tests__/smoke/validate.spec.ts",
25
26
  "typecheck": "tsc --noEmit"
26
27
  },
27
28
  "engines": {
@@ -42,8 +43,8 @@
42
43
  "@apidevtools/swagger-parser": "10.1.0",
43
44
  "@squiz/component-cli-lib": "1.68.0",
44
45
  "@squiz/dxp-porter-shared": "0.4.0",
45
- "@squiz/local-component-dev-ui": "^0.3.0",
46
- "@squiz/render-runtime-lib": "^1.69.0",
46
+ "@squiz/local-component-dev-ui": "^0.4.1",
47
+ "@squiz/render-runtime-lib": "^1.72.0",
47
48
  "axios": "1.1.3",
48
49
  "cli-color": "2.0.3",
49
50
  "commander": "9.4.0",