Socket
Socket
Sign inDemoInstall

vitepress

Package Overview
Dependencies
Maintainers
5
Versions
237
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vitepress - npm Package Compare versions

Comparing version 1.0.0-alpha.27 to 1.0.0-alpha.28

dist/node-cjs/serve-b60afb25.cjs

4

dist/node/cli.js

@@ -1,2 +0,2 @@

import { p as picocolors, g as build, s as serve, e as createServer } from './serve-f7714470.js';
import { p as picocolors, g as build, s as serve, e as createServer } from './serve-1ed3e028.js';
import 'fs';

@@ -274,3 +274,3 @@ import 'path';

var version = "1.0.0-alpha.27";
var version = "1.0.0-alpha.28";

@@ -277,0 +277,0 @@ const argv = minimist(process.argv.slice(2));

@@ -7,2 +7,4 @@ import * as vite from 'vite';

import { IThemeRegistration } from 'shiki';
import { IncomingMessage, ServerResponse } from 'http';
import { Server, ListenOptions } from 'net';

@@ -1882,2 +1884,88 @@ declare function resolveSiteDataByRoute(siteData: SiteData, route: string): SiteData;

interface ParsedURL {
pathname: string;
search: string;
query: Record<string, string | string[]> | void;
raw: string;
}
// Thank you: @fwilkerson, @stahlstift
// ---
/** @type {import('http').METHODS} */
type Methods = 'ACL' | 'BIND' | 'CHECKOUT' | 'CONNECT' | 'COPY' | 'DELETE' | 'GET' | 'HEAD' | 'LINK' | 'LOCK' |'M-SEARCH' | 'MERGE' | 'MKACTIVITY' |'MKCALENDAR' | 'MKCOL' | 'MOVE' |'NOTIFY' | 'OPTIONS' | 'PATCH' | 'POST' | 'PRI' | 'PROPFIND' | 'PROPPATCH' | 'PURGE' | 'PUT' | 'REBIND' | 'REPORT' | 'SEARCH' | 'SOURCE' | 'SUBSCRIBE' | 'TRACE' | 'UNBIND' | 'UNLINK' | 'UNLOCK' | 'UNSUBSCRIBE';
type Pattern = RegExp | string;
declare class Trouter<T = Function> {
find(method: Methods, url: string): {
params: Record<string, string>;
handlers: T[];
};
add(method: Methods, pattern: Pattern, ...handlers: T[]): this;
use(pattern: Pattern, ...handlers: T[]): this;
all(pattern: Pattern, ...handlers: T[]): this;
get(pattern: Pattern, ...handlers: T[]): this;
head(pattern: Pattern, ...handlers: T[]): this;
patch(pattern: Pattern, ...handlers: T[]): this;
options(pattern: Pattern, ...handlers: T[]): this;
connect(pattern: Pattern, ...handlers: T[]): this;
delete(pattern: Pattern, ...handlers: T[]): this;
trace(pattern: Pattern, ...handlers: T[]): this;
post(pattern: Pattern, ...handlers: T[]): this;
put(pattern: Pattern, ...handlers: T[]): this;
}
type Promisable<T> = Promise<T> | T;
type ListenCallback = () => Promisable<void>;
interface IError extends Error {
code?: number;
status?: number;
details?: any;
}
type NextHandler = (err?: string | IError) => Promisable<void>;
type ErrorHandler<T extends Request = Request> = (err: string | IError, req: T, res: Response, next: NextHandler) => Promisable<void>;
type Middleware<T extends IncomingMessage = Request> = (req: T & Request, res: Response, next: NextHandler) => Promisable<void>;
type Response = ServerResponse;
interface Request extends IncomingMessage {
url: string;
method: string;
originalUrl: string;
params: Record<string, string>;
path: string;
search: string;
query: Record<string,string>;
body?: any;
_decoded?: true;
_parsedUrl: ParsedURL;
}
interface Polka<T extends Request = Request> extends Trouter<Middleware<T>> {
readonly server: Server;
readonly wares: Middleware<T>[];
readonly onError: ErrorHandler<T>;
readonly onNoMatch: Middleware<T>;
readonly handler: Middleware<T>;
parse: (req: IncomingMessage) => ParsedURL;
use(pattern: RegExp|string, ...handlers: (Polka<T> | Middleware<T>)[]): this;
use(...handlers: (Polka<T> | Middleware<T>)[]): this;
listen(port?: number, hostname?: string, backlog?: number, callback?: ListenCallback): this;
listen(port?: number, hostname?: string, callback?: ListenCallback): this;
listen(port?: number, backlog?: number, callback?: ListenCallback): this;
listen(port?: number, callback?: ListenCallback): this;
listen(path: string, backlog?: number, callback?: ListenCallback): this;
listen(path: string, callback?: ListenCallback): this;
listen(options: ListenOptions, callback?: ListenCallback): this;
listen(handle: any, backlog?: number, callback?: ListenCallback): this;
listen(handle: any, callback?: ListenCallback): this;
}
interface ServeOptions {

@@ -1888,4 +1976,4 @@ base?: string;

}
declare function serve(options?: ServeOptions): Promise<void>;
declare function serve(options?: ServeOptions): Promise<Polka<Request>>;
export { MarkdownEnv, MarkdownOptions, MarkdownRenderer, RawConfigExports, ServeOptions, SiteConfig, ThemeOptions, TransformContext, UserConfig, build, createMarkdownRenderer, createServer, defineConfig, defineConfigWithTheme, resolveConfig, resolveSiteData, resolveSiteDataByRoute, serve };

@@ -1,2 +0,2 @@

export { g as build, f as createMarkdownRenderer, e as createServer, d as defineConfig, a as defineConfigWithTheme, r as resolveConfig, b as resolveSiteData, c as resolveSiteDataByRoute, s as serve } from './serve-f7714470.js';
export { g as build, f as createMarkdownRenderer, e as createServer, d as defineConfig, a as defineConfigWithTheme, r as resolveConfig, b as resolveSiteData, c as resolveSiteDataByRoute, s as serve } from './serve-1ed3e028.js';
import 'dns';

@@ -3,0 +3,0 @@ import 'vite';

{
"name": "vitepress",
"version": "1.0.0-alpha.27",
"version": "1.0.0-alpha.28",
"description": "Vite & Vue powered static site generator",

@@ -54,3 +54,3 @@ "type": "module",

"@docsearch/js": "^3.3.0",
"@vitejs/plugin-vue": "^3.1.2",
"@vitejs/plugin-vue": "^3.2.0",
"@vue/devtools-api": "^6.4.5",

@@ -60,3 +60,3 @@ "@vueuse/core": "^9.4.0",

"shiki": "^0.11.1",
"vite": "^3.1.8",
"vite": "^3.2.3",
"vue": "^3.2.41"

@@ -91,3 +91,3 @@ },

"@types/minimist": "^1.2.2",
"@types/node": "^18.11.5",
"@types/node": "^18.11.9",
"@types/prompts": "^2.4.1",

@@ -100,3 +100,3 @@ "chokidar": "^3.5.3",

"enquirer": "^2.3.6",
"esbuild": "^0.15.12",
"esbuild": "^0.15.13",
"escape-html": "^1.0.3",

@@ -106,4 +106,5 @@ "execa": "^6.1.0",

"fs-extra": "^10.1.0",
"get-port": "^5.1.1",
"lint-staged": "^13.0.3",
"lru-cache": "^7.14.0",
"lru-cache": "^7.14.1",
"markdown-it": "^13.0.1",

@@ -128,10 +129,10 @@ "markdown-it-anchor": "^8.6.5",

"rollup-plugin-dts": "^4.2.3",
"rollup-plugin-esbuild": "^4.10.1",
"rollup-plugin-esbuild": "^4.10.2",
"semver": "^7.3.8",
"shiki-processor": "^0.1.1",
"simple-git-hooks": "^2.8.1",
"sirv": "^2.0.2",
"shiki-processor": "^0.1.1",
"supports-color": "^9.2.3",
"typescript": "~4.8.4",
"vitest": "^0.24.3",
"vitest": "^0.25.0",
"vue-tsc": "^1.0.9",

@@ -152,3 +153,3 @@ "wait-on": "^6.0.1"

"dev-client": "tsc -w -p src/client",
"dev-node": "DEV=true pnpm run build-node -w",
"dev-node": "DEV=true pnpm build-node -w",
"dev-shared": "node scripts/copyShared",

@@ -162,21 +163,18 @@ "dev-watch": "node scripts/watchAndCopy",

"format-fail": "prettier --check .",
"lint": "pnpm run format",
"lint-fail": "pnpm run format-fail",
"test": "vitest -r __tests__",
"test-unit": "vitest run -r __tests__",
"test-serve": "vitest run -c vitest.config.e2e.ts",
"test-build": "VITE_TEST_BUILD=1 vitest run -c vitest.config.e2e.ts",
"debug-serve": "VITE_DEBUG_SERVE=1 vitest run -c vitest.config.e2e.ts",
"debug-build": "VITE_TEST_BUILD=1 VITE_PRESERVE_BUILD_ARTIFACTS=1 vitest run -c vitest.config.e2e.ts",
"check": "run-s lint test-unit docs-build",
"check": "run-s format-fail build test",
"test": "run-p --aggregate-output test-unit test-serve test-build",
"test-unit": "vitest run -r __tests__/unit",
"test-serve": "vitest run -r __tests__/e2e",
"test-build": "VITE_TEST_BUILD=1 pnpm test-serve",
"debug-serve": "DEBUG=1 vitest -r __tests__/e2e",
"debug-build": "VITE_TEST_BUILD=1 pnpm debug-serve",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
"release": "node scripts/release.js",
"docs": "run-p dev docs-dev",
"docs-dev": "wait-on -d 1000 dist/node/cli.js && node ./bin/vitepress dev docs",
"docs-dev": "wait-on -d 100 dist/node/cli.js && node ./bin/vitepress dev docs",
"docs-debug": "node --inspect-brk ./bin/vitepress dev docs",
"docs-build": "run-s build docs-build-only",
"docs-build-only": "node ./bin/vitepress build docs",
"docs-serve": "node ./bin/vitepress serve docs",
"ci-docs": "run-s docs-build"
"docs-serve": "node ./bin/vitepress serve docs"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc