Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
7a8703b
wip
magne4000 Jan 20, 2026
43b1cca
feat: wip migration to UD
magne4000 Jan 21, 2026
a4288ae
wip
magne4000 Jan 21, 2026
0d67044
wip
magne4000 Jan 21, 2026
40386df
chore: remove apply from hono and hattip
magne4000 Jan 21, 2026
a82cfa2
wip: express
magne4000 Jan 21, 2026
cf3a0c8
wip
magne4000 Jan 21, 2026
dea3e34
wip
magne4000 Jan 22, 2026
c303bed
chore
magne4000 Jan 22, 2026
1f0604c
chore: use UM helper
magne4000 Jan 22, 2026
b8158e0
chore
magne4000 Jan 22, 2026
76fb654
chore
magne4000 Jan 22, 2026
ec8226e
cleanup
magne4000 Jan 22, 2026
2c47a2c
cleanup
magne4000 Jan 22, 2026
e98afae
chore: broader http methods support by default
magne4000 Jan 22, 2026
61cef6d
wip
magne4000 Jan 23, 2026
87ae536
wip
magne4000 Jan 23, 2026
9f46b37
wip
magne4000 Jan 23, 2026
547d7e4
wip
magne4000 Jan 23, 2026
f3d9baf
wip
magne4000 Jan 23, 2026
0c77d2a
wip
magne4000 Jan 23, 2026
6af8368
fix: replace PORT and HOSTNAME
magne4000 Jan 27, 2026
061480e
tests: fixes
magne4000 Jan 27, 2026
3d3be6c
feat: photon entry as config
magne4000 Jan 27, 2026
92d51d9
tests: fix
magne4000 Jan 27, 2026
1fabcdd
tests: cloudflare
magne4000 Jan 27, 2026
98f6e30
tests: cloudflare
magne4000 Jan 27, 2026
14a320c
tests: fix
magne4000 Jan 28, 2026
dccfae4
feat: put back sirv for nodeHandler
magne4000 Jan 28, 2026
15c2862
test: fix previews
magne4000 Jan 28, 2026
1441af8
wip
magne4000 Jan 28, 2026
cfe264a
feat: multi entry bundles
magne4000 Jan 29, 2026
7794e4b
chore: tests/app are now passing
magne4000 Jan 29, 2026
672f85f
tests: fixing cloudflare and hono examples
magne4000 Jan 29, 2026
dab65d5
tests: netlify
magne4000 Jan 29, 2026
4604c69
tests: vercel
magne4000 Jan 29, 2026
fdac878
chore: bump vpv
magne4000 Jan 29, 2026
19fed42
tests: wip
magne4000 Jan 30, 2026
56ad88e
tests: wip
magne4000 Jan 30, 2026
bd426cb
tests: fix tanstack start example
magne4000 Jan 30, 2026
8ee919a
chore: bump vpv
magne4000 Jan 30, 2026
d67512c
chore: bump
magne4000 Feb 3, 2026
89b8aac
chore: upgrade dependencies
magne4000 Feb 4, 2026
26322b3
chore
magne4000 Feb 4, 2026
0c322d0
feat!: remove dedicated server packages
magne4000 Feb 4, 2026
5a19c7d
test: update examples
magne4000 Feb 4, 2026
ed50787
chore
magne4000 Feb 4, 2026
79c363a
chore: cleanup
magne4000 Feb 4, 2026
eabe2ea
chore: cleanup
magne4000 Feb 4, 2026
f725ea9
chore: cleanup
magne4000 Feb 4, 2026
fad8082
feat: forward dev server options to vite
magne4000 Feb 4, 2026
099fb8f
chore
magne4000 Feb 4, 2026
7ab4384
chore: prefer server.ssrLoadModule
magne4000 Feb 4, 2026
6ffaf81
feat: dev plugin HMR support
magne4000 Feb 4, 2026
046e89e
chore: update UD
magne4000 Feb 11, 2026
b43fea5
fix: use latest version of UD
magne4000 Feb 11, 2026
8ceef32
refactor: use vite-plugin-wrapper
magne4000 Feb 11, 2026
9a59b34
chore: qol
magne4000 Feb 11, 2026
243d34f
test: re-enable hmr tests
magne4000 Feb 11, 2026
489b897
chore: fix types
magne4000 Feb 11, 2026
d9d98d0
chore
magne4000 Feb 11, 2026
d56530c
chore
magne4000 Feb 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
"linter": {
"rules": {
"a11y": "off",
"correctness": {
"useExhaustiveDependencies": "off"
},
"suspicious": {
"noArrayIndexKey": "off"
}
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"react-dom": "^19.2.3",
"typescript": "^5.9.3",
"vike": "^0.4.249",
"vite": "^7.2.4"
"vite": "^7.3.1"
},
"type": "module",
"version": null
Expand Down
14 changes: 7 additions & 7 deletions example/app-cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
"test:types": "tsc --noEmit"
},
"devDependencies": {
"@photonjs/cloudflare": "^0.1.13",
"@photonjs/core": "^0.1.21",
"@photonjs/hono": "^0.1.12",
"@cloudflare/vite-plugin": "^1.24.0",
"@photonjs/runtime": "^0.1.16",
"@universal-deploy/store": "^0.0.8-beta.1",
"e2e": "workspace:",
"playwright": "^1.57.0",
"typescript": "^5.9.3",
"vite": "^7.2.4",
"wrangler": "^4.56.0"
"vite": "^7.3.1",
"wrangler": "^4.64.0"
},
"dependencies": {
"@universal-middleware/core": "^0.4.14",
"@universal-middleware/core": "^0.4.16",
"@universal-middleware/hono": "^0.4.20",
"awesome-framework": "0.0.0",
"hono": "^4.11.1"
"hono": "^4.11.5"
}
}
18 changes: 13 additions & 5 deletions example/app-cloudflare/server.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
import { apply, serve } from "@photonjs/hono";
import { env } from "cloudflare:workers";
import photonEntry from "virtual:photon:entry";
import type { ServerOptions } from "@photonjs/runtime";
import { apply } from "@universal-middleware/hono";
import awesomeMiddlewares from "awesome-framework/middlewares";
import { Hono } from "hono";

function startApp() {
function startApp(): ServerOptions {
const app = new Hono();

// awesomeFramework will automatically be injected by apply
apply(app);
apply(app, [...awesomeMiddlewares, photonEntry.fetch]);

return serve(app);
return {
fetch(request) {
console.log("TEST_VAL", env.TEST_VAL);
return app.fetch(request);
},
};
}

export default startApp();
8 changes: 5 additions & 3 deletions example/app-cloudflare/src/middlewares/bar.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export default function bar() {
return new Response("bar");
}
export default {
fetch() {
return new Response("bar");
},
};
16 changes: 5 additions & 11 deletions example/app-cloudflare/src/middlewares/foo.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import { enhance } from "@universal-middleware/core";

function foo() {
return new Response("foo");
}

export default enhance(foo, {
name: "foo",
path: "/foo",
method: "GET",
});
export default {
fetch() {
return new Response("foo");
},
};
7 changes: 7 additions & 0 deletions example/app-cloudflare/virtual.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
declare module "virtual:photon:entry" {
const mod: {
fetch: (request: Request) => Response | Promise<Response>;
};

export default mod;
}
43 changes: 27 additions & 16 deletions example/app-cloudflare/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,37 @@
/// <reference types="@photonjs/runtime" />
import { cloudflare } from "@photonjs/cloudflare/vite";
import { cloudflare } from "@cloudflare/vite-plugin";
import { photon } from "@photonjs/runtime/vite";
import { addEntry } from "@universal-deploy/store";
import { awesomeFramework } from "awesome-framework/vite";
import { defineConfig } from "vite";

addEntry({
id: "./src/middlewares/foo.ts",
method: "GET",
route: "/foo",
});
addEntry({
id: "./src/middlewares/bar.ts",
method: "GET",
route: "/bar",
});

export default defineConfig({
photon: {
server: "server.ts",
entries: {
// foo entry declares its route with `enhance` directly inside the file
foo: "src/middlewares/foo.ts",
// bar entry route is declared here, and `enhance` is not used
bar: {
id: "src/middlewares/bar.ts",
route: "/bar",
},
},
},
plugins: [
// Will be replaced with a photon.target setting
photon({
entry: "./server.ts",
}),
cloudflare({
viteEnvironment: {
name: "ssr",
},
inspectorPort: false,
}), // not needed when using @photonjs/auto
}),
awesomeFramework(),
],

ssr: {
optimizeDeps: {
include: ["@universal-middleware/core"],
},
},
});
Loading
Loading