@prismatic-io/spectral 9.2.0 → 9.3.0

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.
@@ -18,7 +18,12 @@ const lodash_1 = require("lodash");
18
18
  const convertInput = (key, _a) => {
19
19
  var { default: defaultValue, type, label, collection } = _a, rest = __rest(_a, ["default", "type", "label", "collection"]);
20
20
  const keyLabel = collection === "keyvaluelist" && typeof label === "object" ? label.key : undefined;
21
- return Object.assign(Object.assign({}, (0, lodash_1.omit)(rest, ["onPremControlled", "permissionAndVisibilityType", "visibleToOrgDeployer"])), { key,
21
+ return Object.assign(Object.assign({}, (0, lodash_1.omit)(rest, [
22
+ "onPremControlled",
23
+ "permissionAndVisibilityType",
24
+ "visibleToOrgDeployer",
25
+ "writeOnly",
26
+ ])), { key,
22
27
  type, default: defaultValue !== null && defaultValue !== void 0 ? defaultValue : types_1.InputFieldDefaultMap[type], collection, label: typeof label === "string" ? label : label.value, keyLabel, onPremiseControlled: ("onPremControlled" in rest && rest.onPremControlled) || undefined });
23
28
  };
24
29
  exports.convertInput = convertInput;
@@ -358,6 +358,9 @@ const convertConfigVar = (key, configVar, referenceKey, componentRegistry) => {
358
358
  return result;
359
359
  }
360
360
  const meta = convertInputPermissionAndVisibility((0, lodash_1.pick)(input, ["permissionAndVisibilityType", "visibleToOrgDeployer"]));
361
+ if (input.writeOnly) {
362
+ meta.writeOnly = input.writeOnly;
363
+ }
361
364
  const defaultValue = input.collection
362
365
  ? (input.default || []).map((defaultValue) => {
363
366
  if (typeof defaultValue === "string") {
@@ -66,6 +66,7 @@ export declare const InputFieldDefaultMap: Record<InputFieldType, string | undef
66
66
  export type Inputs = Record<string, InputFieldDefinition>;
67
67
  export type ConnectionInput = (StringInputField | DataInputField | TextInputField | PasswordInputField | BooleanInputField) & {
68
68
  shown?: boolean;
69
+ writeOnly?: true;
69
70
  };
70
71
  export type OnPremConnectionInput = {
71
72
  onPremControlled: true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismatic-io/spectral",
3
- "version": "9.2.0",
3
+ "version": "9.3.0",
4
4
  "description": "Utility library for building Prismatic components and code-native integrations",
5
5
  "keywords": ["prismatic"],
6
6
  "main": "dist/index.js",