Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace recursive variables #1173

Closed

Conversation

survivant
Copy link
Contributor

Description

We can see here that the variables were replaced in the URL
image

Contribution Checklist:

  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

@survivant
Copy link
Contributor Author

but I have this when trying to parse the response

Error occurred in handler for 'send-http-request': 
TypeError: Cannot read properties of undefined (reading 'text') at eval (eval at compileJsExpression (F:\dev\bruno-clone\bruno\packages\bruno-js\src\utils.js:50:10), <anonymous>:3:47) at evaluateJsExpression (F:\dev\bruno-clone\bruno\packages\bruno-js\src\utils.js:60:10) at F:\dev\bruno-clone\bruno\packages\bruno-js\src\runtime\vars-runtime.js:60:21 at arrayEach (F:\dev\bruno-clone\bruno\node_modules\lodash\lodash.js:530:11) at Function.forEach (F:\dev\bruno-clone\bruno\node_modules\lodash\lodash.js:9410:14) at VarsRuntime.runPostResponseVars (F:\dev\bruno-clone\bruno\packages\bruno-js\src\runtime\vars-runtime.js:59:7) at runPostResponse (F:\dev\bruno-clone\bruno\packages\bruno-electron\src\ipc\network\index.js:317:34) at F:\dev\bruno-clone\bruno\packages\bruno-electron\src\ipc\network\index.js:487:13 at process.processTicksAndRejections (node:internal/process/task_queues:96:5) at async node:electron/js2c/browser_init:193:551 {stack: "TypeError: Cannot read properties of undefined (re… at async node:electron/js2c/browser_init:193:551", message: "Cannot read properties of undefined (reading 'text')"}````

@conor-carville
Copy link

Can this be merged? I am facing the same issue

@helloanoop
Copy link
Contributor

Closing this PR as Bruno now supports recursive variables.
We have also moved the interpolation logic across the entire app to here: https://github.com/usebruno/bruno/tree/main/packages/bruno-common/src/interpolate
Interpolation spec: https://github.com/usebruno/bruno/blob/main/packages/bruno-common/src/interpolate/index.spec.ts

@helloanoop helloanoop closed this Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants