Skip to content

Commit

Permalink
feat: bump deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacek Piętal committed May 23, 2024
1 parent fa04ef8 commit 2b6362b
Show file tree
Hide file tree
Showing 11 changed files with 793 additions and 504 deletions.
2 changes: 1 addition & 1 deletion bin/chef-socket
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env node
const startServer = require('../index.js');
const startServer = require("../index.js");

startServer();
4 changes: 2 additions & 2 deletions demo/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
Expand Down Expand Up @@ -85,7 +85,7 @@ <h1>Chat</h1>
...obj,
[id]: document.querySelector(`#${id}`),
}),
{}
{},
);
}
</script>
Expand Down
2 changes: 1 addition & 1 deletion dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Config } from "chef-core";
export default function startChef(
config?: Partial<Config>
config?: Partial<Config>,
): Promise<import("chef-core").Server>;
//# sourceMappingURL=index.d.ts.map
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ async function startChef(config) {
{
createServer: server_1.createServer,
requestHandler: server_1.requestHandler,
}
},
);
}
exports.default = startChef;
4 changes: 2 additions & 2 deletions dist/server/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Request, Response } from "express";
import { Cache } from "latermom";
import { Cache } from "@pietal.dev/cache";
import { Config, Server, FileReaderResponse } from "chef-core";
export declare function createServer(config: Config): Promise<Server>;
export declare function requestHandler(
fileReaderCache: Cache<FileReaderResponse>
fileReaderCache: Cache<FileReaderResponse>,
): (req: Request, res: Response) => void;
//# sourceMappingURL=index.d.ts.map
2 changes: 1 addition & 1 deletion dist/server/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function createExpressServer(config, app) {
// start ssl app and finish
return https_1.default.createServer(
{ key: (0, fs_1.readFileSync)(key), cert: (0, fs_1.readFileSync)(cert) },
app
app,
);
}
// else start normal app
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chef-socket",
"version": "2.1.3",
"version": "2.1.4",
"keywords": [
"chef-js",
"server",
Expand Down Expand Up @@ -40,16 +40,16 @@
"precommit": "yarn build && prettier . --write"
},
"dependencies": {
"chef-core": "^3.0.4",
"express": "^4.18.2",
"socket.io": "^4.6.2"
"chef-core": "^3.0.6",
"express": "^4.19.2",
"socket.io": "^4.7.5"
},
"devDependencies": {
"@types/express": "^4.17.17",
"@types/node": "^20.3.0",
"jest": "^29.5.0",
"prettier": "^2.8.8",
"socket.io-client": "^4.6.2",
"typescript": "^5.1.3"
"@types/express": "^4.17.21",
"@types/node": "^20.12.12",
"jest": "^29.7.0",
"prettier": "^3.2.5",
"socket.io-client": "^4.7.5",
"typescript": "^5.4.5"
}
}
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import { createServer, requestHandler } from "./server";
export default async function startChef(config?: Partial<Config>) {
return await chef(
{ ...config, type: "express" },
{ createServer, requestHandler }
{ createServer, requestHandler },
);
}
6 changes: 3 additions & 3 deletions src/server/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import http, { RequestListener } from "http";
import https from "https";
import express, { Request, Response } from "express";
import { Cache } from "latermom";
import { Cache } from "@pietal.dev/cache";
import { Socket, Server as SocketServer } from "socket.io";
import { readFileSync } from "fs";
import { debug } from "chef-core/config";
Expand Down Expand Up @@ -88,7 +88,7 @@ export async function createServer(config: Config): Promise<Server> {

function createExpressServer(
config: Config,
app: Express.Application
app: Express.Application,
): http.Server | https.Server {
// spread ssl from config
const { ssl } = config;
Expand All @@ -100,7 +100,7 @@ function createExpressServer(
// start ssl app and finish
return https.createServer(
{ key: readFileSync(key), cert: readFileSync(cert) },
app as RequestListener
app as RequestListener,
);
}

Expand Down
Loading

0 comments on commit 2b6362b

Please sign in to comment.