diff --git a/package-lock.json b/package-lock.json index fd428687b..7a7283ca7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,7 +28,7 @@ "@material-ui/styles": "^4.11.4", "@reach/auto-id": "^0.16.0", "@saleor/macaw-ui": "0.8.0-pre.81", - "@saleor/sdk": "^0.5.0", + "@saleor/sdk": "0.6.0", "@sentry/react": "^6.0.0", "@types/faker": "^5.1.6", "@uiw/react-color-hue": "0.0.34", @@ -115,9 +115,6 @@ "@graphql-codegen/typescript-react-apollo": "^3.2.5", "@percy/cli": "^1.21.0", "@percy/cypress": "^3.1.2", - "@pollyjs/adapter-node-http": "~5.0.0", - "@pollyjs/core": "~5.0.0", - "@pollyjs/persister-fs": "~5.0.0", "@release-it/bumper": "^2.0.0", "@saleor/app-sdk": "0.37.3", "@types/apollo-upload-client": "^17.0.2", @@ -6744,88 +6741,6 @@ "node": ">=14" } }, - "node_modules/@pollyjs/adapter": { - "version": "5.0.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@pollyjs/utils": "^5.0.0" - } - }, - "node_modules/@pollyjs/adapter-node-http": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@pollyjs/adapter-node-http/-/adapter-node-http-5.0.2.tgz", - "integrity": "sha512-hpS7POhTo18jyeQxsu0OOJt4hCV9VD4FtHXkgb+YMbtqiENiGcEYj21S49xniW1tlxm0dsT08umtNlK/Qv5R8Q==", - "dev": true, - "dependencies": { - "@pollyjs/adapter": "^5.0.0", - "@pollyjs/utils": "^5.0.0", - "lodash-es": "^4.17.11", - "nock": "^12.0.3" - } - }, - "node_modules/@pollyjs/core": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@pollyjs/core/-/core-5.0.0.tgz", - "integrity": "sha512-f/v5z7aKSWdeBCZQFiQGL4aZmdWAuQWV+U/fMbAIEYjkX8Av0gWPhkFyeMfeFriYMg7Ts1XxPNI7LYroCnjn7w==", - "dev": true, - "dependencies": { - "@pollyjs/utils": "^5.0.0", - "@sindresorhus/fnv1a": "^1.2.0", - "blueimp-md5": "^2.10.0", - "fast-json-stable-stringify": "^2.0.0", - "is-absolute-url": "^3.0.0", - "lodash-es": "^4.17.11", - "route-recognizer": "^0.3.4", - "slugify": "^1.3.4" - } - }, - "node_modules/@pollyjs/node-server": { - "version": "5.0.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@pollyjs/utils": "^5.0.0", - "body-parser": "^1.19.0", - "cors": "^2.8.5", - "express": "^4.17.1", - "fs-extra": "^8.0.1", - "http-graceful-shutdown": "^2.3.1", - "morgan": "^1.9.1", - "nocache": "^2.1.0" - } - }, - "node_modules/@pollyjs/persister": { - "version": "5.0.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@pollyjs/utils": "^5.0.0", - "bowser": "^2.4.0", - "fast-json-stable-stringify": "^2.0.0", - "lodash-es": "^4.17.11", - "set-cookie-parser": "^2.3.5", - "utf8-byte-length": "^1.0.4" - } - }, - "node_modules/@pollyjs/persister-fs": { - "version": "5.0.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@pollyjs/node-server": "^5.0.0", - "@pollyjs/persister": "^5.0.0" - } - }, - "node_modules/@pollyjs/utils": { - "version": "5.0.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "qs": "^6.7.0", - "url-parse": "^1.4.7" - } - }, "node_modules/@radix-ui/number": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@radix-ui/number/-/number-1.0.0.tgz", @@ -8069,9 +7984,9 @@ } }, "node_modules/@saleor/sdk": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@saleor/sdk/-/sdk-0.5.0.tgz", - "integrity": "sha512-AC23IW9YpPcoB2ly3IOhO7/6pF2Hc0O0h3ufcl7/bV2/vrFQcd6SbUTn+vo96zlzX4jsgtOp+fjS0XHtHow9nQ==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@saleor/sdk/-/sdk-0.6.0.tgz", + "integrity": "sha512-w3V2ak0jdhM12j3rjBRfu6fl2XTB6vrC8RfTEpfiebrBgl474pJDP4gjzw4abwUhL6T5Knh0Chygv5kp7Y6nng==", "dependencies": { "cross-fetch": "^3.1.4", "jwt-decode": "^3.1.2" @@ -8317,14 +8232,6 @@ "integrity": "sha512-XJfwUVUKDHF5ugKwIcxEgc9k8b7HbznCp6eUfWgu710hMPNIO4aw4/zB5RogDQz8nd6gyCDpU9O/m6qYEWY6yQ==", "optional": true }, - "node_modules/@sindresorhus/fnv1a": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/@sindresorhus/is": { "version": "4.0.0", "devOptional": true, @@ -13332,7 +13239,7 @@ "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "devOptional": true, + "optional": true, "dependencies": { "mime-types": "~2.1.34", "negotiator": "0.6.3" @@ -13725,8 +13632,8 @@ }, "node_modules/array-flatten": { "version": "1.1.1", - "devOptional": true, - "license": "MIT" + "license": "MIT", + "optional": true }, "node_modules/array-includes": { "version": "3.1.3", @@ -14352,22 +14259,6 @@ ], "license": "MIT" }, - "node_modules/basic-auth": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "5.1.2" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/basic-auth/node_modules/safe-buffer": { - "version": "5.1.2", - "dev": true, - "license": "MIT" - }, "node_modules/bcrypt-pbkdf": { "version": "1.0.2", "license": "BSD-3-Clause", @@ -14498,16 +14389,11 @@ "devOptional": true, "license": "MIT" }, - "node_modules/blueimp-md5": { - "version": "2.18.0", - "dev": true, - "license": "MIT" - }, "node_modules/body-parser": { "version": "1.20.1", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", - "devOptional": true, + "optional": true, "dependencies": { "bytes": "3.1.2", "content-type": "~1.0.4", @@ -14529,22 +14415,22 @@ }, "node_modules/body-parser/node_modules/debug": { "version": "2.6.9", - "devOptional": true, "license": "MIT", + "optional": true, "dependencies": { "ms": "2.0.0" } }, "node_modules/body-parser/node_modules/ms": { "version": "2.0.0", - "devOptional": true, - "license": "MIT" + "license": "MIT", + "optional": true }, "node_modules/body-parser/node_modules/on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "devOptional": true, + "optional": true, "dependencies": { "ee-first": "1.1.1" }, @@ -14556,7 +14442,7 @@ "version": "6.11.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "devOptional": true, + "optional": true, "dependencies": { "side-channel": "^1.0.4" }, @@ -14572,11 +14458,6 @@ "dev": true, "license": "ISC" }, - "node_modules/bowser": { - "version": "2.11.0", - "dev": true, - "license": "MIT" - }, "node_modules/boxen": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", @@ -16024,8 +15905,8 @@ }, "node_modules/content-type": { "version": "1.0.4", - "devOptional": true, "license": "MIT", + "optional": true, "engines": { "node": ">= 0.6" } @@ -16045,15 +15926,15 @@ "version": "0.5.0", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", - "devOptional": true, + "optional": true, "engines": { "node": ">= 0.6" } }, "node_modules/cookie-signature": { "version": "1.0.6", - "devOptional": true, - "license": "MIT" + "license": "MIT", + "optional": true }, "node_modules/copy-descriptor": { "version": "0.1.1", @@ -16098,18 +15979,6 @@ "license": "MIT", "optional": true }, - "node_modules/cors": { - "version": "2.8.5", - "dev": true, - "license": "MIT", - "dependencies": { - "object-assign": "^4", - "vary": "^1" - }, - "engines": { - "node": ">= 0.10" - } - }, "node_modules/cosmiconfig": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", @@ -17723,7 +17592,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "devOptional": true, + "optional": true, "engines": { "node": ">= 0.8", "npm": "1.2.8000 || >= 1.4.16" @@ -18141,8 +18010,8 @@ }, "node_modules/ee-first": { "version": "1.1.1", - "devOptional": true, - "license": "MIT" + "license": "MIT", + "optional": true }, "node_modules/ejs": { "version": "3.1.9", @@ -18200,7 +18069,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "devOptional": true, + "optional": true, "engines": { "node": ">= 0.8" } @@ -19106,8 +18975,8 @@ }, "node_modules/escape-html": { "version": "1.0.3", - "devOptional": true, - "license": "MIT" + "license": "MIT", + "optional": true }, "node_modules/escape-string-regexp": { "version": "1.0.5", @@ -20005,8 +19874,8 @@ }, "node_modules/etag": { "version": "1.8.1", - "devOptional": true, "license": "MIT", + "optional": true, "engines": { "node": ">= 0.6" } @@ -20169,7 +20038,7 @@ "version": "4.18.2", "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", - "devOptional": true, + "optional": true, "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", @@ -20209,22 +20078,22 @@ }, "node_modules/express/node_modules/debug": { "version": "2.6.9", - "devOptional": true, "license": "MIT", + "optional": true, "dependencies": { "ms": "2.0.0" } }, "node_modules/express/node_modules/ms": { "version": "2.0.0", - "devOptional": true, - "license": "MIT" + "license": "MIT", + "optional": true }, "node_modules/express/node_modules/on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "devOptional": true, + "optional": true, "dependencies": { "ee-first": "1.1.1" }, @@ -20234,14 +20103,14 @@ }, "node_modules/express/node_modules/path-to-regexp": { "version": "0.1.7", - "devOptional": true, - "license": "MIT" + "license": "MIT", + "optional": true }, "node_modules/express/node_modules/qs": { "version": "6.11.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "devOptional": true, + "optional": true, "dependencies": { "side-channel": "^1.0.4" }, @@ -20644,7 +20513,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", - "devOptional": true, + "optional": true, "dependencies": { "debug": "2.6.9", "encodeurl": "~1.0.2", @@ -20662,7 +20531,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "devOptional": true, + "optional": true, "dependencies": { "ms": "2.0.0" } @@ -20671,13 +20540,13 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "devOptional": true + "optional": true }, "node_modules/finalhandler/node_modules/on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "devOptional": true, + "optional": true, "dependencies": { "ee-first": "1.1.1" }, @@ -21008,7 +20877,7 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "devOptional": true, + "optional": true, "engines": { "node": ">= 0.6" } @@ -21026,8 +20895,8 @@ }, "node_modules/fresh": { "version": "0.5.2", - "devOptional": true, "license": "MIT", + "optional": true, "engines": { "node": ">= 0.6" } @@ -22105,17 +21974,6 @@ "node": ">= 0.8" } }, - "node_modules/http-graceful-shutdown": { - "version": "2.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^4.1.1" - }, - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/http-proxy-agent": { "version": "4.0.1", "devOptional": true, @@ -22570,7 +22428,7 @@ "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "devOptional": true, + "optional": true, "engines": { "node": ">= 0.10" } @@ -22598,8 +22456,9 @@ }, "node_modules/is-absolute-url": { "version": "3.0.3", - "devOptional": true, - "license": "MIT", + "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-3.0.3.tgz", + "integrity": "sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==", + "optional": true, "engines": { "node": ">=8" } @@ -25131,8 +24990,8 @@ }, "node_modules/json-stringify-safe": { "version": "5.0.1", - "devOptional": true, - "license": "ISC" + "license": "ISC", + "optional": true }, "node_modules/json-to-pretty-yaml": { "version": "1.2.2", @@ -26860,8 +26719,8 @@ }, "node_modules/media-typer": { "version": "0.3.0", - "devOptional": true, "license": "MIT", + "optional": true, "engines": { "node": ">= 0.6" } @@ -26932,8 +26791,8 @@ }, "node_modules/merge-descriptors": { "version": "1.0.1", - "devOptional": true, - "license": "MIT" + "license": "MIT", + "optional": true }, "node_modules/merge-stream": { "version": "2.0.0", @@ -26964,8 +26823,8 @@ }, "node_modules/methods": { "version": "1.1.2", - "devOptional": true, "license": "MIT", + "optional": true, "engines": { "node": ">= 0.6" } @@ -26985,7 +26844,7 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "devOptional": true, + "optional": true, "bin": { "mime": "cli.js" }, @@ -27693,34 +27552,6 @@ "color-name": "^1.1.4" } }, - "node_modules/morgan": { - "version": "1.10.0", - "dev": true, - "license": "MIT", - "dependencies": { - "basic-auth": "~2.0.1", - "debug": "2.6.9", - "depd": "~2.0.0", - "on-finished": "~2.3.0", - "on-headers": "~1.0.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/morgan/node_modules/debug": { - "version": "2.6.9", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/morgan/node_modules/ms": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/mri": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", @@ -27784,7 +27615,7 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "devOptional": true, + "optional": true, "engines": { "node": ">= 0.6" } @@ -27794,28 +27625,6 @@ "devOptional": true, "license": "MIT" }, - "node_modules/nocache": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/nock": { - "version": "12.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^4.1.0", - "json-stringify-safe": "^5.0.1", - "lodash": "^4.17.13", - "propagate": "^2.0.0" - }, - "engines": { - "node": ">= 10.13" - } - }, "node_modules/node-dir": { "version": "0.1.17", "devOptional": true, @@ -28132,21 +27941,11 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/on-finished": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/on-headers": { "version": "1.0.2", - "devOptional": true, - "license": "MIT", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "optional": true, "engines": { "node": ">= 0.8" } @@ -28715,8 +28514,8 @@ }, "node_modules/parseurl": { "version": "1.3.3", - "devOptional": true, "license": "MIT", + "optional": true, "engines": { "node": ">= 0.8" } @@ -29194,14 +28993,6 @@ "version": "16.13.1", "license": "MIT" }, - "node_modules/propagate": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, "node_modules/prosemirror-commands": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/prosemirror-commands/-/prosemirror-commands-1.1.12.tgz", @@ -29284,7 +29075,7 @@ "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "devOptional": true, + "optional": true, "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" @@ -29492,8 +29283,8 @@ }, "node_modules/querystringify": { "version": "2.2.0", - "devOptional": true, - "license": "MIT" + "license": "MIT", + "optional": true }, "node_modules/queue": { "version": "6.0.2", @@ -29554,8 +29345,8 @@ }, "node_modules/range-parser": { "version": "1.2.1", - "devOptional": true, "license": "MIT", + "optional": true, "engines": { "node": ">= 0.6" } @@ -31398,8 +31189,8 @@ }, "node_modules/requires-port": { "version": "1.0.0", - "devOptional": true, - "license": "MIT" + "license": "MIT", + "optional": true }, "node_modules/resolve": { "version": "1.20.0", @@ -31674,11 +31465,6 @@ "resolved": "https://registry.npmjs.org/rope-sequence/-/rope-sequence-1.3.3.tgz", "integrity": "sha512-85aZYCxweiD5J8yTEbw+E6A27zSnLPNDL0WfPdw3YYodq7WjnTKo0q4dtyQ2gz23iPT8Q9CUyJtAaUNcTxRf5Q==" }, - "node_modules/route-recognizer": { - "version": "0.3.4", - "dev": true, - "license": "MIT" - }, "node_modules/run-async": { "version": "2.4.1", "dev": true, @@ -31860,7 +31646,7 @@ "version": "0.18.0", "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "devOptional": true, + "optional": true, "dependencies": { "debug": "2.6.9", "depd": "2.0.0", @@ -31884,7 +31670,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "devOptional": true, + "optional": true, "dependencies": { "ms": "2.0.0" } @@ -31893,19 +31679,19 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "devOptional": true + "optional": true }, "node_modules/send/node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "devOptional": true + "optional": true }, "node_modules/send/node_modules/on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "devOptional": true, + "optional": true, "dependencies": { "ee-first": "1.1.1" }, @@ -31972,7 +31758,7 @@ "version": "1.15.0", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", - "devOptional": true, + "optional": true, "dependencies": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", @@ -31988,11 +31774,6 @@ "devOptional": true, "license": "ISC" }, - "node_modules/set-cookie-parser": { - "version": "2.4.8", - "dev": true, - "license": "MIT" - }, "node_modules/set-value": { "version": "2.0.1", "dev": true, @@ -34135,8 +33916,8 @@ }, "node_modules/type-is": { "version": "1.6.18", - "devOptional": true, "license": "MIT", + "optional": true, "dependencies": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -34628,8 +34409,8 @@ }, "node_modules/url-parse": { "version": "1.5.3", - "devOptional": true, "license": "MIT", + "optional": true, "dependencies": { "querystringify": "^2.1.1", "requires-port": "^1.0.0" @@ -34745,11 +34526,6 @@ } } }, - "node_modules/utf8-byte-length": { - "version": "1.0.4", - "dev": true, - "license": "WTFPL" - }, "node_modules/util": { "version": "0.12.5", "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", @@ -34770,8 +34546,8 @@ }, "node_modules/utils-merge": { "version": "1.0.1", - "devOptional": true, "license": "MIT", + "optional": true, "engines": { "node": ">= 0.4.0" } @@ -34845,8 +34621,8 @@ }, "node_modules/vary": { "version": "1.1.2", - "devOptional": true, "license": "MIT", + "optional": true, "engines": { "node": ">= 0.8" } @@ -40676,83 +40452,6 @@ "integrity": "sha512-ZI6QbIhMZvE3P73ar7aeXcjSk8/czlS7h55QBynoJNorwimq5xed1CGPHu00uQsCO6dXeEKTfxQcqbCypRE6Hw==", "dev": true }, - "@pollyjs/adapter": { - "version": "5.0.0", - "dev": true, - "requires": { - "@pollyjs/utils": "^5.0.0" - } - }, - "@pollyjs/adapter-node-http": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@pollyjs/adapter-node-http/-/adapter-node-http-5.0.2.tgz", - "integrity": "sha512-hpS7POhTo18jyeQxsu0OOJt4hCV9VD4FtHXkgb+YMbtqiENiGcEYj21S49xniW1tlxm0dsT08umtNlK/Qv5R8Q==", - "dev": true, - "requires": { - "@pollyjs/adapter": "^5.0.0", - "@pollyjs/utils": "^5.0.0", - "lodash-es": "^4.17.11", - "nock": "^12.0.3" - } - }, - "@pollyjs/core": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@pollyjs/core/-/core-5.0.0.tgz", - "integrity": "sha512-f/v5z7aKSWdeBCZQFiQGL4aZmdWAuQWV+U/fMbAIEYjkX8Av0gWPhkFyeMfeFriYMg7Ts1XxPNI7LYroCnjn7w==", - "dev": true, - "requires": { - "@pollyjs/utils": "^5.0.0", - "@sindresorhus/fnv1a": "^1.2.0", - "blueimp-md5": "^2.10.0", - "fast-json-stable-stringify": "^2.0.0", - "is-absolute-url": "^3.0.0", - "lodash-es": "^4.17.11", - "route-recognizer": "^0.3.4", - "slugify": "^1.3.4" - } - }, - "@pollyjs/node-server": { - "version": "5.0.0", - "dev": true, - "requires": { - "@pollyjs/utils": "^5.0.0", - "body-parser": "^1.19.0", - "cors": "^2.8.5", - "express": "^4.17.1", - "fs-extra": "^8.0.1", - "http-graceful-shutdown": "^2.3.1", - "morgan": "^1.9.1", - "nocache": "^2.1.0" - } - }, - "@pollyjs/persister": { - "version": "5.0.0", - "dev": true, - "requires": { - "@pollyjs/utils": "^5.0.0", - "bowser": "^2.4.0", - "fast-json-stable-stringify": "^2.0.0", - "lodash-es": "^4.17.11", - "set-cookie-parser": "^2.3.5", - "utf8-byte-length": "^1.0.4" - } - }, - "@pollyjs/persister-fs": { - "version": "5.0.0", - "dev": true, - "requires": { - "@pollyjs/node-server": "^5.0.0", - "@pollyjs/persister": "^5.0.0" - } - }, - "@pollyjs/utils": { - "version": "5.0.0", - "dev": true, - "requires": { - "qs": "^6.7.0", - "url-parse": "^1.4.7" - } - }, "@radix-ui/number": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@radix-ui/number/-/number-1.0.0.tgz", @@ -41644,9 +41343,9 @@ } }, "@saleor/sdk": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@saleor/sdk/-/sdk-0.5.0.tgz", - "integrity": "sha512-AC23IW9YpPcoB2ly3IOhO7/6pF2Hc0O0h3ufcl7/bV2/vrFQcd6SbUTn+vo96zlzX4jsgtOp+fjS0XHtHow9nQ==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@saleor/sdk/-/sdk-0.6.0.tgz", + "integrity": "sha512-w3V2ak0jdhM12j3rjBRfu6fl2XTB6vrC8RfTEpfiebrBgl474pJDP4gjzw4abwUhL6T5Knh0Chygv5kp7Y6nng==", "requires": { "cross-fetch": "^3.1.4", "jwt-decode": "^3.1.2" @@ -41823,10 +41522,6 @@ "integrity": "sha512-XJfwUVUKDHF5ugKwIcxEgc9k8b7HbznCp6eUfWgu710hMPNIO4aw4/zB5RogDQz8nd6gyCDpU9O/m6qYEWY6yQ==", "optional": true }, - "@sindresorhus/fnv1a": { - "version": "1.2.0", - "dev": true - }, "@sindresorhus/is": { "version": "4.0.0", "devOptional": true @@ -45500,7 +45195,7 @@ "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "devOptional": true, + "optional": true, "requires": { "mime-types": "~2.1.34", "negotiator": "0.6.3" @@ -45756,7 +45451,7 @@ }, "array-flatten": { "version": "1.1.1", - "devOptional": true + "optional": true }, "array-includes": { "version": "3.1.3", @@ -46160,19 +45855,6 @@ "version": "1.5.1", "devOptional": true }, - "basic-auth": { - "version": "2.0.1", - "dev": true, - "requires": { - "safe-buffer": "5.1.2" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "dev": true - } - } - }, "bcrypt-pbkdf": { "version": "1.0.2", "optional": true, @@ -46264,15 +45946,11 @@ "version": "3.7.2", "devOptional": true }, - "blueimp-md5": { - "version": "2.18.0", - "dev": true - }, "body-parser": { "version": "1.20.1", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", - "devOptional": true, + "optional": true, "requires": { "bytes": "3.1.2", "content-type": "~1.0.4", @@ -46290,20 +45968,20 @@ "dependencies": { "debug": { "version": "2.6.9", - "devOptional": true, + "optional": true, "requires": { "ms": "2.0.0" } }, "ms": { "version": "2.0.0", - "devOptional": true + "optional": true }, "on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "devOptional": true, + "optional": true, "requires": { "ee-first": "1.1.1" } @@ -46312,7 +45990,7 @@ "version": "6.11.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "devOptional": true, + "optional": true, "requires": { "side-channel": "^1.0.4" } @@ -46323,10 +46001,6 @@ "version": "1.0.0", "dev": true }, - "bowser": { - "version": "2.11.0", - "dev": true - }, "boxen": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", @@ -47340,7 +47014,7 @@ }, "content-type": { "version": "1.0.4", - "devOptional": true + "optional": true }, "convert-source-map": { "version": "1.7.0", @@ -47357,11 +47031,11 @@ "version": "0.5.0", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", - "devOptional": true + "optional": true }, "cookie-signature": { "version": "1.0.6", - "devOptional": true + "optional": true }, "copy-descriptor": { "version": "0.1.1", @@ -47390,14 +47064,6 @@ "version": "1.0.2", "optional": true }, - "cors": { - "version": "2.8.5", - "dev": true, - "requires": { - "object-assign": "^4", - "vary": "^1" - } - }, "cosmiconfig": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", @@ -48494,7 +48160,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "devOptional": true + "optional": true }, "detect-indent": { "version": "6.1.0", @@ -48799,7 +48465,7 @@ }, "ee-first": { "version": "1.1.1", - "devOptional": true + "optional": true }, "ejs": { "version": "3.1.9", @@ -48835,7 +48501,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "devOptional": true + "optional": true }, "end-of-stream": { "version": "1.4.4", @@ -49310,7 +48976,7 @@ }, "escape-html": { "version": "1.0.3", - "devOptional": true + "optional": true }, "escape-string-regexp": { "version": "1.0.5" @@ -49894,7 +49560,7 @@ }, "etag": { "version": "1.8.1", - "devOptional": true + "optional": true }, "event-loop-spinner": { "version": "2.2.0", @@ -50015,7 +49681,7 @@ "version": "4.18.2", "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", - "devOptional": true, + "optional": true, "requires": { "accepts": "~1.3.8", "array-flatten": "1.1.1", @@ -50052,33 +49718,33 @@ "dependencies": { "debug": { "version": "2.6.9", - "devOptional": true, + "optional": true, "requires": { "ms": "2.0.0" } }, "ms": { "version": "2.0.0", - "devOptional": true + "optional": true }, "on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "devOptional": true, + "optional": true, "requires": { "ee-first": "1.1.1" } }, "path-to-regexp": { "version": "0.1.7", - "devOptional": true + "optional": true }, "qs": { "version": "6.11.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "devOptional": true, + "optional": true, "requires": { "side-channel": "^1.0.4" } @@ -50373,7 +50039,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", - "devOptional": true, + "optional": true, "requires": { "debug": "2.6.9", "encodeurl": "~1.0.2", @@ -50388,7 +50054,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "devOptional": true, + "optional": true, "requires": { "ms": "2.0.0" } @@ -50397,13 +50063,13 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "devOptional": true + "optional": true }, "on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "devOptional": true, + "optional": true, "requires": { "ee-first": "1.1.1" } @@ -50626,7 +50292,7 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "devOptional": true + "optional": true }, "fragment-cache": { "version": "0.2.1", @@ -50637,7 +50303,7 @@ }, "fresh": { "version": "0.5.2", - "devOptional": true + "optional": true }, "from": { "version": "0.1.7", @@ -51367,13 +51033,6 @@ "toidentifier": "1.0.1" } }, - "http-graceful-shutdown": { - "version": "2.4.0", - "dev": true, - "requires": { - "debug": "^4.1.1" - } - }, "http-proxy-agent": { "version": "4.0.1", "devOptional": true, @@ -51667,7 +51326,7 @@ "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "devOptional": true + "optional": true }, "is": { "version": "3.3.0", @@ -51685,7 +51344,9 @@ }, "is-absolute-url": { "version": "3.0.3", - "devOptional": true + "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-3.0.3.tgz", + "integrity": "sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==", + "optional": true }, "is-accessor-descriptor": { "version": "0.1.6", @@ -53325,7 +52986,7 @@ }, "json-stringify-safe": { "version": "5.0.1", - "devOptional": true + "optional": true }, "json-to-pretty-yaml": { "version": "1.2.2", @@ -54575,7 +54236,7 @@ }, "media-typer": { "version": "0.3.0", - "devOptional": true + "optional": true }, "memoize-one": { "version": "6.0.0", @@ -54630,7 +54291,7 @@ }, "merge-descriptors": { "version": "1.0.1", - "devOptional": true + "optional": true }, "merge-stream": { "version": "2.0.0", @@ -54644,7 +54305,7 @@ }, "methods": { "version": "1.1.2", - "devOptional": true + "optional": true }, "micromatch": { "version": "4.0.5", @@ -54657,7 +54318,7 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "devOptional": true + "optional": true }, "mime-db": { "version": "1.52.0", @@ -55145,30 +54806,6 @@ "color-name": "^1.1.4" } }, - "morgan": { - "version": "1.10.0", - "dev": true, - "requires": { - "basic-auth": "~2.0.1", - "debug": "2.6.9", - "depd": "~2.0.0", - "on-finished": "~2.3.0", - "on-headers": "~1.0.2" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "dev": true - } - } - }, "mri": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", @@ -55214,26 +54851,12 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "devOptional": true + "optional": true }, "neo-async": { "version": "2.6.2", "devOptional": true }, - "nocache": { - "version": "2.1.0", - "dev": true - }, - "nock": { - "version": "12.0.3", - "dev": true, - "requires": { - "debug": "^4.1.0", - "json-stringify-safe": "^5.0.1", - "lodash": "^4.17.13", - "propagate": "^2.0.0" - } - }, "node-dir": { "version": "0.1.17", "devOptional": true, @@ -55445,16 +55068,11 @@ "has": "^1.0.3" } }, - "on-finished": { - "version": "2.3.0", - "dev": true, - "requires": { - "ee-first": "1.1.1" - } - }, "on-headers": { "version": "1.0.2", - "devOptional": true + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "optional": true }, "once": { "version": "1.4.0", @@ -55834,7 +55452,7 @@ }, "parseurl": { "version": "1.3.3", - "devOptional": true + "optional": true }, "pascal-case": { "version": "3.1.2", @@ -56151,10 +55769,6 @@ } } }, - "propagate": { - "version": "2.0.1", - "dev": true - }, "prosemirror-commands": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/prosemirror-commands/-/prosemirror-commands-1.1.12.tgz", @@ -56236,7 +55850,7 @@ "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "devOptional": true, + "optional": true, "requires": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" @@ -56402,7 +56016,7 @@ }, "querystringify": { "version": "2.2.0", - "devOptional": true + "optional": true }, "queue": { "version": "6.0.2", @@ -56438,7 +56052,7 @@ }, "range-parser": { "version": "1.2.1", - "devOptional": true + "optional": true }, "raw-body": { "version": "2.5.1", @@ -57715,7 +57329,7 @@ }, "requires-port": { "version": "1.0.0", - "devOptional": true + "optional": true }, "resolve": { "version": "1.20.0", @@ -57891,10 +57505,6 @@ "resolved": "https://registry.npmjs.org/rope-sequence/-/rope-sequence-1.3.3.tgz", "integrity": "sha512-85aZYCxweiD5J8yTEbw+E6A27zSnLPNDL0WfPdw3YYodq7WjnTKo0q4dtyQ2gz23iPT8Q9CUyJtAaUNcTxRf5Q==" }, - "route-recognizer": { - "version": "0.3.4", - "dev": true - }, "run-async": { "version": "2.4.1", "dev": true @@ -58007,7 +57617,7 @@ "version": "0.18.0", "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "devOptional": true, + "optional": true, "requires": { "debug": "2.6.9", "depd": "2.0.0", @@ -58028,7 +57638,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "devOptional": true, + "optional": true, "requires": { "ms": "2.0.0" }, @@ -58037,7 +57647,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "devOptional": true + "optional": true } } }, @@ -58045,13 +57655,13 @@ "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "devOptional": true + "optional": true }, "on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "devOptional": true, + "optional": true, "requires": { "ee-first": "1.1.1" } @@ -58115,7 +57725,7 @@ "version": "1.15.0", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", - "devOptional": true, + "optional": true, "requires": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", @@ -58127,10 +57737,6 @@ "version": "2.0.0", "devOptional": true }, - "set-cookie-parser": { - "version": "2.4.8", - "dev": true - }, "set-value": { "version": "2.0.1", "dev": true, @@ -59689,7 +59295,7 @@ }, "type-is": { "version": "1.6.18", - "devOptional": true, + "optional": true, "requires": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -60017,7 +59623,7 @@ }, "url-parse": { "version": "1.5.3", - "devOptional": true, + "optional": true, "requires": { "querystringify": "^2.1.1", "requires-port": "^1.0.0" @@ -60078,10 +59684,6 @@ "tslib": "^2.0.0" } }, - "utf8-byte-length": { - "version": "1.0.4", - "dev": true - }, "util": { "version": "0.12.5", "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", @@ -60101,7 +59703,7 @@ }, "utils-merge": { "version": "1.0.1", - "devOptional": true + "optional": true }, "uuid": { "version": "3.4.0", @@ -60151,7 +59753,7 @@ }, "vary": { "version": "1.1.2", - "devOptional": true + "optional": true }, "verror": { "version": "1.10.0", diff --git a/package.json b/package.json index 6ac436941..f939fbc92 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "@material-ui/styles": "^4.11.4", "@reach/auto-id": "^0.16.0", "@saleor/macaw-ui": "0.8.0-pre.81", - "@saleor/sdk": "^0.5.0", + "@saleor/sdk": "0.6.0", "@sentry/react": "^6.0.0", "@types/faker": "^5.1.6", "@uiw/react-color-hue": "0.0.34", @@ -122,9 +122,6 @@ "@graphql-codegen/typescript-react-apollo": "^3.2.5", "@percy/cli": "^1.21.0", "@percy/cypress": "^3.1.2", - "@pollyjs/adapter-node-http": "~5.0.0", - "@pollyjs/core": "~5.0.0", - "@pollyjs/persister-fs": "~5.0.0", "@release-it/bumper": "^2.0.0", "@saleor/app-sdk": "0.37.3", "@types/apollo-upload-client": "^17.0.2", diff --git a/recordings/User_3768991250/will-be-logged-in-if-has-valid-credentials_3587751314/recording.har b/recordings/User_3768991250/will-be-logged-in-if-has-valid-credentials_3587751314/recording.har deleted file mode 100644 index 763f052f9..000000000 --- a/recordings/User_3768991250/will-be-logged-in-if-has-valid-credentials_3587751314/recording.har +++ /dev/null @@ -1,133 +0,0 @@ -{ - "log": { - "_recordingName": "User/will be logged in if has valid credentials", - "creator": { - "comment": "persister:fs", - "name": "Polly.JS", - "version": "5.1.0" - }, - "entries": [ - { - "_id": "916a39b70c19064326e4caf3e7a38f9d", - "_order": 0, - "cache": {}, - "request": { - "bodySize": 620, - "cookies": [], - "headers": [ - { - "_fromType": "array", - "name": "accept", - "value": "*/*" - }, - { - "_fromType": "array", - "name": "content-type", - "value": "application/json" - }, - { - "_fromType": "array", - "name": "content-length", - "value": "620" - }, - { - "_fromType": "array", - "name": "user-agent", - "value": "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" - }, - { - "_fromType": "array", - "name": "accept-encoding", - "value": "gzip,deflate" - }, - { - "_fromType": "array", - "name": "connection", - "value": "close" - }, - { - "name": "host", - "value": "localhost:8000" - } - ], - "headersSize": 254, - "httpVersion": "HTTP/1.1", - "method": "POST", - "postData": { - "mimeType": "application/json", - "params": [], - "text": "{\"operationName\":\"loginWithoutDetails\",\"variables\":{\"email\":\"admin@example.com\",\"password\":\"admin\"},\"query\":\"fragment AccountErrorFragment on AccountError {\\n code\\n field\\n message\\n __typename\\n}\\n\\nfragment UserBaseFragment on User {\\n id\\n email\\n firstName\\n lastName\\n isStaff\\n __typename\\n}\\n\\nmutation loginWithoutDetails($email: String!, $password: String!) {\\n tokenCreate(email: $email, password: $password) {\\n csrfToken\\n token\\n errors {\\n ...AccountErrorFragment\\n __typename\\n }\\n user {\\n ...UserBaseFragment\\n __typename\\n }\\n __typename\\n }\\n}\\n\"}" - }, - "queryString": [], - "url": "http://localhost:8000/graphql/" - }, - "response": { - "bodySize": 984, - "content": { - "mimeType": "application/json", - "size": 984, - "text": "{\"data\": {\"tokenCreate\": {\"csrfToken\": \"0GedAMt3cXdGCfB9rqe7Tqc8ogIRYwvhWgpN2l4pXFOKcQDtXpczhD4CPDO4zV2d\", \"token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjEifQ.eyJpYXQiOjE2NDY4MjgwNDgsIm93bmVyIjoic2FsZW9yIiwiZXhwIjoxNjQ2ODI4MzQ4LCJ0b2tlbiI6IlBHSXN0dmFUS2xQcCIsImVtYWlsIjoiYWRtaW5AZXhhbXBsZS5jb20iLCJ0eXBlIjoiYWNjZXNzIiwidXNlcl9pZCI6IlZYTmxjam95TVE9PSIsImlzX3N0YWZmIjp0cnVlfQ.NQPcXACGUynrPfhYA_aoP_afZonMMQbmy_DBGM57HArB1BPQZSJXMJ4ye27buRN1CnwuWhSBHJP6J7XjOdH7F2WzXTldaIbud5TCms00ANde9AdJnJ92zL1vTuB99-oHC8PqJRUTMMn4hetYosKOb9FEAS6tD4u529Do8YiVnxcsdGxPmfEaN5HiwJ4HE76lfZH2rU6uin9Vdk14dmJKF-Rr_P_efCckgkvNwr3GAyX7L9zeVeJeDR4W1jeUY-f05OQKx9_qZazpWBVk1558JX1kBu6wQ2kFCiCLuUcv0L13GanLesP-FCDwgntTCwNmFXdqTdADAXzYc8KpoScpfg\", \"errors\": [], \"user\": {\"id\": \"VXNlcjoyMQ==\", \"email\": \"admin@example.com\", \"firstName\": \"\", \"lastName\": \"\", \"isStaff\": true, \"__typename\": \"User\"}, \"__typename\": \"CreateToken\"}}, \"extensions\": {\"cost\": {\"requestedQueryCost\": 0, \"maximumAvailable\": 50000}}}" - }, - "cookies": [ - { - "httpOnly": true, - "name": "refreshToken", - "path": "/", - "sameSite": "Lax", - "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjEifQ.eyJpYXQiOjE2NDY4MjgwNDgsIm93bmVyIjoic2FsZW9yIiwiZXhwIjoxNjQ5NDIwMDQ4LCJ0b2tlbiI6IlBHSXN0dmFUS2xQcCIsImVtYWlsIjoiYWRtaW5AZXhhbXBsZS5jb20iLCJ0eXBlIjoicmVmcmVzaCIsInVzZXJfaWQiOiJWWE5sY2pveU1RPT0iLCJpc19zdGFmZiI6dHJ1ZSwiY3NyZlRva2VuIjoiMEdlZEFNdDNjWGRHQ2ZCOXJxZTdUcWM4b2dJUll3dmhXZ3BOMmw0cFhGT0tjUUR0WHBjemhENENQRE80elYyZCJ9.eKJ4g02HziNjuKjxi_zEl5iz3EnrjzqWJjNYgVXxHMcXcJozOk5CrBpVFmM1ZUzdbXyPoHxW_UQeK0mVsMI9_owiYMfZcCyrOh1sDZB4oZVGA7Q_oYMLqc0Z81o_W-ZIN6Z3UNK4UKl7-1IRltJxVr4qmVtC7R5B_3Hnjs8xrEkcN0Q6sS0NyXYL9xVnazhDIRgrRQu4lU4co3eBCu0svyo7z5xESZmCRxsJZ1tfnoC-Gjx-6zO2hOFP4OrsbNWZcQhtoTDu5IbG8qthWI0eGvAkuK6jje0pnGrswuW_LlG1moBCy01C8K9WIYtYoT6BFnNMDc00W9MBNzGiN9rCXQ" - } - ], - "headers": [ - { - "name": "date", - "value": "Wed, 09 Mar 2022 12:14:08 GMT" - }, - { - "name": "server", - "value": "WSGIServer/0.2 CPython/3.9.10" - }, - { - "name": "content-type", - "value": "application/json" - }, - { - "name": "content-length", - "value": "984" - }, - { - "name": "x-content-type-options", - "value": "nosniff" - }, - { - "name": "referrer-policy", - "value": "same-origin" - }, - { - "_fromType": "array", - "name": "set-cookie", - "value": "refreshToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjEifQ.eyJpYXQiOjE2NDY4MjgwNDgsIm93bmVyIjoic2FsZW9yIiwiZXhwIjoxNjQ5NDIwMDQ4LCJ0b2tlbiI6IlBHSXN0dmFUS2xQcCIsImVtYWlsIjoiYWRtaW5AZXhhbXBsZS5jb20iLCJ0eXBlIjoicmVmcmVzaCIsInVzZXJfaWQiOiJWWE5sY2pveU1RPT0iLCJpc19zdGFmZiI6dHJ1ZSwiY3NyZlRva2VuIjoiMEdlZEFNdDNjWGRHQ2ZCOXJxZTdUcWM4b2dJUll3dmhXZ3BOMmw0cFhGT0tjUUR0WHBjemhENENQRE80elYyZCJ9.eKJ4g02HziNjuKjxi_zEl5iz3EnrjzqWJjNYgVXxHMcXcJozOk5CrBpVFmM1ZUzdbXyPoHxW_UQeK0mVsMI9_owiYMfZcCyrOh1sDZB4oZVGA7Q_oYMLqc0Z81o_W-ZIN6Z3UNK4UKl7-1IRltJxVr4qmVtC7R5B_3Hnjs8xrEkcN0Q6sS0NyXYL9xVnazhDIRgrRQu4lU4co3eBCu0svyo7z5xESZmCRxsJZ1tfnoC-Gjx-6zO2hOFP4OrsbNWZcQhtoTDu5IbG8qthWI0eGvAkuK6jje0pnGrswuW_LlG1moBCy01C8K9WIYtYoT6BFnNMDc00W9MBNzGiN9rCXQ; HttpOnly; Path=/; SameSite=Lax" - } - ], - "headersSize": 967, - "httpVersion": "HTTP/1.1", - "redirectURL": "", - "status": 200, - "statusText": "OK" - }, - "startedDateTime": "2022-03-09T12:14:07.734Z", - "time": 539, - "timings": { - "blocked": -1, - "connect": -1, - "dns": -1, - "receive": 0, - "send": 0, - "ssl": -1, - "wait": 539 - } - } - ], - "pages": [], - "version": "1.2" - } -} diff --git a/recordings/User_3768991250/will-not-be-logged-in-if-doesn-t-have-valid-credentials_3719199657/recording.har b/recordings/User_3768991250/will-not-be-logged-in-if-doesn-t-have-valid-credentials_3719199657/recording.har deleted file mode 100644 index 3bf44db4f..000000000 --- a/recordings/User_3768991250/will-not-be-logged-in-if-doesn-t-have-valid-credentials_3719199657/recording.har +++ /dev/null @@ -1,226 +0,0 @@ -{ - "log": { - "_recordingName": "User/will not be logged in if doesn't have valid credentials", - "creator": { - "comment": "persister:fs", - "name": "Polly.JS", - "version": "5.1.0" - }, - "entries": [ - { - "_id": "916a39b70c19064326e4caf3e7a38f9d", - "_order": 0, - "cache": {}, - "request": { - "bodySize": 636, - "cookies": [], - "headers": [ - { - "_fromType": "array", - "name": "accept", - "value": "*/*" - }, - { - "_fromType": "array", - "name": "content-type", - "value": "application/json" - }, - { - "_fromType": "array", - "name": "content-length", - "value": "636" - }, - { - "_fromType": "array", - "name": "user-agent", - "value": "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" - }, - { - "_fromType": "array", - "name": "accept-encoding", - "value": "gzip,deflate" - }, - { - "_fromType": "array", - "name": "connection", - "value": "close" - }, - { - "name": "host", - "value": "localhost:8000" - } - ], - "headersSize": 254, - "httpVersion": "HTTP/1.1", - "method": "POST", - "postData": { - "mimeType": "application/json", - "params": [], - "text": "{\"operationName\":\"loginWithoutDetails\",\"variables\":{\"email\":\"admin@example.com\",\"password\":\"NotAValidPassword123!\"},\"query\":\"fragment AccountErrorFragment on AccountError {\\n code\\n field\\n message\\n __typename\\n}\\n\\nfragment UserBaseFragment on User {\\n id\\n email\\n firstName\\n lastName\\n isStaff\\n __typename\\n}\\n\\nmutation loginWithoutDetails($email: String!, $password: String!) {\\n tokenCreate(email: $email, password: $password) {\\n csrfToken\\n token\\n errors {\\n ...AccountErrorFragment\\n __typename\\n }\\n user {\\n ...UserBaseFragment\\n __typename\\n }\\n __typename\\n }\\n}\\n\"}" - }, - "queryString": [], - "url": "http://localhost:8000/graphql/" - }, - "response": { - "bodySize": 321, - "content": { - "mimeType": "application/json", - "size": 321, - "text": "{\"data\": {\"tokenCreate\": {\"csrfToken\": null, \"token\": null, \"errors\": [{\"code\": \"INVALID_CREDENTIALS\", \"field\": \"email\", \"message\": \"Please, enter valid credentials\", \"__typename\": \"AccountError\"}], \"user\": null, \"__typename\": \"CreateToken\"}}, \"extensions\": {\"cost\": {\"requestedQueryCost\": 0, \"maximumAvailable\": 50000}}}" - }, - "cookies": [], - "headers": [ - { - "name": "date", - "value": "Wed, 09 Mar 2022 12:14:08 GMT" - }, - { - "name": "server", - "value": "WSGIServer/0.2 CPython/3.9.10" - }, - { - "name": "content-type", - "value": "application/json" - }, - { - "name": "content-length", - "value": "321" - }, - { - "name": "x-content-type-options", - "value": "nosniff" - }, - { - "name": "referrer-policy", - "value": "same-origin" - } - ], - "headersSize": 194, - "httpVersion": "HTTP/1.1", - "redirectURL": "", - "status": 200, - "statusText": "OK" - }, - "startedDateTime": "2022-03-09T12:14:08.308Z", - "time": 365, - "timings": { - "blocked": -1, - "connect": -1, - "dns": -1, - "receive": 0, - "send": 0, - "ssl": -1, - "wait": 365 - } - }, - { - "_id": "f36c6d9d965b62862363338cf17d6135", - "_order": 0, - "cache": {}, - "request": { - "bodySize": 324, - "cookies": [], - "headers": [ - { - "_fromType": "array", - "name": "accept", - "value": "*/*" - }, - { - "_fromType": "array", - "name": "content-type", - "value": "application/json" - }, - { - "_fromType": "array", - "name": "content-length", - "value": "324" - }, - { - "_fromType": "array", - "name": "user-agent", - "value": "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" - }, - { - "_fromType": "array", - "name": "accept-encoding", - "value": "gzip,deflate" - }, - { - "_fromType": "array", - "name": "connection", - "value": "close" - }, - { - "name": "host", - "value": "localhost:8000" - } - ], - "headersSize": 254, - "httpVersion": "HTTP/1.1", - "method": "POST", - "postData": { - "mimeType": "application/json", - "params": [], - "text": "[{\"operationName\":\"UserDetails\",\"variables\":{},\"query\":\"fragment User on User {\\n id\\n email\\n firstName\\n lastName\\n isStaff\\n userPermissions {\\n code\\n name\\n __typename\\n }\\n avatar {\\n url\\n __typename\\n }\\n __typename\\n}\\n\\nquery UserDetails {\\n me {\\n ...User\\n __typename\\n }\\n}\\n\"}]" - }, - "queryString": [], - "url": "http://localhost:8000/graphql/" - }, - "response": { - "bodySize": 102, - "content": { - "mimeType": "application/json", - "size": 102, - "text": "[{\"data\": {\"me\": null}, \"extensions\": {\"cost\": {\"requestedQueryCost\": 1, \"maximumAvailable\": 50000}}}]" - }, - "cookies": [], - "headers": [ - { - "name": "date", - "value": "Wed, 09 Mar 2022 12:14:08 GMT" - }, - { - "name": "server", - "value": "WSGIServer/0.2 CPython/3.9.10" - }, - { - "name": "content-type", - "value": "application/json" - }, - { - "name": "content-length", - "value": "102" - }, - { - "name": "x-content-type-options", - "value": "nosniff" - }, - { - "name": "referrer-policy", - "value": "same-origin" - } - ], - "headersSize": 194, - "httpVersion": "HTTP/1.1", - "redirectURL": "", - "status": 200, - "statusText": "OK" - }, - "startedDateTime": "2022-03-09T12:14:08.311Z", - "time": 70, - "timings": { - "blocked": -1, - "connect": -1, - "dns": -1, - "receive": 0, - "send": 0, - "ssl": -1, - "wait": 70 - } - } - ], - "pages": [], - "version": "1.2" - } -} diff --git a/recordings/User_3768991250/will-not-be-logged-in-if-is-non-staff_2544500193/recording.har b/recordings/User_3768991250/will-not-be-logged-in-if-is-non-staff_2544500193/recording.har deleted file mode 100644 index 97c26c8be..000000000 --- a/recordings/User_3768991250/will-not-be-logged-in-if-is-non-staff_2544500193/recording.har +++ /dev/null @@ -1,120 +0,0 @@ -{ - "log": { - "_recordingName": "User/will not be logged in if is non-staff", - "creator": { - "comment": "persister:fs", - "name": "Polly.JS", - "version": "5.1.0" - }, - "entries": [ - { - "_id": "916a39b70c19064326e4caf3e7a38f9d", - "_order": 0, - "cache": {}, - "request": { - "bodySize": 624, - "cookies": [], - "headers": [ - { - "_fromType": "array", - "name": "accept", - "value": "*/*" - }, - { - "_fromType": "array", - "name": "content-type", - "value": "application/json" - }, - { - "_fromType": "array", - "name": "content-length", - "value": "624" - }, - { - "_fromType": "array", - "name": "user-agent", - "value": "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" - }, - { - "_fromType": "array", - "name": "accept-encoding", - "value": "gzip,deflate" - }, - { - "_fromType": "array", - "name": "connection", - "value": "close" - }, - { - "name": "host", - "value": "localhost:8000" - } - ], - "headersSize": 254, - "httpVersion": "HTTP/1.1", - "method": "POST", - "postData": { - "mimeType": "application/json", - "params": [], - "text": "{\"operationName\":\"loginWithoutDetails\",\"variables\":{\"email\":\"client@example.com\",\"password\":\"password\"},\"query\":\"fragment AccountErrorFragment on AccountError {\\n code\\n field\\n message\\n __typename\\n}\\n\\nfragment UserBaseFragment on User {\\n id\\n email\\n firstName\\n lastName\\n isStaff\\n __typename\\n}\\n\\nmutation loginWithoutDetails($email: String!, $password: String!) {\\n tokenCreate(email: $email, password: $password) {\\n csrfToken\\n token\\n errors {\\n ...AccountErrorFragment\\n __typename\\n }\\n user {\\n ...UserBaseFragment\\n __typename\\n }\\n __typename\\n }\\n}\\n\"}" - }, - "queryString": [], - "url": "http://localhost:8000/graphql/" - }, - "response": { - "bodySize": 321, - "content": { - "mimeType": "application/json", - "size": 321, - "text": "{\"data\": {\"tokenCreate\": {\"csrfToken\": null, \"token\": null, \"errors\": [{\"code\": \"INVALID_CREDENTIALS\", \"field\": \"email\", \"message\": \"Please, enter valid credentials\", \"__typename\": \"AccountError\"}], \"user\": null, \"__typename\": \"CreateToken\"}}, \"extensions\": {\"cost\": {\"requestedQueryCost\": 0, \"maximumAvailable\": 50000}}}" - }, - "cookies": [], - "headers": [ - { - "name": "date", - "value": "Wed, 09 Mar 2022 12:14:08 GMT" - }, - { - "name": "server", - "value": "WSGIServer/0.2 CPython/3.9.10" - }, - { - "name": "content-type", - "value": "application/json" - }, - { - "name": "content-length", - "value": "321" - }, - { - "name": "x-content-type-options", - "value": "nosniff" - }, - { - "name": "referrer-policy", - "value": "same-origin" - } - ], - "headersSize": 194, - "httpVersion": "HTTP/1.1", - "redirectURL": "", - "status": 200, - "statusText": "OK" - }, - "startedDateTime": "2022-03-09T12:14:08.691Z", - "time": 121, - "timings": { - "blocked": -1, - "connect": -1, - "dns": -1, - "receive": 0, - "send": 0, - "ssl": -1, - "wait": 121 - } - } - ], - "pages": [], - "version": "1.2" - } -} diff --git a/src/auth/AuthProvider.test.tsx b/src/auth/AuthProvider.test.tsx index 3245ae2c2..7e97a4b0e 100644 --- a/src/auth/AuthProvider.test.tsx +++ b/src/auth/AuthProvider.test.tsx @@ -1,42 +1,12 @@ -/** @jest-environment setup-polly-jest/jest-environment-jsdom */ - -import { getApiUrl } from "@dashboard/config"; -import { createSaleorClient, SaleorProvider } from "@saleor/sdk"; -import setupApi from "@test/api"; +import { useApolloClient } from "@apollo/client"; +import { useUserDetailsQuery } from "@dashboard/graphql"; +import useNotifier from "@dashboard/hooks/useNotifier"; +import { useAuth, useAuthState } from "@saleor/sdk"; import { act, renderHook } from "@testing-library/react-hooks"; -import React from "react"; -import { IntlProvider } from "react-intl"; -import { MemoryRouter as Router } from "react-router-dom"; +import { useIntl } from "react-intl"; import { useAuthProvider } from "./hooks/useAuthProvider"; -const apolloClient = setupApi(); - -function renderAuthProvider() { - const intl = { - formatMessage: ({ defaultMessage }) => defaultMessage, - }; - const notify = jest.fn(); - const saleorClient = createSaleorClient({ - apiUrl: getApiUrl(), - channel: "", - }); - const wrapper = ({ children }) => ( - - - {children} - - - ); - - const { result } = renderHook( - () => useAuthProvider({ intl: intl as any, notify, apolloClient }), - { wrapper }, - ); - - return result; -} - const adminCredentials = { email: "admin@example.com", password: "admin", @@ -53,43 +23,202 @@ beforeEach(() => { sessionStorage.clear(); }); -describe("User", () => { - it("will be logged in if has valid credentials", async () => { - const hook = renderAuthProvider(); +jest.mock("react-intl", () => ({ + useIntl: jest.fn(() => ({ + formatMessage: jest.fn(x => x.defaultMessage), + })), + defineMessages: jest.fn(x => x), +})); - await act(async () => { - const result = await hook.current.login( +jest.mock("@saleor/sdk", () => ({ + useAuth: jest.fn(() => ({ + login: jest.fn(() => ({ + data: { + tokenCreate: { + errors: [], + user: { + userPermissions: [ + { + code: "MANAGE_USERS", + name: "Handle checkouts", + }, + ], + }, + }, + }, + })), + logout: jest.fn(), + })), + useAuthState: jest.fn(() => undefined), +})); +jest.mock("@apollo/client", () => ({ + useApolloClient: jest.fn(() => ({ + clearStore: jest.fn(), + })), + ApolloError: jest.fn(), +})); + +jest.mock("@dashboard/graphql", () => ({ + useUserDetailsQuery: jest.fn(() => ({ + data: undefined, + })), +})); + +jest.mock("@dashboard/hooks/useNotifier", () => ({ + __esModule: true, + default: jest.fn(() => () => undefined), +})); + +jest.mock("@dashboard/hooks/useNavigator", () => ({ + __esModule: true, + default: jest.fn(() => () => undefined), +})); +jest.mock("@dashboard/hooks/useLocalStorage", () => ({ + __esModule: true, + default: jest.fn(() => []), +})); +jest.mock("@dashboard/auth", () => ({ + useUser: jest.fn(), +})); +jest.mock("use-react-router", () => ({ + __esModule: true, + default: jest.fn(() => ({ + location: {}, + })), +})); + +describe("AuthProvider", () => { + it("Staff user will be logged in if has valid credentials", async () => { + // Arrange + const intl = useIntl(); + const notify = useNotifier(); + const apolloClient = useApolloClient(); + + (useAuthState as jest.Mock).mockImplementation(() => ({ + authenticated: true, + authenticating: false, + user: { + isStaff: true, + }, + })); + (useUserDetailsQuery as jest.Mock).mockImplementation(() => ({ + data: { + me: { + email: adminCredentials.email, + isStaff: true, + }, + }, + })); + + // Act + const hook = renderHook(() => + useAuthProvider({ intl, notify, apolloClient }), + ); + await act(async () => + hook.result.current.login( adminCredentials.email, adminCredentials.password, - ); - expect(result.user?.email).toBe(adminCredentials.email); - }); - expect(hook.current.authenticated).toBe(true); + ), + ); + + // Assert + expect(hook.result.current.user?.email).toBe(adminCredentials.email); + expect(hook.result.current.authenticated).toBe(true); }); - it("will not be logged in if doesn't have valid credentials", async () => { - const hook = renderAuthProvider(); + it("User will not be logged in if doesn't have valid credentials", async () => { + // Arrange + const intl = useIntl(); + const notify = useNotifier(); + const apolloClient = useApolloClient(); - await act(async () => { - const result = await hook.current.login( - adminCredentials.email, - "NotAValidPassword123!", - ); - expect(result.user).toBe(null); - }); - expect(hook.current.authenticated).toBe(false); + (useAuthState as jest.Mock).mockImplementation(() => ({ + authenticated: false, + authenticating: false, + })); + (useUserDetailsQuery as jest.Mock).mockImplementation(() => ({ + data: { + me: null, + }, + })); + + // Act + const hook = renderHook(() => + useAuthProvider({ intl, notify, apolloClient }), + ); + + // Assert + expect(hook.result.current.user).toBe(null); + expect(hook.result.current.authenticated).toBe(false); }); - it("will not be logged in if is non-staff", async () => { - const hook = renderAuthProvider(); + it("Non-staff user will not be logged in", async () => { + // Arrange + const intl = useIntl(); + const notify = useNotifier(); + const apolloClient = useApolloClient(); - await act(async () => { - const result = await hook.current.login( + (useAuthState as jest.Mock).mockImplementation(() => ({ + authenticated: false, + authenticating: false, + })); + (useUserDetailsQuery as jest.Mock).mockImplementation(() => ({ + data: { + me: { + email: nonStaffUserCredentials.email, + isStaff: false, + }, + }, + })); + + // Act + const hook = renderHook(() => + useAuthProvider({ intl, notify, apolloClient }), + ); + await act(async () => + hook.result.current.login( nonStaffUserCredentials.email, nonStaffUserCredentials.password, - ); - expect(result.user).toBe(null); - }); - expect(hook.current.authenticated).toBe(false); + ), + ); + + // Assert + expect(hook.result.current.errors).toEqual([]); + expect(hook.result.current.authenticated).toBe(false); + }); + + it("Should logout user without userPermissions", async () => { + const intl = useIntl(); + const notify = useNotifier(); + const apolloClient = useApolloClient(); + + (useAuth as jest.Mock).mockImplementation(() => ({ + login: jest.fn(() => ({ + data: { + tokenCreate: { + errors: [], + user: { + userPermissions: [], + }, + }, + }, + })), + logout: jest.fn(), + })); + + // Act + const hook = renderHook(() => + useAuthProvider({ intl, notify, apolloClient }), + ); + await act(async () => + hook.result.current.login( + nonStaffUserCredentials.email, + nonStaffUserCredentials.password, + ), + ); + + // Assert + expect(hook.result.current.errors).toEqual(["noPermissionsError"]); + expect(hook.result.current.authenticated).toBe(false); }); }); diff --git a/src/auth/hooks/useAuthProvider.ts b/src/auth/hooks/useAuthProvider.ts index 84113e091..acf46ff9a 100644 --- a/src/auth/hooks/useAuthProvider.ts +++ b/src/auth/hooks/useAuthProvider.ts @@ -17,6 +17,7 @@ import { useAuth, useAuthState, } from "@saleor/sdk"; +import isEmpty from "lodash/isEmpty"; import { useEffect, useRef, useState } from "react"; import { IntlShape } from "react-intl"; import urlJoin from "url-join"; @@ -140,10 +141,16 @@ export function useAuthProvider({ includeDetails: false, }); + if (isEmpty(result.data?.tokenCreate.user.userPermissions)) { + setErrors(["noPermissionsError"]); + await handleLogout(); + } + if (result && !result.data.tokenCreate.errors.length) { if (DEMO_MODE) { displayDemoMessage(intl, notify); } + saveCredentials(result.data.tokenCreate.user, password); } else { setErrors(["loginError"]); @@ -183,6 +190,13 @@ export function useAuthProvider({ input: JSON.stringify(input), }); + if ( + isEmpty(result.data?.externalObtainAccessTokens.user.userPermissions) + ) { + setErrors(["noPermissionsError"]); + await handleLogout(); + } + if (result && !result.data?.externalObtainAccessTokens.errors.length) { if (DEMO_MODE) { displayDemoMessage(intl, notify); @@ -223,7 +237,7 @@ export function useAuthProvider({ loginByExternalPlugin: handleExternalLogin, logout: handleLogout, authenticating: authenticating && !errors.length, - authenticated: authenticated && user?.isStaff, + authenticated: authenticated && !!user?.isStaff && !errors.length, user: userDetails.data?.me, errors, }; diff --git a/src/auth/views/Login.tsx b/src/auth/views/Login.tsx index da9a22780..e06b969f1 100644 --- a/src/auth/views/Login.tsx +++ b/src/auth/views/Login.tsx @@ -82,6 +82,11 @@ const LoginView: React.FC = ({ params }) => { if (externalAuthParamsExist && externalAuthNotPerformed) { handleExternalAuthentication(code, state); } + + return () => { + setRequestedExternalPluginId(null); + setFallbackUri(null); + }; }, []); return ( diff --git a/testUtils/api.ts b/testUtils/api.ts deleted file mode 100644 index 56659dc27..000000000 --- a/testUtils/api.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { ApolloClient, InMemoryCache } from "@apollo/client"; -import { BatchHttpLink } from "@apollo/client/link/batch-http"; -import { getApiUrl } from "@dashboard/config"; -import { createFetch } from "@saleor/sdk"; -import isCI from "is-ci"; -import path from "path"; -import { setupPolly } from "setup-polly-jest"; - -const POLLY_MODES = ["replay", "record", "passthrough", "stopped"] as const; - -function getPollyMode() { - const env = process.env.POLLY_MODE as (typeof POLLY_MODES)[number]; - if (!env) { - return POLLY_MODES[0]; // replay - } - if (POLLY_MODES.includes(env)) { - return env; - } - console.warn(`Unrecognised POLLY_MODE env variable value: ${env}`); - return POLLY_MODES[0]; // replay -} - -function getPollyRecordIfMissing() { - const env = process.env.POLLY_RECORD_IF_MISSING; - if (!env) { - return !isCI; - } - return env === "true"; -} - -function setupApi() { - setupPolly({ - adapters: [require("@pollyjs/adapter-node-http")], - matchRequestsBy: { - headers: false, - url: { - hash: false, - hostname: true, - password: false, - pathname: true, - port: false, - protocol: false, - query: false, - username: false, - }, - body: false, - }, - mode: getPollyMode(), - recordIfMissing: getPollyRecordIfMissing(), - persister: require("@pollyjs/persister-fs"), - persisterOptions: { - keepUnusedRequests: false, - fs: { - recordingsDir: path.resolve(__dirname, "../recordings"), - }, - }, - }); - const cache = new InMemoryCache(); - const link = new BatchHttpLink({ - fetch: createFetch(), - uri: getApiUrl(), - }); - const apolloClient = new ApolloClient({ - cache, - link, - }); - - return apolloClient; -} - -export default setupApi;