Vendored
+1
-1
@@ -14,6 +14,6 @@
|
|||||||
"@preact/signals": "https://esm.sh/*@preact/signals@1.0.3",
|
"@preact/signals": "https://esm.sh/*@preact/signals@1.0.3",
|
||||||
"@preact/signals-core": "https://esm.sh/@preact/signals-core@1.0.1",
|
"@preact/signals-core": "https://esm.sh/@preact/signals-core@1.0.1",
|
||||||
|
|
||||||
"$std/": "https://deno.land/std@0.177.0/"
|
"$std/": "https://deno.land/std@0.150.0/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2021-2023 Luca Casonato
|
Copyright (c) 2021 Luca Casonato
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
+5
-5
@@ -6,10 +6,10 @@ export {
|
|||||||
join,
|
join,
|
||||||
resolve,
|
resolve,
|
||||||
toFileUrl,
|
toFileUrl,
|
||||||
} from "https://deno.land/std@0.177.0/path/mod.ts";
|
} from "https://deno.land/std@0.150.0/path/mod.ts";
|
||||||
export { walk } from "https://deno.land/std@0.177.0/fs/walk.ts";
|
export { walk } from "https://deno.land/std@0.150.0/fs/walk.ts";
|
||||||
export { parse } from "https://deno.land/std@0.177.0/flags/mod.ts";
|
export { parse } from "https://deno.land/std@0.150.0/flags/mod.ts";
|
||||||
export { gte } from "https://deno.land/std@0.177.0/semver/mod.ts";
|
export { gte } from "https://deno.land/std@0.150.0/semver/mod.ts";
|
||||||
|
|
||||||
// ts-morph
|
// ts-morph
|
||||||
export { Node, Project } from "https://deno.land/x/ts_morph@17.0.1/mod.ts";
|
export { Node, Project } from "https://deno.land/x/ts_morph@16.0.0/mod.ts";
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ export function asset(path: string) {
|
|||||||
) {
|
) {
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
// @ts-ignore trust me
|
|
||||||
url.searchParams.set(ASSET_CACHE_BUST_KEY, __FRSH_BUILD_ID);
|
url.searchParams.set(ASSET_CACHE_BUST_KEY, __FRSH_BUILD_ID);
|
||||||
return url.pathname + url.search + url.hash;
|
return url.pathname + url.search + url.hash;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { assertEquals } from "../../tests/deps.ts";
|
import { assertEquals } from "../../tests/deps.ts";
|
||||||
import { asset, assetSrcSet } from "./utils.ts";
|
import { asset, assetSrcSet } from "./utils.ts";
|
||||||
|
|
||||||
// @ts-ignore trust me
|
|
||||||
globalThis.__FRSH_BUILD_ID = "ID123";
|
globalThis.__FRSH_BUILD_ID = "ID123";
|
||||||
|
|
||||||
Deno.test("asset", () => {
|
Deno.test("asset", () => {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { BuildOptions } from "https://deno.land/x/esbuild@v0.17.2/mod.js";
|
import { BuildOptions } from "https://deno.land/x/esbuild@v0.14.51/mod.js";
|
||||||
import { BUILD_ID } from "./constants.ts";
|
import { BUILD_ID } from "./constants.ts";
|
||||||
import { denoPlugin, esbuild, toFileUrl } from "./deps.ts";
|
import { denoPlugin, esbuild, toFileUrl } from "./deps.ts";
|
||||||
import { Island, Plugin } from "./types.ts";
|
import { Island, Plugin } from "./types.ts";
|
||||||
@@ -12,7 +12,7 @@ let esbuildInitialized: boolean | Promise<void> = false;
|
|||||||
async function ensureEsbuildInitialized() {
|
async function ensureEsbuildInitialized() {
|
||||||
if (esbuildInitialized === false) {
|
if (esbuildInitialized === false) {
|
||||||
if (Deno.run === undefined) {
|
if (Deno.run === undefined) {
|
||||||
const wasmURL = new URL("./esbuild_v0.17.2.wasm", import.meta.url).href;
|
const wasmURL = new URL("./esbuild_v0.14.51.wasm", import.meta.url).href;
|
||||||
esbuildInitialized = fetch(wasmURL).then(async (r) => {
|
esbuildInitialized = fetch(wasmURL).then(async (r) => {
|
||||||
const resp = new Response(r.body, {
|
const resp = new Response(r.body, {
|
||||||
headers: { "Content-Type": "application/wasm" },
|
headers: { "Content-Type": "application/wasm" },
|
||||||
|
|||||||
@@ -374,10 +374,8 @@ export class ServerContext {
|
|||||||
*/
|
*/
|
||||||
#handlers(): [
|
#handlers(): [
|
||||||
rutt.Routes<RouterState>,
|
rutt.Routes<RouterState>,
|
||||||
{
|
rutt.Handler<RouterState>,
|
||||||
otherHandler: rutt.Handler<RouterState>;
|
rutt.ErrorHandler<RouterState>,
|
||||||
errorHandler: rutt.ErrorHandler<RouterState>;
|
|
||||||
},
|
|
||||||
] {
|
] {
|
||||||
const routes: rutt.Routes<RouterState> = {};
|
const routes: rutt.Routes<RouterState> = {};
|
||||||
|
|
||||||
@@ -524,7 +522,7 @@ export class ServerContext {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const otherHandler: rutt.Handler<RouterState> = (
|
const unknownHandler: rutt.Handler<RouterState> = (
|
||||||
req,
|
req,
|
||||||
ctx,
|
ctx,
|
||||||
) =>
|
) =>
|
||||||
@@ -560,7 +558,7 @@ export class ServerContext {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
return [routes, { otherHandler, errorHandler }];
|
return [routes, unknownHandler, errorHandler];
|
||||||
}
|
}
|
||||||
|
|
||||||
#staticFileHandler(
|
#staticFileHandler(
|
||||||
|
|||||||
+11
-12
@@ -3,30 +3,29 @@ export {
|
|||||||
extname,
|
extname,
|
||||||
fromFileUrl,
|
fromFileUrl,
|
||||||
toFileUrl,
|
toFileUrl,
|
||||||
} from "https://deno.land/std@0.177.0/path/mod.ts";
|
} from "https://deno.land/std@0.150.0/path/mod.ts";
|
||||||
export { walk } from "https://deno.land/std@0.177.0/fs/walk.ts";
|
export { walk } from "https://deno.land/std@0.150.0/fs/walk.ts";
|
||||||
export { serve } from "https://deno.land/std@0.177.0/http/server.ts";
|
export { serve } from "https://deno.land/std@0.150.0/http/server.ts";
|
||||||
export type {
|
export type {
|
||||||
ConnInfo,
|
ConnInfo,
|
||||||
Handler as RequestHandler,
|
Handler as RequestHandler,
|
||||||
ServeInit,
|
ServeInit,
|
||||||
} from "https://deno.land/std@0.177.0/http/server.ts";
|
} from "https://deno.land/std@0.150.0/http/server.ts";
|
||||||
export { Status } from "https://deno.land/std@0.177.0/http/http_status.ts";
|
export { Status } from "https://deno.land/std@0.150.0/http/http_status.ts";
|
||||||
export {
|
export {
|
||||||
typeByExtension,
|
typeByExtension,
|
||||||
} from "https://deno.land/std@0.177.0/media_types/mod.ts";
|
} from "https://deno.land/std@0.150.0/media_types/mod.ts";
|
||||||
|
|
||||||
// -- rutt --
|
// -- rutt --
|
||||||
export * as rutt from "https://deno.land/x/rutt@0.1.0/mod.ts";
|
export * as rutt from "https://deno.land/x/rutt@0.0.14/mod.ts";
|
||||||
|
|
||||||
// -- esbuild --
|
// -- esbuild --
|
||||||
// @deno-types="https://deno.land/x/esbuild@v0.17.2/mod.d.ts"
|
// @deno-types="https://deno.land/x/esbuild@v0.14.51/mod.d.ts"
|
||||||
import * as esbuildWasm from "https://deno.land/x/esbuild@v0.17.2/wasm.js";
|
import * as esbuildWasm from "https://deno.land/x/esbuild@v0.14.51/wasm.js";
|
||||||
import * as esbuildNative from "https://deno.land/x/esbuild@v0.17.2/mod.js";
|
import * as esbuildNative from "https://deno.land/x/esbuild@v0.14.51/mod.js";
|
||||||
// @ts-ignore trust me
|
// @ts-ignore trust me
|
||||||
const esbuild: typeof esbuildWasm = Deno.run === undefined
|
const esbuild: typeof esbuildWasm = Deno.run === undefined
|
||||||
? esbuildWasm
|
? esbuildWasm
|
||||||
: esbuildNative;
|
: esbuildNative;
|
||||||
export { esbuild, esbuildWasm as esbuildTypes };
|
export { esbuild, esbuildWasm as esbuildTypes };
|
||||||
// TODO(lino-levan): replace with tagged version
|
export { denoPlugin } from "https://deno.land/x/esbuild_deno_loader@0.5.2/mod.ts";
|
||||||
export { denoPlugin } from "https://raw.githubusercontent.com/lucacasonato/esbuild_deno_loader/b4b3ffb43e9380865ad12ab4d1c64c0ae0ca96cd/mod.ts";
|
|
||||||
|
|||||||
Binary file not shown.
+1
-1
@@ -87,7 +87,7 @@ export type Handler<T = any, State = Record<string, unknown>> = (
|
|||||||
|
|
||||||
// deno-lint-ignore no-explicit-any
|
// deno-lint-ignore no-explicit-any
|
||||||
export type Handlers<T = any, State = Record<string, unknown>> = {
|
export type Handlers<T = any, State = Record<string, unknown>> = {
|
||||||
[K in typeof rutt.knownMethods[number]]?: Handler<T, State>;
|
[K in typeof rutt.METHODS[number]]?: Handler<T, State>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface RouteModule {
|
export interface RouteModule {
|
||||||
|
|||||||
+4
-4
@@ -8,10 +8,10 @@ export {
|
|||||||
assert,
|
assert,
|
||||||
assertEquals,
|
assertEquals,
|
||||||
assertStringIncludes,
|
assertStringIncludes,
|
||||||
} from "https://deno.land/std@0.177.0/testing/asserts.ts";
|
} from "https://deno.land/std@0.150.0/testing/asserts.ts";
|
||||||
export {
|
export {
|
||||||
TextLineStream,
|
TextLineStream,
|
||||||
} from "https://deno.land/std@0.177.0/streams/text_line_stream.ts";
|
} from "https://deno.land/std@0.150.0/streams/delimiter.ts";
|
||||||
export { delay } from "https://deno.land/std@0.177.0/async/delay.ts";
|
export { delay } from "https://deno.land/std@0.150.0/async/delay.ts";
|
||||||
export { retry } from "https://deno.land/std@0.177.0/async/retry.ts";
|
export { retry } from "https://deno.land/std@0.170.0/async/retry.ts";
|
||||||
export { default as puppeteer } from "https://deno.land/x/puppeteer@16.2.0/mod.ts";
|
export { default as puppeteer } from "https://deno.land/x/puppeteer@16.2.0/mod.ts";
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@
|
|||||||
"@preact/signals": "https://esm.sh/*@preact/signals@1.0.3",
|
"@preact/signals": "https://esm.sh/*@preact/signals@1.0.3",
|
||||||
"@preact/signals-core": "https://esm.sh/@preact/signals-core@1.0.1",
|
"@preact/signals-core": "https://esm.sh/@preact/signals-core@1.0.1",
|
||||||
|
|
||||||
"$std/": "https://deno.land/std@0.177.0/",
|
"$std/": "https://deno.land/std@0.150.0/",
|
||||||
"$ga4": "https://raw.githubusercontent.com/denoland/ga4/main/mod.ts"
|
"$ga4": "https://raw.githubusercontent.com/denoland/ga4/main/mod.ts"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
import { assertEquals } from "$std/testing/asserts.ts";
|
import { assertEquals } from "$std/testing/asserts.ts";
|
||||||
import { TextLineStream } from "$std/streams/text_line_stream.ts";
|
import { TextLineStream } from "$std/streams/delimiter.ts";
|
||||||
|
|
||||||
Deno.test("CORS should not set on GET /fresh-badge.svg", {
|
Deno.test("CORS should not set on GET /fresh-badge.svg", {
|
||||||
sanitizeResources: false,
|
sanitizeResources: false,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
export * as gfm from "https://deno.land/x/gfm@0.2.0/mod.ts";
|
export * as gfm from "https://deno.land/x/gfm@0.1.23/mod.ts";
|
||||||
import "https://esm.sh/prismjs@1.29.0/components/prism-jsx.js?no-check";
|
import "https://esm.sh/prismjs@1.27.0/components/prism-jsx.js?no-check";
|
||||||
import "https://esm.sh/prismjs@1.29.0/components/prism-typescript.js?no-check";
|
import "https://esm.sh/prismjs@1.27.0/components/prism-typescript.js?no-check";
|
||||||
import "https://esm.sh/prismjs@1.29.0/components/prism-tsx.js?no-check";
|
import "https://esm.sh/prismjs@1.27.0/components/prism-tsx.js?no-check";
|
||||||
import "https://esm.sh/prismjs@1.29.0/components/prism-diff.js?no-check";
|
import "https://esm.sh/prismjs@1.27.0/components/prism-diff.js?no-check";
|
||||||
|
|
||||||
export { extract as frontMatter } from "$std/encoding/front_matter/yaml.ts";
|
export { extract as frontMatter } from "$std/encoding/front_matter.ts";
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import puppeteer from "https://deno.land/x/puppeteer@16.2.0/mod.ts";
|
import puppeteer from "https://deno.land/x/puppeteer@16.2.0/mod.ts";
|
||||||
import { Image } from "https://deno.land/x/imagescript@1.2.15/mod.ts";
|
import { Image } from "https://deno.land/x/imagescript@v1.2.14/mod.ts";
|
||||||
import { join } from "https://deno.land/std@0.177.0/path/mod.ts";
|
import { join } from "https://deno.land/std@0.137.0/path/mod.ts";
|
||||||
|
|
||||||
const url = Deno.args[0];
|
const url = Deno.args[0];
|
||||||
const id = Deno.args[1];
|
const id = Deno.args[1];
|
||||||
|
|||||||
Reference in New Issue
Block a user