@loadmill/core 0.3.88 → 0.3.91

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.
Files changed (169) hide show
  1. package/package.json +2 -2
  2. package/dist/conf/defaults.d.ts +0 -1
  3. package/dist/conf/defaults.js +0 -11
  4. package/dist/conf/defaults.js.map +0 -1
  5. package/dist/conf/extrema.d.ts +0 -7
  6. package/dist/conf/extrema.js +0 -12
  7. package/dist/conf/extrema.js.map +0 -1
  8. package/dist/conf/index.d.ts +0 -15
  9. package/dist/conf/index.js +0 -80
  10. package/dist/conf/index.js.map +0 -1
  11. package/dist/conf/notifications.d.ts +0 -2
  12. package/dist/conf/notifications.js +0 -19
  13. package/dist/conf/notifications.js.map +0 -1
  14. package/dist/conf/types.d.ts +0 -105
  15. package/dist/conf/types.js +0 -38
  16. package/dist/conf/types.js.map +0 -1
  17. package/dist/conf/validate.d.ts +0 -68
  18. package/dist/conf/validate.js +0 -482
  19. package/dist/conf/validate.js.map +0 -1
  20. package/dist/distributed-logger-reporter.d.ts +0 -3
  21. package/dist/distributed-logger-reporter.js +0 -74
  22. package/dist/distributed-logger-reporter.js.map +0 -1
  23. package/dist/echo/firehose.d.ts +0 -7
  24. package/dist/echo/firehose.js +0 -130
  25. package/dist/echo/firehose.js.map +0 -1
  26. package/dist/echo/index.d.ts +0 -3
  27. package/dist/echo/index.js +0 -8
  28. package/dist/echo/index.js.map +0 -1
  29. package/dist/echo/stats.d.ts +0 -8
  30. package/dist/echo/stats.js +0 -152
  31. package/dist/echo/stats.js.map +0 -1
  32. package/dist/har/index.d.ts +0 -68
  33. package/dist/har/index.js +0 -14
  34. package/dist/har/index.js.map +0 -1
  35. package/dist/labels/constants.d.ts +0 -1
  36. package/dist/labels/constants.js +0 -5
  37. package/dist/labels/constants.js.map +0 -1
  38. package/dist/multipart-form-data/files.d.ts +0 -2
  39. package/dist/multipart-form-data/files.js +0 -63
  40. package/dist/multipart-form-data/files.js.map +0 -1
  41. package/dist/multipart-form-data/form-data-utils.d.ts +0 -19
  42. package/dist/multipart-form-data/form-data-utils.js +0 -117
  43. package/dist/multipart-form-data/form-data-utils.js.map +0 -1
  44. package/dist/multipart-form-data/is-binary-file.d.ts +0 -2
  45. package/dist/multipart-form-data/is-binary-file.js +0 -215
  46. package/dist/multipart-form-data/is-binary-file.js.map +0 -1
  47. package/dist/multipart-form-data/multipart-text-to-post-form-data.d.ts +0 -2
  48. package/dist/multipart-form-data/multipart-text-to-post-form-data.js +0 -86
  49. package/dist/multipart-form-data/multipart-text-to-post-form-data.js.map +0 -1
  50. package/dist/parameters/extractions.d.ts +0 -26
  51. package/dist/parameters/extractions.js +0 -49
  52. package/dist/parameters/extractions.js.map +0 -1
  53. package/dist/parameters/extractors/cheerio-extractor.d.ts +0 -11
  54. package/dist/parameters/extractors/cheerio-extractor.js +0 -84
  55. package/dist/parameters/extractors/cheerio-extractor.js.map +0 -1
  56. package/dist/parameters/extractors/expression-extractor.d.ts +0 -6
  57. package/dist/parameters/extractors/expression-extractor.js +0 -38
  58. package/dist/parameters/extractors/expression-extractor.js.map +0 -1
  59. package/dist/parameters/extractors/extractor.d.ts +0 -3
  60. package/dist/parameters/extractors/extractor.js +0 -3
  61. package/dist/parameters/extractors/extractor.js.map +0 -1
  62. package/dist/parameters/extractors/header-extractor.d.ts +0 -7
  63. package/dist/parameters/extractors/header-extractor.js +0 -51
  64. package/dist/parameters/extractors/header-extractor.js.map +0 -1
  65. package/dist/parameters/extractors/index.d.ts +0 -10
  66. package/dist/parameters/extractors/index.js +0 -20
  67. package/dist/parameters/extractors/index.js.map +0 -1
  68. package/dist/parameters/extractors/json-path-extractor.d.ts +0 -10
  69. package/dist/parameters/extractors/json-path-extractor.js +0 -103
  70. package/dist/parameters/extractors/json-path-extractor.js.map +0 -1
  71. package/dist/parameters/extractors/parametrized-extractor.d.ts +0 -10
  72. package/dist/parameters/extractors/parametrized-extractor.js +0 -34
  73. package/dist/parameters/extractors/parametrized-extractor.js.map +0 -1
  74. package/dist/parameters/extractors/regex-extractor.d.ts +0 -7
  75. package/dist/parameters/extractors/regex-extractor.js +0 -46
  76. package/dist/parameters/extractors/regex-extractor.js.map +0 -1
  77. package/dist/parameters/extractors/regex-matcher.d.ts +0 -1
  78. package/dist/parameters/extractors/regex-matcher.js +0 -21
  79. package/dist/parameters/extractors/regex-matcher.js.map +0 -1
  80. package/dist/parameters/extractors/ws-extractor.d.ts +0 -33
  81. package/dist/parameters/extractors/ws-extractor.js +0 -215
  82. package/dist/parameters/extractors/ws-extractor.js.map +0 -1
  83. package/dist/parameters/extractors/x-path-extractor.d.ts +0 -7
  84. package/dist/parameters/extractors/x-path-extractor.js +0 -50
  85. package/dist/parameters/extractors/x-path-extractor.js.map +0 -1
  86. package/dist/parameters/generate-random.d.ts +0 -13
  87. package/dist/parameters/generate-random.js +0 -108
  88. package/dist/parameters/generate-random.js.map +0 -1
  89. package/dist/parameters/html-utils.d.ts +0 -1
  90. package/dist/parameters/html-utils.js +0 -18
  91. package/dist/parameters/html-utils.js.map +0 -1
  92. package/dist/parameters/index.d.ts +0 -85
  93. package/dist/parameters/index.js +0 -594
  94. package/dist/parameters/index.js.map +0 -1
  95. package/dist/parameters/json-path-utils.d.ts +0 -1
  96. package/dist/parameters/json-path-utils.js +0 -16
  97. package/dist/parameters/json-path-utils.js.map +0 -1
  98. package/dist/parameters/operators/binary-operator.d.ts +0 -13
  99. package/dist/parameters/operators/binary-operator.js +0 -39
  100. package/dist/parameters/operators/binary-operator.js.map +0 -1
  101. package/dist/parameters/operators/index.d.ts +0 -5
  102. package/dist/parameters/operators/index.js +0 -21
  103. package/dist/parameters/operators/index.js.map +0 -1
  104. package/dist/parameters/parameter-functions/boolean-parameter-functions.d.ts +0 -12
  105. package/dist/parameters/parameter-functions/boolean-parameter-functions.js +0 -47
  106. package/dist/parameters/parameter-functions/boolean-parameter-functions.js.map +0 -1
  107. package/dist/parameters/parameter-functions/crypto.d.ts +0 -11
  108. package/dist/parameters/parameter-functions/crypto.js +0 -71
  109. package/dist/parameters/parameter-functions/crypto.js.map +0 -1
  110. package/dist/parameters/parameter-functions/json-schema.d.ts +0 -1
  111. package/dist/parameters/parameter-functions/json-schema.js +0 -33
  112. package/dist/parameters/parameter-functions/json-schema.js.map +0 -1
  113. package/dist/parameters/parameter-functions/numeric-input-parameter-functions.d.ts +0 -11
  114. package/dist/parameters/parameter-functions/numeric-input-parameter-functions.js +0 -34
  115. package/dist/parameters/parameter-functions/numeric-input-parameter-functions.js.map +0 -1
  116. package/dist/parameters/parameter-functions/numeric-parameter-functions.d.ts +0 -15
  117. package/dist/parameters/parameter-functions/numeric-parameter-functions.js +0 -56
  118. package/dist/parameters/parameter-functions/numeric-parameter-functions.js.map +0 -1
  119. package/dist/parameters/parameter-functions/parameter-function-utils.d.ts +0 -5
  120. package/dist/parameters/parameter-functions/parameter-function-utils.js +0 -82
  121. package/dist/parameters/parameter-functions/parameter-function-utils.js.map +0 -1
  122. package/dist/parameters/parameter-functions/parameter-function.d.ts +0 -6
  123. package/dist/parameters/parameter-functions/parameter-function.js +0 -28
  124. package/dist/parameters/parameter-functions/parameter-function.js.map +0 -1
  125. package/dist/parameters/parameter-functions/parameter-functions.d.ts +0 -7
  126. package/dist/parameters/parameter-functions/parameter-functions.js +0 -53
  127. package/dist/parameters/parameter-functions/parameter-functions.js.map +0 -1
  128. package/dist/parameters/parameter-functions/random-parameter-functions.d.ts +0 -1
  129. package/dist/parameters/parameter-functions/random-parameter-functions.js +0 -33
  130. package/dist/parameters/parameter-functions/random-parameter-functions.js.map +0 -1
  131. package/dist/parameters/parameter-functions/textual-parameter-functions.d.ts +0 -63
  132. package/dist/parameters/parameter-functions/textual-parameter-functions.js +0 -346
  133. package/dist/parameters/parameter-functions/textual-parameter-functions.js.map +0 -1
  134. package/dist/parameters/parameter-name-utils.d.ts +0 -3
  135. package/dist/parameters/parameter-name-utils.js +0 -71
  136. package/dist/parameters/parameter-name-utils.js.map +0 -1
  137. package/dist/parameters/parameter-regex-providers.d.ts +0 -24
  138. package/dist/parameters/parameter-regex-providers.js +0 -70
  139. package/dist/parameters/parameter-regex-providers.js.map +0 -1
  140. package/dist/parameters/resolvers/random-parameters-resolver.d.ts +0 -1
  141. package/dist/parameters/resolvers/random-parameters-resolver.js +0 -12
  142. package/dist/parameters/resolvers/random-parameters-resolver.js.map +0 -1
  143. package/dist/parameters/type.d.ts +0 -10
  144. package/dist/parameters/type.js +0 -9
  145. package/dist/parameters/type.js.map +0 -1
  146. package/dist/parameters/value-utils.d.ts +0 -5
  147. package/dist/parameters/value-utils.js +0 -44
  148. package/dist/parameters/value-utils.js.map +0 -1
  149. package/dist/request/index.d.ts +0 -255
  150. package/dist/request/index.js +0 -524
  151. package/dist/request/index.js.map +0 -1
  152. package/dist/schema/json-schema-generator.d.ts +0 -20
  153. package/dist/schema/json-schema-generator.js +0 -135
  154. package/dist/schema/json-schema-generator.js.map +0 -1
  155. package/dist/signals.d.ts +0 -4
  156. package/dist/signals.js +0 -9
  157. package/dist/signals.js.map +0 -1
  158. package/dist/subset/index.d.ts +0 -3
  159. package/dist/subset/index.js +0 -8
  160. package/dist/subset/index.js.map +0 -1
  161. package/dist/subset/is-subset.d.ts +0 -2
  162. package/dist/subset/is-subset.js +0 -29
  163. package/dist/subset/is-subset.js.map +0 -1
  164. package/dist/subset/json-contains.d.ts +0 -1
  165. package/dist/subset/json-contains.js +0 -24
  166. package/dist/subset/json-contains.js.map +0 -1
  167. package/dist/team-options/constants.d.ts +0 -3
  168. package/dist/team-options/constants.js +0 -7
  169. package/dist/team-options/constants.js.map +0 -1
@@ -1,524 +0,0 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
- if (k2 === undefined) k2 = k;
19
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
20
- }) : (function(o, m, k, k2) {
21
- if (k2 === undefined) k2 = k;
22
- o[k2] = m[k];
23
- }));
24
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
- Object.defineProperty(o, "default", { enumerable: true, value: v });
26
- }) : function(o, v) {
27
- o["default"] = v;
28
- });
29
- var __importStar = (this && this.__importStar) || function (mod) {
30
- if (mod && mod.__esModule) return mod;
31
- var result = {};
32
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
- __setModuleDefault(result, mod);
34
- return result;
35
- };
36
- Object.defineProperty(exports, "__esModule", { value: true });
37
- exports.WsMessageType = exports.ConfMimeTypes = exports.getResponseText = exports.isHTTPRequest = exports.isWSRequest = exports.EXCLUDES = exports.CachePenetrationModes = exports.BodyTypes = exports.isReservedHeader = exports.findRequestIndex = exports.toHeaders = exports.createRequest = exports.resolveUrl = exports.LoadmillOrFinfRequest = exports.LoadmillRequest = exports.RequestType = exports.ALLOWED_RESPONSE_STATUSES = exports.supportedMethods = exports.DEFAULT_REQUEST_TIMEOUT = void 0;
38
- var flatMap = require("lodash/flatMap");
39
- var uriUtils = __importStar(require("@loadmill/universal/dist/uri-utils"));
40
- var parameters_1 = require("../parameters");
41
- exports.DEFAULT_REQUEST_TIMEOUT = 25000;
42
- exports.supportedMethods = {
43
- GET: 'GET',
44
- POST: 'POST',
45
- PUT: 'PUT',
46
- DELETE: 'DELETE',
47
- PATCH: 'PATCH',
48
- };
49
- exports.ALLOWED_RESPONSE_STATUSES = { SUCCESS: 'SUCCESS', ERROR: 'ERROR', ANY: 'ANY' };
50
- /**
51
- * This class represents an HTTP request to be performed in the course of a load test.
52
- *
53
- * @property url The URL of the request (parameterizable).
54
- * @property method The HTTP method.
55
- * @property headers An array of headers to add to the request (values parameterizable).
56
- * @property postData The content of the request (text parameterizable).
57
- * @property delay The delay between this request and the previous one in milliseconds. This property is ignored for the first request.
58
- * @property timeout The time to wait for the request to finish in milliseconds.
59
- * @property extract A dictionary of parameter extractions.
60
- * @property assert An array or dictionary of assertions.
61
- * @property expectedStatus The expected status of the http response SUCCESS for 2XX-3XX, ERROR for 4XX-5XX.
62
- */
63
- var RequestType;
64
- (function (RequestType) {
65
- RequestType["LOGIN"] = "login";
66
- RequestType["BEFORE_EACH"] = "beforeEach";
67
- RequestType["FLOW"] = "flow";
68
- RequestType["AFTER_EACH"] = "afterEach";
69
- RequestType["FINF"] = "flowInFlow";
70
- RequestType["BEFORE_ALL"] = "beforeAll";
71
- RequestType["AFTER_ALL"] = "afterAll";
72
- })(RequestType = exports.RequestType || (exports.RequestType = {}));
73
- var LoadmillRequest = /** @class */ (function () {
74
- function LoadmillRequest(url) {
75
- Object.defineProperty(this, "url", {
76
- enumerable: true,
77
- configurable: true,
78
- writable: true,
79
- value: url
80
- });
81
- Object.defineProperty(this, "id", {
82
- enumerable: true,
83
- configurable: true,
84
- writable: true,
85
- value: void 0
86
- });
87
- Object.defineProperty(this, "auth", {
88
- enumerable: true,
89
- configurable: true,
90
- writable: true,
91
- value: void 0
92
- });
93
- Object.defineProperty(this, "stopBefore", {
94
- enumerable: true,
95
- configurable: true,
96
- writable: true,
97
- value: void 0
98
- });
99
- Object.defineProperty(this, "skipBefore", {
100
- enumerable: true,
101
- configurable: true,
102
- writable: true,
103
- value: void 0
104
- });
105
- Object.defineProperty(this, "loop", {
106
- enumerable: true,
107
- configurable: true,
108
- writable: true,
109
- value: void 0
110
- });
111
- Object.defineProperty(this, "useCookies", {
112
- enumerable: true,
113
- configurable: true,
114
- writable: true,
115
- value: void 0
116
- });
117
- Object.defineProperty(this, "description", {
118
- enumerable: true,
119
- configurable: true,
120
- writable: true,
121
- value: void 0
122
- });
123
- Object.defineProperty(this, "delay", {
124
- enumerable: true,
125
- configurable: true,
126
- writable: true,
127
- value: void 0
128
- });
129
- Object.defineProperty(this, "postData", {
130
- enumerable: true,
131
- configurable: true,
132
- writable: true,
133
- value: void 0
134
- });
135
- Object.defineProperty(this, "postFormData", {
136
- enumerable: true,
137
- configurable: true,
138
- writable: true,
139
- value: void 0
140
- });
141
- Object.defineProperty(this, "graphqlPostData", {
142
- enumerable: true,
143
- configurable: true,
144
- writable: true,
145
- value: void 0
146
- });
147
- Object.defineProperty(this, "file", {
148
- enumerable: true,
149
- configurable: true,
150
- writable: true,
151
- value: void 0
152
- });
153
- Object.defineProperty(this, "cachePenetration", {
154
- enumerable: true,
155
- configurable: true,
156
- writable: true,
157
- value: void 0
158
- });
159
- Object.defineProperty(this, "method", {
160
- enumerable: true,
161
- configurable: true,
162
- writable: true,
163
- value: 'GET'
164
- });
165
- Object.defineProperty(this, "headers", {
166
- enumerable: true,
167
- configurable: true,
168
- writable: true,
169
- value: void 0
170
- });
171
- Object.defineProperty(this, "assert", {
172
- enumerable: true,
173
- configurable: true,
174
- writable: true,
175
- value: void 0
176
- });
177
- Object.defineProperty(this, "extract", {
178
- enumerable: true,
179
- configurable: true,
180
- writable: true,
181
- value: void 0
182
- });
183
- Object.defineProperty(this, "postScript", {
184
- enumerable: true,
185
- configurable: true,
186
- writable: true,
187
- value: void 0
188
- });
189
- Object.defineProperty(this, "disabled", {
190
- enumerable: true,
191
- configurable: true,
192
- writable: true,
193
- value: void 0
194
- });
195
- Object.defineProperty(this, "timeout", {
196
- enumerable: true,
197
- configurable: true,
198
- writable: true,
199
- value: void 0
200
- });
201
- Object.defineProperty(this, "expectedStatus", {
202
- enumerable: true,
203
- configurable: true,
204
- writable: true,
205
- value: void 0
206
- });
207
- Object.defineProperty(this, "noRedirects", {
208
- enumerable: true,
209
- configurable: true,
210
- writable: true,
211
- value: void 0
212
- });
213
- Object.defineProperty(this, "meta", {
214
- enumerable: true,
215
- configurable: true,
216
- writable: true,
217
- value: void 0
218
- });
219
- }
220
- return LoadmillRequest;
221
- }());
222
- exports.LoadmillRequest = LoadmillRequest;
223
- var LoadmillOrFinfRequest = /** @class */ (function (_super) {
224
- __extends(LoadmillOrFinfRequest, _super);
225
- function LoadmillOrFinfRequest() {
226
- var _this = _super !== null && _super.apply(this, arguments) || this;
227
- Object.defineProperty(_this, "isFinfRequest", {
228
- enumerable: true,
229
- configurable: true,
230
- writable: true,
231
- value: void 0
232
- });
233
- return _this;
234
- }
235
- return LoadmillOrFinfRequest;
236
- }(LoadmillRequest));
237
- exports.LoadmillOrFinfRequest = LoadmillOrFinfRequest;
238
- function resolveUrl(url, parameters, onError) {
239
- return uriUtils.withProtocol(parameters_1.parameterUtils.resolveExpression(url, parameters, onError));
240
- }
241
- exports.resolveUrl = resolveUrl;
242
- /**
243
- * This function should be able to take any object/json and either make a VALID LoadmillRequest out of it
244
- * or fail with a meaningful error message.
245
- */
246
- function createRequest(from) {
247
- var id = from.id, url = from.url, delay = from.delay, assert = from.assert, method = from.method, timeout = from.timeout, extract = from.extract, headers = from.headers, postData = from.postData, postFormData = from.postFormData, graphqlPostData = from.graphqlPostData, file = from.file, stopBefore = from.stopBefore, skipBefore = from.skipBefore, loop = from.loop, description = from.description, expectedStatus = from.expectedStatus, postScript = from.postScript, disabled = from.disabled, noRedirects = from.noRedirects, meta = from.meta;
248
- var request = new LoadmillRequest(url);
249
- if (id) {
250
- request.id = id;
251
- }
252
- if (method) {
253
- request.method = method;
254
- }
255
- if (description) {
256
- request.description = description;
257
- }
258
- if (headers) {
259
- request.headers = toHeaders(headers);
260
- }
261
- if (postData) {
262
- request.postData = {
263
- text: postData.text,
264
- mimeType: postData.mimeType,
265
- params: postData.params
266
- };
267
- }
268
- if (postFormData) {
269
- request.postFormData = postFormData;
270
- }
271
- if (graphqlPostData) {
272
- request.graphqlPostData = graphqlPostData;
273
- }
274
- if (file) {
275
- request.file = file;
276
- }
277
- if (delay !== null && delay !== undefined) {
278
- request.delay = delay;
279
- }
280
- if (stopBefore !== undefined) {
281
- request.stopBefore = stopBefore;
282
- }
283
- if (skipBefore != null) {
284
- var goTo = skipBefore.goTo, negate = skipBefore.negate, condition = skipBefore.condition;
285
- request.skipBefore = {
286
- goTo: goTo,
287
- condition: condition,
288
- negate: !!negate,
289
- };
290
- }
291
- if (loop != null) {
292
- var iterations = loop.iterations, assert_1 = loop.assert, wait = loop.wait;
293
- var converted = toAssertions([assert_1])[0];
294
- request.loop = {
295
- assert: converted,
296
- iterations: iterations,
297
- wait: wait,
298
- };
299
- }
300
- if (timeout != null) {
301
- request.timeout = timeout;
302
- }
303
- if (extract) {
304
- request.extract = toExtractions(extract);
305
- }
306
- if (assert) {
307
- request.assert = toAssertions(assert);
308
- }
309
- if (expectedStatus) {
310
- request.expectedStatus = expectedStatus;
311
- }
312
- if (postScript !== undefined) {
313
- request.postScript = postScript;
314
- }
315
- if (disabled !== undefined) {
316
- request.disabled = disabled;
317
- }
318
- if (noRedirects !== undefined) {
319
- request.noRedirects = noRedirects;
320
- }
321
- if (meta) {
322
- request.meta = meta;
323
- }
324
- return request;
325
- }
326
- exports.createRequest = createRequest;
327
- function toHeaders(headers) {
328
- return flatMap(headers, function (value, key) {
329
- var res = [];
330
- if (typeof key === 'string') {
331
- pushHeader(value, key, res);
332
- }
333
- else {
334
- Object.keys(value).map(function (innerKey) {
335
- var innerValue = value[innerKey];
336
- pushHeader(innerValue, innerKey, res);
337
- });
338
- }
339
- return res;
340
- });
341
- }
342
- exports.toHeaders = toHeaders;
343
- function toExtractions(extractions) {
344
- if (!Array.isArray(extractions)) {
345
- extractions = [extractions];
346
- }
347
- return extractions.map(toSingleExtractions);
348
- }
349
- function toSingleExtractions(extractions) {
350
- var result = {};
351
- // Arrgh: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/12449
352
- Object.keys(extractions).forEach(function (name) {
353
- var extraction = extractions[name];
354
- var newExtraction = extractions[name];
355
- if (typeof extraction !== 'string') {
356
- newExtraction = {};
357
- var header = extraction.header, jQuery = extraction.jQuery, xPath = extraction.xPath, jsonPath = extraction.jsonPath, edn = extraction.edn, regex = extraction.regex, ws = extraction.ws;
358
- if (header != null) {
359
- newExtraction.header = header;
360
- }
361
- if (jQuery != null) {
362
- newExtraction.jQuery =
363
- typeof jQuery === 'string'
364
- ? jQuery
365
- : { query: jQuery.query, attr: jQuery.attr };
366
- }
367
- if (xPath != null) {
368
- newExtraction.xPath = xPath;
369
- }
370
- if (jsonPath != null) {
371
- newExtraction.jsonPath = jsonPath;
372
- }
373
- if (edn != null) {
374
- newExtraction.edn = edn;
375
- }
376
- if (regex != null) {
377
- newExtraction.regex = regex;
378
- }
379
- if (ws != null) {
380
- newExtraction.ws = ws;
381
- }
382
- }
383
- result[name] = newExtraction;
384
- });
385
- return result;
386
- }
387
- function toAssertions(assertions) {
388
- var result = [];
389
- assertions.forEach(function (assertion, key) {
390
- var check = assertion.check, equals = assertion.equals, notEquals = assertion.notEquals, contains = assertion.contains, notContains = assertion.notContains, matches = assertion.matches, falsy = assertion.falsy, greater = assertion.greater, lesser = assertion.lesser, JSONSchema = assertion.JSONSchema, JSONContains = assertion.JSONContains;
391
- var converted = {
392
- check: check,
393
- };
394
- if (equals != null) {
395
- converted.equals = equals;
396
- }
397
- if (notEquals != null) {
398
- converted.notEquals = notEquals;
399
- }
400
- if (contains != null) {
401
- converted.contains = contains;
402
- }
403
- if (notContains != null) {
404
- converted.notContains = notContains;
405
- }
406
- if (matches != null) {
407
- converted.matches = matches;
408
- }
409
- if (greater != null) {
410
- converted.greater = greater;
411
- }
412
- if (lesser != null) {
413
- converted.lesser = lesser;
414
- }
415
- if (falsy != null && (falsy === 'true' || falsy === true)) {
416
- converted.falsy = true;
417
- }
418
- if (JSONSchema != null) {
419
- converted.JSONSchema = JSONSchema;
420
- }
421
- if (JSONContains != null) {
422
- converted.JSONContains = JSONContains;
423
- }
424
- result[key] = converted;
425
- });
426
- return result;
427
- }
428
- function findRequestIndex(requests, desc) {
429
- return requests.findIndex(function (_a) {
430
- var description = _a.description;
431
- return description === desc;
432
- });
433
- }
434
- exports.findRequestIndex = findRequestIndex;
435
- function isReservedHeader(lowerName) {
436
- return (lowerName.startsWith('proxy-') ||
437
- (lowerName.startsWith('sec-') && !lowerName.startsWith('sec-websocket')) ||
438
- lowerName === 'accept-charset' ||
439
- lowerName === 'access-control-request-headers' ||
440
- lowerName === 'access-control-request-method' ||
441
- lowerName === 'connection' ||
442
- lowerName === 'content-length' ||
443
- lowerName === 'cookie2' ||
444
- lowerName === 'date' ||
445
- lowerName === 'dnt' ||
446
- lowerName === 'expect' ||
447
- lowerName === 'keep-alive' ||
448
- lowerName === 'te' ||
449
- lowerName === 'trailer' ||
450
- lowerName === 'transfer-encoding' ||
451
- lowerName === 'upgrade');
452
- }
453
- exports.isReservedHeader = isReservedHeader;
454
- function pushHeader(value, name, to) {
455
- to.push(singleton(value, name));
456
- }
457
- function singleton(value, name) {
458
- var _a;
459
- return _a = {}, _a[name] = value, _a;
460
- }
461
- var BodyTypes;
462
- (function (BodyTypes) {
463
- BodyTypes["POST_DATA"] = "postData";
464
- BodyTypes["URLENCODED"] = "urlencoded";
465
- BodyTypes["FORM_DATA"] = "postFormData";
466
- BodyTypes["RAW_FILE"] = "rawFile";
467
- BodyTypes["GRAPHQL"] = "GraphQL";
468
- })(BodyTypes = exports.BodyTypes || (exports.BodyTypes = {}));
469
- var CachePenetrationModes;
470
- (function (CachePenetrationModes) {
471
- CachePenetrationModes["none"] = "none";
472
- CachePenetrationModes["def"] = "default";
473
- CachePenetrationModes["alwaysQuery"] = "always-query";
474
- CachePenetrationModes["alwaysHeader"] = "always-header";
475
- })(CachePenetrationModes = exports.CachePenetrationModes || (exports.CachePenetrationModes = {}));
476
- // list of fields in our object we must not change
477
- exports.EXCLUDES = [
478
- 'url',
479
- 'method',
480
- 'headers',
481
- 'timeout',
482
- 'postData',
483
- 'text',
484
- 'mimeType',
485
- 'extract',
486
- 'jsonPath',
487
- 'jQuery',
488
- 'regex',
489
- 'header',
490
- 'assert',
491
- 'check',
492
- 'equals',
493
- 'contains',
494
- 'matches',
495
- 'falsy',
496
- 'greater',
497
- 'lesser',
498
- ];
499
- var isWSRequest = function (url) { return url.startsWith('ws://') || url.startsWith('wss://'); };
500
- exports.isWSRequest = isWSRequest;
501
- var isHTTPRequest = function (url) { return url.startsWith('http://') || url.startsWith('https://'); };
502
- exports.isHTTPRequest = isHTTPRequest;
503
- var getResponseText = function (content) { return content.encoding === 'base64' ?
504
- Buffer.from(content.text || '', 'base64').toString('utf8')
505
- : content.text; };
506
- exports.getResponseText = getResponseText;
507
- var ConfMimeTypes;
508
- (function (ConfMimeTypes) {
509
- ConfMimeTypes["TEXT_PLAIN"] = "text/plain";
510
- ConfMimeTypes["APPLICATION_JSON"] = "application/json";
511
- ConfMimeTypes["APPLICATION_JAVASCRIPT"] = "application/javascript";
512
- ConfMimeTypes["APPLICATION_XML"] = "application/xml";
513
- ConfMimeTypes["APPLICATION_EDN"] = "application/edn";
514
- ConfMimeTypes["TEXT_XML"] = "text/xml";
515
- ConfMimeTypes["TEXT_HTML"] = "text/html";
516
- ConfMimeTypes["TEXT_CSS"] = "text/css";
517
- ConfMimeTypes["APPLICATION_URLENCODED"] = "application/x-www-form-urlencoded";
518
- })(ConfMimeTypes = exports.ConfMimeTypes || (exports.ConfMimeTypes = {}));
519
- var WsMessageType;
520
- (function (WsMessageType) {
521
- WsMessageType["TEXT"] = "text";
522
- WsMessageType["BINARY"] = "binary";
523
- })(WsMessageType = exports.WsMessageType || (exports.WsMessageType = {}));
524
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/request/index.ts"],"names":[],"mappings":";;;;;;;;;;;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AAG,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAnD,CAAmD,CAAC;AAAnF,QAAA,WAAW,eAAwE;AACzF,IAAM,aAAa,GAAG,UAAC,GAAW,IAAK,OAAA,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,EAAvD,CAAuD,CAAC;AAAzF,QAAA,aAAa,iBAA4E;AAE/F,IAAM,eAAe,GAAG,UAAC,OAA6C,IAAK,OAAA,OAAO,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC;IAC/G,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC;IAC1D,CAAC,CAAC,OAAO,CAAC,IAAI,EAFkE,CAElE,CAAC;AAFJ,QAAA,eAAe,mBAEX;AAEjB,IAAY,aAUT;AAVH,WAAY,aAAa;IACrB,0CAAyB,CAAA;IACzB,sDAAqC,CAAA;IACrC,kEAAiD,CAAA;IACjD,oDAAmC,CAAA;IACnC,oDAAmC,CAAA;IACnC,sCAAqB,CAAA;IACrB,wCAAuB,CAAA;IACvB,sCAAqB,CAAA;IACrB,6EAA4D,CAAA;AAC9D,CAAC,EAVS,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAUtB;AAEH,IAAY,aAGT;AAHH,WAAY,aAAa;IACrB,8BAAa,CAAA;IACb,kCAAiB,CAAA;AACnB,CAAC,EAHS,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGtB"}
@@ -1,20 +0,0 @@
1
- export declare const generateJSONSchema: (jsObj: any, ignoreKeys?: string[], shouldAddNullable?: boolean, withExactValue?: boolean, withKeys?: boolean) => PrimitiveSchema | Schema;
2
- export declare const isPrimitive: (obj: any) => obj is Primitive;
3
- export declare const humanizeJsonSchemaErrors: (errors: any) => any;
4
- export declare const getField: (property: any, message?: string | undefined) => any;
5
- export declare const getJsonValidatorWithoutIgnoreKeys: (jsonValidator: any, ignoreKeys?: string[], shouldValidateArrays?: boolean) => string;
6
- export declare type Schema = BaseSchema & {
7
- properties?: {
8
- [name: string]: Schema | PrimitiveSchema;
9
- };
10
- items?: Schema[] | PrimitiveSchema[];
11
- };
12
- export declare type PrimitiveSchema = BaseSchema & {
13
- const?: Primitive;
14
- };
15
- declare type BaseSchema = {
16
- type?: string | string[];
17
- };
18
- declare type Primitive = string | number | boolean;
19
- export declare const ANY_VALUE = "*";
20
- export {};