@squiz/dxp-cli-next 1.9.0-develop.4 → 1.9.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.
- package/lib/__tests__/integration/main.spec.js +0 -1
- package/lib/dxp.js +0 -2
- package/lib/td/index.js +1 -3
- package/lib/td/setExternalIds.js +1 -1
- package/package.json +2 -3
- package/lib/cmp/deploy.d.ts +0 -3
- package/lib/cmp/deploy.js +0 -38
- package/lib/cmp/index.d.ts +0 -3
- package/lib/cmp/index.js +0 -10
- package/lib/td/validate.d.ts +0 -3
- package/lib/td/validate.js +0 -35
package/lib/dxp.js
CHANGED
|
@@ -11,7 +11,6 @@ const pkg = require('../package.json');
|
|
|
11
11
|
});
|
|
12
12
|
const auth_1 = __importDefault(require("./auth"));
|
|
13
13
|
const td_1 = __importDefault(require("./td"));
|
|
14
|
-
const cmp_1 = __importDefault(require("./cmp"));
|
|
15
14
|
const program = new commander_1.default.Command();
|
|
16
15
|
const packageJson = require('../package.json');
|
|
17
16
|
const version = packageJson.version;
|
|
@@ -21,7 +20,6 @@ program
|
|
|
21
20
|
.description('dxp commands')
|
|
22
21
|
.addCommand(auth_1.default)
|
|
23
22
|
.addCommand(td_1.default)
|
|
24
|
-
.addCommand(cmp_1.default)
|
|
25
23
|
.action(() => {
|
|
26
24
|
program.help();
|
|
27
25
|
})
|
package/lib/td/index.js
CHANGED
|
@@ -7,12 +7,10 @@ const commander_1 = require("commander");
|
|
|
7
7
|
const deploy_1 = __importDefault(require("./deploy"));
|
|
8
8
|
const download_1 = __importDefault(require("./download"));
|
|
9
9
|
const setExternalIds_1 = __importDefault(require("./setExternalIds"));
|
|
10
|
-
const validate_1 = __importDefault(require("./validate"));
|
|
11
10
|
const tdCommand = new commander_1.Command('td');
|
|
12
11
|
tdCommand
|
|
13
12
|
.description('Template deployment commands')
|
|
14
13
|
.addCommand(deploy_1.default)
|
|
15
14
|
.addCommand(download_1.default)
|
|
16
|
-
.addCommand(setExternalIds_1.default)
|
|
17
|
-
.addCommand(validate_1.default);
|
|
15
|
+
.addCommand(setExternalIds_1.default);
|
|
18
16
|
exports.default = tdCommand;
|
package/lib/td/setExternalIds.js
CHANGED
|
@@ -16,7 +16,7 @@ const commander_1 = require("commander");
|
|
|
16
16
|
const deployment_service_lib_1 = require("@squiz/deployment-service-lib");
|
|
17
17
|
const cli_color_1 = __importDefault(require("cli-color"));
|
|
18
18
|
const setExternalIdsCommand = new commander_1.Command()
|
|
19
|
-
.name('
|
|
19
|
+
.name('setExternalIds')
|
|
20
20
|
.argument('<root-asset-id>', 'root asset ID to set external ids for')
|
|
21
21
|
.addOption(new commander_1.Option('-f, --force', 'Optional: Do a force reset. This will reset all the external ids for the given root asset id').default(false, 'default is false'))
|
|
22
22
|
.addOption(new commander_1.Option('-api, --matrix-api-url <string>', 'Required: Matrix asset management api url')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squiz/dxp-cli-next",
|
|
3
|
-
"version": "1.9.0
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "https://gitlab.squiz.net/developer-experience/dxp-cli-next"
|
|
6
6
|
},
|
|
@@ -39,8 +39,7 @@
|
|
|
39
39
|
"codecov"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@squiz/deployment-service-lib": "1.1.5-alpha.
|
|
43
|
-
"@squiz/component-cli-lib": "1.2.1-alpha.30",
|
|
42
|
+
"@squiz/deployment-service-lib": "^1.1.5-alpha.57",
|
|
44
43
|
"cli-color": "^2.0.1",
|
|
45
44
|
"commander": "^9.0.0",
|
|
46
45
|
"update-notifier": "^5.1.0"
|
package/lib/cmp/deploy.d.ts
DELETED
package/lib/cmp/deploy.js
DELETED
|
@@ -1,38 +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
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const commander_1 = require("commander");
|
|
16
|
-
const component_cli_lib_1 = require("@squiz/component-cli-lib");
|
|
17
|
-
const cli_color_1 = __importDefault(require("cli-color"));
|
|
18
|
-
const deployCommand = new commander_1.Command()
|
|
19
|
-
.name('deploy')
|
|
20
|
-
.argument('<source>', 'folder/file path containing the template files to deploy')
|
|
21
|
-
.addOption(new commander_1.Option('-url, --component-service-url <string>', 'Required: Url for the component service')
|
|
22
|
-
.env('COMPONENT_SERVICE_URL')
|
|
23
|
-
.makeOptionMandatory(true))
|
|
24
|
-
.action((source, options, self) => __awaiter(void 0, void 0, void 0, function* () {
|
|
25
|
-
try {
|
|
26
|
-
return yield (0, component_cli_lib_1.uploadComponentFolder)(source, options.componentServiceUrl);
|
|
27
|
-
}
|
|
28
|
-
catch (error) {
|
|
29
|
-
if (error.message) {
|
|
30
|
-
deployCommand.error(cli_color_1.default.red(error.message));
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
console.error(error);
|
|
34
|
-
deployCommand.error('An unknown error occurred');
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}));
|
|
38
|
-
exports.default = deployCommand;
|
package/lib/cmp/index.d.ts
DELETED
package/lib/cmp/index.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const commander_1 = require("commander");
|
|
7
|
-
const deploy_1 = __importDefault(require("./deploy"));
|
|
8
|
-
const cmpCommand = new commander_1.Command('cmp');
|
|
9
|
-
cmpCommand.description('Component Service Commands').addCommand(deploy_1.default);
|
|
10
|
-
exports.default = cmpCommand;
|
package/lib/td/validate.d.ts
DELETED
package/lib/td/validate.js
DELETED
|
@@ -1,35 +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
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const commander_1 = require("commander");
|
|
16
|
-
const deployment_service_lib_1 = require("@squiz/deployment-service-lib");
|
|
17
|
-
const cli_color_1 = __importDefault(require("cli-color"));
|
|
18
|
-
const validateCommand = new commander_1.Command()
|
|
19
|
-
.name('validate')
|
|
20
|
-
.argument('<source>', 'folder/file path containing the files to validate')
|
|
21
|
-
.action((source) => __awaiter(void 0, void 0, void 0, function* () {
|
|
22
|
-
try {
|
|
23
|
-
return yield (0, deployment_service_lib_1.cliValidate)(source);
|
|
24
|
-
}
|
|
25
|
-
catch (error) {
|
|
26
|
-
if (error.message) {
|
|
27
|
-
validateCommand.error(cli_color_1.default.red(error.message));
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
console.error(error);
|
|
31
|
-
validateCommand.error('An unknown error occurred');
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}));
|
|
35
|
-
exports.default = validateCommand;
|