19 Commits
demo ... main

Author SHA1 Message Date
9c39a8fbab Merge pull request #12 from RiccardoSenica/dependabot/npm_and_yarn/client/npm_and_yarn-b1509cf74d
Bump the npm_and_yarn group across 2 directories with 2 updates
2025-11-16 20:49:20 +01:00
dependabot[bot]
1b28c43931 Bump the npm_and_yarn group across 2 directories with 2 updates
Bumps the npm_and_yarn group with 2 updates in the /client directory: [cipher-base](https://github.com/crypto-browserify/cipher-base) and [sha.js](https://github.com/crypto-browserify/sha.js).
Bumps the npm_and_yarn group with 1 update in the /server directory: [sha.js](https://github.com/crypto-browserify/sha.js).


Updates `cipher-base` from 1.0.4 to 1.0.6
- [Changelog](https://github.com/browserify/cipher-base/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crypto-browserify/cipher-base/compare/v1.0.4...v1.0.6)

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)

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: cipher-base
  dependency-version: 1.0.6
  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
- 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:49:46 +00:00
317aa65a33 Merge pull request #11 from RiccardoSenica/dependabot/npm_and_yarn/client/npm_and_yarn-7cf5818f9f
Bump the npm_and_yarn group across 2 directories with 1 update
2025-09-14 20:46:22 +08:00
dependabot[bot]
edc32d7e6c Bump the npm_and_yarn group across 2 directories with 1 update
Bumps the npm_and_yarn group with 1 update in the /client directory: [brace-expansion](https://github.com/juliangruber/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)

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
- 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-08-04 15:22:47 +00:00
724ec0099a Merge pull request #10 from RiccardoSenica/dependabot/npm_and_yarn/client/npm_and_yarn-eca7abf8ab
Bump pbkdf2 from 3.1.1 to 3.1.3 in /client in the npm_and_yarn group across 1 directory
2025-08-04 20:23:07 +08:00
dependabot[bot]
979ec9d8ca Bump pbkdf2 in /client in the npm_and_yarn group across 1 directory
Bumps the npm_and_yarn group with 1 update in the /client directory: [pbkdf2](https://github.com/crypto-browserify/pbkdf2).


Updates `pbkdf2` from 3.1.1 to 3.1.3
- [Changelog](https://github.com/browserify/pbkdf2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crypto-browserify/pbkdf2/compare/v3.1.1...v3.1.3)

---
updated-dependencies:
- dependency-name: pbkdf2
  dependency-version: 3.1.3
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-24 05:08:23 +00:00
599dc1da7c Merge pull request #8 from RiccardoSenica/dependabot/npm_and_yarn/client/npm_and_yarn-8d61fde2b1
Bump the npm_and_yarn group across 2 directories with 4 updates
2025-05-29 22:37:37 +02:00
dc0cf7bae9 Merge pull request #9 from RiccardoSenica/dependabot/npm_and_yarn/client/npm_and_yarn-ad0083f999
Bump the npm_and_yarn group across 2 directories with 3 updates
2025-05-29 22:37:27 +02:00
dependabot[bot]
d565ce3f80 Bump the npm_and_yarn group across 2 directories with 3 updates
Bumps the npm_and_yarn group with 3 updates in the /client directory: [@babel/helpers](https://github.com/babel/babel/tree/HEAD/packages/babel-helpers), [@babel/runtime-corejs3](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime-corejs3) and [ini](https://github.com/npm/ini).
Bumps the npm_and_yarn group with 1 update in the /server directory: [ini](https://github.com/npm/ini).


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-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 `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 `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)

---
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: ini
  dependency-version: 1.3.8
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: ini
  dependency-version: 1.3.8
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-29 20:32:42 +00:00
dependabot[bot]
0345c431a6 Bump the npm_and_yarn group across 2 directories with 4 updates
Bumps the npm_and_yarn group with 4 updates in the /client directory: [@babel/helpers](https://github.com/babel/babel/tree/HEAD/packages/babel-helpers), [@babel/runtime-corejs3](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime-corejs3), [ini](https://github.com/npm/ini) and [nanoid](https://github.com/ai/nanoid).
Bumps the npm_and_yarn group with 1 update in the /server directory: [ini](https://github.com/npm/ini).


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-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 `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 `nanoid` from 3.3.8 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.8...3.3.11)

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)

---
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: ini
  dependency-version: 1.3.8
  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: ini
  dependency-version: 1.3.8
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-29 20:32:37 +00:00
7db3e5d4f6 Merge pull request #4 from RiccardoSenica/dependabot/npm_and_yarn/client/npm_and_yarn-e44809be4a
Bump the npm_and_yarn group across 2 directories with 6 updates
2025-05-29 22:29:09 +02:00
bdf6b47f6f Merge pull request #5 from RiccardoSenica/dependabot/npm_and_yarn/client/npm_and_yarn-8c7486d884
Bump the npm_and_yarn group across 2 directories with 5 updates
2025-05-29 22:28:53 +02:00
00dd545c38 Merge pull request #7 from RiccardoSenica/dependabot/npm_and_yarn/client/npm_and_yarn-dde14f1674
Bump the npm_and_yarn group across 2 directories with 12 updates
2025-05-29 22:28:40 +02:00
dependabot[bot]
302e548ce9 Bump the npm_and_yarn group across 2 directories with 12 updates
Bumps the npm_and_yarn group with 10 updates in the /client directory:

| Package | From | To |
| --- | --- | --- |
| [color-string](https://github.com/Qix-/color-string) | `1.5.4` | `1.9.1` |
| [dns-packet](https://github.com/mafintosh/dns-packet) | `1.3.1` | `1.3.4` |
| [elliptic](https://github.com/indutny/elliptic) | `6.5.7` | `6.6.1` |
| [express](https://github.com/expressjs/express) | `4.21.0` | `4.21.2` |
| [hosted-git-info](https://github.com/npm/hosted-git-info) | `2.8.8` | `2.8.9` |
| [node-notifier](https://github.com/mikaelbr/node-notifier) | `8.0.0` | `8.0.2` |
| [path-parse](https://github.com/jbgutierrez/path-parse) | `1.0.6` | `1.0.7` |
| [react-dev-utils](https://github.com/facebook/create-react-app/tree/HEAD/packages/react-dev-utils) | `11.0.1` | `11.0.4` |
| [tmpl](https://github.com/daaku/nodejs-tmpl) | `1.0.4` | `1.0.5` |
| [y18n](https://github.com/yargs/y18n) | `4.0.0` | `4.0.3` |

Bumps the npm_and_yarn group with 2 updates in the /server directory: [express](https://github.com/expressjs/express) and [jsonwebtoken](https://github.com/auth0/node-jsonwebtoken).


Updates `color-string` from 1.5.4 to 1.9.1
- [Release notes](https://github.com/Qix-/color-string/releases)
- [Changelog](https://github.com/Qix-/color-string/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Qix-/color-string/compare/1.5.4...1.9.1)

Updates `dns-packet` from 1.3.1 to 1.3.4
- [Changelog](https://github.com/mafintosh/dns-packet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mafintosh/dns-packet/compare/v1.3.1...v1.3.4)

Updates `elliptic` from 6.5.7 to 6.6.1
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.7...v6.6.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 `hosted-git-info` from 2.8.8 to 2.8.9
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

Updates `node-notifier` from 8.0.0 to 8.0.2
- [Changelog](https://github.com/mikaelbr/node-notifier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mikaelbr/node-notifier/compare/v8.0.0...v8.0.2)

Updates `path-parse` from 1.0.6 to 1.0.7
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

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 `react-dev-utils` from 11.0.1 to 11.0.4
- [Release notes](https://github.com/facebook/create-react-app/releases)
- [Changelog](https://github.com/facebook/create-react-app/blob/main/CHANGELOG-1.x.md)
- [Commits](https://github.com/facebook/create-react-app/commits/HEAD/packages/react-dev-utils)

Updates `tmpl` from 1.0.4 to 1.0.5
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)

Updates `y18n` from 4.0.0 to 4.0.3
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/y18n-v4.0.3/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/compare/v4.0.0...y18n-v4.0.3)

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 `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 `jsonwebtoken` from 9.0.0 to 9.0.2
- [Changelog](https://github.com/auth0/node-jsonwebtoken/blob/master/CHANGELOG.md)
- [Commits](https://github.com/auth0/node-jsonwebtoken/compare/v9.0.0...v9.0.2)

---
updated-dependencies:
- dependency-name: color-string
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: dns-packet
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: elliptic
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: express
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: hosted-git-info
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: node-notifier
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: path-parse
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: path-to-regexp
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: react-dev-utils
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: tmpl
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: y18n
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: express
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: path-to-regexp
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: jsonwebtoken
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-07 06:36:42 +00:00
dependabot[bot]
aca8492543 Bump the npm_and_yarn group across 2 directories with 6 updates
Bumps the npm_and_yarn group with 4 updates in the /client directory: [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse), [elliptic](https://github.com/indutny/elliptic), [express](https://github.com/expressjs/express) and [nanoid](https://github.com/ai/nanoid).
Bumps the npm_and_yarn group with 2 updates in the /server directory: [express](https://github.com/expressjs/express) and [jsonwebtoken](https://github.com/auth0/node-jsonwebtoken).


Updates `@babel/traverse` from 7.25.7 to 7.26.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.26.4/packages/babel-traverse)

Updates `elliptic` from 6.5.7 to 6.6.1
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.7...v6.6.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 `nanoid` from 3.3.7 to 3.3.8
- [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.8)

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 `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 `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 `jsonwebtoken` from 9.0.0 to 9.0.2
- [Changelog](https://github.com/auth0/node-jsonwebtoken/blob/master/CHANGELOG.md)
- [Commits](https://github.com/auth0/node-jsonwebtoken/compare/v9.0.0...v9.0.2)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: elliptic
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: express
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: nanoid
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: path-to-regexp
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: express
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: path-to-regexp
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: jsonwebtoken
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-07 06:34:17 +00:00
dependabot[bot]
7e57e31fa0 Bump the npm_and_yarn group across 2 directories with 5 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), [elliptic](https://github.com/indutny/elliptic) and [express](https://github.com/expressjs/express).
Bumps the npm_and_yarn group with 2 updates in the /server directory: [express](https://github.com/expressjs/express) and [jsonwebtoken](https://github.com/auth0/node-jsonwebtoken).


Updates `@babel/traverse` from 7.25.7 to 7.26.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.26.4/packages/babel-traverse)

Updates `elliptic` from 6.5.7 to 6.6.1
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.7...v6.6.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 `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 `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 `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 `jsonwebtoken` from 9.0.0 to 9.0.2
- [Changelog](https://github.com/auth0/node-jsonwebtoken/blob/master/CHANGELOG.md)
- [Commits](https://github.com/auth0/node-jsonwebtoken/compare/v9.0.0...v9.0.2)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: elliptic
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: express
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: path-to-regexp
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: express
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: path-to-regexp
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: jsonwebtoken
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-07 06:34:17 +00:00
Riccardo Senica
caae2941e8 Merge pull request #3 from RiccardoSenica/dependabot/npm_and_yarn/client/npm_and_yarn-79473dccbc
Bump the npm_and_yarn group across 2 directories with 24 updates
2024-12-07 07:30:49 +01:00
fe644ad4ff chore: update package.json files 2024-12-07 07:30:33 +01:00
dependabot[bot]
95fe5744f6 Bump the npm_and_yarn group across 2 directories with 24 updates
Bumps the npm_and_yarn group with 14 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` |
| [async](https://github.com/caolan/async) | `2.6.3` | `2.6.4` |
| [browserify-sign](https://github.com/crypto-browserify/browserify-sign) | `4.2.1` | `4.2.3` |
| [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) | `0.2.0` | `0.2.2` |
| [elliptic](https://github.com/indutny/elliptic) | `6.5.3` | `6.5.7` |
| [es5-ext](https://github.com/medikoo/es5-ext) | `0.10.53` | `0.10.64` |
| [eventsource](https://github.com/EventSource/eventsource) | `1.0.7` | `1.1.2` |
| [express](https://github.com/expressjs/express) | `4.17.1` | `4.21.0` |
| [follow-redirects](https://github.com/follow-redirects/follow-redirects) | `1.13.0` | `1.15.9` |
| [minimist](https://github.com/minimistjs/minimist) | `1.2.5` | `1.2.8` |
| [nanoid](https://github.com/ai/nanoid) | `3.1.18` | `3.3.7` |
| [tar](https://github.com/isaacs/node-tar) | `6.0.5` | `6.2.1` |
| [url-parse](https://github.com/unshiftio/url-parse) | `1.4.7` | `1.5.10` |
| [word-wrap](https://github.com/jonschlinkert/word-wrap) | `1.2.3` | `1.2.5` |

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

| Package | From | To |
| --- | --- | --- |
| [braces](https://github.com/micromatch/braces) | `3.0.2` | `3.0.3` |
| [express](https://github.com/expressjs/express) | `4.17.1` | `4.21.0` |
| [glob-parent](https://github.com/gulpjs/glob-parent) | `5.1.1` | `5.1.2` |
| [minimatch](https://github.com/isaacs/minimatch) | `3.0.4` | `3.1.2` |
| [minimist](https://github.com/minimistjs/minimist) | `1.2.5` | `1.2.8` |
| [apollo-server](https://github.com/apollographql/apollo-server/tree/HEAD/packages/apollo-server) | `2.19.0` | `3.13.0` |
| [jsonwebtoken](https://github.com/auth0/node-jsonwebtoken) | `8.5.1` | `9.0.0` |
| [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) | `4.1.0` | `4.1.1` |



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 `async` from 2.6.3 to 2.6.4
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

Updates `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)

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 `elliptic` from 6.5.3 to 6.5.7
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.7)

Updates `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)

Updates `eventsource` from 1.0.7 to 1.1.2
- [Changelog](https://github.com/EventSource/eventsource/blob/master/HISTORY.md)
- [Commits](https://github.com/EventSource/eventsource/compare/v1.0.7...v1.1.2)

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 `follow-redirects` from 1.13.0 to 1.15.9
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.13.0...v1.15.9)

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 `nanoid` from 3.1.18 to 3.3.7
- [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.1.18...3.3.7)

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.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 `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)

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 `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 `braces` from 3.0.2 to 3.0.3
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.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 `glob-parent` from 5.1.1 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/v5.1.1...v5.1.2)

Updates `minimatch` from 3.0.4 to 3.1.2
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.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 `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.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 `apollo-server` from 2.19.0 to 3.13.0
- [Release notes](https://github.com/apollographql/apollo-server/releases)
- [Commits](https://github.com/apollographql/apollo-server/commits/apollo-server@3.13.0/packages/apollo-server)

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 `apollo-server-core` from 2.19.0 to 3.13.0
- [Release notes](https://github.com/apollographql/apollo-server/releases)
- [Commits](https://github.com/apollographql/apollo-server/commits/apollo-server-core@3.13.0/packages/apollo-server-core)

Updates `http-cache-semantics` from 4.1.0 to 4.1.1
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: async
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: browserify-sign
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: decode-uri-component
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: elliptic
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: es5-ext
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: eventsource
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: express
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: follow-redirects
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: minimist
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: nanoid
  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: tar
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: url-parse
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: word-wrap
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: braces
  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: minimatch
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: minimist
  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: apollo-server
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: jsonwebtoken
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: apollo-server-core
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: http-cache-semantics
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-08 17:55:24 +00:00
23 changed files with 2897 additions and 2194 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "client", "name": "client",
"version": "0.1.0", "version": "1.0.0",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@apollo/client": "^3.3.6", "@apollo/client": "^3.3.6",

View File

@@ -1,10 +1,13 @@
import React from 'react'; // import logo from './../logo.svg';
// import './../styles/App.css';
import React, { Component } from 'react';
import LinkList from './LinkList'; import LinkList from './LinkList';
import CreateLink from './CreateLink' import CreateLink from './CreateLink'
import Header from './Header'; import Header from './Header';
import Login from './Login' import Login from './Login'
import Search from './Search'; import Search from './Search';
import { Route, Switch } from 'react-router-dom'; import { Redirect, Route, Switch } from 'react-router-dom';
const App = () => { const App = () => {
return ( return (
@@ -31,4 +34,31 @@ const App = () => {
); );
}; };
// class App extends Component {
// render() {
// return <CreateLink />;
// }
// }
// function App() {
// return (
// <div className="App">
// <header className="App-header">
// <img src={logo} className="App-logo" alt="logo" />
// <p>
// Edit <code>src/App.js</code> and save to reload.
// </p>
// <a
// className="App-link"
// href="https://reactjs.org"
// target="_blank"
// rel="noopener noreferrer"
// >
// Learn React
// </a>
// </header>
// </div>
// );
// }
export default App; export default App;

View File

@@ -0,0 +1,8 @@
import { render, screen } from '@testing-library/react';
import App from './App';
test('renders learn react link', () => {
render(<App />);
const linkElement = screen.getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
});

View File

@@ -1,8 +1,8 @@
import React, { useState } from 'react'; import React, { useState } from 'react';
import { useHistory } from 'react-router'; import { useHistory } from 'react-router';
import { useMutation, gql } from '@apollo/client'; import { useMutation, gql } from '@apollo/client';
// import { LINKS_PER_PAGE } from '../constants'; import { LINKS_PER_PAGE } from '../constants';
// import { FEED_QUERY } from './LinkList'; import { FEED_QUERY } from './LinkList';
const CREATE_LINK_MUTATION = gql` const CREATE_LINK_MUTATION = gql`
mutation PostMutation( mutation PostMutation(
@@ -31,34 +31,34 @@ const CreateLink = () => {
description: formState.description, description: formState.description,
url: formState.url url: formState.url
}, },
// update: (cache, { data: { post } }) => { update: (cache, { data: { post } }) => {
// const take = LINKS_PER_PAGE; const take = LINKS_PER_PAGE;
// const skip = 0; const skip = 0;
// const orderBy = { createdAt: 'desc' }; const orderBy = { createdAt: 'desc' };
// const { data } = cache.readQuery({ const data = cache.readQuery({
// query: FEED_QUERY, query: FEED_QUERY,
// variables: { variables: {
// take, take,
// skip, skip,
// orderBy orderBy
// } }
// }); });
// cache.writeQuery({ cache.writeQuery({
// query: FEED_QUERY, query: FEED_QUERY,
// data: { data: {
// feed: { feed: {
// links: [post, ...data.feed.links] links: [post, ...data.feed.links]
// } }
// }, },
// variables: { variables: {
// take, take,
// skip, skip,
// orderBy orderBy
// } }
// }); });
// }, },
onCompleted: () => history.push('/new/1') onCompleted: () => history.push('/new/1')
}); });

View File

@@ -9,30 +9,48 @@ const Header = () => {
return ( return (
<div className="flex pa1 justify-between nowrap orange"> <div className="flex pa1 justify-between nowrap orange">
<div className="flex flex-fixed black"> <div className="flex flex-fixed black">
<div className="fw7 mr1">News</div> <div className="fw7 mr1">Hacker News</div>
<Link to="/" className="ml1 no-underline black">Top</Link> <Link to="/" className="ml1 no-underline black">
new
</Link>
<div className="ml1">|</div> <div className="ml1">|</div>
<Link to="/new/1" className="ml1 no-underline black">New</Link> <Link to="/top" className="ml1 no-underline black">
top
</Link>
<div className="ml1">|</div> <div className="ml1">|</div>
<Link to="/search" className="ml1 no-underline black">Search</Link> <Link to="/search" className="ml1 no-underline black">
search
</Link>
{authToken && ( {authToken && (
<div className="flex"> <div className="flex">
<div className="ml1">|</div> <div className="ml1">|</div>
<Link to="/create" className="ml1 no-underline black">Create</Link> <Link
to="/create"
className="ml1 no-underline black"
>
submit
</Link>
</div> </div>
)} )}
</div> </div>
<div className="flex flex-fixed"> <div className="flex flex-fixed">
{authToken ? ( {authToken ? (
<div className="ml1 pointer black" onClick={() => { <div
className="ml1 pointer black"
onClick={() => {
localStorage.removeItem(AUTH_TOKEN); localStorage.removeItem(AUTH_TOKEN);
history.push(`/`); history.push(`/`);
}} }}
> >
Logout logout
</div> </div>
) : ( ) : (
<Link to="/login" className="ml1 no-underline black">Login</Link> <Link
to="/login"
className="ml1 no-underline black"
>
login
</Link>
)} )}
</div> </div>
</div> </div>
@@ -40,3 +58,30 @@ const Header = () => {
}; };
export default Header; export default Header;
// import React from 'react';
// import { useHistory } from 'react-router';
// import { Link, withRouter } from 'react-router-dom';
// const Header = () => {
// const history = useHistory();
// return (
// <div className="flex pa1 justify-between nowrap orange">
// <div className="flex flex-fixed black">
// <div className="fw7 mr1">Hacker News</div>
// <Link to="/" className="ml1 no-underline black">
// new
// </Link>
// <div className="ml1">|</div>
// <Link
// to="/create"
// className="ml1 no-underline black"
// >
// submit
// </Link>
// </div>
// </div>
// );
// };
// export default Header;

View File

@@ -1,8 +1,8 @@
import React from 'react'; import React from 'react';
import { useMutation, gql } from '@apollo/client'; import { useMutation, gql } from '@apollo/client';
import { AUTH_TOKEN } from '../constants'; import { AUTH_TOKEN, LINKS_PER_PAGE } from '../constants';
import { timeDifferenceForDate } from '../utils' import { timeDifferenceForDate } from '../utils'
// import { FEED_QUERY } from './LinkList' import { FEED_QUERY } from './LinkList'
const VOTE_MUTATION = gql` const VOTE_MUTATION = gql`
mutation VoteMutation($linkId: ID!) { mutation VoteMutation($linkId: ID!) {
@@ -24,38 +24,45 @@ const VOTE_MUTATION = gql`
} }
`; `;
const take = LINKS_PER_PAGE;
const skip = 0;
const orderBy = { createdAt: 'desc' };
const Link = (props) => { const Link = (props) => {
const { link } = props; const { link } = props;
const authToken = localStorage.getItem(AUTH_TOKEN); const authToken = localStorage.getItem(AUTH_TOKEN);
const take = LINKS_PER_PAGE;
const skip = 0;
const orderBy = { createdAt: 'desc' };
const [vote] = useMutation(VOTE_MUTATION, { const [vote] = useMutation(VOTE_MUTATION, {
variables: { variables: {
linkId: link.id linkId: link.id
}, },
// update(cache, { data: { vote } }) { update(cache, { data: { vote } }) {
// const { feed } = cache.readQuery({ const { feed } = cache.readQuery({
// query: FEED_QUERY query: FEED_QUERY
// }); });
// const updatedLinks = feed.links.map((feedLink) => { const updatedLinks = feed.links.map((feedLink) => {
// if (feedLink.id === link.id) { if (feedLink.id === link.id) {
// return { return {
// ...feedLink, ...feedLink,
// votes: [...feedLink.votes, vote] votes: [...feedLink.votes, vote]
// }; };
// } }
// return feedLink; return feedLink;
// }); });
// cache.writeQuery({ cache.writeQuery({
// query: FEED_QUERY, query: FEED_QUERY,
// data: { data: {
// feed: { feed: {
// links: updatedLinks links: updatedLinks
// } }
// } }
// }); });
// } }
}); });
return ( return (
@@ -63,16 +70,22 @@ const Link = (props) => {
<div className="flex items-center"> <div className="flex items-center">
<span className="gray">{props.index + 1}.</span> <span className="gray">{props.index + 1}.</span>
{authToken && ( {authToken && (
<div className="ml1 gray f11" style={{ cursor: 'pointer' }} onClick={vote}></div> <div
className="ml1 gray f11"
style={{ cursor: 'pointer' }}
onClick={vote}
>
</div>
)} )}
</div> </div>
<div className="ml1"> <div className="ml1">
<div> <div>
{link.description} ({link.url}) {link.description} ({link.url})
</div> </div>
{authToken && ( {authToken && (
<div className="f6 lh-copy gray"> <div className="f6 lh-copy gray">
{link.votes.length} votes, submitted by{' '} {link.votes.length} votes | by{' '}
{link.postedBy ? link.postedBy.name : 'Unknown'}{' '} {link.postedBy ? link.postedBy.name : 'Unknown'}{' '}
{timeDifferenceForDate(link.createdAt)} {timeDifferenceForDate(link.createdAt)}
</div> </div>
@@ -82,4 +95,15 @@ const Link = (props) => {
); );
}; };
// const Link = (props) => {
// const { link } = props;
// return (
// <div>
// <div>
// {link.id} - {link.description} ({link.url})
// </div>
// </div>
// );
// };
export default Link; export default Link;

View File

@@ -11,6 +11,7 @@ export const FEED_QUERY = gql`
$orderBy: LinkOrderByInput $orderBy: LinkOrderByInput
) { ) {
feed(take: $take, skip: $skip, orderBy: $orderBy) { feed(take: $take, skip: $skip, orderBy: $orderBy) {
id
links { links {
id id
createdAt createdAt
@@ -75,6 +76,8 @@ const LinkList = () => {
pageIndexParams[pageIndexParams.length - 1] pageIndexParams[pageIndexParams.length - 1]
); );
console.log(pageIndexParams.length, page);
const pageIndex = page ? (page - 1) * LINKS_PER_PAGE : 0; const pageIndex = page ? (page - 1) * LINKS_PER_PAGE : 0;
const { const {
@@ -86,6 +89,8 @@ const LinkList = () => {
variables: getQueryVariables(isNewPage, page) variables: getQueryVariables(isNewPage, page)
}); });
// const { data } = useQuery(FEED_QUERY);
const getLinksToRender = (isNewPage, data) => { const getLinksToRender = (isNewPage, data) => {
if (isNewPage) { if (isNewPage) {
return data.feed.links; return data.feed.links;
@@ -166,4 +171,28 @@ const LinkList = () => {
); );
}; };
// const LinkList = () => {
// const linksToRender = [
// {
// id: '1',
// description:
// 'Link first😎',
// url: 'https://prisma.io'
// },
// {
// id: '2',
// description: 'Link zwei',
// url: 'https://www.apollographql.com/docs/react/'
// }
// ];
//
// return (
// <div>
// {linksToRender.map((link) => (
// <Link key={link.id} link={link} />
// ))}
// </div>
// );
// };
export default LinkList; export default LinkList;

View File

@@ -1,4 +1,5 @@
import React, { useState } from 'react'; import React, { useState } from 'react';
import { useMutation } from '@apollo/client';
import { useLazyQuery } from '@apollo/client'; import { useLazyQuery } from '@apollo/client';
import gql from 'graphql-tag'; import gql from 'graphql-tag';
import Link from './Link'; import Link from './Link';
@@ -6,6 +7,7 @@ import Link from './Link';
const FEED_SEARCH_QUERY = gql` const FEED_SEARCH_QUERY = gql`
query FeedSearchQuery($filter: String!) { query FeedSearchQuery($filter: String!) {
feed(filter: $filter) { feed(filter: $filter) {
id
links { links {
id id
url url

View File

@@ -1,2 +1,2 @@
export const AUTH_TOKEN = 'auth-token'; export const AUTH_TOKEN = 'auth-token';
export const LINKS_PER_PAGE = 5; export const LINKS_PER_PAGE = 3;

View File

@@ -2,15 +2,28 @@ import React from 'react';
import { BrowserRouter } from 'react-router-dom'; import { BrowserRouter } from 'react-router-dom';
import { setContext } from '@apollo/client/link/context'; import { setContext } from '@apollo/client/link/context';
import { AUTH_TOKEN } from './constants'; import { AUTH_TOKEN } from './constants';
import { split } from '@apollo/client'; import { split } from '@apollo/client';
import { WebSocketLink } from '@apollo/client/link/ws'; import { WebSocketLink } from '@apollo/client/link/ws';
import { getMainDefinition } from '@apollo/client/utilities'; import { getMainDefinition } from '@apollo/client/utilities';
// import LinkList from './components/LinkList';
// class App extends Component {
// render() {
// return <LinkList />;
// }
// }
// export default App;
// import React from 'react';
import ReactDOM from 'react-dom'; import ReactDOM from 'react-dom';
import './styles/index.css'; import './styles/index.css';
import './styles/tachyons.min.css' import './styles/tachyons.min.css'
import App from './components/App'; import App from './components/App';
// // import * as serviceWorker from './serviceWorker';
// 1 // // 1
import { import {
ApolloProvider, ApolloProvider,
ApolloClient, ApolloClient,

5
client/src/setupTests.js Normal file
View File

@@ -0,0 +1,5 @@
// jest-dom adds custom jest matchers for asserting on DOM nodes.
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom';

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
{ {
"name": "hackernews-node", "name": "server",
"version": "1.0.0", "version": "1.0.0",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
@@ -8,10 +8,9 @@
}, },
"dependencies": { "dependencies": {
"@prisma/client": "^2.12.1", "@prisma/client": "^2.12.1",
"apollo-server": "^2.19.0", "apollo-server": "^3.13.0",
"bcryptjs": "2.4.3", "bcryptjs": "2.4.3",
"graphql-depth-limit": "^1.1.0", "jsonwebtoken": "9.0.2"
"jsonwebtoken": "8.5.1"
}, },
"devDependencies": { "devDependencies": {
"@prisma/cli": "^2.12.1", "@prisma/cli": "^2.12.1",

Binary file not shown.

View File

@@ -1,6 +1,5 @@
const { ApolloServer, PubSub } = require('apollo-server'); const { ApolloServer, PubSub } = require('apollo-server');
const { PrismaClient } = require('@prisma/client'); const { PrismaClient } = require('@prisma/client');
const depthLimit = require('graphql-depth-limit');
const Query = require('./resolvers/Query'); const Query = require('./resolvers/Query');
const Mutation = require('./resolvers/Mutation'); const Mutation = require('./resolvers/Mutation');
const Subscription = require('./resolvers/Subscription'); const Subscription = require('./resolvers/Subscription');
@@ -32,7 +31,6 @@ const server = new ApolloServer({
'utf8' 'utf8'
), ),
resolvers, resolvers,
validationRules: [depthLimit(4)],
context: ({ req }) => { context: ({ req }) => {
return { return {
...req, ...req,

View File

@@ -1,12 +1,11 @@
const bcrypt = require('bcryptjs'); const bcrypt = require('bcryptjs');
const jwt = require('jsonwebtoken'); const jwt = require('jsonwebtoken');
const utils = require('../utils');
const { APP_SECRET } = require('../utils'); const { APP_SECRET } = require('../utils');
async function post(parent, args, context, info) { function post(parent, args, context, info) {
const { userId } = context; const { userId } = context;
const newLink = await context.prisma.link.create({ const newLink = context.prisma.link.create({
data: { data: {
url: args.url, url: args.url,
description: args.description, description: args.description,
@@ -14,19 +13,30 @@ async function post(parent, args, context, info) {
} }
}); });
context.pubsub.publish('NEW_LINK', newLink);
return newLink; return newLink;
} }
// async function post(parent, args, context, info) {
// const { userId } = context;
// const newLink = await context.prisma.link.create({
// data: {
// url: args.url,
// description: args.description,
// postedBy: { connect: { id: userId } }
// }
// });
// context.pubsub.publish('NEW_LINK', newLink);
// return newLink;
// }
async function signup(parent, args, context, info) { async function signup(parent, args, context, info) {
const password = await bcrypt.hash(args.password, 10); const password = await bcrypt.hash(args.password, 10);
const user = await context.prisma.user.create({ const user = await context.prisma.user.create({
data: { ...args, password } data: { ...args, password }
}); });
const token = utils.setToken(user.id); const token = jwt.sign({ userId: user.id }, APP_SECRET);
return { return {
token, token,
@@ -46,12 +56,11 @@ async function login(parent, args, context, info) {
args.password, args.password,
user.password user.password
); );
if (!valid) { if (!valid) {
throw new Error('Invalid password'); throw new Error('Invalid password');
} }
const token = utils.setToken(user.id); const token = jwt.sign({ userId: user.id }, APP_SECRET);
return { return {
token, token,

View File

@@ -18,6 +18,7 @@ async function feed(parent, args, context, info) {
const count = await context.prisma.link.count({ where }); const count = await context.prisma.link.count({ where });
return { return {
id: 'main-feed',
links, links,
count count
}; };

View File

@@ -1,16 +1,26 @@
type Query { type Query {
info: String! info: String!
feed(filter: String, skip: Int, take: Int, orderBy: LinkOrderByInput): Feed! feed(
filter: String
skip: Int
take: Int
orderBy: LinkOrderByInput
): Feed!
} }
type Feed { type Feed {
id: ID!
links: [Link!]! links: [Link!]!
count: Int! count: Int!
} }
type Mutation { type Mutation {
post(url: String!, description: String!): Link! post(url: String!, description: String!): Link!
signup(email: String!, password: String!, name: String!): AuthPayload signup(
email: String!
password: String!
name: String!
): AuthPayload
login(email: String!, password: String!): AuthPayload login(email: String!, password: String!): AuthPayload
vote(linkId: ID!): Vote vote(linkId: ID!): Vote
} }

View File

@@ -5,11 +5,7 @@ function getTokenPayload(token) {
return jwt.verify(token, APP_SECRET); return jwt.verify(token, APP_SECRET);
} }
function setToken(user_id) { function getUserId(req, authToken) {
return jwt.sign({ userId: user_id }, APP_SECRET);
}
function getUserId(req) {
if (req) { if (req) {
const authHeader = req.headers.authorization; const authHeader = req.headers.authorization;
if (authHeader) { if (authHeader) {
@@ -20,6 +16,9 @@ function getUserId(req) {
const { userId } = getTokenPayload(token); const { userId } = getTokenPayload(token);
return userId; return userId;
} }
} else if (authToken) {
const { userId } = getTokenPayload(authToken);
return userId;
} }
throw new Error('Not authenticated'); throw new Error('Not authenticated');
@@ -27,6 +26,5 @@ function getUserId(req) {
module.exports = { module.exports = {
APP_SECRET, APP_SECRET,
setToken,
getUserId getUserId
}; };

File diff suppressed because it is too large Load Diff