To resolve dependencies defined by @auth/core
First you need to modify ./import_map.json
and add this scope
{
"imports": {...},
"scopes": {
...
import { | |
type KyselyPlugin, | |
type PluginTransformQueryArgs, | |
type RootOperationNode, | |
type PluginTransformResultArgs, | |
type QueryResult, | |
type UnknownRow, | |
OperationNodeTransformer, | |
TableNode, | |
} from "kysely"; |
// deno-lint-ignore-file ban-ts-comment | |
import { Cookie, getCookies, setCookie } from "https://deno.land/std/http/mod.ts"; | |
type Primitive = string | boolean | number | bigint | null; | |
type Primitives = Primitive | Record<string, Primitive> | Primitive[]; | |
type PrimitivesRecord = { [x: string]: Primitives }; | |
// deno-lint-ignore no-explicit-any | |
type TAny = any; | |
type BaseSession< |
// deno-lint-ignore-files | |
import { Context } from "hono/mod.ts"; | |
import { Jwt } from "hono/utils/jwt/index.ts"; | |
import { AlgorithmTypes } from "hono/utils/jwt/types.ts"; | |
import { CookieOptions } from "hono/utils/cookie.ts"; | |
import ms from "https://esm.sh/ms@2.1.3"; | |
type Primitive = string | boolean | number | bigint | null; | |
type Primitives = Primitive | Record<string, Primitive> | Primitive[]; | |
type PrimitivesRecord = Record<string, Primitives>; |
import { | |
AnyProcedure, | |
AnyRouter, | |
inferRouterContext, | |
ProcedureArgs, | |
ProcedureType, | |
procedureTypes, | |
TRPCError, | |
} from "@trpc/server"; | |
import { createRecursiveProxy } from "@trpc/server/shared"; |
import "https://deno.land/std@0.170.0/dotenv/load.ts"; | |
import { parse } from "https://deno.land/std@0.170.0/flags/mod.ts"; | |
import { serve, Status } from "https://deno.land/std@0.170.0/http/mod.ts"; | |
import { Pool, PoolClient } from "https://deno.land/x/postgres@v0.17.0/mod.ts"; | |
const args = parse(Deno.args, { | |
string: ["dsn", "port", "key"], | |
alias: { "d": "dsn", "p": "port", "k": "key" }, | |
default: { | |
dsn: Deno.env.get("PG_DSN"), |
import { hash } from "https://deno.land/x/bcrypt@v0.4.1/mod.ts"; | |
import { Kysely } from "https://esm.sh/kysely@0.22.0"; | |
export async function seed(db: Kysely<unknown>) { | |
const userAdmin = await db.selectFrom("users" as never).where( | |
"email", | |
"=", | |
"admin@example.net" as never, | |
).executeTakeFirst(); | |
if (!userAdmin) { |
interface ICtx { | |
readonly req: Request; | |
readonly params: Record<string, any>; | |
readonly env: Record<string, any>; | |
readonly executionContext: Record<string, any>; | |
} | |
type TExecResult = { | |
groups: Record<string, string>; | |
}; | |
type THandler = ( |
export type TRouter<Value, Method extends string> = | |
& { | |
find: (method: Method, pathname: string) => TMatchedRoute<Value>; | |
} | |
& { | |
[k in Lowercase<Method>]: ( | |
pathname: string, | |
...values: Value[] | |
) => TRouter<Value, Method>; | |
}; |
// file: react_test.ts
// it just for my note
import React from "https://esm.sh/react@18.2.0";
import ReactDomServer from "https://esm.sh/react-dom@18.2.0/server";
import { Handler, serve } from "https://deno.land/std@0.161.0/http/server.ts";
const Module = {
default: () =>
React.createElement("div", {