@prismatic-io/spectral 8.0.4 → 8.0.6

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/dist/index.js CHANGED
@@ -33,7 +33,14 @@ const convertIntegration_1 = require("./serverTypes/convertIntegration");
33
33
  * @param definition An IntegrationDefinition type object.
34
34
  * @returns This function returns an integration object that has the shape the Prismatic API expects.
35
35
  */
36
- const integration = (definition) => (0, convertIntegration_1.convertIntegration)(definition);
36
+ const integration = (definition) => {
37
+ var _a;
38
+ const integrationDefinition = (0, convertIntegration_1.convertIntegration)(definition);
39
+ if (((_a = process.env) === null || _a === void 0 ? void 0 : _a.DEBUG) === "true") {
40
+ console.info(integrationDefinition.codeNativeIntegrationYAML);
41
+ }
42
+ return integrationDefinition;
43
+ };
37
44
  exports.integration = integration;
38
45
  /**
39
46
  * For information on writing Code Native Integrations, see
@@ -132,10 +132,15 @@ const convertConfigVar = (key, configVar, referenceKey) => {
132
132
  component: { key: referenceKey, version: "LATEST", isPublic: false },
133
133
  key: (0, lodash_1.camelCase)(key),
134
134
  }, inputs: Object.entries(configVar.inputs).reduce((result, [key, input]) => {
135
- if (!input.shown || !input.default) {
135
+ if (input.shown === false) {
136
136
  return result;
137
137
  }
138
- return Object.assign(Object.assign({}, result), { [key]: { type: "value", value: input.default } });
138
+ const value = input.default
139
+ ? input.default
140
+ : input.collection
141
+ ? []
142
+ : "";
143
+ return Object.assign(Object.assign({}, result), { [key]: { type: "value", value } });
139
144
  }, {}), meta });
140
145
  }
141
146
  const result = (0, lodash_1.assign)({ meta, key }, (0, lodash_1.pick)(configVar, [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismatic-io/spectral",
3
- "version": "8.0.4",
3
+ "version": "8.0.6",
4
4
  "description": "Utility library for building Prismatic components",
5
5
  "keywords": [
6
6
  "prismatic"