@vercel/node 1.12.2-canary.6 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,33 @@
1
+ /// <reference types="node" />
2
+ import { ServerResponse, IncomingMessage } from 'http';
3
+ export declare type VercelRequestCookies = {
4
+ [key: string]: string;
5
+ };
6
+ export declare type VercelRequestQuery = {
7
+ [key: string]: string | string[];
8
+ };
9
+ export declare type VercelRequestBody = any;
10
+ export declare type VercelRequest = IncomingMessage & {
11
+ query: VercelRequestQuery;
12
+ cookies: VercelRequestCookies;
13
+ body: VercelRequestBody;
14
+ };
15
+ export declare type VercelResponse = ServerResponse & {
16
+ send: (body: any) => VercelResponse;
17
+ json: (jsonBody: any) => VercelResponse;
18
+ status: (statusCode: number) => VercelResponse;
19
+ redirect: (statusOrUrl: string | number, url?: string) => VercelResponse;
20
+ };
21
+ export declare type VercelApiHandler = (req: VercelRequest, res: VercelResponse) => void;
22
+ /** @deprecated Use VercelRequestCookies instead. */
23
+ export declare type NowRequestCookies = VercelRequestCookies;
24
+ /** @deprecated Use VercelRequestQuery instead. */
25
+ export declare type NowRequestQuery = VercelRequestQuery;
26
+ /** @deprecated Use VercelRequestBody instead. */
27
+ export declare type NowRequestBody = any;
28
+ /** @deprecated Use VercelRequest instead. */
29
+ export declare type NowRequest = VercelRequest;
30
+ /** @deprecated Use VercelResponse instead. */
31
+ export declare type NowResponse = VercelResponse;
32
+ /** @deprecated Use VercelApiHandler instead. */
33
+ export declare type NowApiHandler = VercelApiHandler;
@@ -0,0 +1,34 @@
1
+ import _ts from 'typescript';
2
+ /**
3
+ * Registration options.
4
+ */
5
+ interface Options {
6
+ basePath?: string;
7
+ pretty?: boolean | null;
8
+ logError?: boolean | null;
9
+ files?: boolean | null;
10
+ compiler?: string;
11
+ ignore?: string[];
12
+ project?: string;
13
+ compilerOptions?: any;
14
+ ignoreDiagnostics?: Array<number | string>;
15
+ readFile?: (path: string) => string | undefined;
16
+ fileExists?: (path: string) => boolean;
17
+ transformers?: _ts.CustomTransformers;
18
+ }
19
+ /**
20
+ * Return type for registering `ts-node`.
21
+ */
22
+ export declare type Register = (code: string, fileName: string, skipTypeCheck?: boolean) => SourceOutput;
23
+ /**
24
+ * Register TypeScript compiler.
25
+ */
26
+ export declare function register(opts?: Options): Register;
27
+ /**
28
+ * Internal source output.
29
+ */
30
+ declare type SourceOutput = {
31
+ code: string;
32
+ map: string;
33
+ };
34
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/node",
3
- "version": "1.12.2-canary.6",
3
+ "version": "1.13.0",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/node-js",
@@ -32,9 +32,10 @@
32
32
  "@types/cookie": "0.3.3",
33
33
  "@types/etag": "1.8.0",
34
34
  "@types/test-listen": "1.1.0",
35
+ "@vercel/build-utils": "2.14.0",
35
36
  "@vercel/ncc": "0.24.0",
36
- "@vercel/nft": "0.14.0",
37
- "@vercel/node-bridge": "2.1.1-canary.2",
37
+ "@vercel/nft": "0.17.5",
38
+ "@vercel/node-bridge": "2.1.1",
38
39
  "content-type": "1.0.4",
39
40
  "cookie": "0.4.0",
40
41
  "etag": "1.8.1",
@@ -43,5 +44,5 @@
43
44
  "source-map-support": "0.5.12",
44
45
  "test-listen": "1.1.0"
45
46
  },
46
- "gitHead": "bf4e77110f7a79ead453a4e46dc551b74f9df979"
47
+ "gitHead": "99fa729966c4334aa2d64c592421cc65e1644bdb"
47
48
  }