fix: chatgpt prompts
This commit is contained in:
parent
0adce93c81
commit
9fc57d45b5
24
deno.json
24
deno.json
@ -10,25 +10,27 @@
|
||||
},
|
||||
"lint": { "rules": { "tags": ["fresh", "recommended"] } },
|
||||
"imports": {
|
||||
"typesense": "https://raw.githubusercontent.com/bradenmacdonald/typesense-deno/main/mod.ts",
|
||||
"yaml": "https://deno.land/std@0.197.0/yaml/mod.ts",
|
||||
"@lib": "./lib",
|
||||
"@lib/": "./lib/",
|
||||
"$fresh/": "https://deno.land/x/fresh@1.6.8/",
|
||||
"@components": "./components",
|
||||
"@components/": "./components/",
|
||||
"@islands": "./islands",
|
||||
"@islands/": "./islands/",
|
||||
"zod": "https://deno.land/x/zod@v3.21.4/mod.ts",
|
||||
"$fresh/": "https://deno.land/x/fresh@1.6.8/",
|
||||
"preact": "https://esm.sh/preact@10.19.6",
|
||||
"preact/": "https://esm.sh/preact@10.19.6/",
|
||||
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.2.2",
|
||||
"@lib": "./lib",
|
||||
"@lib/": "./lib/",
|
||||
"@preact/signals": "https://esm.sh/*@preact/signals@1.2.2",
|
||||
"@preact/signals-core": "https://esm.sh/*@preact/signals-core@1.5.1",
|
||||
"$std/": "https://deno.land/std@0.193.0/",
|
||||
"@std/dotenv": "jsr:@std/dotenv@^0.224.0",
|
||||
"@std/http": "jsr:@std/http@^0.224.5",
|
||||
"@std/yaml": "jsr:@std/yaml@^0.224.1",
|
||||
"preact": "https://esm.sh/preact@10.19.6",
|
||||
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.2.2",
|
||||
"preact/": "https://esm.sh/preact@10.19.6/",
|
||||
"tailwindcss": "npm:tailwindcss@3.3.5",
|
||||
"tailwindcss/": "npm:/tailwindcss@3.3.5/",
|
||||
"tailwindcss/plugin": "npm:/tailwindcss@3.3.5/plugin.js"
|
||||
"tailwindcss/plugin": "npm:/tailwindcss@3.3.5/plugin.js",
|
||||
"typesense": "https://raw.githubusercontent.com/bradenmacdonald/typesense-deno/main/mod.ts",
|
||||
"yaml": "https://deno.land/std@0.197.0/yaml/mod.ts",
|
||||
"zod": "https://deno.land/x/zod@v3.21.4/mod.ts"
|
||||
},
|
||||
"compilerOptions": { "jsx": "react-jsx", "jsxImportSource": "preact" },
|
||||
"exclude": ["**/_fresh/*"]
|
||||
|
@ -1,4 +1,5 @@
|
||||
import "https://deno.land/std/dotenv/load.ts";
|
||||
import "@std/dotenv/load";
|
||||
|
||||
export const SILVERBULLET_SERVER = Deno.env.get("SILVERBULLET_SERVER");
|
||||
export const REDIS_HOST = Deno.env.get("REDIS_HOST");
|
||||
export const REDIS_PASS = Deno.env.get("REDIS_PASS");
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { parseDocument } from "@lib/documents.ts";
|
||||
import { parse } from "yaml";
|
||||
import { parse, stringify } from "@std/yaml";
|
||||
import { createCrud } from "@lib/crud.ts";
|
||||
import { stringify } from "$std/yaml/stringify.ts";
|
||||
import { extractHashTags, formatDate } from "@lib/string.ts";
|
||||
import { fixRenderedMarkdown } from "@lib/helpers.ts";
|
||||
|
||||
@ -29,14 +28,13 @@ function renderArticle(article: Article) {
|
||||
meta.date = formatDate(meta.date);
|
||||
}
|
||||
|
||||
return fixRenderedMarkdown(`${
|
||||
meta
|
||||
return fixRenderedMarkdown(`${meta
|
||||
? `---
|
||||
${stringify(meta)}
|
||||
---`
|
||||
: `---
|
||||
---`
|
||||
}
|
||||
}
|
||||
# ${article.name}
|
||||
${article.tags.map((t) => `#${t}`).join(" ")}
|
||||
${article.content}
|
||||
|
3
main.ts
3
main.ts
@ -4,11 +4,10 @@
|
||||
/// <reference lib="dom.asynciterable" />
|
||||
/// <reference lib="deno.ns" />
|
||||
|
||||
import "$std/dotenv/load.ts";
|
||||
import "@std/dotenv/load";
|
||||
|
||||
import { start } from "$fresh/server.ts";
|
||||
import manifest from "./fresh.gen.ts";
|
||||
import config from "./fresh.config.ts";
|
||||
|
||||
await start(manifest, config);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
//routes/middleware-error-handler/_middleware.ts
|
||||
import { MiddlewareHandlerContext } from "$fresh/server.ts";
|
||||
import { DomainError } from "@lib/errors.ts";
|
||||
import { getCookies } from "https://deno.land/std@0.197.0/http/cookie.ts";
|
||||
import { getCookies } from "@std/http/cookie";
|
||||
import { verify } from "https://deno.land/x/djwt@v2.2/mod.ts";
|
||||
import * as cache from "@lib/cache/performance.ts";
|
||||
import { JWT_SECRET } from "@lib/env.ts";
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Handlers } from "$fresh/server.ts";
|
||||
import { create, getNumericDate } from "https://deno.land/x/djwt@v2.2/mod.ts";
|
||||
import { oauth2Client } from "@lib/auth.ts";
|
||||
import { getCookies, setCookie } from "$std/http/cookie.ts";
|
||||
import { getCookies, setCookie } from "@std/http/cookie";
|
||||
import { codeChallengeMap } from "./login.ts";
|
||||
import { GITEA_SERVER, JWT_SECRET, SESSION_DURATION } from "@lib/env.ts";
|
||||
import { userDB } from "@lib/db.ts";
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Handlers } from "$fresh/server.ts";
|
||||
import { oauth2Client } from "@lib/auth.ts";
|
||||
import { setCookie } from "$std/http/cookie.ts";
|
||||
import { setCookie } from "@std/http/cookie";
|
||||
|
||||
export const codeChallengeMap = new Map<
|
||||
string,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { deleteCookie } from "https://deno.land/std@0.197.0/http/cookie.ts";
|
||||
import { deleteCookie } from "@std/http/cookie";
|
||||
import { Handlers } from "$fresh/server.ts";
|
||||
|
||||
export const handler: Handlers = {
|
||||
|
@ -6,7 +6,7 @@ import {
|
||||
MagickGeometry,
|
||||
} from "https://deno.land/x/imagemagick_deno@0.0.25/mod.ts";
|
||||
|
||||
import { parseMediaType } from "https://deno.land/std@0.175.0/media_types/parse_media_type.ts";
|
||||
import { parseMediaType } from "https://deno.land/std@0.224.0/media_types/parse_media_type.ts";
|
||||
import * as cache from "@lib/cache/image.ts";
|
||||
import { SILVERBULLET_SERVER } from "@lib/env.ts";
|
||||
import { ConcurrentPromiseQueue, PromiseQueue } from "@lib/promise.ts";
|
||||
|
@ -1,20 +1,15 @@
|
||||
import { HandlerContext, Handlers } from "$fresh/server.ts";
|
||||
import {
|
||||
createDocument,
|
||||
getDocument,
|
||||
transformDocument,
|
||||
} from "@lib/documents.ts";
|
||||
import { createDocument } from "@lib/documents.ts";
|
||||
import { fileExtension } from "https://deno.land/x/file_extension@v2.1.0/mod.ts";
|
||||
import * as tmdb from "@lib/tmdb.ts";
|
||||
import { parse, stringify } from "https://deno.land/std@0.194.0/yaml/mod.ts";
|
||||
import { formatDate, safeFileName } from "@lib/string.ts";
|
||||
import { safeFileName } from "@lib/string.ts";
|
||||
import { json } from "@lib/helpers.ts";
|
||||
import {
|
||||
AccessDeniedError,
|
||||
BadRequestError,
|
||||
NotFoundError,
|
||||
} from "@lib/errors.ts";
|
||||
import { createSeries, getSeries, Series } from "@lib/resource/series.ts";
|
||||
import { createSeries, getSeries } from "@lib/resource/series.ts";
|
||||
import * as cache from "@lib/cache/cache.ts";
|
||||
|
||||
const isString = (input: string | undefined): input is string => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user