Skip to content

Commit

Permalink
propagate book update in all chapters async-labs#173
Browse files Browse the repository at this point in the history
  • Loading branch information
klyburke committed Jun 29, 2022
1 parent 957428f commit 425e243
Show file tree
Hide file tree
Showing 283 changed files with 22,472 additions and 20,155 deletions.
5 changes: 4 additions & 1 deletion book/1-end/app/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
10 changes: 5 additions & 5 deletions book/1-end/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
"dependencies": {
"dotenv": "^8.2.0",
"next": "^9.1.2",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"typescript": "^4.1.3"
"react": "^17.0.2",
"react-dom": "^17.0.2",
"typescript": "^4.7.3"
},
"devDependencies": {
"@types/node": "^12.12.2",
"@types/react": "^16.8.24",
"@types/react-dom": "^16.0.5",
"@types/react": "^18.0.14",
"@types/react-dom": "^18.0.5",
"@typescript-eslint/eslint-plugin": "^4.2.0",
"@typescript-eslint/parser": "^4.2.0",
"eslint": "^6.8.0",
Expand Down
5 changes: 3 additions & 2 deletions book/1-end/app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"noEmit": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"isolatedModules": true
"isolatedModules": true,
"incremental": true
},
"include": [
"next-env.d.ts",
Expand All @@ -41,5 +42,5 @@
"out",
"next.config.js",
"node_modules"
],
]
}
62 changes: 33 additions & 29 deletions book/1-end/app/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1185,21 +1185,27 @@
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.3.tgz#2ab0d5da2e5815f94b0b9d4b95d1e5f243ab2ca7"
integrity sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw==

"@types/react-dom@^16.0.5":
version "16.9.10"
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.9.10.tgz#4485b0bec3d41f856181b717f45fd7831101156f"
integrity sha512-ItatOrnXDMAYpv6G8UCk2VhbYVTjZT9aorLtA/OzDN9XJ2GKcfam68jutoAcILdRjsRUO8qb7AmyObF77Q8QFw==
"@types/react-dom@^18.0.5":
version "18.0.5"
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.0.5.tgz#330b2d472c22f796e5531446939eacef8378444a"
integrity sha512-OWPWTUrY/NIrjsAPkAk1wW9LZeIjSvkXRhclsFO8CZcZGCOg2G0YZy4ft+rOyYxy8B7ui5iZzi9OkDebZ7/QSA==
dependencies:
"@types/react" "^16"
"@types/react" "*"

"@types/react@^16", "@types/react@^16.8.24":
version "16.14.2"
resolved "https://registry.yarnpkg.com/@types/react/-/react-16.14.2.tgz#85dcc0947d0645349923c04ccef6018a1ab7538c"
integrity sha512-BzzcAlyDxXl2nANlabtT4thtvbbnhee8hMmH/CcJrISDBVcJS1iOsP1f0OAgSdGE0MsY9tqcrb9YoZcOFv9dbQ==
"@types/react@*", "@types/react@^18.0.14":
version "18.0.14"
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.14.tgz#e016616ffff51dba01b04945610fe3671fdbe06d"
integrity sha512-x4gGuASSiWmo0xjDLpm5mPb52syZHJx02VKbqUKdLmKtAwIh63XClGsiTI1K6DO5q7ox4xAsQrU+Gl3+gGXF9Q==
dependencies:
"@types/prop-types" "*"
"@types/scheduler" "*"
csstype "^3.0.2"

"@types/scheduler@*":
version "0.16.2"
resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39"
integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==

"@typescript-eslint/eslint-plugin@^4.2.0":
version "4.13.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.13.0.tgz#5f580ea520fa46442deb82c038460c3dd3524bb6"
Expand Down Expand Up @@ -4913,7 +4919,7 @@ promise-inflight@^1.0.1:
resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3"
integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM=

[email protected], prop-types@^15.6.2, prop-types@^15.7.2:
[email protected], prop-types@^15.7.2:
version "15.7.2"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5"
integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==
Expand Down Expand Up @@ -5014,15 +5020,14 @@ rc@^1.2.7:
minimist "^1.2.0"
strip-json-comments "~2.0.1"

react-dom@^16.13.1:
version "16.14.0"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.14.0.tgz#7ad838ec29a777fb3c75c3a190f661cf92ab8b89"
integrity sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==
react-dom@^17.0.2:
version "17.0.2"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23"
integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"
prop-types "^15.6.2"
scheduler "^0.19.1"
scheduler "^0.20.2"

[email protected]:
version "16.13.1"
Expand All @@ -5039,14 +5044,13 @@ [email protected]:
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.8.3.tgz#721d4657672d400c5e3c75d063c4a85fb2d5d68f"
integrity sha512-X8jZHc7nCMjaCqoU+V2I0cOhNW+QMBwSUkeXnTi8IPe6zaRWfn60ZzvFDZqWPfmSJfjub7dDW1SP0jaHWLu/hg==

react@^16.13.1:
version "16.14.0"
resolved "https://registry.yarnpkg.com/react/-/react-16.14.0.tgz#94d776ddd0aaa37da3eda8fc5b6b18a4c9a3114d"
integrity sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==
react@^17.0.2:
version "17.0.2"
resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037"
integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"
prop-types "^15.6.2"

"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.6:
version "2.3.6"
Expand Down Expand Up @@ -5345,10 +5349,10 @@ sax@^1.2.4:
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==

scheduler@^0.19.1:
version "0.19.1"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.19.1.tgz#4f3e2ed2c1a7d65681f4c854fa8c5a1ccb40f196"
integrity sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==
scheduler@^0.20.2:
version "0.20.2"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91"
integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"
Expand Down Expand Up @@ -6027,10 +6031,10 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=

typescript@^4.1.3:
version "4.1.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7"
integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==
typescript@^4.7.3:
version "4.7.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235"
integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==

unicode-canonical-property-names-ecmascript@^1.0.4:
version "1.0.4"
Expand Down
18 changes: 9 additions & 9 deletions book/10-begin/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@
"express": "^4.17.1",
"express-session": "^1.17.1",
"he": "^1.2.0",
"helmet": "^4.1.0",
"helmet": "4.1.0-rc.2",
"highlight.js": "^10.5.0",
"lodash": "^4.17.20",
"marked": "^1.2.7",
"mongoose": "^5.10.15",
"marked": "^4.0.16",
"mongoose": "^6.3.5",
"node-fetch": "^2.6.1",
"passport": "^0.4.1",
"passport": "^0.6.0",
"passport-google-oauth": "^2.0.0",
"passwordless": "^1.1.3",
"passwordless-tokenstore": "^0.0.10",
"socket.io": "^3.0.3",
"stripe": "^8.129.0",
"typescript": "^4.1.3",
"typescript": "^4.7.3",
"winston": "^3.3.3"
},
"devDependencies": {
Expand All @@ -49,17 +49,17 @@
"@types/mongoose": "^5.5.43",
"@types/node": "^12.12.2",
"@types/node-fetch": "^1.6.9",
"@types/passport": "^0.4.5",
"@types/socket.io": "^1.4.33",
"@types/passport": "^1.0.8",
"@types/socket.io": "^3.0.2",
"@typescript-eslint/eslint-plugin": "^4.2.0",
"@typescript-eslint/parser": "^4.2.0",
"eslint": "^6.8.0",
"eslint": "^7.25.0",
"eslint-config-prettier": "^7.1.0",
"eslint-plugin-prettier": "^3.3.1",
"jest": "^26.4.2",
"nodemon": "^2.0.7",
"prettier": "^2.2.1",
"ts-jest": "^26.4.4",
"ts-node": "^9.1.1"
"ts-node": "^10.8.1"
}
}
16 changes: 8 additions & 8 deletions book/10-begin/api/server/api/team-leader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ router.use((req, res, next) => {
next();
});

router.post('/teams/add', async (req, res, next) => {
router.post('/teams/add', async (req: any, res, next) => {
try {
const { name, avatarUrl } = req.body;

Expand All @@ -32,7 +32,7 @@ router.post('/teams/add', async (req, res, next) => {
}
});

router.post('/teams/update', async (req, res, next) => {
router.post('/teams/update', async (req: any, res, next) => {
try {
const { teamId, name, avatarUrl } = req.body;

Expand All @@ -52,7 +52,7 @@ router.post('/teams/update', async (req, res, next) => {
}
});

router.get('/teams/get-invitations-for-team', async (req, res, next) => {
router.get('/teams/get-invitations-for-team', async (req: any, res, next) => {
try {
const invitations = await Invitation.getTeamInvitations({
userId: req.user.id,
Expand All @@ -65,7 +65,7 @@ router.get('/teams/get-invitations-for-team', async (req, res, next) => {
}
});

router.post('/teams/invite-member', async (req, res, next) => {
router.post('/teams/invite-member', async (req: any, res, next) => {
try {
const { teamId, email } = req.body;

Expand All @@ -77,7 +77,7 @@ router.post('/teams/invite-member', async (req, res, next) => {
}
});

router.post('/teams/remove-member', async (req, res, next) => {
router.post('/teams/remove-member', async (req: any, res, next) => {
try {
const { teamId, userId } = req.body;

Expand All @@ -89,7 +89,7 @@ router.post('/teams/remove-member', async (req, res, next) => {
}
});

router.post('/stripe/fetch-checkout-session', async (req, res, next) => {
router.post('/stripe/fetch-checkout-session', async (req: any, res, next) => {
try {
const { mode, teamId } = req.body;

Expand Down Expand Up @@ -121,7 +121,7 @@ router.post('/stripe/fetch-checkout-session', async (req, res, next) => {
}
});

router.post('/cancel-subscription', async (req, res, next) => {
router.post('/cancel-subscription', async (req: any, res, next) => {
const { teamId } = req.body;

try {
Expand All @@ -136,7 +136,7 @@ router.post('/cancel-subscription', async (req, res, next) => {
}
});

router.get('/get-list-of-invoices-for-customer', async (req, res, next) => {
router.get('/get-list-of-invoices-for-customer', async (req: any, res, next) => {
try {
const { stripeListOfInvoices } = await User.getListOfInvoicesForCustomer({
userId: req.user.id,
Expand Down
26 changes: 13 additions & 13 deletions book/10-begin/api/server/api/team-member.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ router.post('/aws/get-signed-request-for-upload-to-s3', async (req, res, next) =
}
});

router.post('/user/update-profile', async (req, res, next) => {
router.post('/user/update-profile', async (req: any, res, next) => {
try {
const { name, avatarUrl } = req.body;

Expand All @@ -65,7 +65,7 @@ router.post('/user/update-profile', async (req, res, next) => {
}
});

router.post('/user/toggle-theme', async (req, res, next) => {
router.post('/user/toggle-theme', async (req: any, res, next) => {
try {
const { darkTheme } = req.body;

Expand Down Expand Up @@ -130,7 +130,7 @@ async function loadTeamData(team, userId, body) {
return data;
}

router.post('/get-initial-data', async (req, res, next) => {
router.post('/get-initial-data', async (req: any, res, next) => {
try {
const teams = await Team.getAllTeamsForUser(req.user.id);

Expand All @@ -152,7 +152,7 @@ router.post('/get-initial-data', async (req, res, next) => {
}
});

router.get('/teams', async (req, res, next) => {
router.get('/teams', async (req: any, res, next) => {
try {
const teams = await Team.getAllTeamsForUser(req.user.id);

Expand All @@ -164,7 +164,7 @@ router.get('/teams', async (req, res, next) => {
}
});

router.get('/teams/get-members', async (req, res, next) => {
router.get('/teams/get-members', async (req: any, res, next) => {
try {
const users = await User.getMembersForTeam({
userId: req.user.id,
Expand All @@ -177,7 +177,7 @@ router.get('/teams/get-members', async (req, res, next) => {
}
});

router.post('/discussions/add', async (req, res, next) => {
router.post('/discussions/add', async (req: any, res, next) => {
try {
const { name, teamId, memberIds = [], socketId, notificationType } = req.body;

Expand All @@ -197,7 +197,7 @@ router.post('/discussions/add', async (req, res, next) => {
}
});

router.post('/discussions/edit', async (req, res, next) => {
router.post('/discussions/edit', async (req: any, res, next) => {
try {
const { name, id, memberIds = [], socketId, notificationType } = req.body;

Expand All @@ -217,7 +217,7 @@ router.post('/discussions/edit', async (req, res, next) => {
}
});

router.post('/discussions/delete', async (req, res, next) => {
router.post('/discussions/delete', async (req: any, res, next) => {
try {
const { id, socketId } = req.body;

Expand All @@ -231,7 +231,7 @@ router.post('/discussions/delete', async (req, res, next) => {
}
});

router.get('/discussions/list', async (req, res, next) => {
router.get('/discussions/list', async (req: any, res, next) => {
try {
const { discussions } = await Discussion.getList({
userId: req.user.id,
Expand All @@ -244,7 +244,7 @@ router.get('/discussions/list', async (req, res, next) => {
}
});

router.get('/posts/list', async (req, res, next) => {
router.get('/posts/list', async (req: any, res, next) => {
try {
const posts = await Post.getList({
userId: req.user.id,
Expand All @@ -257,7 +257,7 @@ router.get('/posts/list', async (req, res, next) => {
}
});

router.post('/posts/add', async (req, res, next) => {
router.post('/posts/add', async (req: any, res, next) => {
try {
const { content, discussionId, socketId } = req.body;

Expand All @@ -271,7 +271,7 @@ router.post('/posts/add', async (req, res, next) => {
}
});

router.post('/posts/edit', async (req, res, next) => {
router.post('/posts/edit', async (req: any, res, next) => {
try {
const { content, id, socketId } = req.body;

Expand All @@ -285,7 +285,7 @@ router.post('/posts/edit', async (req, res, next) => {
}
});

router.post('/posts/delete', async (req, res, next) => {
router.post('/posts/delete', async (req: any, res, next) => {
try {
const { id, discussionId, socketId } = req.body;

Expand Down
Loading

0 comments on commit 425e243

Please sign in to comment.