@gradientedge/cdk-utils-azure 2.36.0 → 2.37.1
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/dist/src/common/stack.js
CHANGED
|
@@ -55,18 +55,13 @@ export class CommonAzureStack extends ComponentResource {
|
|
|
55
55
|
* @returns The stack properties
|
|
56
56
|
*/
|
|
57
57
|
determineConstructProps(props) {
|
|
58
|
-
return {
|
|
59
|
-
...props,
|
|
58
|
+
return _.merge({}, props, {
|
|
60
59
|
extraContexts: this.config.getObject('extraContexts'),
|
|
61
60
|
regionContextPath: this.config.get('regionContextPath'),
|
|
62
61
|
stage: this.config.get('stage'),
|
|
63
62
|
stageContextPath: this.config.get('stageContextPath'),
|
|
64
63
|
stageRegionContextPath: this.config.get('stageRegionContextPath'),
|
|
65
|
-
|
|
66
|
-
...this.determineRegionContexts(),
|
|
67
|
-
...this.determineStageContexts(),
|
|
68
|
-
...this.determineStageRegionContexts(),
|
|
69
|
-
};
|
|
64
|
+
}, this.determineExtraContexts(), this.determineRegionContexts(), this.determineStageContexts(), this.determineStageRegionContexts());
|
|
70
65
|
}
|
|
71
66
|
/**
|
|
72
67
|
* @summary Method to determine extra contexts apart from the main context
|
|
@@ -92,10 +87,7 @@ export class CommonAzureStack extends ComponentResource {
|
|
|
92
87
|
if (debug)
|
|
93
88
|
console.debug(`Adding additional contexts provided in ${extraContextPath}`);
|
|
94
89
|
/* parse as JSON properties */
|
|
95
|
-
extraContextProps =
|
|
96
|
-
...extraContextProps,
|
|
97
|
-
...JSON.parse(extraContextPropsBuffer.toString('utf-8')),
|
|
98
|
-
};
|
|
90
|
+
extraContextProps = _.merge(extraContextProps, JSON.parse(extraContextPropsBuffer.toString('utf-8')));
|
|
99
91
|
});
|
|
100
92
|
return extraContextProps;
|
|
101
93
|
}
|
|
@@ -63,6 +63,7 @@ export class AzureRestApiFunction extends AzureFunctionApp {
|
|
|
63
63
|
this.createApiManagement();
|
|
64
64
|
this.createApiManagementNamespace();
|
|
65
65
|
this.createApiManagementRoutes();
|
|
66
|
+
this.createApiPolicy();
|
|
66
67
|
this.createCorsPolicy();
|
|
67
68
|
this.createFunctionDashboard();
|
|
68
69
|
}
|