diff --git a/package-lock.json b/package-lock.json index 19218301708..8ac520b30fc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22882,7 +22882,7 @@ } }, "packages/insomnia": { - "version": "10.2.0", + "version": "10.2.1-beta.1", "license": "Apache-2.0", "dependencies": { "@apideck/better-ajv-errors": "^0.3.6", @@ -23035,7 +23035,7 @@ } }, "packages/insomnia-inso": { - "version": "10.2.0", + "version": "10.2.1-beta.1", "license": "Apache-2.0", "dependencies": { "@seald-io/nedb": "^4.0.4", @@ -23068,7 +23068,7 @@ "license": "MIT" }, "packages/insomnia-sdk": { - "version": "10.2.0", + "version": "10.2.1-beta.1", "license": "Apache-2.0", "dependencies": { "@types/deep-equal": "^1.0.4", @@ -23120,7 +23120,7 @@ } }, "packages/insomnia-smoke-test": { - "version": "10.2.0", + "version": "10.2.1-beta.1", "license": "Apache-2.0", "devDependencies": { "@grpc/grpc-js": "^1.12.00", @@ -23148,7 +23148,7 @@ } }, "packages/insomnia-testing": { - "version": "10.2.0", + "version": "10.2.1-beta.1", "license": "Apache-2.0" } } diff --git a/packages/insomnia-inso/package.json b/packages/insomnia-inso/package.json index ff52a7a06a6..18d0c3cba99 100644 --- a/packages/insomnia-inso/package.json +++ b/packages/insomnia-inso/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "insomnia-inso", - "version": "10.2.0", + "version": "10.2.1-beta.1", "homepage": "https://insomnia.rest", "description": "A CLI for Insomnia - The Collaborative API Design Tool", "author": "Kong ", diff --git a/packages/insomnia-sdk/package.json b/packages/insomnia-sdk/package.json index f571b120128..25dc8f4d83a 100644 --- a/packages/insomnia-sdk/package.json +++ b/packages/insomnia-sdk/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "insomnia-sdk", - "version": "10.2.0", + "version": "10.2.1-beta.1", "description": "", "main": "src/objects/index.ts", "types": "src/objects/index.ts", diff --git a/packages/insomnia-smoke-test/fixtures/simple.yaml b/packages/insomnia-smoke-test/fixtures/simple.yaml index 068f71ae297..4f6fbb2367b 100644 --- a/packages/insomnia-smoke-test/fixtures/simple.yaml +++ b/packages/insomnia-smoke-test/fixtures/simple.yaml @@ -24,6 +24,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request + preRequestScript: |- + console.log('executing pre-request script'); - _id: fld_01de564274824ecaad272330339ea6b2 parentId: wrk_0702a57d75d44255a8cecd2c5fa87809 modified: 1668533312225 @@ -101,6 +103,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request + preRequestScript: |- + console.log('executing pre-request script'); - _id: req_579daeabc7534a52b242bdaaaf6ca4dc parentId: wrk_0702a57d75d44255a8cecd2c5fa87809 modified: 1666867670885 @@ -122,6 +126,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request + preRequestScript: |- + console.log('executing pre-request script'); - _id: env_42a94488fcd6106a75fb3ededd6bb4fbd267aa95 parentId: wrk_0702a57d75d44255a8cecd2c5fa87809 modified: 1666867924188 diff --git a/packages/insomnia-smoke-test/package.json b/packages/insomnia-smoke-test/package.json index 759129355b1..387d6435b44 100644 --- a/packages/insomnia-smoke-test/package.json +++ b/packages/insomnia-smoke-test/package.json @@ -11,7 +11,7 @@ "bugs": { "url": "https://github.com/kong/insomnia/issues" }, - "version": "10.2.0", + "version": "10.2.1-beta.1", "scripts": { "test:dev": "xvfb-maybe cross-env BUNDLE=dev playwright test", "test:build": "xvfb-maybe cross-env BUNDLE=build playwright test", diff --git a/packages/insomnia-testing/package.json b/packages/insomnia-testing/package.json index 18ce16c516c..87e183ea80e 100644 --- a/packages/insomnia-testing/package.json +++ b/packages/insomnia-testing/package.json @@ -2,7 +2,7 @@ "private": true, "name": "insomnia-testing", "license": "Apache-2.0", - "version": "10.2.0", + "version": "10.2.1-beta.1", "author": "Kong ", "repository": { "type": "git", diff --git a/packages/insomnia/package.json b/packages/insomnia/package.json index c7dd05a910b..287594ea02b 100644 --- a/packages/insomnia/package.json +++ b/packages/insomnia/package.json @@ -1,6 +1,6 @@ { "name": "insomnia", - "version": "10.2.0", + "version": "10.2.1-beta.1", "productName": "Insomnia", "private": true, "description": "The Collaborative API Design Tool", diff --git a/packages/insomnia/src/common/send-request.ts b/packages/insomnia/src/common/send-request.ts index 9f2e7329d3f..d6ae1755f54 100644 --- a/packages/insomnia/src/common/send-request.ts +++ b/packages/insomnia/src/common/send-request.ts @@ -1,3 +1,4 @@ +import fs from 'fs/promises'; import path from 'path'; import { type BaseModel, types as modelTypes } from '../models'; @@ -122,6 +123,7 @@ export async function getSendRequestCallbackMemDb(environmentId: string, memDB: return async function sendRequest(requestId: string, iteration?: number) { const requestData = await fetchInsoRequestData(requestId, environmentId); const getCurrentRowOfIterationData = wrapAroundIterationOverIterationData(iterationData, iteration); + await fs.mkdir(path.dirname(requestData.timelinePath), { recursive: true }); const mutatedContext = await tryToExecutePreRequestScript(requestData, transientVariables, getCurrentRowOfIterationData, iteration, iterationCount); if (mutatedContext === null) {