diff --git a/.nvmrc b/.nvmrc index b460d6f2d..4a1f488b6 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -18.12.1 +18.17.1 diff --git a/package.json b/package.json index f391e735e..6080967f5 100644 --- a/package.json +++ b/package.json @@ -47,9 +47,9 @@ "prisma:postgres:generate": "prisma generate", "prisma:db:pull": "npm-run-all -p prisma:postgres:db:pull", "prisma:postgres:db:pull": "prisma db pull", - "supabase:start": "SUPABASE_SCANNER_BUFFER_SIZE=100mb supabase start", + "supabase:start": "SUPABASE_SCANNER_BUFFER_SIZE=100mb supabase start", "supabase:stop": "supabase stop", - "supabase:reset": "SUPABASE_SCANNER_BUFFER_SIZE=100mb supabase db reset" + "supabase:reset": "SUPABASE_SCANNER_BUFFER_SIZE=100mb supabase db reset" }, "dependencies": { "@apollo/client": "^3.9.10", @@ -134,7 +134,7 @@ "@types/mapbox": "^1.6.45", "@types/mapbox__geojson-area": "^0.2.2", "@types/ngeohash": "^0.6.4", - "@types/node": "^18.16.3", + "@types/node": "^18.17.1", "@types/react": "^18.2.74", "@types/react-dom": "^18.2.24", "@types/styled-system": "^5.1.22", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d0283a65e..ae6e763e2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -169,7 +169,7 @@ importers: version: 7.6.0 '@graphql-codegen/cli': specifier: ^5.0.2 - version: 5.0.2(@parcel/watcher@2.4.1)(@types/node@18.16.3)(enquirer@2.3.6)(graphql@16.8.1)(typescript@5.4.4) + version: 5.0.2(@parcel/watcher@2.4.1)(@types/node@18.19.3)(enquirer@2.3.6)(graphql@16.8.1)(typescript@5.4.4) '@graphql-codegen/import-types-preset': specifier: ^3.0.0 version: 3.0.0(graphql@16.8.1) @@ -187,7 +187,7 @@ importers: version: 4.0.6(graphql@16.8.1) '@graphql-eslint/eslint-plugin': specifier: ^3.20.1 - version: 3.20.1(@babel/core@7.24.4)(@types/node@18.16.3)(graphql@16.8.1) + version: 3.20.1(@babel/core@7.24.4)(@types/node@18.19.3)(graphql@16.8.1) '@jest/globals': specifier: ^29.7.0 version: 29.7.0 @@ -264,8 +264,8 @@ importers: specifier: ^0.6.4 version: 0.6.4 '@types/node': - specifier: ^18.16.3 - version: 18.16.3 + specifier: ^18.17.1 + version: 18.19.3 '@types/react': specifier: ^18.2.74 version: 18.2.74 @@ -343,7 +343,7 @@ importers: version: 8.0.3 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@18.16.3)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.16.3)(typescript@5.4.4)) + version: 29.7.0(@types/node@18.19.3)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.19.3)(typescript@5.4.4)) lint-staged: specifier: ^13.2.2 version: 13.2.2(enquirer@2.3.6) @@ -391,10 +391,10 @@ importers: version: 3.0.3 ts-jest: specifier: ^29.1.2 - version: 29.1.2(@babel/core@7.24.4)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(esbuild@0.18.20)(jest@29.7.0(@types/node@18.16.3)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.16.3)(typescript@5.4.4)))(typescript@5.4.4) + version: 29.1.2(@babel/core@7.24.4)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(esbuild@0.18.20)(jest@29.7.0(@types/node@18.19.3)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.19.3)(typescript@5.4.4)))(typescript@5.4.4) ts-node: specifier: ^10.9.2 - version: 10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.16.3)(typescript@5.4.4) + version: 10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.19.3)(typescript@5.4.4) typescript: specifier: ^5.4.4 version: 5.4.4 @@ -3523,9 +3523,6 @@ packages: '@types/node@14.18.63': resolution: {integrity: sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ==} - '@types/node@18.16.3': - resolution: {integrity: sha512-OPs5WnnT1xkCBiuQrZA4+YAV4HEJejmHneyraIaxsbev5yCEr6KMwINNFP9wQeFIw8FWcoTqF3vQsa5CDaI+8Q==} - '@types/node@18.19.3': resolution: {integrity: sha512-k5fggr14DwAytoA/t8rPrIz++lXK7/DqckthCmoZOKNsEbJkId4Z//BqgApXBUGrGddrigYa1oqheo/7YmW4rg==} @@ -4475,11 +4472,8 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - caniuse-lite@1.0.30001543: - resolution: {integrity: sha512-qxdO8KPWPQ+Zk6bvNpPeQIOH47qZSYdFZd6dXQzb2KzhnSXju4Kd7H1PkSJx6NICSMgo/IhRZRhhfPTHYpJUCA==} - - caniuse-lite@1.0.30001606: - resolution: {integrity: sha512-LPbwnW4vfpJId225pwjZJOgX1m9sGfbw/RKJvw/t0QhYOOaTXHvkjVGFGPpvwEzufrjvTlsULnVTxdy4/6cqkg==} + caniuse-lite@1.0.30001663: + resolution: {integrity: sha512-o9C3X27GLKbLeTYZ6HBOLU1tsAcBZsLis28wrVzddShCS16RujjHp9GDHKZqrB3meE0YjhawvMFsGb/igqiPzA==} capital-case@1.0.4: resolution: {integrity: sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A==} @@ -11336,7 +11330,7 @@ snapshots: graphql: 16.8.1 tslib: 2.6.2 - '@graphql-codegen/cli@5.0.2(@parcel/watcher@2.4.1)(@types/node@18.16.3)(enquirer@2.3.6)(graphql@16.8.1)(typescript@5.4.4)': + '@graphql-codegen/cli@5.0.2(@parcel/watcher@2.4.1)(@types/node@18.19.3)(enquirer@2.3.6)(graphql@16.8.1)(typescript@5.4.4)': dependencies: '@babel/generator': 7.23.6 '@babel/template': 7.24.0 @@ -11347,12 +11341,12 @@ snapshots: '@graphql-tools/apollo-engine-loader': 8.0.1(graphql@16.8.1) '@graphql-tools/code-file-loader': 8.1.1(graphql@16.8.1) '@graphql-tools/git-loader': 8.0.5(graphql@16.8.1) - '@graphql-tools/github-loader': 8.0.1(@types/node@18.16.3)(graphql@16.8.1) + '@graphql-tools/github-loader': 8.0.1(@types/node@18.19.3)(graphql@16.8.1) '@graphql-tools/graphql-file-loader': 8.0.1(graphql@16.8.1) '@graphql-tools/json-file-loader': 8.0.1(graphql@16.8.1) '@graphql-tools/load': 8.0.2(graphql@16.8.1) - '@graphql-tools/prisma-loader': 8.0.3(@types/node@18.16.3)(graphql@16.8.1) - '@graphql-tools/url-loader': 8.0.2(@types/node@18.16.3)(graphql@16.8.1) + '@graphql-tools/prisma-loader': 8.0.3(@types/node@18.19.3)(graphql@16.8.1) + '@graphql-tools/url-loader': 8.0.2(@types/node@18.19.3)(graphql@16.8.1) '@graphql-tools/utils': 10.1.2(graphql@16.8.1) '@whatwg-node/fetch': 0.8.8 chalk: 4.1.2 @@ -11360,7 +11354,7 @@ snapshots: debounce: 1.2.1 detect-indent: 6.1.0 graphql: 16.8.1 - graphql-config: 5.0.3(@types/node@18.16.3)(graphql@16.8.1)(typescript@5.4.4) + graphql-config: 5.0.3(@types/node@18.19.3)(graphql@16.8.1)(typescript@5.4.4) inquirer: 8.2.6 is-glob: 4.0.3 jiti: 1.21.0 @@ -11587,7 +11581,7 @@ snapshots: - encoding - supports-color - '@graphql-eslint/eslint-plugin@3.20.1(@babel/core@7.24.4)(@types/node@18.16.3)(graphql@16.8.1)': + '@graphql-eslint/eslint-plugin@3.20.1(@babel/core@7.24.4)(@types/node@18.19.3)(graphql@16.8.1)': dependencies: '@babel/code-frame': 7.22.13 '@graphql-tools/code-file-loader': 7.3.23(@babel/core@7.24.4)(graphql@16.8.1) @@ -11597,7 +11591,7 @@ snapshots: debug: 4.3.4(supports-color@8.1.1) fast-glob: 3.3.1 graphql: 16.8.1 - graphql-config: 4.5.0(@types/node@18.16.3)(graphql@16.8.1) + graphql-config: 4.5.0(@types/node@18.19.3)(graphql@16.8.1) graphql-depth-limit: 1.1.0(graphql@16.8.1) lodash.lowercase: 4.3.0 tslib: 2.6.2 @@ -11713,7 +11707,7 @@ snapshots: - bufferutil - utf-8-validate - '@graphql-tools/executor-http@0.1.10(@types/node@18.16.3)(graphql@16.8.1)': + '@graphql-tools/executor-http@0.1.10(@types/node@18.19.3)(graphql@16.8.1)': dependencies: '@graphql-tools/utils': 9.2.1(graphql@16.8.1) '@repeaterjs/repeater': 3.0.5 @@ -11721,20 +11715,20 @@ snapshots: dset: 3.1.3 extract-files: 11.0.0 graphql: 16.8.1 - meros: 1.3.0(@types/node@18.16.3) + meros: 1.3.0(@types/node@18.19.3) tslib: 2.6.2 value-or-promise: 1.0.12 transitivePeerDependencies: - '@types/node' - '@graphql-tools/executor-http@1.0.9(@types/node@18.16.3)(graphql@16.8.1)': + '@graphql-tools/executor-http@1.0.9(@types/node@18.19.3)(graphql@16.8.1)': dependencies: '@graphql-tools/utils': 10.1.2(graphql@16.8.1) '@repeaterjs/repeater': 3.0.5 '@whatwg-node/fetch': 0.9.17 extract-files: 11.0.0 graphql: 16.8.1 - meros: 1.3.0(@types/node@18.16.3) + meros: 1.3.0(@types/node@18.19.3) tslib: 2.6.2 value-or-promise: 1.0.12 transitivePeerDependencies: @@ -11803,10 +11797,10 @@ snapshots: transitivePeerDependencies: - supports-color - '@graphql-tools/github-loader@8.0.1(@types/node@18.16.3)(graphql@16.8.1)': + '@graphql-tools/github-loader@8.0.1(@types/node@18.19.3)(graphql@16.8.1)': dependencies: '@ardatan/sync-fetch': 0.0.1 - '@graphql-tools/executor-http': 1.0.9(@types/node@18.16.3)(graphql@16.8.1) + '@graphql-tools/executor-http': 1.0.9(@types/node@18.19.3)(graphql@16.8.1) '@graphql-tools/graphql-tag-pluck': 8.3.0(graphql@16.8.1) '@graphql-tools/utils': 10.1.2(graphql@16.8.1) '@whatwg-node/fetch': 0.9.17 @@ -11935,9 +11929,9 @@ snapshots: graphql: 16.8.1 tslib: 2.6.2 - '@graphql-tools/prisma-loader@8.0.3(@types/node@18.16.3)(graphql@16.8.1)': + '@graphql-tools/prisma-loader@8.0.3(@types/node@18.19.3)(graphql@16.8.1)': dependencies: - '@graphql-tools/url-loader': 8.0.2(@types/node@18.16.3)(graphql@16.8.1) + '@graphql-tools/url-loader': 8.0.2(@types/node@18.19.3)(graphql@16.8.1) '@graphql-tools/utils': 10.1.2(graphql@16.8.1) '@types/js-yaml': 4.0.9 '@types/json-stable-stringify': 1.0.36 @@ -12009,12 +12003,12 @@ snapshots: tslib: 2.5.0 value-or-promise: 1.0.12 - '@graphql-tools/url-loader@7.17.18(@types/node@18.16.3)(graphql@16.8.1)': + '@graphql-tools/url-loader@7.17.18(@types/node@18.19.3)(graphql@16.8.1)': dependencies: '@ardatan/sync-fetch': 0.0.1 '@graphql-tools/delegate': 9.0.35(graphql@16.8.1) '@graphql-tools/executor-graphql-ws': 0.0.14(graphql@16.8.1) - '@graphql-tools/executor-http': 0.1.10(@types/node@18.16.3)(graphql@16.8.1) + '@graphql-tools/executor-http': 0.1.10(@types/node@18.19.3)(graphql@16.8.1) '@graphql-tools/executor-legacy-ws': 0.0.11(graphql@16.8.1) '@graphql-tools/utils': 9.2.1(graphql@16.8.1) '@graphql-tools/wrap': 9.4.2(graphql@16.8.1) @@ -12031,12 +12025,12 @@ snapshots: - encoding - utf-8-validate - '@graphql-tools/url-loader@8.0.2(@types/node@18.16.3)(graphql@16.8.1)': + '@graphql-tools/url-loader@8.0.2(@types/node@18.19.3)(graphql@16.8.1)': dependencies: '@ardatan/sync-fetch': 0.0.1 '@graphql-tools/delegate': 10.0.4(graphql@16.8.1) '@graphql-tools/executor-graphql-ws': 1.1.2(graphql@16.8.1) - '@graphql-tools/executor-http': 1.0.9(@types/node@18.16.3)(graphql@16.8.1) + '@graphql-tools/executor-http': 1.0.9(@types/node@18.19.3)(graphql@16.8.1) '@graphql-tools/executor-legacy-ws': 1.0.6(graphql@16.8.1) '@graphql-tools/utils': 10.1.2(graphql@16.8.1) '@graphql-tools/wrap': 10.0.2(graphql@16.8.1) @@ -12162,21 +12156,21 @@ snapshots: jest-util: 29.7.0 slash: 3.0.0 - '@jest/core@29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.16.3)(typescript@5.4.4))': + '@jest/core@29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.19.3)(typescript@5.4.4))': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0 '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 18.16.3 + '@types/node': 18.19.3 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.8.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@18.16.3)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.16.3)(typescript@5.4.4)) + jest-config: 29.7.0(@types/node@18.19.3)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.19.3)(typescript@5.4.4)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -12201,7 +12195,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 18.16.3 + '@types/node': 18.19.3 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -12310,7 +12304,7 @@ snapshots: dependencies: '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 18.16.3 + '@types/node': 18.19.3 '@types/yargs': 16.0.9 chalk: 4.1.2 @@ -12319,7 +12313,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 18.16.3 + '@types/node': 18.19.3 '@types/yargs': 17.0.24 chalk: 4.1.2 @@ -13426,7 +13420,7 @@ snapshots: '@storybook/preview': 7.6.17 '@storybook/preview-api': 7.6.17 '@swc/core': 1.4.2(@swc/helpers@0.5.13) - '@types/node': 18.16.3 + '@types/node': 18.19.3 '@types/semver': 7.5.8 babel-loader: 9.1.3(@babel/core@7.24.4)(webpack@5.91.0(@swc/core@1.4.2(@swc/helpers@0.5.13))(esbuild@0.18.20)) browser-assert: 1.2.1 @@ -13605,7 +13599,7 @@ snapshots: '@storybook/node-logger': 7.6.17 '@storybook/types': 7.6.17 '@types/find-cache-dir': 3.2.1 - '@types/node': 18.16.3 + '@types/node': 18.19.3 '@types/node-fetch': 2.6.11 '@types/pretty-hrtime': 1.0.3 chalk: 4.1.2 @@ -13654,7 +13648,7 @@ snapshots: '@storybook/telemetry': 7.6.17 '@storybook/types': 7.6.17 '@types/detect-port': 1.3.5 - '@types/node': 18.16.3 + '@types/node': 18.19.3 '@types/pretty-hrtime': 1.0.3 '@types/semver': 7.5.8 better-opn: 3.0.2 @@ -13690,7 +13684,7 @@ snapshots: '@storybook/core-common': 7.6.17 '@storybook/node-logger': 7.6.17 '@storybook/types': 7.6.17 - '@types/node': 18.16.3 + '@types/node': 18.19.3 ts-dedent: 2.2.0 transitivePeerDependencies: - encoding @@ -13793,7 +13787,7 @@ snapshots: '@storybook/preset-react-webpack': 7.6.17(@babel/core@7.24.4)(@swc/core@1.4.2(@swc/helpers@0.5.13))(esbuild@0.18.20)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(type-fest@4.26.1)(typescript@5.4.4)(webpack-hot-middleware@2.26.1) '@storybook/preview-api': 7.6.17 '@storybook/react': 7.6.17(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.4.4) - '@types/node': 18.16.3 + '@types/node': 18.19.3 '@types/semver': 7.5.8 css-loader: 6.10.0(webpack@5.91.0(@swc/core@1.4.2(@swc/helpers@0.5.13))(esbuild@0.18.20)) find-up: 5.0.0 @@ -13862,7 +13856,7 @@ snapshots: '@storybook/node-logger': 7.6.17 '@storybook/react': 7.6.17(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.4.4) '@storybook/react-docgen-typescript-plugin': 1.0.6--canary.9.0c3f3b7.0(typescript@5.4.4)(webpack@5.91.0(@swc/core@1.4.2(@swc/helpers@0.5.13))(esbuild@0.18.20)) - '@types/node': 18.16.3 + '@types/node': 18.19.3 '@types/semver': 7.5.8 babel-plugin-add-react-displayname: 0.0.5 fs-extra: 11.2.0 @@ -13939,7 +13933,7 @@ snapshots: '@storybook/types': 7.6.17 '@types/escodegen': 0.0.6 '@types/estree': 0.0.51 - '@types/node': 18.16.3 + '@types/node': 18.19.3 acorn: 7.4.1 acorn-jsx: 5.3.2(acorn@7.4.1) acorn-walk: 7.2.0 @@ -14229,7 +14223,7 @@ snapshots: '@types/body-parser@1.19.5': dependencies: '@types/connect': 3.4.38 - '@types/node': 18.16.3 + '@types/node': 18.19.3 '@types/cacheable-request@6.0.3': dependencies: @@ -14240,7 +14234,7 @@ snapshots: '@types/cli-progress@3.11.5': dependencies: - '@types/node': 18.16.3 + '@types/node': 18.19.3 '@types/connect@3.4.36': dependencies: @@ -14248,11 +14242,11 @@ snapshots: '@types/connect@3.4.38': dependencies: - '@types/node': 18.16.3 + '@types/node': 18.19.3 '@types/cross-spawn@6.0.6': dependencies: - '@types/node': 18.16.3 + '@types/node': 18.19.3 '@types/css-font-loading-module@0.0.7': {} @@ -14295,7 +14289,7 @@ snapshots: '@types/express-serve-static-core@4.17.43': dependencies: - '@types/node': 18.16.3 + '@types/node': 18.19.3 '@types/qs': 6.9.12 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 @@ -14322,7 +14316,7 @@ snapshots: '@types/graceful-fs@4.1.7': dependencies: - '@types/node': 18.16.3 + '@types/node': 18.19.3 '@types/html-minifier-terser@6.1.0': {} @@ -14369,7 +14363,7 @@ snapshots: '@types/jsonwebtoken@9.0.6': dependencies: - '@types/node': 18.16.3 + '@types/node': 18.19.3 '@types/keyv@3.1.4': dependencies: @@ -14419,15 +14413,13 @@ snapshots: '@types/node-fetch@2.6.11': dependencies: - '@types/node': 18.16.3 + '@types/node': 18.19.3 form-data: 4.0.0 '@types/node@13.13.52': {} '@types/node@14.18.63': {} - '@types/node@18.16.3': {} - '@types/node@18.19.3': dependencies: undici-types: 5.26.5 @@ -14481,7 +14473,7 @@ snapshots: '@types/send@0.17.4': dependencies: '@types/mime': 1.3.5 - '@types/node': 18.16.3 + '@types/node': 18.19.3 '@types/serve-static@1.15.3': dependencies: @@ -14493,7 +14485,7 @@ snapshots: dependencies: '@types/http-errors': 2.0.4 '@types/mime': 3.0.4 - '@types/node': 18.16.3 + '@types/node': 18.19.3 '@types/sinonjs__fake-timers@8.1.1': {} @@ -14515,7 +14507,7 @@ snapshots: '@types/ws@8.5.10': dependencies: - '@types/node': 18.16.3 + '@types/node': 18.19.3 '@types/yargs-parser@21.0.1': {} @@ -14531,7 +14523,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 18.16.3 + '@types/node': 18.19.3 optional: true '@typescript-eslint/eslint-plugin@5.59.1(@typescript-eslint/parser@5.59.1(eslint@8.57.0)(typescript@5.4.4))(eslint@8.57.0)(typescript@5.4.4)': @@ -15553,7 +15545,7 @@ snapshots: browserslist@4.23.0: dependencies: - caniuse-lite: 1.0.30001606 + caniuse-lite: 1.0.30001663 electron-to-chromium: 1.4.729 node-releases: 2.0.14 update-browserslist-db: 1.0.13(browserslist@4.23.0) @@ -15637,9 +15629,7 @@ snapshots: camelcase@6.3.0: {} - caniuse-lite@1.0.30001543: {} - - caniuse-lite@1.0.30001606: {} + caniuse-lite@1.0.30001663: {} capital-case@1.0.4: dependencies: @@ -16045,13 +16035,13 @@ snapshots: safe-buffer: 5.2.1 sha.js: 2.4.11 - create-jest@29.7.0(@types/node@18.16.3)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.16.3)(typescript@5.4.4)): + create-jest@29.7.0(@types/node@18.19.3)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.19.3)(typescript@5.4.4)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@18.16.3)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.16.3)(typescript@5.4.4)) + jest-config: 29.7.0(@types/node@18.19.3)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.19.3)(typescript@5.4.4)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -17596,13 +17586,13 @@ snapshots: - encoding - supports-color - graphql-config@4.5.0(@types/node@18.16.3)(graphql@16.8.1): + graphql-config@4.5.0(@types/node@18.19.3)(graphql@16.8.1): dependencies: '@graphql-tools/graphql-file-loader': 7.5.17(graphql@16.8.1) '@graphql-tools/json-file-loader': 7.4.18(graphql@16.8.1) '@graphql-tools/load': 7.8.14(graphql@16.8.1) '@graphql-tools/merge': 8.4.2(graphql@16.8.1) - '@graphql-tools/url-loader': 7.17.18(@types/node@18.16.3)(graphql@16.8.1) + '@graphql-tools/url-loader': 7.17.18(@types/node@18.19.3)(graphql@16.8.1) '@graphql-tools/utils': 9.2.1(graphql@16.8.1) cosmiconfig: 8.0.0 graphql: 16.8.1 @@ -17616,13 +17606,13 @@ snapshots: - encoding - utf-8-validate - graphql-config@5.0.3(@types/node@18.16.3)(graphql@16.8.1)(typescript@5.4.4): + graphql-config@5.0.3(@types/node@18.19.3)(graphql@16.8.1)(typescript@5.4.4): dependencies: '@graphql-tools/graphql-file-loader': 8.0.1(graphql@16.8.1) '@graphql-tools/json-file-loader': 8.0.1(graphql@16.8.1) '@graphql-tools/load': 8.0.2(graphql@16.8.1) '@graphql-tools/merge': 9.0.3(graphql@16.8.1) - '@graphql-tools/url-loader': 8.0.2(@types/node@18.16.3)(graphql@16.8.1) + '@graphql-tools/url-loader': 8.0.2(@types/node@18.19.3)(graphql@16.8.1) '@graphql-tools/utils': 10.1.2(graphql@16.8.1) cosmiconfig: 8.3.6(typescript@5.4.4) graphql: 16.8.1 @@ -18303,7 +18293,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 18.16.3 + '@types/node': 18.19.3 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.1(babel-plugin-macros@3.1.0) @@ -18323,16 +18313,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@18.16.3)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.16.3)(typescript@5.4.4)): + jest-cli@29.7.0(@types/node@18.19.3)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.19.3)(typescript@5.4.4)): dependencies: - '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.16.3)(typescript@5.4.4)) + '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.19.3)(typescript@5.4.4)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@18.16.3)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.16.3)(typescript@5.4.4)) + create-jest: 29.7.0(@types/node@18.19.3)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.19.3)(typescript@5.4.4)) exit: 0.1.2 import-local: 3.1.0 - jest-config: 29.7.0(@types/node@18.16.3)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.16.3)(typescript@5.4.4)) + jest-config: 29.7.0(@types/node@18.19.3)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.19.3)(typescript@5.4.4)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -18342,7 +18332,7 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@18.16.3)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.16.3)(typescript@5.4.4)): + jest-config@29.7.0(@types/node@18.19.3)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.19.3)(typescript@5.4.4)): dependencies: '@babel/core': 7.24.4 '@jest/test-sequencer': 29.7.0 @@ -18367,8 +18357,8 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 18.16.3 - ts-node: 10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.16.3)(typescript@5.4.4) + '@types/node': 18.19.3 + ts-node: 10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.19.3)(typescript@5.4.4) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -18397,7 +18387,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 18.16.3 + '@types/node': 18.19.3 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -18446,12 +18436,12 @@ snapshots: jest-mock@27.5.1: dependencies: '@jest/types': 27.5.1 - '@types/node': 18.16.3 + '@types/node': 18.19.3 jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 18.16.3 + '@types/node': 18.19.3 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -18560,7 +18550,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 18.16.3 + '@types/node': 18.19.3 chalk: 4.1.2 ci-info: 3.8.0 graceful-fs: 4.2.11 @@ -18588,7 +18578,7 @@ snapshots: jest-worker@27.5.1: dependencies: - '@types/node': 18.16.3 + '@types/node': 18.19.3 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -18599,12 +18589,12 @@ snapshots: merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@18.16.3)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.16.3)(typescript@5.4.4)): + jest@29.7.0(@types/node@18.19.3)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.19.3)(typescript@5.4.4)): dependencies: - '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.16.3)(typescript@5.4.4)) + '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.19.3)(typescript@5.4.4)) '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.7.0(@types/node@18.16.3)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.16.3)(typescript@5.4.4)) + jest-cli: 29.7.0(@types/node@18.19.3)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.19.3)(typescript@5.4.4)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -19228,9 +19218,9 @@ snapshots: merge2@1.4.1: {} - meros@1.3.0(@types/node@18.16.3): + meros@1.3.0(@types/node@18.19.3): optionalDependencies: - '@types/node': 18.16.3 + '@types/node': 18.19.3 methods@1.1.2: {} @@ -19535,7 +19525,7 @@ snapshots: '@next/env': 13.5.4 '@swc/helpers': 0.5.2 busboy: 1.6.0 - caniuse-lite: 1.0.30001543 + caniuse-lite: 1.0.30001663 postcss: 8.4.31 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -21536,11 +21526,11 @@ snapshots: dependencies: tslib: 2.6.2 - ts-jest@29.1.2(@babel/core@7.24.4)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(esbuild@0.18.20)(jest@29.7.0(@types/node@18.16.3)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.16.3)(typescript@5.4.4)))(typescript@5.4.4): + ts-jest@29.1.2(@babel/core@7.24.4)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(esbuild@0.18.20)(jest@29.7.0(@types/node@18.19.3)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.19.3)(typescript@5.4.4)))(typescript@5.4.4): dependencies: bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@18.16.3)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.16.3)(typescript@5.4.4)) + jest: 29.7.0(@types/node@18.19.3)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.19.3)(typescript@5.4.4)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -21556,14 +21546,14 @@ snapshots: ts-log@2.2.5: {} - ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.16.3)(typescript@5.4.4): + ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.13))(@types/node@18.19.3)(typescript@5.4.4): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.9 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 18.16.3 + '@types/node': 18.19.3 acorn: 8.11.3 acorn-walk: 8.3.2 arg: 4.1.3 diff --git a/schema.prisma b/schema.prisma index 7b2346d0d..cd8877bf6 100644 --- a/schema.prisma +++ b/schema.prisma @@ -85,6 +85,17 @@ model record_version { @@schema("audit") } +/// This model contains row level security and requires additional setup for migrations. Visit https://pris.ly/d/row-level-security for more info. +model feedback { + id Int @id @default(autoincrement()) + email String? @db.VarChar(255) + feedback_text String + route String + created_at DateTime? @default(now()) @db.Timestamp(6) + + @@schema("public") +} + enum operation { INSERT UPDATE diff --git a/src/api/prisma/queries.ts b/src/api/prisma/queries.ts index 72f537944..8d01d322d 100644 --- a/src/api/prisma/queries.ts +++ b/src/api/prisma/queries.ts @@ -191,19 +191,22 @@ export const getLoosByProximity = async ( ) => { const nearbyLoos = (await prisma.$queryRaw` SELECT - loo.id, loo.name, active, men, women, no_payment, notes, opening_times, payment_details, - accessible, active, all_gender, attended, automatic, location, baby_change, children, created_at, - removal_reason, radar, urinal_only, verified_at,updated_at,geohash, + loo.id, loo.name, loo.active, loo.men, loo.women, loo.no_payment, loo.notes, loo.opening_times, + loo.payment_details, loo.accessible, loo.all_gender, loo.attended, loo.automatic, loo.location, + loo.baby_change, loo.children, loo.created_at, loo.removal_reason, loo.radar, loo.urinal_only, + loo.verified_at, loo.updated_at, loo.geohash, st_distancesphere( - geography::geometry, + loo.geography::geometry, ST_MakePoint(${lng}, ${lat}) ) as distance, area.name as area_name, - area.type as area_type from toilets loo inner join areas area on area.id = loo.area_id - where st_distancesphere( + area.type as area_type + FROM toilets loo + INNER JOIN areas area ON area.id = loo.area_id + WHERE st_distancesphere( loo.geography::geometry, ST_MakePoint(${lng}, ${lat}) - ) <= ${radius} + ) <= ${radius} `) as (toilets & { distance: number; area_name?: string; diff --git a/src/components/Feedback/Feedback.tsx b/src/components/Feedback/Feedback.tsx index e8ccffb55..de4b23fad 100644 --- a/src/components/Feedback/Feedback.tsx +++ b/src/components/Feedback/Feedback.tsx @@ -2,8 +2,9 @@ import { Stack } from '@mui/material'; import React, { useRef, useState } from 'react'; import Badge from '../../design-system/components/Badge'; import Button from '../../design-system/components/Button'; -import Box from '../Box'; import InputField from '../../design-system/components/InputField'; +import Link from 'next/link'; +import TextArea from '../../design-system/components/TextArea'; enum FeedbackState { SUCCESS = 0, @@ -15,7 +16,6 @@ const Feedback = () => { const [submitState, setSubmitState] = useState(FeedbackState.PENDING); const feedbackTextArea = useRef(); - const nameInput = useRef(); const emailInput = useRef(); const submitFeedback = async () => { @@ -25,13 +25,11 @@ const Feedback = () => { const hasUserInputText = feedbackTextArea.current?.value.length > 0; if (hasUserInputText) { - const input = ` -Feedback :love_letter: : ${feedbackTextArea.current.value} -Name: ${nameInput.current.value ?? 'Not provided'} -Email: ${emailInput.current.value ?? 'Not provided'} - `; + const input = feedbackTextArea.current.value; const payload = { text: input, + email: emailInput.current.value, + route: window.location.pathname, }; try { @@ -46,8 +44,6 @@ Email: ${emailInput.current.value ?? 'Not provided'} // eslint-disable-next-line functional/immutable-data feedbackTextArea.current.value = ''; // eslint-disable-next-line functional/immutable-data - nameInput.current.value = ''; - // eslint-disable-next-line functional/immutable-data emailInput.current.value = ''; setSubmitState(FeedbackState.SUCCESS); @@ -59,29 +55,40 @@ Email: ${emailInput.current.value ?? 'Not provided'} return ( - - + {submitState === FeedbackState.SUCCESS && Thank you!} - + - - + Feedback + + + + + Privacy Policy + - {submitState === FeedbackState.SUCCESS && Thank you!}