@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.
Files changed (44) hide show
  1. package/dist/cjs/dist/format-response.d.ts +17 -0
  2. package/dist/cjs/dist/format-response.spec.d.ts +4 -0
  3. package/dist/cjs/dist/index.d.ts +4 -0
  4. package/dist/cjs/dist/index.spec.d.ts +4 -0
  5. package/dist/cjs/dist/types2/format-response.d.ts +18 -0
  6. package/dist/cjs/dist/types2/format-response.d.ts.map +1 -0
  7. package/dist/cjs/dist/types2/format-response.spec.d.ts +5 -0
  8. package/dist/cjs/dist/types2/format-response.spec.d.ts.map +1 -0
  9. package/dist/cjs/dist/types2/index.d.ts +5 -0
  10. package/dist/cjs/dist/types2/index.d.ts.map +1 -0
  11. package/dist/cjs/dist/types2/index.spec.d.ts +5 -0
  12. package/dist/cjs/dist/types2/index.spec.d.ts.map +1 -0
  13. package/dist/cjs/index.js +1 -1
  14. package/dist/cjs/types2/format-response.d.ts +18 -0
  15. package/dist/cjs/types2/format-response.d.ts.map +1 -0
  16. package/dist/cjs/types2/format-response.spec.d.ts +5 -0
  17. package/dist/cjs/types2/format-response.spec.d.ts.map +1 -0
  18. package/dist/cjs/types2/index.d.ts +5 -0
  19. package/dist/cjs/types2/index.d.ts.map +1 -0
  20. package/dist/cjs/types2/index.spec.d.ts +5 -0
  21. package/dist/cjs/types2/index.spec.d.ts.map +1 -0
  22. package/dist/dts/index.d.ts +20 -0
  23. package/dist/esm/dist/format-response.d.ts +17 -0
  24. package/dist/esm/dist/format-response.spec.d.ts +4 -0
  25. package/dist/esm/dist/index.d.ts +4 -0
  26. package/dist/esm/dist/index.spec.d.ts +4 -0
  27. package/dist/esm/dist/types2/format-response.d.ts +18 -0
  28. package/dist/esm/dist/types2/format-response.d.ts.map +1 -0
  29. package/dist/esm/dist/types2/format-response.spec.d.ts +5 -0
  30. package/dist/esm/dist/types2/format-response.spec.d.ts.map +1 -0
  31. package/dist/esm/dist/types2/index.d.ts +5 -0
  32. package/dist/esm/dist/types2/index.d.ts.map +1 -0
  33. package/dist/esm/dist/types2/index.spec.d.ts +5 -0
  34. package/dist/esm/dist/types2/index.spec.d.ts.map +1 -0
  35. package/dist/esm/index.js +1 -1
  36. package/dist/esm/types2/format-response.d.ts +18 -0
  37. package/dist/esm/types2/format-response.d.ts.map +1 -0
  38. package/dist/esm/types2/format-response.spec.d.ts +5 -0
  39. package/dist/esm/types2/format-response.spec.d.ts.map +1 -0
  40. package/dist/esm/types2/index.d.ts +5 -0
  41. package/dist/esm/types2/index.d.ts.map +1 -0
  42. package/dist/esm/types2/index.spec.d.ts +5 -0
  43. package/dist/esm/types2/index.spec.d.ts.map +1 -0
  44. 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,4 @@
1
+ /*!
2
+ * Source https://github.com/donmahallem/js-libs Package: turbo-pb
3
+ */
4
+ import 'mocha';
@@ -0,0 +1,4 @@
1
+ /*!
2
+ * Source https://github.com/donmahallem/js-libs Package: turbo-pb
3
+ */
4
+ export { formatResponse } from './format-response';
@@ -0,0 +1,4 @@
1
+ /*!
2
+ * Source https://github.com/donmahallem/js-libs Package: turbo-pb
3
+ */
4
+ import 'mocha';
@@ -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,5 @@
1
+ /*!
2
+ * Source https://github.com/donmahallem/js-libs Package: turbo-pb
3
+ */
4
+ import 'mocha';
5
+ //# sourceMappingURL=format-response.spec.d.ts.map
@@ -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,5 @@
1
+ /*!
2
+ * Source https://github.com/donmahallem/js-libs Package: turbo-pb
3
+ */
4
+ export { formatResponse } from './format-response';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -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,5 @@
1
+ /*!
2
+ * Source https://github.com/donmahallem/js-libs Package: turbo-pb
3
+ */
4
+ import 'mocha';
5
+ //# sourceMappingURL=index.spec.d.ts.map
@@ -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: Sat Nov 20 2021 17:05:09 GMT+0100 (Central European Standard Time)
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,5 @@
1
+ /*!
2
+ * Source https://github.com/donmahallem/js-libs Package: turbo-pb
3
+ */
4
+ import 'mocha';
5
+ //# sourceMappingURL=format-response.spec.d.ts.map
@@ -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,5 @@
1
+ /*!
2
+ * Source https://github.com/donmahallem/js-libs Package: turbo-pb
3
+ */
4
+ export { formatResponse } from './format-response';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -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,5 @@
1
+ /*!
2
+ * Source https://github.com/donmahallem/js-libs Package: turbo-pb
3
+ */
4
+ import 'mocha';
5
+ //# sourceMappingURL=index.spec.d.ts.map
@@ -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,4 @@
1
+ /*!
2
+ * Source https://github.com/donmahallem/js-libs Package: turbo-pb
3
+ */
4
+ import 'mocha';
@@ -0,0 +1,4 @@
1
+ /*!
2
+ * Source https://github.com/donmahallem/js-libs Package: turbo-pb
3
+ */
4
+ export { formatResponse } from './format-response';
@@ -0,0 +1,4 @@
1
+ /*!
2
+ * Source https://github.com/donmahallem/js-libs Package: turbo-pb
3
+ */
4
+ import 'mocha';
@@ -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,5 @@
1
+ /*!
2
+ * Source https://github.com/donmahallem/js-libs Package: turbo-pb
3
+ */
4
+ import 'mocha';
5
+ //# sourceMappingURL=format-response.spec.d.ts.map
@@ -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,5 @@
1
+ /*!
2
+ * Source https://github.com/donmahallem/js-libs Package: turbo-pb
3
+ */
4
+ export { formatResponse } from './format-response';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -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,5 @@
1
+ /*!
2
+ * Source https://github.com/donmahallem/js-libs Package: turbo-pb
3
+ */
4
+ import 'mocha';
5
+ //# sourceMappingURL=index.spec.d.ts.map
@@ -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: Sat Nov 20 2021 17:05:09 GMT+0100 (Central European Standard Time)
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,5 @@
1
+ /*!
2
+ * Source https://github.com/donmahallem/js-libs Package: turbo-pb
3
+ */
4
+ import 'mocha';
5
+ //# sourceMappingURL=format-response.spec.d.ts.map
@@ -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,5 @@
1
+ /*!
2
+ * Source https://github.com/donmahallem/js-libs Package: turbo-pb
3
+ */
4
+ export { formatResponse } from './format-response';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -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,5 @@
1
+ /*!
2
+ * Source https://github.com/donmahallem/js-libs Package: turbo-pb
3
+ */
4
+ import 'mocha';
5
+ //# sourceMappingURL=index.spec.d.ts.map
@@ -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.13",
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.4"
63
+ "@donmahallem/turbo": "^2.2.8"
64
64
  },
65
- "gitHead": "b8d098e80592c3c842fd2c1437a3ba2bcd7b40d6"
65
+ "gitHead": "d4724ecc296890938f010142b87080cc534956a2"
66
66
  }