@loadmill/core 0.3.138 → 0.3.139

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 (232) hide show
  1. package/package.json +2 -2
  2. package/dist/assertions/index.d.ts +0 -32
  3. package/dist/assertions/index.js +0 -52
  4. package/dist/assertions/index.js.map +0 -1
  5. package/dist/code-step/index.d.ts +0 -23
  6. package/dist/code-step/index.js +0 -97
  7. package/dist/code-step/index.js.map +0 -1
  8. package/dist/conf/defaults.d.ts +0 -1
  9. package/dist/conf/defaults.js +0 -11
  10. package/dist/conf/defaults.js.map +0 -1
  11. package/dist/conf/extrema.d.ts +0 -7
  12. package/dist/conf/extrema.js +0 -12
  13. package/dist/conf/extrema.js.map +0 -1
  14. package/dist/conf/index.d.ts +0 -15
  15. package/dist/conf/index.js +0 -80
  16. package/dist/conf/index.js.map +0 -1
  17. package/dist/conf/notifications.d.ts +0 -2
  18. package/dist/conf/notifications.js +0 -19
  19. package/dist/conf/notifications.js.map +0 -1
  20. package/dist/conf/types.d.ts +0 -122
  21. package/dist/conf/types.js +0 -38
  22. package/dist/conf/types.js.map +0 -1
  23. package/dist/conf/validate.d.ts +0 -69
  24. package/dist/conf/validate.js +0 -509
  25. package/dist/conf/validate.js.map +0 -1
  26. package/dist/distributed-logger-reporter.d.ts +0 -3
  27. package/dist/distributed-logger-reporter.js +0 -74
  28. package/dist/distributed-logger-reporter.js.map +0 -1
  29. package/dist/echo/firehose.d.ts +0 -7
  30. package/dist/echo/firehose.js +0 -130
  31. package/dist/echo/firehose.js.map +0 -1
  32. package/dist/echo/index.d.ts +0 -3
  33. package/dist/echo/index.js +0 -8
  34. package/dist/echo/index.js.map +0 -1
  35. package/dist/echo/stats.d.ts +0 -8
  36. package/dist/echo/stats.js +0 -152
  37. package/dist/echo/stats.js.map +0 -1
  38. package/dist/extract-and-assert-step/index.d.ts +0 -29
  39. package/dist/extract-and-assert-step/index.js +0 -108
  40. package/dist/extract-and-assert-step/index.js.map +0 -1
  41. package/dist/extractions/index.d.ts +0 -36
  42. package/dist/extractions/index.js +0 -49
  43. package/dist/extractions/index.js.map +0 -1
  44. package/dist/har/index.d.ts +0 -71
  45. package/dist/har/index.js +0 -61
  46. package/dist/har/index.js.map +0 -1
  47. package/dist/labels/constants.d.ts +0 -1
  48. package/dist/labels/constants.js +0 -5
  49. package/dist/labels/constants.js.map +0 -1
  50. package/dist/multipart-form-data/files.d.ts +0 -2
  51. package/dist/multipart-form-data/files.js +0 -63
  52. package/dist/multipart-form-data/files.js.map +0 -1
  53. package/dist/multipart-form-data/form-data-utils.d.ts +0 -19
  54. package/dist/multipart-form-data/form-data-utils.js +0 -117
  55. package/dist/multipart-form-data/form-data-utils.js.map +0 -1
  56. package/dist/multipart-form-data/is-binary-file.d.ts +0 -2
  57. package/dist/multipart-form-data/is-binary-file.js +0 -215
  58. package/dist/multipart-form-data/is-binary-file.js.map +0 -1
  59. package/dist/multipart-form-data/multipart-text-to-post-form-data.d.ts +0 -2
  60. package/dist/multipart-form-data/multipart-text-to-post-form-data.js +0 -86
  61. package/dist/multipart-form-data/multipart-text-to-post-form-data.js.map +0 -1
  62. package/dist/parameters/extractions.d.ts +0 -27
  63. package/dist/parameters/extractions.js +0 -51
  64. package/dist/parameters/extractions.js.map +0 -1
  65. package/dist/parameters/extractors/cheerio-extractor.d.ts +0 -11
  66. package/dist/parameters/extractors/cheerio-extractor.js +0 -84
  67. package/dist/parameters/extractors/cheerio-extractor.js.map +0 -1
  68. package/dist/parameters/extractors/expression-extractor.d.ts +0 -6
  69. package/dist/parameters/extractors/expression-extractor.js +0 -38
  70. package/dist/parameters/extractors/expression-extractor.js.map +0 -1
  71. package/dist/parameters/extractors/extractor.d.ts +0 -3
  72. package/dist/parameters/extractors/extractor.js +0 -3
  73. package/dist/parameters/extractors/extractor.js.map +0 -1
  74. package/dist/parameters/extractors/header-extractor.d.ts +0 -7
  75. package/dist/parameters/extractors/header-extractor.js +0 -51
  76. package/dist/parameters/extractors/header-extractor.js.map +0 -1
  77. package/dist/parameters/extractors/index.d.ts +0 -10
  78. package/dist/parameters/extractors/index.js +0 -20
  79. package/dist/parameters/extractors/index.js.map +0 -1
  80. package/dist/parameters/extractors/json-path-extractor.d.ts +0 -11
  81. package/dist/parameters/extractors/json-path-extractor.js +0 -127
  82. package/dist/parameters/extractors/json-path-extractor.js.map +0 -1
  83. package/dist/parameters/extractors/parametrized-extractor.d.ts +0 -10
  84. package/dist/parameters/extractors/parametrized-extractor.js +0 -34
  85. package/dist/parameters/extractors/parametrized-extractor.js.map +0 -1
  86. package/dist/parameters/extractors/regex-extractor.d.ts +0 -7
  87. package/dist/parameters/extractors/regex-extractor.js +0 -46
  88. package/dist/parameters/extractors/regex-extractor.js.map +0 -1
  89. package/dist/parameters/extractors/regex-matcher.d.ts +0 -1
  90. package/dist/parameters/extractors/regex-matcher.js +0 -22
  91. package/dist/parameters/extractors/regex-matcher.js.map +0 -1
  92. package/dist/parameters/extractors/ws-extractor.d.ts +0 -33
  93. package/dist/parameters/extractors/ws-extractor.js +0 -215
  94. package/dist/parameters/extractors/ws-extractor.js.map +0 -1
  95. package/dist/parameters/extractors/x-path-extractor.d.ts +0 -9
  96. package/dist/parameters/extractors/x-path-extractor.js +0 -77
  97. package/dist/parameters/extractors/x-path-extractor.js.map +0 -1
  98. package/dist/parameters/generate-random.d.ts +0 -13
  99. package/dist/parameters/generate-random.js +0 -108
  100. package/dist/parameters/generate-random.js.map +0 -1
  101. package/dist/parameters/html-utils.d.ts +0 -1
  102. package/dist/parameters/html-utils.js +0 -18
  103. package/dist/parameters/html-utils.js.map +0 -1
  104. package/dist/parameters/index.d.ts +0 -93
  105. package/dist/parameters/index.js +0 -619
  106. package/dist/parameters/index.js.map +0 -1
  107. package/dist/parameters/json-path-utils.d.ts +0 -1
  108. package/dist/parameters/json-path-utils.js +0 -16
  109. package/dist/parameters/json-path-utils.js.map +0 -1
  110. package/dist/parameters/operators/binary-operator.d.ts +0 -13
  111. package/dist/parameters/operators/binary-operator.js +0 -39
  112. package/dist/parameters/operators/binary-operator.js.map +0 -1
  113. package/dist/parameters/operators/index.d.ts +0 -5
  114. package/dist/parameters/operators/index.js +0 -21
  115. package/dist/parameters/operators/index.js.map +0 -1
  116. package/dist/parameters/parameter-functions/aws-cognito.d.ts +0 -3
  117. package/dist/parameters/parameter-functions/aws-cognito.js +0 -119
  118. package/dist/parameters/parameter-functions/aws-cognito.js.map +0 -1
  119. package/dist/parameters/parameter-functions/boolean-parameter-functions.d.ts +0 -12
  120. package/dist/parameters/parameter-functions/boolean-parameter-functions.js +0 -47
  121. package/dist/parameters/parameter-functions/boolean-parameter-functions.js.map +0 -1
  122. package/dist/parameters/parameter-functions/crypto.d.ts +0 -11
  123. package/dist/parameters/parameter-functions/crypto.js +0 -71
  124. package/dist/parameters/parameter-functions/crypto.js.map +0 -1
  125. package/dist/parameters/parameter-functions/json-schema.d.ts +0 -1
  126. package/dist/parameters/parameter-functions/json-schema.js +0 -33
  127. package/dist/parameters/parameter-functions/json-schema.js.map +0 -1
  128. package/dist/parameters/parameter-functions/numeric-input-parameter-functions.d.ts +0 -11
  129. package/dist/parameters/parameter-functions/numeric-input-parameter-functions.js +0 -34
  130. package/dist/parameters/parameter-functions/numeric-input-parameter-functions.js.map +0 -1
  131. package/dist/parameters/parameter-functions/numeric-parameter-functions.d.ts +0 -15
  132. package/dist/parameters/parameter-functions/numeric-parameter-functions.js +0 -56
  133. package/dist/parameters/parameter-functions/numeric-parameter-functions.js.map +0 -1
  134. package/dist/parameters/parameter-functions/parameter-function-utils.d.ts +0 -5
  135. package/dist/parameters/parameter-functions/parameter-function-utils.js +0 -82
  136. package/dist/parameters/parameter-functions/parameter-function-utils.js.map +0 -1
  137. package/dist/parameters/parameter-functions/parameter-function.d.ts +0 -6
  138. package/dist/parameters/parameter-functions/parameter-function.js +0 -28
  139. package/dist/parameters/parameter-functions/parameter-function.js.map +0 -1
  140. package/dist/parameters/parameter-functions/parameter-functions.d.ts +0 -7
  141. package/dist/parameters/parameter-functions/parameter-functions.js +0 -53
  142. package/dist/parameters/parameter-functions/parameter-functions.js.map +0 -1
  143. package/dist/parameters/parameter-functions/random-parameter-functions.d.ts +0 -1
  144. package/dist/parameters/parameter-functions/random-parameter-functions.js +0 -43
  145. package/dist/parameters/parameter-functions/random-parameter-functions.js.map +0 -1
  146. package/dist/parameters/parameter-functions/textual-parameter-functions.d.ts +0 -72
  147. package/dist/parameters/parameter-functions/textual-parameter-functions.js +0 -389
  148. package/dist/parameters/parameter-functions/textual-parameter-functions.js.map +0 -1
  149. package/dist/parameters/parameter-name-utils.d.ts +0 -5
  150. package/dist/parameters/parameter-name-utils.js +0 -123
  151. package/dist/parameters/parameter-name-utils.js.map +0 -1
  152. package/dist/parameters/parameter-regex-providers.d.ts +0 -24
  153. package/dist/parameters/parameter-regex-providers.js +0 -70
  154. package/dist/parameters/parameter-regex-providers.js.map +0 -1
  155. package/dist/parameters/resolvers/random-parameters-resolver.d.ts +0 -1
  156. package/dist/parameters/resolvers/random-parameters-resolver.js +0 -12
  157. package/dist/parameters/resolvers/random-parameters-resolver.js.map +0 -1
  158. package/dist/parameters/type.d.ts +0 -10
  159. package/dist/parameters/type.js +0 -9
  160. package/dist/parameters/type.js.map +0 -1
  161. package/dist/parameters/value-utils.d.ts +0 -5
  162. package/dist/parameters/value-utils.js +0 -44
  163. package/dist/parameters/value-utils.js.map +0 -1
  164. package/dist/request/index.d.ts +0 -174
  165. package/dist/request/index.js +0 -356
  166. package/dist/request/index.js.map +0 -1
  167. package/dist/schema/json-schema-generator.d.ts +0 -20
  168. package/dist/schema/json-schema-generator.js +0 -135
  169. package/dist/schema/json-schema-generator.js.map +0 -1
  170. package/dist/signals.d.ts +0 -4
  171. package/dist/signals.js +0 -9
  172. package/dist/signals.js.map +0 -1
  173. package/dist/socket-events/index.d.ts +0 -13
  174. package/dist/socket-events/index.js +0 -17
  175. package/dist/socket-events/index.js.map +0 -1
  176. package/dist/step/assertable.d.ts +0 -4
  177. package/dist/step/assertable.js +0 -3
  178. package/dist/step/assertable.js.map +0 -1
  179. package/dist/step/codeable.d.ts +0 -3
  180. package/dist/step/codeable.js +0 -3
  181. package/dist/step/codeable.js.map +0 -1
  182. package/dist/step/extractable.d.ts +0 -4
  183. package/dist/step/extractable.js +0 -3
  184. package/dist/step/extractable.js.map +0 -1
  185. package/dist/step/index.d.ts +0 -72
  186. package/dist/step/index.js +0 -71
  187. package/dist/step/index.js.map +0 -1
  188. package/dist/step/step-type.d.ts +0 -4
  189. package/dist/step/step-type.js +0 -3
  190. package/dist/step/step-type.js.map +0 -1
  191. package/dist/step/type-guards.d.ts +0 -7
  192. package/dist/step/type-guards.js +0 -18
  193. package/dist/step/type-guards.js.map +0 -1
  194. package/dist/subset/index.d.ts +0 -3
  195. package/dist/subset/index.js +0 -8
  196. package/dist/subset/index.js.map +0 -1
  197. package/dist/subset/is-subset.d.ts +0 -2
  198. package/dist/subset/is-subset.js +0 -29
  199. package/dist/subset/is-subset.js.map +0 -1
  200. package/dist/subset/json-contains.d.ts +0 -1
  201. package/dist/subset/json-contains.js +0 -24
  202. package/dist/subset/json-contains.js.map +0 -1
  203. package/dist/team-options/constants.d.ts +0 -3
  204. package/dist/team-options/constants.js +0 -7
  205. package/dist/team-options/constants.js.map +0 -1
  206. package/dist/xml/decode.d.ts +0 -2
  207. package/dist/xml/decode.js +0 -91
  208. package/dist/xml/decode.js.map +0 -1
  209. package/dist/xml/encode.d.ts +0 -1
  210. package/dist/xml/encode.js +0 -14
  211. package/dist/xml/encode.js.map +0 -1
  212. package/dist/xml/escape-reserved-chars.d.ts +0 -6
  213. package/dist/xml/escape-reserved-chars.js +0 -57
  214. package/dist/xml/escape-reserved-chars.js.map +0 -1
  215. package/dist/xml/is-xml.d.ts +0 -1
  216. package/dist/xml/is-xml.js +0 -9
  217. package/dist/xml/is-xml.js.map +0 -1
  218. package/dist/xml/json-to-xml.d.ts +0 -2
  219. package/dist/xml/json-to-xml.js +0 -11
  220. package/dist/xml/json-to-xml.js.map +0 -1
  221. package/dist/xml/namespaces.d.ts +0 -7
  222. package/dist/xml/namespaces.js +0 -16
  223. package/dist/xml/namespaces.js.map +0 -1
  224. package/dist/xml/remove-invisible-chars.d.ts +0 -2
  225. package/dist/xml/remove-invisible-chars.js +0 -13
  226. package/dist/xml/remove-invisible-chars.js.map +0 -1
  227. package/dist/xml/replace-s-tags.d.ts +0 -4
  228. package/dist/xml/replace-s-tags.js +0 -21
  229. package/dist/xml/replace-s-tags.js.map +0 -1
  230. package/dist/xml/xml-to-json.d.ts +0 -7
  231. package/dist/xml/xml-to-json.js +0 -21
  232. package/dist/xml/xml-to-json.js.map +0 -1
@@ -1,356 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.RequestType = exports.WsMessageType = exports.ConfMimeTypes = exports.getResponseText = exports.isGRPCRequest = exports.isHTTPRequest = exports.isWSRequest = exports.EXCLUDES = exports.CachePenetrationModes = exports.BodyTypes = exports.isReservedHeader = exports.toHeaders = exports.createRequest = exports.resolveUrl = exports.LoadmillRequest = exports.ALLOWED_RESPONSE_STATUSES = exports.supportedMethods = exports.DEFAULT_REQUEST_TIMEOUT = void 0;
23
- var flatMap = require("lodash/flatMap");
24
- var uriUtils = __importStar(require("@loadmill/universal/dist/uri-utils"));
25
- var parameters_1 = require("../parameters");
26
- var har_1 = require("../har");
27
- var step_1 = require("../step");
28
- Object.defineProperty(exports, "RequestType", { enumerable: true, get: function () { return step_1.StepFlowType; } });
29
- var extractions_1 = require("../extractions");
30
- var assertions_1 = require("../assertions");
31
- exports.DEFAULT_REQUEST_TIMEOUT = 25000;
32
- exports.supportedMethods = {
33
- GET: 'GET',
34
- POST: 'POST',
35
- PUT: 'PUT',
36
- DELETE: 'DELETE',
37
- PATCH: 'PATCH',
38
- };
39
- exports.ALLOWED_RESPONSE_STATUSES = { SUCCESS: 'SUCCESS', ERROR: 'ERROR', ANY: 'ANY' };
40
- /**
41
- * This class represents an HTTP request to be performed in the course of a load test.
42
- *
43
- * @property url The URL of the request (parameterizable).
44
- * @property method The HTTP method.
45
- * @property headers An array of headers to add to the request (values parameterizable).
46
- * @property postData The content of the request (text parameterizable).
47
- * @property delay The delay between this request and the previous one in milliseconds. This property is ignored for the first request.
48
- * @property timeout The time to wait for the request to finish in milliseconds.
49
- * @property extract A dictionary of parameter extractions.
50
- * @property assert An array or dictionary of assertions.
51
- * @property expectedStatus The expected status of the http response SUCCESS for 2XX-3XX, ERROR for 4XX-5XX.
52
- */
53
- var LoadmillRequest = /** @class */ (function () {
54
- function LoadmillRequest(url) {
55
- Object.defineProperty(this, "url", {
56
- enumerable: true,
57
- configurable: true,
58
- writable: true,
59
- value: url
60
- });
61
- Object.defineProperty(this, "type", {
62
- enumerable: true,
63
- configurable: true,
64
- writable: true,
65
- value: void 0
66
- });
67
- Object.defineProperty(this, "id", {
68
- enumerable: true,
69
- configurable: true,
70
- writable: true,
71
- value: void 0
72
- });
73
- Object.defineProperty(this, "auth", {
74
- enumerable: true,
75
- configurable: true,
76
- writable: true,
77
- value: void 0
78
- });
79
- Object.defineProperty(this, "stopBefore", {
80
- enumerable: true,
81
- configurable: true,
82
- writable: true,
83
- value: void 0
84
- });
85
- Object.defineProperty(this, "skipBefore", {
86
- enumerable: true,
87
- configurable: true,
88
- writable: true,
89
- value: void 0
90
- });
91
- Object.defineProperty(this, "loop", {
92
- enumerable: true,
93
- configurable: true,
94
- writable: true,
95
- value: void 0
96
- });
97
- Object.defineProperty(this, "useCookies", {
98
- enumerable: true,
99
- configurable: true,
100
- writable: true,
101
- value: void 0
102
- });
103
- Object.defineProperty(this, "description", {
104
- enumerable: true,
105
- configurable: true,
106
- writable: true,
107
- value: void 0
108
- });
109
- Object.defineProperty(this, "delay", {
110
- enumerable: true,
111
- configurable: true,
112
- writable: true,
113
- value: void 0
114
- });
115
- Object.defineProperty(this, "postData", {
116
- enumerable: true,
117
- configurable: true,
118
- writable: true,
119
- value: void 0
120
- });
121
- Object.defineProperty(this, "postFormData", {
122
- enumerable: true,
123
- configurable: true,
124
- writable: true,
125
- value: void 0
126
- });
127
- Object.defineProperty(this, "graphqlPostData", {
128
- enumerable: true,
129
- configurable: true,
130
- writable: true,
131
- value: void 0
132
- });
133
- Object.defineProperty(this, "file", {
134
- enumerable: true,
135
- configurable: true,
136
- writable: true,
137
- value: void 0
138
- });
139
- Object.defineProperty(this, "grpc", {
140
- enumerable: true,
141
- configurable: true,
142
- writable: true,
143
- value: void 0
144
- });
145
- Object.defineProperty(this, "cachePenetration", {
146
- enumerable: true,
147
- configurable: true,
148
- writable: true,
149
- value: void 0
150
- });
151
- Object.defineProperty(this, "method", {
152
- enumerable: true,
153
- configurable: true,
154
- writable: true,
155
- value: 'GET'
156
- });
157
- Object.defineProperty(this, "headers", {
158
- enumerable: true,
159
- configurable: true,
160
- writable: true,
161
- value: void 0
162
- });
163
- Object.defineProperty(this, "assert", {
164
- enumerable: true,
165
- configurable: true,
166
- writable: true,
167
- value: void 0
168
- });
169
- Object.defineProperty(this, "extract", {
170
- enumerable: true,
171
- configurable: true,
172
- writable: true,
173
- value: void 0
174
- });
175
- Object.defineProperty(this, "postScript", {
176
- enumerable: true,
177
- configurable: true,
178
- writable: true,
179
- value: void 0
180
- });
181
- Object.defineProperty(this, "disabled", {
182
- enumerable: true,
183
- configurable: true,
184
- writable: true,
185
- value: void 0
186
- });
187
- Object.defineProperty(this, "timeout", {
188
- enumerable: true,
189
- configurable: true,
190
- writable: true,
191
- value: void 0
192
- });
193
- Object.defineProperty(this, "expectedStatus", {
194
- enumerable: true,
195
- configurable: true,
196
- writable: true,
197
- value: void 0
198
- });
199
- Object.defineProperty(this, "noRedirects", {
200
- enumerable: true,
201
- configurable: true,
202
- writable: true,
203
- value: void 0
204
- });
205
- Object.defineProperty(this, "meta", {
206
- enumerable: true,
207
- configurable: true,
208
- writable: true,
209
- value: void 0
210
- });
211
- this.type = step_1.StepTypes.REQUEST;
212
- }
213
- return LoadmillRequest;
214
- }());
215
- exports.LoadmillRequest = LoadmillRequest;
216
- function resolveUrl(url, parameters, onError) {
217
- return uriUtils.withProtocol(parameters_1.parameterUtils.resolveExpression(url, parameters, onError));
218
- }
219
- exports.resolveUrl = resolveUrl;
220
- /**
221
- * This function should be able to take any object/json and either make a VALID LoadmillRequest out of it
222
- * or fail with a meaningful error message.
223
- */
224
- function createRequest(from) {
225
- var url = from.url, assert = from.assert, method = from.method, extract = from.extract, headers = from.headers, postData = from.postData, postFormData = from.postFormData, graphqlPostData = from.graphqlPostData, file = from.file, postScript = from.postScript, noRedirects = from.noRedirects, grpc = from.grpc;
226
- var request = step_1.createStep(from, new LoadmillRequest(url));
227
- if (method) {
228
- request.method = method;
229
- }
230
- if (headers) {
231
- request.headers = toHeaders(headers);
232
- }
233
- if (postData) {
234
- request.postData = {
235
- text: postData.text,
236
- mimeType: postData.mimeType,
237
- params: postData.params
238
- };
239
- }
240
- if (postFormData) {
241
- request.postFormData = postFormData;
242
- }
243
- if (graphqlPostData) {
244
- request.graphqlPostData = graphqlPostData;
245
- }
246
- if (file) {
247
- request.file = file;
248
- }
249
- if (extract) {
250
- request.extract = extractions_1.toExtractions(extract);
251
- }
252
- if (assert) {
253
- request.assert = assertions_1.toAssertions(assert);
254
- }
255
- if (postScript !== undefined) {
256
- request.postScript = postScript;
257
- }
258
- if (noRedirects !== undefined) {
259
- request.noRedirects = noRedirects;
260
- }
261
- if (grpc) {
262
- request.grpc = grpc;
263
- }
264
- return request;
265
- }
266
- exports.createRequest = createRequest;
267
- function toHeaders(headers) {
268
- return flatMap(headers, function (value, key) {
269
- var res = [];
270
- if (typeof key === 'string') {
271
- pushHeader(value, key, res);
272
- }
273
- else {
274
- Object.keys(value).map(function (innerKey) {
275
- var innerValue = value[innerKey];
276
- pushHeader(innerValue, innerKey, res);
277
- });
278
- }
279
- return res;
280
- });
281
- }
282
- exports.toHeaders = toHeaders;
283
- exports.isReservedHeader = har_1.isReservedHeader;
284
- function pushHeader(value, name, to) {
285
- to.push(singleton(value, name));
286
- }
287
- function singleton(value, name) {
288
- var _a;
289
- return _a = {}, _a[name] = value, _a;
290
- }
291
- var BodyTypes;
292
- (function (BodyTypes) {
293
- BodyTypes["POST_DATA"] = "postData";
294
- BodyTypes["URLENCODED"] = "urlencoded";
295
- BodyTypes["FORM_DATA"] = "postFormData";
296
- BodyTypes["RAW_FILE"] = "rawFile";
297
- BodyTypes["GRAPHQL"] = "GraphQL";
298
- })(BodyTypes = exports.BodyTypes || (exports.BodyTypes = {}));
299
- var CachePenetrationModes;
300
- (function (CachePenetrationModes) {
301
- CachePenetrationModes["none"] = "none";
302
- CachePenetrationModes["def"] = "default";
303
- CachePenetrationModes["alwaysQuery"] = "always-query";
304
- CachePenetrationModes["alwaysHeader"] = "always-header";
305
- })(CachePenetrationModes = exports.CachePenetrationModes || (exports.CachePenetrationModes = {}));
306
- // list of fields in our object we must not change
307
- exports.EXCLUDES = [
308
- 'url',
309
- 'method',
310
- 'headers',
311
- 'timeout',
312
- 'postData',
313
- 'text',
314
- 'mimeType',
315
- 'extract',
316
- 'jsonPath',
317
- 'jQuery',
318
- 'regex',
319
- 'header',
320
- 'assert',
321
- 'check',
322
- 'equals',
323
- 'contains',
324
- 'matches',
325
- 'falsy',
326
- 'greater',
327
- 'lesser',
328
- ];
329
- var isWSRequest = function (url) { return !!((url === null || url === void 0 ? void 0 : url.startsWith('ws://')) || (url === null || url === void 0 ? void 0 : url.startsWith('wss://'))); };
330
- exports.isWSRequest = isWSRequest;
331
- var isHTTPRequest = function (url) { return !!((url === null || url === void 0 ? void 0 : url.startsWith('http://')) || (url === null || url === void 0 ? void 0 : url.startsWith('https://'))); };
332
- exports.isHTTPRequest = isHTTPRequest;
333
- var isGRPCRequest = function (url) { return !!(url === null || url === void 0 ? void 0 : url.startsWith('grpc://')); };
334
- exports.isGRPCRequest = isGRPCRequest;
335
- var getResponseText = function (content) { return content.encoding === 'base64' ?
336
- Buffer.from(content.text || '', 'base64').toString('utf8')
337
- : content.text; };
338
- exports.getResponseText = getResponseText;
339
- var ConfMimeTypes;
340
- (function (ConfMimeTypes) {
341
- ConfMimeTypes["TEXT_PLAIN"] = "text/plain";
342
- ConfMimeTypes["APPLICATION_JSON"] = "application/json";
343
- ConfMimeTypes["APPLICATION_JAVASCRIPT"] = "application/javascript";
344
- ConfMimeTypes["APPLICATION_XML"] = "application/xml";
345
- ConfMimeTypes["APPLICATION_EDN"] = "application/edn";
346
- ConfMimeTypes["TEXT_XML"] = "text/xml";
347
- ConfMimeTypes["TEXT_HTML"] = "text/html";
348
- ConfMimeTypes["TEXT_CSS"] = "text/css";
349
- ConfMimeTypes["APPLICATION_URLENCODED"] = "application/x-www-form-urlencoded";
350
- })(ConfMimeTypes = exports.ConfMimeTypes || (exports.ConfMimeTypes = {}));
351
- var WsMessageType;
352
- (function (WsMessageType) {
353
- WsMessageType["TEXT"] = "text";
354
- WsMessageType["BINARY"] = "binary";
355
- })(WsMessageType = exports.WsMessageType || (exports.WsMessageType = {}));
356
- //# 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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CAAE,UAAU,CAAC,SAAS,CAAC,CAAC,EAA9B,CAA8B,CAAC;AAAjE,QAAA,aAAa,iBAAoD;AAEvE,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 {};
@@ -1,135 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ANY_VALUE = exports.getJsonValidatorWithoutIgnoreKeys = exports.getField = exports.humanizeJsonSchemaErrors = exports.isPrimitive = exports.generateJSONSchema = void 0;
7
- var find = require("lodash/find");
8
- var log_1 = __importDefault(require("@loadmill/universal/dist/log"));
9
- var isEmpty = require("lodash/isEmpty");
10
- var generateJSONSchema = function (jsObj, ignoreKeys, shouldAddNullable, withExactValue, withKeys) {
11
- if (ignoreKeys === void 0) { ignoreKeys = []; }
12
- if (shouldAddNullable === void 0) { shouldAddNullable = false; }
13
- if (withExactValue === void 0) { withExactValue = false; }
14
- if (withKeys === void 0) { withKeys = false; }
15
- try {
16
- var schema = _getSchema(jsObj, ignoreKeys, shouldAddNullable, withExactValue, withKeys);
17
- return schema;
18
- }
19
- catch (err) {
20
- _handleError('Error generating JSON Schema', err, jsObj);
21
- }
22
- return {};
23
- };
24
- exports.generateJSONSchema = generateJSONSchema;
25
- var _getSchema = function (obj, ignoreKeys, shouldAddNullable, withExactValue, withKeys) {
26
- if (ignoreKeys === void 0) { ignoreKeys = []; }
27
- if (obj == null) {
28
- return shouldAddNullable ? { type: 'object', nullable: true } : { type: 'null' };
29
- }
30
- else if (exports.isPrimitive(obj)) {
31
- var res = { type: evaluateObjectType(obj) };
32
- if (shouldValidateExactValue(obj, withExactValue)) {
33
- res['const'] = obj;
34
- }
35
- return res;
36
- }
37
- else if (Array.isArray(obj)) {
38
- var items = [];
39
- for (var _i = 0, _a = Object.entries(obj); _i < _a.length; _i++) {
40
- var _b = _a[_i], value = _b[1];
41
- var elementSchema = _getSchema(value, ignoreKeys, shouldAddNullable, withExactValue, withKeys);
42
- if (withExactValue || !find(items, elementSchema)) {
43
- items.push(elementSchema);
44
- }
45
- }
46
- // The use of 'oneOf' creates a schema that validates the existence of the items but not their order in the array
47
- var res = {
48
- type: 'array',
49
- items: isEmpty(items) ? {} : withExactValue ? items : { 'anyOf': items }
50
- };
51
- withExactValue && (res['minItems'] = items.length);
52
- return res;
53
- }
54
- else {
55
- var properties = {};
56
- for (var _c = 0, _d = Object.entries(obj); _c < _d.length; _c++) {
57
- var _e = _d[_c], key = _e[0], value = _e[1];
58
- if (!ignoreKeys.includes(key)) {
59
- properties[key] = _getSchema(value, ignoreKeys, shouldAddNullable, withExactValue, withKeys);
60
- }
61
- }
62
- var res = {
63
- type: 'object',
64
- properties: properties
65
- };
66
- withKeys && (res['required'] = Object.keys(obj));
67
- return res;
68
- }
69
- };
70
- var isPrimitive = function (obj) { return Object(obj) !== obj; };
71
- exports.isPrimitive = isPrimitive;
72
- var shouldValidateExactValue = function (val, exactValue) { return exactValue && val !== exports.ANY_VALUE; };
73
- var evaluateObjectType = function (val) { return val !== exports.ANY_VALUE ? typeof val : ['string', 'number', 'integer', 'object', 'array', 'boolean']; };
74
- var _handleError = function (err, msg, json) {
75
- log_1.default.error(msg, err, json);
76
- throw new Error(msg);
77
- };
78
- var humanizeJsonSchemaErrors = function (errors) {
79
- return errors.map(function (err) {
80
- if (err.instance === null && err.stack.includes('is not of a type')) {
81
- err.stack = "JSON contains null on property " + exports.getField(err.property, err.message);
82
- }
83
- if (err.stack.includes('is not of a type')) {
84
- var type = err.argument[0];
85
- err.stack = "JSON doesn't contain " + (type === 'null' ? type : "a type of " + type) + " on property " + exports.getField(err.property, err.message) + " " + addIndex(err);
86
- }
87
- else if (err.stack.includes('does not exactly match')) {
88
- err.stack = "JSON doesn't contain " + err.schema.const + " on property " + exports.getField(err.property, err.message) + " " + addIndex(err);
89
- }
90
- else if (err.stack.includes('requires property')) {
91
- err.stack = "JSON doesn't contain property " + exports.getField(err.property, err.message);
92
- }
93
- else if (err.stack.includes('does not meet minimum length')) {
94
- var missingItems = err.argument - err.instance.length;
95
- err.stack = "JSON doesn't contain the last " + (missingItems > 1 ? missingItems + " items" : 'item') + " on " + exports.getField(err.property, err.message) + " array";
96
- }
97
- return err;
98
- });
99
- };
100
- exports.humanizeJsonSchemaErrors = humanizeJsonSchemaErrors;
101
- var getField = function (property, message) {
102
- if (message === null || message === void 0 ? void 0 : message.includes('requires property ')) {
103
- return message.split('requires property ')[1].replace(/"/g, '');
104
- }
105
- return property.split('.').pop().split('[')[0];
106
- };
107
- exports.getField = getField;
108
- var addIndex = function (error) {
109
- var path = error.property.split('[');
110
- if (path.length > 1) {
111
- var index = Number(path[path.length - 1].replace(']', ''));
112
- return !isNaN(index) && index > -1 ? 'in index ' + index : '';
113
- }
114
- return '';
115
- };
116
- var getJsonValidatorWithoutIgnoreKeys = function (jsonValidator, ignoreKeys, shouldValidateArrays) {
117
- if (ignoreKeys === void 0) { ignoreKeys = []; }
118
- if (shouldValidateArrays === void 0) { shouldValidateArrays = true; }
119
- for (var _i = 0, _a = Object.entries(jsonValidator); _i < _a.length; _i++) {
120
- var _b = _a[_i], key = _b[0], value = _b[1];
121
- if (ignoreKeys.includes(key)) {
122
- delete jsonValidator[key];
123
- }
124
- if (!shouldValidateArrays && Array.isArray(value)) {
125
- delete jsonValidator[key];
126
- }
127
- else if (value !== null && typeof value === 'object') {
128
- exports.getJsonValidatorWithoutIgnoreKeys(value, ignoreKeys, shouldValidateArrays);
129
- }
130
- }
131
- return JSON.stringify(jsonValidator, null, 2);
132
- };
133
- exports.getJsonValidatorWithoutIgnoreKeys = getJsonValidatorWithoutIgnoreKeys;
134
- exports.ANY_VALUE = '*';
135
- //# sourceMappingURL=json-schema-generator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"json-schema-generator.js","sourceRoot":"","sources":["../../src/schema/json-schema-generator.ts"],"names":[],"mappings":";;;;;;AAAA,kCAAqC;AACrC,qEAA+C;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aAAa,CAAC,GAAG,CAAC,CAAC;SAC3B;aACI,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YACpD,yCAAiC,CAAC,KAAK,EAAE,UAAU,EAAE,oBAAoB,CAAC,CAAC;SAC5E;KACF;IACD,OAAO,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAChD,CAAC,CAAC;AAbW,QAAA,iCAAiC,qCAa5C;AAmBW,QAAA,SAAS,GAAG,GAAG,CAAC"}
package/dist/signals.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export declare enum SIGNAL {
2
- SIGTERM = "SIGTERM",
3
- SIGINT = "SIGINT"
4
- }
package/dist/signals.js DELETED
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SIGNAL = void 0;
4
- var SIGNAL;
5
- (function (SIGNAL) {
6
- SIGNAL["SIGTERM"] = "SIGTERM";
7
- SIGNAL["SIGINT"] = "SIGINT";
8
- })(SIGNAL = exports.SIGNAL || (exports.SIGNAL = {}));
9
- //# sourceMappingURL=signals.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"signals.js","sourceRoot":"","sources":["../src/signals.ts"],"names":[],"mappings":";;;AAAA,IAAY,MAGX;AAHD,WAAY,MAAM;IAChB,6BAAmB,CAAA;IACnB,2BAAiB,CAAA;AACnB,CAAC,EAHW,MAAM,GAAN,cAAM,KAAN,cAAM,QAGjB"}
@@ -1,13 +0,0 @@
1
- export declare const socketEvents: {
2
- runFail: (token: string) => string;
3
- runSuccess: (token: string) => string;
4
- postScriptStarted: (token: string) => string;
5
- postScriptFinished: (token: string) => string;
6
- millUpdate: (handleId: string) => string;
7
- runConf: string;
8
- runLoad: string;
9
- stopLoad: string;
10
- askLoadResults: string;
11
- gracefulShutdown: string;
12
- disconnectAgent: string;
13
- };
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.socketEvents = void 0;
4
- exports.socketEvents = {
5
- runFail: function (token) { return "run-fail:" + token; },
6
- runSuccess: function (token) { return "run-success:" + token; },
7
- postScriptStarted: function (token) { return "postscript-started:" + token; },
8
- postScriptFinished: function (token) { return "postscript-finished:" + token; },
9
- millUpdate: function (handleId) { return "mill-update:" + handleId; },
10
- runConf: 'run-conf',
11
- runLoad: 'run-load',
12
- stopLoad: 'stop-load',
13
- askLoadResults: 'ask-load-results',
14
- gracefulShutdown: 'graceful-shutdown',
15
- disconnectAgent: 'disconnect-agent',
16
- };
17
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/socket-events/index.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG;IAC1B,OAAO,EAAE,UAAC,KAAa,IAAK,OAAA,cAAY,KAAO,EAAnB,CAAmB;IAC/C,UAAU,EAAE,UAAC,KAAa,IAAK,OAAA,iBAAe,KAAO,EAAtB,CAAsB;IACrD,iBAAiB,EAAE,UAAC,KAAa,IAAK,OAAA,wBAAsB,KAAO,EAA7B,CAA6B;IACnE,kBAAkB,EAAE,UAAC,KAAa,IAAK,OAAA,yBAAuB,KAAO,EAA9B,CAA8B;IACrE,UAAU,EAAE,UAAC,QAAgB,IAAK,OAAA,iBAAe,QAAU,EAAzB,CAAyB;IAC3D,OAAO,EAAE,UAAU;IACnB,OAAO,EAAE,UAAU;IACnB,QAAQ,EAAE,WAAW;IACrB,cAAc,EAAE,kBAAkB;IAClC,gBAAgB,EAAE,mBAAmB;IACrC,eAAe,EAAE,kBAAkB;CACpC,CAAC"}
@@ -1,4 +0,0 @@
1
- import { Assertions } from '../assertions';
2
- export interface Assertable {
3
- assert?: Assertions;
4
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=assertable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"assertable.js","sourceRoot":"","sources":["../../src/step/assertable.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- export interface Codeable {
2
- postScript?: string;
3
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=codeable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"codeable.js","sourceRoot":"","sources":["../../src/step/codeable.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- import { Extractions } from '../extractions';
2
- export interface Extractable {
3
- extract?: Extractions[];
4
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=extractable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"extractable.js","sourceRoot":"","sources":["../../src/step/extractable.ts"],"names":[],"mappings":""}