From 0b2b16abcc1ae60db55f15334f896ed87ab8ebc5 Mon Sep 17 00:00:00 2001 From: Baptiste Poulain <64689165+bpoulaindev@users.noreply.github.com> Date: Fri, 22 Mar 2024 14:07:30 +0100 Subject: [PATCH] Fix/postman translation collection variables (#1894) * fix(postman-translation-collectionVariables): auto translate pm.collectionVariables.set and get * fix(postman-translation-collectionVariables) : additional translations, simplify regex, add testing * fix(postman-translation-collectionVariables): update lock file --------- Co-authored-by: bpoulaindev --- package-lock.json | 838 +++++++++--------- .../utils/importers/translators/index.spec.js | 134 +++ .../translators/postman_translation.js | 44 +- 3 files changed, 566 insertions(+), 450 deletions(-) create mode 100644 packages/bruno-app/src/utils/importers/translators/index.spec.js diff --git a/package-lock.json b/package-lock.json index 0e7fe62e7..32d9ee2f1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,7 +36,6 @@ }, "node_modules/@alloc/quick-lru": { "version": "5.2.0", - "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -47,7 +46,6 @@ }, "node_modules/@ampproject/remapping": { "version": "2.2.1", - "dev": true, "license": "Apache-2.0", "dependencies": { "@jridgewell/gen-mapping": "^0.3.0", @@ -414,7 +412,6 @@ }, "node_modules/@babel/compat-data": { "version": "7.23.5", - "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -422,7 +419,6 @@ }, "node_modules/@babel/core": { "version": "7.23.9", - "dev": true, "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", @@ -485,7 +481,6 @@ }, "node_modules/@babel/helper-compilation-targets": { "version": "7.23.6", - "dev": true, "license": "MIT", "dependencies": { "@babel/compat-data": "^7.23.5", @@ -500,7 +495,6 @@ }, "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { "version": "5.1.1", - "dev": true, "license": "ISC", "dependencies": { "yallist": "^3.0.2" @@ -508,7 +502,6 @@ }, "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { "version": "3.1.1", - "dev": true, "license": "ISC" }, "node_modules/@babel/helper-create-class-features-plugin": { @@ -615,7 +608,6 @@ }, "node_modules/@babel/helper-module-transforms": { "version": "7.23.3", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-environment-visitor": "^7.22.20", @@ -683,7 +675,6 @@ }, "node_modules/@babel/helper-simple-access": { "version": "7.22.5", - "dev": true, "license": "MIT", "dependencies": { "@babel/types": "^7.22.5" @@ -729,7 +720,6 @@ }, "node_modules/@babel/helper-validator-option": { "version": "7.23.5", - "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -750,7 +740,6 @@ }, "node_modules/@babel/helpers": { "version": "7.23.9", - "dev": true, "license": "MIT", "dependencies": { "@babel/template": "^7.23.9", @@ -2781,7 +2770,6 @@ }, "node_modules/@isaacs/cliui": { "version": "8.0.2", - "dev": true, "license": "ISC", "dependencies": { "string-width": "^5.1.2", @@ -2797,7 +2785,6 @@ }, "node_modules/@isaacs/cliui/node_modules/ansi-regex": { "version": "6.0.1", - "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -2808,7 +2795,6 @@ }, "node_modules/@isaacs/cliui/node_modules/ansi-styles": { "version": "6.2.1", - "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -2819,12 +2805,10 @@ }, "node_modules/@isaacs/cliui/node_modules/emoji-regex": { "version": "9.2.2", - "dev": true, "license": "MIT" }, "node_modules/@isaacs/cliui/node_modules/string-width": { "version": "5.1.2", - "dev": true, "license": "MIT", "dependencies": { "eastasianwidth": "^0.2.0", @@ -2840,7 +2824,6 @@ }, "node_modules/@isaacs/cliui/node_modules/strip-ansi": { "version": "7.1.0", - "dev": true, "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" @@ -2854,7 +2837,6 @@ }, "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { "version": "8.1.0", - "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^6.1.0", @@ -3883,6 +3865,23 @@ "node": ">=12" } }, + "node_modules/@n8n/vm2": { + "version": "3.9.23", + "resolved": "https://registry.npmjs.org/@n8n/vm2/-/vm2-3.9.23.tgz", + "integrity": "sha512-yu+It+L89uljQsCJ2e9cQaXzoXJe9bU69QQIoWUOcUw0u5Zon37DuB7bdNNsjKS1ZdFD+fBWCQpq/FkqHsSjXQ==", + "peer": true, + "dependencies": { + "acorn": "^8.7.0", + "acorn-walk": "^8.2.0" + }, + "bin": { + "vm2": "bin/vm2" + }, + "engines": { + "node": ">=18.10", + "pnpm": ">=8.6.12" + } + }, "node_modules/@next/env": { "version": "12.3.3", "license": "MIT" @@ -3979,7 +3978,6 @@ }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", - "dev": true, "license": "MIT", "optional": true, "engines": { @@ -4790,6 +4788,17 @@ } } }, + "node_modules/@tailwindcss/forms": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@tailwindcss/forms/-/forms-0.5.7.tgz", + "integrity": "sha512-QE7X69iQI+ZXwldE+rzasvbJiyV/ju1FGHH0Qn2W3FKbuYtqp8LKcy6iSw79fVUT5/Vvf+0XgLCeYVG+UV6hOw==", + "dependencies": { + "mini-svg-data-uri": "^1.2.3" + }, + "peerDependencies": { + "tailwindcss": ">=3.0.0 || >= 3.0.0-alpha.1" + } + }, "node_modules/@tippyjs/react": { "version": "4.2.6", "license": "MIT", @@ -5508,7 +5517,6 @@ }, "node_modules/any-promise": { "version": "1.3.0", - "dev": true, "license": "MIT" }, "node_modules/anymatch": { @@ -5637,7 +5645,6 @@ }, "node_modules/arg": { "version": "5.0.2", - "dev": true, "license": "MIT" }, "node_modules/argparse": { @@ -6376,7 +6383,6 @@ }, "node_modules/browserslist": { "version": "4.22.3", - "dev": true, "funding": [ { "type": "opencollective", @@ -6698,8 +6704,8 @@ }, "node_modules/camelcase-css": { "version": "2.0.1", - "dev": true, - "license": "MIT", + "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", + "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", "engines": { "node": ">= 6" } @@ -7314,7 +7320,6 @@ }, "node_modules/convert-source-map": { "version": "2.0.0", - "dev": true, "license": "MIT" }, "node_modules/cookie": { @@ -7463,7 +7468,6 @@ }, "node_modules/cross-spawn": { "version": "7.0.3", - "dev": true, "license": "MIT", "dependencies": { "path-key": "^3.1.0", @@ -7652,7 +7656,6 @@ }, "node_modules/cssesc": { "version": "3.0.0", - "dev": true, "license": "MIT", "bin": { "cssesc": "bin/cssesc" @@ -7991,7 +7994,6 @@ }, "node_modules/didyoumean": { "version": "1.2.2", - "dev": true, "license": "Apache-2.0" }, "node_modules/diff-sequences": { @@ -8050,7 +8052,6 @@ }, "node_modules/dlv": { "version": "1.1.3", - "dev": true, "license": "MIT" }, "node_modules/dmg-builder": { @@ -8218,7 +8219,6 @@ }, "node_modules/eastasianwidth": { "version": "0.2.0", - "dev": true, "license": "MIT" }, "node_modules/ecc-jsbn": { @@ -8472,7 +8472,6 @@ }, "node_modules/electron-to-chromium": { "version": "1.4.667", - "dev": true, "license": "ISC" }, "node_modules/electron-util": { @@ -9297,7 +9296,6 @@ }, "node_modules/foreground-child": { "version": "3.1.1", - "dev": true, "license": "ISC", "dependencies": { "cross-spawn": "^7.0.0", @@ -9312,7 +9310,6 @@ }, "node_modules/foreground-child/node_modules/signal-exit": { "version": "4.1.0", - "dev": true, "license": "ISC", "engines": { "node": ">=14" @@ -9476,7 +9473,6 @@ }, "node_modules/gensync": { "version": "1.0.0-beta.2", - "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -10713,7 +10709,6 @@ }, "node_modules/is-core-module": { "version": "2.13.1", - "dev": true, "license": "MIT", "dependencies": { "hasown": "^2.0.0" @@ -10970,7 +10965,6 @@ }, "node_modules/isexe": { "version": "2.0.0", - "dev": true, "license": "ISC" }, "node_modules/isobject": { @@ -11096,7 +11090,6 @@ }, "node_modules/jackspeak": { "version": "2.3.6", - "dev": true, "license": "BlueOak-1.0.0", "dependencies": { "@isaacs/cliui": "^8.0.2" @@ -12257,7 +12250,6 @@ }, "node_modules/lilconfig": { "version": "2.1.0", - "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -12814,6 +12806,14 @@ "url": "https://opencollective.com/webpack" } }, + "node_modules/mini-svg-data-uri": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/mini-svg-data-uri/-/mini-svg-data-uri-1.4.4.tgz", + "integrity": "sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg==", + "bin": { + "mini-svg-data-uri": "cli.js" + } + }, "node_modules/minimatch": { "version": "3.1.2", "license": "ISC", @@ -12831,7 +12831,6 @@ }, "node_modules/minipass": { "version": "5.0.0", - "devOptional": true, "license": "ISC", "engines": { "node": ">=8" @@ -12932,7 +12931,6 @@ }, "node_modules/mz": { "version": "2.7.0", - "dev": true, "license": "MIT", "dependencies": { "any-promise": "^1.0.0", @@ -13099,7 +13097,6 @@ }, "node_modules/node-releases": { "version": "2.0.14", - "dev": true, "license": "MIT" }, "node_modules/node-vault": { @@ -13284,6 +13281,14 @@ "node": ">=0.10.0" } }, + "node_modules/object-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", + "engines": { + "node": ">= 6" + } + }, "node_modules/object-inspect": { "version": "1.13.1", "license": "MIT", @@ -13626,7 +13631,6 @@ }, "node_modules/path-key": { "version": "3.1.1", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -13634,12 +13638,10 @@ }, "node_modules/path-parse": { "version": "1.0.7", - "dev": true, "license": "MIT" }, "node_modules/path-scurry": { "version": "1.10.1", - "dev": true, "license": "BlueOak-1.0.0", "dependencies": { "lru-cache": "^9.1.1 || ^10.0.0", @@ -13654,7 +13656,6 @@ }, "node_modules/path-scurry/node_modules/lru-cache": { "version": "10.2.0", - "dev": true, "license": "ISC", "engines": { "node": "14 || >=16.14" @@ -13847,7 +13848,6 @@ }, "node_modules/pirates": { "version": "4.0.6", - "dev": true, "license": "MIT", "engines": { "node": ">= 6" @@ -14013,7 +14013,6 @@ }, "node_modules/postcss": { "version": "8.4.35", - "dev": true, "funding": [ { "type": "opencollective", @@ -14128,7 +14127,6 @@ }, "node_modules/postcss-import": { "version": "15.1.0", - "dev": true, "license": "MIT", "dependencies": { "postcss-value-parser": "^4.0.0", @@ -14142,6 +14140,24 @@ "postcss": "^8.0.0" } }, + "node_modules/postcss-js": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz", + "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==", + "dependencies": { + "camelcase-css": "^2.0.1" + }, + "engines": { + "node": "^12 || ^14 || >= 16" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.4.21" + } + }, "node_modules/postcss-load-config": { "version": "3.1.4", "dev": true, @@ -14335,6 +14351,24 @@ "postcss": "^8.1.0" } }, + "node_modules/postcss-nested": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz", + "integrity": "sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==", + "dependencies": { + "postcss-selector-parser": "^6.0.11" + }, + "engines": { + "node": ">=12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.2.14" + } + }, "node_modules/postcss-normalize-charset": { "version": "5.1.0", "dev": true, @@ -14517,7 +14551,6 @@ }, "node_modules/postcss-selector-parser": { "version": "6.0.15", - "dev": true, "license": "MIT", "dependencies": { "cssesc": "^3.0.0", @@ -14562,7 +14595,6 @@ }, "node_modules/postcss/node_modules/nanoid": { "version": "3.3.7", - "dev": true, "funding": [ { "type": "github", @@ -15190,7 +15222,6 @@ }, "node_modules/read-cache": { "version": "1.0.0", - "dev": true, "license": "MIT", "dependencies": { "pify": "^2.3.0" @@ -15198,7 +15229,6 @@ }, "node_modules/read-cache/node_modules/pify": { "version": "2.3.0", - "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -15680,7 +15710,6 @@ }, "node_modules/resolve": { "version": "1.22.8", - "dev": true, "license": "MIT", "dependencies": { "is-core-module": "^2.13.0", @@ -16053,7 +16082,6 @@ }, "node_modules/semver": { "version": "6.3.1", - "devOptional": true, "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -16236,7 +16264,6 @@ }, "node_modules/shebang-command": { "version": "2.0.0", - "dev": true, "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" @@ -16247,7 +16274,6 @@ }, "node_modules/shebang-regex": { "version": "3.0.0", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -16600,7 +16626,6 @@ "node_modules/string-width-cjs": { "name": "string-width", "version": "4.2.3", - "dev": true, "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", @@ -16643,7 +16668,6 @@ "node_modules/strip-ansi-cjs": { "name": "strip-ansi", "version": "6.0.1", - "dev": true, "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" @@ -16786,7 +16810,6 @@ }, "node_modules/sucrase": { "version": "3.35.0", - "dev": true, "license": "MIT", "dependencies": { "@jridgewell/gen-mapping": "^0.3.2", @@ -16807,7 +16830,6 @@ }, "node_modules/sucrase/node_modules/brace-expansion": { "version": "2.0.1", - "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" @@ -16815,7 +16837,6 @@ }, "node_modules/sucrase/node_modules/commander": { "version": "4.1.1", - "dev": true, "license": "MIT", "engines": { "node": ">= 6" @@ -16823,7 +16844,6 @@ }, "node_modules/sucrase/node_modules/glob": { "version": "10.3.10", - "dev": true, "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", @@ -16844,7 +16864,6 @@ }, "node_modules/sucrase/node_modules/minimatch": { "version": "9.0.3", - "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" @@ -16879,7 +16898,6 @@ }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -17048,6 +17066,117 @@ "jscat": "bundle.js" } }, + "node_modules/tailwindcss": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.1.tgz", + "integrity": "sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA==", + "dependencies": { + "@alloc/quick-lru": "^5.2.0", + "arg": "^5.0.2", + "chokidar": "^3.5.3", + "didyoumean": "^1.2.2", + "dlv": "^1.1.3", + "fast-glob": "^3.3.0", + "glob-parent": "^6.0.2", + "is-glob": "^4.0.3", + "jiti": "^1.19.1", + "lilconfig": "^2.1.0", + "micromatch": "^4.0.5", + "normalize-path": "^3.0.0", + "object-hash": "^3.0.0", + "picocolors": "^1.0.0", + "postcss": "^8.4.23", + "postcss-import": "^15.1.0", + "postcss-js": "^4.0.1", + "postcss-load-config": "^4.0.1", + "postcss-nested": "^6.0.1", + "postcss-selector-parser": "^6.0.11", + "resolve": "^1.22.2", + "sucrase": "^3.32.0" + }, + "bin": { + "tailwind": "lib/cli.js", + "tailwindcss": "lib/cli.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tailwindcss/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/tailwindcss/node_modules/jiti": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz", + "integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==", + "bin": { + "jiti": "bin/jiti.js" + } + }, + "node_modules/tailwindcss/node_modules/postcss-load-config": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz", + "integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "lilconfig": "^3.0.0", + "yaml": "^2.3.4" + }, + "engines": { + "node": ">= 14" + }, + "peerDependencies": { + "postcss": ">=8.0.9", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "postcss": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/tailwindcss/node_modules/postcss-load-config/node_modules/lilconfig": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.1.tgz", + "integrity": "sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ==", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/tailwindcss/node_modules/yaml": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.1.tgz", + "integrity": "sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg==", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/tapable": { "version": "2.2.1", "dev": true, @@ -17219,7 +17348,6 @@ }, "node_modules/thenify": { "version": "3.3.1", - "dev": true, "license": "MIT", "dependencies": { "any-promise": "^1.0.0" @@ -17227,7 +17355,6 @@ }, "node_modules/thenify-all": { "version": "1.6.0", - "dev": true, "license": "MIT", "dependencies": { "thenify": ">= 3.1.0 < 4" @@ -17402,7 +17529,6 @@ }, "node_modules/ts-interface-checker": { "version": "0.1.13", - "dev": true, "license": "Apache-2.0" }, "node_modules/ts-jest": { @@ -17662,7 +17788,6 @@ }, "node_modules/update-browserslist-db": { "version": "1.0.13", - "dev": true, "funding": [ { "type": "opencollective", @@ -18146,7 +18271,6 @@ }, "node_modules/which": { "version": "2.0.2", - "dev": true, "license": "ISC", "dependencies": { "isexe": "^2.0.0" @@ -18206,7 +18330,6 @@ "node_modules/wrap-ansi-cjs": { "name": "wrap-ansi", "version": "7.0.0", - "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", @@ -18416,6 +18539,7 @@ "@fortawesome/react-fontawesome": "^0.1.16", "@reduxjs/toolkit": "^1.8.0", "@tabler/icons": "^1.46.0", + "@tailwindcss/forms": "^0.5.7", "@tippyjs/react": "^4.2.6", "@usebruno/common": "0.1.0", "@usebruno/graphql-docs": "0.1.0", @@ -18496,25 +18620,6 @@ "webpack-cli": "^4.9.1" } }, - "packages/bruno-app/node_modules/glob-parent": { - "version": "6.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "packages/bruno-app/node_modules/jiti": { - "version": "1.21.0", - "dev": true, - "license": "MIT", - "bin": { - "jiti": "bin/jiti.js" - } - }, "packages/bruno-app/node_modules/jsesc": { "version": "3.0.2", "license": "MIT", @@ -18525,139 +18630,6 @@ "node": ">=6" } }, - "packages/bruno-app/node_modules/object-hash": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "packages/bruno-app/node_modules/postcss-js": { - "version": "4.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "camelcase-css": "^2.0.1" - }, - "engines": { - "node": "^12 || ^14 || >= 16" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - "peerDependencies": { - "postcss": "^8.4.21" - } - }, - "packages/bruno-app/node_modules/postcss-load-config": { - "version": "4.0.2", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "lilconfig": "^3.0.0", - "yaml": "^2.3.4" - }, - "engines": { - "node": ">= 14" - }, - "peerDependencies": { - "postcss": ">=8.0.9", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "postcss": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "packages/bruno-app/node_modules/postcss-load-config/node_modules/lilconfig": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/antonk52" - } - }, - "packages/bruno-app/node_modules/postcss-nested": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "postcss-selector-parser": "^6.0.11" - }, - "engines": { - "node": ">=12.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - "peerDependencies": { - "postcss": "^8.2.14" - } - }, - "packages/bruno-app/node_modules/tailwindcss": { - "version": "3.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@alloc/quick-lru": "^5.2.0", - "arg": "^5.0.2", - "chokidar": "^3.5.3", - "didyoumean": "^1.2.2", - "dlv": "^1.1.3", - "fast-glob": "^3.3.0", - "glob-parent": "^6.0.2", - "is-glob": "^4.0.3", - "jiti": "^1.19.1", - "lilconfig": "^2.1.0", - "micromatch": "^4.0.5", - "normalize-path": "^3.0.0", - "object-hash": "^3.0.0", - "picocolors": "^1.0.0", - "postcss": "^8.4.23", - "postcss-import": "^15.1.0", - "postcss-js": "^4.0.1", - "postcss-load-config": "^4.0.1", - "postcss-nested": "^6.0.1", - "postcss-selector-parser": "^6.0.11", - "resolve": "^1.22.2", - "sucrase": "^3.32.0" - }, - "bin": { - "tailwind": "lib/cli.js", - "tailwindcss": "lib/cli.js" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "packages/bruno-app/node_modules/yaml": { - "version": "2.3.4", - "dev": true, - "license": "ISC", - "engines": { - "node": ">= 14" - } - }, "packages/bruno-cli": { "name": "@usebruno/cli", "version": "1.11.0", @@ -20886,12 +20858,10 @@ }, "dependencies": { "@alloc/quick-lru": { - "version": "5.2.0", - "dev": true + "version": "5.2.0" }, "@ampproject/remapping": { "version": "2.2.1", - "dev": true, "requires": { "@jridgewell/gen-mapping": "^0.3.0", "@jridgewell/trace-mapping": "^0.3.9" @@ -21172,12 +21142,10 @@ } }, "@babel/compat-data": { - "version": "7.23.5", - "dev": true + "version": "7.23.5" }, "@babel/core": { "version": "7.23.9", - "dev": true, "requires": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.23.5", @@ -21220,7 +21188,6 @@ }, "@babel/helper-compilation-targets": { "version": "7.23.6", - "dev": true, "requires": { "@babel/compat-data": "^7.23.5", "@babel/helper-validator-option": "^7.23.5", @@ -21231,14 +21198,12 @@ "dependencies": { "lru-cache": { "version": "5.1.1", - "dev": true, "requires": { "yallist": "^3.0.2" } }, "yallist": { - "version": "3.1.1", - "dev": true + "version": "3.1.1" } } }, @@ -21308,7 +21273,6 @@ }, "@babel/helper-module-transforms": { "version": "7.23.3", - "dev": true, "requires": { "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-module-imports": "^7.22.15", @@ -21347,7 +21311,6 @@ }, "@babel/helper-simple-access": { "version": "7.22.5", - "dev": true, "requires": { "@babel/types": "^7.22.5" } @@ -21372,8 +21335,7 @@ "version": "7.22.20" }, "@babel/helper-validator-option": { - "version": "7.23.5", - "dev": true + "version": "7.23.5" }, "@babel/helper-wrap-function": { "version": "7.22.20", @@ -21386,7 +21348,6 @@ }, "@babel/helpers": { "version": "7.23.9", - "dev": true, "requires": { "@babel/template": "^7.23.9", "@babel/traverse": "^7.23.9", @@ -21464,7 +21425,8 @@ }, "@babel/plugin-proposal-private-property-in-object": { "version": "7.21.0-placeholder-for-preset-env.2", - "dev": true + "dev": true, + "requires": {} }, "@babel/plugin-syntax-async-generators": { "version": "7.8.4", @@ -22477,7 +22439,8 @@ "version": "3.0.4" }, "ws": { - "version": "8.13.0" + "version": "8.13.0", + "requires": {} } } }, @@ -22505,7 +22468,8 @@ }, "dependencies": { "ws": { - "version": "8.13.0" + "version": "8.13.0", + "requires": {} } } }, @@ -22629,14 +22593,14 @@ } }, "@graphql-typed-document-node/core": { - "version": "3.2.0" + "version": "3.2.0", + "requires": {} }, "@iarna/toml": { "version": "2.2.5" }, "@isaacs/cliui": { "version": "8.0.2", - "dev": true, "requires": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", @@ -22647,20 +22611,16 @@ }, "dependencies": { "ansi-regex": { - "version": "6.0.1", - "dev": true + "version": "6.0.1" }, "ansi-styles": { - "version": "6.2.1", - "dev": true + "version": "6.2.1" }, "emoji-regex": { - "version": "9.2.2", - "dev": true + "version": "9.2.2" }, "string-width": { "version": "5.1.2", - "dev": true, "requires": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", @@ -22669,14 +22629,12 @@ }, "strip-ansi": { "version": "7.1.0", - "dev": true, "requires": { "ansi-regex": "^6.0.1" } }, "wrap-ansi": { "version": "8.1.0", - "dev": true, "requires": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", @@ -23388,6 +23346,16 @@ "@n1ru4l/push-pull-async-iterable-iterator": { "version": "3.2.0" }, + "@n8n/vm2": { + "version": "3.9.23", + "resolved": "https://registry.npmjs.org/@n8n/vm2/-/vm2-3.9.23.tgz", + "integrity": "sha512-yu+It+L89uljQsCJ2e9cQaXzoXJe9bU69QQIoWUOcUw0u5Zon37DuB7bdNNsjKS1ZdFD+fBWCQpq/FkqHsSjXQ==", + "peer": true, + "requires": { + "acorn": "^8.7.0", + "acorn-walk": "^8.2.0" + } + }, "@next/env": { "version": "12.3.3" }, @@ -23442,7 +23410,6 @@ }, "@pkgjs/parseargs": { "version": "0.11.0", - "dev": true, "optional": true }, "@playwright/test": { @@ -23959,7 +23926,16 @@ } }, "@tabler/icons": { - "version": "1.119.0" + "version": "1.119.0", + "requires": {} + }, + "@tailwindcss/forms": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@tailwindcss/forms/-/forms-0.5.7.tgz", + "integrity": "sha512-QE7X69iQI+ZXwldE+rzasvbJiyV/ju1FGHH0Qn2W3FKbuYtqp8LKcy6iSw79fVUT5/Vvf+0XgLCeYVG+UV6hOw==", + "requires": { + "mini-svg-data-uri": "^1.2.3" + } }, "@tippyjs/react": { "version": "4.2.6", @@ -24217,6 +24193,7 @@ "@fortawesome/react-fontawesome": "^0.1.16", "@reduxjs/toolkit": "^1.8.0", "@tabler/icons": "^1.46.0", + "@tailwindcss/forms": "^0.5.7", "@tippyjs/react": "^4.2.6", "@usebruno/common": "0.1.0", "@usebruno/graphql-docs": "0.1.0", @@ -24290,83 +24267,8 @@ "yup": "^0.32.11" }, "dependencies": { - "glob-parent": { - "version": "6.0.2", - "dev": true, - "requires": { - "is-glob": "^4.0.3" - } - }, - "jiti": { - "version": "1.21.0", - "dev": true - }, "jsesc": { "version": "3.0.2" - }, - "object-hash": { - "version": "3.0.0", - "dev": true - }, - "postcss-js": { - "version": "4.0.1", - "dev": true, - "requires": { - "camelcase-css": "^2.0.1" - } - }, - "postcss-load-config": { - "version": "4.0.2", - "dev": true, - "requires": { - "lilconfig": "^3.0.0", - "yaml": "^2.3.4" - }, - "dependencies": { - "lilconfig": { - "version": "3.1.0", - "dev": true - } - } - }, - "postcss-nested": { - "version": "6.0.1", - "dev": true, - "requires": { - "postcss-selector-parser": "^6.0.11" - } - }, - "tailwindcss": { - "version": "3.4.1", - "dev": true, - "requires": { - "@alloc/quick-lru": "^5.2.0", - "arg": "^5.0.2", - "chokidar": "^3.5.3", - "didyoumean": "^1.2.2", - "dlv": "^1.1.3", - "fast-glob": "^3.3.0", - "glob-parent": "^6.0.2", - "is-glob": "^4.0.3", - "jiti": "^1.19.1", - "lilconfig": "^2.1.0", - "micromatch": "^4.0.5", - "normalize-path": "^3.0.0", - "object-hash": "^3.0.0", - "picocolors": "^1.0.0", - "postcss": "^8.4.23", - "postcss-import": "^15.1.0", - "postcss-js": "^4.0.1", - "postcss-load-config": "^4.0.1", - "postcss-nested": "^6.0.1", - "postcss-selector-parser": "^6.0.11", - "resolve": "^1.22.2", - "sucrase": "^3.32.0" - } - }, - "yaml": { - "version": "2.3.4", - "dev": true } } }, @@ -25312,7 +25214,8 @@ } }, "@usebruno/schema": { - "version": "file:packages/bruno-schema" + "version": "file:packages/bruno-schema", + "requires": {} }, "@usebruno/tests": { "version": "file:packages/bruno-tests", @@ -25456,7 +25359,8 @@ }, "@webpack-cli/configtest": { "version": "1.2.0", - "dev": true + "dev": true, + "requires": {} }, "@webpack-cli/info": { "version": "1.5.0", @@ -25467,7 +25371,8 @@ }, "@webpack-cli/serve": { "version": "1.7.0", - "dev": true + "dev": true, + "requires": {} }, "@whatwg-node/events": { "version": "0.0.3" @@ -25527,7 +25432,8 @@ }, "acorn-import-assertions": { "version": "1.9.0", - "dev": true + "dev": true, + "requires": {} }, "acorn-walk": { "version": "8.3.2" @@ -25569,7 +25475,8 @@ }, "ajv-keywords": { "version": "3.5.2", - "dev": true + "dev": true, + "requires": {} }, "amdefine": { "version": "0.0.8" @@ -25606,8 +25513,7 @@ "dev": true }, "any-promise": { - "version": "1.3.0", - "dev": true + "version": "1.3.0" }, "anymatch": { "version": "3.1.3", @@ -25706,8 +25612,7 @@ } }, "arg": { - "version": "5.0.2", - "dev": true + "version": "5.0.2" }, "argparse": { "version": "2.0.1" @@ -26174,7 +26079,6 @@ }, "browserslist": { "version": "4.22.3", - "dev": true, "requires": { "caniuse-lite": "^1.0.30001580", "electron-to-chromium": "^1.4.648", @@ -27238,7 +27142,8 @@ }, "camelcase-css": { "version": "2.0.1", - "dev": true + "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", + "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==" }, "camelize": { "version": "1.0.1" @@ -27281,7 +27186,8 @@ } }, "chai-string": { - "version": "1.5.0" + "version": "1.5.0", + "requires": {} }, "chalk": { "version": "3.0.0", @@ -27624,8 +27530,7 @@ "version": "1.0.5" }, "convert-source-map": { - "version": "2.0.0", - "dev": true + "version": "2.0.0" }, "cookie": { "version": "0.6.0" @@ -27724,7 +27629,6 @@ }, "cross-spawn": { "version": "7.0.3", - "dev": true, "requires": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -27743,7 +27647,8 @@ }, "css-declaration-sorter": { "version": "6.4.1", - "dev": true + "dev": true, + "requires": {} }, "css-loader": { "version": "6.10.0", @@ -27831,8 +27736,7 @@ "dev": true }, "cssesc": { - "version": "3.0.0", - "dev": true + "version": "3.0.0" }, "cssnano": { "version": "5.1.15", @@ -27880,7 +27784,8 @@ }, "cssnano-utils": { "version": "3.1.0", - "dev": true + "dev": true, + "requires": {} }, "csso": { "version": "4.2.0", @@ -27938,7 +27843,8 @@ }, "dedent": { "version": "1.5.1", - "dev": true + "dev": true, + "requires": {} }, "deep-eql": { "version": "4.1.3", @@ -28024,8 +27930,7 @@ "optional": true }, "didyoumean": { - "version": "1.2.2", - "dev": true + "version": "1.2.2" }, "diff-sequences": { "version": "29.6.3", @@ -28064,8 +27969,7 @@ } }, "dlv": { - "version": "1.1.3", - "dev": true + "version": "1.1.3" }, "dmg-builder": { "version": "23.0.2", @@ -28186,8 +28090,7 @@ "dev": true }, "eastasianwidth": { - "version": "0.2.0", - "dev": true + "version": "0.2.0" }, "ecc-jsbn": { "version": "0.1.2", @@ -28371,8 +28274,7 @@ } }, "electron-to-chromium": { - "version": "1.4.667", - "dev": true + "version": "1.4.667" }, "electron-util": { "version": "0.17.2", @@ -28894,15 +28796,13 @@ }, "foreground-child": { "version": "3.1.1", - "dev": true, "requires": { "cross-spawn": "^7.0.0", "signal-exit": "^4.0.1" }, "dependencies": { "signal-exit": { - "version": "4.1.0", - "dev": true + "version": "4.1.0" } } }, @@ -29003,8 +28903,7 @@ } }, "gensync": { - "version": "1.0.0-beta.2", - "dev": true + "version": "1.0.0-beta.2" }, "get-caller-file": { "version": "2.0.5" @@ -29161,7 +29060,8 @@ } }, "goober": { - "version": "2.1.14" + "version": "2.1.14", + "requires": {} }, "gopd": { "version": "1.0.1", @@ -29329,7 +29229,8 @@ } }, "graphql-ws": { - "version": "5.12.1" + "version": "5.12.1", + "requires": {} }, "handlebars": { "version": "4.7.8", @@ -29601,7 +29502,8 @@ }, "icss-utils": { "version": "5.1.0", - "dev": true + "dev": true, + "requires": {} }, "idb": { "version": "7.1.1" @@ -29755,7 +29657,6 @@ }, "is-core-module": { "version": "2.13.1", - "dev": true, "requires": { "hasown": "^2.0.0" } @@ -29897,14 +29798,14 @@ "dev": true }, "isexe": { - "version": "2.0.0", - "dev": true + "version": "2.0.0" }, "isobject": { "version": "3.0.1" }, "isomorphic-ws": { - "version": "5.0.0" + "version": "5.0.0", + "requires": {} }, "isstream": { "version": "0.1.2" @@ -29977,7 +29878,6 @@ }, "jackspeak": { "version": "2.3.6", - "dev": true, "requires": { "@isaacs/cliui": "^8.0.2", "@pkgjs/parseargs": "^0.11.0" @@ -30277,7 +30177,8 @@ }, "jest-pnp-resolver": { "version": "1.2.3", - "dev": true + "dev": true, + "requires": {} }, "jest-regex-util": { "version": "29.6.3", @@ -30763,8 +30664,7 @@ "dev": true }, "lilconfig": { - "version": "2.1.0", - "dev": true + "version": "2.1.0" }, "lines-and-columns": { "version": "1.2.4" @@ -31016,7 +30916,8 @@ "version": "1.0.1" }, "merge-refs": { - "version": "1.2.2" + "version": "1.2.2", + "requires": {} }, "merge-stream": { "version": "2.0.0", @@ -31026,7 +30927,8 @@ "version": "1.4.1" }, "meros": { - "version": "1.3.0" + "version": "1.3.0", + "requires": {} }, "methods": { "version": "1.1.2" @@ -31106,6 +31008,11 @@ } } }, + "mini-svg-data-uri": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/mini-svg-data-uri/-/mini-svg-data-uri-1.4.4.tgz", + "integrity": "sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg==" + }, "minimatch": { "version": "3.1.2", "requires": { @@ -31117,8 +31024,7 @@ "dev": true }, "minipass": { - "version": "5.0.0", - "devOptional": true + "version": "5.0.0" }, "minizlib": { "version": "2.1.2", @@ -31181,7 +31087,6 @@ }, "mz": { "version": "2.7.0", - "dev": true, "requires": { "any-promise": "^1.0.0", "object-assign": "^4.0.1", @@ -31273,8 +31178,7 @@ "version": "1.1.12" }, "node-releases": { - "version": "2.0.14", - "dev": true + "version": "2.0.14" }, "node-vault": { "version": "0.10.2", @@ -31392,6 +31296,11 @@ "object-assign": { "version": "4.1.1" }, + "object-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==" + }, "object-inspect": { "version": "1.13.1" }, @@ -31606,24 +31515,20 @@ "dev": true }, "path-key": { - "version": "3.1.1", - "dev": true + "version": "3.1.1" }, "path-parse": { - "version": "1.0.7", - "dev": true + "version": "1.0.7" }, "path-scurry": { "version": "1.10.1", - "dev": true, "requires": { "lru-cache": "^9.1.1 || ^10.0.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "dependencies": { "lru-cache": { - "version": "10.2.0", - "dev": true + "version": "10.2.0" } } }, @@ -31751,8 +31656,7 @@ } }, "pirates": { - "version": "4.0.6", - "dev": true + "version": "4.0.6" }, "pixelmatch": { "version": "4.0.2", @@ -31846,7 +31750,6 @@ }, "postcss": { "version": "8.4.35", - "dev": true, "requires": { "nanoid": "^3.3.7", "picocolors": "^1.0.0", @@ -31854,8 +31757,7 @@ }, "dependencies": { "nanoid": { - "version": "3.3.7", - "dev": true + "version": "3.3.7" } } }, @@ -31887,29 +31789,40 @@ }, "postcss-discard-comments": { "version": "5.1.2", - "dev": true + "dev": true, + "requires": {} }, "postcss-discard-duplicates": { "version": "5.1.0", - "dev": true + "dev": true, + "requires": {} }, "postcss-discard-empty": { "version": "5.1.1", - "dev": true + "dev": true, + "requires": {} }, "postcss-discard-overridden": { "version": "5.1.0", - "dev": true + "dev": true, + "requires": {} }, "postcss-import": { "version": "15.1.0", - "dev": true, "requires": { "postcss-value-parser": "^4.0.0", "read-cache": "^1.0.0", "resolve": "^1.1.7" } }, + "postcss-js": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz", + "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==", + "requires": { + "camelcase-css": "^2.0.1" + } + }, "postcss-load-config": { "version": "3.1.4", "dev": true, @@ -31984,7 +31897,8 @@ }, "postcss-modules-extract-imports": { "version": "3.0.0", - "dev": true + "dev": true, + "requires": {} }, "postcss-modules-local-by-default": { "version": "4.0.4", @@ -32009,9 +31923,18 @@ "icss-utils": "^5.0.0" } }, + "postcss-nested": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz", + "integrity": "sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==", + "requires": { + "postcss-selector-parser": "^6.0.11" + } + }, "postcss-normalize-charset": { "version": "5.1.0", - "dev": true + "dev": true, + "requires": {} }, "postcss-normalize-display-values": { "version": "5.1.0", @@ -32102,7 +32025,6 @@ }, "postcss-selector-parser": { "version": "6.0.15", - "dev": true, "requires": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -32450,7 +32372,8 @@ } }, "react-inspector": { - "version": "6.0.2" + "version": "6.0.2", + "requires": {} }, "react-is": { "version": "16.13.1" @@ -32494,14 +32417,12 @@ }, "read-cache": { "version": "1.0.0", - "dev": true, "requires": { "pify": "^2.3.0" }, "dependencies": { "pify": { - "version": "2.3.0", - "dev": true + "version": "2.3.0" } } }, @@ -32600,7 +32521,8 @@ } }, "redux-thunk": { - "version": "2.4.2" + "version": "2.4.2", + "requires": {} }, "regenerate": { "version": "1.4.2", @@ -32835,7 +32757,6 @@ }, "resolve": { "version": "1.22.8", - "dev": true, "requires": { "is-core-module": "^2.13.0", "path-parse": "^1.0.7", @@ -32919,7 +32840,8 @@ }, "rollup-plugin-peer-deps-external": { "version": "2.2.4", - "dev": true + "dev": true, + "requires": {} }, "rollup-plugin-postcss": { "version": "4.0.2", @@ -33061,8 +32983,7 @@ } }, "semver": { - "version": "6.3.1", - "devOptional": true + "version": "6.3.1" }, "semver-compare": { "version": "1.0.0", @@ -33190,14 +33111,12 @@ }, "shebang-command": { "version": "2.0.0", - "dev": true, "requires": { "shebang-regex": "^3.0.0" } }, "shebang-regex": { - "version": "3.0.0", - "dev": true + "version": "3.0.0" }, "side-channel": { "version": "1.0.5", @@ -33425,7 +33344,6 @@ }, "string-width-cjs": { "version": "npm:string-width@4.2.3", - "dev": true, "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -33453,7 +33371,6 @@ }, "strip-ansi-cjs": { "version": "npm:strip-ansi@6.0.1", - "dev": true, "requires": { "ansi-regex": "^5.0.1" } @@ -33478,7 +33395,8 @@ }, "style-loader": { "version": "3.3.4", - "dev": true + "dev": true, + "requires": {} }, "style-mod": { "version": "4.1.0" @@ -33510,7 +33428,8 @@ } }, "styled-jsx": { - "version": "5.0.7" + "version": "5.0.7", + "requires": {} }, "stylehacks": { "version": "5.1.1", @@ -33522,7 +33441,6 @@ }, "sucrase": { "version": "3.35.0", - "dev": true, "requires": { "@jridgewell/gen-mapping": "^0.3.2", "commander": "^4.0.0", @@ -33535,18 +33453,15 @@ "dependencies": { "brace-expansion": { "version": "2.0.1", - "dev": true, "requires": { "balanced-match": "^1.0.0" } }, "commander": { - "version": "4.1.1", - "dev": true + "version": "4.1.1" }, "glob": { "version": "10.3.10", - "dev": true, "requires": { "foreground-child": "^3.1.0", "jackspeak": "^2.3.5", @@ -33557,7 +33472,6 @@ }, "minimatch": { "version": "9.0.3", - "dev": true, "requires": { "brace-expansion": "^2.0.1" } @@ -33578,8 +33492,7 @@ } }, "supports-preserve-symlinks-flag": { - "version": "1.0.0", - "dev": true + "version": "1.0.0" }, "svg2png": { "version": "4.1.1", @@ -33697,6 +33610,71 @@ "system": { "version": "2.0.1" }, + "tailwindcss": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.1.tgz", + "integrity": "sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA==", + "requires": { + "@alloc/quick-lru": "^5.2.0", + "arg": "^5.0.2", + "chokidar": "^3.5.3", + "didyoumean": "^1.2.2", + "dlv": "^1.1.3", + "fast-glob": "^3.3.0", + "glob-parent": "^6.0.2", + "is-glob": "^4.0.3", + "jiti": "^1.19.1", + "lilconfig": "^2.1.0", + "micromatch": "^4.0.5", + "normalize-path": "^3.0.0", + "object-hash": "^3.0.0", + "picocolors": "^1.0.0", + "postcss": "^8.4.23", + "postcss-import": "^15.1.0", + "postcss-js": "^4.0.1", + "postcss-load-config": "^4.0.1", + "postcss-nested": "^6.0.1", + "postcss-selector-parser": "^6.0.11", + "resolve": "^1.22.2", + "sucrase": "^3.32.0" + }, + "dependencies": { + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "requires": { + "is-glob": "^4.0.3" + } + }, + "jiti": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz", + "integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==" + }, + "postcss-load-config": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz", + "integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==", + "requires": { + "lilconfig": "^3.0.0", + "yaml": "^2.3.4" + }, + "dependencies": { + "lilconfig": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.1.tgz", + "integrity": "sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ==" + } + } + }, + "yaml": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.1.tgz", + "integrity": "sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg==" + } + } + }, "tapable": { "version": "2.2.1", "dev": true @@ -33803,14 +33781,12 @@ }, "thenify": { "version": "3.3.1", - "dev": true, "requires": { "any-promise": "^1.0.0" } }, "thenify-all": { "version": "1.6.0", - "dev": true, "requires": { "thenify": ">= 3.1.0 < 4" } @@ -33925,8 +33901,7 @@ } }, "ts-interface-checker": { - "version": "0.1.13", - "dev": true + "version": "0.1.13" }, "ts-jest": { "version": "29.1.2", @@ -34061,7 +34036,6 @@ }, "update-browserslist-db": { "version": "1.0.13", - "dev": true, "requires": { "escalade": "^3.1.1", "picocolors": "^1.0.0" @@ -34151,7 +34125,8 @@ "version": "8.0.2" }, "use-sync-external-store": { - "version": "1.2.0" + "version": "1.2.0", + "requires": {} }, "utf8-byte-length": { "version": "1.0.4", @@ -34373,7 +34348,6 @@ }, "which": { "version": "2.0.2", - "dev": true, "requires": { "isexe": "^2.0.0" } @@ -34413,7 +34387,6 @@ }, "wrap-ansi-cjs": { "version": "npm:wrap-ansi@7.0.0", - "dev": true, "requires": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -34432,7 +34405,8 @@ } }, "ws": { - "version": "8.16.0" + "version": "8.16.0", + "requires": {} }, "xdg-basedir": { "version": "4.0.0", diff --git a/packages/bruno-app/src/utils/importers/translators/index.spec.js b/packages/bruno-app/src/utils/importers/translators/index.spec.js new file mode 100644 index 000000000..bbe82bcb5 --- /dev/null +++ b/packages/bruno-app/src/utils/importers/translators/index.spec.js @@ -0,0 +1,134 @@ +const { postmanTranslation } = require('./postman_translation'); // Adjust path as needed + +describe('postmanTranslation function', () => { + test('should translate pm commands correctly', () => { + const inputScript = ` + pm.environment.get('key'); + pm.environment.set('key', 'value'); + pm.variables.get('key'); + pm.variables.set('key', 'value'); + pm.collectionVariables.get('key'); + pm.collectionVariables.set('key', 'value'); + `; + const expectedOutput = ` + bru.getEnvVar('key'); + bru.setEnvVar('key', 'value'); + bru.getVar('key'); + bru.setVar('key', 'value'); + bru.getVar('key'); + bru.setVar('key', 'value'); + `; + expect(postmanTranslation(inputScript)).toBe(expectedOutput); + }); + + test('should not translate non-pm commands', () => { + const inputScript = ` + console.log('This script does not contain pm commands.'); + const data = pm.environment.get('key'); + pm.collectionVariables.set('key', data); + `; + const expectedOutput = ` + console.log('This script does not contain pm commands.'); + const data = bru.getEnvVar('key'); + bru.setVar('key', data); + `; + expect(postmanTranslation(inputScript)).toBe(expectedOutput); + }); + + test('should comment non-translated pm commands', () => { + const inputScript = "pm.test('random test', () => pm.response.json());"; + const expectedOutput = "// test('random test', () => pm.response.json());"; + expect(postmanTranslation(inputScript)).toBe(expectedOutput); + }); + test('should handle multiple pm commands on the same line', () => { + const inputScript = "pm.environment.get('key'); pm.environment.set('key', 'value');"; + const expectedOutput = "bru.getEnv(var); bru.setEnvVar(var, 'value');"; + }); + test('should handle comments and other JavaScript code', () => { + const inputScript = ` + // This is a comment + const value = 'test'; + pm.environment.set('key', value); + /* + Multi-line comment + */ + const result = pm.environment.get('key'); + console.log('Result:', result); + `; + const expectedOutput = ` + // This is a comment + const value = 'test'; + bru.setEnvVar('key', value); + /* + Multi-line comment + */ + const result = bru.getEnvVar('key'); + console.log('Result:', result); + `; + expect(postmanTranslation(inputScript)).toBe(expectedOutput); + }); + + test('should handle nested commands and edge cases', () => { + const inputScript = ` + const sampleObjects = [ + { + key: pm.environment.get('key'), + value: pm.variables.get('value') + }, + { + key: pm.collectionVariables.get('key'), + value: pm.collectionVariables.get('value') + } + ]; + const dataTesting = Object.entries(sampleObjects || {}).reduce((acc, [key, value]) => { + // this is a comment + acc[key] = pm.collectionVariables.get(pm.environment.get(value)); + return acc; // Return the accumulator + }, {}); + Object.values(dataTesting).forEach((data) => { + pm.environment.set(data.key, pm.variables.get(data.value)); + }); + `; + const expectedOutput = ` + const sampleObjects = [ + { + key: bru.getEnvVar('key'), + value: bru.getVar('value') + }, + { + key: bru.getVar('key'), + value: bru.getVar('value') + } + ]; + const dataTesting = Object.entries(sampleObjects || {}).reduce((acc, [key, value]) => { + // this is a comment + acc[key] = bru.getVar(bru.getEnvVar(value)); + return acc; // Return the accumulator + }, {}); + Object.values(dataTesting).forEach((data) => { + bru.setEnvVar(data.key, bru.getVar(data.value)); + }); + `; + expect(postmanTranslation(inputScript)).toBe(expectedOutput); + }); + + test('should handle test commands', () => { + const inputScript = ` + pm.test('Status code is 200', () => { + pm.response.to.have.status(200); + }); + pm.test('this test will fail', () => { + return false + }); + `; + const expectedOutput = ` + test('Status code is 200', () => { + expect(res.getStatus()).to.equal(200); + }); + test('this test will fail', () => { + return false + }); + `; + expect(postmanTranslation(inputScript)).toBe(expectedOutput); + }); +}); diff --git a/packages/bruno-app/src/utils/importers/translators/postman_translation.js b/packages/bruno-app/src/utils/importers/translators/postman_translation.js index 8d53d72e8..95f906516 100644 --- a/packages/bruno-app/src/utils/importers/translators/postman_translation.js +++ b/packages/bruno-app/src/utils/importers/translators/postman_translation.js @@ -1,27 +1,35 @@ const replacements = { - 'pm\\.environment\\.get\\(([\'"])([^\'"]*)\\1\\)': 'bru.getEnvVar($1$2$1)', - 'pm\\.environment\\.set\\(([\'"])([^\'"]*)\\1, ([\'"])([^\'"]*)\\3\\)': 'bru.setEnvVar($1$2$1, $3$4$3)', - 'pm\\.variables\\.get\\(([\'"])([^\'"]*)\\1\\)': 'bru.getVar($1$2$1)', - 'pm\\.variables\\.set\\(([\'"])([^\'"]*)\\1, ([\'"])([^\'"]*)\\3\\)': 'bru.setVar($1$2$1, $3$4$3)' + 'pm\\.environment\\.get\\(': 'bru.getEnvVar(', + 'pm\\.environment\\.set\\(': 'bru.setEnvVar(', + 'pm\\.variables\\.get\\(': 'bru.getVar(', + 'pm\\.variables\\.set\\(': 'bru.setVar(', + 'pm\\.collectionVariables\\.get\\(': 'bru.getVar(', + 'pm\\.collectionVariables\\.set\\(': 'bru.setVar(', + 'pm\\.setNextRequest\\(': 'bru.setNextRequest(', + 'pm\\.test\\(': 'test(', + 'pm.response.to.have\\.status\\(': 'expect(res.getStatus()).to.equal(' }; +const compiledReplacements = Object.entries(replacements).map(([pattern, replacement]) => ({ + regex: new RegExp(pattern, 'g'), + replacement +})); + export const postmanTranslation = (script) => { try { - const modifiedScript = Object.entries(replacements || {}) - .map(([pattern, replacement]) => { - const regex = new RegExp(pattern, 'g'); - return script?.replace(regex, replacement); - }) - .find((modified) => modified !== script); - if (modifiedScript) { - // translation successful - return modifiedScript; - } else { - // non-translatable script - return script?.includes('pm.') ? `// ${script}` : script; + let modifiedScript = script; + let modified = false; + for (const { regex, replacement } of compiledReplacements) { + if (regex.test(modifiedScript)) { + modifiedScript = modifiedScript.replace(regex, replacement); + modified = true; + } } + if (modified && modifiedScript.includes('pm.')) { + modifiedScript = modifiedScript.replace(/^(.*pm\..*)$/gm, '// $1'); + } + return modifiedScript; } catch (e) { - // non-translatable script - return script?.includes('pm.') ? `// ${script}` : script; + return script; } };