@extrahorizon/exh-cli 1.12.0-dev-151-7544bdb → 1.12.0-dev-152-fc8569c

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.
@@ -21,13 +21,20 @@ async function buildTemplate(name, templateFilesByName, callChain = []) {
21
21
  if (!templateFile) {
22
22
  throw new Error(`Template file dependency ${name} not found!`);
23
23
  }
24
+ let templateConfig;
24
25
  if (templateFile.extends_template) {
25
- return await extendV1Template(name, templateFilesByName, newCallChain);
26
+ templateConfig = await extendV1Template(name, templateFilesByName, newCallChain);
26
27
  }
27
- if (templateFile.extendsTemplate) {
28
- return await extendV2Template(name, templateFilesByName, newCallChain);
28
+ else if (templateFile.extendsTemplate) {
29
+ templateConfig = await extendV2Template(name, templateFilesByName, newCallChain);
29
30
  }
30
- return { ...templateFile, name };
31
+ else {
32
+ templateConfig = { ...templateFile, name };
33
+ }
34
+ if (!(0, utils_1.isV1Template)(templateConfig) && Object.keys(templateConfig.outputs || {}).length < 1) {
35
+ throw new Error(`Template '${name}' must have at least one output defined!`);
36
+ }
37
+ return templateConfig;
31
38
  }
32
39
  async function extendV1Template(name, templateFilesByName, callChain) {
33
40
  const { extends_template, description, schema, fields } = templateFilesByName[name];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@extrahorizon/exh-cli",
3
- "version": "1.12.0-dev-151-7544bdb",
3
+ "version": "1.12.0-dev-152-fc8569c",
4
4
  "main": "build/index.js",
5
5
  "exports": "./build/index.js",
6
6
  "license": "MIT",