@prismatic-io/spectral 10.5.3 → 10.5.5

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.
@@ -392,7 +392,8 @@ const convertConfigVar = (key, configVar, referenceKey, componentRegistry) => {
392
392
  component: codeNativeIntegrationComponentReference(referenceKey),
393
393
  },
394
394
  inputs: Object.entries(configVar.inputs).reduce((result, [key, input]) => {
395
- if (input.shown === false) {
395
+ // Connection template inputs are never shown in the resulting YAML.
396
+ if (input.shown === false || "templateValue" in input) {
396
397
  return result;
397
398
  }
398
399
  const meta = convertInputPermissionAndVisibility((0, pick_1.default)(input, ["permissionAndVisibilityType", "visibleToOrgDeployer"]));
@@ -471,7 +472,8 @@ const convertConfigVar = (key, configVar, referenceKey, componentRegistry) => {
471
472
  }
472
473
  if ((0, types_1.isDataSourceReferenceConfigVar)(configVar)) {
473
474
  const { ref, inputs } = convertComponentReference(configVar.dataSource, componentRegistry, "dataSources");
474
- result.dataType = componentRegistry[ref.component.key].dataSources[ref.key].dataSourceType;
475
+ result.dataType =
476
+ componentRegistry[configVar.dataSource.component].dataSources[ref.key].dataSourceType;
475
477
  result.dataSource = ref;
476
478
  result.inputs = inputs;
477
479
  if (configVar.validationMode) {
@@ -666,7 +668,12 @@ const codeNativeIntegrationComponent = ({ name, iconPath, description, flows = [
666
668
  if (!(0, types_1.isConnectionDefinitionConfigVar)(configVar)) {
667
669
  return result;
668
670
  }
669
- const convertedInputs = Object.entries(configVar.inputs).map(([key, value]) => (0, convertComponent_1.convertInput)(key, value));
671
+ const convertedInputs = Object.entries(configVar.inputs).map(([key, value]) => {
672
+ if ("templateValue" in value) {
673
+ return (0, convertComponent_1.convertTemplateInput)(key, value, configVar.inputs);
674
+ }
675
+ return (0, convertComponent_1.convertInput)(key, value);
676
+ });
670
677
  const connection = (0, pick_1.default)(configVar, ["oauth2Type", "oauth2PkceMethod"]);
671
678
  const { avatarPath: avatarIconPath, oauth2ConnectionIconPath: iconPath } = (_a = configVar.icons) !== null && _a !== void 0 ? _a : {};
672
679
  return [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismatic-io/spectral",
3
- "version": "10.5.3",
3
+ "version": "10.5.5",
4
4
  "description": "Utility library for building Prismatic connectors and code-native integrations",
5
5
  "keywords": ["prismatic"],
6
6
  "main": "dist/index.js",