⬆️ bump dependencies

This commit is contained in:
platane
2024-02-20 15:55:51 +01:00
committed by Platane
parent 5332254423
commit debec31440
10 changed files with 533 additions and 233 deletions

View File

@@ -10,8 +10,8 @@
"@snk/types": "1.0.0"
},
"devDependencies": {
"@vercel/ncc": "0.38.0",
"dotenv": "16.3.1"
"@vercel/ncc": "0.38.1",
"dotenv": "16.4.5"
},
"scripts": {
"build": "ncc build --external canvas --external gifsicle --out dist ./index.ts",

View File

@@ -10,15 +10,15 @@
"@snk/types": "1.0.0"
},
"devDependencies": {
"dotenv": "16.3.1",
"@types/dat.gui": "0.7.10",
"dotenv": "16.4.5",
"@types/dat.gui": "0.7.12",
"dat.gui": "0.7.9",
"html-webpack-plugin": "5.5.3",
"ts-loader": "9.4.4",
"ts-node": "10.9.1",
"ts-loader": "9.5.1",
"ts-node": "10.9.2",
"webpack": "5.88.2",
"webpack-cli": "5.1.4",
"webpack-dev-server": "4.15.1"
"webpack-dev-server": "5.0.2"
},
"scripts": {
"build": "webpack",

View File

@@ -4,23 +4,31 @@ import webpack from "webpack";
import { getGithubUserContribution } from "@snk/github-user-contribution";
import { config } from "dotenv";
import type { Configuration as WebpackConfiguration } from "webpack";
import type { Configuration as WebpackDevServerConfiguration } from "webpack-dev-server";
import {
ExpressRequestHandler,
type Configuration as WebpackDevServerConfiguration,
} from "webpack-dev-server";
config({ path: __dirname + "/../../.env" });
const demos: string[] = require("./demo.json");
const webpackDevServerConfiguration: WebpackDevServerConfiguration = {
open: { target: demos[1] + ".html" },
onAfterSetupMiddleware: ({ app }) => {
app!.get("/api/github-user-contribution/:userName", async (req, res) => {
const userName: string = req.params.userName;
res.send(
await getGithubUserContribution(userName, {
githubToken: process.env.GITHUB_TOKEN!,
})
);
});
},
setupMiddlewares: (ms) => [
...ms,
(async (req, res, next) => {
const userName = req.url.match(
/\/api\/github-user-contribution\/(\w+)/
)?.[1];
if (userName)
res.send(
await getGithubUserContribution(userName, {
githubToken: process.env.GITHUB_TOKEN!,
})
);
else next();
}) as ExpressRequestHandler,
],
};
const webpackConfiguration: WebpackConfiguration = {

View File

@@ -11,8 +11,8 @@
},
"devDependencies": {
"@types/gifsicle": "5.2.0",
"@types/tmp": "0.2.4",
"@vercel/ncc": "0.38.0"
"@types/tmp": "0.2.6",
"@vercel/ncc": "0.38.1"
},
"scripts": {
"benchmark": "ncc run __tests__/benchmark.ts --quiet"

View File

@@ -2,11 +2,11 @@
"name": "@snk/github-user-contribution-service",
"version": "1.0.0",
"dependencies": {
"node-fetch": "2.7.0",
"node-fetch": "3.3.2",
"@snk/github-user-contribution": "1.0.0",
"@vercel/node": "3.0.6"
},
"devDependencies": {
"@types/node-fetch": "2.6.6"
"@types/node-fetch": "2.6.11"
}
}

View File

@@ -2,6 +2,6 @@
"name": "@snk/github-user-contribution",
"version": "1.0.0",
"devDependencies": {
"dotenv": "16.3.1"
"dotenv": "16.4.5"
}
}