Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Nov 26, 2022
1 parent 4267ee6 commit a575201
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 7 deletions.
1 change: 0 additions & 1 deletion examples/hive-example/sources/authors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"@whatwg-node/fetch": "0.5.3",
"@whatwg-node/server": "0.4.17",
"itty-router": "2.6.6",
"itty-router-extras": "0.4.2",
"ts-node": "10.9.1",
"typescript": "4.5.2"
},
Expand Down
3 changes: 1 addition & 2 deletions examples/hive-example/sources/authors/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { createServerAdapter } from '@whatwg-node/server';
import { Router } from 'itty-router';
import { withParams } from 'itty-router-extras';
import { Response } from '@whatwg-node/fetch';
import { createServer } from 'http';

Expand Down Expand Up @@ -36,7 +35,7 @@ async function main() {
}),
);

app.get('/authors/:id', withParams, req => {
app.get('/authors/:id', req => {
const author = authors.find(author => author.id === req.params.id);

if (!author) {
Expand Down
1 change: 0 additions & 1 deletion examples/hive-example/sources/books/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"@whatwg-node/fetch": "0.5.3",
"@whatwg-node/server": "0.4.17",
"itty-router": "2.6.6",
"itty-router-extras": "0.4.2",
"ts-node": "10.9.1",
"typescript": "4.5.2"
},
Expand Down
5 changes: 2 additions & 3 deletions examples/hive-example/sources/books/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { createServerAdapter } from '@whatwg-node/server';
import { Router } from 'itty-router';
import { withParams } from 'itty-router-extras';
import { Response } from '@whatwg-node/fetch';
import { createServer } from 'http';

Expand Down Expand Up @@ -41,7 +40,7 @@ async function main() {
}),
);

app.get('/books/:id', withParams, req => {
app.get('/books/:id', req => {
const book = books.find(book => book.id === req.params.id);

if (!book) {
Expand All @@ -57,7 +56,7 @@ async function main() {
});
});

app.get('/books/authors/:authorId', withParams, req => {
app.get('/books/authors/:authorId', req => {
const authorBooks = books.filter(book => book.authorId === req.params.authorId);

if (!authorBooks.length) {
Expand Down
28 changes: 28 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3043,6 +3043,20 @@
tslib "^2.4.0"
ws "8.11.0"

"@graphql-tools/[email protected]":
version "0.0.3"
resolved "https://registry.yarnpkg.com/@graphql-tools/executor-http/-/executor-http-0.0.3.tgz#adfec46a7814c7f7082005a374d944900ea18018"
integrity sha512-dtZzdcoc7tnctSGCQhcbOQPnVidn4DakgkyrBAWf0O3GTP9NFKlA+T9+I1N4gPHupQOZdJ1gmNXfnJZyswzCkA==
dependencies:
"@graphql-tools/utils" "9.1.1"
"@repeaterjs/repeater" "3.0.4"
"@whatwg-node/fetch" "0.5.1"
dset "3.1.2"
extract-files "^11.0.0"
meros "1.2.1"
tslib "^2.4.0"
value-or-promise "1.0.11"

"@graphql-tools/[email protected]":
version "0.0.4"
resolved "https://registry.yarnpkg.com/@graphql-tools/executor-http/-/executor-http-0.0.4.tgz#b0ba436bd37a538ee31f30c9ee6266143a956062"
Expand Down Expand Up @@ -6295,6 +6309,20 @@
resolved "https://registry.yarnpkg.com/@whatwg-node/events/-/events-0.0.2.tgz#7b7107268d2982fc7b7aff5ee6803c64018f84dd"
integrity sha512-WKj/lI4QjnLuPrim0cfO7i+HsDSXHxNv1y0CrJhdntuO3hxWZmnXCwNDnwOvry11OjRin6cgWNF+j/9Pn8TN4w==

"@whatwg-node/[email protected]":
version "0.5.1"
resolved "https://registry.yarnpkg.com/@whatwg-node/fetch/-/fetch-0.5.1.tgz#62c7e902ddfb7d16b0b31599d81628bbd22350a9"
integrity sha512-RBZS60EU6CbRJ370BVVKW4F9csZuGh0OQNrUDhJ0IaIFLsXsJorFCM2iwaDWZTAPMqxW1TmuVcVKJ3d/H1dV1g==
dependencies:
"@peculiar/webcrypto" "^1.4.0"
abort-controller "^3.0.0"
busboy "^1.6.0"
form-data-encoder "^1.7.1"
formdata-node "^4.3.1"
node-fetch "^2.6.7"
undici "^5.12.0"
web-streams-polyfill "^3.2.0"

"@whatwg-node/[email protected]", "@whatwg-node/fetch@^0.5.0":
version "0.5.3"
resolved "https://registry.yarnpkg.com/@whatwg-node/fetch/-/fetch-0.5.3.tgz#afbd38a2e5392d91318845b967529076ca654b9e"
Expand Down

0 comments on commit a575201

Please sign in to comment.