@prismatic-io/spectral 8.1.2 → 8.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.
|
@@ -67,7 +67,8 @@ const contains = (container, containee) => {
|
|
|
67
67
|
if (typeof container === "object" && container !== null) {
|
|
68
68
|
if (Array.isArray(container)) {
|
|
69
69
|
// Array member check.
|
|
70
|
-
return container.includes(containee)
|
|
70
|
+
return (container.includes(containee) ||
|
|
71
|
+
container.includes((0, exports.parseValue)(containee)));
|
|
71
72
|
}
|
|
72
73
|
// Object attribute check (set membership).
|
|
73
74
|
return Object.prototype.hasOwnProperty.call(container, `${containee}`);
|
|
@@ -226,9 +227,9 @@ const evaluate = (expression) => {
|
|
|
226
227
|
case types_1.BinaryOperator.lessThanOrEqual:
|
|
227
228
|
return left <= right;
|
|
228
229
|
case types_1.BinaryOperator.in:
|
|
229
|
-
return (0, exports.contains)(right,
|
|
230
|
+
return (0, exports.contains)(right, leftTerm);
|
|
230
231
|
case types_1.BinaryOperator.notIn:
|
|
231
|
-
return !(0, exports.contains)(right,
|
|
232
|
+
return !(0, exports.contains)(right, leftTerm);
|
|
232
233
|
case types_1.BinaryOperator.exactlyMatches:
|
|
233
234
|
return left === right || lodash_1.default.isEqual(left, right);
|
|
234
235
|
case types_1.BinaryOperator.doesNotExactlyMatch:
|
|
@@ -190,6 +190,7 @@ interface ServerPerformDataStructureReturn {
|
|
|
190
190
|
data: boolean | number | string | Record<string, unknown> | unknown[] | unknown;
|
|
191
191
|
contentType?: string;
|
|
192
192
|
statusCode?: number;
|
|
193
|
+
headers?: Record<string, string>;
|
|
193
194
|
instanceState?: Record<string, unknown>;
|
|
194
195
|
crossFlowState?: Record<string, unknown>;
|
|
195
196
|
executionState?: Record<string, unknown>;
|
|
@@ -201,6 +202,7 @@ interface ServerPerformDataReturn {
|
|
|
201
202
|
data: Buffer | string | unknown;
|
|
202
203
|
contentType: string;
|
|
203
204
|
statusCode?: number;
|
|
205
|
+
headers?: Record<string, string>;
|
|
204
206
|
instanceState?: Record<string, unknown>;
|
|
205
207
|
crossFlowState?: Record<string, unknown>;
|
|
206
208
|
executionState?: Record<string, unknown>;
|
|
@@ -6,6 +6,8 @@ export interface ActionPerformDataReturn<ReturnData> {
|
|
|
6
6
|
contentType?: string;
|
|
7
7
|
/** The HTTP Status code that will be used if this terminates a synchronous invocation */
|
|
8
8
|
statusCode?: number;
|
|
9
|
+
/** The HTTP headers that will be sent back if this terminates a synchronous invocation */
|
|
10
|
+
headers?: Record<string, string>;
|
|
9
11
|
/** An optional object, the keys and values of which will be persisted in the flow-specific instanceState and available for subsequent actions and executions */
|
|
10
12
|
instanceState?: Record<string, unknown>;
|
|
11
13
|
/** An optional object, the keys and values of which will be persisted in the crossFlowState and available in any flow for subsequent actions and executions */
|