@squiz/dxp-cli-next 1.4.1-develop.2 → 1.5.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,3 @@
1
+ import { Command } from 'commander';
2
+ declare const downCommand: Command;
3
+ export default downCommand;
@@ -0,0 +1,30 @@
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 commander_1 = require("commander");
13
+ const deployment_service_lib_1 = require("@squiz/deployment-service-lib");
14
+ const downCommand = new commander_1.Command()
15
+ .name('download')
16
+ .argument('<destination>', 'folder to download the exported package to')
17
+ .argument('<root-asset-id>', 'root node asset ID to export')
18
+ .addOption(new commander_1.Option('-api, --matrix-api-url <string>', 'Required: Matrix asset management api url')
19
+ .env('MATRIX_ASSET_API_URL')
20
+ .makeOptionMandatory(true))
21
+ .addOption(new commander_1.Option('-key, --matrix-api-key <string>', 'Required: Matrix asset management api key')
22
+ .env('MATRIX_ASSET_API_KEY')
23
+ .makeOptionMandatory(true))
24
+ .addOption(new commander_1.Option('-url, --template-deployment-url <string>', 'Required: Url for the template deployment api')
25
+ .env('DEPLOYMENT_INFO_API_URL')
26
+ .makeOptionMandatory(true))
27
+ .action((source, destination, options, self) => __awaiter(void 0, void 0, void 0, function* () {
28
+ return (0, deployment_service_lib_1.cliDownload)(options.matrixApiUrl, options.matrixApiKey, options.templateDeploymentUrl, source, destination);
29
+ }));
30
+ exports.default = downCommand;
package/lib/td/index.js CHANGED
@@ -5,8 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const commander_1 = require("commander");
7
7
  const deploy_1 = __importDefault(require("./deploy"));
8
+ const download_1 = __importDefault(require("./download"));
8
9
  const authCommand = new commander_1.Command('td');
9
10
  authCommand
10
11
  .description('Template deployment commands')
11
- .addCommand(deploy_1.default);
12
+ .addCommand(deploy_1.default)
13
+ .addCommand(download_1.default);
12
14
  exports.default = authCommand;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squiz/dxp-cli-next",
3
- "version": "1.4.1-develop.2",
3
+ "version": "1.5.0-develop.1",
4
4
  "repository": {
5
5
  "url": "https://gitlab.squiz.net/developer-experience/dxp-cli-next"
6
6
  },
@@ -39,7 +39,7 @@
39
39
  "codecov"
40
40
  ],
41
41
  "dependencies": {
42
- "@squiz/deployment-service-lib": "^1.1.5-alpha.8",
42
+ "@squiz/deployment-service-lib": "^1.1.5-alpha.21",
43
43
  "commander": "^9.0.0",
44
44
  "update-notifier": "^5.1.0"
45
45
  },