diff --git a/coral/package.json b/coral/package.json index 32a5a7de4f..74a5d74d8d 100644 --- a/coral/package.json +++ b/coral/package.json @@ -81,9 +81,9 @@ "@types/testing-library__jest-dom": "^5.14.6", "@typescript-eslint/eslint-plugin": "^5.59.1", "@typescript-eslint/parser": "^5.62.0", - "@vitejs/plugin-react": "^4.0.4", + "@vitejs/plugin-react": "^4.1.0", "eslint": "^8.49.0", - "eslint-config-prettier": "^8.8.0", + "eslint-config-prettier": "^9.0.0", "eslint-import-resolver-typescript": "^3.5.5", "eslint-plugin-import": "^2.27.5", "eslint-plugin-lodash": "^7.4.0", @@ -95,12 +95,12 @@ "jest-transform-stub": "^2.0.0", "lint-staged": "^13.0.3", "lodash": "^4.17.21", - "msw": "^0.47.4", + "msw": "^1.3.1", "openapi-typescript": "^6.2.0", "prettier": "^3.0.3", "prop-types": "^15.8.1", "react-test-renderer": "^18.2.0", - "rollup-plugin-visualizer": "^5.9.0", + "rollup-plugin-visualizer": "^5.9.2", "ts-jest": "^29.1.0", "ts-node": "^10.9.1", "typescript": "^5.0.4", diff --git a/coral/pnpm-lock.yaml b/coral/pnpm-lock.yaml index 3964f3d3a0..17da4306a2 100644 --- a/coral/pnpm-lock.yaml +++ b/coral/pnpm-lock.yaml @@ -125,14 +125,14 @@ devDependencies: specifier: ^5.62.0 version: 5.62.0(eslint@8.49.0)(typescript@5.0.4) '@vitejs/plugin-react': - specifier: ^4.0.4 - version: 4.0.4(vite@4.4.8) + specifier: ^4.1.0 + version: 4.1.0(vite@4.4.8) eslint: specifier: ^8.49.0 version: 8.49.0 eslint-config-prettier: - specifier: ^8.8.0 - version: 8.8.0(eslint@8.49.0) + specifier: ^9.0.0 + version: 9.0.0(eslint@8.49.0) eslint-import-resolver-typescript: specifier: ^3.5.5 version: 3.5.5(@typescript-eslint/parser@5.62.0)(eslint-plugin-import@2.27.5)(eslint@8.49.0) @@ -167,8 +167,8 @@ devDependencies: specifier: ^4.17.21 version: 4.17.21 msw: - specifier: ^0.47.4 - version: 0.47.4(typescript@5.0.4) + specifier: ^1.3.1 + version: 1.3.1(typescript@5.0.4) openapi-typescript: specifier: ^6.2.0 version: 6.2.0 @@ -182,8 +182,8 @@ devDependencies: specifier: ^18.2.0 version: 18.2.0(react@18.2.0) rollup-plugin-visualizer: - specifier: ^5.9.0 - version: 5.9.0 + specifier: ^5.9.2 + version: 5.9.2 ts-jest: specifier: ^29.1.0 version: 29.1.0(@babel/core@7.22.15)(jest@29.7.0)(typescript@5.0.4) @@ -249,7 +249,7 @@ packages: resolution: {integrity: sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/highlight': 7.18.6 + '@babel/highlight': 7.22.13 dev: true /@babel/code-frame@7.22.13: @@ -288,11 +288,34 @@ packages: - supports-color dev: true + /@babel/core@7.22.20: + resolution: {integrity: sha512-Y6jd1ahLubuYweD/zJH+vvOY141v4f9igNQAQ+MBgq9JlHS2iTsZKn1aMsb3vGccZsXI16VzTBw52Xx0DWmtnA==} + engines: {node: '>=6.9.0'} + dependencies: + '@ampproject/remapping': 2.2.1 + '@babel/code-frame': 7.22.13 + '@babel/generator': 7.22.15 + '@babel/helper-compilation-targets': 7.22.15 + '@babel/helper-module-transforms': 7.22.20(@babel/core@7.22.20) + '@babel/helpers': 7.22.15 + '@babel/parser': 7.22.16 + '@babel/template': 7.22.15 + '@babel/traverse': 7.22.20 + '@babel/types': 7.22.19 + convert-source-map: 1.9.0 + debug: 4.3.4 + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + dev: true + /@babel/generator@7.22.15: resolution: {integrity: sha512-Zu9oWARBqeVOW0dZOjXc3JObrzuqothQ3y/n1kUtrjCoCPLkXUwMvOo/F/TCfoHMbWIFlWwpZtkZVb9ga4U2pA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.15 + '@babel/types': 7.22.19 '@jridgewell/gen-mapping': 0.3.3 '@jridgewell/trace-mapping': 0.3.19 jsesc: 2.5.2 @@ -309,6 +332,11 @@ packages: semver: 6.3.1 dev: true + /@babel/helper-environment-visitor@7.22.20: + resolution: {integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==} + engines: {node: '>=6.9.0'} + dev: true + /@babel/helper-environment-visitor@7.22.5: resolution: {integrity: sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==} engines: {node: '>=6.9.0'} @@ -319,21 +347,21 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.22.15 - '@babel/types': 7.22.15 + '@babel/types': 7.22.19 dev: true /@babel/helper-hoist-variables@7.22.5: resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.15 + '@babel/types': 7.22.19 dev: true /@babel/helper-module-imports@7.22.15: resolution: {integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.15 + '@babel/types': 7.22.19 dev: true /@babel/helper-module-transforms@7.22.15(@babel/core@7.22.15): @@ -350,6 +378,20 @@ packages: '@babel/helper-validator-identifier': 7.22.15 dev: true + /@babel/helper-module-transforms@7.22.20(@babel/core@7.22.20): + resolution: {integrity: sha512-dLT7JVWIUUxKOs1UnJUBR3S70YK+pKX6AbJgB2vMIvEkZkrfJDbYDJesnPshtKV4LhDOR3Oc5YULeDizRek+5A==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/core': 7.22.20 + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-module-imports': 7.22.15 + '@babel/helper-simple-access': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + '@babel/helper-validator-identifier': 7.22.20 + dev: true + /@babel/helper-plugin-utils@7.22.5: resolution: {integrity: sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==} engines: {node: '>=6.9.0'} @@ -359,14 +401,14 @@ packages: resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.15 + '@babel/types': 7.22.19 dev: true /@babel/helper-split-export-declaration@7.22.6: resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.15 + '@babel/types': 7.22.19 dev: true /@babel/helper-string-parser@7.22.5: @@ -379,6 +421,11 @@ packages: engines: {node: '>=6.9.0'} dev: true + /@babel/helper-validator-identifier@7.22.20: + resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} + engines: {node: '>=6.9.0'} + dev: true + /@babel/helper-validator-option@7.22.15: resolution: {integrity: sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==} engines: {node: '>=6.9.0'} @@ -389,21 +436,12 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.22.15 - '@babel/traverse': 7.22.15 - '@babel/types': 7.22.15 + '@babel/traverse': 7.22.20 + '@babel/types': 7.22.19 transitivePeerDependencies: - supports-color dev: true - /@babel/highlight@7.18.6: - resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-validator-identifier': 7.22.15 - chalk: 2.4.2 - js-tokens: 4.0.0 - dev: true - /@babel/highlight@7.22.13: resolution: {integrity: sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ==} engines: {node: '>=6.9.0'} @@ -421,6 +459,14 @@ packages: '@babel/types': 7.22.15 dev: true + /@babel/parser@7.22.16: + resolution: {integrity: sha512-+gPfKv8UWeKKeJTUxe59+OobVcrYHETCsORl61EmSkmgymguYk/X5bp7GuUIXaFsc6y++v8ZxPsLSSuujqDphA==} + engines: {node: '>=6.0.0'} + hasBin: true + dependencies: + '@babel/types': 7.22.19 + dev: true + /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.22.15): resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} peerDependencies: @@ -550,23 +596,23 @@ packages: '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-react-jsx-self@7.22.5(@babel/core@7.22.15): + /@babel/plugin-transform-react-jsx-self@7.22.5(@babel/core@7.22.20): resolution: {integrity: sha512-nTh2ogNUtxbiSbxaT4Ds6aXnXEipHweN9YRgOX/oNXdf0cCrGn/+2LozFa3lnPV5D90MkjhgckCPBrsoSc1a7g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.20 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-react-jsx-source@7.22.5(@babel/core@7.22.15): + /@babel/plugin-transform-react-jsx-source@7.22.5(@babel/core@7.22.20): resolution: {integrity: sha512-yIiRO6yobeEIaI0RTbIr8iAK9FcBHLtZq0S89ZPjDLQXBA4xvghaKqI0etp/tF3htTM0sazJKKLz9oEiGRtu7w==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.20 '@babel/helper-plugin-utils': 7.22.5 dev: true @@ -581,8 +627,8 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.22.13 - '@babel/parser': 7.22.15 - '@babel/types': 7.22.15 + '@babel/parser': 7.22.16 + '@babel/types': 7.22.19 dev: true /@babel/traverse@7.22.15: @@ -603,6 +649,24 @@ packages: - supports-color dev: true + /@babel/traverse@7.22.20: + resolution: {integrity: sha512-eU260mPZbU7mZ0N+X10pxXhQFMGTeLb9eFS0mxehS8HZp9o1uSnFeWQuG1UPrlxgA7QoUzFhOnilHDp0AXCyHw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.22.13 + '@babel/generator': 7.22.15 + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-function-name': 7.22.5 + '@babel/helper-hoist-variables': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + '@babel/parser': 7.22.16 + '@babel/types': 7.22.19 + debug: 4.3.4 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + dev: true + /@babel/types@7.22.15: resolution: {integrity: sha512-X+NLXr0N8XXmN5ZsaQdm9U2SSC3UbIYq/doL++sueHOTisgZHoKaQtZxGuV2cUPQHMfjKEfg/g6oy7Hm6SKFtA==} engines: {node: '>=6.9.0'} @@ -612,6 +676,15 @@ packages: to-fast-properties: 2.0.0 dev: true + /@babel/types@7.22.19: + resolution: {integrity: sha512-P7LAw/LbojPzkgp5oznjE6tQEIWbp4PkkfrZDINTro9zgBRtI324/EYsiSI7lhPbpIQ+DCeR2NNmMWANGGfZsg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-string-parser': 7.22.5 + '@babel/helper-validator-identifier': 7.22.20 + to-fast-properties: 2.0.0 + dev: true + /@bcoe/v8-coverage@0.2.3: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: true @@ -1288,16 +1361,16 @@ packages: set-cookie-parser: 2.5.1 dev: true - /@mswjs/interceptors@0.17.6: - resolution: {integrity: sha512-201pBIWehTURb6q8Gheu4Zhvd3Ox1U4BJq5KiOQsYzkWyfiOG4pwcz5hPZIEryztgrf8/sdwABpvY757xMmfrQ==} + /@mswjs/interceptors@0.17.10: + resolution: {integrity: sha512-N8x7eSLGcmUFNWZRxT1vsHvypzIRgQYdG0rJey/rZCy6zT/30qDt8Joj7FxzGNLSwXbeZqJOMqDurp7ra4hgbw==} engines: {node: '>=14'} dependencies: '@open-draft/until': 1.0.3 '@types/debug': 4.1.7 '@xmldom/xmldom': 0.8.5 debug: 4.3.4 - headers-polyfill: 3.1.2 - outvariant: 1.3.0 + headers-polyfill: 3.2.5 + outvariant: 1.4.0 strict-event-emitter: 0.2.8 web-encoding: 1.1.5 transitivePeerDependencies: @@ -2958,6 +3031,16 @@ packages: '@types/babel__traverse': 7.20.1 dev: true + /@types/babel__core@7.20.2: + resolution: {integrity: sha512-pNpr1T1xLUc2l3xJKuPtsEky3ybxN3m4fJkknfIpTCTfIZCDW57oAg+EfCgIIp2rvCe0Wn++/FfodDS4YXxBwA==} + dependencies: + '@babel/parser': 7.22.15 + '@babel/types': 7.22.15 + '@types/babel__generator': 7.6.4 + '@types/babel__template': 7.4.1 + '@types/babel__traverse': 7.20.1 + dev: true + /@types/babel__generator@7.6.4: resolution: {integrity: sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==} dependencies: @@ -3347,15 +3430,16 @@ packages: eslint-visitor-keys: 3.4.0 dev: true - /@vitejs/plugin-react@4.0.4(vite@4.4.8): - resolution: {integrity: sha512-7wU921ABnNYkETiMaZy7XqpueMnpu5VxvVps13MjmCo+utBdD79sZzrApHawHtVX66cCJQQTXFcjH0y9dSUK8g==} + /@vitejs/plugin-react@4.1.0(vite@4.4.8): + resolution: {integrity: sha512-rM0SqazU9iqPUraQ2JlIvReeaxOoRj6n+PzB1C0cBzIbd8qP336nC39/R9yPi3wVcah7E7j/kdU1uCUqMEU4OQ==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: vite: ^4.2.0 dependencies: - '@babel/core': 7.22.15 - '@babel/plugin-transform-react-jsx-self': 7.22.5(@babel/core@7.22.15) - '@babel/plugin-transform-react-jsx-source': 7.22.5(@babel/core@7.22.15) + '@babel/core': 7.22.20 + '@babel/plugin-transform-react-jsx-self': 7.22.5(@babel/core@7.22.20) + '@babel/plugin-transform-react-jsx-source': 7.22.5(@babel/core@7.22.20) + '@types/babel__core': 7.20.2 react-refresh: 0.14.0 vite: 4.4.8(@types/node@18.17.14) transitivePeerDependencies: @@ -3527,7 +3611,7 @@ packages: call-bind: 1.0.2 define-properties: 1.1.4 es-abstract: 1.20.4 - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.1 is-string: 1.0.7 dev: true @@ -3563,7 +3647,7 @@ packages: define-properties: 1.1.4 es-abstract: 1.20.4 es-shim-unscopables: 1.0.0 - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.1 dev: true /asn1js@3.0.5: @@ -3746,7 +3830,7 @@ packages: resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} dependencies: function-bind: 1.1.1 - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.1 dev: true /callsites@3.1.0: @@ -3789,14 +3873,6 @@ packages: supports-color: 7.2.0 dev: true - /chalk@4.1.1: - resolution: {integrity: sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==} - engines: {node: '>=10'} - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - dev: true - /chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} @@ -4391,7 +4467,7 @@ packages: es-to-primitive: 1.2.1 function-bind: 1.1.1 function.prototype.name: 1.1.5 - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.1 get-symbol-description: 1.0.0 has: 1.0.3 has-property-descriptors: 1.0.0 @@ -4504,8 +4580,8 @@ packages: source-map: 0.6.1 dev: true - /eslint-config-prettier@8.8.0(eslint@8.49.0): - resolution: {integrity: sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==} + /eslint-config-prettier@9.0.0(eslint@8.49.0): + resolution: {integrity: sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==} hasBin: true peerDependencies: eslint: '>=7.0.0' @@ -5002,14 +5078,6 @@ packages: engines: {node: 6.* || 8.* || >= 10.*} dev: true - /get-intrinsic@1.1.3: - resolution: {integrity: sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==} - dependencies: - function-bind: 1.1.1 - has: 1.0.3 - has-symbols: 1.0.3 - dev: true - /get-intrinsic@1.2.1: resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} dependencies: @@ -5034,7 +5102,7 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.1 dev: true /get-tsconfig@4.5.0: @@ -5153,7 +5221,7 @@ packages: /has-property-descriptors@1.0.0: resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} dependencies: - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.1 dev: true /has-proto@1.0.1: @@ -5339,8 +5407,8 @@ packages: space-separated-tokens: 2.0.2 dev: false - /headers-polyfill@3.1.2: - resolution: {integrity: sha512-tWCK4biJ6hcLqTviLXVR9DTRfYGQMXEIUj3gwJ2rZ5wO/at3XtkI4g8mCvFdUF9l1KMBNCfmNAdnahm1cgavQA==} + /headers-polyfill@3.2.5: + resolution: {integrity: sha512-tUCGvt191vNSQgttSyJoibR+VO+I6+iCHIUdhzEMJKE+EAL8BwCN7fUOZlY4ofOelNHsK+gEjxB/B+9N3EWtdA==} dev: true /highlight.js@10.7.3: @@ -5490,7 +5558,7 @@ packages: resolution: {integrity: sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.1 has: 1.0.3 side-channel: 1.0.4 dev: true @@ -5606,6 +5674,7 @@ packages: /is-docker@2.2.1: resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} engines: {node: '>=8'} + hasBin: true dev: true /is-extglob@2.1.1: @@ -5660,8 +5729,8 @@ packages: engines: {node: '>= 0.4'} dev: true - /is-node-process@1.0.1: - resolution: {integrity: sha512-5IcdXuf++TTNt3oGl9EBdkvndXA8gmc4bz/Y+mdEpWh3Mcn/+kOw6hI7LD5CocqJWMzeb0I0ClndRVNdEPuJXQ==} + /is-node-process@1.2.0: + resolution: {integrity: sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw==} dev: true /is-number-object@1.0.7: @@ -5743,17 +5812,6 @@ packages: has-tostringtag: 1.0.0 dev: true - /is-typed-array@1.1.9: - resolution: {integrity: sha512-kfrlnTTn8pZkfpJMUgYD7YZ3qzeJgWUn8XfVYBARc4wnmNOmLbmuuaAs3q5fvB0UJOn6yHAKaGTPM7d6ezoD/A==} - engines: {node: '>= 0.4'} - dependencies: - available-typed-arrays: 1.0.5 - call-bind: 1.0.2 - es-abstract: 1.20.4 - for-each: 0.3.3 - has-tostringtag: 1.0.0 - dev: true - /is-unicode-supported@0.1.0: resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} engines: {node: '>=10'} @@ -6953,38 +7011,37 @@ packages: /ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - /msw@0.47.4(typescript@5.0.4): - resolution: {integrity: sha512-Psftt8Yfl0+l+qqg9OlmKEsxF8S/vtda0CmlR6y8wTaWrMMzuCDa55n2hEGC0ZRDwuV6FFWc/4CjoDsBpATKBw==} + /msw@1.3.1(typescript@5.0.4): + resolution: {integrity: sha512-GhP5lHSTXNlZb9EaKgPRJ01YAnVXwzkvnTzRn4W8fxU2DXuJrRO+Nb6OHdYqB4fCkwSNpIJH9JkON5Y6rHqJMQ==} engines: {node: '>=14'} hasBin: true requiresBuild: true peerDependencies: - typescript: '>= 4.2.x <= 4.8.x' + typescript: '>= 4.4.x <= 5.2.x' peerDependenciesMeta: typescript: optional: true dependencies: '@mswjs/cookies': 0.2.2 - '@mswjs/interceptors': 0.17.6 + '@mswjs/interceptors': 0.17.10 '@open-draft/until': 1.0.3 '@types/cookie': 0.4.1 '@types/js-levenshtein': 1.1.1 - chalk: 4.1.1 + chalk: 4.1.2 chokidar: 3.5.3 cookie: 0.4.2 graphql: 16.6.0 - headers-polyfill: 3.1.2 + headers-polyfill: 3.2.5 inquirer: 8.2.5 - is-node-process: 1.0.1 + is-node-process: 1.2.0 js-levenshtein: 1.1.6 node-fetch: 2.6.7 - outvariant: 1.3.0 + outvariant: 1.4.0 path-to-regexp: 6.2.1 - statuses: 2.0.1 - strict-event-emitter: 0.2.8 + strict-event-emitter: 0.4.6 type-fest: 2.19.0 typescript: 5.0.4 - yargs: 17.6.0 + yargs: 17.7.2 transitivePeerDependencies: - encoding - supports-color @@ -7200,8 +7257,8 @@ packages: engines: {node: '>=0.10.0'} dev: true - /outvariant@1.3.0: - resolution: {integrity: sha512-yeWM9k6UPfG/nzxdaPlJkB2p08hCg4xP6Lx99F+vP8YF7xyZVfTmJjrrNalkmzudD4WFvNLVudQikqUmF8zhVQ==} + /outvariant@1.4.0: + resolution: {integrity: sha512-AlWY719RF02ujitly7Kk/0QlV+pXGFDHrHf9O2OKqyqgBieaPOIeuSkL8sRK6j2WK+/ZAURq2kZsY0d8JapUiw==} dev: true /p-limit@2.3.0: @@ -7958,8 +8015,8 @@ packages: glob: 7.2.3 dev: true - /rollup-plugin-visualizer@5.9.0: - resolution: {integrity: sha512-bbDOv47+Bw4C/cgs0czZqfm8L82xOZssk4ayZjG40y9zbXclNk7YikrZTDao6p7+HDiGxrN0b65SgZiVm9k1Cg==} + /rollup-plugin-visualizer@5.9.2: + resolution: {integrity: sha512-waHktD5mlWrYFrhOLbti4YgQCn1uR24nYsNuXxg7LkPH8KdTXVWR9DNY1WU0QqokyMixVXJS4J04HNrVTMP01A==} engines: {node: '>=14'} hasBin: true peerDependencies: @@ -7971,7 +8028,7 @@ packages: open: 8.4.0 picomatch: 2.3.1 source-map: 0.7.4 - yargs: 17.6.0 + yargs: 17.7.2 dev: true /rollup@3.27.1: @@ -8014,7 +8071,7 @@ packages: resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.1 is-regex: 1.1.4 dev: true @@ -8067,7 +8124,7 @@ packages: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.1 object-inspect: 1.12.2 dev: true @@ -8160,11 +8217,6 @@ packages: resolution: {integrity: sha512-HTEHMNieakEnoe33shBYcZ7NX83ACUjCu8c40iOGEZsngj9zRnkqS9j1pqQPXwobB0ZcVTk27REb7COQ0UR59w==} dev: false - /statuses@2.0.1: - resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} - engines: {node: '>= 0.8'} - dev: true - /stop-iteration-iterator@1.0.0: resolution: {integrity: sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==} engines: {node: '>= 0.4'} @@ -8183,6 +8235,10 @@ packages: events: 3.3.0 dev: true + /strict-event-emitter@0.4.6: + resolution: {integrity: sha512-12KWeb+wixJohmnwNFerbyiBrAlq5qJLwIt38etRtKtmmHyDSoGlIqFE9wx+4IwG0aDjI7GV8tc8ZccjWZZtTg==} + dev: true + /string-argv@0.3.1: resolution: {integrity: sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==} engines: {node: '>=0.6.19'} @@ -8220,7 +8276,7 @@ packages: call-bind: 1.0.2 define-properties: 1.1.4 es-abstract: 1.20.4 - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.1 has-symbols: 1.0.3 internal-slot: 1.0.3 regexp.prototype.flags: 1.4.3 @@ -8696,8 +8752,8 @@ packages: inherits: 2.0.4 is-arguments: 1.1.1 is-generator-function: 1.0.10 - is-typed-array: 1.1.9 - which-typed-array: 1.1.8 + is-typed-array: 1.1.10 + which-typed-array: 1.1.9 dev: true /uvu@0.5.6: @@ -8916,18 +8972,6 @@ packages: is-weakset: 2.0.2 dev: true - /which-typed-array@1.1.8: - resolution: {integrity: sha512-Jn4e5PItbcAHyLoRDwvPj1ypu27DJbtdYXUa5zsinrUx77Uvfb0cXwwnGMTn7cjUfhhqgVQnVJCwF+7cgU7tpw==} - engines: {node: '>= 0.4'} - dependencies: - available-typed-arrays: 1.0.5 - call-bind: 1.0.2 - es-abstract: 1.20.4 - for-each: 0.3.3 - has-tostringtag: 1.0.0 - is-typed-array: 1.1.9 - dev: true - /which-typed-array@1.1.9: resolution: {integrity: sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==} engines: {node: '>= 0.4'} @@ -9032,19 +9076,6 @@ packages: engines: {node: '>=12'} dev: true - /yargs@17.6.0: - resolution: {integrity: sha512-8H/wTDqlSwoSnScvV2N/JHfLWOKuh5MVla9hqLjK3nsfyy6Y4kDSYSvkU5YCUEPOSnRXfIyx3Sq+B/IWudTo4g==} - engines: {node: '>=12'} - dependencies: - cliui: 8.0.1 - escalade: 3.1.1 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 21.1.1 - dev: true - /yargs@17.7.2: resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} engines: {node: '>=12'} diff --git a/coral/src/app/features/topics/request/TopicEditRequest.test.tsx b/coral/src/app/features/topics/request/TopicEditRequest.test.tsx index 4b94b4a640..2fa8af2ee6 100644 --- a/coral/src/app/features/topics/request/TopicEditRequest.test.tsx +++ b/coral/src/app/features/topics/request/TopicEditRequest.test.tsx @@ -492,7 +492,11 @@ describe("", () => { mockTopicDetails.topicContents.advancedTopicConfiguration ), description: mockTopicDetails.topicContents.description, - environment: mockEnvironments[0], + environment: { + name: mockEnvironments[0].name, + id: mockEnvironments[0].id, + params: mockEnvironments[0].params, + }, remarks: "please approve", replicationfactor: mockTopicDetails.topicContents.noOfReplicas, topicname: TOPIC_NAME, diff --git a/coral/src/app/features/topics/request/TopicEditRequest.tsx b/coral/src/app/features/topics/request/TopicEditRequest.tsx index f8221ef55b..71b5401057 100644 --- a/coral/src/app/features/topics/request/TopicEditRequest.tsx +++ b/coral/src/app/features/topics/request/TopicEditRequest.tsx @@ -23,11 +23,13 @@ import { } from "src/app/components/Form"; import AdvancedConfiguration from "src/app/features/topics/request/components/AdvancedConfiguration"; import SelectOrNumberInput from "src/app/features/topics/request/components/SelectOrNumberInput"; -import type { Schema } from "src/app/features/topics/request/form-schemas/topic-request-form"; +import type { + EnvironmentForTopicForm, + Schema, +} from "src/app/features/topics/request/form-schemas/topic-request-form"; import formSchema from "src/app/features/topics/request/form-schemas/topic-request-form"; import { generateTopicNameDescription } from "src/app/features/topics/request/utils"; import { Routes } from "src/app/router_utils"; -import { Environment } from "src/domain/environment"; import { getAllEnvironmentsForTopicAndAcl } from "src/domain/environment/environment-api"; import { TopicDetailsPerEnv, @@ -48,13 +50,16 @@ function TopicEditRequest() { const [cancelDialogVisible, setCancelDialogVisible] = useState(false); const { data: environments, isFetched: environmentIsFetched } = useQuery< - Environment[], + EnvironmentForTopicForm[], HTTPError >( ["getAllEnvironmentsForTopicAndAcl", env], getAllEnvironmentsForTopicAndAcl, { - select: (environments) => environments?.filter(({ id }) => id === env), + select: (environments) => + environments + ?.filter(({ id }) => id === env) + .map(({ name, id, params }) => ({ name, id, params })), } ); @@ -126,7 +131,13 @@ function TopicEditRequest() { ) : "{\n}"; form.reset({ - environment: currentEnvironment, + environment: !currentEnvironment + ? undefined + : { + name: currentEnvironment.name, + id: currentEnvironment.id, + params: currentEnvironment.params, + }, topicpartitions: String( topicDetailsForEnv.topicContents?.noOfPartitions ), diff --git a/coral/src/app/features/topics/request/TopicPromotionRequest.test.tsx b/coral/src/app/features/topics/request/TopicPromotionRequest.test.tsx index c61e344f73..80f8d5c648 100644 --- a/coral/src/app/features/topics/request/TopicPromotionRequest.test.tsx +++ b/coral/src/app/features/topics/request/TopicPromotionRequest.test.tsx @@ -450,10 +450,6 @@ describe("", () => { topicPrefix: undefined, topicSuffix: undefined, }, - type: "kafka", - clusterName: "DEV", - tenantName: "default", - envStatus: "ONLINE", }, remarks: "", replicationfactor: "1", diff --git a/coral/src/app/features/topics/request/TopicRequest.tsx b/coral/src/app/features/topics/request/TopicRequest.tsx index 1fcb165d5c..5d08d9e315 100644 --- a/coral/src/app/features/topics/request/TopicRequest.tsx +++ b/coral/src/app/features/topics/request/TopicRequest.tsx @@ -19,11 +19,11 @@ import { ComplexNativeSelect, } from "src/app/components/Form"; import formSchema, { + EnvironmentForTopicForm, useExtendedFormValidationAndTriggers, } from "src/app/features/topics/request/form-schemas/topic-request-form"; import SelectOrNumberInput from "src/app/features/topics/request/components/SelectOrNumberInput"; import type { Schema } from "src/app/features/topics/request/form-schemas/topic-request-form"; -import { Environment } from "src/domain/environment"; import { getEnvironmentsForTopicRequest } from "src/domain/environment/environment-api"; import AdvancedConfiguration from "src/app/features/topics/request/components/AdvancedConfiguration"; import { requestTopicCreation } from "src/domain/topic/topic-api"; @@ -39,9 +39,13 @@ function TopicRequest() { const [cancelDialogVisible, setCancelDialogVisible] = useState(false); - const { data: environments } = useQuery( + const { data: environments } = useQuery( ["environments-for-team"], - getEnvironmentsForTopicRequest + { + queryFn: getEnvironmentsForTopicRequest, + select: (data) => + data.map(({ name, id, params }) => ({ name, id, params })), + } ); const defaultValues = Array.isArray(environments) @@ -119,7 +123,7 @@ function TopicRequest() { > {Array.isArray(environments) ? ( - + name="environment" labelText={"Environment"} placeholder={"-- Please select --"} diff --git a/coral/src/app/features/topics/request/form-schemas/topic-request-form.ts b/coral/src/app/features/topics/request/form-schemas/topic-request-form.ts index dae13e0ba0..de35403def 100644 --- a/coral/src/app/features/topics/request/form-schemas/topic-request-form.ts +++ b/coral/src/app/features/topics/request/form-schemas/topic-request-form.ts @@ -30,21 +30,11 @@ const environmentParams = z.object({ topicRegex: z.array(z.string()).optional(), }); -const environmentField: z.ZodType = z.object({ +type EnvironmentForTopicForm = Pick; +const environmentField: z.ZodType = z.object({ name: z.string(), id: z.string(), - type: z.string(), params: environmentParams.optional(), - clusterName: z.string(), - tenantName: z.string(), - envStatus: z.union([ - z.literal("ONLINE"), - z.literal("OFFLINE"), - z.literal("NOT_KNOWN"), - ]), - associatedEnv: z - .object({ id: z.string().optional(), name: z.string().optional() }) - .optional(), }); const advancedConfigurationField = z.string().optional(); @@ -307,6 +297,8 @@ function findNextValue({ return fallbackDefault; } -export type Schema = z.infer; +type Schema = z.infer; +export type { EnvironmentForTopicForm, Schema }; + export default formSchema; export { useExtendedFormValidationAndTriggers }; diff --git a/coral/src/domain/acl/acl-api-msw.ts b/coral/src/domain/acl/acl-api-msw.ts index 2cab571203..b3a7b41e36 100644 --- a/coral/src/domain/acl/acl-api-msw.ts +++ b/coral/src/domain/acl/acl-api-msw.ts @@ -1,13 +1,13 @@ import { rest } from "msw"; import { getHTTPBaseAPIUrl } from "src/config"; -import { SetupServerApi } from "msw/node"; +import { SetupServer } from "msw/node"; import { KlawApiResponse } from "types/utils"; function mockCreateAclRequest({ mswInstance, response, }: { - mswInstance: SetupServerApi; + mswInstance: SetupServer; response: { status?: number; data: KlawApiResponse<"createAcl"> | { message: string }; diff --git a/coral/src/domain/auth-user/auth-user-api.msw.ts b/coral/src/domain/auth-user/auth-user-api.msw.ts index ca7f38b0de..d23fca3cef 100644 --- a/coral/src/domain/auth-user/auth-user-api.msw.ts +++ b/coral/src/domain/auth-user/auth-user-api.msw.ts @@ -1,11 +1,11 @@ import { rest } from "msw"; import { getHTTPBaseAPIUrl } from "src/config"; -import { SetupServerApi } from "msw/node"; +import { SetupServer } from "msw/node"; import { testAuthUser } from "src/domain/auth-user/auth-user-test-helper"; const correctUsername = "superadmin"; -function mockUserAuthRequest(mswInstance: SetupServerApi) { +function mockUserAuthRequest(mswInstance: SetupServer) { mswInstance.use( rest.post(`${getHTTPBaseAPIUrl()}/login`, async (req, res, ctx) => { const request = await req.json(); diff --git a/coral/src/domain/environment/environment-api.msw.ts b/coral/src/domain/environment/environment-api.msw.ts index 9215f3ecd0..7881a932e3 100644 --- a/coral/src/domain/environment/environment-api.msw.ts +++ b/coral/src/domain/environment/environment-api.msw.ts @@ -1,4 +1,4 @@ -import { SetupServerApi } from "msw/node"; +import { SetupServer } from "msw/node"; import { rest } from "msw"; import { createMockEnvironmentDTO } from "src/domain/environment/environment-test-helper"; import { getHTTPBaseAPIUrl } from "src/config"; @@ -6,7 +6,7 @@ import { KlawApiResponse } from "types/utils"; import { operations } from "types/api"; type MockApi = { - mswInstance: SetupServerApi; + mswInstance: SetupServer; response: { status?: number; data: KlawApiResponse | { message: string }; @@ -43,7 +43,7 @@ const mockedEnvironmentResponse = [ ]; interface GetClusterInfoFromEnvRequestArgs { - mswInstance: SetupServerApi; + mswInstance: SetupServer; response: KlawApiResponse<"getClusterInfoFromEnv">; } diff --git a/coral/src/domain/topic/topic-api.msw.ts b/coral/src/domain/topic/topic-api.msw.ts index 4e3da38256..c1bd97b98f 100644 --- a/coral/src/domain/topic/topic-api.msw.ts +++ b/coral/src/domain/topic/topic-api.msw.ts @@ -1,5 +1,5 @@ import { rest } from "msw"; -import { SetupServerApi } from "msw/node"; +import { SetupServer } from "msw/node"; import { transformTopicApiResponse } from "src/domain/topic/topic-transformer"; import { createMockTopicApiResponse } from "src/domain/topic/topic-test-helper"; import { getHTTPBaseAPIUrl } from "src/config"; @@ -10,7 +10,7 @@ function mockgetTopicAdvancedConfigOptions({ mswInstance, response, }: { - mswInstance: SetupServerApi; + mswInstance: SetupServer; response: { status?: number; data: KlawApiResponse<"getAdvancedTopicConfigs"> | { message: string }; @@ -28,7 +28,7 @@ function mockRequestTopic({ mswInstance, response, }: { - mswInstance: SetupServerApi; + mswInstance: SetupServer; response: { status?: number; data: KlawApiResponse<"createTopicsCreateRequest"> | { message: string }; @@ -96,7 +96,7 @@ const mockedResponseTransformed = transformTopicApiResponse( ); interface MockGetTopicNamesRequestArgs { - mswInstance: SetupServerApi; + mswInstance: SetupServer; response: TopicNames; } @@ -120,7 +120,7 @@ const mockedResponseTopicNames: KlawApiResponse<"getTopicsOnly"> = [ ]; interface MockGetTopicTeamRequestArgs { - mswInstance: SetupServerApi; + mswInstance: SetupServer; response: TopicTeam; topicName: string; patternType?: "LITERAL" | "PREFIXED"; @@ -149,7 +149,7 @@ function mockGetTopicRequestsForApprover({ mswInstance, response, }: { - mswInstance: SetupServerApi; + mswInstance: SetupServer; response: { status?: number; data: KlawApiResponse<"getTopicRequestsForApprover"> | { message: string }; diff --git a/coral/src/types/global.d.ts b/coral/src/types/global.d.ts index 88cb8da225..67f93a3d31 100644 --- a/coral/src/types/global.d.ts +++ b/coral/src/types/global.d.ts @@ -1,4 +1,4 @@ -import { SetupServerApi } from "msw/node"; +import { SetupServer } from "msw/node"; // eslint-disable-next-line @typescript-eslint/no-unused-vars import * as React from "@types/react"; @@ -15,7 +15,7 @@ declare module "react" { declare global { interface Window { - msw: SetupServerApi; + msw: SetupServer; } }