temba 0.11.0 → 0.12.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 +52 -14
- package/config/index.d.ts +4 -2
- package/config/index.js +6 -0
- package/config/index.js.map +1 -1
- package/package.json +1 -1
- package/routes/get.d.ts +1 -1
- package/routes/get.js +33 -3
- package/routes/get.js.map +1 -1
- package/routes/routes.d.ts +1 -1
- package/routes/routes.js +3 -3
- package/routes/routes.js.map +1 -1
- package/routes/types.d.ts +1 -0
package/README.md
CHANGED
|
@@ -62,7 +62,7 @@ Alternatively, add Temba to your app manually:
|
|
|
62
62
|
2. Example code to create a Temba server:
|
|
63
63
|
|
|
64
64
|
```js
|
|
65
|
-
import temba from
|
|
65
|
+
import temba from 'temba'
|
|
66
66
|
const server = temba.create()
|
|
67
67
|
|
|
68
68
|
const port = process.env.PORT || 3000
|
|
@@ -226,14 +226,10 @@ const config = {
|
|
|
226
226
|
requestBodyValidator: {
|
|
227
227
|
post: (resourceName, requestBody) => {
|
|
228
228
|
// Do not allow Pokemons to be created: 400 Bad Request
|
|
229
|
-
if (resourceName === 'pokemons')
|
|
230
|
-
return 'You are not allowed to create new Pokemons'
|
|
229
|
+
if (resourceName === 'pokemons') return 'You are not allowed to create new Pokemons'
|
|
231
230
|
|
|
232
231
|
// Add a genre to Star Trek films:
|
|
233
|
-
if (
|
|
234
|
-
resourceName === 'movies' &&
|
|
235
|
-
requestBody.title.startsWith('Star Trek')
|
|
236
|
-
)
|
|
232
|
+
if (resourceName === 'movies' && requestBody.title.startsWith('Star Trek'))
|
|
237
233
|
return { ...requestBody, genre: 'Science Fiction' }
|
|
238
234
|
|
|
239
235
|
// If you end up here, void will be returned, so the request will just be saved.
|
|
@@ -244,6 +240,48 @@ const config = {
|
|
|
244
240
|
const server = temba.create(config)
|
|
245
241
|
```
|
|
246
242
|
|
|
243
|
+
## Response body interception
|
|
244
|
+
|
|
245
|
+
To change the response body of a `GET` request, configure a `responseBodyInterceptor`, and return the updated response body:
|
|
246
|
+
|
|
247
|
+
```js
|
|
248
|
+
const config = {
|
|
249
|
+
responseBodyInterceptor: (resourceName, id, responseBody) => {
|
|
250
|
+
return resourceName === 'movies' ? {
|
|
251
|
+
if (id) {
|
|
252
|
+
// responseBody is an object
|
|
253
|
+
return {
|
|
254
|
+
...responseBody,
|
|
255
|
+
stuff: 'more stuff',
|
|
256
|
+
}
|
|
257
|
+
} : {
|
|
258
|
+
// responseBody is an array
|
|
259
|
+
return responseBody.map(x => (
|
|
260
|
+
{
|
|
261
|
+
...x,
|
|
262
|
+
stuff: 'more stuff'
|
|
263
|
+
}
|
|
264
|
+
))
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
// If you end up here, the response body will just be returned unchanged.
|
|
269
|
+
},
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
const server = temba.create(config)
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
`responseBodyInterceptor` is a callback function that provides the `resourceName`, `responseBody`, and the `id`. Depending on whether it's a collection or item request, the `responseBody` is either an array or object, and the `id' can be `undefined`.
|
|
276
|
+
|
|
277
|
+
In the example above we check for the `id` being defined, but a runtime check to determine the type of `responseBody` would also suffice.
|
|
278
|
+
|
|
279
|
+
Whatever you return in this function will become the response body and will be serialized as JSON and returned to the client.
|
|
280
|
+
|
|
281
|
+
If you don't return anything, the response body will be sent as-is.
|
|
282
|
+
|
|
283
|
+
The `responseBodyInterceptor` will only be called when the response was successful, i.e. a `200 OK` status code.
|
|
284
|
+
|
|
247
285
|
## Custom router
|
|
248
286
|
|
|
249
287
|
Although `temba.create()` returns an Express instance, adding your own routes, as you would normally do with Express, is not possible:
|
|
@@ -280,7 +318,7 @@ router.get('/about', (req, res) => {
|
|
|
280
318
|
|
|
281
319
|
// Add the custom router to Temba config
|
|
282
320
|
const config = {
|
|
283
|
-
customRouter: router
|
|
321
|
+
customRouter: router,
|
|
284
322
|
}
|
|
285
323
|
|
|
286
324
|
const server = temba.create(config)
|
|
@@ -312,10 +350,10 @@ const config = {
|
|
|
312
350
|
const server = temba.create(config)
|
|
313
351
|
```
|
|
314
352
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
353
|
+
- `/` will be handled by Temba, and will return the `staticFolder` (`build`) folder contents
|
|
354
|
+
- `/stuff` and `/api/stuff` will be handled by the custom router
|
|
355
|
+
- `/movies` will return a `404 Not Found`, because of `apiPrefix`
|
|
356
|
+
- `/api/movies` will return movies, handled by Temba
|
|
319
357
|
|
|
320
358
|
### Config settings overview
|
|
321
359
|
|
|
@@ -356,8 +394,8 @@ These are all the possible settings:
|
|
|
356
394
|
| `resourceNames` | See [Allowing specific resources only](#allowing-specific-resources-only) |
|
|
357
395
|
| `connectionString` | See [MongoDB](#mongodb) |
|
|
358
396
|
| `staticFolder` | See [Static assets](#static-assets) |
|
|
359
|
-
| `apiPrefix` | See [API prefix](#api-prefix)
|
|
360
|
-
| `customRouter`
|
|
397
|
+
| `apiPrefix` | See [API prefix](#api-prefix) |
|
|
398
|
+
| `customRouter` | See [Custom router](#custom-router) |
|
|
361
399
|
| `cacheControl` | The `Cache-control` response header value for each GET request. |
|
|
362
400
|
| `delay` | After processing the request, the delay in milliseconds before the request should be sent. |
|
|
363
401
|
| `requestBodyValidator` | See [Request body validation or mutation](#request-body-validation-or-mutation) |
|
package/config/index.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { Router } from 'express';
|
|
2
|
-
import { RequestBodyValidator } from '../routes/types';
|
|
2
|
+
import { RequestBodyValidator, ResponseBodyInterceptor } from '../routes/types';
|
|
3
3
|
export declare type Config = {
|
|
4
4
|
validateResources: boolean;
|
|
5
5
|
resourceNames: string[];
|
|
6
6
|
apiPrefix: string;
|
|
7
7
|
cacheControl: string;
|
|
8
8
|
requestBodyValidator: RequestBodyValidator;
|
|
9
|
+
responseBodyInterceptor: ResponseBodyInterceptor;
|
|
9
10
|
staticFolder: string;
|
|
10
11
|
connectionString: string;
|
|
11
12
|
delay: number;
|
|
12
13
|
customRouter: Router;
|
|
13
14
|
};
|
|
14
|
-
export declare type RouterConfig = Pick<Config, 'validateResources' | 'resourceNames' | 'apiPrefix' | 'cacheControl' | 'requestBodyValidator'>;
|
|
15
|
+
export declare type RouterConfig = Pick<Config, 'validateResources' | 'resourceNames' | 'apiPrefix' | 'cacheControl' | 'requestBodyValidator' | 'responseBodyInterceptor'>;
|
|
15
16
|
export declare type UserConfig = {
|
|
16
17
|
resourceNames?: string[];
|
|
17
18
|
validateResources?: boolean;
|
|
@@ -21,6 +22,7 @@ export declare type UserConfig = {
|
|
|
21
22
|
cacheControl?: string;
|
|
22
23
|
delay?: number;
|
|
23
24
|
requestBodyValidator?: RequestBodyValidator;
|
|
25
|
+
responseBodyInterceptor?: ResponseBodyInterceptor;
|
|
24
26
|
customRouter?: Router;
|
|
25
27
|
};
|
|
26
28
|
export declare function initConfig(userConfig: UserConfig): Config;
|
package/config/index.js
CHANGED
|
@@ -20,6 +20,9 @@ const defaultConfig = {
|
|
|
20
20
|
// do nothing
|
|
21
21
|
},
|
|
22
22
|
},
|
|
23
|
+
responseBodyInterceptor: (resourceName, responseBody, id) => {
|
|
24
|
+
return responseBody;
|
|
25
|
+
},
|
|
23
26
|
customRouter: null,
|
|
24
27
|
};
|
|
25
28
|
function initConfig(userConfig) {
|
|
@@ -64,6 +67,9 @@ function initConfig(userConfig) {
|
|
|
64
67
|
config.requestBodyValidator.put = userConfig.requestBodyValidator.put;
|
|
65
68
|
}
|
|
66
69
|
}
|
|
70
|
+
if (userConfig.responseBodyInterceptor) {
|
|
71
|
+
config.responseBodyInterceptor = userConfig.responseBodyInterceptor;
|
|
72
|
+
}
|
|
67
73
|
if (userConfig.customRouter) {
|
|
68
74
|
config.customRouter = userConfig.customRouter;
|
|
69
75
|
}
|
package/config/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":";;;AAuCA,MAAM,aAAa,GAAW;IAC5B,aAAa,EAAE,EAAE;IACjB,iBAAiB,EAAE,KAAK;IACxB,YAAY,EAAE,IAAI;IAClB,SAAS,EAAE,EAAE;IACb,gBAAgB,EAAE,IAAI;IACtB,YAAY,EAAE,UAAU;IACxB,KAAK,EAAE,CAAC;IACR,oBAAoB,EAAE;QACpB,IAAI,EAAE,GAAG,EAAE;YACT,aAAa;QACf,CAAC;QACD,KAAK,EAAE,GAAG,EAAE;YACV,aAAa;QACf,CAAC;QACD,GAAG,EAAE,GAAG,EAAE;YACR,aAAa;QACf,CAAC;KACF;IACD,uBAAuB,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,EAAE,EAAE,EAAE;QAC1D,OAAO,YAAY,CAAA;IACrB,CAAC;IACD,YAAY,EAAE,IAAI;CACnB,CAAA;AAED,SAAgB,UAAU,CAAC,UAAsB;IAC/C,IAAI,CAAC,UAAU;QAAE,OAAO,aAAa,CAAA;IAErC,MAAM,MAAM,GAAG,kBAAK,aAAa,CAAY,CAAA;IAE7C,IAAI,UAAU,CAAC,aAAa,IAAI,UAAU,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE;QACnE,MAAM,CAAC,aAAa,GAAG,UAAU,CAAC,aAAa,CAAA;QAC/C,MAAM,CAAC,iBAAiB,GAAG,IAAI,CAAA;KAChC;IAED,IAAI,UAAU,CAAC,YAAY,EAAE;QAC3B,MAAM,CAAC,YAAY,GAAG,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAA;KAC3E;IAED,IAAI,UAAU,CAAC,SAAS,EAAE;QACxB,MAAM,CAAC,SAAS;YACd,GAAG,GAAG,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,GAAG,GA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,GAAG,CAAA;SACtE;KACF;IAED,IAAI,UAAU,CAAC,uBAAuB,EAAE;QACtC,MAAM,CAAC,uBAAuB,GAAG,UAAU,CAAC,uBAAuB,CAAA;KACpE;IAED,IAAI,UAAU,CAAC,YAAY,EAAE;QAC3B,MAAM,CAAC,YAAY,GAAG,UAAU,CAAC,YAAY,CAAA;KAC9C;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AAnED,gCAmEC"}
|
package/package.json
CHANGED
package/routes/get.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare function createGetRoutes(queries: any, cacheControl: any): {
|
|
1
|
+
declare function createGetRoutes(queries: any, cacheControl: any, responseBodyInterceptor: any): {
|
|
2
2
|
handleGetResource: (req: any, res: any, next: any) => Promise<any>;
|
|
3
3
|
};
|
|
4
4
|
export { createGetRoutes };
|
package/routes/get.js
CHANGED
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.createGetRoutes = void 0;
|
|
13
|
-
function createGetRoutes(queries, cacheControl) {
|
|
13
|
+
function createGetRoutes(queries, cacheControl, responseBodyInterceptor) {
|
|
14
14
|
function handleGetResource(req, res, next) {
|
|
15
15
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16
16
|
try {
|
|
@@ -22,13 +22,43 @@ function createGetRoutes(queries, cacheControl) {
|
|
|
22
22
|
res.status(404);
|
|
23
23
|
return res.send();
|
|
24
24
|
}
|
|
25
|
+
let theItem = item;
|
|
26
|
+
if (responseBodyInterceptor) {
|
|
27
|
+
try {
|
|
28
|
+
theItem = responseBodyInterceptor(resourceName, item, id);
|
|
29
|
+
if (!theItem)
|
|
30
|
+
theItem = item;
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
return res
|
|
34
|
+
.status(500)
|
|
35
|
+
.json({
|
|
36
|
+
message: 'Error in responseBodyInterceptor: ' + error.message,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
25
40
|
res.status(200);
|
|
26
|
-
res.json(
|
|
41
|
+
res.json(theItem);
|
|
27
42
|
return res.send();
|
|
28
43
|
}
|
|
29
44
|
const items = yield queries.getAll(resourceName);
|
|
45
|
+
let theItems = items;
|
|
46
|
+
if (responseBodyInterceptor) {
|
|
47
|
+
try {
|
|
48
|
+
theItems = responseBodyInterceptor(resourceName, items);
|
|
49
|
+
if (!theItems)
|
|
50
|
+
theItems = items;
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
return res
|
|
54
|
+
.status(500)
|
|
55
|
+
.json({
|
|
56
|
+
message: 'Error in responseBodyInterceptor: ' + error.message,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
30
60
|
res.status(200);
|
|
31
|
-
res.json(
|
|
61
|
+
res.json(theItems);
|
|
32
62
|
return res.send();
|
|
33
63
|
}
|
|
34
64
|
catch (error) {
|
package/routes/get.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../src/routes/get.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../src/routes/get.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,SAAS,eAAe,CAAC,OAAO,EAAE,YAAY,EAAE,uBAAuB;IACrE,SAAe,iBAAiB,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI;;YAC7C,IAAI;gBACF,MAAM,EAAE,YAAY,EAAE,EAAE,EAAE,GAAG,GAAG,CAAC,WAAW,CAAA;gBAE5C,GAAG,CAAC,GAAG,CAAC,eAAe,EAAE,YAAY,CAAC,CAAA;gBAEtC,IAAI,EAAE,EAAE;oBACN,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAA;oBAEpD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,GAAG,CAAC,IAAI,EAAE,CAAA;aAClB;YAAC,OAAO,KAAc,EAAE;gBACvB,OAAO,IAAI,CAAC,KAAK,CAAC,CAAA;aACnB;QACH,CAAC;KAAA;IAED,OAAO;QACL,iBAAiB;KAClB,CAAA;AACH,CAAC;AAEQ,0CAAe"}
|
package/routes/routes.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RouterConfig } from '../config';
|
|
2
|
-
declare function createResourceRouter(queries: any,
|
|
2
|
+
declare function createResourceRouter(queries: any, routerConfig: RouterConfig): import("express-serve-static-core").Router;
|
|
3
3
|
declare const rootRouter: import("express-serve-static-core").Router;
|
|
4
4
|
declare function handleMethodNotAllowed(_: any, res: any): void;
|
|
5
5
|
declare function handleNotFound(_: any, res: any): void;
|
package/routes/routes.js
CHANGED
|
@@ -20,9 +20,9 @@ const patch_1 = require("./patch");
|
|
|
20
20
|
const delete_1 = require("./delete");
|
|
21
21
|
const urlMiddleware_1 = require("../urls/urlMiddleware");
|
|
22
22
|
const express_1 = __importDefault(require("express"));
|
|
23
|
-
function createResourceRouter(queries,
|
|
24
|
-
const { validateResources, resourceNames, apiPrefix, cacheControl, requestBodyValidator, } =
|
|
25
|
-
const { handleGetResource } = (0, get_1.createGetRoutes)(queries, cacheControl);
|
|
23
|
+
function createResourceRouter(queries, routerConfig) {
|
|
24
|
+
const { validateResources, resourceNames, apiPrefix, cacheControl, requestBodyValidator, responseBodyInterceptor, } = routerConfig;
|
|
25
|
+
const { handleGetResource } = (0, get_1.createGetRoutes)(queries, cacheControl, responseBodyInterceptor);
|
|
26
26
|
const { handlePost } = (0, post_1.createPostRoutes)(queries, requestBodyValidator);
|
|
27
27
|
const { handlePut } = (0, put_1.createPutRoutes)(queries, requestBodyValidator);
|
|
28
28
|
const { handlePatch } = (0, patch_1.createPatchRoutes)(queries, requestBodyValidator);
|
package/routes/routes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../src/routes/routes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+BAAuC;AACvC,iCAAyC;AACzC,+BAAuC;AACvC,mCAA2C;AAC3C,qCAA6C;AAC7C,yDAG8B;AAE9B,sDAA6B;AAG7B,SAAS,oBAAoB,
|
|
1
|
+
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../src/routes/routes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+BAAuC;AACvC,iCAAyC;AACzC,+BAAuC;AACvC,mCAA2C;AAC3C,qCAA6C;AAC7C,yDAG8B;AAE9B,sDAA6B;AAG7B,SAAS,oBAAoB,CAAC,OAAO,EAAE,YAA0B;IAC/D,MAAM,EACJ,iBAAiB,EACjB,aAAa,EACb,SAAS,EACT,YAAY,EACZ,oBAAoB,EACpB,uBAAuB,GACxB,GAAG,YAAY,CAAA;IAEhB,MAAM,EAAE,iBAAiB,EAAE,GAAG,IAAA,qBAAe,EAC3C,OAAO,EACP,YAAY,EACZ,uBAAuB,CACxB,CAAA;IACD,MAAM,EAAE,UAAU,EAAE,GAAG,IAAA,uBAAgB,EAAC,OAAO,EAAE,oBAAoB,CAAC,CAAA;IACtE,MAAM,EAAE,SAAS,EAAE,GAAG,IAAA,qBAAe,EAAC,OAAO,EAAE,oBAAoB,CAAC,CAAA;IACpE,MAAM,EAAE,WAAW,EAAE,GAAG,IAAA,yBAAiB,EAAC,OAAO,EAAE,oBAAoB,CAAC,CAAA;IACxE,MAAM,EAAE,YAAY,EAAE,GAAG,IAAA,2BAAkB,EAAC,OAAO,CAAC,CAAA;IAEpD,MAAM,gBAAgB,GAAG,IAAA,gDAAgC,EACvD,iBAAiB,EACjB,aAAa,CACd,CAAA;IACD,MAAM,gBAAgB,GAAG,IAAA,yCAAyB,EAAC,SAAS,CAAC,CAAA;IAE7D,MAAM,cAAc,GAAG,iBAAO,CAAC,MAAM,EAAE,CAAA;IAEvC,cAAc;QACZ,6GAA6G;SAC5G,GAAG,CA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