Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vercel/routing-utils

Package Overview
Dependencies
Maintainers
33
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vercel/routing-utils - npm Package Compare versions

Comparing version 1.10.0 to 1.10.1-canary.0

8

dist/superstatic.d.ts

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

import { Route, NowRedirect, NowRewrite, NowHeader } from './types';
import { Route, Redirect, Rewrite, Header } from './types';
export declare function getCleanUrls(filePaths: string[]): {

@@ -7,5 +7,5 @@ html: string;

export declare function convertCleanUrls(cleanUrls: boolean, trailingSlash?: boolean, status?: number): Route[];
export declare function convertRedirects(redirects: NowRedirect[], defaultStatus?: number): Route[];
export declare function convertRewrites(rewrites: NowRewrite[]): Route[];
export declare function convertHeaders(headers: NowHeader[]): Route[];
export declare function convertRedirects(redirects: Redirect[], defaultStatus?: number): Route[];
export declare function convertRewrites(rewrites: Rewrite[]): Route[];
export declare function convertHeaders(headers: Header[]): Route[];
export declare function convertTrailingSlash(enable: boolean, status?: number): Route[];

@@ -12,0 +12,0 @@ export declare function sourceToRegex(source: string): {

@@ -115,3 +115,3 @@ "use strict";

routes.push({
src: '^/\\.well-known(?:/.*)?$'
src: '^/\\.well-known(?:/.*)?$',
});

@@ -118,0 +118,0 @@ routes.push({

@@ -38,3 +38,3 @@ import { HandleValue } from './index';

export interface GetRoutesProps {
nowConfig: NowConfig;
nowConfig: VercelConfig;
}

@@ -50,3 +50,3 @@ export interface MergeRoutesProps {

}
export interface NowConfig {
export interface VercelConfig {
name?: string;

@@ -56,12 +56,12 @@ version?: number;

cleanUrls?: boolean;
rewrites?: NowRewrite[];
redirects?: NowRedirect[];
headers?: NowHeader[];
rewrites?: Rewrite[];
redirects?: Redirect[];
headers?: Header[];
trailingSlash?: boolean;
}
export interface NowRewrite {
export interface Rewrite {
source: string;
destination: string;
}
export interface NowRedirect {
export interface Redirect {
source: string;

@@ -72,7 +72,7 @@ destination: string;

}
export interface NowHeader {
export interface Header {
source: string;
headers: NowHeaderKeyValue[];
headers: HeaderKeyValue[];
}
export interface NowHeaderKeyValue {
export interface HeaderKeyValue {
key: string;

@@ -95,1 +95,11 @@ value: string;

}
/** @deprecated Use VercelConfig instead. */
export declare type NowConfig = VercelConfig;
/** @deprecated Use Rewrite instead. */
export declare type NowRewrite = Rewrite;
/** @deprecated Use Redirect instead. */
export declare type NowRedirect = Redirect;
/** @deprecated Use Header instead. */
export declare type NowHeader = Header;
/** @deprecated Use HeaderKeyValue instead. */
export declare type NowHeaderKeyValue = HeaderKeyValue;
{
"name": "@vercel/routing-utils",
"version": "1.10.0",
"version": "1.10.1-canary.0",
"description": "Vercel routing utilities",

@@ -13,3 +13,3 @@ "main": "./dist/index.js",

"url": "https://github.com/vercel/vercel.git",
"directory": "packages/now-routing-utils"
"directory": "packages/routing-utils"
},

@@ -34,3 +34,3 @@ "license": "MIT",

},
"gitHead": "8cfac4cf86bd7d57eabb1a24ab6bc9672fbcbfdb"
"gitHead": "9acf8e17377dd8050f7ea5c2752e1aa368068e59"
}

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

# @now/routing-utils
# @vercel/routing-utils

@@ -7,6 +7,6 @@ Route validation utilities

`yarn add @now/routing-utils`
`yarn add @vercel/routing-utils`
```ts
import { normalizeRoutes } from '@now/routing-utils';
import { normalizeRoutes } from '@vercel/routing-utils';

@@ -21,3 +21,3 @@ const { routes, error } = normalizeRoutes(inputRoutes);

```ts
import { routesSchema } from '@now/routing-utils';
import { routesSchema } from '@vercel/routing-utils';

@@ -24,0 +24,0 @@ const ajv = new Ajv();

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