Comparing version
{ | ||
"name": "postwright", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Convert Postman Collections to Playwright scripts", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -158,2 +158,5 @@ const fs = require("fs").promises; | ||
// Check if url and url.raw exist before using it | ||
const requestUrl = url && url.raw ? replaceVariables(url.raw) : "undefined_url"; | ||
const relativePath = path.relative(folderPath, outputDir).replace(/\\/g, "/"); | ||
@@ -172,5 +175,3 @@ const variablesImport = relativePath | ||
const response = await request.${method.toLowerCase()}('${replaceVariables( | ||
url.raw | ||
)}'${ | ||
const response = await request.${method.toLowerCase()}('${requestUrl}'${ | ||
Object.keys(requestOptions).length > 0 | ||
@@ -186,2 +187,3 @@ ? `, ${JSON.stringify(requestOptions, null, 2)}` | ||
async function processItem(item, parentPath = "", outputDir) { | ||
@@ -188,0 +190,0 @@ if (!outputDir) { |
107936
0.11%