diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e5c5bf7..9681d6c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @zaiddreakh @maassenbas @msilvagarcia @AlexandrosMor @peterojo @wboereboom +* @zaiddreakh @maassenbas @AlexandrosMor @peterojo @wboereboom diff --git a/.npmignore b/.npmignore index f038eb0..115871f 100644 --- a/.npmignore +++ b/.npmignore @@ -7,4 +7,5 @@ src/ tsconfig.json jest.config.js tslint.json -webpack.config.js \ No newline at end of file +webpack.config.js +.github diff --git a/README.md b/README.md index 5f27d4b..db92a06 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ client.httpClient = httpClient; ### Example integration -For a closer look at how our PHP library works, clone our [example integration](https://github.com/adyen-examples/adyen-node-online-payments). This includes commented code, highlighting key features and concepts, and examples of API calls that can be made using the library. +For a closer look at how our NodeJS library works, clone our [example integration](https://github.com/adyen-examples/adyen-node-online-payments). This includes commented code, highlighting key features and concepts, and examples of API calls that can be made using the library. ## Contributing We strongly encourage you to join us in contributing to this repository so everyone can benefit from: @@ -128,4 +128,4 @@ If you have a feature request, or spotted a bug or a technical problem, create a This repository is available under the [MIT license](LICENSE). ## See also -* [example integration](https://github.com/adyen-examples/adyen-node-online-payments) \ No newline at end of file +* [example integration](https://github.com/adyen-examples/adyen-node-online-payments) diff --git a/package-lock.json b/package-lock.json index 83540a2..8ad867d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@adyen/api-library", - "version": "8.0.0", + "version": "8.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -740,9 +740,9 @@ } }, "@octokit/graphql": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.6.1.tgz", - "integrity": "sha512-2lYlvf4YTDgZCTXTW4+OX+9WTLFtEUc6hGm4qM1nlZjzxj+arizM4aHWzBVBCxY9glh7GIs0WEuiSgbVzv8cmA==", + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.6.2.tgz", + "integrity": "sha512-WmsIR1OzOr/3IqfG9JIczI8gMJUMzzyx5j0XXQ4YihHtKlQc+u35VpVoOXhlKAlaBntvry1WpAzPl/a+s3n89Q==", "dev": true, "requires": { "@octokit/request": "^5.3.0", @@ -751,9 +751,9 @@ } }, "@octokit/openapi-types": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-6.1.0.tgz", - "integrity": "sha512-Z9fDZVbGj4dFLErEoXUSuZhk3wJ8KVGnbrUwoPijsQ9EyNwOeQ+U2jSqaHUz8WtgIWf0aeO59oJyhMpWCKaabg==", + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-7.2.1.tgz", + "integrity": "sha512-IHQJpLciwzwDvciLxiFj3IEV5VYn7lSVcj5cu0jbTwMfK4IG6/g8SPrVp3Le1VRzIiYSRcBzm1dA7vgWelYP3Q==", "dev": true }, "@octokit/plugin-paginate-rest": { @@ -772,12 +772,12 @@ "dev": true }, "@octokit/plugin-rest-endpoint-methods": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.0.0.tgz", - "integrity": "sha512-Jc7CLNUueIshXT+HWt6T+M0sySPjF32mSFQAK7UfAg8qGeRI6OM1GSBxDLwbXjkqy2NVdnqCedJcP1nC785JYg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.0.1.tgz", + "integrity": "sha512-vvWbPtPqLyIzJ7A4IPdTl+8IeuKAwMJ4LjvmqWOOdfSuqWQYZXq2CEd0hsnkidff2YfKlguzujHs/reBdAx8Sg==", "dev": true, "requires": { - "@octokit/types": "^6.13.0", + "@octokit/types": "^6.13.1", "deprecation": "^2.3.1" } }, @@ -815,24 +815,24 @@ } }, "@octokit/rest": { - "version": "18.5.2", - "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.5.2.tgz", - "integrity": "sha512-Kz03XYfKS0yYdi61BkL9/aJ0pP2A/WK5vF/syhu9/kY30J8He3P68hv9GRpn8bULFx2K0A9MEErn4v3QEdbZcw==", + "version": "18.5.3", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.5.3.tgz", + "integrity": "sha512-KPAsUCr1DOdLVbZJgGNuE/QVLWEaVBpFQwDAz/2Cnya6uW2wJ/P5RVGk0itx7yyN1aGa8uXm2pri4umEqG1JBA==", "dev": true, "requires": { "@octokit/core": "^3.2.3", "@octokit/plugin-paginate-rest": "^2.6.2", "@octokit/plugin-request-log": "^1.0.2", - "@octokit/plugin-rest-endpoint-methods": "5.0.0" + "@octokit/plugin-rest-endpoint-methods": "5.0.1" } }, "@octokit/types": { - "version": "6.13.1", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.13.1.tgz", - "integrity": "sha512-UF/PL0y4SKGx/p1azFf7e6j9lB78tVwAFvnHtslzOJ6VipshYks74qm9jjTEDlCyaTmbhbk2h3Run5l0CtCF6A==", + "version": "6.16.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.16.0.tgz", + "integrity": "sha512-EktqSNq8EKXE82a7Vw33ozOEhFXIRik+rZHJTHAgVZRm/p2K5r5ecn5fVpRkLCm3CAVFwchRvt3yvtmfbt2LCQ==", "dev": true, "requires": { - "@octokit/openapi-types": "^6.0.0" + "@octokit/openapi-types": "^7.2.0" } }, "@sindresorhus/is": { @@ -1185,9 +1185,9 @@ "dev": true }, "acorn": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.2.4.tgz", - "integrity": "sha512-Ibt84YwBDDA890eDiDCEqcbwvHlBvzzDkU2cGBBDDI1QWT12jTiXIOn2CIw5KK4i6N5Z2HUxwYjzriDyqaqqZg==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.3.0.tgz", + "integrity": "sha512-tqPKHZ5CaBJw0Xmy0ZZvLs1qTV+BNFSyvn77ASXkpBNfIRk8ev26fKrD9iLGwGA9zedPao52GSHzq8lyZG0NUw==", "dev": true }, "acorn-globals": { @@ -1780,9 +1780,9 @@ } }, "normalize-url": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", - "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==", + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", + "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", "dev": true } } @@ -2308,14 +2308,6 @@ "requires": { "flat": "^5.0.2", "lodash": "^4.17.20" - }, - "dependencies": { - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - } } }, "deprecation": { @@ -2373,9 +2365,9 @@ } }, "dotenv": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-9.0.0.tgz", - "integrity": "sha512-yy3x9XjojW8ROTBePD25AcMoHqGHsvHmtfw8QWlpEXyMMXXPj6brUA464AptUvHuTPRmNz6Sd3ZLNLeJl6dHJA==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", + "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==", "dev": true }, "duplexer3": { @@ -3335,9 +3327,9 @@ "dev": true }, "hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, "html-encoding-sniffer": { @@ -3722,9 +3714,9 @@ } }, "is-ssh": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/is-ssh/-/is-ssh-1.3.2.tgz", - "integrity": "sha512-elEw0/0c2UscLrNG+OAorbP539E3rhliKPg+hDMWN9VwrDXfYK+4PBEykDPfxlYYtQvl84TascnQyobfQLHEhQ==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/is-ssh/-/is-ssh-1.3.3.tgz", + "integrity": "sha512-NKzJmQzJfEEma3w5cJNcUMxoXfDjz0Zj0eyCalHn2E6VOwlzjZo0yuO2fcBSf8zhFuVCL/82/r5gRcoi6aEPVQ==", "dev": true, "requires": { "protocols": "^1.1.0" @@ -4634,9 +4626,9 @@ } }, "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, "lodash-es": { @@ -4960,9 +4952,9 @@ "dev": true }, "nock": { - "version": "13.0.11", - "resolved": "https://registry.npmjs.org/nock/-/nock-13.0.11.tgz", - "integrity": "sha512-sKZltNkkWblkqqPAsjYW0bm3s9DcHRPiMOyKO/PkfJ+ANHZ2+LA2PLe22r4lLrKgXaiSaDQwW3qGsJFtIpQIeQ==", + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/nock/-/nock-13.1.0.tgz", + "integrity": "sha512-3N3DUY8XYrxxzWazQ+nSBpiaJ3q6gcpNh4gXovC/QBxrsvNp4tq+wsLHF6mJ3nrn3lPLn7KCJqKxy/9aD+0fdw==", "dev": true, "requires": { "debug": "^4.1.0", @@ -5097,9 +5089,9 @@ } }, "object-inspect": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.10.2.tgz", - "integrity": "sha512-gz58rdPpadwztRrPjZE9DZLOABUpTGdcANUgOwBFO1C+HZZhePoP83M65WGDmbpwFYJSWqavbl4SgDn4k8RYTA==", + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.10.3.tgz", + "integrity": "sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw==", "dev": true }, "object-visit": { @@ -5216,9 +5208,9 @@ "dev": true }, "p-cancelable": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.0.tgz", - "integrity": "sha512-HAZyB3ZodPo+BDpb4/Iu7Jv4P6cSazBz9ZM0ChhEXp70scx834aWCEjQRwgt41UzzejUAPdbqqONfRWTPYrPAQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", + "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", "dev": true }, "p-each-series": { @@ -5372,9 +5364,9 @@ "dev": true }, "normalize-url": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", - "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==", + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", + "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", "dev": true }, "p-cancelable": { @@ -5789,15 +5781,15 @@ } }, "release-it": { - "version": "14.6.1", - "resolved": "https://registry.npmjs.org/release-it/-/release-it-14.6.1.tgz", - "integrity": "sha512-noBho2997G3yrm6YvdLJj4Ua2SCFOU7ajCqtvteI3DZtpM1IhiyXSgcn2Q5irq8lTNK0it4eiNq9TSrAWNYDkA==", + "version": "14.7.0", + "resolved": "https://registry.npmjs.org/release-it/-/release-it-14.7.0.tgz", + "integrity": "sha512-g8z6BR7qsO1r0HtS4rquRU5PmwHrIZ5jYTuaaa1ZSLrh91Nm23PBpHR/0jsA549Qzujj4W/mkeskoAAIvHugWQ==", "dev": true, "requires": { "@iarna/toml": "2.2.5", - "@octokit/rest": "18.5.2", + "@octokit/rest": "18.5.3", "async-retry": "1.3.1", - "chalk": "4.1.0", + "chalk": "4.1.1", "cosmiconfig": "7.0.0", "debug": "4.3.1", "deprecated-obj": "2.0.0", @@ -5808,7 +5800,7 @@ "globby": "11.0.3", "got": "11.8.2", "import-cwd": "3.0.0", - "inquirer": "8.0.0", + "inquirer": "8.1.0", "is-ci": "3.0.0", "lodash": "4.17.21", "mime-types": "2.1.30", @@ -5825,9 +5817,9 @@ }, "dependencies": { "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -5911,19 +5903,20 @@ "dev": true }, "inquirer": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.0.0.tgz", - "integrity": "sha512-ON8pEJPPCdyjxj+cxsYRe6XfCJepTxANdNnTebsTuQgXpRyZRRT9t4dJwjRubgmvn20CLSEnozRUayXyM9VTXA==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.1.0.tgz", + "integrity": "sha512-1nKYPoalt1vMBfCMtpomsUc32wmOoWXAoq3kM/5iTfxyQ2f/BxjixQpC+mbZ7BI0JUXHED4/XPXekDVtJNpXYw==", "dev": true, "requires": { "ansi-escapes": "^4.2.1", - "chalk": "^4.1.0", + "chalk": "^4.1.1", "cli-cursor": "^3.1.0", "cli-width": "^3.0.0", "external-editor": "^3.0.3", "figures": "^3.0.0", "lodash": "^4.17.21", "mute-stream": "0.0.8", + "ora": "^5.3.0", "run-async": "^2.4.0", "rxjs": "^6.6.6", "string-width": "^4.1.0", @@ -5955,12 +5948,6 @@ "p-locate": "^5.0.0" } }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, "mime-db": { "version": "1.47.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz", @@ -7901,9 +7888,9 @@ } }, "ws": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.3.1.tgz", - "integrity": "sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA==", + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", "dev": true }, "xdg-basedir": { diff --git a/package.json b/package.json index 53535a5..25888f1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@adyen/api-library", - "version": "8.1.0", + "version": "8.1.1", "description": "The Adyen API Library for NodeJS enables you to work with Adyen APIs.", "main": "lib/src/index.js", "types": "lib/src/index.d.ts", @@ -41,14 +41,14 @@ "@typescript-eslint/parser": "2.34.0", "acorn": "^8.0.1", "coveralls": "3.1.0", - "dotenv": "^9.0.0", + "dotenv": "^10.0.0", "eslint": "6.8.0", "jest": "25.5.4", "jest-ts-auto-mock": "^2.0.0", "kind-of": "^6.0.3", "minimist": ">=1.2.3", - "nock": "13.0.11", - "release-it": "14.6.1", + "nock": "13.1.0", + "release-it": "14.7.0", "ts-auto-mock": "^2.6.5", "ts-jest": "25.5.1", "ts-loader": "8.0.10", diff --git a/src/__mocks__/base.ts b/src/__mocks__/base.ts index c1f9e15..0902a82 100644 --- a/src/__mocks__/base.ts +++ b/src/__mocks__/base.ts @@ -83,7 +83,11 @@ const saleData: SaleData = { version: "1", name: "test" } - } + }, + metadata: { + someMetaDataKey1: "YOUR_VALUE", + someMetaDataKey2: "YOUR_VALUE" + }, } }; diff --git a/src/__tests__/modification.spec.ts b/src/__tests__/modification.spec.ts new file mode 100644 index 0000000..1e0aaf1 --- /dev/null +++ b/src/__tests__/modification.spec.ts @@ -0,0 +1,264 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2020 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +import nock from "nock"; +import { createClient } from "../__mocks__/base"; +import Modification from "../services/modification"; +import Client from "../client"; + +const modificationResult: IPayouts.ModifyResponse = { + pspReference: "1234567890987654", + response: "[refund-received]" +}; + +const invalidModificationResult = { + "status": 422, + "errorCode": "167", + "message": "Original pspReference required for this operation", + "errorType": "validation" +}; + +const createModificationRequest = (): IPayments.ModificationRequest => { + return { + merchantAccount: process.env.ADYEN_MERCHANT!, + originalReference: "863620292981235A", + modificationAmount: { + value: 500 , + currency: "EUR" + } + }; +}; + +const createInvalidModificationRequest = (): IPayments.ModificationRequest => { + return { + merchantAccount: process.env.ADYEN_MERCHANT!, + originalReference: "invalidPspReference", + modificationAmount: { + value: 500 , + currency: "EUR" + } + }; +}; + +const createCancelRequest = (): IPayments.ModificationRequest => { + return { + merchantAccount: process.env.ADYEN_MERCHANT!, + originalReference: "862615382016087C" + }; +}; + +const createInvalidCancelRequest = (): IPayments.ModificationRequest => { + return { + merchantAccount: process.env.ADYEN_MERCHANT!, + originalReference: "invalidPspReference" + }; +}; + +let client: Client; +let modification: Modification; +let scope: nock.Scope; + +beforeEach((): void => { + if (!nock.isActive()) { + nock.activate(); + } + client = createClient(); + modification = new Modification(client); + scope = nock(`${client.config.endpoint}/pal/servlet/Payment/${Client.API_VERSION}`); +}); + +afterEach(() => { + nock.cleanAll(); +}); + +describe("Modification", (): void => { + test.each([false, true])("should perform a refund, isMock: %p", async (isMock): Promise => { + !isMock && nock.restore(); + scope.post("/refund") + .reply(200, modificationResult); + + const request = createModificationRequest(); + try { + const result = await modification.refund(request); + expect(result).toBeTruthy(); + } catch (e) { + fail(e.message); + } + }); + + test.each([false, true])("should fail to perform a refund, isMock: %p", async (isMock): Promise => { + !isMock && nock.restore(); + expect.assertions(2); + scope.post("/refund") + .reply(422, invalidModificationResult); + + const request = createInvalidModificationRequest(); + try { + await modification.refund(request); + } catch (e) { + expect(e.statusCode).toBe(422); + expect(e.message).toContain("Original pspReference required for this operation"); + } + }); + + test.each([false, true])("should perform a capture, isMock: %p", async (isMock): Promise => { + !isMock && nock.restore(); + scope.post("/capture") + .reply(200, modificationResult); + + const request = createModificationRequest(); + try { + const result = await modification.capture(request); + expect(result).toBeTruthy(); + } catch (e) { + fail(e.message); + } + }); + + test.each([false, true])("should fail to perform a capture, isMock: %p", async (isMock): Promise => { + !isMock && nock.restore(); + expect.assertions(2); + scope.post("/capture") + .reply(422, invalidModificationResult); + + const request = createInvalidModificationRequest(); + try { + await modification.capture(request); + } catch (e) { + expect(e.statusCode).toBe(422); + expect(e.message).toContain("Original pspReference required for this operation"); + } + }); + + test.each([false, true])("should perform a cancelOrRefund, isMock: %p", async (isMock): Promise => { + !isMock && nock.restore(); + scope.post("/cancelOrRefund") + .reply(200, modificationResult); + + const request = createCancelRequest(); + try { + const result = await modification.cancelOrRefund(request); + expect(result).toBeTruthy(); + } catch (e) { + fail(e.message); + } + }); + + test.each([false, true])("should fail to perform a cancelOrRefund, isMock: %p", async (isMock): Promise => { + !isMock && nock.restore(); + expect.assertions(2); + scope.post("/cancelOrRefund") + .reply(422, invalidModificationResult); + + const request = createInvalidCancelRequest(); + try { + await modification.cancelOrRefund(request); + } catch (e) { + expect(e.statusCode).toBe(422); + expect(e.message).toContain("Original pspReference required for this operation"); + } + }); + + test.each([false, true])("should perform a cancel, isMock: %p", async (isMock): Promise => { + !isMock && nock.restore(); + scope.post("/cancel") + .reply(200, modificationResult); + + const request = createCancelRequest(); + try { + const result = await modification.cancel(request); + expect(result).toBeTruthy(); + } catch (e) { + fail(e.message); + } + }); + + test.each([false, true])("should fail to perform a cancel, isMock: %p", async (isMock): Promise => { + !isMock && nock.restore(); + expect.assertions(2); + scope.post("/cancel") + .reply(422, invalidModificationResult); + + const request = createInvalidCancelRequest(); + try { + await modification.cancel(request); + } catch (e) { + expect(e.statusCode).toBe(422); + expect(e.message).toContain("Original pspReference required for this operation"); + } + }); + + test.each([false, true])("should perform a technicalCancel, isMock: %p", async (isMock): Promise => { + !isMock && nock.restore(); + scope.post("/technicalCancel") + .reply(200, modificationResult); + + const request = createCancelRequest(); + try { + const result = await modification.technicalCancel(request); + expect(result).toBeTruthy(); + } catch (e) { + fail(e.message); + } + }); + + test.each([false, true])("should fail to perform a technicalCancel, isMock: %p", async (isMock): Promise => { + !isMock && nock.restore(); + expect.assertions(2); + scope.post("/technicalCancel") + .reply(422, invalidModificationResult); + + const request = createInvalidCancelRequest(); + try { + await modification.technicalCancel(request); + } catch (e) { + expect(e.statusCode).toBe(422); + expect(e.message).toContain("Original pspReference required for this operation"); + } + }); + + test.each([false, true])("should perform a adjustAuthorisation, isMock: %p", async (isMock): Promise => { + !isMock && nock.restore(); + scope.post("/adjustAuthorisation") + .reply(200, modificationResult); + + const request = createModificationRequest(); + try { + const result = await modification.adjustAuthorisation(request); + expect(result).toBeTruthy(); + } catch (e) { + fail(e.message); + } + }); + + test.each([false, true])("should fail to perform a adjustAuthorisation, isMock: %p", async (isMock): Promise => { + !isMock && nock.restore(); + expect.assertions(2); + scope.post("/adjustAuthorisation") + .reply(422, invalidModificationResult); + + const request = createInvalidModificationRequest(); + try { + await modification.adjustAuthorisation(request); + } catch (e) { + expect(e.statusCode).toBe(422); + expect(e.message).toContain("Original pspReference required for this operation"); + } + }); +}); diff --git a/src/typings/terminal/saleToAcquirerData.ts b/src/typings/terminal/saleToAcquirerData.ts index efd1f80..44d8b0d 100644 --- a/src/typings/terminal/saleToAcquirerData.ts +++ b/src/typings/terminal/saleToAcquirerData.ts @@ -1,58 +1,75 @@ -/* - * ###### - * ###### - * ############ ####( ###### #####. ###### ############ ############ - * ############# #####( ###### #####. ###### ############# ############# - * ###### #####( ###### #####. ###### ##### ###### ##### ###### - * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### - * ###### ###### #####( ###### #####. ###### ##### ##### ###### - * ############# ############# ############# ############# ##### ###### - * ############ ############ ############# ############ ##### ###### - * ###### - * ############# - * ############ - * Adyen NodeJS API Library - * Copyright (c) 2020 Adyen B.V. - * This file is open source and available under the MIT license. - * See the LICENSE file for more info. - */ - /** - * Terminal API - * Definition of Terminal API Schema - * - * The version of the OpenAPI document: 1.0.0 + * Adyen Terminal API + * Adyen Terminal API description * + * The version of the OpenAPI document: 3 + * Contact: developer-experience@adyen.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import { ApplicationInfo } from "./applicationInfo"; +import { ApplicationInfo } from './applicationInfo'; export class SaleToAcquirerData { - "applicationInfo"?: ApplicationInfo; - "shopperEmail"?: string; - "shopperReference"?: string; - "recurringContract"?: string; - "shopperStatement"?: string; - "recurringDetailName"?: string; - "store"?: string; - "merchantAccount"?: string; - "currency"?: string; - "tenderOption"?: string; - "additionalData"?: object; + 'additionalData'?: { [key: string]: string; }; + 'applicationInfo'?: ApplicationInfo; + 'currency'?: string; + 'merchantAccount'?: string; + 'metadata'?: { [key: string]: string; }; + 'recurringContract'?: string; + 'recurringDetailName'?: string; + 'recurringTokenService'?: string; + 'shopperEmail'?: string; + 'shopperReference'?: string; + 'shopperStatement'?: string; + 'store'?: string; + 'tenderOption'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: {name: string, baseName: string, type: string}[] = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "additionalData", + "baseName": "additionalData", + "type": "{ [key: string]: string; }" + }, { "name": "applicationInfo", "baseName": "applicationInfo", "type": "ApplicationInfo" }, + { + "name": "currency", + "baseName": "currency", + "type": "string" + }, + { + "name": "merchantAccount", + "baseName": "merchantAccount", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "{ [key: string]: string; }" + }, + { + "name": "recurringContract", + "baseName": "recurringContract", + "type": "string" + }, + { + "name": "recurringDetailName", + "baseName": "recurringDetailName", + "type": "string" + }, + { + "name": "recurringTokenService", + "baseName": "recurringTokenService", + "type": "string" + }, { "name": "shopperEmail", "baseName": "shopperEmail", @@ -63,45 +80,20 @@ export class SaleToAcquirerData { "baseName": "shopperReference", "type": "string" }, - { - "name": "recurringContract", - "baseName": "recurringContract", - "type": "string" - }, { "name": "shopperStatement", "baseName": "shopperStatement", "type": "string" }, - { - "name": "recurringDetailName", - "baseName": "recurringDetailName", - "type": "string" - }, { "name": "store", "baseName": "store", "type": "string" }, - { - "name": "merchantAccount", - "baseName": "merchantAccount", - "type": "string" - }, - { - "name": "currency", - "baseName": "currency", - "type": "string" - }, { "name": "tenderOption", "baseName": "tenderOption", "type": "string" - }, - { - "name": "additionalData", - "baseName": "additionalData", - "type": "object" } ]; static getAttributeTypeMap() { diff --git a/yarn.lock b/yarn.lock index a14c817..a10dff0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -544,6 +544,11 @@ resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-6.1.0.tgz#cf0f859f9a4833b7fa5141b53e1d62d5d1cbc78f" integrity sha512-Z9fDZVbGj4dFLErEoXUSuZhk3wJ8KVGnbrUwoPijsQ9EyNwOeQ+U2jSqaHUz8WtgIWf0aeO59oJyhMpWCKaabg== +"@octokit/openapi-types@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-7.0.0.tgz#0f6992db9854af15eca77d71ab0ec7fad2f20411" + integrity sha512-gV/8DJhAL/04zjTI95a7FhQwS6jlEE0W/7xeYAzuArD0KVAVWDLP2f3vi98hs3HLTczxXdRK/mF0tRoQPpolEw== + "@octokit/plugin-paginate-rest@^2.6.2": version "2.13.3" resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.13.3.tgz#f0f1792230805108762d87906fb02d573b9e070a" @@ -556,12 +561,12 @@ resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.3.tgz#70a62be213e1edc04bb8897ee48c311482f9700d" integrity sha512-4RFU4li238jMJAzLgAwkBAw+4Loile5haQMQr+uhFq27BmyJXcXSKvoQKqh0agsZEiUlW6iSv3FAgvmGkur7OQ== -"@octokit/plugin-rest-endpoint-methods@5.0.0": - version "5.0.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.0.0.tgz#cf2cdeb24ea829c31688216a5b165010b61f9a98" - integrity sha512-Jc7CLNUueIshXT+HWt6T+M0sySPjF32mSFQAK7UfAg8qGeRI6OM1GSBxDLwbXjkqy2NVdnqCedJcP1nC785JYg== +"@octokit/plugin-rest-endpoint-methods@5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.0.1.tgz#631b8d4edc6798b03489911252a25f2a4e58c594" + integrity sha512-vvWbPtPqLyIzJ7A4IPdTl+8IeuKAwMJ4LjvmqWOOdfSuqWQYZXq2CEd0hsnkidff2YfKlguzujHs/reBdAx8Sg== dependencies: - "@octokit/types" "^6.13.0" + "@octokit/types" "^6.13.1" deprecation "^2.3.1" "@octokit/request-error@^2.0.0": @@ -608,15 +613,15 @@ node-fetch "^2.6.1" universal-user-agent "^6.0.0" -"@octokit/rest@18.5.2": - version "18.5.2" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.5.2.tgz#0369e554b7076e3749005147be94c661c7a5a74b" - integrity sha512-Kz03XYfKS0yYdi61BkL9/aJ0pP2A/WK5vF/syhu9/kY30J8He3P68hv9GRpn8bULFx2K0A9MEErn4v3QEdbZcw== +"@octokit/rest@18.5.3": + version "18.5.3" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.5.3.tgz#6a2e6006a87ebbc34079c419258dd29ec9ff659d" + integrity sha512-KPAsUCr1DOdLVbZJgGNuE/QVLWEaVBpFQwDAz/2Cnya6uW2wJ/P5RVGk0itx7yyN1aGa8uXm2pri4umEqG1JBA== dependencies: "@octokit/core" "^3.2.3" "@octokit/plugin-paginate-rest" "^2.6.2" "@octokit/plugin-request-log" "^1.0.2" - "@octokit/plugin-rest-endpoint-methods" "5.0.0" + "@octokit/plugin-rest-endpoint-methods" "5.0.1" "@octokit/types@^5.0.0", "@octokit/types@^5.0.1": version "5.5.0" @@ -625,13 +630,20 @@ dependencies: "@types/node" ">= 8" -"@octokit/types@^6.0.3", "@octokit/types@^6.11.0", "@octokit/types@^6.13.0", "@octokit/types@^6.7.1": +"@octokit/types@^6.0.3", "@octokit/types@^6.11.0", "@octokit/types@^6.7.1": version "6.13.1" resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.13.1.tgz#85f447f97dc7edb672f221df51f56a51785c131a" integrity sha512-UF/PL0y4SKGx/p1azFf7e6j9lB78tVwAFvnHtslzOJ6VipshYks74qm9jjTEDlCyaTmbhbk2h3Run5l0CtCF6A== dependencies: "@octokit/openapi-types" "^6.0.0" +"@octokit/types@^6.13.1": + version "6.14.2" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.14.2.tgz#64c9457f38fb8522bdbba3c8cc814590a2d61bf5" + integrity sha512-wiQtW9ZSy4OvgQ09iQOdyXYNN60GqjCL/UdMsepDr1Gr0QzpW6irIKbH3REuAHXAhxkEk9/F2a3Gcs1P6kW5jA== + dependencies: + "@octokit/openapi-types" "^7.0.0" + "@sindresorhus/is@^0.14.0": version "0.14.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" @@ -908,9 +920,9 @@ acorn@^7.1.0, acorn@^7.1.1: integrity sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w== acorn@^8.0.1: - version "8.2.4" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.2.4.tgz#caba24b08185c3b56e3168e97d15ed17f4d31fd0" - integrity sha512-Ibt84YwBDDA890eDiDCEqcbwvHlBvzzDkU2cGBBDDI1QWT12jTiXIOn2CIw5KK4i6N5Z2HUxwYjzriDyqaqqZg== + version "8.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.3.0.tgz#1193f9b96c4e8232f00b11a9edff81b2c8b98b88" + integrity sha512-tqPKHZ5CaBJw0Xmy0ZZvLs1qTV+BNFSyvn77ASXkpBNfIRk8ev26fKrD9iLGwGA9zedPao52GSHzq8lyZG0NUw== agent-base@6: version "6.0.1" @@ -1340,10 +1352,10 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= -chalk@4.1.0, chalk@^4.0.0, chalk@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" - integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== +chalk@4.1.1, chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad" + integrity sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg== dependencies: ansi-styles "^4.1.0" supports-color "^7.1.0" @@ -1783,10 +1795,10 @@ dot-prop@^5.2.0: dependencies: is-obj "^2.0.0" -dotenv@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-9.0.0.tgz#2408af4e39378375b7eebe30b7b54989e36d6e46" - integrity sha512-yy3x9XjojW8ROTBePD25AcMoHqGHsvHmtfw8QWlpEXyMMXXPj6brUA464AptUvHuTPRmNz6Sd3ZLNLeJl6dHJA== +dotenv@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81" + integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q== duplexer3@^0.1.4: version "0.1.4" @@ -2520,9 +2532,9 @@ has-yarn@^2.1.0: integrity sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw== hosted-git-info@^2.1.4: - version "2.8.8" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" - integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== + version "2.8.9" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" + integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== html-encoding-sniffer@^1.0.2: version "1.0.2" @@ -2661,19 +2673,20 @@ ini@~1.3.0: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.7.tgz#a09363e1911972ea16d7a8851005d84cf09a9a84" integrity sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ== -inquirer@8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.0.0.tgz#957a46db1abcf0fdd2ab82deb7470e90afc7d0ac" - integrity sha512-ON8pEJPPCdyjxj+cxsYRe6XfCJepTxANdNnTebsTuQgXpRyZRRT9t4dJwjRubgmvn20CLSEnozRUayXyM9VTXA== +inquirer@8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.1.0.tgz#68ce5ce5376cf0e89765c993d8b7c1e62e184d69" + integrity sha512-1nKYPoalt1vMBfCMtpomsUc32wmOoWXAoq3kM/5iTfxyQ2f/BxjixQpC+mbZ7BI0JUXHED4/XPXekDVtJNpXYw== dependencies: ansi-escapes "^4.2.1" - chalk "^4.1.0" + chalk "^4.1.1" cli-cursor "^3.1.0" cli-width "^3.0.0" external-editor "^3.0.3" figures "^3.0.0" lodash "^4.17.21" mute-stream "0.0.8" + ora "^5.3.0" run-async "^2.4.0" rxjs "^6.6.6" string-width "^4.1.0" @@ -3841,10 +3854,10 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -nock@*, nock@13.0.11: - version "13.0.11" - resolved "https://registry.yarnpkg.com/nock/-/nock-13.0.11.tgz#ba733252e720897ca50033205c39db0c7470f331" - integrity sha512-sKZltNkkWblkqqPAsjYW0bm3s9DcHRPiMOyKO/PkfJ+ANHZ2+LA2PLe22r4lLrKgXaiSaDQwW3qGsJFtIpQIeQ== +nock@*, nock@13.1.0: + version "13.1.0" + resolved "https://registry.yarnpkg.com/nock/-/nock-13.1.0.tgz#41c8ce8b35ab7d618c4cbf40de1d5bce319979ba" + integrity sha512-3N3DUY8XYrxxzWazQ+nSBpiaJ3q6gcpNh4gXovC/QBxrsvNp4tq+wsLHF6mJ3nrn3lPLn7KCJqKxy/9aD+0fdw== dependencies: debug "^4.1.0" json-stringify-safe "^5.0.1" @@ -3989,7 +4002,7 @@ optionator@^0.8.1, optionator@^0.8.3: type-check "~0.3.2" word-wrap "~1.2.3" -ora@5.4.0: +ora@5.4.0, ora@^5.3.0: version "5.4.0" resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.0.tgz#42eda4855835b9cd14d33864c97a3c95a3f56bf4" integrity sha512-1StwyXQGoU6gdjYkyVcqOLnVlbKj+6yPNNOxJVgpt9t4eksKjiriiHuxktLYkgllwk+D6MbC4ihH84L1udRXPg== @@ -4392,15 +4405,15 @@ registry-url@^5.0.0: dependencies: rc "^1.2.8" -release-it@14.6.1: - version "14.6.1" - resolved "https://registry.yarnpkg.com/release-it/-/release-it-14.6.1.tgz#a04623312d67886b37b8a6d298844ee3e0c7150a" - integrity sha512-noBho2997G3yrm6YvdLJj4Ua2SCFOU7ajCqtvteI3DZtpM1IhiyXSgcn2Q5irq8lTNK0it4eiNq9TSrAWNYDkA== +release-it@14.7.0: + version "14.7.0" + resolved "https://registry.yarnpkg.com/release-it/-/release-it-14.7.0.tgz#57c63bee1ea668e5186f7fd018d88fbd01120ada" + integrity sha512-g8z6BR7qsO1r0HtS4rquRU5PmwHrIZ5jYTuaaa1ZSLrh91Nm23PBpHR/0jsA549Qzujj4W/mkeskoAAIvHugWQ== dependencies: "@iarna/toml" "2.2.5" - "@octokit/rest" "18.5.2" + "@octokit/rest" "18.5.3" async-retry "1.3.1" - chalk "4.1.0" + chalk "4.1.1" cosmiconfig "7.0.0" debug "4.3.1" deprecated-obj "2.0.0" @@ -4411,7 +4424,7 @@ release-it@14.6.1: globby "11.0.3" got "11.8.2" import-cwd "3.0.0" - inquirer "8.0.0" + inquirer "8.1.0" is-ci "3.0.0" lodash "4.17.21" mime-types "2.1.30" @@ -5544,9 +5557,9 @@ write@1.0.3: mkdirp "^0.5.1" ws@^7.0.0: - version "7.3.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.3.1.tgz#d0547bf67f7ce4f12a72dfe31262c68d7dc551c8" - integrity sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA== + version "7.4.6" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" + integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== xdg-basedir@^4.0.0: version "4.0.0"