1 | "use strict";
|
2 | var __importStar = (this && this.__importStar) || function (mod) {
|
3 | if (mod && mod.__esModule) return mod;
|
4 | var result = {};
|
5 | if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
6 | result["default"] = mod;
|
7 | return result;
|
8 | };
|
9 | Object.defineProperty(exports, "__esModule", { value: true });
|
10 | const plugin_1 = require("../libs/plugin");
|
11 | const identity_component_1 = require("../identity/identity-component");
|
12 | const deepmerge = __importStar(require("deepmerge"));
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | exports.IdentityPlugin = (props) => {
|
18 | const path = require('path');
|
19 | const result = {
|
20 | applies: (component) => {
|
21 | return identity_component_1.isIdentity(component);
|
22 | },
|
23 |
|
24 |
|
25 | process: (component, childConfigs, infrastructureMode) => {
|
26 | return {
|
27 | slsConfigs: deepmerge.all(childConfigs.map(config => config.slsConfigs)),
|
28 |
|
29 | webpackConfigs: childConfigs.reduce((result, config) => result.concat(config.webpackConfigs), []),
|
30 | postBuilds: childConfigs.reduce((result, config) => result.concat(config.postBuilds), []),
|
31 | iamRoleStatements: plugin_1.forwardChildIamRoleStatements(childConfigs)
|
32 | |
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 | };
|
53 | }
|
54 | };
|
55 | return result;
|
56 | };
|
57 |
|
\ | No newline at end of file |