1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 | import * as core from "api-service-core";
|
23 |
|
24 | import { amqp, cors, harden, KeycloakPlugin, remote_config, prometheus, ua, render, webhooks, UMA } from "./plugins";
|
25 | export { amqp, cors, harden, KeycloakPlugin, remote_config, prometheus, ua, render, webhooks, UMA } from "./plugins";
|
26 | import { apidocs, api_config, decrypt, encrypt, local_file, redact, redirect, static_assets } from "./middleware";
|
27 | export { apidocs, api_config, decrypt, encrypt, local_file, redact, redirect, static_assets } from "./middleware";
|
28 |
|
29 | export { Chassis, IChassisPlugin, IOperation, IChassisFeature, IChassisDataStore, IChassisConfig, IChassisContext, IChassisMiddleware, IChassisLogger } from "api-service-core";
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 | let default_plugins = function() {
|
36 | this.registerPlugin( new amqp );
|
37 | this.registerPlugin( new cors );
|
38 | this.registerPlugin( new harden );
|
39 | this.registerPlugin( new KeycloakPlugin );
|
40 | this.registerPlugin( new UMA );
|
41 | this.registerPlugin( new prometheus );
|
42 | this.registerPlugin( new ua );
|
43 | this.registerPlugin( new render );
|
44 | this.registerPlugin( new remote_config );
|
45 | this.registerPlugin( new webhooks );
|
46 |
|
47 | this.registerPlugin( new core.PipelinePlugin );
|
48 | this.registerPlugin( new core.after );
|
49 | this.registerPlugin( new core.before );
|
50 | this.registerPlugin( new core.graphql );
|
51 | this.registerPlugin( new core.logging );
|
52 | this.registerPlugin( new core.jwt );
|
53 | this.registerPlugin( new core.payload );
|
54 | this.registerPlugin( new core.OpenAPIPlugin );
|
55 | }
|
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 | let default_middleware = function() {
|
62 | this.registerFn( new core.bower_components );
|
63 | this.registerFn( new core.debug );
|
64 | this.registerFn( new core.DataDict );
|
65 | this.registerFn( new core.echo );
|
66 | this.registerFn( new core.gregarious );
|
67 | this.registerFn( new core.heartbeat );
|
68 | this.registerFn( new core.headers );
|
69 | this.registerFn( new core.mock );
|
70 | this.registerFn( new core.mount );
|
71 | this.registerFn( new core.not_found );
|
72 | this.registerFn( new core.proxy );
|
73 | this.registerFn( new core.request_uuid );
|
74 | this.registerFn( new core.sortby );
|
75 |
|
76 | this.registerFn( new apidocs);
|
77 | this.registerFn( new decrypt );
|
78 | this.registerFn( new encrypt );
|
79 | this.registerFn( new local_file );
|
80 | this.registerFn( new api_config );
|
81 | this.registerFn( new redact );
|
82 | this.registerFn( new redirect );
|
83 | this.registerFn( new static_assets );
|
84 | }
|
85 |
|
86 | export function default_features() {
|
87 | default_plugins.apply(this);
|
88 | default_middleware.apply(this);
|
89 | }
|
90 |
|