29 Commits

Author SHA1 Message Date
dependabot[bot]
949387e9ce Bump js-yaml in /client in the npm_and_yarn group across 1 directory
Bumps the npm_and_yarn group with 1 update in the /client directory: [js-yaml](https://github.com/nodeca/js-yaml).


Updates `js-yaml` from 3.14.0 to 3.14.2
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/3.14.0...3.14.2)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 3.14.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-17 22:05:02 +00:00
29b4e4d448 Merge pull request #12 from RiccardoSenica/dependabot/npm_and_yarn/client/npm_and_yarn-59d0d51f9e
Bump the npm_and_yarn group across 2 directories with 4 updates
2025-11-16 20:49:07 +01:00
dependabot[bot]
528737e6c6 Bump the npm_and_yarn group across 2 directories with 4 updates
Bumps the npm_and_yarn group with 3 updates in the /client directory: [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse), [brace-expansion](https://github.com/juliangruber/brace-expansion) and [browserslist](https://github.com/browserslist/browserslist).
Bumps the npm_and_yarn group with 1 update in the /server directory: [sha.js](https://github.com/crypto-browserify/sha.js).


Updates `@babel/traverse` from 7.28.0 to 7.28.4
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.28.4/packages/babel-traverse)

Updates `brace-expansion` from 1.1.11 to 1.1.12
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/1.1.11...v1.1.12)

Updates `brace-expansion` from 2.0.1 to 2.0.2
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/1.1.11...v1.1.12)

Updates `browserslist` from 4.25.1 to 4.26.0
- [Release notes](https://github.com/browserslist/browserslist/releases)
- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/browserslist/browserslist/compare/4.25.1...4.26.0)

Updates `sha.js` from 2.4.11 to 2.4.12
- [Changelog](https://github.com/browserify/sha.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crypto-browserify/sha.js/compare/v2.4.11...v2.4.12)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-version: 7.28.4
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: brace-expansion
  dependency-version: 1.1.12
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: brace-expansion
  dependency-version: 2.0.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: browserslist
  dependency-version: 4.26.0
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: sha.js
  dependency-version: 2.4.12
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-14 12:51:59 +00:00
d409ba9dee Merge pull request #11 from RiccardoSenica/dependabot/npm_and_yarn/client/npm_and_yarn-7d065cd83c
Bump form-data from 3.0.1 to 3.0.4 in /client in the npm_and_yarn group across 1 directory
2025-09-14 20:46:10 +08:00
dependabot[bot]
682b83377c Bump form-data in /client in the npm_and_yarn group across 1 directory
Bumps the npm_and_yarn group with 1 update in the /client directory: [form-data](https://github.com/form-data/form-data).


Updates `form-data` from 3.0.1 to 3.0.4
- [Release notes](https://github.com/form-data/form-data/releases)
- [Changelog](https://github.com/form-data/form-data/blob/v3.0.4/CHANGELOG.md)
- [Commits](https://github.com/form-data/form-data/compare/v3.0.1...v3.0.4)

---
updated-dependencies:
- dependency-name: form-data
  dependency-version: 3.0.4
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-04 15:12:47 +00:00
435685cf5d Merge pull request #10 from RiccardoSenica/dependabot/npm_and_yarn/client/npm_and_yarn-c6963743e9
Bump the npm_and_yarn group across 2 directories with 6 updates
2025-08-04 20:22:51 +08:00
dependabot[bot]
6e275094cb Bump the npm_and_yarn group across 2 directories with 6 updates
---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-version: 7.28.0
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: browserslist
  dependency-version: 4.25.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: on-headers
  dependency-version: 1.1.0
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: compression
  dependency-version: 1.8.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: apollo-server
  dependency-version: 3.13.0
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: apollo-server-core
  dependency-version: 2.19.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-18 02:02:43 +00:00
c883dfafe6 Merge pull request #9 from RiccardoSenica/dependabot/npm_and_yarn/server/npm_and_yarn-6ea9762674
Bump brace-expansion from 1.1.11 to 1.1.12 in /server in the npm_and_yarn group across 1 directory
2025-06-18 22:49:27 +02:00
dependabot[bot]
183220fcf1 Bump brace-expansion
Bumps the npm_and_yarn group with 1 update in the /server directory: [brace-expansion](https://github.com/juliangruber/brace-expansion).


Updates `brace-expansion` from 1.1.11 to 1.1.12
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/1.1.11...v1.1.12)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 1.1.12
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-11 21:24:27 +00:00
c9e4a389bd Merge pull request #8 from RiccardoSenica/dependabot/npm_and_yarn/client/npm_and_yarn-4d2f0b6829
Bump @babel/traverse from 7.27.3 to 7.27.4 in /client in the npm_and_yarn group across 1 directory
2025-06-07 13:49:07 +02:00
dependabot[bot]
f0e823abac Bump @babel/traverse
Bumps the npm_and_yarn group with 1 update in the /client directory: [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse).


Updates `@babel/traverse` from 7.27.3 to 7.27.4
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.27.4/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-version: 7.27.4
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-05 02:30:27 +00:00
2661a1c0a1 Merge pull request #7 from RiccardoSenica/dependabot/npm_and_yarn/client/npm_and_yarn-867ed2ae06
Bump the npm_and_yarn group across 2 directories with 3 updates
2025-05-29 23:05:51 +02:00
dependabot[bot]
19ae483328 Bump the npm_and_yarn group across 2 directories with 3 updates
Bumps the npm_and_yarn group with 2 updates in the /client directory: [browserslist](https://github.com/browserslist/browserslist) and [path-to-regexp](https://github.com/pillarjs/path-to-regexp).
Bumps the npm_and_yarn group with 1 update in the /server directory: [@graphql-tools/git-loader](https://github.com/ardatan/graphql-tools/tree/HEAD/packages/loaders/git).


Updates `browserslist` from 4.24.0 to 4.25.0
- [Release notes](https://github.com/browserslist/browserslist/releases)
- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/browserslist/browserslist/compare/4.24.0...4.25.0)

Updates `path-to-regexp` from 1.8.0 to 1.9.0
- [Release notes](https://github.com/pillarjs/path-to-regexp/releases)
- [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md)
- [Commits](https://github.com/pillarjs/path-to-regexp/compare/v1.8.0...v1.9.0)

Updates `@graphql-tools/git-loader` from 6.2.5 to 6.2.6
- [Release notes](https://github.com/ardatan/graphql-tools/releases)
- [Changelog](https://github.com/ardatan/graphql-tools/blob/master/packages/loaders/git/CHANGELOG.md)
- [Commits](https://github.com/ardatan/graphql-tools/commits/@graphql-tools/git-loader@6.2.6/packages/loaders/git)

---
updated-dependencies:
- dependency-name: browserslist
  dependency-version: 4.25.0
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: path-to-regexp
  dependency-version: 1.9.0
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: "@graphql-tools/git-loader"
  dependency-version: 6.2.6
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-29 21:05:13 +00:00
1c6e583608 Merge pull request #6 from RiccardoSenica/dependabot/npm_and_yarn/client/npm_and_yarn-8982d4f94d
Bump the npm_and_yarn group across 2 directories with 21 updates
2025-05-29 22:59:37 +02:00
dependabot[bot]
4058e90200 Bump the npm_and_yarn group across 2 directories with 21 updates
Bumps the npm_and_yarn group with 11 updates in the /client directory:

| Package | From | To |
| --- | --- | --- |
| [@babel/helpers](https://github.com/babel/babel/tree/HEAD/packages/babel-helpers) | `7.25.7` | `7.27.3` |
| [@babel/runtime-corejs3](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime-corejs3) | `7.12.5` | `7.27.3` |
| [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) | `7.12.5` | `7.27.3` |
| [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) | `7.25.7` | `7.27.3` |
| [ansi-regex](https://github.com/chalk/ansi-regex) | `5.0.0` | `5.0.1` |
| [cookie](https://github.com/jshttp/cookie) | `0.6.0` | `0.7.1` |
| [express](https://github.com/expressjs/express) | `4.21.0` | `4.21.2` |
| [cross-spawn](https://github.com/moxystudio/node-cross-spawn) | `7.0.3` | `7.0.6` |
| [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) | `0.2.0` | `0.2.2` |
| [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) | `2.0.7` | `2.0.9` |
| [nanoid](https://github.com/ai/nanoid) | `3.3.7` | `3.3.11` |

Bumps the npm_and_yarn group with 13 updates in the /server directory:

| Package | From | To |
| --- | --- | --- |
| [@babel/helpers](https://github.com/babel/babel/tree/HEAD/packages/babel-helpers) | `7.12.5` | `7.27.3` |
| [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) | `7.12.5` | `7.27.3` |
| [cross-spawn](https://github.com/moxystudio/node-cross-spawn) | `7.0.3` | `7.0.6` |
| [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) | `0.2.0` | `0.2.2` |
| [ini](https://github.com/npm/ini) | `1.3.5` | `1.3.8` |
| [loader-utils](https://github.com/webpack/loader-utils) | `1.4.0` | `1.4.2` |
| [minimist](https://github.com/minimistjs/minimist) | `1.2.5` | `1.2.8` |
| [url-parse](https://github.com/unshiftio/url-parse) | `1.4.7` | `1.5.10` |
| [jsonwebtoken](https://github.com/auth0/node-jsonwebtoken) | `8.5.1` | `9.0.0` |
| [mongoose](https://github.com/Automattic/mongoose) | `5.13.20` | `6.13.6` |
| [object-path](https://github.com/mariocasciaro/object-path) | `0.11.5` | `0.11.8` |
| [pathval](https://github.com/chaijs/pathval) | `1.1.0` | `1.1.1` |
| [ua-parser-js](https://github.com/faisalman/ua-parser-js) | `0.7.23` | `0.7.40` |



Updates `@babel/helpers` from 7.25.7 to 7.27.3
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.27.3/packages/babel-helpers)

Updates `@babel/runtime-corejs3` from 7.12.5 to 7.27.3
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.27.3/packages/babel-runtime-corejs3)

Updates `@babel/runtime` from 7.12.5 to 7.27.3
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.27.3/packages/babel-runtime)

Updates `@babel/traverse` from 7.25.7 to 7.27.3
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.27.3/packages/babel-traverse)

Updates `ansi-regex` from 5.0.0 to 5.0.1
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v5.0.0...v5.0.1)

Updates `cookie` from 0.6.0 to 0.7.1
- [Release notes](https://github.com/jshttp/cookie/releases)
- [Commits](https://github.com/jshttp/cookie/compare/v0.6.0...v0.7.1)

Updates `express` from 4.21.0 to 4.21.2
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.2/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.21.0...4.21.2)

Updates `cross-spawn` from 7.0.3 to 7.0.6
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

Updates `decode-uri-component` from 0.2.0 to 0.2.2
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

Updates `http-proxy-middleware` from 2.0.7 to 2.0.9
- [Release notes](https://github.com/chimurai/http-proxy-middleware/releases)
- [Changelog](https://github.com/chimurai/http-proxy-middleware/blob/v2.0.9/CHANGELOG.md)
- [Commits](https://github.com/chimurai/http-proxy-middleware/compare/v2.0.7...v2.0.9)

Updates `nanoid` from 3.3.7 to 3.3.11
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.3.7...3.3.11)

Updates `path-to-regexp` from 0.1.10 to 0.1.12
- [Release notes](https://github.com/pillarjs/path-to-regexp/releases)
- [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md)
- [Commits](https://github.com/pillarjs/path-to-regexp/compare/v0.1.10...v0.1.12)

Updates `@babel/helpers` from 7.12.5 to 7.27.3
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.27.3/packages/babel-helpers)

Updates `@babel/runtime` from 7.12.5 to 7.27.3
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.27.3/packages/babel-runtime)

Updates `cross-spawn` from 7.0.3 to 7.0.6
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

Updates `decode-uri-component` from 0.2.0 to 0.2.2
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

Updates `ini` from 1.3.5 to 1.3.8
- [Release notes](https://github.com/npm/ini/releases)
- [Changelog](https://github.com/npm/ini/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/ini/compare/v1.3.5...v1.3.8)

Updates `loader-utils` from 1.4.0 to 1.4.2
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v1.4.0...v1.4.2)

Updates `minimist` from 1.2.5 to 1.2.8
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.8)

Updates `url-parse` from 1.4.7 to 1.5.10
- [Commits](https://github.com/unshiftio/url-parse/compare/1.4.7...1.5.10)

Updates `jsonwebtoken` from 8.5.1 to 9.0.0
- [Changelog](https://github.com/auth0/node-jsonwebtoken/blob/master/CHANGELOG.md)
- [Commits](https://github.com/auth0/node-jsonwebtoken/compare/v8.5.1...v9.0.0)

Updates `mongoose` from 5.13.20 to 6.13.6
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/5.13.20...6.13.6)

Updates `object-path` from 0.11.5 to 0.11.8
- [Commits](https://github.com/mariocasciaro/object-path/commits/v0.11.8)

Updates `pathval` from 1.1.0 to 1.1.1
- [Release notes](https://github.com/chaijs/pathval/releases)
- [Changelog](https://github.com/chaijs/pathval/blob/master/CHANGELOG.md)
- [Commits](https://github.com/chaijs/pathval/compare/v1.1.0...v1.1.1)

Updates `ua-parser-js` from 0.7.23 to 0.7.40
- [Release notes](https://github.com/faisalman/ua-parser-js/releases)
- [Changelog](https://github.com/faisalman/ua-parser-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/faisalman/ua-parser-js/compare/0.7.23...0.7.40)

---
updated-dependencies:
- dependency-name: "@babel/helpers"
  dependency-version: 7.27.3
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: "@babel/runtime-corejs3"
  dependency-version: 7.27.3
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: "@babel/runtime"
  dependency-version: 7.27.3
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: "@babel/traverse"
  dependency-version: 7.27.3
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: ansi-regex
  dependency-version: 5.0.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: cookie
  dependency-version: 0.7.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: express
  dependency-version: 4.21.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: cross-spawn
  dependency-version: 7.0.6
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: decode-uri-component
  dependency-version: 0.2.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: http-proxy-middleware
  dependency-version: 2.0.9
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: nanoid
  dependency-version: 3.3.11
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: path-to-regexp
  dependency-version: 0.1.12
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: "@babel/helpers"
  dependency-version: 7.27.3
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: "@babel/runtime"
  dependency-version: 7.27.3
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: cross-spawn
  dependency-version: 7.0.6
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: decode-uri-component
  dependency-version: 0.2.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: ini
  dependency-version: 1.3.8
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: loader-utils
  dependency-version: 1.4.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: minimist
  dependency-version: 1.2.8
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: url-parse
  dependency-version: 1.5.10
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: jsonwebtoken
  dependency-version: 9.0.0
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: mongoose
  dependency-version: 6.13.6
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: object-path
  dependency-version: 0.11.8
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: pathval
  dependency-version: 1.1.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: ua-parser-js
  dependency-version: 0.7.40
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-29 20:54:32 +00:00
bdc04a78cc Merge pull request #1 from RiccardoSenica/dependabot/npm_and_yarn/client/npm_and_yarn-f24226c2ec
Bump the npm_and_yarn group across 2 directories with 22 updates
2025-05-29 22:42:49 +02:00
31b1a1e647 Merge branch 'main' into dependabot/npm_and_yarn/client/npm_and_yarn-f24226c2ec 2025-05-29 22:42:27 +02:00
df127fde84 Merge pull request #2 from RiccardoSenica/dependabot/npm_and_yarn/client/browserify-sign-4.2.3
Bump browserify-sign from 4.2.1 to 4.2.3 in /client
2025-05-29 22:32:01 +02:00
1a0165b8f6 Merge branch 'main' into dependabot/npm_and_yarn/client/browserify-sign-4.2.3 2025-05-29 22:31:51 +02:00
1f1ff28a2d Merge pull request #3 from RiccardoSenica/dependabot/npm_and_yarn/client/elliptic-6.5.7
Bump elliptic from 6.5.3 to 6.5.7 in /client
2025-05-29 22:27:48 +02:00
e82e4702ca Merge pull request #4 from RiccardoSenica/dependabot/npm_and_yarn/client/es5-ext-0.10.64
Bump es5-ext from 0.10.53 to 0.10.64 in /client
2025-05-29 22:27:36 +02:00
79de551fc6 Merge pull request #5 from RiccardoSenica/dependabot/npm_and_yarn/client/tar-6.2.1
Bump tar from 6.0.5 to 6.2.1 in /client
2025-05-29 22:27:22 +02:00
dependabot[bot]
2349fe1bbf Bump tar from 6.0.5 to 6.2.1 in /client
Bumps [tar](https://github.com/isaacs/node-tar) from 6.0.5 to 6.2.1.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v6.0.5...v6.2.1)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-08 18:12:09 +00:00
dependabot[bot]
4393aaca07 Bump es5-ext from 0.10.53 to 0.10.64 in /client
Bumps [es5-ext](https://github.com/medikoo/es5-ext) from 0.10.53 to 0.10.64.
- [Release notes](https://github.com/medikoo/es5-ext/releases)
- [Changelog](https://github.com/medikoo/es5-ext/blob/main/CHANGELOG.md)
- [Commits](https://github.com/medikoo/es5-ext/compare/v0.10.53...v0.10.64)

---
updated-dependencies:
- dependency-name: es5-ext
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-08 18:11:27 +00:00
dependabot[bot]
00040b26e6 Bump elliptic from 6.5.3 to 6.5.7 in /client
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.7.
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.7)

---
updated-dependencies:
- dependency-name: elliptic
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-08 18:10:49 +00:00
dependabot[bot]
8d23f84783 Bump browserify-sign from 4.2.1 to 4.2.3 in /client
Bumps [browserify-sign](https://github.com/crypto-browserify/browserify-sign) from 4.2.1 to 4.2.3.
- [Changelog](https://github.com/browserify/browserify-sign/blob/main/CHANGELOG.md)
- [Commits](https://github.com/crypto-browserify/browserify-sign/compare/v4.2.1...v4.2.3)

---
updated-dependencies:
- dependency-name: browserify-sign
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-08 18:10:10 +00:00
dependabot[bot]
619326e587 Bump the npm_and_yarn group across 2 directories with 22 updates
Bumps the npm_and_yarn group with 6 updates in the /client directory:

| Package | From | To |
| --- | --- | --- |
| [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) | `7.12.7` | `7.25.7` |
| [body-parser](https://github.com/expressjs/body-parser) | `1.19.0` | `1.20.3` |
| [express](https://github.com/expressjs/express) | `4.17.1` | `4.21.0` |
| [braces](https://github.com/micromatch/braces) | `2.3.2` | `3.0.3` |
| [react-scripts](https://github.com/facebook/create-react-app/tree/HEAD/packages/react-scripts) | `4.0.1` | `5.0.1` |
| [ws](https://github.com/websockets/ws) | `5.2.2` | `7.5.10` |

Bumps the npm_and_yarn group with 6 updates in the /server directory:

| Package | From | To |
| --- | --- | --- |
| [body-parser](https://github.com/expressjs/body-parser) | `1.19.0` | `1.20.3` |
| [express](https://github.com/expressjs/express) | `4.17.1` | `4.20.0` |
| [word-wrap](https://github.com/jonschlinkert/word-wrap) | `1.2.3` | `1.2.5` |
| [mongodb](https://github.com/mongodb/node-mongodb-native) | `3.6.3` | `3.6.10` |
| [mongoose](https://github.com/Automattic/mongoose) | `5.11.9` | `5.13.20` |
| [get-func-name](https://github.com/chaijs/get-func-name) | `2.0.0` | `2.0.2` |



Updates `@babel/traverse` from 7.12.7 to 7.25.7
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.25.7/packages/babel-traverse)

Updates `body-parser` from 1.19.0 to 1.20.3
- [Release notes](https://github.com/expressjs/body-parser/releases)
- [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md)
- [Commits](https://github.com/expressjs/body-parser/compare/1.19.0...1.20.3)

Updates `express` from 4.17.1 to 4.21.0
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.0/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.17.1...4.21.0)

Updates `braces` from 2.3.2 to 3.0.3
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/commits/3.0.3)

Updates `react-scripts` from 4.0.1 to 5.0.1
- [Release notes](https://github.com/facebook/create-react-app/releases)
- [Changelog](https://github.com/facebook/create-react-app/blob/main/CHANGELOG-4.x.md)
- [Commits](https://github.com/facebook/create-react-app/commits/react-scripts@5.0.1/packages/react-scripts)

Updates `cookie` from 0.4.0 to 0.6.0
- [Release notes](https://github.com/jshttp/cookie/releases)
- [Changelog](https://github.com/jshttp/cookie/blob/v0.6.0/HISTORY.md)
- [Commits](https://github.com/jshttp/cookie/compare/v0.4.0...v0.6.0)

Updates `ejs` from 2.7.4 to 3.1.10
- [Release notes](https://github.com/mde/ejs/releases)
- [Commits](https://github.com/mde/ejs/compare/v2.7.4...v3.1.10)

Updates `express` from 4.17.1 to 4.21.0
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.0/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.17.1...4.21.0)

Updates `glob-parent` from 3.1.0 to 5.1.2
- [Release notes](https://github.com/gulpjs/glob-parent/releases)
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/glob-parent/compare/v3.1.0...v5.1.2)

Updates `immer` from 7.0.9 to 9.0.21
- [Release notes](https://github.com/immerjs/immer/releases)
- [Commits](https://github.com/immerjs/immer/compare/v7.0.9...v9.0.21)

Updates `micromatch` from 3.1.10 to 4.0.2
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/3.1.10...4.0.2)

Updates `path-to-regexp` from 0.1.7 to 0.1.10
- [Release notes](https://github.com/pillarjs/path-to-regexp/releases)
- [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md)
- [Commits](https://github.com/pillarjs/path-to-regexp/compare/v0.1.7...v0.1.10)

Updates `postcss` from 7.0.21 to 7.0.39
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/7.0.39/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/7.0.21...7.0.39)

Updates `rollup` from 1.32.1 to 2.79.2
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v1.32.1...v2.79.2)

Updates `semver` from 5.7.1 to 6.3.1
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v6.3.1/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v6.3.1)

Updates `send` from 0.17.1 to 0.19.0
- [Release notes](https://github.com/pillarjs/send/releases)
- [Changelog](https://github.com/pillarjs/send/blob/master/HISTORY.md)
- [Commits](https://github.com/pillarjs/send/compare/0.17.1...0.19.0)

Updates `serve-static` from 1.14.1 to 1.16.2
- [Release notes](https://github.com/expressjs/serve-static/releases)
- [Changelog](https://github.com/expressjs/serve-static/blob/v1.16.2/HISTORY.md)
- [Commits](https://github.com/expressjs/serve-static/compare/v1.14.1...v1.16.2)

Updates `webpack-dev-middleware` from 3.7.2 to 5.3.4
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/v5.3.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v3.7.2...v5.3.4)

Updates `word-wrap` from 1.2.3 to 1.2.5
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.5)

Updates `ws` from 5.2.2 to 7.5.10
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/5.2.2...7.5.10)

Updates `body-parser` from 1.19.0 to 1.20.3
- [Release notes](https://github.com/expressjs/body-parser/releases)
- [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md)
- [Commits](https://github.com/expressjs/body-parser/compare/1.19.0...1.20.3)

Updates `braces` from 2.3.2 to 1.8.5
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/commits/3.0.3)

Updates `express` from 4.17.1 to 4.20.0
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.0/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.17.1...4.21.0)

Updates `glob-parent` from 3.1.0 to 2.0.0
- [Release notes](https://github.com/gulpjs/glob-parent/releases)
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/glob-parent/compare/v3.1.0...v5.1.2)

Updates `micromatch` from 3.1.10 to 2.3.11
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/3.1.10...4.0.2)

Updates `path-to-regexp` from 0.1.7 to 0.1.10
- [Release notes](https://github.com/pillarjs/path-to-regexp/releases)
- [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md)
- [Commits](https://github.com/pillarjs/path-to-regexp/compare/v0.1.7...v0.1.10)

Updates `send` from 0.17.1 to 0.18.0
- [Release notes](https://github.com/pillarjs/send/releases)
- [Changelog](https://github.com/pillarjs/send/blob/master/HISTORY.md)
- [Commits](https://github.com/pillarjs/send/compare/0.17.1...0.19.0)

Updates `serve-static` from 1.14.1 to 1.16.0
- [Release notes](https://github.com/expressjs/serve-static/releases)
- [Changelog](https://github.com/expressjs/serve-static/blob/v1.16.2/HISTORY.md)
- [Commits](https://github.com/expressjs/serve-static/compare/v1.14.1...v1.16.2)

Updates `word-wrap` from 1.2.3 to 1.2.5
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.5)

Updates `mongodb` from 3.6.3 to 3.6.10
- [Release notes](https://github.com/mongodb/node-mongodb-native/releases)
- [Changelog](https://github.com/mongodb/node-mongodb-native/blob/main/HISTORY.md)
- [Commits](https://github.com/mongodb/node-mongodb-native/compare/v3.6.3...v3.6.10)

Updates `mongoose` from 5.11.9 to 5.13.20
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/5.11.9...5.13.20)

Updates `get-func-name` from 2.0.0 to 2.0.2
- [Release notes](https://github.com/chaijs/get-func-name/releases)
- [Commits](https://github.com/chaijs/get-func-name/commits/v2.0.2)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: body-parser
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: express
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: braces
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: react-scripts
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: cookie
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: ejs
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: express
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: glob-parent
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: immer
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: micromatch
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: path-to-regexp
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: postcss
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: rollup
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: semver
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: send
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: serve-static
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: webpack-dev-middleware
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: word-wrap
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: ws
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: body-parser
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: braces
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: express
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: glob-parent
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: micromatch
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: path-to-regexp
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: send
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: serve-static
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: word-wrap
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: mongodb
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: mongoose
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: get-func-name
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-08 18:09:03 +00:00
Riccardo
0ee1ce6fb8 Removed unused authentication and product code 2022-07-15 23:12:37 +02:00
Riccardo
36a945e175 Removed commented code 2022-07-15 22:58:56 +02:00
27 changed files with 26158 additions and 21892 deletions

30051
client/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -24,7 +24,7 @@
"react-dom": "^17.0.1",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.1",
"react-scripts": "5.0.1",
"subscriptions-transport-ws": "^0.9.18",
"web-vitals": "^0.2.4"
},

View File

@@ -1,12 +1,10 @@
import React from 'react';
import Header from './layout/Header';
import Login from './Login';
import AppointmentList from './appointment/AppointmentList';
import CreateAppointment from './appointment/CreateAppointment';
import UpdateAppointemnt from './appointment/UpdateAppointment';
import Calendar from './Calendar';
import { Switch, Route } from 'react-router-dom';
// import ProductList from './ProductList';
const App = () => {
return (
@@ -14,11 +12,9 @@ const App = () => {
<Header />
<div className="ph3 pv1 background-gray">
<Switch>
{/* <Route exact path="/" component={ProductList} /> */}
<Route exact path="/" component={AppointmentList} />
<Route exact path="/create" component={CreateAppointment} />
<Route exact path="/update/:_id" component={UpdateAppointemnt} />
<Route exact path="/login" component={Login} />
<Route exact path="/calendar" component={Calendar} />
</Switch>
</div>
@@ -27,42 +23,3 @@ const App = () => {
};
export default App;
// // import logo from './../logo.svg';
// // import './../styles/App.css';
// import React, { Component } from 'react';
// import AppointmentList from './AppointmentList';
// import CreateAppointment from './CreateAppointment'
// // import Header from './Header';
// import Login from './Login'
// import Search from './Search';
// import { Redirect, Route, Switch } from 'react-router-dom';
// const App = () => {
// return (
// <div className="center w85">
// <Header />
// <div className="ph3 pv1 background-gray">
// <Switch>
// <Route exact path="/" component={AppointmentList} />
// <Route
// exact
// path="/create"
// component={CreateAppointment}
// />
// <Route exact path="/login" component={Login} />
// <Route exact path="/search" component={Search} />
// <Route
// exact
// path="/new/:page"
// component={AppointmentList}
// />
// </Switch>
// </div>
// </div>
// );
// };
// export default App;

View File

@@ -1,133 +0,0 @@
import React, { useState } from 'react';
import { useHistory } from 'react-router';
import { useMutation, gql } from '@apollo/client';
import { AUTH_TOKEN } from '../constants';
const SIGNUP_MUTATION = gql`
mutation SignupMutation(
$email: String!
$password: String!
$name: String!
) {
signup(
email: $email
password: $password
username: $name
) {
token
}
}
`;
const LOGIN_MUTATION = gql`
mutation LoginMutation(
$email: String!
$password: String!
) {
login(email: $email, password: $password) {
token
}
}
`;
const Login = () => {
const history = useHistory();
const [formState, setFormState] = useState({
login: true,
email: '',
password: '',
name: ''
});
const [login] = useMutation(LOGIN_MUTATION, {
variables: {
email: formState.email,
password: formState.password
},
onCompleted: ({ login }) => {
localStorage.setItem(AUTH_TOKEN, login.token);
history.push('/');
}
});
const [signup] = useMutation(SIGNUP_MUTATION, {
variables: {
name: formState.name,
email: formState.email,
password: formState.password
},
onCompleted: ({ signup }) => {
localStorage.setItem(AUTH_TOKEN, signup.token);
history.push('/');
}
});
return (
<div>
<h4 className="mv3">
{formState.login ? 'Login' : 'Sign Up'}
</h4>
<div className="flex flex-column">
{!formState.login && (
<input
value={formState.name}
onChange={(e) =>
setFormState({
...formState,
name: e.target.value
})
}
type="text"
placeholder="Your name"
/>
)}
<input
value={formState.email}
onChange={(e) =>
setFormState({
...formState,
email: e.target.value
})
}
type="text"
placeholder="Your email address"
/>
<input
value={formState.password}
onChange={(e) =>
setFormState({
...formState,
password: e.target.value
})
}
type="password"
placeholder="Choose a safe password"
/>
</div>
<div className="flex mt3">
<button
className="pointer mr2 button"
onClick={formState.login ? login : signup}
>
{formState.login ? 'login' : 'create account'}
</button>
<button
className="pointer button"
onClick={(e) =>
setFormState({
...formState,
login: !formState.login
})
}
>
{formState.login
? 'need to create an account?'
: 'already have an account?'}
</button>
</div>
</div>
);
};
export default Login;

View File

@@ -1,14 +0,0 @@
import React from 'react';
const Product = (props) => {
const { product } = props;
return (
<div>
<div>
<b>{product.title}</b>: only {product.qty}!
</div>
</div>
);
};
export default Product;

View File

@@ -1,40 +0,0 @@
import React from 'react';
import Product from './Product';
import { useQuery, gql } from '@apollo/client';
const FEED_QUERY = gql`
{
allProducts{
title
qty
}
}
`;
const ProductList = () => {
const { data } = useQuery(FEED_QUERY);
console.log("Data:", data);
if (data !== undefined) {
return (
<div>
{
data.allProducts.map((product) => (
<Product key={product.id} product={product} />
))
}
</div>
);
} else {
return (
<div>
Rendering...
</div>
)
}
};
export default ProductList;

View File

@@ -1,9 +1,6 @@
import React, { useState } from 'react';
import { useMutation } from '@apollo/client';
import { useLazyQuery } from '@apollo/client';
import gql from 'graphql-tag';
import Appointment from './Appointment';
import { Link } from 'react-router-dom';
const FEED_SEARCH_QUERY = gql`
query FeedSearchQuery($filter: String!) {
@@ -14,16 +11,6 @@ const FEED_SEARCH_QUERY = gql`
title
description
type
createdBy {
id
username
}
# follows {
# id
# user {
# id
# }
# }
}
}
}
@@ -52,10 +39,6 @@ const Search = () => {
OK
</button>
</div>
{/* {data &&
data.feed.appointments.map((appointment, index) => (
<Link key={appointment.id} link={appointment} index={index} />
))} */}
</>
);
};

View File

@@ -36,100 +36,3 @@ const Appointment = (props) => {
};
export default Appointment;
// import { AUTH_TOKEN, APPOINTMENTS_PER_PAGE } from '../constants';
// import { timeDifferenceForDate } from '../utils'
// import { FEED_QUERY } from './AppointmentList'
// const FOLLOW_MUTATION = gql`
// mutation FollowMutation($appointmentId: ID!) {
// follow(followId: $followId) {
// id
// appointment {
// id
// follows {
// id
// user {
// id
// }
// }
// }
// user {
// id
// }
// }
// }
// `;
// const take = APPOINTMENTS_PER_PAGE;
// const skip = 0;
// const orderBy = { createdAt: 'desc' };
// const Appointment = (props) => {
// const { appointment } = props;
// const authToken = localStorage.getItem(AUTH_TOKEN);
// const take = APPOINTMENTS_PER_PAGE;
// const skip = 0;
// const orderBy = { createdAt: 'desc' };
// const [follow] = useMutation(FOLLOW_MUTATION, {
// variables: {
// appointmentId: appointment.id
// },
// update(cache, { data: { follow } }) {
// const { feed } = cache.readQuery({
// query: FEED_QUERY
// });
// const updatedAppointments = feed.follows.map((feedFollow) => {
// if (feedFollow.id === appointment.id) {
// return {
// ...feedFollow,
// follows: [...feedFollow.follows, follow]
// };
// }
// return feedFollow;
// });
// cache.writeQuery({
// query: FEED_QUERY,
// data: {
// feed: {
// appointments: updatedAppointments
// }
// }
// });
// }
// });
// return (
// <div className="flex mt2 items-start">
// <div className="flex items-center">
// <span className="gray">{props.index + 1}.</span>
// {authToken && (
// <div
// className="ml1 gray f11"
// style={{ cursor: 'pointer' }}
// onClick={follow}
// >
// ▲
// </div>
// )}
// </div>
// <div className="ml1">
// <div>
// {appointment.title} ({appointment.description})
// </div>
// {authToken && (
// <div className="f6 lh-copy gray">
// {appointment.follows.length} follows | by{' '}
// {follow.createdBy ? follow.createdBy.name : 'Unknown'}{' '}
// {timeDifferenceForDate(appointment.createdAt)}
// </div>
// )}
// </div>
// </div>
// );
// };
// export default Appointment;

View File

@@ -39,175 +39,3 @@ const AppointmentList = () => {
};
export default AppointmentList;
// import { useHistory } from 'react-router';
// import { APPOINTMENTS_PER_PAGE } from '../constants';
// import { Link } from 'react-router-dom';
// export const FEED_QUERY = gql`
// query AppointmentManyQuery(
// $take: Int
// $skip: Int
// $orderBy: AppointmentOrderByInput
// ) {
// appointmentMany(take: $take, skip: $skip, orderBy: $orderBy) {
// id
// appointments {
// id
// createdAt
// title
// # start
// # end
// description
// # createdBy {
// # id
// # name
// # }
// # follows {
// # id
// # user {
// # id
// # }
// # }
// }
// count
// }
// }
// `;
// // const NEW_APPOINTMENTS_SUBSCRIPTION = gql`
// // subscription {
// // newAppointment {
// // id
// // url
// // description
// // createdAt
// // createdBy {
// // id
// // name
// // }
// // follows {
// // id
// // user {
// // id
// // }
// // }
// // }
// // }
// // `;
// const getQueryVariables = (isNewPage, page) => {
// const skip = isNewPage ? (page - 1) * APPOINTMENTS_PER_PAGE : 0;
// const take = isNewPage ? APPOINTMENTS_PER_PAGE : 100;
// const orderBy = { createdAt: 'desc' };
// return { take, skip, orderBy };
// };
// const AppointmentList = () => {
// const history = useHistory();
// const isNewPage = history.location.pathname.includes(
// 'new'
// );
// const pageIndexParams = history.location.pathname.split(
// '/'
// );
// const page = parseInt(
// pageIndexParams[pageIndexParams.length - 1]
// );
// const pageIndex = page ? (page - 1) * APPOINTMENTS_PER_PAGE : 0;
// const {
// data,
// loading,
// error,
// subscribeToMore
// } = useQuery(FEED_QUERY, {
// variables: getQueryVariables(isNewPage, page)
// });
// // const { data } = useQuery(FEED_QUERY);
// const getAppointmentsToRender = (isNewPage, data) => {
// if (isNewPage) {
// return data.feed.appointments;
// }
// const rankedAppointments = data.feed.appointments.slice();
// rankedAppointments.sort(
// (l1, l2) => l2.follows.length - l1.follows.length
// );
// return rankedAppointments;
// };
// // subscribeToMore({
// // document: NEW_APPOINTMENTS_SUBSCRIPTION,
// // updateQuery: (prev, { subscriptionData }) => {
// // if (!subscriptionData.data) return prev;
// // const newAppointment = subscriptionData.data.newAppointment;
// // const exists = prev.feed.appointments.find(
// // ({ id }) => id === newAppointment.id
// // );
// // if (exists) return prev;
// // return Object.assign({}, prev, {
// // feed: {
// // appointments: [newAppointment, ...prev.feed.appointments],
// // count: prev.feed.appointments.length + 1,
// // __typename: prev.feed.__typename
// // }
// // });
// // }
// // });
// return (
// <>
// {loading && <p>Loading...</p>}
// {error && <pre>{JSON.stringify(error, null, 2)}</pre>}
// {data && (
// <>
// {getAppointmentsToRender(isNewPage, data).map(
// (appointment, index) => (
// <Link
// key={appointment.id}
// link={appointment}
// index={index + pageIndex}
// />
// )
// )}
// {isNewPage && (
// <div className="flex ml4 mv3 gray">
// <div
// className="pointer mr2"
// onClick={() => {
// if (page > 1) {
// history.push(`/new/${page - 1}`);
// }
// }}
// >
// Previous
// </div>
// <div
// className="pointer"
// onClick={() => {
// if (
// page <=
// data.feed.count / APPOINTMENTS_PER_PAGE
// ) {
// const nextPage = page + 1;
// history.push(`/new/${nextPage}`);
// }
// }}
// >
// Next
// </div>
// </div>
// )}
// </>
// )}
// </>
// );
// };
// export default AppointmentList;

View File

@@ -1,8 +1,6 @@
import React, { useState } from 'react';
import { useHistory } from 'react-router';
import { useMutation, gql } from '@apollo/client';
import { APPOINTMENTS_PER_PAGE } from '../../constants';
import { APPOINTMENTS_QUERY } from './AppointmentList';
import Datetime from 'react-datetime';
import "react-datetime/css/react-datetime.css";
@@ -43,34 +41,6 @@ const CreateAppointment = () => {
start: formState.start,
end: formState.end
},
// update: (cache, { data: { createAppointment } }) => {
// const take = APPOINTMENTS_PER_PAGE;
// const skip = 0;
// const orderBy = { createdAt: 'desc' };
// const data = cache.readQuery({
// query: APPOINTMENTS_QUERY,
// variables: {
// take,
// skip,
// orderBy
// }
// });
// cache.writeQuery({
// query: APPOINTMENTS_QUERY,
// data: {
// allAppointments: {
// appointments: [createAppointment, ...data.allAppointments]
// }
// },
// variables: {
// take,
// skip,
// orderBy
// }
// });
// },
onCompleted: () => history.push('/')
});

View File

@@ -1,8 +1,6 @@
import React, { useState } from 'react';
import { useHistory } from 'react-router';
import { useMutation, gql, useQuery } from '@apollo/client';
import { APPOINTMENTS_PER_PAGE } from '../../constants';
import { APPOINTMENTS_QUERY } from './AppointmentList';
import Datetime from 'react-datetime';
import "react-datetime/css/react-datetime.css";
@@ -74,10 +72,6 @@ const UpdateAppointment = ({ match: { params: { _id } } }) => {
if (data === undefined) {
return <div>Loading...</div>
} else {
// setFormState({
// formState.title= data.oneAppointment.title
// })
return (
<div>
<form
@@ -95,16 +89,10 @@ const UpdateAppointment = ({ match: { params: { _id } } }) => {
type="text"
/>
<input
readOnly
className="mb2"
value={formState.title}
onChange={(e) =>
setFormState({
...formState,
title: e.target.value
})
}
value={data.oneAppointment.title}
type="text"
placeholder="Input title"
/>
<input
className="mb2"

View File

@@ -17,18 +17,6 @@ const Header = () => {
<div className="flex flex-fixed">
<Link to="/create" className="ml1 no-underline black">New</Link>
</div>
<div className="flex flex-fixed">
{authToken ? (
<div className="ml1 pointer black"
onClick={() => {
localStorage.removeItem(AUTH_TOKEN);
history.push(`/`);
}}
>Logout</div>
) : (
<Link to="/login" className="ml1 no-underline black">Login</Link>
)}
</div>
</div>
);
};

View File

@@ -5,8 +5,6 @@ import { AUTH_TOKEN } from './constants';
import App from './components/App';
import { BrowserRouter } from 'react-router-dom';
import { setContext } from '@apollo/client/link/context';
// import * as serviceWorker from './serviceWorker';
import {
ApolloProvider,
ApolloClient,
@@ -41,37 +39,3 @@ ReactDOM.render(
</BrowserRouter>,
document.getElementById('root')
);
// serviceWorker.unregister();
// import { split } from '@apollo/client';
// import { WebSocketLink } from '@apollo/client/link/ws';
// import { getMainDefinition } from '@apollo/client/utilities';
// // import AppointmentList from './components/AppointmentList';
// // export default App;
// const wsLink = new WebSocketLink({
// uri: `ws://localhost:4000/graphql`,
// options: {
// reconnect: true,
// connectionParams: {
// authToken: localStorage.getItem(AUTH_TOKEN)
// }
// }
// });
// const link = split(
// ({ query }) => {
// const { kind, operation } = getMainDefinition(query);
// return (
// kind === 'OperationDefinition' &&
// operation === 'subscription'
// );
// },
// wsLink,
// authLink.concat(httpLink)
// );
// // reportWebVitals();

File diff suppressed because it is too large Load Diff

View File

@@ -13,16 +13,16 @@
"@babel/node": "^7.12.10",
"@babel/preset-env": "^7.12.11",
"apollo-engine": "^1.1.2",
"apollo-server": "^2.19.0",
"apollo-server": "^3.13.0",
"apollo-server-express": "^2.19.1",
"bcrypt": "^5.0.0",
"bcryptjs": "2.4.3",
"body-parser": "^1.19.0",
"body-parser": "^1.20.3",
"chai": "^4.2.0",
"cors": "^2.8.5",
"dotenv": "^8.2.0",
"esm": "^3.2.25",
"express": "^4.17.1",
"express": "^4.20.0",
"express-graphql": "^0.12.0",
"graphql": "^15.4.0",
"graphql-compose": "^7.23.0",
@@ -31,11 +31,11 @@
"graphql-depth-limit": "^1.1.0",
"graphql-middleware": "^6.0.0",
"graphql-tools": "^7.0.2",
"jsonwebtoken": "8.5.1",
"jsonwebtoken": "9.0.0",
"migrate": "^1.7.0",
"mocha": "^8.2.1",
"mongodb": "^3.6.3",
"mongoose": "^5.11.9",
"mongodb": "^3.6.10",
"mongoose": "^6.13.6",
"mongoose-bcrypt": "^1.9.0",
"mongoose-timestamp": "^0.6.0",
"node-migrate": "^0.1.0"

View File

@@ -9,36 +9,6 @@ import './utils/db.js';
import fs from 'fs';
import path from 'path';
import cors from 'cors';
// import getUserId from './utils';
import jwt from 'jsonwebtoken';
const APP_SECRET = 'GraphQL-is-aw3some';
function getTokenPayload(token) {
return jwt.verify(token, APP_SECRET);
}
function getUserId(req, authToken) {
if (req) {
const authHeader = req.headers.authorization;
if (authHeader) {
const token = authHeader.replace('Bearer ', '');
if (!token) {
throw new Error('No token found');
}
const { userId } = getTokenPayload(token);
return userId;
}
} else if (authToken) {
const { userId } = getTokenPayload(authToken);
return userId;
}
throw new Error('Not authenticated');
}
const moduleURL = new URL(import.meta.url);
const __dirname = path.dirname(moduleURL.pathname);
@@ -60,46 +30,15 @@ const server = new ApolloServer({
path.join(__dirname, 'schema.graphql'),
'utf8'
),
// schema,
cors: true,
playground: process.env.NODE_ENV === 'development' ? true : false,
context: ({ req }) => {
// if (!db) {
// try {
// if (!dbClient.isConnected()) await dbClient.connect()
// mongo = dbClient.db('Calendar') // database name
// console.log(db);
// } catch (e) {
// console.log('--->error while connecting with graphql context (db)', e)
// }
return {
...req,
mongoose,
pubsub,
userId:
req && req.headers.authorization
? getUserId(req)
: null
pubsub
}
},
// subscriptions: {
// onConnect: (connectionParams) => {
// if (connectionParams.authToken) {
// return {
// mongoose,
// userId: getUserId(
// null,
// connectionParams.authToken
// )
// };
// } else {
// return {
// mongoose
// };
// }
// }
// },
introspection: true,
tracing: true,
path: '/',
@@ -110,7 +49,6 @@ server.applyMiddleware({
path: '/',
cors: true,
onHealthCheck: () =>
// eslint-disable-next-line no-undef
new Promise((resolve, reject) => {
if (mongoose.connection.readyState > 0) {
resolve();
@@ -124,36 +62,3 @@ app.listen({ port: process.env.PORT }, () => {
console.log(`🚀 Server listening on port ${process.env.PORT}`);
console.log(`😷 Health checks available at ${process.env.HEALTH_ENDPOINT}`);
});
// const { graphqlHTTP } = require('express-graphql');
// const mongoose = require("mongoose");
// const graphqlSchema = require("./graphql/schema/schema")
// const appointmentResolvers = require("./graphql/resolvers/appointment")
// const userResolvers = require("./graphql/resolvers/user")
// var MongoClient = require('mongodb', { useUnifiedTopology: true }).MongoClient;
// // import { MongoClient } from 'mongodb'
// const Query = require('./resolvers/Query');
// const Mutation = require('./resolvers/Mutation');
// const Subscription = require('./resolvers/Subscription');
// const User = require('./resolvers/User');
// const Appointment = require('./resolvers/Appointment');
// const Follow = require('./resolvers/Follow');
// const fs = require('fs');
// const path = require('path');
// const { getUserId } = require('./utils');
// const graphqlResolvers = {
// appointmentResolvers,
// userResolvers
// };
// // const resolvers = {
// // Query,
// // Mutation,
// // Subscription,
// // User,
// // Appointment,
// // Follow
// // };

View File

@@ -1,12 +0,0 @@
import mongoose from 'mongoose';
const Schema = mongoose.Schema;
const ProductSchema = new Schema({
title: {
type: String,
required: true
},
qty: {
type: Number
}
});
export default mongoose.model('product', ProductSchema);

View File

@@ -1,33 +0,0 @@
import mongoose from 'mongoose';
import bcrypt from 'bcrypt';
const Schema = mongoose.Schema;
const UserSchema = new Schema({
username: {
type: String,
required: true
},
email: {
type: String,
required: true
},
password: {
type: String,
required: true
},
deleted: {
type: Boolean,
required: false
}
});
// hash the password
UserSchema.methods.generateHash = function (password) {
return bcrypt.hashSync(password, bcrypt.genSaltSync(8), null);
};
// checking if password is valid
UserSchema.methods.validPassword = function (password) {
return bcrypt.compareSync(password, this.password);
};
export default mongoose.model('user', UserSchema);

View File

@@ -1,74 +1,20 @@
// import Appointment from '../../client/src/components/Appointment.js';
import Product from './models/product.js';
import Appointment from './models/appointment.js';
import User from './models/user.js'
// import { createAppointment } from './resolvers/Mutation.js';
import bcrypt from 'bcrypt';
import jwt from 'jsonwebtoken';
import dotenv from 'dotenv';
export const resolvers = {
Query: {
async allAppointments() {
return await Appointment.find({ deleted: false })
// return await Appointment.find();
},
async oneAppointment(root, args, context, info) {
return await Appointment.findOne({
_id: args._id
});
},
async allProducts() {
return await Product.find();
},
async allUsers() {
return await User.find();
},
},
Mutation: {
async signup(root, args, context, info) {
var user = await User.create(args);
user.password = user.generateHash(args.password);
user.save();
const token = jwt.sign({ userId: user.id }, process.env.APP_SECRET);
return {
token,
user
};
},
async login(parent, args, context, info) {
console.log(context);
const { userId } = context;
console.log(userId);
const user = await User.findOne({
email: args.email
});
if (!user) {
throw new Error('No such user found');
}
if (!user.validPassword(args.password)) {
throw new Error('Invalid password');
}
const token = jwt.sign({ userId: user.id }, process.env.APP_SECRET);
return {
token,
user
};
},
async createAppointment(parent, args, context, info) {
console.log(context);
const { userId } = context;
console.log("userID", userId);
args.deleted = false;
args.createdBy = userId;
return await Appointment.create(args);
},
async updateAppointment(parent, args, context, info) {
@@ -81,29 +27,6 @@ export const resolvers = {
},
async deleteAppointment(parent, args, context, info) {
return await Appointment.findOneAndUpdate({ _id: args._id }, { deleted: true })
// return await Appointment.deleteOne({ _id: args._id });
},
async createProduct(root, {
input
}) {
return await Product.create(input);
},
async updateProduct(root, {
_id,
input
}) {
return await Product.findOneAndUpdate({
_id
}, input, {
new: true
})
},
async deleteProduct(root, {
_id
}) {
return await Product.findOneAndRemove({
_id
});
},
}
};

View File

@@ -4,13 +4,6 @@ function createdBy(parent, args, context) {
.createdBy();
}
function follows(parent, args, context) {
return context.mongo.appointment
.findUnique({ where: { id: parent.id } })
.follows();
}
module.exports = {
createdBy,
follows
createdBy
};

View File

@@ -1,16 +0,0 @@
function appointment(parent, args, context) {
return context.mongo.follow
.findUnique({ where: { id: parent.id } })
.appointment();
}
function user(parent, args, context) {
return context.mongo.follow
.findUnique({ where: { id: parent.id } })
.user();
}
module.exports = {
appointment,
user
};

View File

@@ -1,90 +1,14 @@
const bcrypt = require('bcryptjs');
const jwt = require('jsonwebtoken');
const { APP_SECRET } = require('../utils');
function createAppointment(parent, args, context, info) {
const { userId } = context;
const newAppointment = context.mongo.appointment.create({
data: {
title: args.title,
description: args.description,
createdBy: { connect: { id: userId } }
description: args.description
}
});
return newAppointment;
}
async function signup(parent, args, context, info) {
const password = await bcrypt.hash(args.password, 10);
const user = await context.mongo.user.create({
data: { ...args, password }
});
const token = jwt.sign({ userId: user.id }, APP_SECRET);
return {
token,
user
};
}
async function login(parent, args, context, info) {
const user = await context.mongo.user.findUnique({
where: { email: args.email }
});
if (!user) {
throw new Error('No such user found');
}
const valid = await bcrypt.compare(
args.password,
user.password
);
if (!valid) {
throw new Error('Invalid password');
}
const token = jwt.sign({ userId: user.id }, APP_SECRET);
return {
token,
user
};
}
async function follow(parent, args, context, info) {
const { userId } = context;
const follow = await context.mongo.follow.findUnique({
where: {
linkId_userId: {
linkId: Number(args.linkId),
userId: userId
}
}
});
if (Boolean(follow)) {
throw new Error(
`Already followed the appointment: ${args.linkId}`
);
}
const newFollow = context.mongo.follow.create({
data: {
user: { connect: { id: userId } },
link: { connect: { id: Number(args.linkId) } }
}
});
context.pubsub.publish('NEW_FOLLOW', newFollow);
return newFollow;
}
module.exports = {
createAppointment,
signup,
login,
follow
createAppointment
};

View File

@@ -9,18 +9,6 @@ const newAppointment = {
},
}
function newFollowSubscribe(parent, args, context, info) {
return context.pubsub.asyncIterator("NEW_FOLLOW")
}
const newFollow = {
subscribe: newFollowSubscribe,
resolve: payload => {
return payload
},
}
module.exports = {
newAppointment,
newFollow
}

View File

@@ -6,13 +6,8 @@ type Query {
take: Int
orderBy: AppointmentOrderByInput
): Feed!
allProducts: [Product]
allAppointments: [Appointment]
oneAppointment(
_id: ID!
): Appointment
allUsers: [User]
users: [User!]!
oneAppointment(_id: ID!): Appointment
}
type Feed {
@@ -31,7 +26,7 @@ type Mutation {
deleted: Boolean
): Appointment!
updateAppointment(
_id: ID!,
_id: ID!
title: String!
description: String
type: String!
@@ -39,55 +34,11 @@ type Mutation {
end: DateTime!
deleted: Boolean
): Appointment
deleteAppointment(
_id: ID!
) : Appointment
createProduct(
input: ProductInput
) : Product
updateProduct(
_id: ID!,
input: ProductInput
): Product
deleteProduct(
_id: ID!
) : Product
signup(
email: String!
password: String!
username: String!
): AuthPayload
login(
email: String!,
password: String!
): AuthPayload
follow(
appointmentId: ID!
): Follow
deleteAppointment(_id: ID!): Appointment
}
type Subscription {
newAppointment: Appointment
newFollow: Follow
}
#User Schemas
type User {
_id: ID!
username: String!
email: String!
password: String!
# appointments: [Appointment!]!
}
input UserInput{
username: String!
email: String!
password: String!
# appointments: [Appointment!]!
}
type AuthPayload {
token: String
user: User
}
# Appointment schemas
@@ -99,9 +50,6 @@ type Appointment {
start: DateTime!
end: DateTime!
deleted: Boolean
createdBy: User
# follows: [Follow!]!
# createdAt: DateTime!
}
input AppointmentInput {
title: String!
@@ -110,29 +58,10 @@ input AppointmentInput {
start: DateTime!
end: DateTime!
deleted: Boolean
}
}
input AppointmentOrderByInput {
title: Sort
desc: Sort
# createdAt: Sort
}
# Product schemas
type Product {
_id: ID!
title: String!
qty: Int
}
input ProductInput {
title: String!
qty: Int
}
# Follow schemas
type Follow {
_id: ID!
appointment: Appointment!
user: User!
}
# General-purpose schemas

View File

@@ -1,30 +1,5 @@
import jwt from 'jsonwebtoken';
const APP_SECRET = 'GraphQL-is-aw3some';
function getTokenPayload(token) {
return jwt.verify(token, APP_SECRET);
}
function getUserId(req, authToken) {
if (req) {
const authHeader = req.headers.authorization;
if (authHeader) {
const token = authHeader.replace('Bearer ', '');
if (!token) {
throw new Error('No token found');
}
const { userId } = getTokenPayload(token);
return userId;
}
} else if (authToken) {
const { userId } = getTokenPayload(authToken);
return userId;
}
throw new Error('Not authenticated');
}
module.exports = {
APP_SECRET,
getUserId
APP_SECRET
};

View File

@@ -1,7 +1,4 @@
// const mongoose = require("mongoose");
import mongoose from 'mongoose';
// const dotenv = require("../../.env");
import dotenv from 'dotenv';
dotenv.config();

File diff suppressed because it is too large Load Diff