-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
experimental node support (not working yet)
update deps
- Loading branch information
Showing
19 changed files
with
1,669 additions
and
1,566 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { getEnv } from "../lib/env.ts"; | ||
import type { RequestProps } from "../lib/types.ts"; | ||
|
||
export function DevScript( | ||
{ req, src, envVar }: RequestProps & { src: string; envVar: string }, | ||
) { | ||
const enable = getEnv(envVar, req) === "true"; | ||
|
||
return enable ? <script src={src} type="module" /> : null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { withFallback } from "@http/route/with-fallback"; | ||
import { intercept } from "@http/interceptor/intercept"; | ||
import { logging } from "@http/interceptor/logger"; | ||
import type { Awaitable } from "@http/route/types"; | ||
import type { Interceptors } from "@http/interceptor/types"; | ||
|
||
export interface ServeOptions<E> { | ||
fetch(req: Request, env: E): Awaitable<Response>; | ||
} | ||
|
||
/** | ||
* Convenience function to generate Hono serve init parameter for localhost dev mode. | ||
*/ | ||
// deno-lint-ignore require-await | ||
export default async function initHonoNodeServer<E = unknown>( | ||
handler: ( | ||
req: Request, | ||
env: E, | ||
) => Awaitable<Response | null>, | ||
...interceptors: Interceptors<unknown[], Response>[] | ||
): Promise<ServeOptions<E>> { | ||
return { | ||
fetch: intercept(withFallback(handler), logging(), ...interceptors), | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env -S node --experimental-default-type=module --experimental-strip-types | ||
|
||
// NOT CURRENTLY WORKING: transpilation of .tsx is required | ||
|
||
import "./polyfill/bun.ts"; | ||
|
||
import handler from "./handler.ts"; | ||
import init from "./init_hono_node_server.ts"; | ||
import { serve } from "@hono/node-server"; | ||
import { setStore } from "@jollytoad/store"; | ||
|
||
setStore(import("@jollytoad/store-node-fs")); | ||
|
||
const server = serve(await init(handler)); | ||
const address = server.address(); | ||
|
||
console.log(`Listening on ${address}`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
(() => { | ||
// ../../Library/Caches/deno/deno_esbuild/[email protected]/node_modules/urlpattern-polyfill/dist/urlpattern.js | ||
// node_modules/.deno/[email protected]/node_modules/urlpattern-polyfill/dist/urlpattern.js | ||
var R = class { | ||
type = 3; | ||
name = ""; | ||
|
@@ -730,7 +730,7 @@ | |
} | ||
}; | ||
|
||
// ../../Library/Caches/deno/deno_esbuild/[email protected]/node_modules/urlpattern-polyfill/index.js | ||
// node_modules/.deno/[email protected]/node_modules/urlpattern-polyfill/index.js | ||
if (!globalThis.URLPattern) { | ||
globalThis.URLPattern = me; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
.ex-swap { | ||
font-size: small; | ||
font-weight: normal; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
.quiz { | ||
border-style: solid; | ||
border-width: 2px 1ex 1ex 2px; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
.todo-item * { | ||
display: inline; | ||
margin: 2px 4px; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
b33af2a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failed to deploy: