dx-server 0.6.2 → 0.6.3

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.
package/cjs/body.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ /// <reference types="node" resolution-mode="require"/>
2
+ import { BufferBodyOptions } from './bodyHelpers.js';
3
+ export declare const getBuffer: import("./dx.js").Context<Promise<Buffer | undefined>, [options?: Partial<BufferBodyOptions> | undefined], any, (...np: any[]) => any>;
4
+ export declare const getJson: import("./dx.js").Context<Promise<any>, [options?: Partial<BufferBodyOptions> | undefined], any, (...np: any[]) => any>;
5
+ export declare const getRaw: import("./dx.js").Context<Promise<Buffer | undefined>, [options?: Partial<BufferBodyOptions> | undefined], any, (...np: any[]) => any>;
6
+ export declare const getText: import("./dx.js").Context<Promise<string | undefined>, [options?: Partial<BufferBodyOptions> | undefined], any, (...np: any[]) => any>;
7
+ export declare const getUrlEncoded: import("./dx.js").Context<Promise<any>, [options?: Partial<BufferBodyOptions> | undefined], any, (...np: any[]) => any>;
8
+ export declare const getQuery: import("./dx.js").Context<any, [options?: Partial<BufferBodyOptions> | undefined], any, (...np: any[]) => any>;
package/cjs/dx.d.ts CHANGED
@@ -33,10 +33,9 @@ export declare function setJson(json: any, { status }?: {
33
33
  status?: number;
34
34
  }): void;
35
35
  export declare function setRedirect(url: string, status: 301 | 302): void;
36
- interface Context<T, Params extends any[], R = any, Next = (...np: any[]) => any> {
36
+ export interface Context<T, Params extends any[], R = any, Next = (...np: any[]) => any> {
37
37
  value: Awaited<T>;
38
38
  chain(...params: Params): Chainable<Params, R, Next>;
39
39
  (...params: Params): Promise<T>;
40
40
  }
41
41
  export declare function makeDxContext<T, Params extends any[], R = any, Next = (...np: any[]) => any>(maker: (...params: Params) => T): Context<T, Params, R, Next>;
42
- export {};
package/esm/body.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ /// <reference types="node" resolution-mode="require"/>
2
+ import { BufferBodyOptions } from './bodyHelpers.js';
3
+ export declare const getBuffer: import("./dx.js").Context<Promise<Buffer | undefined>, [options?: Partial<BufferBodyOptions> | undefined], any, (...np: any[]) => any>;
4
+ export declare const getJson: import("./dx.js").Context<Promise<any>, [options?: Partial<BufferBodyOptions> | undefined], any, (...np: any[]) => any>;
5
+ export declare const getRaw: import("./dx.js").Context<Promise<Buffer | undefined>, [options?: Partial<BufferBodyOptions> | undefined], any, (...np: any[]) => any>;
6
+ export declare const getText: import("./dx.js").Context<Promise<string | undefined>, [options?: Partial<BufferBodyOptions> | undefined], any, (...np: any[]) => any>;
7
+ export declare const getUrlEncoded: import("./dx.js").Context<Promise<any>, [options?: Partial<BufferBodyOptions> | undefined], any, (...np: any[]) => any>;
8
+ export declare const getQuery: import("./dx.js").Context<any, [options?: Partial<BufferBodyOptions> | undefined], any, (...np: any[]) => any>;
package/esm/dx.d.ts CHANGED
@@ -33,10 +33,9 @@ export declare function setJson(json: any, { status }?: {
33
33
  status?: number;
34
34
  }): void;
35
35
  export declare function setRedirect(url: string, status: 301 | 302): void;
36
- interface Context<T, Params extends any[], R = any, Next = (...np: any[]) => any> {
36
+ export interface Context<T, Params extends any[], R = any, Next = (...np: any[]) => any> {
37
37
  value: Awaited<T>;
38
38
  chain(...params: Params): Chainable<Params, R, Next>;
39
39
  (...params: Params): Promise<T>;
40
40
  }
41
41
  export declare function makeDxContext<T, Params extends any[], R = any, Next = (...np: any[]) => any>(maker: (...params: Params) => T): Context<T, Params, R, Next>;
42
- export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dx-server",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "main": "./cjs/index.js",
5
5
  "homepage": "https://github.com/tranvansang/dx-server",
6
6
  "repository": "https://github.com/tranvansang/dx-server",
@@ -36,5 +36,6 @@
36
36
  "dependencies": {
37
37
  "send": "^0.18.0",
38
38
  "urlpattern-polyfill": "^10.0.0"
39
- }
39
+ },
40
+ "packageManager": "yarn@1.22.19+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447"
40
41
  }