@prismatic-io/spectral 7.6.6 → 7.6.8

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.
@@ -134,8 +134,8 @@ export interface CodeInputField extends BaseInputField {
134
134
  collection?: InputFieldCollection;
135
135
  /** Default value for this field. */
136
136
  default?: unknown;
137
- /** Code language of this field. */
138
- language?: string;
137
+ /** Code language for syntax highlighting. For no syntax highlighting, choose "plaintext" */
138
+ language: "css" | "graphql" | "handlebars" | "hcl" | "html" | "javascript" | "json" | "liquid" | "markdown" | "mysql" | "pgsql" | "plaintext" | "sql" | "typescript" | "xml" | "yaml";
139
139
  /** Dictates possible choices for the input. */
140
140
  model?: InputFieldChoice[];
141
141
  /** Clean function */
package/dist/util.js CHANGED
@@ -318,14 +318,12 @@ const keyValPairListToObject = (kvpList, valueConverter) => {
318
318
  };
319
319
  /**
320
320
  * This function tests if the object provided is a Prismatic `DataPayload` object.
321
- * A `DataPayload` object is an object with a `data` attribute, and optional `contentType` attribute.
321
+ * A `DataPayload` object is an object with a `data` attribute that is a Buffer, and optional `contentType` attribute.
322
322
  *
323
323
  * @param value The value to test
324
324
  * @returns This function returns true if `value` is a DataPayload object, and false otherwise.
325
325
  */
326
- const isBufferDataPayload = (value) => {
327
- return value instanceof Object && "data" in value;
328
- };
326
+ const isBufferDataPayload = (value) => value instanceof Object && "data" in value && Buffer.isBuffer(value["data"]);
329
327
  /**
330
328
  * Many libraries for third-party API that handle binary files expect `Buffer` objects.
331
329
  * This function helps to convert strings, Uint8Arrays, and Arrays to a data structure
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismatic-io/spectral",
3
- "version": "7.6.6",
3
+ "version": "7.6.8",
4
4
  "description": "Utility library for building Prismatic components",
5
5
  "keywords": [
6
6
  "prismatic"