@squiz/dxp-cli-next 1.4.0 → 1.4.1-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/lib/dxp.js CHANGED
@@ -6,7 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const commander_1 = __importDefault(require("commander"));
7
7
  const update_notifier_1 = __importDefault(require("update-notifier"));
8
8
  const pkg = require('../package.json');
9
- (0, update_notifier_1.default)({ pkg, updateCheckInterval: 1 }).notify();
9
+ (0, update_notifier_1.default)({ pkg, updateCheckInterval: 1 }).notify({
10
+ isGlobal: true,
11
+ });
10
12
  const auth_1 = __importDefault(require("./auth"));
11
13
  const td_1 = __importDefault(require("./td"));
12
14
  const program = new commander_1.default.Command();
@@ -1,3 +1,3 @@
1
1
  import { Command } from 'commander';
2
- declare const _default: Command;
3
- export default _default;
2
+ declare const deployCommand: Command;
3
+ export default deployCommand;
package/lib/td/deploy.js CHANGED
@@ -10,10 +10,24 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  const commander_1 = require("commander");
13
- exports.default = new commander_1.Command()
13
+ const deployment_service_lib_1 = require("@squiz/deployment-service-lib");
14
+ const deployCommand = new commander_1.Command()
14
15
  .name('deploy')
15
- .argument('<source>', 'template location')
16
+ .argument('<source>', 'folder/file path containing the template files to deploy')
16
17
  .argument('<destination>', 'asset id to deploy too')
17
- .action((source, destination) => __awaiter(void 0, void 0, void 0, function* () {
18
- console.log('changed - ', source, destination);
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('-deploy, --template-deployment-url <string>', 'Required: Url for the template deployment api')
25
+ .env('DEPLOYMENT_INFO_API_URL')
26
+ .makeOptionMandatory(true))
27
+ .addOption(new commander_1.Option('-f, --force', 'Optional: Do a force deployment. This will attempt to bypass whatever validation it can').default(false, 'default is false'))
28
+ .addOption(new commander_1.Option('--no-watch', 'Optional: disabling polling for a result. The deployment ID will be returned and return.').default(true))
29
+ .addOption(new commander_1.Option('--dry-run', 'Optional: Perform validation on the local template and do not upload package').default(false))
30
+ .action((source, destination, options, self) => __awaiter(void 0, void 0, void 0, function* () {
31
+ return (0, deployment_service_lib_1.CliUpload)(options.matrixApiUrl, options.matrixApiKey, options.templateDeploymentUrl, source, destination, options.watch, options.force, options.dryRun);
19
32
  }));
33
+ exports.default = deployCommand;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squiz/dxp-cli-next",
3
- "version": "1.4.0",
3
+ "version": "1.4.1-develop.2",
4
4
  "repository": {
5
5
  "url": "https://gitlab.squiz.net/developer-experience/dxp-cli-next"
6
6
  },
@@ -39,6 +39,7 @@
39
39
  "codecov"
40
40
  ],
41
41
  "dependencies": {
42
+ "@squiz/deployment-service-lib": "^1.1.5-alpha.8",
42
43
  "commander": "^9.0.0",
43
44
  "update-notifier": "^5.1.0"
44
45
  },