@firestartr/cli 0.1.2 → 0.1.3

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.
Files changed (2) hide show
  1. package/build/index.js +8 -2
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -263606,8 +263606,14 @@ exports["default"] = render;
263606
263606
  function buildContext(entity, args, firestartrConfig, featureArgs) {
263607
263607
  const context = {};
263608
263608
  Object.entries(args).forEach(([key, arg]) => {
263609
- if ("$default" in arg)
263610
- context[key] = arg["$default"];
263609
+ if ("$default" in arg) {
263610
+ if (Array.isArray(arg["$default"])) {
263611
+ context[key] = _.get(entity, arg["$default"]);
263612
+ }
263613
+ else {
263614
+ context[key] = arg["$default"];
263615
+ }
263616
+ }
263611
263617
  if ("$ref" in arg) {
263612
263618
  const refValue = _.get(entity, arg["$ref"]);
263613
263619
  context[key] = refValue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestartr/cli",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "private": false,
5
5
  "description": "Commandline tool",
6
6
  "main": "build/index.js",