1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 | const core = require("api-service-core");
|
22 | const plugins_1 = require("./plugins");
|
23 | var plugins_2 = require("./plugins");
|
24 | exports.amqp = plugins_2.amqp;
|
25 | exports.cors = plugins_2.cors;
|
26 | exports.harden = plugins_2.harden;
|
27 | exports.remote_config = plugins_2.remote_config;
|
28 | exports.prometheus = plugins_2.prometheus;
|
29 | exports.ua = plugins_2.ua;
|
30 | exports.render = plugins_2.render;
|
31 | exports.webhooks = plugins_2.webhooks;
|
32 | const middleware_1 = require("./middleware");
|
33 | var middleware_2 = require("./middleware");
|
34 | exports.apidocs = middleware_2.apidocs;
|
35 | exports.api_config = middleware_2.api_config;
|
36 | exports.decrypt = middleware_2.decrypt;
|
37 | exports.encrypt = middleware_2.encrypt;
|
38 | exports.local_file = middleware_2.local_file;
|
39 | exports.redact = middleware_2.redact;
|
40 | exports.redirect = middleware_2.redirect;
|
41 | exports.static_assets = middleware_2.static_assets;
|
42 | var api_service_core_1 = require("api-service-core");
|
43 | exports.Chassis = api_service_core_1.Chassis;
|
44 |
|
45 |
|
46 |
|
47 |
|
48 | let default_plugins = function () {
|
49 | this.registerPlugin(new plugins_1.amqp);
|
50 | this.registerPlugin(new plugins_1.cors);
|
51 | this.registerPlugin(new plugins_1.harden);
|
52 | this.registerPlugin(new plugins_1.prometheus);
|
53 | this.registerPlugin(new plugins_1.ua);
|
54 | this.registerPlugin(new plugins_1.render);
|
55 | this.registerPlugin(new plugins_1.remote_config);
|
56 | this.registerPlugin(new plugins_1.webhooks);
|
57 | this.registerPlugin(new core.PipelinePlugin);
|
58 | this.registerPlugin(new core.after);
|
59 | this.registerPlugin(new core.before);
|
60 | this.registerPlugin(new core.graphql);
|
61 | this.registerPlugin(new core.logging);
|
62 | this.registerPlugin(new core.jwt);
|
63 | this.registerPlugin(new core.payload);
|
64 | this.registerPlugin(new core.OpenAPIPlugin);
|
65 | };
|
66 |
|
67 |
|
68 |
|
69 |
|
70 | let default_middleware = function () {
|
71 | this.registerFn(new core.bower_components);
|
72 | this.registerFn(new core.debug);
|
73 | this.registerFn(new core.DataDict);
|
74 | this.registerFn(new core.echo);
|
75 | this.registerFn(new core.gregarious);
|
76 | this.registerFn(new core.heartbeat);
|
77 | this.registerFn(new core.headers);
|
78 | this.registerFn(new core.mock);
|
79 | this.registerFn(new core.mount);
|
80 | this.registerFn(new core.not_found);
|
81 | this.registerFn(new core.proxy);
|
82 | this.registerFn(new core.request_uuid);
|
83 | this.registerFn(new core.sortby);
|
84 | this.registerFn(new middleware_1.apidocs);
|
85 | this.registerFn(new middleware_1.decrypt);
|
86 | this.registerFn(new middleware_1.encrypt);
|
87 | this.registerFn(new middleware_1.local_file);
|
88 | this.registerFn(new middleware_1.api_config);
|
89 | this.registerFn(new middleware_1.redact);
|
90 | this.registerFn(new middleware_1.redirect);
|
91 | this.registerFn(new middleware_1.static_assets);
|
92 | };
|
93 | function default_features() {
|
94 | console.log("common-defaults");
|
95 | default_plugins.apply(this);
|
96 | default_middleware.apply(this);
|
97 | }
|
98 | exports.default_features = default_features;
|
99 |
|
\ | No newline at end of file |