Skip to content

Commit

Permalink
chore: refactor to workspaces (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeCheneler authored Feb 12, 2025
1 parent 0a21188 commit 7b00d79
Show file tree
Hide file tree
Showing 74 changed files with 553 additions and 848 deletions.
451 changes: 9 additions & 442 deletions README.md

Large diffs are not rendered by default.

13 changes: 9 additions & 4 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"name": "@mage/server",
"version": "0.14.3",
"license": "MIT",
"exports": "./mod.ts",
"tasks": {
Expand All @@ -12,6 +10,9 @@
"check": "deno check ."
},
"imports": {
"@mage/app": "jsr:@mage/[email protected]",
"@mage/headers": "jsr:@mage/[email protected]",
"@mage/middlewares": "jsr:@mage/[email protected]",
"@standard-schema/spec": "jsr:@standard-schema/spec@^1.0.0",
"@std/cache": "jsr:@std/cache@^0.1.3",
"@std/expect": "jsr:@std/expect@^1.0.13",
Expand All @@ -20,11 +21,15 @@
"@std/path": "jsr:@std/path@^1.0.8",
"@std/testing": "jsr:@std/testing@^1.0.8",
"preact": "npm:preact@^10.25.4",
"preact-render-to-string": "npm:preact-render-to-string@^6.5.13",
"zod": "npm:zod@^3.24.1"
},
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "preact"
}
},
"workspace": [
"./workspaces/app",
"./workspaces/headers",
"./workspaces/middlewares"
]
}
58 changes: 23 additions & 35 deletions deno.lock

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

4 changes: 2 additions & 2 deletions example-app.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MageApp, StatusCode } from "./mod.ts";
import { useServeFiles } from "./src/middleware/serve-files.ts";
import { MageApp, StatusCode } from "@mage/app";
import { useServeFiles } from "@mage/middlewares";

const app = new MageApp();

Expand Down
19 changes: 0 additions & 19 deletions mod.ts

This file was deleted.

2 changes: 1 addition & 1 deletion test-utils/server.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MageApp } from "../mod.ts";
import { MageApp } from "@mage/app";

const TEST_PORT_FLOOR = 60000;

Expand Down
2 changes: 1 addition & 1 deletion tests/asset.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { afterAll, beforeAll, describe, it } from "@std/testing/bdd";
import { expect } from "@std/expect";
import { StatusCode } from "../mod.ts";
import { StatusCode } from "@mage/app";
import { MageTestServer } from "../test-utils/server.ts";

let server: MageTestServer;
Expand Down
2 changes: 1 addition & 1 deletion tests/body.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { afterAll, beforeAll, describe, it } from "@std/testing/bdd";
import { expect } from "@std/expect";
import { StatusCode } from "../mod.ts";
import { StatusCode } from "@mage/app";
import { MageTestServer } from "../test-utils/server.ts";

let server: MageTestServer;
Expand Down
2 changes: 1 addition & 1 deletion tests/cookies.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { afterAll, beforeAll, describe, it } from "@std/testing/bdd";
import { expect } from "@std/expect";
import { MageTestServer } from "../test-utils/server.ts";
import { StatusCode } from "../src/http.ts";
import { StatusCode } from "@mage/app";

let server: MageTestServer;

Expand Down
2 changes: 1 addition & 1 deletion tests/headers.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { afterAll, beforeAll, describe, it } from "@std/testing/bdd";
import { expect } from "@std/expect";
import { StatusCode } from "../mod.ts";
import { StatusCode } from "@mage/app";
import { MageTestServer } from "../test-utils/server.ts";

let server: MageTestServer;
Expand Down
Loading

0 comments on commit 7b00d79

Please sign in to comment.