Skip to content

Commit

Permalink
5ddf269 Version Packages
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Aug 8, 2024
1 parent 85833b4 commit d47d7ef
Show file tree
Hide file tree
Showing 7 changed files with 1,653 additions and 1,283 deletions.
2 changes: 1 addition & 1 deletion adapters/shared/vite/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export declare interface ServerAdapterOptions {
export declare const STATIC_PATHS_ID = "@qwik-city-static-paths";

/** @public */
export declare function viteAdapter(opts: ViteAdapterPluginOptions): Plugin_2<any>;
export declare function viteAdapter(opts: ViteAdapterPluginOptions): Plugin_2<never>;

/** @public */
declare interface ViteAdapterPluginOptions {
Expand Down
518 changes: 196 additions & 322 deletions index.qwik.cjs

Large diffs are not rendered by default.

518 changes: 196 additions & 322 deletions index.qwik.mjs

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions middleware/bun/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,12 @@ function createQwikCity(opts) {
const url = new URL(request.url);
if (isStaticPath(request.method || "GET", url)) {
const { filePath, content } = await openStaticFile(url);
if (!await content.exists()) {
return new Response("Not Found", {
status: 404,
headers: { "Content-Type": "text/plain; charset=utf-8", "X-Not-Found": url.pathname }
});
}
const ext = extname(filePath).replace(/^\./, "");
return new Response(await content.stream(), {
status: 200,
Expand Down
942 changes: 624 additions & 318 deletions vite/index.cjs

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions vite/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { BuiltinsWithOptionalParams } from 'svgo/plugins/plugins-types';
import type { CompileOptions } from '@mdx-js/mdx';
import type { Config } from 'svgo';
import { ConfigEnv } from 'vite';
import type { Plugin as Plugin_2 } from 'vite';
import type { PluginOption } from 'vite';
import { UserConfigExport } from 'vite';

Expand Down Expand Up @@ -58,6 +59,10 @@ declare interface MdxPlugins {
rehypeAutolinkHeadings: boolean;
}

declare type P<T> = Plugin_2<T> & {
api: T;
};

declare interface ParsedPathname {
routeName: string;
pattern: RegExp;
Expand Down Expand Up @@ -103,9 +108,8 @@ declare interface PluginOptions {
export declare function qwikCity(userOpts?: QwikCityVitePluginOptions): PluginOption[];

/** @public */
export declare interface QwikCityPlugin {
export declare interface QwikCityPlugin extends P<QwikCityPluginApi> {
name: 'vite-plugin-qwik-city';
api: QwikCityPluginApi;
}

/** @public */
Expand Down
Loading

0 comments on commit d47d7ef

Please sign in to comment.