@firestartr/cli 0.1.2 → 0.1.4
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/build/index.js +9 -3
- 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
|
-
|
|
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;
|
|
@@ -267569,7 +267575,7 @@ module.exports = JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45,46],"valid"]
|
|
|
267569
267575
|
/***/ ((module) => {
|
|
267570
267576
|
|
|
267571
267577
|
"use strict";
|
|
267572
|
-
module.exports = JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$ref":"#/definitions/root","definitions":{"root":{"type":"object","additionalProperties":false,"properties":{"feature_name":{"type":"string"},"args":{"$ref":"#/definitions/Args"},"files":{"type":"array","items":{"$ref":"#/definitions/File"}},"patches":{"type":"object","patternProperties":{"^.+$":{"type":"array","items":{"$ref":"#/definitions/Patch"}}}}},"required":["args","feature_name","files","patches"],"title":"root"},"Args":{"type":"object","additionalProperties":true,"patternProperties":{"^.+$":{"$ref":"#/definitions/Arg"}},"title":"Args"},"Arg":{"type":"object","additionalProperties":false,"properties":{"$lit":{"type":"string"},"$ref":{"type":"array","items":{"type":"string"}},"$arg":{"type":"string"},"$default":{"type":"string"}}},"File":{"type":"object","additionalProperties":true,"properties":{"src":{"type":"string"},"dest":{"type":"string"},"upgradable":{"type":"boolean"}},"required":["dest","src"],"title":"File"},"Patch":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"op":{"type":"string"},"path":{"type":"string"},"value":{"type":"string"}},"required":["name","op","path"],"title":"Patch"}}}');
|
|
267578
|
+
module.exports = JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$ref":"#/definitions/root","definitions":{"root":{"type":"object","additionalProperties":false,"properties":{"feature_name":{"type":"string"},"args":{"$ref":"#/definitions/Args"},"files":{"type":"array","items":{"$ref":"#/definitions/File"}},"patches":{"type":"object","patternProperties":{"^.+$":{"type":"array","items":{"$ref":"#/definitions/Patch"}}}}},"required":["args","feature_name","files","patches"],"title":"root"},"Args":{"type":"object","additionalProperties":true,"patternProperties":{"^.+$":{"$ref":"#/definitions/Arg"}},"title":"Args"},"Arg":{"type":"object","additionalProperties":false,"properties":{"$lit":{"type":"string"},"$ref":{"type":"array","items":{"type":"string"}},"$arg":{"type":"string"},"$default":{"type":["string","array"]}}},"File":{"type":"object","additionalProperties":true,"properties":{"src":{"type":"string"},"dest":{"type":"string"},"upgradable":{"type":"boolean"}},"required":["dest","src"],"title":"File"},"Patch":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"op":{"type":"string"},"path":{"type":"string"},"value":{"type":"string"}},"required":["name","op","path"],"title":"Patch"}}}');
|
|
267573
267579
|
|
|
267574
267580
|
/***/ }),
|
|
267575
267581
|
|