@requesto/cli 1.10.1 → 1.11.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.
- package/dist/index.mjs +10511 -7712
- package/dist/sandbox-worker.js +18 -1
- package/package.json +6 -6
package/dist/sandbox-worker.js
CHANGED
|
@@ -267,7 +267,7 @@ ${script}`);
|
|
|
267
267
|
}
|
|
268
268
|
function executeTestScript(script, context) {
|
|
269
269
|
const results = [];
|
|
270
|
-
const { response: responseCtx, request } = context;
|
|
270
|
+
const { response: responseCtx, request: requestCtx } = context;
|
|
271
271
|
const { store, types, api } = createEnvironment(context.env);
|
|
272
272
|
const response = {
|
|
273
273
|
status: responseCtx.status,
|
|
@@ -277,6 +277,23 @@ function executeTestScript(script, context) {
|
|
|
277
277
|
duration: responseCtx.duration,
|
|
278
278
|
json: () => JSON.parse(responseCtx.body)
|
|
279
279
|
};
|
|
280
|
+
let params = {};
|
|
281
|
+
try {
|
|
282
|
+
params = Object.fromEntries(new URL(requestCtx.url).searchParams);
|
|
283
|
+
} catch {
|
|
284
|
+
}
|
|
285
|
+
const form = {};
|
|
286
|
+
for (const entry of requestCtx.formDataEntries ?? []) {
|
|
287
|
+
form[entry.key] = entry.type === "file" ? entry.fileName ?? "" : entry.value;
|
|
288
|
+
}
|
|
289
|
+
const request = {
|
|
290
|
+
method: requestCtx.method,
|
|
291
|
+
url: requestCtx.url,
|
|
292
|
+
headers: requestCtx.headers ? { ...requestCtx.headers } : void 0,
|
|
293
|
+
body: requestCtx.body,
|
|
294
|
+
params,
|
|
295
|
+
form
|
|
296
|
+
};
|
|
280
297
|
const test = (name, fn2) => {
|
|
281
298
|
try {
|
|
282
299
|
fn2();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@requesto/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"description": "Run your Requesto collections from the terminal and CI pipelines",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
"commander": "^15.0.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@types/node": "^26.4
|
|
27
|
+
"@types/node": "^26.6.4",
|
|
28
28
|
"esbuild": "^0.28.2",
|
|
29
|
-
"requesto-backend": "1.
|
|
30
|
-
"requesto-engine": "1.
|
|
31
|
-
"tsx": "^4.23.
|
|
29
|
+
"requesto-backend": "1.11.0",
|
|
30
|
+
"requesto-engine": "1.11.0",
|
|
31
|
+
"tsx": "^4.23.15",
|
|
32
32
|
"typescript": "^7.0.2",
|
|
33
|
-
"vitest": "^5.0.
|
|
33
|
+
"vitest": "^5.0.3"
|
|
34
34
|
},
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|