@donmahallem/turbo-pb 0.2.13 → 0.2.17
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/dist/cjs/dist/format-response.d.ts +17 -0
- package/dist/cjs/dist/format-response.spec.d.ts +4 -0
- package/dist/cjs/dist/index.d.ts +4 -0
- package/dist/cjs/dist/index.spec.d.ts +4 -0
- package/dist/cjs/dist/types2/format-response.d.ts +18 -0
- package/dist/cjs/dist/types2/format-response.d.ts.map +1 -0
- package/dist/cjs/dist/types2/format-response.spec.d.ts +5 -0
- package/dist/cjs/dist/types2/format-response.spec.d.ts.map +1 -0
- package/dist/cjs/dist/types2/index.d.ts +5 -0
- package/dist/cjs/dist/types2/index.d.ts.map +1 -0
- package/dist/cjs/dist/types2/index.spec.d.ts +5 -0
- package/dist/cjs/dist/types2/index.spec.d.ts.map +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/types2/format-response.d.ts +18 -0
- package/dist/cjs/types2/format-response.d.ts.map +1 -0
- package/dist/cjs/types2/format-response.spec.d.ts +5 -0
- package/dist/cjs/types2/format-response.spec.d.ts.map +1 -0
- package/dist/cjs/types2/index.d.ts +5 -0
- package/dist/cjs/types2/index.d.ts.map +1 -0
- package/dist/cjs/types2/index.spec.d.ts +5 -0
- package/dist/cjs/types2/index.spec.d.ts.map +1 -0
- package/dist/dts/index.d.ts +20 -0
- package/dist/esm/dist/format-response.d.ts +17 -0
- package/dist/esm/dist/format-response.spec.d.ts +4 -0
- package/dist/esm/dist/index.d.ts +4 -0
- package/dist/esm/dist/index.spec.d.ts +4 -0
- package/dist/esm/dist/types2/format-response.d.ts +18 -0
- package/dist/esm/dist/types2/format-response.d.ts.map +1 -0
- package/dist/esm/dist/types2/format-response.spec.d.ts +5 -0
- package/dist/esm/dist/types2/format-response.spec.d.ts.map +1 -0
- package/dist/esm/dist/types2/index.d.ts +5 -0
- package/dist/esm/dist/types2/index.d.ts.map +1 -0
- package/dist/esm/dist/types2/index.spec.d.ts +5 -0
- package/dist/esm/dist/types2/index.spec.d.ts.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/types2/format-response.d.ts +18 -0
- package/dist/esm/types2/format-response.d.ts.map +1 -0
- package/dist/esm/types2/format-response.spec.d.ts +5 -0
- package/dist/esm/types2/format-response.spec.d.ts.map +1 -0
- package/dist/esm/types2/index.d.ts +5 -0
- package/dist/esm/types2/index.d.ts.map +1 -0
- package/dist/esm/types2/index.spec.d.ts +5 -0
- package/dist/esm/types2/index.spec.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Source https://github.com/donmahallem/js-libs Package: turbo-pb
|
|
3
|
+
*/
|
|
4
|
+
import { NextFunction, Response } from 'express';
|
|
5
|
+
import { Message, Type, Writer } from 'protobufjs';
|
|
6
|
+
declare type MessageKey<T extends object> = ({
|
|
7
|
+
encode: (msg: T) => Writer;
|
|
8
|
+
} & typeof Message) | Type;
|
|
9
|
+
/**
|
|
10
|
+
* Formats response to either json or protobuf
|
|
11
|
+
* @param msg message to be formated
|
|
12
|
+
* @param message Message to convert
|
|
13
|
+
* @param res express Response object
|
|
14
|
+
* @param next express Next function
|
|
15
|
+
*/
|
|
16
|
+
export declare const formatResponse: <T extends object>(msg: T, message: MessageKey<T>, res: Response, next: NextFunction) => void;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Source https://github.com/donmahallem/js-libs Package: turbo-pb
|
|
3
|
+
*/
|
|
4
|
+
import { NextFunction, Response } from 'express';
|
|
5
|
+
import { Message, Type, Writer } from 'protobufjs';
|
|
6
|
+
declare type MessageKey<T extends object> = ({
|
|
7
|
+
encode: (msg: T) => Writer;
|
|
8
|
+
} & typeof Message) | Type;
|
|
9
|
+
/**
|
|
10
|
+
* Formats response to either json or protobuf
|
|
11
|
+
* @param msg message to be formated
|
|
12
|
+
* @param message Message to convert
|
|
13
|
+
* @param res express Response object
|
|
14
|
+
* @param next express Next function
|
|
15
|
+
*/
|
|
16
|
+
export declare const formatResponse: <T extends object>(msg: T, message: MessageKey<T>, res: Response, next: NextFunction) => void;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=format-response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-response.d.ts","sourceRoot":"","sources":["../../src/format-response.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEnD,aAAK,UAAU,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC;IACjC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAC;CAC9B,GAAG,OAAO,OAAO,CAAC,GAAG,IAAI,CAAC;AAC3B;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,0DAA2D,QAAQ,QAAQ,YAAY,KAAG,IAepH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-response.spec.d.ts","sourceRoot":"","sources":["../../src/format-response.spec.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.spec.d.ts","sourceRoot":"","sources":["../../src/index.spec.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,OAAO,CAAC"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -32,6 +32,6 @@ const formatResponse = (msg, message, res, next) => {
|
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
exports.formatResponse = formatResponse;
|
|
35
|
-
// BUILD:
|
|
35
|
+
// BUILD: Sun Dec 05 2021 18:05:46 GMT+0100 (Central European Standard Time)
|
|
36
36
|
|
|
37
37
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Source https://github.com/donmahallem/js-libs Package: turbo-pb
|
|
3
|
+
*/
|
|
4
|
+
import { NextFunction, Response } from 'express';
|
|
5
|
+
import { Message, Type, Writer } from 'protobufjs';
|
|
6
|
+
declare type MessageKey<T extends object> = ({
|
|
7
|
+
encode: (msg: T) => Writer;
|
|
8
|
+
} & typeof Message) | Type;
|
|
9
|
+
/**
|
|
10
|
+
* Formats response to either json or protobuf
|
|
11
|
+
* @param msg message to be formated
|
|
12
|
+
* @param message Message to convert
|
|
13
|
+
* @param res express Response object
|
|
14
|
+
* @param next express Next function
|
|
15
|
+
*/
|
|
16
|
+
export declare const formatResponse: <T extends object>(msg: T, message: MessageKey<T>, res: Response, next: NextFunction) => void;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=format-response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-response.d.ts","sourceRoot":"","sources":["../src/format-response.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEnD,aAAK,UAAU,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC;IACjC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAC;CAC9B,GAAG,OAAO,OAAO,CAAC,GAAG,IAAI,CAAC;AAC3B;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,0DAA2D,QAAQ,QAAQ,YAAY,KAAG,IAepH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-response.spec.d.ts","sourceRoot":"","sources":["../src/format-response.spec.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.spec.d.ts","sourceRoot":"","sources":["../src/index.spec.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,OAAO,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Response, NextFunction } from 'express';
|
|
2
|
+
import { Writer, Message, Type } from 'protobufjs';
|
|
3
|
+
|
|
4
|
+
/*!
|
|
5
|
+
* Source https://github.com/donmahallem/js-libs Package: turbo-pb
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
declare type MessageKey<T extends object> = ({
|
|
9
|
+
encode: (msg: T) => Writer;
|
|
10
|
+
} & typeof Message) | Type;
|
|
11
|
+
/**
|
|
12
|
+
* Formats response to either json or protobuf
|
|
13
|
+
* @param msg message to be formated
|
|
14
|
+
* @param message Message to convert
|
|
15
|
+
* @param res express Response object
|
|
16
|
+
* @param next express Next function
|
|
17
|
+
*/
|
|
18
|
+
declare const formatResponse: <T extends object>(msg: T, message: MessageKey<T>, res: Response, next: NextFunction) => void;
|
|
19
|
+
|
|
20
|
+
export { formatResponse };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Source https://github.com/donmahallem/js-libs Package: turbo-pb
|
|
3
|
+
*/
|
|
4
|
+
import { NextFunction, Response } from 'express';
|
|
5
|
+
import { Message, Type, Writer } from 'protobufjs';
|
|
6
|
+
declare type MessageKey<T extends object> = ({
|
|
7
|
+
encode: (msg: T) => Writer;
|
|
8
|
+
} & typeof Message) | Type;
|
|
9
|
+
/**
|
|
10
|
+
* Formats response to either json or protobuf
|
|
11
|
+
* @param msg message to be formated
|
|
12
|
+
* @param message Message to convert
|
|
13
|
+
* @param res express Response object
|
|
14
|
+
* @param next express Next function
|
|
15
|
+
*/
|
|
16
|
+
export declare const formatResponse: <T extends object>(msg: T, message: MessageKey<T>, res: Response, next: NextFunction) => void;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Source https://github.com/donmahallem/js-libs Package: turbo-pb
|
|
3
|
+
*/
|
|
4
|
+
import { NextFunction, Response } from 'express';
|
|
5
|
+
import { Message, Type, Writer } from 'protobufjs';
|
|
6
|
+
declare type MessageKey<T extends object> = ({
|
|
7
|
+
encode: (msg: T) => Writer;
|
|
8
|
+
} & typeof Message) | Type;
|
|
9
|
+
/**
|
|
10
|
+
* Formats response to either json or protobuf
|
|
11
|
+
* @param msg message to be formated
|
|
12
|
+
* @param message Message to convert
|
|
13
|
+
* @param res express Response object
|
|
14
|
+
* @param next express Next function
|
|
15
|
+
*/
|
|
16
|
+
export declare const formatResponse: <T extends object>(msg: T, message: MessageKey<T>, res: Response, next: NextFunction) => void;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=format-response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-response.d.ts","sourceRoot":"","sources":["../../src/format-response.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEnD,aAAK,UAAU,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC;IACjC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAC;CAC9B,GAAG,OAAO,OAAO,CAAC,GAAG,IAAI,CAAC;AAC3B;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,0DAA2D,QAAQ,QAAQ,YAAY,KAAG,IAepH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-response.spec.d.ts","sourceRoot":"","sources":["../../src/format-response.spec.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.spec.d.ts","sourceRoot":"","sources":["../../src/index.spec.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,OAAO,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -28,6 +28,6 @@ const formatResponse = (msg, message, res, next) => {
|
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
export { formatResponse };
|
|
31
|
-
// BUILD:
|
|
31
|
+
// BUILD: Sun Dec 05 2021 18:05:46 GMT+0100 (Central European Standard Time)
|
|
32
32
|
|
|
33
33
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Source https://github.com/donmahallem/js-libs Package: turbo-pb
|
|
3
|
+
*/
|
|
4
|
+
import { NextFunction, Response } from 'express';
|
|
5
|
+
import { Message, Type, Writer } from 'protobufjs';
|
|
6
|
+
declare type MessageKey<T extends object> = ({
|
|
7
|
+
encode: (msg: T) => Writer;
|
|
8
|
+
} & typeof Message) | Type;
|
|
9
|
+
/**
|
|
10
|
+
* Formats response to either json or protobuf
|
|
11
|
+
* @param msg message to be formated
|
|
12
|
+
* @param message Message to convert
|
|
13
|
+
* @param res express Response object
|
|
14
|
+
* @param next express Next function
|
|
15
|
+
*/
|
|
16
|
+
export declare const formatResponse: <T extends object>(msg: T, message: MessageKey<T>, res: Response, next: NextFunction) => void;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=format-response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-response.d.ts","sourceRoot":"","sources":["../src/format-response.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEnD,aAAK,UAAU,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC;IACjC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAC;CAC9B,GAAG,OAAO,OAAO,CAAC,GAAG,IAAI,CAAC;AAC3B;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,0DAA2D,QAAQ,QAAQ,YAAY,KAAG,IAepH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-response.spec.d.ts","sourceRoot":"","sources":["../src/format-response.spec.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.spec.d.ts","sourceRoot":"","sources":["../src/index.spec.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,OAAO,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@donmahallem/turbo-pb",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.17",
|
|
4
4
|
"description": "Protobuf Helpers for express.js",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"protobufjs": "^6.10.2"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@donmahallem/turbo": "^2.2.
|
|
63
|
+
"@donmahallem/turbo": "^2.2.8"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "d4724ecc296890938f010142b87080cc534956a2"
|
|
66
66
|
}
|