mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-05 02:18:32 +00:00
Compare commits
3 Commits
bugfix/inc
...
copilot/fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4acffefb70 | ||
|
|
b496ebc0ce | ||
|
|
a990b96916 |
182
package-lock.json
generated
182
package-lock.json
generated
@@ -1610,7 +1610,7 @@
|
||||
"version": "7.26.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.26.3.tgz",
|
||||
"integrity": "sha512-G7ZRb40uUgdKOQqPLjfD12ZmGA54PzqDFUv2BKImnC9QIfGhIHKvVML0oN8IUiDq4iRqpq74ABpvOaerfWdong==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-annotate-as-pure": "^7.25.9",
|
||||
@@ -1628,7 +1628,7 @@
|
||||
"version": "0.6.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.3.tgz",
|
||||
"integrity": "sha512-HK7Bi+Hj6H+VTHA3ZvBis7V/6hu9QuTrnMXNybfUf2iiuU/N97I8VjB+KbhFF8Rld/Lx5MzoCwPCpPjfK+n8Cg==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-compilation-targets": "^7.22.6",
|
||||
@@ -1645,7 +1645,7 @@
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
|
||||
"integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ms": "^2.1.3"
|
||||
@@ -1663,7 +1663,7 @@
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@babel/helper-member-expression-to-functions": {
|
||||
@@ -1734,7 +1734,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.25.9.tgz",
|
||||
"integrity": "sha512-IZtukuUeBbhgOcaW2s06OXTzVNJR0ybm4W5xC1opWFFJMZbwRj5LCk+ByYH7WdZPZTt8KnFwA8pvjN2yqcPlgw==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-annotate-as-pure": "^7.25.9",
|
||||
@@ -1809,7 +1809,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.25.9.tgz",
|
||||
"integrity": "sha512-ETzz9UTjQSTmw39GboatdymDq4XIQbR8ySgVrylRhPOFpsd+JrKHIuF0de7GCWmem+T4uC5z7EZguod7Wj4A4g==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/template": "^7.25.9",
|
||||
@@ -1852,7 +1852,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.25.9.tgz",
|
||||
"integrity": "sha512-ZkRyVkThtxQ/J6nv3JFYv1RYY+JT5BvU0y3k5bWrmuG4woXypRa4PXmm9RhOwodRkYFWqC0C0cqcJ4OqR7kW+g==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9",
|
||||
@@ -1869,7 +1869,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-class-field-initializer-scope/-/plugin-bugfix-safari-class-field-initializer-scope-7.25.9.tgz",
|
||||
"integrity": "sha512-MrGRLZxLD/Zjj0gdU15dfs+HH/OXvnw/U4jJD8vpcP2CJQapPEv1IWwjc/qMg7ItBlPwSv1hRBbb7LeuANdcnw==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
@@ -1885,7 +1885,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.25.9.tgz",
|
||||
"integrity": "sha512-2qUwwfAFpJLZqxd02YW9btUCZHl+RFvdDkNfZwaIJrvB8Tesjsk8pEQkTvGwZXLqXUx/2oyY3ySRhm6HOXuCug==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
@@ -1901,7 +1901,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.25.9.tgz",
|
||||
"integrity": "sha512-6xWgLZTJXwilVjlnV7ospI3xi+sl8lN8rXXbBD6vYn3UYDlGsag8wrZkKcSI8G6KgqKP7vNFaDgeDnfAABq61g==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9",
|
||||
@@ -1919,7 +1919,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.25.9.tgz",
|
||||
"integrity": "sha512-aLnMXYPnzwwqhYSCyXfKkIkYgJ8zv9RK+roo9DkTXz38ynIhd9XCbN08s3MGvqL2MYGVUGdRQLL/JqBIeJhJBg==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9",
|
||||
@@ -1954,7 +1954,7 @@
|
||||
"version": "7.21.0-placeholder-for-preset-env.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz",
|
||||
"integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
@@ -2053,7 +2053,7 @@
|
||||
"version": "7.26.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.26.0.tgz",
|
||||
"integrity": "sha512-QCWT5Hh830hK5EQa7XzuqIkQU9tT/whqbDz7kuaZMHFl1inRRg7JnuAEOQ0Ur0QUl0NufCk1msK2BeY79Aj/eg==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
@@ -2069,7 +2069,7 @@
|
||||
"version": "7.26.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz",
|
||||
"integrity": "sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
@@ -2251,7 +2251,7 @@
|
||||
"version": "7.18.6",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz",
|
||||
"integrity": "sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-create-regexp-features-plugin": "^7.18.6",
|
||||
@@ -2268,7 +2268,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.25.9.tgz",
|
||||
"integrity": "sha512-6jmooXYIwn9ca5/RylZADJ+EnSxVUS5sjeJ9UPk6RWRzXCmOJCy6dqItPJFpw2cuCangPK4OYr5uhGKcmrm5Qg==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
@@ -2284,7 +2284,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.25.9.tgz",
|
||||
"integrity": "sha512-RXV6QAzTBbhDMO9fWwOmwwTuYaiPbggWQ9INdZqAYeSHyG7FzQ+nOZaUUjNwKv9pV3aE4WFqFm1Hnbci5tBCAw==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9",
|
||||
@@ -2302,7 +2302,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.25.9.tgz",
|
||||
"integrity": "sha512-NT7Ejn7Z/LjUH0Gv5KsBCxh7BH3fbLTV0ptHvpeMvrt3cPThHfJfst9Wrb7S8EvJ7vRTFI7z+VAvFVEQn/m5zQ==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-module-imports": "^7.25.9",
|
||||
@@ -2320,7 +2320,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.25.9.tgz",
|
||||
"integrity": "sha512-toHc9fzab0ZfenFpsyYinOX0J/5dgJVA2fm64xPewu7CoYHWEivIWKxkK2rMi4r3yQqLnVmheMXRdG+k239CgA==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
@@ -2336,7 +2336,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.25.9.tgz",
|
||||
"integrity": "sha512-1F05O7AYjymAtqbsFETboN1NvBdcnzMerO+zlMyJBEz6WkMdejvGWw9p05iTSjC85RLlBseHHQpYaM4gzJkBGg==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
@@ -2368,7 +2368,7 @@
|
||||
"version": "7.26.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.26.0.tgz",
|
||||
"integrity": "sha512-6J2APTs7BDDm+UMqP1useWqhcRAXo0WIoVj26N7kPFB6S73Lgvyka4KTZYIxtgYXiN5HTyRObA72N2iu628iTQ==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-create-class-features-plugin": "^7.25.9",
|
||||
@@ -2385,7 +2385,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.25.9.tgz",
|
||||
"integrity": "sha512-mD8APIXmseE7oZvZgGABDyM34GUmK45Um2TXiBUt7PnuAxrgoSVf123qUzPxEr/+/BHrRn5NMZCdE2m/1F8DGg==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-annotate-as-pure": "^7.25.9",
|
||||
@@ -2406,7 +2406,7 @@
|
||||
"version": "11.12.0",
|
||||
"resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
|
||||
"integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
@@ -2416,7 +2416,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.25.9.tgz",
|
||||
"integrity": "sha512-HnBegGqXZR12xbcTHlJ9HGxw1OniltT26J5YpfruGqtUHlz/xKf/G2ak9e+t0rVqrjXa9WOhvYPz1ERfMj23AA==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9",
|
||||
@@ -2433,7 +2433,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.25.9.tgz",
|
||||
"integrity": "sha512-WkCGb/3ZxXepmMiX101nnGiU+1CAdut8oHyEOHxkKuS1qKpU2SMXE2uSvfz8PBuLd49V6LEsbtyPhWC7fnkgvQ==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
@@ -2449,7 +2449,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.25.9.tgz",
|
||||
"integrity": "sha512-t7ZQ7g5trIgSRYhI9pIJtRl64KHotutUJsh4Eze5l7olJv+mRSg4/MmbZ0tv1eeqRbdvo/+trvJD/Oc5DmW2cA==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-create-regexp-features-plugin": "^7.25.9",
|
||||
@@ -2466,7 +2466,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.25.9.tgz",
|
||||
"integrity": "sha512-LZxhJ6dvBb/f3x8xwWIuyiAHy56nrRG3PeYTpBkkzkYRRQ6tJLu68lEF5VIqMUZiAV7a8+Tb78nEoMCMcqjXBw==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
@@ -2482,7 +2482,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.25.9.tgz",
|
||||
"integrity": "sha512-0UfuJS0EsXbRvKnwcLjFtJy/Sxc5J5jhLHnFhy7u4zih97Hz6tJkLU+O+FMMrNZrosUPxDi6sYxJ/EA8jDiAog==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-create-regexp-features-plugin": "^7.25.9",
|
||||
@@ -2499,7 +2499,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.25.9.tgz",
|
||||
"integrity": "sha512-GCggjexbmSLaFhqsojeugBpeaRIgWNTcgKVq/0qIteFEqY2A+b9QidYadrWlnbWQUrW5fn+mCvf3tr7OeBFTyg==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
@@ -2515,7 +2515,7 @@
|
||||
"version": "7.26.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.26.3.tgz",
|
||||
"integrity": "sha512-7CAHcQ58z2chuXPWblnn1K6rLDnDWieghSOEmqQsrBenH0P9InCUtOJYD89pvngljmZlJcz3fcmgYsXFNGa1ZQ==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
@@ -2531,7 +2531,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.25.9.tgz",
|
||||
"integrity": "sha512-2NsEz+CxzJIVOPx2o9UsW1rXLqtChtLoVnwYHHiB04wS5sgn7mrV45fWMBX0Kk+ub9uXytVYfNP2HjbVbCB3Ww==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
@@ -2563,7 +2563,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.25.9.tgz",
|
||||
"integrity": "sha512-LqHxduHoaGELJl2uhImHwRQudhCM50pT46rIBNvtT/Oql3nqiS3wOwP+5ten7NpYSXrrVLgtZU3DZmPtWZo16A==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9",
|
||||
@@ -2580,7 +2580,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.25.9.tgz",
|
||||
"integrity": "sha512-8lP+Yxjv14Vc5MuWBpJsoUCd3hD6V9DgBon2FVYL4jJgbnVQ9fTgYmonchzZJOVNgzEgbxp4OwAf6xz6M/14XA==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-compilation-targets": "^7.25.9",
|
||||
@@ -2598,7 +2598,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.25.9.tgz",
|
||||
"integrity": "sha512-xoTMk0WXceiiIvsaquQQUaLLXSW1KJ159KP87VilruQm0LNNGxWzahxSS6T6i4Zg3ezp4vA4zuwiNUR53qmQAw==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
@@ -2614,7 +2614,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.25.9.tgz",
|
||||
"integrity": "sha512-9N7+2lFziW8W9pBl2TzaNht3+pgMIRP74zizeCSrtnSKVdUl8mAjjOP2OOVQAfZ881P2cNjDj1uAMEdeD50nuQ==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
@@ -2630,7 +2630,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.25.9.tgz",
|
||||
"integrity": "sha512-wI4wRAzGko551Y8eVf6iOY9EouIDTtPb0ByZx+ktDGHwv6bHFimrgJM/2T021txPZ2s4c7bqvHbd+vXG6K948Q==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
@@ -2646,7 +2646,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.25.9.tgz",
|
||||
"integrity": "sha512-PYazBVfofCQkkMzh2P6IdIUaCEWni3iYEerAsRWuVd8+jlM1S9S9cz1dF9hIzyoZ8IA3+OwVYIp9v9e+GbgZhA==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
@@ -2662,7 +2662,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.25.9.tgz",
|
||||
"integrity": "sha512-g5T11tnI36jVClQlMlt4qKDLlWnG5pP9CSM4GhdRciTNMRgkfpo5cR6b4rGIOYPgRRuFAvwjPQ/Yk+ql4dyhbw==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-module-transforms": "^7.25.9",
|
||||
@@ -2695,7 +2695,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.25.9.tgz",
|
||||
"integrity": "sha512-hyss7iIlH/zLHaehT+xwiymtPOpsiwIIRlCAOwBB04ta5Tt+lNItADdlXw3jAWZ96VJ2jlhl/c+PNIQPKNfvcA==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-module-transforms": "^7.25.9",
|
||||
@@ -2714,7 +2714,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.25.9.tgz",
|
||||
"integrity": "sha512-bS9MVObUgE7ww36HEfwe6g9WakQ0KF07mQF74uuXdkoziUPfKyu/nIm663kz//e5O1nPInPFx36z7WJmJ4yNEw==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-module-transforms": "^7.25.9",
|
||||
@@ -2731,7 +2731,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.25.9.tgz",
|
||||
"integrity": "sha512-oqB6WHdKTGl3q/ItQhpLSnWWOpjUJLsOCLVyeFgeTktkBSCiurvPOsyt93gibI9CmuKvTUEtWmG5VhZD+5T/KA==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-create-regexp-features-plugin": "^7.25.9",
|
||||
@@ -2748,7 +2748,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.25.9.tgz",
|
||||
"integrity": "sha512-U/3p8X1yCSoKyUj2eOBIx3FOn6pElFOKvAAGf8HTtItuPyB+ZeOqfn+mvTtg9ZlOAjsPdK3ayQEjqHjU/yLeVQ==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
@@ -2779,7 +2779,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.25.9.tgz",
|
||||
"integrity": "sha512-TlprrJ1GBZ3r6s96Yq8gEQv82s8/5HnCVHtEJScUj90thHQbwe+E5MLhi2bbNHBEJuzrvltXSru+BUxHDoog7Q==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
@@ -2795,7 +2795,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.25.9.tgz",
|
||||
"integrity": "sha512-fSaXafEE9CVHPweLYw4J0emp1t8zYTXyzN3UuG+lylqkvYd7RMrsOQ8TYx5RF231be0vqtFC6jnx3UmpJmKBYg==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-compilation-targets": "^7.25.9",
|
||||
@@ -2813,7 +2813,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.25.9.tgz",
|
||||
"integrity": "sha512-Kj/Gh+Rw2RNLbCK1VAWj2U48yxxqL2x0k10nPtSdRa0O2xnHXalD0s+o1A6a0W43gJ00ANo38jxkQreckOzv5A==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9",
|
||||
@@ -2830,7 +2830,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.25.9.tgz",
|
||||
"integrity": "sha512-qM/6m6hQZzDcZF3onzIhZeDHDO43bkNNlOX0i8n3lR6zLbu0GN2d8qfM/IERJZYauhAHSLHy39NF0Ctdvcid7g==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
@@ -2862,7 +2862,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.25.9.tgz",
|
||||
"integrity": "sha512-wzz6MKwpnshBAiRmn4jR8LYz/g8Ksg0o80XmwZDlordjwEk9SxBzTWC7F5ef1jhbrbOW2DJ5J6ayRukrJmnr0g==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
@@ -2894,7 +2894,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.25.9.tgz",
|
||||
"integrity": "sha512-Evf3kcMqzXA3xfYJmZ9Pg1OvKdtqsDMSWBDzZOPLvHiTt36E75jLDQo5w1gtRU95Q4E5PDttrTf25Fw8d/uWLw==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-annotate-as-pure": "^7.25.9",
|
||||
@@ -2912,7 +2912,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.25.9.tgz",
|
||||
"integrity": "sha512-IvIUeV5KrS/VPavfSM/Iu+RE6llrHrYIKY1yfCzyO/lMXHQ+p7uGhonmGVisv6tSBSVgWzMBohTcvkC9vQcQFA==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
@@ -2997,7 +2997,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.25.9.tgz",
|
||||
"integrity": "sha512-vwDcDNsgMPDGP0nMqzahDWE5/MLcX8sv96+wfX7as7LoF/kr97Bo/7fI00lXY4wUXYfVmwIIyG80fGZ1uvt2qg==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9",
|
||||
@@ -3014,7 +3014,7 @@
|
||||
"version": "7.26.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-regexp-modifiers/-/plugin-transform-regexp-modifiers-7.26.0.tgz",
|
||||
"integrity": "sha512-vN6saax7lrA2yA/Pak3sCxuD6F5InBjn9IcrIKQPjpsLvuHYLVroTxjdlVRHjjBWxKOqIwpTXDkOssYT4BFdRw==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-create-regexp-features-plugin": "^7.25.9",
|
||||
@@ -3031,7 +3031,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.25.9.tgz",
|
||||
"integrity": "sha512-7DL7DKYjn5Su++4RXu8puKZm2XBPHyjWLUidaPEkCUBbE7IPcsrkRHggAOOKydH1dASWdcUBxrkOGNxUv5P3Jg==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
@@ -3047,7 +3047,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.25.9.tgz",
|
||||
"integrity": "sha512-MUv6t0FhO5qHnS/W8XCbHmiRWOphNufpE1IVxhK5kuN3Td9FT1x4rx4K42s3RYdMXCXpfWkGSbCSd0Z64xA7Ng==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
@@ -3063,7 +3063,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.25.9.tgz",
|
||||
"integrity": "sha512-oNknIB0TbURU5pqJFVbOOFspVlrpVwo2H1+HUIsVDvp5VauGGDP1ZEvO8Nn5xyMEs3dakajOxlmkNW7kNgSm6A==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9",
|
||||
@@ -3080,7 +3080,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.25.9.tgz",
|
||||
"integrity": "sha512-WqBUSgeVwucYDP9U/xNRQam7xV8W5Zf+6Eo7T2SRVUFlhRiMNFdFz58u0KZmCVVqs2i7SHgpRnAhzRNmKfi2uA==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
@@ -3096,7 +3096,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.25.9.tgz",
|
||||
"integrity": "sha512-o97AE4syN71M/lxrCtQByzphAdlYluKPDBzDVzMmfCobUjjhAryZV0AIpRPrxN0eAkxXO6ZLEScmt+PNhj2OTw==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
@@ -3112,7 +3112,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.25.9.tgz",
|
||||
"integrity": "sha512-v61XqUMiueJROUv66BVIOi0Fv/CUuZuZMl5NkRoCVxLAnMexZ0A3kMe7vvZ0nulxMuMp0Mk6S5hNh48yki08ZA==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
@@ -3147,7 +3147,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.25.9.tgz",
|
||||
"integrity": "sha512-s5EDrE6bW97LtxOcGj1Khcx5AaXwiMmi4toFWRDP9/y0Woo6pXC+iyPu/KuhKtfSrNFd7jJB+/fkOtZy6aIC6Q==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
@@ -3163,7 +3163,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.25.9.tgz",
|
||||
"integrity": "sha512-Jt2d8Ga+QwRluxRQ307Vlxa6dMrYEMZCgGxoPR8V52rxPyldHu3hdlHspxaqYmE7oID5+kB+UKUB/eWS+DkkWg==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-create-regexp-features-plugin": "^7.25.9",
|
||||
@@ -3180,7 +3180,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.25.9.tgz",
|
||||
"integrity": "sha512-yoxstj7Rg9dlNn9UQxzk4fcNivwv4nUYz7fYXBaKxvw/lnmPuOm/ikoELygbYq68Bls3D/D+NBPHiLwZdZZ4HA==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-create-regexp-features-plugin": "^7.25.9",
|
||||
@@ -3197,7 +3197,7 @@
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.25.9.tgz",
|
||||
"integrity": "sha512-8BYqO3GeVNHtx69fdPshN3fnzUNLrWdHhk/icSwigksJGczKSizZ+Z6SBCxTs723Fr5VSNorTIK7a+R2tISvwQ==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-create-regexp-features-plugin": "^7.25.9",
|
||||
@@ -3214,7 +3214,7 @@
|
||||
"version": "7.26.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.26.0.tgz",
|
||||
"integrity": "sha512-H84Fxq0CQJNdPFT2DrfnylZ3cf5K43rGfWK4LJGPpjKHiZlk0/RzwEus3PDDZZg+/Er7lCA03MVacueUuXdzfw==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/compat-data": "^7.26.0",
|
||||
@@ -3315,7 +3315,7 @@
|
||||
"version": "0.1.6-no-external-plugins",
|
||||
"resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz",
|
||||
"integrity": "sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.0.0",
|
||||
@@ -7985,7 +7985,6 @@
|
||||
"version": "10.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.1.tgz",
|
||||
"integrity": "sha512-o4PXJQidqJl82ckFaXUeoAW+XysPLauYI43Abki5hABd853iMhitooc6znOnczgbTYmEP6U6/y1ZyKAIsvMKGg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^7.10.4",
|
||||
@@ -8005,7 +8004,6 @@
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",
|
||||
"integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
@@ -8018,7 +8016,6 @@
|
||||
"version": "27.5.1",
|
||||
"resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz",
|
||||
"integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ansi-regex": "^5.0.1",
|
||||
@@ -8033,7 +8030,6 @@
|
||||
"version": "17.0.2",
|
||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
|
||||
"integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@testing-library/jest-dom": {
|
||||
@@ -8114,7 +8110,6 @@
|
||||
"version": "5.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz",
|
||||
"integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/babel__core": {
|
||||
@@ -8369,7 +8364,6 @@
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz",
|
||||
"integrity": "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/lodash": {
|
||||
@@ -8401,7 +8395,6 @@
|
||||
"version": "12.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-12.2.3.tgz",
|
||||
"integrity": "sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/linkify-it": "*",
|
||||
@@ -8412,7 +8405,6 @@
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-2.0.0.tgz",
|
||||
"integrity": "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/ms": {
|
||||
@@ -9460,7 +9452,6 @@
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz",
|
||||
"integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"dequal": "^2.0.3"
|
||||
@@ -9828,7 +9819,7 @@
|
||||
"version": "0.4.12",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.12.tgz",
|
||||
"integrity": "sha512-CPWT6BwvhrTO2d8QVorhTCQw9Y43zOu7G9HigcfxvepOU6b8o3tcWad6oVgZIsZCTt42FFv97aA7ZJsbM4+8og==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/compat-data": "^7.22.6",
|
||||
@@ -9843,7 +9834,7 @@
|
||||
"version": "0.10.6",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.6.tgz",
|
||||
"integrity": "sha512-b37+KR2i/khY5sKmWNVQAnitvquQbNdWy6lJdsr0kmquCKEEUgMKK4SboVM3HtfnZilfjr4MMQ7vY58FVWDtIA==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-define-polyfill-provider": "^0.6.2",
|
||||
@@ -9857,7 +9848,7 @@
|
||||
"version": "0.6.3",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.3.tgz",
|
||||
"integrity": "sha512-LiWSbl4CRSIa5x/JAU6jZiG9eit9w6mz+yVMFwDE83LAWvt0AfGBoZ7HS/mkhrKuh2ZlzfVZYKoLjXdqw6Yt7Q==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-define-polyfill-provider": "^0.6.3"
|
||||
@@ -11617,7 +11608,7 @@
|
||||
"version": "3.39.0",
|
||||
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.39.0.tgz",
|
||||
"integrity": "sha512-VgEUx3VwlExr5no0tXlBt+silBvhTryPwCXRI2Id1PN8WTKu7MreethvddqOubrYxkFdv/RnYrqlv1sFNAUelw==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"browserslist": "^4.24.2"
|
||||
@@ -12667,7 +12658,6 @@
|
||||
"version": "0.5.16",
|
||||
"resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz",
|
||||
"integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/dom-converter": {
|
||||
@@ -13672,7 +13662,7 @@
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
|
||||
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "BSD-2-Clause",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
@@ -16287,7 +16277,7 @@
|
||||
"version": "2.16.1",
|
||||
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz",
|
||||
"integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"hasown": "^2.0.2"
|
||||
@@ -18538,7 +18528,7 @@
|
||||
"version": "4.0.8",
|
||||
"resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
|
||||
"integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/lodash.flow": {
|
||||
@@ -18676,7 +18666,6 @@
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz",
|
||||
"integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"lz-string": "bin/bin.js"
|
||||
@@ -20143,7 +20132,7 @@
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
|
||||
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/path-scurry": {
|
||||
@@ -22495,14 +22484,14 @@
|
||||
"version": "1.4.2",
|
||||
"resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz",
|
||||
"integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/regenerate-unicode-properties": {
|
||||
"version": "10.2.0",
|
||||
"resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.0.tgz",
|
||||
"integrity": "sha512-DqHn3DwbmmPVzeKj9woBadqmXxLvQoQIwu7nopMc72ztvxVmVk2SBhSnx67zuye5TP+lJsb/TBQsjLKhnDf3MA==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"regenerate": "^1.4.2"
|
||||
@@ -22521,7 +22510,7 @@
|
||||
"version": "0.15.2",
|
||||
"resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.2.tgz",
|
||||
"integrity": "sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.8.4"
|
||||
@@ -22531,7 +22520,7 @@
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.2.0.tgz",
|
||||
"integrity": "sha512-H66BPQMrv+V16t8xtmq+UC0CBpiTBA60V8ibS1QVReIp8T1z8hwFxqcGzm9K6lgsN7sB5edVH8a+ze6Fqm4weA==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"regenerate": "^1.4.2",
|
||||
@@ -22549,14 +22538,14 @@
|
||||
"version": "0.8.0",
|
||||
"resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.8.0.tgz",
|
||||
"integrity": "sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/regjsparser": {
|
||||
"version": "0.12.0",
|
||||
"resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.12.0.tgz",
|
||||
"integrity": "sha512-cnE+y8bz4NhMjISKbgeVJtqNbtf5QpjZP+Bslo+UqkIt9QPnX9q095eiRRASJG1/tz6dlNr6Z5NsBiWYokp6EQ==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "BSD-2-Clause",
|
||||
"dependencies": {
|
||||
"jsesc": "~3.0.2"
|
||||
@@ -22569,7 +22558,7 @@
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz",
|
||||
"integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"jsesc": "bin/jsesc"
|
||||
@@ -22725,7 +22714,7 @@
|
||||
"version": "1.22.10",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz",
|
||||
"integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is-core-module": "^2.16.0",
|
||||
@@ -24937,7 +24926,7 @@
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
|
||||
"integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
@@ -25814,7 +25803,7 @@
|
||||
"version": "4.9.5",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
|
||||
"integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
@@ -25875,7 +25864,7 @@
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz",
|
||||
"integrity": "sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
@@ -25885,7 +25874,7 @@
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz",
|
||||
"integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"unicode-canonical-property-names-ecmascript": "^2.0.0",
|
||||
@@ -25899,7 +25888,7 @@
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.0.tgz",
|
||||
"integrity": "sha512-4IehN3V/+kkr5YeSSDDQG8QLqO26XpL2XP3GQtqwlT/QYSECAwFztxVHjlbh0+gjJ3XmNLS0zDsbgs9jWKExLg==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
@@ -25909,7 +25898,7 @@
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz",
|
||||
"integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==",
|
||||
"dev": true,
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
@@ -31986,7 +31975,6 @@
|
||||
"cheerio": "^1.0.0",
|
||||
"crypto-js": "^4.2.0",
|
||||
"json-query": "^2.2.2",
|
||||
"jsonwebtoken": "^9.0.2",
|
||||
"lodash": "^4.17.21",
|
||||
"moment": "^2.29.4",
|
||||
"nanoid": "3.3.8",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React, { useState, useEffect, useRef, useCallback, useMemo } from 'react';
|
||||
import debounce from 'lodash/debounce';
|
||||
import { IconRegex, IconArrowUp, IconArrowDown, IconX, IconLetterCase, IconLetterW } from '@tabler/icons';
|
||||
import ToolHint from 'components/ToolHint';
|
||||
import StyledWrapper from './StyledWrapper';
|
||||
@@ -8,7 +9,7 @@ function escapeRegExp(string) {
|
||||
return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');
|
||||
}
|
||||
|
||||
const CodeMirrorSearch = ({ visible, editor, onClose }) => {
|
||||
const CustomSearch = ({ visible, editor, onClose }) => {
|
||||
const [searchText, setSearchText] = useState('');
|
||||
const [regex, setRegex] = useState(false);
|
||||
const [caseSensitive, setCaseSensitive] = useState(false);
|
||||
@@ -198,4 +199,4 @@ const CodeMirrorSearch = ({ visible, editor, onClose }) => {
|
||||
);
|
||||
};
|
||||
|
||||
export default CodeMirrorSearch;
|
||||
export default CustomSearch;
|
||||
@@ -14,7 +14,7 @@ import * as jsonlint from '@prantlf/jsonlint';
|
||||
import { JSHINT } from 'jshint';
|
||||
import stripJsonComments from 'strip-json-comments';
|
||||
import { getAllVariables } from 'utils/collections';
|
||||
import CodeMirrorSearch from 'components/CodeMirrorSearch';
|
||||
import CustomSearch from './CustomSearch';
|
||||
|
||||
const CodeMirror = require('codemirror');
|
||||
window.jsonlint = jsonlint;
|
||||
@@ -267,7 +267,7 @@ export default class CodeEditor extends React.Component {
|
||||
font={this.props.font}
|
||||
fontSize={this.props.fontSize}
|
||||
>
|
||||
<CodeMirrorSearch
|
||||
<CustomSearch
|
||||
visible={this.state.searchBarVisible}
|
||||
editor={this.editor}
|
||||
onClose={() => this.setState({ searchBarVisible: false })}
|
||||
|
||||
@@ -10,6 +10,7 @@ import { findCollectionByItemUid, getGlobalEnvironmentVariables } from 'utils/co
|
||||
import { cloneDeep } from 'lodash';
|
||||
import { useMemo } from 'react';
|
||||
import { generateSnippet } from '../utils/snippet-generator';
|
||||
|
||||
const CodeView = ({ language, item }) => {
|
||||
const { displayedTheme } = useTheme();
|
||||
const preferences = useSelector((state) => state.app.preferences);
|
||||
@@ -32,12 +33,7 @@ const CodeView = ({ language, item }) => {
|
||||
}, [collectionOriginal, globalEnvironments, activeGlobalEnvironmentUid]);
|
||||
|
||||
const snippet = useMemo(() => {
|
||||
return generateSnippet({
|
||||
language,
|
||||
item,
|
||||
collection,
|
||||
shouldInterpolate: generateCodePrefs.shouldInterpolate
|
||||
});
|
||||
return generateSnippet({ language, item, collection, shouldInterpolate: generateCodePrefs.shouldInterpolate });
|
||||
}, [language, item, collection, generateCodePrefs.shouldInterpolate]);
|
||||
|
||||
return (
|
||||
|
||||
@@ -131,16 +131,9 @@ const createPostData = (body) => {
|
||||
};
|
||||
|
||||
export const buildHarRequest = ({ request, headers }) => {
|
||||
// NOTE:
|
||||
// This is just a safety check.
|
||||
// The interpolateUrlPathParams method validates the url, but it does not throw
|
||||
if (!URL.canParse(request.url)) {
|
||||
throw new Error('invalid request url');
|
||||
}
|
||||
|
||||
return {
|
||||
method: request.method,
|
||||
url: request.url,
|
||||
url: encodeURI(request.url),
|
||||
httpVersion: 'HTTP/1.1',
|
||||
cookies: [],
|
||||
headers: createHeaders(request, headers),
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
"cheerio": "^1.0.0",
|
||||
"crypto-js": "^4.2.0",
|
||||
"json-query": "^2.2.2",
|
||||
"jsonwebtoken": "^9.0.2",
|
||||
"lodash": "^4.17.21",
|
||||
"moment": "^2.29.4",
|
||||
"nanoid": "3.3.8",
|
||||
|
||||
@@ -33,7 +33,6 @@ const NodeVault = require('node-vault');
|
||||
const xml2js = require('xml2js');
|
||||
const cheerio = require('cheerio');
|
||||
const tv4 = require('tv4');
|
||||
const jsonwebtoken = require('jsonwebtoken');
|
||||
const { executeQuickJsVmAsync } = require('../sandbox/quickjs');
|
||||
|
||||
class ScriptRuntime {
|
||||
@@ -186,7 +185,6 @@ class ScriptRuntime {
|
||||
'node-fetch': fetch,
|
||||
'crypto-js': CryptoJS,
|
||||
xml2js: xml2js,
|
||||
jsonwebtoken,
|
||||
cheerio,
|
||||
tv4,
|
||||
...whitelistedModules,
|
||||
@@ -356,7 +354,6 @@ class ScriptRuntime {
|
||||
'node-fetch': fetch,
|
||||
'crypto-js': CryptoJS,
|
||||
'xml2js': xml2js,
|
||||
jsonwebtoken,
|
||||
cheerio,
|
||||
tv4,
|
||||
...whitelistedModules,
|
||||
|
||||
@@ -35,7 +35,6 @@ const NodeVault = require('node-vault');
|
||||
const xml2js = require('xml2js');
|
||||
const cheerio = require('cheerio');
|
||||
const tv4 = require('tv4');
|
||||
const jsonwebtoken = require('jsonwebtoken');
|
||||
const { executeQuickJsVmAsync } = require('../sandbox/quickjs');
|
||||
|
||||
class TestRuntime {
|
||||
@@ -104,8 +103,7 @@ class TestRuntime {
|
||||
res,
|
||||
expect: chai.expect,
|
||||
assert: chai.assert,
|
||||
__brunoTestResults: __brunoTestResults,
|
||||
jwt: jsonwebtoken
|
||||
__brunoTestResults: __brunoTestResults
|
||||
};
|
||||
|
||||
if (onConsoleLog && typeof onConsoleLog === 'function') {
|
||||
@@ -178,7 +176,6 @@ class TestRuntime {
|
||||
'xml2js': xml2js,
|
||||
cheerio,
|
||||
tv4,
|
||||
'jsonwebtoken': jsonwebtoken,
|
||||
...whitelistedModules,
|
||||
fs: allowScriptFilesystemAccess ? fs : undefined,
|
||||
'node-vault': NodeVault
|
||||
|
||||
@@ -2,14 +2,12 @@ const addAxiosShimToContext = require('./axios');
|
||||
const addNanoidShimToContext = require('./nanoid');
|
||||
const addPathShimToContext = require('./path');
|
||||
const addUuidShimToContext = require('./uuid');
|
||||
const addJwtShimToContext = require('./jwt');
|
||||
|
||||
const addLibraryShimsToContext = async (vm) => {
|
||||
await addNanoidShimToContext(vm);
|
||||
await addAxiosShimToContext(vm);
|
||||
await addUuidShimToContext(vm);
|
||||
await addPathShimToContext(vm);
|
||||
await addJwtShimToContext(vm);
|
||||
};
|
||||
|
||||
module.exports = addLibraryShimsToContext;
|
||||
|
||||
@@ -1,181 +0,0 @@
|
||||
const jwt = require('jsonwebtoken');
|
||||
const { marshallToVm, invokeFunction } = require('../../utils');
|
||||
|
||||
const addJwtShimToContext = async (vm) => {
|
||||
// --- sign ---
|
||||
const _jwtSign = vm.newFunction('sign', function (payload, secret, options, callback) {
|
||||
const nativePayload = vm.dump(payload);
|
||||
const nativeSecret = vm.dump(secret);
|
||||
|
||||
let nativeOptions;
|
||||
let callbackHandle = callback;
|
||||
const optionsType = options === undefined ? 'undefined' : vm.typeof(options);
|
||||
if (optionsType === 'function') {
|
||||
callbackHandle = options;
|
||||
nativeOptions = undefined;
|
||||
} else if (optionsType === 'object' && options !== null) {
|
||||
nativeOptions = vm.dump(options);
|
||||
}
|
||||
|
||||
// If a callback is provided
|
||||
if (callbackHandle && vm.typeof(callbackHandle) === 'function') {
|
||||
let tokenResult;
|
||||
let hostError;
|
||||
try {
|
||||
tokenResult = nativeOptions
|
||||
? jwt.sign(nativePayload, nativeSecret, nativeOptions)
|
||||
: jwt.sign(nativePayload, nativeSecret);
|
||||
} catch (err) {
|
||||
hostError = err;
|
||||
}
|
||||
|
||||
try {
|
||||
if (hostError) {
|
||||
const errVm = vm.newError(hostError.message || String(hostError));
|
||||
invokeFunction(vm, callbackHandle, [errVm, vm.undefined])
|
||||
.catch((e) => {
|
||||
console.warn('[JWT SHIM][sign.cb] callback invocation error:', e);
|
||||
})
|
||||
.finally(() => {
|
||||
errVm.dispose();
|
||||
callbackHandle.dispose();
|
||||
});
|
||||
} else {
|
||||
const tokenVm = marshallToVm(String(tokenResult), vm);
|
||||
invokeFunction(vm, callbackHandle, [vm.null, tokenVm])
|
||||
.catch((e) => {
|
||||
console.warn('[JWT SHIM][sign.cb] callback invocation error:', e);
|
||||
})
|
||||
.finally(() => {
|
||||
tokenVm.dispose();
|
||||
callbackHandle.dispose();
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
console.warn('[JWT SHIM][sign.cb] unexpected error:', e);
|
||||
callbackHandle.dispose();
|
||||
}
|
||||
|
||||
return vm.undefined;
|
||||
}
|
||||
|
||||
try {
|
||||
const token = nativeOptions
|
||||
? jwt.sign(nativePayload, nativeSecret, nativeOptions)
|
||||
: jwt.sign(nativePayload, nativeSecret);
|
||||
return marshallToVm(token, vm);
|
||||
} catch (err) {
|
||||
throw vm.newError(err.message || String(err));
|
||||
}
|
||||
});
|
||||
|
||||
vm.setProp(vm.global, '__bruno__jwt__sign', _jwtSign);
|
||||
_jwtSign.dispose();
|
||||
|
||||
// --- verify ---
|
||||
const _jwtVerify = vm.newFunction('verify', function (token, secret, options, callback) {
|
||||
const nativeToken = vm.dump(token);
|
||||
const nativeSecret = vm.dump(secret);
|
||||
|
||||
let nativeOptions;
|
||||
let actualCallback = callback;
|
||||
|
||||
const optionsType = options === undefined ? 'undefined' : vm.typeof(options);
|
||||
if (optionsType === 'function') {
|
||||
actualCallback = options;
|
||||
nativeOptions = undefined;
|
||||
} else if (optionsType === 'object' && options !== null) {
|
||||
nativeOptions = vm.dump(options);
|
||||
}
|
||||
|
||||
if (actualCallback && vm.typeof(actualCallback) === 'function') {
|
||||
let decodedResult;
|
||||
let hostError;
|
||||
try {
|
||||
decodedResult = nativeOptions
|
||||
? jwt.verify(nativeToken, nativeSecret, nativeOptions)
|
||||
: jwt.verify(nativeToken, nativeSecret);
|
||||
} catch (err) {
|
||||
hostError = err;
|
||||
}
|
||||
|
||||
try {
|
||||
if (hostError) {
|
||||
const vmErr = vm.newError(hostError.message || String(hostError));
|
||||
invokeFunction(vm, actualCallback, [vmErr, vm.undefined])
|
||||
.catch((e) => {
|
||||
console.warn('[JWT SHIM][verify.cb] callback invocation error:', e);
|
||||
})
|
||||
.finally(() => {
|
||||
vmErr.dispose();
|
||||
actualCallback.dispose();
|
||||
});
|
||||
} else {
|
||||
const vmNull = vm.null;
|
||||
const vmDecoded = marshallToVm(decodedResult, vm);
|
||||
invokeFunction(vm, actualCallback, [vmNull, vmDecoded])
|
||||
.catch((e) => {
|
||||
console.warn('[JWT SHIM][verify.cb] callback invocation error:', e);
|
||||
})
|
||||
.finally(() => {
|
||||
vmDecoded.dispose();
|
||||
actualCallback.dispose();
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
console.warn('[JWT SHIM][verify.cb] unexpected error:', e);
|
||||
actualCallback.dispose();
|
||||
}
|
||||
|
||||
return vm.undefined;
|
||||
}
|
||||
|
||||
try {
|
||||
const decoded = nativeOptions
|
||||
? jwt.verify(nativeToken, nativeSecret, nativeOptions)
|
||||
: jwt.verify(nativeToken, nativeSecret);
|
||||
return marshallToVm(decoded, vm);
|
||||
} catch (err) {
|
||||
throw vm.newError(err.message || String(err));
|
||||
}
|
||||
});
|
||||
|
||||
vm.setProp(vm.global, '__bruno__jwt__verify', _jwtVerify);
|
||||
_jwtVerify.dispose();
|
||||
|
||||
// --- decode ---
|
||||
const _jwtDecode = vm.newFunction('decode', function (token, options) {
|
||||
const nativeToken = vm.dump(token);
|
||||
|
||||
let nativeOptions;
|
||||
const optionsType = options === undefined ? 'undefined' : vm.typeof(options);
|
||||
if (optionsType === 'object' && options !== null) {
|
||||
nativeOptions = vm.dump(options);
|
||||
}
|
||||
|
||||
try {
|
||||
const decoded = nativeOptions
|
||||
? jwt.decode(nativeToken, nativeOptions)
|
||||
: jwt.decode(nativeToken);
|
||||
return marshallToVm(decoded, vm);
|
||||
} catch (err) {
|
||||
throw vm.newError(err.message || String(err));
|
||||
}
|
||||
});
|
||||
|
||||
vm.setProp(vm.global, '__bruno__jwt__decode', _jwtDecode);
|
||||
_jwtDecode.dispose();
|
||||
|
||||
vm.evalCode(`
|
||||
globalThis.jwt = {};
|
||||
globalThis.jwt.sign = globalThis.__bruno__jwt__sign;
|
||||
globalThis.jwt.verify = globalThis.__bruno__jwt__verify;
|
||||
globalThis.jwt.decode = globalThis.__bruno__jwt__decode;
|
||||
globalThis.requireObject = {
|
||||
...globalThis.requireObject,
|
||||
'jsonwebtoken': globalThis.jwt,
|
||||
};
|
||||
`);
|
||||
};
|
||||
|
||||
module.exports = addJwtShimToContext;
|
||||
@@ -30,54 +30,6 @@ const marshallToVm = (value, vm) => {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Invokes a QuickJS function handle.
|
||||
* - Returns a Promise
|
||||
*
|
||||
* @param {Object} vm - QuickJS VM instance
|
||||
* @param {QuickJSHandle} quickFn - A QuickJS function handle
|
||||
* @param {Array} args - Arguments to pass to the function
|
||||
* @returns {Promise<any>} - The result as a Promise
|
||||
*/
|
||||
async function invokeFunction(vm, quickFn, args = []) {
|
||||
if (vm.typeof(quickFn) !== 'function') {
|
||||
throw new TypeError('Target is not a QuickJS function');
|
||||
}
|
||||
|
||||
const result = vm.callFunction(quickFn, vm.global, ...args);
|
||||
|
||||
if (result.error) {
|
||||
const error = vm.dump(result.error);
|
||||
result.error.dispose();
|
||||
throw error;
|
||||
}
|
||||
|
||||
// Check if the result is a QuickJS Promise handle (async functions)
|
||||
if (vm.typeof(result.value) === 'object' && result.value.constructor && vm.typeof(result.value.constructor) === 'function') {
|
||||
try {
|
||||
const promiseHandle = vm.unwrapResult(result);
|
||||
const resolvedResult = await vm.resolvePromise(promiseHandle);
|
||||
promiseHandle.dispose();
|
||||
const resolvedHandle = vm.unwrapResult(resolvedResult);
|
||||
const value = vm.dump(resolvedHandle);
|
||||
resolvedHandle.dispose();
|
||||
return Promise.resolve(value);
|
||||
} catch (promiseError) {
|
||||
// If it's not a valid Promise, throw an error
|
||||
result.value.dispose();
|
||||
throw new Error(`Invalid Promise handle: ${promiseError.message}`);
|
||||
}
|
||||
}
|
||||
|
||||
const value = vm.dump(result.value);
|
||||
result.value.dispose();
|
||||
|
||||
return (value && typeof value.then === 'function')
|
||||
? value
|
||||
: Promise.resolve(value);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
marshallToVm,
|
||||
invokeFunction
|
||||
marshallToVm
|
||||
};
|
||||
|
||||
60
packages/bruno-requests/src/auth/oauth2-helper.spec.js
Normal file
60
packages/bruno-requests/src/auth/oauth2-helper.spec.js
Normal file
@@ -0,0 +1,60 @@
|
||||
// Simple smoke tests to verify proxy setup doesn't crash
|
||||
// The actual proxy functionality will be tested in integration tests
|
||||
|
||||
describe('OAuth2 Proxy Support', () => {
|
||||
let originalEnv;
|
||||
|
||||
beforeEach(() => {
|
||||
// Save original env
|
||||
originalEnv = { ...process.env };
|
||||
// Clear proxy env vars
|
||||
delete process.env.http_proxy;
|
||||
delete process.env.HTTP_PROXY;
|
||||
delete process.env.https_proxy;
|
||||
delete process.env.HTTPS_PROXY;
|
||||
jest.clearAllMocks();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
// Restore original env
|
||||
process.env = originalEnv;
|
||||
});
|
||||
|
||||
test('should not crash when proxy env vars are not set', () => {
|
||||
// This is a smoke test to ensure the module loads
|
||||
const { getOAuth2Token } = require('./oauth2-helper');
|
||||
expect(getOAuth2Token).toBeDefined();
|
||||
expect(typeof getOAuth2Token).toBe('function');
|
||||
});
|
||||
|
||||
test('should not crash when HTTP_PROXY is set', () => {
|
||||
process.env.HTTP_PROXY = 'http://proxy.example.com:8080';
|
||||
|
||||
// Reload module to pick up env vars
|
||||
jest.resetModules();
|
||||
const { getOAuth2Token } = require('./oauth2-helper');
|
||||
expect(getOAuth2Token).toBeDefined();
|
||||
expect(typeof getOAuth2Token).toBe('function');
|
||||
});
|
||||
|
||||
test('should not crash when HTTPS_PROXY is set', () => {
|
||||
process.env.HTTPS_PROXY = 'https://proxy.example.com:8443';
|
||||
|
||||
// Reload module to pick up env vars
|
||||
jest.resetModules();
|
||||
const { getOAuth2Token } = require('./oauth2-helper');
|
||||
expect(getOAuth2Token).toBeDefined();
|
||||
expect(typeof getOAuth2Token).toBe('function');
|
||||
});
|
||||
|
||||
test('should not crash when both proxies are set', () => {
|
||||
process.env.HTTP_PROXY = 'http://proxy.example.com:8080';
|
||||
process.env.HTTPS_PROXY = 'https://proxy.example.com:8443';
|
||||
|
||||
// Reload module to pick up env vars
|
||||
jest.resetModules();
|
||||
const { getOAuth2Token } = require('./oauth2-helper');
|
||||
expect(getOAuth2Token).toBeDefined();
|
||||
expect(typeof getOAuth2Token).toBe('function');
|
||||
});
|
||||
});
|
||||
@@ -2,6 +2,45 @@ import axios, { AxiosRequestConfig, ResponseType } from 'axios';
|
||||
import qs from 'qs';
|
||||
import debug from 'debug';
|
||||
|
||||
/**
|
||||
* Setup proxy agents for OAuth2 token requests
|
||||
* This is needed because:
|
||||
* - bruno-electron uses setupProxyAgents which sets httpAgent/httpsAgent on requests
|
||||
* - bruno-cli also uses proxies when HTTP_PROXY/HTTPS_PROXY env vars are set
|
||||
* - OAuth2 token requests need to honor system proxy settings in CI environments
|
||||
*
|
||||
* To test: Set HTTP_PROXY/HTTPS_PROXY env vars and run CLI with client_credentials grant
|
||||
*/
|
||||
const setupProxyAgents = (requestConfig: RequestConfig): void => {
|
||||
try {
|
||||
const httpProxy = process.env.http_proxy || process.env.HTTP_PROXY;
|
||||
const httpsProxy = process.env.https_proxy || process.env.HTTPS_PROXY;
|
||||
|
||||
if (httpProxy) {
|
||||
try {
|
||||
const { HttpProxyAgent } = require('http-proxy-agent');
|
||||
requestConfig.httpAgent = new HttpProxyAgent(httpProxy);
|
||||
} catch (err) {
|
||||
// Fail silently if http-proxy-agent is not available
|
||||
debug('oauth2')('http-proxy-agent not available, skipping httpAgent setup');
|
||||
}
|
||||
}
|
||||
|
||||
if (httpsProxy) {
|
||||
try {
|
||||
const { HttpsProxyAgent } = require('https-proxy-agent');
|
||||
requestConfig.httpsAgent = new HttpsProxyAgent(httpsProxy);
|
||||
} catch (err) {
|
||||
// Fail silently if https-proxy-agent is not available
|
||||
debug('oauth2')('https-proxy-agent not available, skipping httpsAgent setup');
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
// Catch-all to ensure proxy setup never crashes the token fetch
|
||||
debug('oauth2')('Error setting up proxy agents:', err);
|
||||
}
|
||||
};
|
||||
|
||||
export interface TokenStore {
|
||||
saveCredential({ url, credentialsId, credentials }: { url: string; credentialsId: string; credentials: any }): Promise<boolean>;
|
||||
getCredential({ url, credentialsId }: { url: string; credentialsId: string }): Promise<any>;
|
||||
@@ -42,6 +81,8 @@ interface RequestConfig extends AxiosRequestConfig {
|
||||
};
|
||||
data: string;
|
||||
responseType: ResponseType;
|
||||
httpAgent?: any;
|
||||
httpsAgent?: any;
|
||||
}
|
||||
|
||||
interface ClientCredentialsData {
|
||||
@@ -162,6 +203,9 @@ const fetchTokenClientCredentials = async (oauth2Config: OAuth2Config) => {
|
||||
|
||||
requestConfig.data = qs.stringify(data);
|
||||
|
||||
// Setup proxy agents if HTTP_PROXY/HTTPS_PROXY env vars are set
|
||||
setupProxyAgents(requestConfig);
|
||||
|
||||
debug('oauth2')('> request');
|
||||
debug('oauth2')(JSON.stringify(requestConfig, null, 2));
|
||||
|
||||
@@ -263,6 +307,9 @@ const fetchTokenPassword = async (oauth2Config: OAuth2Config) => {
|
||||
|
||||
requestConfig.data = qs.stringify(data);
|
||||
|
||||
// Setup proxy agents if HTTP_PROXY/HTTPS_PROXY env vars are set
|
||||
setupProxyAgents(requestConfig);
|
||||
|
||||
debug('oauth2')('> request');
|
||||
debug('oauth2')(JSON.stringify(requestConfig, null, 2));
|
||||
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
import { test, expect } from '../../../playwright';
|
||||
import { closeAllCollections } from '../../utils/page';
|
||||
|
||||
test.describe('Code Generation URL Encoding', () => {
|
||||
test.afterEach(async ({ pageWithUserData: page }) => {
|
||||
try {
|
||||
const modalCloseButton = page.locator('[data-test-id="modal-close-button"]');
|
||||
if (await modalCloseButton.isVisible()) {
|
||||
await modalCloseButton.click();
|
||||
await modalCloseButton.waitFor({ state: 'hidden' });
|
||||
}
|
||||
} catch (e) {}
|
||||
|
||||
await closeAllCollections(page);
|
||||
});
|
||||
|
||||
test('Should generate code with proper URL encoding for unencoded input', async ({
|
||||
pageWithUserData: page,
|
||||
createTmpDir
|
||||
}) => {
|
||||
await page.locator('.dropdown-icon').click();
|
||||
await page.locator('.dropdown-item').filter({ hasText: 'Create Collection' }).click();
|
||||
await page.getByLabel('Name').fill('unencoded-test-collection');
|
||||
await page.getByLabel('Location').fill(await createTmpDir('unencoded-test-collection'));
|
||||
await page.getByRole('button', { name: 'Create', exact: true }).click();
|
||||
|
||||
await expect(page.locator('#sidebar-collection-name').filter({ hasText: 'unencoded-test-collection' })).toBeVisible();
|
||||
await page.locator('#sidebar-collection-name').filter({ hasText: 'unencoded-test-collection' }).click();
|
||||
await page.getByLabel('Safe Mode').check();
|
||||
await page.getByRole('button', { name: 'Save' }).click();
|
||||
|
||||
await page.locator('#create-new-tab').getByRole('img').click();
|
||||
await page.getByPlaceholder('Request Name').fill('unencoded-request');
|
||||
await page.locator('#new-request-url .CodeMirror').click();
|
||||
await page.locator('textarea').fill('http://base.source?name=John Doe');
|
||||
await page.getByRole('button', { name: 'Create' }).click();
|
||||
|
||||
await expect(page.locator('.collection-item-name').filter({ hasText: 'unencoded-request' })).toBeVisible();
|
||||
|
||||
await page.locator('.collection-item-name').filter({ hasText: 'unencoded-request' }).click();
|
||||
|
||||
await page.locator('#send-request .infotip').first().click();
|
||||
|
||||
await expect(page.getByRole('dialog')).toBeVisible();
|
||||
await expect(page.getByRole('dialog').locator('.bruno-modal-header-title')).toContainText('Generate Code');
|
||||
|
||||
const codeEditor = page.locator('.editor-content .CodeMirror').first();
|
||||
await expect(codeEditor).toBeVisible();
|
||||
|
||||
const generatedCode = await codeEditor.textContent();
|
||||
|
||||
expect(generatedCode).toContain('http://base.source/?name=John%20Doe');
|
||||
|
||||
await page.locator('[data-test-id="modal-close-button"]').click();
|
||||
|
||||
await page.locator('[data-test-id="modal-close-button"]').waitFor({ state: 'hidden' });
|
||||
});
|
||||
|
||||
test('Should generate code with proper URL encoding for encoded input', async ({
|
||||
pageWithUserData: page,
|
||||
createTmpDir
|
||||
}) => {
|
||||
await page.locator('.dropdown-icon').click();
|
||||
await page.locator('.dropdown-item').filter({ hasText: 'Create Collection' }).click();
|
||||
await page.getByLabel('Name').fill('encoded-test-collection');
|
||||
await page.getByLabel('Location').fill(await createTmpDir('encoded-test-collection'));
|
||||
await page.getByRole('button', { name: 'Create', exact: true }).click();
|
||||
|
||||
await expect(page.locator('#sidebar-collection-name').filter({ hasText: 'encoded-test-collection' })).toBeVisible();
|
||||
await page.locator('#sidebar-collection-name').filter({ hasText: 'encoded-test-collection' }).click();
|
||||
await page.getByLabel('Safe Mode').check();
|
||||
await page.getByRole('button', { name: 'Save' }).click();
|
||||
|
||||
await page.locator('#create-new-tab').getByRole('img').click();
|
||||
await page.getByPlaceholder('Request Name').fill('encoded-request');
|
||||
await page.locator('#new-request-url .CodeMirror').click();
|
||||
await page.locator('textarea').fill('http://base.source?name=John%20Doe');
|
||||
await page.getByRole('button', { name: 'Create' }).click();
|
||||
|
||||
await expect(page.locator('.collection-item-name').filter({ hasText: 'encoded-request' })).toBeVisible();
|
||||
|
||||
await page.locator('.collection-item-name').filter({ hasText: 'encoded-request' }).click();
|
||||
|
||||
await page.locator('#send-request .infotip').first().click();
|
||||
|
||||
await expect(page.getByRole('dialog')).toBeVisible();
|
||||
await expect(page.getByRole('dialog').locator('.bruno-modal-header-title')).toContainText('Generate Code');
|
||||
|
||||
const codeEditor = page.locator('.editor-content .CodeMirror').first();
|
||||
await expect(codeEditor).toBeVisible();
|
||||
|
||||
const generatedCode = await codeEditor.textContent();
|
||||
|
||||
expect(generatedCode).toContain('http://base.source/?name=John%20Doe');
|
||||
|
||||
await page.locator('[data-test-id="modal-close-button"]').click();
|
||||
|
||||
await page.locator('[data-test-id="modal-close-button"]').waitFor({ state: 'hidden' });
|
||||
});
|
||||
});
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"version": "1",
|
||||
"name": "jsonwebtoken",
|
||||
"type": "collection",
|
||||
"ignore": [
|
||||
"node_modules",
|
||||
".git"
|
||||
]
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
meta {
|
||||
name: decode
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{host}}/api/echo
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
script:pre-request {
|
||||
const jwt = require('jsonwebtoken');
|
||||
|
||||
const testPayload = {
|
||||
userId: 456,
|
||||
username: 'decodeuser',
|
||||
role: 'user',
|
||||
iat: Math.floor(Date.now() / 1000)
|
||||
};
|
||||
|
||||
const secret = bru.getEnvVar('secret') || 'test-secret-key';
|
||||
const testToken = jwt.sign(testPayload, secret, { algorithm: 'HS256', expiresIn: '1h' });
|
||||
|
||||
try {
|
||||
console.log('Testing JWT decoding...');
|
||||
console.log('Test token:', testToken);
|
||||
|
||||
const decoded = jwt.decode(testToken);
|
||||
|
||||
bru.setEnvVar('decoded_payload', JSON.stringify(decoded));
|
||||
|
||||
} catch (error) {
|
||||
console.error('JWT decoding failed:', error.message);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
tests {
|
||||
test("Decoded payload should exist", function() {
|
||||
const decodedPayload = bru.getEnvVar('decoded_payload');
|
||||
expect(decodedPayload).to.exist;
|
||||
});
|
||||
|
||||
test("Decoded payload should contain correct user data", function() {
|
||||
const decodedPayload = JSON.parse(bru.getEnvVar('decoded_payload'));
|
||||
|
||||
expect(decodedPayload.userId).to.equal(456);
|
||||
expect(decodedPayload.username).to.equal('decodeuser');
|
||||
expect(decodedPayload.role).to.equal('user');
|
||||
});
|
||||
|
||||
test("Decoded payload should have timestamp fields", function() {
|
||||
const decodedPayload = JSON.parse(bru.getEnvVar('decoded_payload'));
|
||||
|
||||
expect(decodedPayload.iat).to.exist;
|
||||
expect(decodedPayload.exp).to.exist;
|
||||
expect(typeof decodedPayload.iat).to.equal('number');
|
||||
expect(typeof decodedPayload.exp).to.equal('number');
|
||||
});
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
meta {
|
||||
name: decode
|
||||
seq: 3
|
||||
}
|
||||
|
||||
auth {
|
||||
mode: inherit
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
vars {
|
||||
host: http://httpfaker.org
|
||||
secret: my-secret-key
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
meta {
|
||||
name: sign
|
||||
seq: 1
|
||||
}
|
||||
|
||||
auth {
|
||||
mode: inherit
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
meta {
|
||||
name: sign with callback err
|
||||
type: http
|
||||
seq: 2
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{host}}/api/echo
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
tests {
|
||||
const jwt = require('jsonwebtoken');
|
||||
|
||||
const HS_SECRET = 'supersecret';
|
||||
|
||||
/**
|
||||
* Helper that calls jwt.sign **with a callback** and resolves/rejects
|
||||
* based on the callback's (err, token) — so tests can `await` it.
|
||||
*/
|
||||
function signViaCallback(payload, secret, options = {}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
jwt.sign(payload, secret, options, (err, token) => {
|
||||
if (err) return reject(err);
|
||||
resolve(token);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
ERROR TESTS — jwt.sign should call callback with `err`
|
||||
============================================================ */
|
||||
|
||||
test('ERROR (callback) — missing secret for HS256', async function () {
|
||||
try {
|
||||
await signViaCallback({ sub: 'no_secret' }, undefined, { algorithm: 'HS256' });
|
||||
throw new Error('Expected jwt.sign to error via callback');
|
||||
} catch (err) {
|
||||
expect(err).to.be.instanceOf(Error);
|
||||
expect(String(err.message)).to.match(/secret|private key must have a value/i);
|
||||
}
|
||||
});
|
||||
|
||||
test('ERROR (callback) — invalid expiresIn format', async function () {
|
||||
try {
|
||||
await signViaCallback({ sub: 'bad_exp' }, HS_SECRET, { expiresIn: 'not-a-time' });
|
||||
throw new Error('Expected jwt.sign to error via callback');
|
||||
} catch (err) {
|
||||
expect(err).to.be.instanceOf(Error);
|
||||
expect(String(err.message)).to.match(/expiresIn/i);
|
||||
}
|
||||
});
|
||||
|
||||
test('ERROR (callback) — unsupported/invalid algorithm', async function () {
|
||||
try {
|
||||
await signViaCallback({ sub: 'bad_alg' }, HS_SECRET, { algorithm: 'FOO256' });
|
||||
throw new Error('Expected jwt.sign to error via callback');
|
||||
} catch (err) {
|
||||
expect(err).to.be.instanceOf(Error);
|
||||
expect(String(err.message)).to.match(/algorithm/i);
|
||||
}
|
||||
});
|
||||
|
||||
test('CONTROL (callback) — succeeds when options are valid', async function () {
|
||||
const token = await jwt.sign({ sub: 'ok' }, HS_SECRET, { algorithm: 'HS256', expiresIn: '10m' });
|
||||
expect(token).to.be.a('string');
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
}
|
||||
@@ -1,160 +0,0 @@
|
||||
meta {
|
||||
name: sign with callback token
|
||||
type: http
|
||||
seq: 3
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{host}}/api/echo
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
tests {
|
||||
const jwt = require('jsonwebtoken');
|
||||
const HS_SECRET = 'supersecret';
|
||||
|
||||
const payload = { sub: 'user123' };
|
||||
|
||||
function once(fn) {
|
||||
let called = false;
|
||||
return (...args) => {
|
||||
if (!called) {
|
||||
called = true;
|
||||
fn(...args);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function signAsync(payload, secret, options = {}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
jwt.sign(payload, secret, options, (err, token) => {
|
||||
if (err) reject(err);
|
||||
else resolve(token);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// 1. Named Normal Callback
|
||||
// ------------------------------------------------------------
|
||||
test('sign — named normal callback', function () {
|
||||
function signCallback(err, token) {
|
||||
expect(err).to.be.null;
|
||||
expect(token).to.be.a('string');
|
||||
|
||||
// Verify token to ensure correctness
|
||||
const decoded = jwt.verify(token, HS_SECRET, { algorithms: ['HS256'] });
|
||||
expect(decoded.sub).to.equal('user123');
|
||||
|
||||
console.log('Named callback signed token:', token);
|
||||
}
|
||||
|
||||
jwt.sign(payload, HS_SECRET, { algorithm: 'HS256', expiresIn: '15m' }, signCallback);
|
||||
});
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// 2. Anonymous Callback
|
||||
// ------------------------------------------------------------
|
||||
test('sign — anonymous callback', function () {
|
||||
jwt.sign(payload, HS_SECRET, { algorithm: 'HS256' }, function (err, token) {
|
||||
expect(err).to.be.null;
|
||||
expect(token).to.be.a('string');
|
||||
|
||||
const decoded = jwt.verify(token, HS_SECRET, { algorithms: ['HS256'] });
|
||||
expect(decoded.sub).to.equal('user123');
|
||||
|
||||
console.log('Anonymous callback signed token:', token);
|
||||
});
|
||||
});
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// 3. Arrow Function Callback
|
||||
// ------------------------------------------------------------
|
||||
test('sign — arrow function callback', function () {
|
||||
jwt.sign(payload, HS_SECRET, { algorithm: 'HS256' }, (err, token) => {
|
||||
expect(err).to.be.null;
|
||||
expect(token).to.be.a('string');
|
||||
|
||||
const decoded = jwt.verify(token, HS_SECRET, { algorithms: ['HS256'] });
|
||||
expect(decoded.sub).to.equal('user123');
|
||||
|
||||
console.log('Arrow callback signed token:', token);
|
||||
});
|
||||
});
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// 4. Bound Method Callback
|
||||
// ------------------------------------------------------------
|
||||
test('sign — bound method callback', function () {
|
||||
const signer = {
|
||||
prefix: '[SIGN]',
|
||||
done(err, token) {
|
||||
expect(err).to.be.null;
|
||||
expect(token).to.be.a('string');
|
||||
|
||||
const decoded = jwt.verify(token, HS_SECRET, { algorithms: ['HS256'] });
|
||||
expect(decoded.sub).to.equal('user123');
|
||||
|
||||
console.log(this.prefix, 'Bound callback signed token:', token);
|
||||
},
|
||||
};
|
||||
|
||||
jwt.sign(payload, HS_SECRET, { algorithm: 'HS256' }, signer.done.bind(signer));
|
||||
});
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// 5. Higher-Order Callback
|
||||
// ------------------------------------------------------------
|
||||
function makeSignCallback(label) {
|
||||
return (err, token) => {
|
||||
expect(err).to.be.null;
|
||||
expect(token).to.be.a('string');
|
||||
|
||||
const decoded = jwt.verify(token, HS_SECRET, { algorithms: ['HS256'] });
|
||||
expect(decoded.sub).to.equal('user123');
|
||||
|
||||
console.log(label, 'Higher-order callback signed token:', token);
|
||||
};
|
||||
}
|
||||
|
||||
test('sign — higher-order callback', function () {
|
||||
const cb = makeSignCallback('[CUSTOM LABEL]');
|
||||
jwt.sign(payload, HS_SECRET, { algorithm: 'HS256' }, cb);
|
||||
});
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// 6. Once-Wrapped Callback
|
||||
// ------------------------------------------------------------
|
||||
test('sign — once-wrapped callback', function () {
|
||||
const cb = once((err, token) => {
|
||||
expect(err).to.be.null;
|
||||
expect(token).to.be.a('string');
|
||||
|
||||
const decoded = jwt.verify(token, HS_SECRET, { algorithms: ['HS256'] });
|
||||
expect(decoded.sub).to.equal('user123');
|
||||
|
||||
console.log('Once callback executed and signed token:', token);
|
||||
});
|
||||
|
||||
jwt.sign(payload, HS_SECRET, { algorithm: 'HS256' }, cb);
|
||||
});
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// 7. Promise / Async-Await
|
||||
// ------------------------------------------------------------
|
||||
test('sign — promise wrapper with async/await', async function () {
|
||||
const token = await signAsync(payload, HS_SECRET, { algorithm: 'HS256', expiresIn: '15m' });
|
||||
expect(token).to.be.a('string');
|
||||
|
||||
const decoded = jwt.verify(token, HS_SECRET, { algorithms: ['HS256'] });
|
||||
expect(decoded.sub).to.equal('user123');
|
||||
|
||||
console.log('Promise/async signed token:', token);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
}
|
||||
@@ -1,109 +0,0 @@
|
||||
meta {
|
||||
name: sign
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{host}}/api/echo
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
script:pre-request {
|
||||
const jwt = require('jsonwebtoken');
|
||||
|
||||
const payload = {
|
||||
userId: 123,
|
||||
username: 'testuser',
|
||||
role: 'admin',
|
||||
iat: Math.floor(Date.now() / 1000)
|
||||
};
|
||||
|
||||
const secret = bru.getEnvVar('secret');
|
||||
|
||||
const options = {
|
||||
algorithm: 'HS256',
|
||||
expiresIn: '1h'
|
||||
};
|
||||
|
||||
try {
|
||||
console.log('Testing JWT encoding...');
|
||||
const token = jwt.sign(payload, secret, options);
|
||||
|
||||
console.log('JWT Token encoded successfully:', token);
|
||||
|
||||
bru.setEnvVar('jwt_token', token);
|
||||
|
||||
bru.setEnvVar('original_payload', JSON.stringify(payload));
|
||||
|
||||
console.log('JWT encoding test passed!');
|
||||
|
||||
} catch (error) {
|
||||
console.error('JWT encoding failed:', error.message);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
tests {
|
||||
const atob = require('atob')
|
||||
|
||||
test("JWT token should be generated", function() {
|
||||
const jwtToken = bru.getEnvVar('jwt_token');
|
||||
expect(jwtToken).to.exist;
|
||||
});
|
||||
|
||||
test("JWT token should be a string", function() {
|
||||
const jwtToken = bru.getEnvVar('jwt_token');
|
||||
expect(typeof jwtToken).to.equal('string');
|
||||
});
|
||||
|
||||
test("JWT token should have 3 parts (header.payload.signature)", function() {
|
||||
const jwtToken = bru.getEnvVar('jwt_token');
|
||||
const parts = jwtToken.split('.');
|
||||
expect(parts.length).to.equal(3);
|
||||
});
|
||||
|
||||
test("JWT token should be valid base64", function() {
|
||||
const jwtToken = bru.getEnvVar('jwt_token');
|
||||
const parts = jwtToken.split('.');
|
||||
|
||||
// Test that each part is valid base64
|
||||
parts.forEach((part, index) => {
|
||||
try {
|
||||
atob(part);
|
||||
} catch (e) {
|
||||
throw new Error(`JWT part ${index + 1} is not valid base64`);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
test("JWT token should contain expected payload data", function() {
|
||||
const jwtToken = bru.getEnvVar('jwt_token');
|
||||
const originalPayload = JSON.parse(bru.getEnvVar('original_payload'));
|
||||
|
||||
// Decode the payload part (second part of JWT)
|
||||
const parts = jwtToken.split('.');
|
||||
const payloadPart = parts[1];
|
||||
const decodedPayload = JSON.parse(atob(payloadPart));
|
||||
console.log(decodedPayload)
|
||||
|
||||
expect(decodedPayload.userId).to.equal(originalPayload.userId);
|
||||
expect(decodedPayload.username).to.equal(originalPayload.username);
|
||||
expect(decodedPayload.role).to.equal(originalPayload.role);
|
||||
});
|
||||
|
||||
test("JWT token should have proper header", function() {
|
||||
const jwtToken = bru.getEnvVar('jwt_token');
|
||||
const parts = jwtToken.split('.');
|
||||
const headerPart = parts[0];
|
||||
const header = JSON.parse(atob(headerPart));
|
||||
|
||||
expect(header.alg).to.equal('HS256');
|
||||
expect(header.typ).to.equal('JWT');
|
||||
});
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
meta {
|
||||
name: verify
|
||||
seq: 2
|
||||
}
|
||||
|
||||
auth {
|
||||
mode: inherit
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
meta {
|
||||
name: verify with callback err
|
||||
type: http
|
||||
seq: 2
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{host}}/api/echo
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
tests {
|
||||
const jwt = require('jsonwebtoken');
|
||||
|
||||
const HS_SECRET = 'supersecret';
|
||||
|
||||
function verifyViaCallback(token, secret, options = {}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
jwt.verify(token, secret, options, (err, decoded) => {
|
||||
if (err) return reject(err);
|
||||
resolve(decoded);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function createValidToken(payload = { sub: 'user123' }, secret = HS_SECRET) {
|
||||
return jwt.sign(payload, secret, { algorithm: 'HS256', expiresIn: '1h' });
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
ERROR TESTS — jwt.verify should call callback with `err`
|
||||
============================================================ */
|
||||
|
||||
test('ERROR (callback) — malformed token', async function () {
|
||||
const malformedToken = 'abc.def'; // not a valid JWT
|
||||
try {
|
||||
await verifyViaCallback(malformedToken, HS_SECRET, { algorithms: ['HS256'] });
|
||||
throw new Error('Expected jwt.verify to error via callback');
|
||||
} catch (err) {
|
||||
expect(err).to.be.instanceOf(Error);
|
||||
expect(String(err.message)).to.match(/jwt malformed|invalid token/i);
|
||||
}
|
||||
});
|
||||
|
||||
test('ERROR (callback) — invalid signature (wrong secret)', async function () {
|
||||
const token = createValidToken(); // signed with HS_SECRET
|
||||
try {
|
||||
await verifyViaCallback(token, 'wrong_secret', { algorithms: ['HS256'] });
|
||||
throw new Error('Expected jwt.verify to error via callback');
|
||||
} catch (err) {
|
||||
expect(err).to.be.instanceOf(Error);
|
||||
expect(String(err.message)).to.match(/invalid signature/i);
|
||||
}
|
||||
});
|
||||
|
||||
test('ERROR (callback) — invalid algorithm', async function () {
|
||||
const token = createValidToken();
|
||||
try {
|
||||
// Pass unsupported algorithm intentionally
|
||||
await verifyViaCallback(token, HS_SECRET, { algorithms: ['RS256'] });
|
||||
throw new Error('Expected jwt.verify to error due to invalid algorithm');
|
||||
} catch (err) {
|
||||
expect(err).to.be.instanceOf(Error);
|
||||
expect(String(err.message)).to.match(/invalid algorithm/i);
|
||||
}
|
||||
});
|
||||
|
||||
test('ERROR (callback) — missing secret', async function () {
|
||||
const token = createValidToken();
|
||||
try {
|
||||
await verifyViaCallback(token, undefined, { algorithms: ['HS256'] });
|
||||
throw new Error('Expected jwt.verify to error due to missing secret');
|
||||
} catch (err) {
|
||||
expect(err).to.be.instanceOf(Error);
|
||||
expect(String(err.message)).to.match(/secret|key must be provided/i);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
}
|
||||
@@ -1,114 +0,0 @@
|
||||
meta {
|
||||
name: verify with callback token
|
||||
type: http
|
||||
seq: 3
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{host}}/api/echo
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
tests {
|
||||
const jwt = require('jsonwebtoken');
|
||||
|
||||
const HS_SECRET = 'supersecret';
|
||||
|
||||
const token = jwt.sign({ sub: 'user123' }, HS_SECRET, {
|
||||
algorithm: 'HS256',
|
||||
expiresIn: '15m',
|
||||
});
|
||||
|
||||
function once(fn) {
|
||||
let called = false;
|
||||
return (...args) => {
|
||||
if (!called) {
|
||||
called = true;
|
||||
fn(...args);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function verifyAsync(token, secret, options = {}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
jwt.verify(token, secret, options, (err, decoded) => {
|
||||
if (err) reject(err);
|
||||
else resolve(decoded);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
test('verify — named normal callback', function () {
|
||||
function verifyCallback(err, decoded) {
|
||||
expect(err).to.be.null;
|
||||
expect(decoded.sub).to.equal('user123');
|
||||
console.log('Named callback verified user:', decoded.sub);
|
||||
}
|
||||
|
||||
jwt.verify(token, HS_SECRET, { algorithms: ['HS256'] }, verifyCallback);
|
||||
});
|
||||
|
||||
test('verify — anonymous callback', function () {
|
||||
jwt.verify(token, HS_SECRET, { algorithms: ['HS256'] }, function (err, decoded) {
|
||||
expect(err).to.be.null;
|
||||
expect(decoded.sub).to.equal('user123');
|
||||
console.log('Anonymous callback verified user:', decoded.sub);
|
||||
});
|
||||
});
|
||||
|
||||
test('verify — arrow function callback', function () {
|
||||
jwt.verify(token, HS_SECRET, { algorithms: ['HS256'] }, (err, decoded) => {
|
||||
expect(err).to.be.null;
|
||||
expect(decoded.sub).to.equal('user123');
|
||||
console.log('Arrow callback verified user:', decoded.sub);
|
||||
});
|
||||
});
|
||||
|
||||
test('verify — bound method callback', function () {
|
||||
const handler = {
|
||||
prefix: '[VERIFY]',
|
||||
done(err, decoded) {
|
||||
expect(err).to.be.null;
|
||||
expect(decoded.sub).to.equal('user123');
|
||||
console.log(this.prefix, 'Bound callback verified user:', decoded.sub);
|
||||
},
|
||||
};
|
||||
|
||||
jwt.verify(token, HS_SECRET, { algorithms: ['HS256'] }, handler.done.bind(handler));
|
||||
});
|
||||
|
||||
function makeVerifyCallback(label) {
|
||||
return (err, decoded) => {
|
||||
expect(err).to.be.null;
|
||||
expect(decoded.sub).to.equal('user123');
|
||||
console.log(label, 'Higher-order callback verified user:', decoded.sub);
|
||||
};
|
||||
}
|
||||
|
||||
test('verify — higher-order callback', function () {
|
||||
const cb = makeVerifyCallback('[CUSTOM LABEL]');
|
||||
jwt.verify(token, HS_SECRET, { algorithms: ['HS256'] }, cb);
|
||||
});
|
||||
|
||||
test('verify — once-wrapped callback', function () {
|
||||
const cb = once((err, decoded) => {
|
||||
expect(err).to.be.null;
|
||||
expect(decoded.sub).to.equal('user123');
|
||||
console.log('Once callback executed and verified user:', decoded.sub);
|
||||
});
|
||||
|
||||
jwt.verify(token, HS_SECRET, { algorithms: ['HS256'] }, cb);
|
||||
});
|
||||
|
||||
test('verify — promise wrapper with async/await', async function () {
|
||||
const decoded = await verifyAsync(token, HS_SECRET, { algorithms: ['HS256'] });
|
||||
expect(decoded.sub).to.equal('user123');
|
||||
console.log('Promise/async verified user:', decoded.sub);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
}
|
||||
@@ -1,104 +0,0 @@
|
||||
meta {
|
||||
name: verify
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{host}}/api/echo
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
script:pre-request {
|
||||
const jwt = require('jsonwebtoken');
|
||||
|
||||
const validPayload = {
|
||||
userId: 789,
|
||||
username: 'verifyuser',
|
||||
role: 'admin',
|
||||
iat: Math.floor(Date.now() / 1000)
|
||||
};
|
||||
|
||||
const secret = bru.getEnvVar('secret') || 'test-secret-key';
|
||||
const wrongSecret = 'wrong-secret-key';
|
||||
|
||||
const validToken = jwt.sign(validPayload, secret, { algorithm: 'HS256', expiresIn: '1h' });
|
||||
const invalidToken = jwt.sign(validPayload, wrongSecret, { algorithm: 'HS256', expiresIn: '1h' });
|
||||
|
||||
|
||||
bru.setEnvVar('valid_token', validToken);
|
||||
bru.setEnvVar('invalid_token', invalidToken);
|
||||
|
||||
try {
|
||||
console.log('Testing JWT verification...');
|
||||
console.log('Valid token:', validToken);
|
||||
|
||||
const verified = jwt.verify(validToken, secret);
|
||||
|
||||
const verifiedWithOptions = jwt.verify(validToken, secret, {
|
||||
algorithms: ['HS256'],
|
||||
ignoreExpiration: false
|
||||
});
|
||||
if (!verifiedWithOptions) {
|
||||
throw new Error('Verification with options should work');
|
||||
}
|
||||
|
||||
console.log('JWT verification test passed!');
|
||||
|
||||
bru.setEnvVar('verified_payload', JSON.stringify(verified));
|
||||
|
||||
} catch (error) {
|
||||
console.error('JWT verification failed:', error.message);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
tests {
|
||||
test("Verified payload should exist", function() {
|
||||
const verifiedPayload = bru.getEnvVar('verified_payload');
|
||||
expect(verifiedPayload).to.exist;
|
||||
});
|
||||
|
||||
test("Verified payload should be valid JSON", function() {
|
||||
const verifiedPayload = bru.getEnvVar('verified_payload');
|
||||
const parsed = JSON.parse(verifiedPayload);
|
||||
expect(typeof parsed).to.equal('object');
|
||||
});
|
||||
|
||||
test("Verified payload should contain correct user data", function() {
|
||||
const verifiedPayload = JSON.parse(bru.getEnvVar('verified_payload'));
|
||||
|
||||
expect(verifiedPayload.userId).to.equal(789);
|
||||
expect(verifiedPayload.username).to.equal('verifyuser');
|
||||
expect(verifiedPayload.role).to.equal('admin');
|
||||
});
|
||||
|
||||
test("Verified payload should have timestamp fields", function() {
|
||||
const verifiedPayload = JSON.parse(bru.getEnvVar('verified_payload'));
|
||||
|
||||
expect(verifiedPayload.iat).to.exist;
|
||||
expect(verifiedPayload.exp).to.exist;
|
||||
expect(typeof verifiedPayload.iat).to.equal('number');
|
||||
expect(typeof verifiedPayload.exp).to.equal('number');
|
||||
});
|
||||
|
||||
test("Invalid token with wrong secret should throw error", function() {
|
||||
const jwt = require('jsonwebtoken');
|
||||
const invalidToken = bru.getEnvVar('invalid_token');
|
||||
const secret = bru.getEnvVar('secret') || 'test-secret-key';
|
||||
|
||||
try {
|
||||
jwt.verify(invalidToken, secret);
|
||||
expect.fail('Expected JWT verification to throw an error for invalid token');
|
||||
} catch (error) {
|
||||
expect(error).to.exist;
|
||||
expect(error.message).to.equal('invalid signature');
|
||||
console.log('Invalid token correctly threw error:', error.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"maximized": true,
|
||||
"lastOpenedCollections": ["{{projectRoot}}/tests/scripting/inbuilt-libraries/jsonwebtoken/fixtures/collection"],
|
||||
"preferences": {
|
||||
"request": {
|
||||
"sslVerification": true,
|
||||
"customCaCertificate": {
|
||||
"enabled": false,
|
||||
"filePath": ""
|
||||
},
|
||||
"keepDefaultCaCertificates": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"collections": [
|
||||
{
|
||||
"pathname": "{{projectRoot}}/tests/scripting/inbuilt-libraries/jsonwebtoken/fixtures/collection",
|
||||
"selectedEnvironment": "Prod"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
import { test, expect } from '../../../../playwright';
|
||||
|
||||
test.describe.serial('jwt collection success', () => {
|
||||
test('developer mode', async ({ pageWithUserData: page }) => {
|
||||
// init dev mode
|
||||
await page.getByTitle('jsonwebtoken').click();
|
||||
await page.getByLabel('Developer Mode(use only if').check();
|
||||
await page.getByRole('button', { name: 'Save' }).click();
|
||||
|
||||
test.setTimeout(2 * 60 * 1000);
|
||||
|
||||
// Run the collection
|
||||
await page.locator('.collection-actions').hover();
|
||||
await page.locator('.collection-actions .icon').click();
|
||||
await page.getByText('Run', { exact: true }).click();
|
||||
await page.getByRole('button', { name: 'Run Collection' }).click();
|
||||
await page.getByRole('button', { name: 'Run Again' }).waitFor({ timeout: 2 * 60 * 1000 });
|
||||
|
||||
// Parse and validate test results
|
||||
const result = await page.getByText('Total Requests: ').innerText();
|
||||
const matches = result.match(/Total Requests: (\d+), Passed: (\d+), Failed: (\d+), Skipped: (\d+)/);
|
||||
if (!matches) {
|
||||
throw new Error('Could not parse test results');
|
||||
}
|
||||
const [totalRequests, passed, failed, skipped] = matches.slice(1);
|
||||
|
||||
await expect(parseInt(totalRequests)).toBe(7);
|
||||
await expect(parseInt(passed)).toBe(7);
|
||||
await expect(parseInt(failed)).toBe(0);
|
||||
await expect(parseInt(skipped)).toBe(0);
|
||||
await expect(parseInt(passed)).toBe(parseInt(totalRequests) - parseInt(skipped) - parseInt(failed));
|
||||
});
|
||||
|
||||
test('safe mode', async ({ pageWithUserData: page }) => {
|
||||
// init safe mode
|
||||
await page.getByTitle('jsonwebtoken').click();
|
||||
await page.getByText('Developer Mode').click();
|
||||
await page.getByLabel('Safe Mode').check();
|
||||
await page.getByRole('button', { name: 'Save' }).click();
|
||||
|
||||
test.setTimeout(2 * 60 * 1000);
|
||||
|
||||
// Run the collection
|
||||
await page.locator('.collection-actions').hover();
|
||||
await page.locator('.collection-actions .icon').click();
|
||||
await page.getByText('Run', { exact: true }).click();
|
||||
await page.getByRole('button', { name: 'Run Collection' }).click();
|
||||
await page.getByRole('button', { name: 'Run Again' }).waitFor({ timeout: 2 * 60 * 1000 });
|
||||
|
||||
// Parse and validate test results
|
||||
const result = await page.getByText('Total Requests: ').innerText();
|
||||
const matches = result.match(/Total Requests: (\d+), Passed: (\d+), Failed: (\d+), Skipped: (\d+)/);
|
||||
if (!matches) {
|
||||
throw new Error('Could not parse test results');
|
||||
}
|
||||
const [totalRequests, passed, failed, skipped] = matches.slice(1);
|
||||
|
||||
await expect(parseInt(totalRequests)).toBe(7);
|
||||
await expect(parseInt(passed)).toBe(7);
|
||||
await expect(parseInt(failed)).toBe(0);
|
||||
await expect(parseInt(skipped)).toBe(0);
|
||||
await expect(parseInt(passed)).toBe(parseInt(totalRequests) - parseInt(skipped) - parseInt(failed));
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user