Skip to content

Commit

Permalink
Merge pull request #168 from sebringrose/sebringrose-patch-1
Browse files Browse the repository at this point in the history
Rename server.ts to Server.ts
  • Loading branch information
sejori authored Apr 27, 2023
2 parents 0745905 + 534e1ae commit ced5cf1
Show file tree
Hide file tree
Showing 23 changed files with 25 additions and 25 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
<h2>Getting started</h2>

```js
import * as Peko from "https://deno.land/x/peko/mod.ts"; // or "../server.ts" for super featherweight
import * as Peko from "https://deno.land/x/peko/mod.ts";
// import from ".../peko/lib/Server.ts" for featherweight mode

const server = new Peko.Server();

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/handlers/ssr.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RequestContext } from "../server.ts"
import { RequestContext } from "../Server.ts"
import { Handler, HandlerOptions } from "../types.ts"
import { Crypto } from "../utils/Crypto.ts"
import { mergeHeaders } from "../utils/helpers.ts"
Expand Down
2 changes: 1 addition & 1 deletion lib/handlers/static.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { contentType } from "https://deno.land/[email protected]/media_types/mod.ts";
import { fromFileUrl } from "https://deno.land/[email protected]/path/mod.ts"
import { RequestContext } from "../server.ts"
import { RequestContext } from "../Server.ts"
import { Handler, HandlerOptions } from "../types.ts"
import { Crypto } from "../utils/Crypto.ts"
import { mergeHeaders } from "../utils/helpers.ts"
Expand Down
2 changes: 1 addition & 1 deletion lib/middleware/cacher.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { RequestContext } from "../server.ts";
import type { RequestContext } from "../Server.ts";
import { Middleware } from "../types.ts";
import { ResponseCache } from "../utils/ResponseCache.ts";

Expand Down
2 changes: 1 addition & 1 deletion lib/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RequestContext } from "./server.ts"
import { RequestContext } from "./Server.ts"

export interface Route {
path: `/${string}`
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/Cascade.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RequestContext } from "../server.ts"
import { RequestContext } from "../Server.ts"
import { Middleware, Result, Next, Route } from "../types.ts"

export type PromiseMiddleware = (ctx: RequestContext, next: Next) => Promise<Result>
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/Profiler.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Server } from "../server.ts"
import { Server } from "../Server.ts"
import { Route } from "../types.ts"

type ProfileConfig = {
Expand Down
1 change: 0 additions & 1 deletion lib/utils/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// import { Server } from "../server.ts"
import { Middleware, Route } from "../types.ts"
import { staticHandler } from "../handlers/static.ts"

Expand Down
4 changes: 2 additions & 2 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

// Core classes, functions & types
export * from "./lib/server.ts"
export * from "./lib/Server.ts"
export * from "./lib/types.ts"

// Handlers
Expand All @@ -23,5 +23,5 @@ export * from "./lib/utils/ResponseCache.ts"
export * from "./lib/utils/Crypto.ts"
export * from "./lib/utils/helpers.ts"

import { Server } from "./lib/server.ts"
import { Server } from "./lib/Server.ts"
export default Server
2 changes: 1 addition & 1 deletion tests/handlers/sse_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assert } from "https://deno.land/[email protected]/testing/asserts.ts"
import { Server, RequestContext } from "../../lib/server.ts"
import { Server, RequestContext } from "../../lib/Server.ts"
import { sseHandler } from "../../lib/handlers/sse.ts"

Deno.test("HANDLER: Server-sent events", async (t) => {
Expand Down
2 changes: 1 addition & 1 deletion tests/handlers/ssr_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assert } from "https://deno.land/[email protected]/testing/asserts.ts"
import { Server, RequestContext } from "../../lib/server.ts"
import { Server, RequestContext } from "../../lib/Server.ts"
import { ssrHandler } from "../../lib/handlers/ssr.ts"

Deno.test("HANDLER: Server-side render", async (t) => {
Expand Down
2 changes: 1 addition & 1 deletion tests/handlers/static_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assert } from "https://deno.land/[email protected]/testing/asserts.ts"
import { Server, RequestContext } from "../../lib/server.ts"
import { Server, RequestContext } from "../../lib/Server.ts"
import { staticHandler } from "../../lib/handlers/static.ts"

Deno.test("HANDLER: Static", async (t) => {
Expand Down
2 changes: 1 addition & 1 deletion tests/handlers/ws_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assert } from "https://deno.land/[email protected]/testing/asserts.ts"
import { Server } from "../../lib/server.ts"
import { Server } from "../../lib/Server.ts"
import { wsHandler } from "../../lib/handlers/ws.ts"

Deno.test("HANDLER: WebSocket", async (t) => {
Expand Down
2 changes: 1 addition & 1 deletion tests/middleware/authenticator_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assert } from "https://deno.land/[email protected]/testing/asserts.ts"
import { Server, RequestContext } from "../../lib/server.ts"
import { Server, RequestContext } from "../../lib/Server.ts"
import { authenticator } from "../../lib/middleware/authenticator.ts"
import { Crypto } from "../../lib/utils/Crypto.ts"

Expand Down
2 changes: 1 addition & 1 deletion tests/middleware/cacher_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assert } from "https://deno.land/[email protected]/testing/asserts.ts"
import { Server, RequestContext } from "../../lib/server.ts"
import { Server, RequestContext } from "../../lib/Server.ts"
import { cacher } from "../../lib/middleware/cacher.ts"
import { testHandler } from "../mocks/middleware.ts"
import { ResponseCache } from "../../lib/utils/ResponseCache.ts"
Expand Down
2 changes: 1 addition & 1 deletion tests/middleware/logger_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assert } from "https://deno.land/[email protected]/testing/asserts.ts"
import { Server, RequestContext } from "../../lib/server.ts"
import { Server, RequestContext } from "../../lib/Server.ts"
import { logger } from "../../lib/middleware/logger.ts"

Deno.test("MIDDLEWARE: Logger", async (t) => {
Expand Down
2 changes: 1 addition & 1 deletion tests/scripts/profile.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Server } from "../../lib/server.ts"
import { Server } from "../../lib/Server.ts"
import {
testMiddleware2,
testMiddleware3,
Expand Down
2 changes: 1 addition & 1 deletion tests/server_test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Server } from "../lib/server.ts"
import { Server } from "../lib/Server.ts"
import {
testMiddleware2,
testMiddleware3,
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/Cascade_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assert } from "https://deno.land/[email protected]/testing/asserts.ts"
import { Server, RequestContext } from "../../lib/server.ts"
import { Server, RequestContext } from "../../lib/Server.ts"
import { Cascade } from "../../lib/utils/Cascade.ts"
import {
testMiddleware1,
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/Profiler_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assert } from "https://deno.land/[email protected]/testing/asserts.ts"
import { Server } from "../../lib/server.ts"
import { Server } from "../../lib/Server.ts"
import Profiler from "../../lib/utils/Profiler.ts"

Deno.test("UTIL: Profiler", async (t) => {
Expand Down
6 changes: 3 additions & 3 deletions tests/router_test.ts → tests/utils/Router_test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { assert } from "https://deno.land/[email protected]/testing/asserts.ts"
import { Server } from "../lib/server.ts"
import { Router } from "../lib/utils/Router.ts"
import { Server } from "../../lib/Server.ts"
import { Router } from "../../lib/utils/Router.ts"
import {
testMiddleware1,
testHandler,
} from "./mocks/middleware.ts"
} from "../mocks/middleware.ts"

Deno.test("SERVER", async (t) => {
const router = new Router()
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/helpers_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assert } from "https://deno.land/[email protected]/testing/asserts.ts"
import { Server } from "../../lib/server.ts"
import { Server } from "../../lib/Server.ts"
import {
mergeHeaders,
staticDir
Expand Down

0 comments on commit ced5cf1

Please sign in to comment.