@donmahallem/turbo 2.6.0 → 3.0.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.
package/README.md CHANGED
@@ -3,13 +3,13 @@
3
3
 
4
4
  # ➤ <h1 align="center">@donmahallem/turbo</h1>
5
5
  <p align="center">
6
- <a href="https://github.com/donmahallem/js-libs/actions?query=workflow%3ATest+branch%3Amaster"><img alt="Test" src="https://github.com/donmahallem/js-libs/workflows/Test/badge.svg?branch=master&event=push" height="20"/></a>
7
- <a href="https://codecov.io/gh/donmahallem/js-libs/donmahallem/master/packages/js-libs"><img alt="codecov" src="https://codecov.io/gh/donmahallem/js-libs/branch/master/graph/badge.svg?flag=Turbo" height="20"/></a>
6
+ <a href="https://github.com/donmahallem/turbo/actions?query=workflow%3ATest+branch%3Amaster"><img alt="Test" src="https://github.com/donmahallem/turbo/workflows/Test/badge.svg?branch=master&event=push" height="20"/></a>
7
+ <a href="https://codecov.io/gh/donmahallem/turbo/donmahallem/master/packages/turbo"><img alt="codecov" src="https://codecov.io/gh/donmahallem/turbo/branch/master/graph/badge.svg?flag=Turbo" height="20"/></a>
8
8
  <a href="https://badge.fury.io/js/%40donmahallem%2Fturbo"><img alt="npm version" src="https://badge.fury.io/js/%40donmahallem%2Fturbo.svg" height="20"/></a>
9
- <a href="https://github.com/donmahallem/js-libs/blob/master/LICENSE"><img alt="GitHub license" src="https://img.shields.io/github/license/donmahallem/js-libs" height="20"/></a>
10
- <a href="https://david-dm.org/donmahallem/js-libs?path=packages/turbo"><img alt="dependencies Status" src="https://david-dm.org/donmahallem/js-libs/status.svg?path=packages/turbo" height="20"/></a>
11
- <a href="https://david-dm.org/donmahallem/js-libs?path=packages/turbo&type=dev"><img alt="devDependencies Status" src="https://david-dm.org/donmahallem/js-libs/dev-status.svg?path=packages/turbo" height="20"/></a>
12
- <a href="https://github.com/donmahallem/js-libs/graphs/contributors"><img alt="GitHub contributors" src="https://img.shields.io/github/contributors-anon/donmahallem/js-libs" height="20"/></a>
9
+ <a href="https://github.com/donmahallem/turbo/blob/master/LICENSE"><img alt="GitHub license" src="https://img.shields.io/github/license/donmahallem/turbo" height="20"/></a>
10
+ <a href="https://david-dm.org/donmahallem/turbo?path=packages/turbo"><img alt="dependencies Status" src="https://david-dm.org/donmahallem/turbo/status.svg?path=packages/turbo" height="20"/></a>
11
+ <a href="https://david-dm.org/donmahallem/turbo?path=packages/turbo&type=dev"><img alt="devDependencies Status" src="https://david-dm.org/donmahallem/turbo/dev-status.svg?path=packages/turbo" height="20"/></a>
12
+ <a href="https://github.com/donmahallem/turbo/graphs/contributors"><img alt="GitHub contributors" src="https://img.shields.io/github/contributors-anon/donmahallem/turbo" height="20"/></a>
13
13
  </p>
14
14
 
15
15
 
@@ -2,9 +2,9 @@
2
2
 
3
3
  const promiseToResponse = require('./promise-to-response.cjs');
4
4
 
5
- /*
5
+ /**
6
6
  * Package @donmahallem/turbo
7
- * Source https://github.com/donmahallem/js-libs/tree/master/packages/turbo
7
+ * Source https://github.com/donmahallem/turbo
8
8
  */
9
9
  /**
10
10
  * Does create an request handler that transforms a provided promise
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- /*
3
+ /**
4
4
  * Package @donmahallem/turbo
5
- * Source https://github.com/donmahallem/js-libs/tree/master/packages/turbo
5
+ * Source https://github.com/donmahallem/turbo
6
6
  */
7
7
  /**
8
8
  * Awaits an promise and returns it
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- /*
3
+ /**
4
4
  * Package @donmahallem/turbo
5
- * Source https://github.com/donmahallem/js-libs/tree/master/packages/turbo
5
+ * Source https://github.com/donmahallem/turbo
6
6
  */
7
7
  /**
8
8
  * Error that should be compatible with express errors
@@ -1,8 +1,8 @@
1
1
  import { promiseToResponse } from './promise-to-response.mjs';
2
2
 
3
- /*
3
+ /**
4
4
  * Package @donmahallem/turbo
5
- * Source https://github.com/donmahallem/js-libs/tree/master/packages/turbo
5
+ * Source https://github.com/donmahallem/turbo
6
6
  */
7
7
  /**
8
8
  * Does create an request handler that transforms a provided promise
@@ -1,6 +1,6 @@
1
- /*
1
+ /**
2
2
  * Package @donmahallem/turbo
3
- * Source https://github.com/donmahallem/js-libs/tree/master/packages/turbo
3
+ * Source https://github.com/donmahallem/turbo
4
4
  */
5
5
  /**
6
6
  * Awaits an promise and returns it
@@ -1,6 +1,6 @@
1
- /*
1
+ /**
2
2
  * Package @donmahallem/turbo
3
- * Source https://github.com/donmahallem/js-libs/tree/master/packages/turbo
3
+ * Source https://github.com/donmahallem/turbo
4
4
  */
5
5
  /**
6
6
  * Error that should be compatible with express errors
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Package @donmahallem/turbo
3
+ * Source https://github.com/donmahallem/turbo
4
+ */
1
5
  /**
2
6
  * Error Object to provide
3
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"error-response.d.ts","sourceRoot":"","sources":["../../src/error-response.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,KAAK,EAAE,IAAI,CAAC;IACZ;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACtB"}
1
+ {"version":3,"file":"error-response.d.ts","sourceRoot":"","sources":["../../src/error-response.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,KAAK,EAAE,IAAI,CAAC;IACZ;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACtB"}
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Package @donmahallem/turbo
3
+ * Source https://github.com/donmahallem/turbo
4
+ */
1
5
  export { promiseRequestHandler } from './promise-request-handler.js';
2
6
  export { promiseToResponse } from './promise-to-response.js';
3
7
  export { RequestError } from './request-error.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1,2 +1,6 @@
1
+ /**
2
+ * Package @donmahallem/turbo
3
+ * Source https://github.com/donmahallem/turbo
4
+ */
1
5
  import 'mocha';
2
6
  //# sourceMappingURL=index.spec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.spec.d.ts","sourceRoot":"","sources":["../../src/index.spec.ts"],"names":[],"mappings":"AAMA,OAAO,OAAO,CAAC"}
1
+ {"version":3,"file":"index.spec.d.ts","sourceRoot":"","sources":["../../src/index.spec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,OAAO,CAAC"}
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Package @donmahallem/turbo
3
+ * Source https://github.com/donmahallem/turbo
4
+ */
1
5
  import type { Request, RequestHandler, Response } from 'express';
2
6
  type MethodInterface<T> = (req?: Request, res?: Response<T>) => Promise<T>;
3
7
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"promise-request-handler.d.ts","sourceRoot":"","sources":["../../src/promise-request-handler.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAgB,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE/E,KAAK,eAAe,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;AAE3E;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,cAIhE,CAAC"}
1
+ {"version":3,"file":"promise-request-handler.d.ts","sourceRoot":"","sources":["../../src/promise-request-handler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAgB,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE/E,KAAK,eAAe,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;AAE3E;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,cAIhE,CAAC"}
@@ -1,2 +1,6 @@
1
+ /**
2
+ * Package @donmahallem/turbo
3
+ * Source https://github.com/donmahallem/turbo
4
+ */
1
5
  import 'mocha';
2
6
  //# sourceMappingURL=promise-request-handler.spec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"promise-request-handler.spec.d.ts","sourceRoot":"","sources":["../../src/promise-request-handler.spec.ts"],"names":[],"mappings":"AAOA,OAAO,OAAO,CAAC"}
1
+ {"version":3,"file":"promise-request-handler.spec.d.ts","sourceRoot":"","sources":["../../src/promise-request-handler.spec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,OAAO,CAAC"}
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Package @donmahallem/turbo
3
+ * Source https://github.com/donmahallem/turbo
4
+ */
1
5
  import type { NextFunction, Response } from 'express';
2
6
  type MethodType = <T>(prom: Promise<T>, res: Response, next?: NextFunction) => void;
3
7
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"promise-to-response.d.ts","sourceRoot":"","sources":["../../src/promise-to-response.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEtD,KAAK,UAAU,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,YAAY,KAAK,IAAI,CAAC;AAEpF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,UA0B/B,CAAC"}
1
+ {"version":3,"file":"promise-to-response.d.ts","sourceRoot":"","sources":["../../src/promise-to-response.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEtD,KAAK,UAAU,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,YAAY,KAAK,IAAI,CAAC;AAEpF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,UA0B/B,CAAC"}
@@ -1,2 +1,6 @@
1
+ /**
2
+ * Package @donmahallem/turbo
3
+ * Source https://github.com/donmahallem/turbo
4
+ */
1
5
  import 'mocha';
2
6
  //# sourceMappingURL=promise-to-response.spec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"promise-to-response.spec.d.ts","sourceRoot":"","sources":["../../src/promise-to-response.spec.ts"],"names":[],"mappings":"AAMA,OAAO,OAAO,CAAC"}
1
+ {"version":3,"file":"promise-to-response.spec.d.ts","sourceRoot":"","sources":["../../src/promise-to-response.spec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,OAAO,CAAC"}
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Package @donmahallem/turbo
3
+ * Source https://github.com/donmahallem/turbo
4
+ */
1
5
  /**
2
6
  * Error that should be compatible with express errors
3
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"request-error.d.ts","sourceRoot":"","sources":["../../src/request-error.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,qBAAa,YAAa,SAAQ,KAAK;aAQf,MAAM,EAAE,MAAM;IAPlC;;;;OAIG;gBAEC,OAAO,EAAE,MAAM,EACC,MAAM,GAAE,MAAY;CAK3C"}
1
+ {"version":3,"file":"request-error.d.ts","sourceRoot":"","sources":["../../src/request-error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,qBAAa,YAAa,SAAQ,KAAK;aAQf,MAAM,EAAE,MAAM;IAPlC;;;;OAIG;gBAEC,OAAO,EAAE,MAAM,EACC,MAAM,GAAE,MAAY;CAK3C"}
@@ -1,2 +1,6 @@
1
+ /**
2
+ * Package @donmahallem/turbo
3
+ * Source https://github.com/donmahallem/turbo
4
+ */
1
5
  import 'mocha';
2
6
  //# sourceMappingURL=request-error.spec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"request-error.spec.d.ts","sourceRoot":"","sources":["../../src/request-error.spec.ts"],"names":[],"mappings":"AAMA,OAAO,OAAO,CAAC"}
1
+ {"version":3,"file":"request-error.spec.d.ts","sourceRoot":"","sources":["../../src/request-error.spec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,OAAO,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@donmahallem/turbo",
3
- "version": "2.6.0",
3
+ "version": "3.0.0",
4
4
  "description": "Turbo Helpers for express.js",
5
5
  "types": "./dist/types/index.d.ts",
6
6
  "private": false,
@@ -29,7 +29,7 @@
29
29
  "version": "npm run build:readme && git add README.md",
30
30
  "clean": "rimraf ./dist ./.nyc_output ./coverage ./docs"
31
31
  },
32
- "homepage": "https://github.com/donmahallem/js-libs/tree/master/packages/turbo",
32
+ "homepage": "https://github.com/donmahallem/turbo",
33
33
  "author": {
34
34
  "name": "donmahallem",
35
35
  "email": "donmahallem@users.noreply.github.com",
@@ -37,11 +37,11 @@
37
37
  },
38
38
  "license": "Apache-2.0",
39
39
  "bugs": {
40
- "url": "https://github.com/donmahallem/js-libs/issues"
40
+ "url": "https://github.com/donmahallem/turbo/issues"
41
41
  },
42
42
  "repository": {
43
43
  "type": "git",
44
- "url": "https://github.com/donmahallem/js-libs.git"
44
+ "url": "https://github.com/donmahallem/turbo.git"
45
45
  },
46
46
  "engines": {
47
47
  "node": ">=20"
@@ -65,5 +65,5 @@
65
65
  "axios": "^1.0.0",
66
66
  "express": "^4.17.1"
67
67
  },
68
- "gitHead": "5caa5231032abc946c135e46b00e1a969a97ba3f"
68
+ "gitHead": "6df4e50cd881841dfe090786f333affe02ead780"
69
69
  }
@@ -1,6 +1,6 @@
1
- /*
1
+ /**
2
2
  * Package @donmahallem/turbo
3
- * Source https://github.com/donmahallem/js-libs/tree/master/packages/turbo
3
+ * Source https://github.com/donmahallem/turbo
4
4
  */
5
5
 
6
6
  /**
package/src/index.ts CHANGED
@@ -1,6 +1,6 @@
1
- /*
1
+ /**
2
2
  * Package @donmahallem/turbo
3
- * Source https://github.com/donmahallem/js-libs/tree/master/packages/turbo
3
+ * Source https://github.com/donmahallem/turbo
4
4
  */
5
5
 
6
6
  export { promiseRequestHandler } from './promise-request-handler.js';
@@ -1,6 +1,6 @@
1
- /*
1
+ /**
2
2
  * Package @donmahallem/turbo
3
- * Source https://github.com/donmahallem/js-libs/tree/master/packages/turbo
3
+ * Source https://github.com/donmahallem/turbo
4
4
  */
5
5
 
6
6
  import { IErrorResponse } from './error-response.js';
@@ -1,6 +1,6 @@
1
- /*
1
+ /**
2
2
  * Package @donmahallem/turbo
3
- * Source https://github.com/donmahallem/js-libs/tree/master/packages/turbo
3
+ * Source https://github.com/donmahallem/turbo
4
4
  */
5
5
 
6
6
  import { IErrorResponse } from './error-response.js';
@@ -1,6 +1,6 @@
1
- /*
1
+ /**
2
2
  * Package @donmahallem/turbo
3
- * Source https://github.com/donmahallem/js-libs/tree/master/packages/turbo
3
+ * Source https://github.com/donmahallem/turbo
4
4
  */
5
5
 
6
6
  /**