@extrahorizon/exh-cli 1.13.4-dev-206-433ee5a → 1.13.4-dev-208-7b0d057

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/CHANGELOG.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Extra Horizon CLI changelog
2
2
 
3
3
  ### v1.13.4
4
+ * Updated the `templates` syncing feedback to make the synchronization state clearer
5
+ * Updated the `templates` commands to correctly handle cases where the Template Service v1 is unavailable
4
6
 
5
7
  ### v1.13.3
6
8
  * Updated the ExH SDK to `8.11.0` to fix a security warning from `axios` (vulnerable code was not in use)
@@ -5,6 +5,7 @@ const templateRepository = require("../../../repositories/templates");
5
5
  const templateV2Repository = require("../../../repositories/templatesV2");
6
6
  const utils_1 = require("./utils");
7
7
  async function uploadTemplate(template) {
8
+ console.log(`Syncing template: '${template.name}'`);
8
9
  if ((0, utils_1.isV1Template)(template)) {
9
10
  await uploadV1Template(template);
10
11
  }
@@ -17,11 +18,9 @@ async function uploadV1Template(template) {
17
18
  try {
18
19
  const existingTemplate = await templateRepository.findByName(template.name);
19
20
  if (!existingTemplate) {
20
- console.log(`Creating new template '${template.name}'`);
21
21
  await templateRepository.create(template);
22
22
  }
23
23
  else {
24
- console.log(`Updating existing template '${template.name}'`);
25
24
  await templateRepository.update(existingTemplate.id, template);
26
25
  }
27
26
  }
@@ -33,11 +32,9 @@ async function uploadV2Template(template) {
33
32
  try {
34
33
  const existingTemplate = await templateV2Repository.findByName(template.name);
35
34
  if (!existingTemplate) {
36
- console.log(`Creating new template '${template.name}'`);
37
35
  await templateV2Repository.create(template);
38
36
  }
39
37
  else {
40
- console.log(`Updating existing template '${template.name}'`);
41
38
  const update = { description: null, inputs: null, ...template };
42
39
  await templateV2Repository.update(existingTemplate.id, update);
43
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@extrahorizon/exh-cli",
3
- "version": "1.13.4-dev-206-433ee5a",
3
+ "version": "1.13.4-dev-208-7b0d057",
4
4
  "main": "build/index.js",
5
5
  "exports": "./build/index.js",
6
6
  "license": "MIT",