From 4b93ec7fcc8c534ceac0b1adc164abb972e25fe5 Mon Sep 17 00:00:00 2001 From: Miguel Romero Karam Date: Fri, 24 May 2024 14:12:41 +0200 Subject: [PATCH] 0.5.47 --- deno.jsonc | 2 +- lib/cli/dev/cli.ts | 4 ++-- lib/cli/src/version.ts | 2 +- lib/components/blocks/netzo-toolbar.tsx | 2 +- lib/components/blocks/plot.tsx | 2 +- lib/components/button-dark-mode.tsx | 2 +- lib/components/button.tsx | 2 +- lib/components/client-only.tsx | 2 +- lib/components/input.tsx | 2 +- lib/components/textarea.tsx | 2 +- lib/components/use-dark-mode.ts | 2 +- lib/database/mod.ts | 2 +- lib/mod.ts | 2 +- lib/plugins/auth/middlewares/mod.ts | 2 +- lib/plugins/auth/plugin.ts | 16 +++++++-------- lib/plugins/auth/routes/auth.tsx | 2 +- lib/plugins/auth/routes/mod.ts | 8 ++++---- lib/plugins/auth/utils/providers/mod.ts | 20 +++++++++---------- lib/plugins/cron/plugin.ts | 2 +- lib/plugins/database/plugin.ts | 12 +++++++++-- lib/plugins/datastore/plugin.ts | 4 ++-- lib/plugins/environments/plugin.ts | 2 +- lib/plugins/loader/plugin.ts | 2 +- lib/plugins/mdx/plugin.ts | 2 +- lib/plugins/mdx/utils.ts | 2 +- lib/plugins/middleware.ts | 2 +- lib/plugins/storage/plugin.ts | 2 +- lib/plugins/unocss/plugin.ts | 6 +++--- tests/fixture-plugins-mdx/deno.json | 4 ++-- tests/fixture-plugins-mdx/dev.ts | 2 +- tests/fixture-plugins-mdx/fresh.config.ts | 2 +- tests/fixture-plugins-mdx/fresh.gen.ts | 4 ++-- tests/fixture-plugins-mdx/islands/Counter.tsx | 2 +- tests/fixture-plugins-mdx/main.ts | 4 ++-- tests/fixture-plugins-mdx/routes/_app.tsx | 2 +- tests/fixture-plugins-unocss/deno.json | 2 +- tests/fixture-plugins-unocss/dev.ts | 2 +- tests/fixture-plugins-unocss/fresh.config.ts | 2 +- tests/fixture-plugins-unocss/fresh.gen.ts | 4 ++-- tests/fixture-plugins-unocss/main.ts | 2 +- 40 files changed, 76 insertions(+), 68 deletions(-) diff --git a/deno.jsonc b/deno.jsonc index 6b44b3e5..6dae0f6c 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -46,7 +46,7 @@ "imports": { "@/": "./", "netzo/": "./lib/", - "$fresh/": "https://deno.land/x/fresh@1.6.8/", + "fresh/": "https://deno.land/x/fresh@1.6.8/", "preact": "https://esm.sh/preact@10.20.0", "preact/": "https://esm.sh/preact@10.20.0/", "@preact/signals": "https://esm.sh/*@preact/signals@1.2.3", diff --git a/lib/cli/dev/cli.ts b/lib/cli/dev/cli.ts index 3c695e05..2b1f1566 100644 --- a/lib/cli/dev/cli.ts +++ b/lib/cli/dev/cli.ts @@ -1,6 +1,6 @@ // adapted from https://github.com/denoland/fresh/blob/main/src/dev/cli.ts -import { type FreshConfig } from "$fresh/server.ts"; -import { manifest } from "$fresh/src/dev/mod.ts"; +import { type FreshConfig } from "fresh/server.ts"; +import { manifest } from "fresh/src/dev/mod.ts"; import { join, toFileUrl } from "../../deps/std/path/mod.ts"; const [cmd, configURL] = Deno.args; diff --git a/lib/cli/src/version.ts b/lib/cli/src/version.ts index f13cb2b6..a3bfe295 100644 --- a/lib/cli/src/version.ts +++ b/lib/cli/src/version.ts @@ -1,5 +1,5 @@ // latest version of netzo/cli (see https://github.com/netzo/netzo/releases) -export const VERSION = "0.5.46"; +export const VERSION = "0.5.47"; // minimum version of Deno required to run this CLI // (see https://github.com/denoland/deployctl/blob/main/src/version.ts) diff --git a/lib/components/blocks/netzo-toolbar.tsx b/lib/components/blocks/netzo-toolbar.tsx index 9109cac8..089f19bb 100644 --- a/lib/components/blocks/netzo-toolbar.tsx +++ b/lib/components/blocks/netzo-toolbar.tsx @@ -1,8 +1,8 @@ // @deno-types="npm:@types/react@18.2.60" import * as React from "react"; -import { IS_BROWSER } from "$fresh/runtime.ts"; import { useSignal } from "@preact/signals"; +import { IS_BROWSER } from "fresh/runtime.ts"; import { AuthUser } from "../../plugins/auth/utils/db.ts"; import { ButtonDarkMode } from "../button-dark-mode.tsx"; import { Button } from "../button.tsx"; diff --git a/lib/components/blocks/plot.tsx b/lib/components/blocks/plot.tsx index ac213121..c6f35078 100644 --- a/lib/components/blocks/plot.tsx +++ b/lib/components/blocks/plot.tsx @@ -1,4 +1,4 @@ -import { IS_BROWSER } from "$fresh/runtime.ts"; +import { IS_BROWSER } from "fresh/runtime.ts"; import { createElement as h } from "preact"; import { useEffect, useRef } from "preact/compat"; import * as Plot from "../../deps/@observablehq/plot.ts"; diff --git a/lib/components/button-dark-mode.tsx b/lib/components/button-dark-mode.tsx index 61d70e08..e61c16b5 100644 --- a/lib/components/button-dark-mode.tsx +++ b/lib/components/button-dark-mode.tsx @@ -1,7 +1,7 @@ // @deno-types="npm:@types/react@18.2.60" import * as React from "react"; -import { IS_BROWSER } from "$fresh/runtime.ts"; +import { IS_BROWSER } from "fresh/runtime.ts"; import { Button, type ButtonProps } from "./button.tsx"; import { useDarkMode } from "./use-dark-mode.ts"; import { cn } from "./utils.ts"; diff --git a/lib/components/button.tsx b/lib/components/button.tsx index e48e03db..e3033f0e 100644 --- a/lib/components/button.tsx +++ b/lib/components/button.tsx @@ -1,7 +1,7 @@ // @deno-types="npm:@types/react@18.2.60" import * as React from "react"; -import { IS_BROWSER } from "$fresh/runtime.ts"; +import { IS_BROWSER } from "fresh/runtime.ts"; import { Slot } from "../deps/@radix-ui/react-slot.ts"; import { cva, type VariantProps } from "../deps/class-variance-authority.ts"; import { cn } from "./utils.ts"; diff --git a/lib/components/client-only.tsx b/lib/components/client-only.tsx index 6acbcce8..860d6376 100644 --- a/lib/components/client-only.tsx +++ b/lib/components/client-only.tsx @@ -1,4 +1,4 @@ -import { IS_BROWSER } from "$fresh/runtime.ts"; +import { IS_BROWSER } from "fresh/runtime.ts"; import type { ComponentChildren } from "preact"; export const ClientOnly = ({ children }: { children: ComponentChildren }) => { diff --git a/lib/components/input.tsx b/lib/components/input.tsx index dd31a542..6585a456 100644 --- a/lib/components/input.tsx +++ b/lib/components/input.tsx @@ -1,7 +1,7 @@ // @deno-types="npm:@types/react@18.2.60" import * as React from "react"; -import { IS_BROWSER } from "$fresh/runtime.ts"; +import { IS_BROWSER } from "fresh/runtime.ts"; import { cn } from "./utils.ts"; // deno-lint-ignore no-empty-interface diff --git a/lib/components/textarea.tsx b/lib/components/textarea.tsx index 90f8cdac..a6449691 100644 --- a/lib/components/textarea.tsx +++ b/lib/components/textarea.tsx @@ -1,7 +1,7 @@ // @deno-types="npm:@types/react@18.2.60" import * as React from "react"; -import { IS_BROWSER } from "$fresh/runtime.ts"; +import { IS_BROWSER } from "fresh/runtime.ts"; import { cn } from "./utils.ts"; // deno-lint-ignore no-empty-interface diff --git a/lib/components/use-dark-mode.ts b/lib/components/use-dark-mode.ts index 7f0d6bc6..389784c3 100644 --- a/lib/components/use-dark-mode.ts +++ b/lib/components/use-dark-mode.ts @@ -1,5 +1,5 @@ -import { IS_BROWSER } from "$fresh/runtime.ts"; import { effect, signal } from "@preact/signals"; +import { IS_BROWSER } from "fresh/runtime.ts"; // NOTE: initializes to false instead of getDarkMode() as default export const darkMode = signal(false); diff --git a/lib/database/mod.ts b/lib/database/mod.ts index b7ff4743..baf2bfe3 100644 --- a/lib/database/mod.ts +++ b/lib/database/mod.ts @@ -1,6 +1,6 @@ // IMPORTANT: requires importing createClient from /web and not from root nor /node // see https://github.com/tursodatabase/libsql-client-ts/issues/138#issuecomment-1921954374 -import { IS_BROWSER } from "$fresh/runtime.ts"; +import { IS_BROWSER } from "fresh/runtime.ts"; import { createClient } from "npm:/@libsql/client@0.6.0"; import { drizzle } from "npm:/drizzle-orm@0.30.10/libsql"; import { drizzle as drizzleSqliteProxy } from "npm:/drizzle-orm@0.30.10/sqlite-proxy"; diff --git a/lib/mod.ts b/lib/mod.ts index 05fe99c6..cf3d4ca7 100644 --- a/lib/mod.ts +++ b/lib/mod.ts @@ -1,4 +1,4 @@ -import { type FreshConfig } from "$fresh/server.ts"; +import { type FreshConfig } from "fresh/server.ts"; import type { LoaderState } from "netzo/plugins/loader/plugin.ts"; import type { MdxState } from "netzo/plugins/mdx/plugin.ts"; import type { AuthState } from "./plugins/auth/plugin.ts"; diff --git a/lib/plugins/auth/middlewares/mod.ts b/lib/plugins/auth/middlewares/mod.ts index 5dd4efc7..c2370b7f 100644 --- a/lib/plugins/auth/middlewares/mod.ts +++ b/lib/plugins/auth/middlewares/mod.ts @@ -1,4 +1,4 @@ -import type { FreshContext } from "$fresh/server.ts"; +import type { FreshContext } from "fresh/server.ts"; import { getSessionId } from "../../../deps/deno_kv_oauth/mod.ts"; import type { NetzoState } from "../../../mod.ts"; import { AuthConfig, AuthState } from "../plugin.ts"; diff --git a/lib/plugins/auth/plugin.ts b/lib/plugins/auth/plugin.ts index a5d4687d..5093aae0 100644 --- a/lib/plugins/auth/plugin.ts +++ b/lib/plugins/auth/plugin.ts @@ -1,14 +1,14 @@ -import type { FreshContext, Plugin, PluginRoute } from "$fresh/server.ts"; +import type { FreshContext, Plugin, PluginRoute } from "fresh/server.ts"; import type { OAuth2ClientConfig } from "../../deps/oauth2_client/src/oauth2_client.ts"; import type { NetzoState } from "../../mod.ts"; import { - assertUserIsMemberOfWorkspaceOfApiKeyIfProviderIsNetzo, - createAssertUserIsAuthorized, - ensureSignedIn, - NetzoStateWithAuth, - setAuthState, - setRequestState, - setSessionState, + NetzoStateWithAuth, + assertUserIsMemberOfWorkspaceOfApiKeyIfProviderIsNetzo, + createAssertUserIsAuthorized, + ensureSignedIn, + setAuthState, + setRequestState, + setSessionState, } from "./middlewares/mod.ts"; import createAuth from "./routes/auth.tsx"; import { getRoutesByProvider } from "./routes/mod.ts"; diff --git a/lib/plugins/auth/routes/auth.tsx b/lib/plugins/auth/routes/auth.tsx index b35888a9..88b6e69b 100644 --- a/lib/plugins/auth/routes/auth.tsx +++ b/lib/plugins/auth/routes/auth.tsx @@ -1,4 +1,4 @@ -import { defineRoute, type RouteConfig } from "$fresh/server.ts"; +import { defineRoute, type RouteConfig } from "fresh/server.ts"; import { cn } from "../../../components/utils.ts"; import { AuthForm } from "../islands/auth-form.tsx"; import { type AuthConfig } from "../plugin.ts"; diff --git a/lib/plugins/auth/routes/mod.ts b/lib/plugins/auth/routes/mod.ts index 5951a09a..22c088e9 100644 --- a/lib/plugins/auth/routes/mod.ts +++ b/lib/plugins/auth/routes/mod.ts @@ -1,9 +1,9 @@ -import type { PluginRoute } from "$fresh/server.ts"; +import type { PluginRoute } from "fresh/server.ts"; import type { AuthConfig } from "../plugin.ts"; import { - getAuthConfig, - getFunctionsByProvider, - getUserByProvider, + getAuthConfig, + getFunctionsByProvider, + getUserByProvider, } from "../utils/providers/mod.ts"; import type { AuthProvider, AuthUser } from "../utils/types.ts"; diff --git a/lib/plugins/auth/utils/providers/mod.ts b/lib/plugins/auth/utils/providers/mod.ts index de834504..d7695e4d 100644 --- a/lib/plugins/auth/utils/providers/mod.ts +++ b/lib/plugins/auth/utils/providers/mod.ts @@ -1,14 +1,14 @@ -import { FreshContext } from "$fresh/server.ts"; +import { FreshContext } from "fresh/server.ts"; import { - createAuth0OAuthConfig, - createGitHubOAuthConfig, - createGitLabOAuthConfig, - createGoogleOAuthConfig, - createOktaOAuthConfig, - createSlackOAuthConfig, - handleCallback, - signIn, - signOut, + createAuth0OAuthConfig, + createGitHubOAuthConfig, + createGitLabOAuthConfig, + createGoogleOAuthConfig, + createOktaOAuthConfig, + createSlackOAuthConfig, + handleCallback, + signIn, + signOut, } from "../../../../deps/deno_kv_oauth/mod.ts"; import type { AuthProvider, AuthUserFromProvider } from "../types.ts"; import { getUserAuth0 } from "./auth0.ts"; diff --git a/lib/plugins/cron/plugin.ts b/lib/plugins/cron/plugin.ts index 814b6a58..ac4dba2d 100644 --- a/lib/plugins/cron/plugin.ts +++ b/lib/plugins/cron/plugin.ts @@ -1,4 +1,4 @@ -import type { Plugin } from "$fresh/server.ts"; +import type { Plugin } from "fresh/server.ts"; import type { NetzoState } from "../../mod.ts"; import { proxyCron } from "./mod.ts"; diff --git a/lib/plugins/database/plugin.ts b/lib/plugins/database/plugin.ts index 673cf22c..7ff6ad1e 100644 --- a/lib/plugins/database/plugin.ts +++ b/lib/plugins/database/plugin.ts @@ -1,5 +1,5 @@ // deno-lint-ignore-file no-explicit-any -import type { Plugin, PluginRoute } from "$fresh/server.ts"; +import type { Plugin, PluginRoute } from "fresh/server.ts"; import { createClient } from "npm:@libsql/client@0.6.0"; import { eq } from "npm:drizzle-orm@0.30.10"; import { DrizzleConfig } from "npm:drizzle-orm@0.30.10/utils"; @@ -97,7 +97,15 @@ export const database = (config?: DatabaseConfig): Plugin => { const { tableName } = ctx.params; const table = config.schema![tableName] as any; const data = await parseRequestBody(req); - const result = await db.insert(table).values(data).returning(); + // UPSERT: https://orm.drizzle.team/learn/guides/upsert + const result = await db + .insert(table) + .values(data) + .onConflictDoUpdate({ + target: table.id, + set: { id: sql.raw(`excluded.${table.id}`) }, + }) + .returning(); return Response.json( Array.isArray(result) ? result[0] : result.rows, ); diff --git a/lib/plugins/datastore/plugin.ts b/lib/plugins/datastore/plugin.ts index e800486d..1b534335 100644 --- a/lib/plugins/datastore/plugin.ts +++ b/lib/plugins/datastore/plugin.ts @@ -1,9 +1,9 @@ -import type { Plugin, PluginRoute } from "$fresh/server.ts"; +import type { Plugin, PluginRoute } from "fresh/server.ts"; import { deepParseJson } from "npm:deep-parse-json@2.0.0"; import { unflatten } from "npm:flat@6.0.1"; import { datastore as createDatastore } from "../../datastore/mod.ts"; import { apiKeyAuthentication, cors } from "../middleware.ts"; -import { parseRequestBody, RESPONSES } from "../utils.ts"; +import { RESPONSES, parseRequestBody } from "../utils.ts"; export type DatastoreConfig = { /** Wether to require authentication using the provided API key in the diff --git a/lib/plugins/environments/plugin.ts b/lib/plugins/environments/plugin.ts index b3431a29..7081d656 100644 --- a/lib/plugins/environments/plugin.ts +++ b/lib/plugins/environments/plugin.ts @@ -1,4 +1,4 @@ -import type { Plugin } from "$fresh/server.ts"; +import type { Plugin } from "fresh/server.ts"; import type { NetzoState } from "../../mod.ts"; import { setEnvVarsIfRemoteProject } from "./mod.ts"; diff --git a/lib/plugins/loader/plugin.ts b/lib/plugins/loader/plugin.ts index c1d042d3..4ab70976 100644 --- a/lib/plugins/loader/plugin.ts +++ b/lib/plugins/loader/plugin.ts @@ -1,5 +1,5 @@ // see https://github.com/nesterow/tailored#preloader-plugin -import { Plugin } from "$fresh/server.ts"; +import { Plugin } from "fresh/server.ts"; import type { NetzoState } from "netzo/config/mod.ts"; export type LoaderOptions = { diff --git a/lib/plugins/mdx/plugin.ts b/lib/plugins/mdx/plugin.ts index ec7ca223..263f199c 100644 --- a/lib/plugins/mdx/plugin.ts +++ b/lib/plugins/mdx/plugin.ts @@ -1,4 +1,4 @@ -import type { Plugin, PluginRoute } from "../../deps/$fresh/server.ts"; +import type { Plugin, PluginRoute } from "../../deps/fresh/server.ts"; import type { NetzoState } from "../../mod.ts"; import { mdxPathsToRoutes, scanForMDXFiles } from "./utils.ts"; diff --git a/lib/plugins/mdx/utils.ts b/lib/plugins/mdx/utils.ts index 15873288..b776c2f4 100644 --- a/lib/plugins/mdx/utils.ts +++ b/lib/plugins/mdx/utils.ts @@ -1,4 +1,4 @@ -import { type PluginRoute } from "$fresh/server.ts"; +import { type PluginRoute } from "fresh/server.ts"; import { compile } from "npm:@mdx-js/mdx"; import { ImportDeclaration } from "npm:@types/estree-jsx@1.0.5"; import { Root } from "npm:@types/hast@3.0.3"; diff --git a/lib/plugins/middleware.ts b/lib/plugins/middleware.ts index 6c7acbe1..1d358df7 100644 --- a/lib/plugins/middleware.ts +++ b/lib/plugins/middleware.ts @@ -1,4 +1,4 @@ -import { MiddlewareHandler } from "$fresh/server.ts"; +import { MiddlewareHandler } from "fresh/server.ts"; import { RESPONSES } from "./utils.ts"; const enableCors = (req: Request, res: Response) => { diff --git a/lib/plugins/storage/plugin.ts b/lib/plugins/storage/plugin.ts index f8000ab0..4ffb4b06 100644 --- a/lib/plugins/storage/plugin.ts +++ b/lib/plugins/storage/plugin.ts @@ -1,4 +1,4 @@ -import type { Plugin, PluginRoute } from "$fresh/server.ts"; +import type { Plugin, PluginRoute } from "fresh/server.ts"; import { apiKeyAuthentication, cors } from "../middleware.ts"; export type StorageConfig = { diff --git a/lib/plugins/unocss/plugin.ts b/lib/plugins/unocss/plugin.ts index f57c2530..c12d9f9f 100644 --- a/lib/plugins/unocss/plugin.ts +++ b/lib/plugins/unocss/plugin.ts @@ -1,6 +1,6 @@ -import type { Plugin } from "$fresh/server.ts"; -import { dirname, fromFileUrl, join, walk } from "$fresh/src/server/deps.ts"; -import { JSX, options as preactOptions, VNode } from "preact"; +import type { Plugin } from "fresh/server.ts"; +import { dirname, fromFileUrl, join, walk } from "fresh/src/server/deps.ts"; +import { JSX, VNode, options as preactOptions } from "preact"; import { UnoGenerator, type UserConfig } from "../../deps/@unocss/core.ts"; import type { Theme } from "../../deps/@unocss/preset-uno.ts"; import { existsSync } from "../../deps/std/fs/exists.ts"; diff --git a/tests/fixture-plugins-mdx/deno.json b/tests/fixture-plugins-mdx/deno.json index 1e060964..aa042c2b 100644 --- a/tests/fixture-plugins-mdx/deno.json +++ b/tests/fixture-plugins-mdx/deno.json @@ -2,7 +2,7 @@ "lock": false, "tasks": { "check": "deno fmt --check && deno lint && deno check **/*.ts && deno check **/*.tsx", - "cli": "echo \"import '\\$fresh/src/dev/cli.ts'\" | deno run --unstable -A -", + "cli": "echo \"import '\\fresh/src/dev/cli.ts'\" | deno run --unstable -A -", "manifest": "deno task cli manifest $(pwd)", "start": "deno run -A --watch=static/,routes/ dev.ts", "build": "deno run -A dev.ts build", @@ -23,7 +23,7 @@ "imports": { "@/": "./", "netzo/": "../../lib/", - "$fresh/": "https://deno.land/x/fresh@1.6.8/", + "fresh/": "https://deno.land/x/fresh@1.6.8/", "preact": "https://esm.sh/preact@10.20.0", "preact/": "https://esm.sh/preact@10.20.0/", "preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.3.1", diff --git a/tests/fixture-plugins-mdx/dev.ts b/tests/fixture-plugins-mdx/dev.ts index ae73946d..6d373531 100644 --- a/tests/fixture-plugins-mdx/dev.ts +++ b/tests/fixture-plugins-mdx/dev.ts @@ -1,6 +1,6 @@ #!/usr/bin/env -S deno run -A --watch=static/,routes/ -import dev from "$fresh/dev.ts"; +import dev from "fresh/dev.ts"; import config from "./fresh.config.ts"; import "$std/dotenv/load.ts"; diff --git a/tests/fixture-plugins-mdx/fresh.config.ts b/tests/fixture-plugins-mdx/fresh.config.ts index 9e0b173f..f572bae5 100644 --- a/tests/fixture-plugins-mdx/fresh.config.ts +++ b/tests/fixture-plugins-mdx/fresh.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from "$fresh/server.ts"; +import { defineConfig } from "fresh/server.ts"; import { mdx } from "netzo/plugins/mdx/plugin.ts"; import { unocss } from "netzo/plugins/unocss/plugin.ts"; import unocssConfig from "./unocss.config.ts"; diff --git a/tests/fixture-plugins-mdx/fresh.gen.ts b/tests/fixture-plugins-mdx/fresh.gen.ts index 473ddeb4..88d9b77e 100644 --- a/tests/fixture-plugins-mdx/fresh.gen.ts +++ b/tests/fixture-plugins-mdx/fresh.gen.ts @@ -2,9 +2,9 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $_app from "./routes/_app.tsx"; +import { type Manifest } from "fresh/server.ts"; import * as $Counter from "./islands/Counter.tsx"; -import { type Manifest } from "$fresh/server.ts"; +import * as $_app from "./routes/_app.tsx"; const manifest = { routes: { diff --git a/tests/fixture-plugins-mdx/islands/Counter.tsx b/tests/fixture-plugins-mdx/islands/Counter.tsx index 9a325f39..c181ea64 100644 --- a/tests/fixture-plugins-mdx/islands/Counter.tsx +++ b/tests/fixture-plugins-mdx/islands/Counter.tsx @@ -1,5 +1,5 @@ import { Signal } from "@preact/signals"; -import { IS_BROWSER } from "$fresh/runtime.ts"; +import { IS_BROWSER } from "fresh/runtime.ts"; interface CounterProps { count: Signal; diff --git a/tests/fixture-plugins-mdx/main.ts b/tests/fixture-plugins-mdx/main.ts index 675f529b..ca536888 100644 --- a/tests/fixture-plugins-mdx/main.ts +++ b/tests/fixture-plugins-mdx/main.ts @@ -6,8 +6,8 @@ import "$std/dotenv/load.ts"; -import { start } from "$fresh/server.ts"; -import manifest from "./fresh.gen.ts"; +import { start } from "fresh/server.ts"; import config from "./fresh.config.ts"; +import manifest from "./fresh.gen.ts"; await start(manifest, config); diff --git a/tests/fixture-plugins-mdx/routes/_app.tsx b/tests/fixture-plugins-mdx/routes/_app.tsx index d34729ec..5ef1d34d 100644 --- a/tests/fixture-plugins-mdx/routes/_app.tsx +++ b/tests/fixture-plugins-mdx/routes/_app.tsx @@ -1,4 +1,4 @@ -import { type PageProps } from "$fresh/server.ts"; +import { type PageProps } from "fresh/server.ts"; export default function App({ Component }: PageProps) { return ( diff --git a/tests/fixture-plugins-unocss/deno.json b/tests/fixture-plugins-unocss/deno.json index d0ed86d6..5dc54916 100644 --- a/tests/fixture-plugins-unocss/deno.json +++ b/tests/fixture-plugins-unocss/deno.json @@ -10,7 +10,7 @@ "imports": { "@/": "./", "netzo/": "../../lib/", - "$fresh/": "https://deno.land/x/fresh@1.6.8/", + "fresh/": "https://deno.land/x/fresh@1.6.8/", "preact": "https://esm.sh/preact@10.20.0", "preact/": "https://esm.sh/preact@10.20.0/", "preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.3.1", diff --git a/tests/fixture-plugins-unocss/dev.ts b/tests/fixture-plugins-unocss/dev.ts index f65abe7f..3ecd40b9 100644 --- a/tests/fixture-plugins-unocss/dev.ts +++ b/tests/fixture-plugins-unocss/dev.ts @@ -1,6 +1,6 @@ #!/usr/bin/env -S deno run -A --watch=static/,routes/ -import dev from "$fresh/dev.ts"; +import dev from "fresh/dev.ts"; await dev(import.meta.url, "./main.ts"); // DO NOT EDIT. This file is generated by Fresh. // This file SHOULD be checked into source version control. diff --git a/tests/fixture-plugins-unocss/fresh.config.ts b/tests/fixture-plugins-unocss/fresh.config.ts index c4a6a26f..3f2588dd 100644 --- a/tests/fixture-plugins-unocss/fresh.config.ts +++ b/tests/fixture-plugins-unocss/fresh.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from "$fresh/server.ts"; +import { defineConfig } from "fresh/server.ts"; import { unocss } from "netzo/plugins/unocss/plugin.ts"; import unocssConfig from "./uno.config.ts"; diff --git a/tests/fixture-plugins-unocss/fresh.gen.ts b/tests/fixture-plugins-unocss/fresh.gen.ts index 9b1bbc7d..dbc58f73 100644 --- a/tests/fixture-plugins-unocss/fresh.gen.ts +++ b/tests/fixture-plugins-unocss/fresh.gen.ts @@ -2,10 +2,10 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $index from "./routes/index.tsx"; +import { type Manifest } from "fresh/server.ts"; import * as $CheckDuplication from "./islands/CheckDuplication.tsx"; import * as $InsertCssRules from "./islands/InsertCssRules.tsx"; -import { type Manifest } from "$fresh/server.ts"; +import * as $index from "./routes/index.tsx"; const manifest = { routes: { diff --git a/tests/fixture-plugins-unocss/main.ts b/tests/fixture-plugins-unocss/main.ts index 8e06dcef..1df80e83 100644 --- a/tests/fixture-plugins-unocss/main.ts +++ b/tests/fixture-plugins-unocss/main.ts @@ -5,7 +5,7 @@ /// /// -import { start } from "$fresh/server.ts"; +import { start } from "fresh/server.ts"; import config from "./fresh.config.ts"; import manifest from "./fresh.gen.ts";