@gradientedge/cdk-utils 9.78.0 → 9.80.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/dist/src/lib/azure/services/api-management/main.js +18 -19
- package/dist/src/lib/azure/services/app-service/main.js +1 -0
- package/dist/src/lib/azure/services/function/types.d.ts +0 -2
- package/package.json +1 -1
- package/src/lib/azure/services/api-management/main.ts +18 -19
- package/src/lib/azure/services/app-service/main.ts +1 -0
- package/src/lib/azure/services/function/types.ts +1 -4
|
@@ -226,28 +226,27 @@ class AzureApiManagementManager {
|
|
|
226
226
|
</when>
|
|
227
227
|
</choose>
|
|
228
228
|
</when>
|
|
229
|
+
<when condition="@((string)context.Variables["bypassCache"] == "true")">
|
|
230
|
+
<cache-remove-value key="@((string)context.Variables["customCacheKey"])" />
|
|
231
|
+
</when>
|
|
229
232
|
</choose>`;
|
|
230
|
-
cacheSetOutboundPolicy =
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
<
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
<set-header name="X-Apim-Cache-Status" exists-action="override">
|
|
238
|
-
<value>MISS</value>
|
|
239
|
-
</set-header>
|
|
240
|
-
</when>
|
|
241
|
-
</choose>
|
|
242
|
-
<!-- Add debug headers -->
|
|
243
|
-
<set-header name="X-Apim-Cache-Key" exists-action="override">
|
|
244
|
-
<value>@((string)context.Variables["customCacheKey"])</value>
|
|
245
|
-
</set-header>
|
|
246
|
-
<set-header name="X-Apim-API-Name" exists-action="override">
|
|
247
|
-
<value>@(context.Api.Name)</value>
|
|
233
|
+
cacheSetOutboundPolicy = `<!-- Store the response body in cache -->
|
|
234
|
+
<choose>
|
|
235
|
+
<when condition="@(context.Response.StatusCode == 200)">
|
|
236
|
+
<cache-store-value key="@((string)context.Variables["customCacheKey"])" value="@(context.Response.Body.As<string>(preserveContent: true))" duration="${operation.caching.ttlInSecs ?? 900}" />
|
|
237
|
+
<!-- Add cache status header -->
|
|
238
|
+
<set-header name="X-Apim-Cache-Status" exists-action="override">
|
|
239
|
+
<value>MISS</value>
|
|
248
240
|
</set-header>
|
|
249
241
|
</when>
|
|
250
|
-
</choose
|
|
242
|
+
</choose>
|
|
243
|
+
<!-- Add debug headers -->
|
|
244
|
+
<set-header name="X-Apim-Cache-Key" exists-action="override">
|
|
245
|
+
<value>@((string)context.Variables["customCacheKey"])</value>
|
|
246
|
+
</set-header>
|
|
247
|
+
<set-header name="X-Apim-API-Name" exists-action="override">
|
|
248
|
+
<value>@(context.Api.Name)</value>
|
|
249
|
+
</set-header>`;
|
|
251
250
|
}
|
|
252
251
|
if (operation.caching.enableCacheInvalidation) {
|
|
253
252
|
cacheInvalidateInboundPolicy = `<set-variable name="clearCache" value="@(context.Request.Headers.GetValueOrDefault("X-Apim-Clear-Cache", "false").ToLower())" />
|
|
@@ -91,6 +91,7 @@ class AzureAppServiceManager {
|
|
|
91
91
|
(0, utils_1.createAzureTfOutput)(`${id}-linuxWebAppName`, scope, linuxWebApp.name);
|
|
92
92
|
(0, utils_1.createAzureTfOutput)(`${id}-linuxWebAppFriendlyUniqueId`, scope, linuxWebApp.friendlyUniqueId);
|
|
93
93
|
(0, utils_1.createAzureTfOutput)(`${id}-linuxWebAppId`, scope, linuxWebApp.id);
|
|
94
|
+
(0, utils_1.createAzureTfOutput)(`${id}-linuxWebAppDefaultHostname`, scope, linuxWebApp.defaultHostname);
|
|
94
95
|
return linuxWebApp;
|
|
95
96
|
}
|
|
96
97
|
}
|
|
@@ -6,6 +6,4 @@ export interface FunctionAppProps extends LinuxFunctionAppConfig {
|
|
|
6
6
|
export interface FunctionProps extends FunctionAppFunctionConfig {
|
|
7
7
|
}
|
|
8
8
|
export interface FunctionAppFlexConsumptionProps extends FunctionAppFlexConsumptionConfig {
|
|
9
|
-
sourceCodeHash: string;
|
|
10
|
-
deploySource: string;
|
|
11
9
|
}
|
package/package.json
CHANGED
|
@@ -273,28 +273,27 @@ export class AzureApiManagementManager {
|
|
|
273
273
|
</when>
|
|
274
274
|
</choose>
|
|
275
275
|
</when>
|
|
276
|
+
<when condition="@((string)context.Variables["bypassCache"] == "true")">
|
|
277
|
+
<cache-remove-value key="@((string)context.Variables["customCacheKey"])" />
|
|
278
|
+
</when>
|
|
276
279
|
</choose>`
|
|
277
|
-
cacheSetOutboundPolicy =
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
<
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
<set-header name="X-Apim-Cache-Status" exists-action="override">
|
|
285
|
-
<value>MISS</value>
|
|
286
|
-
</set-header>
|
|
287
|
-
</when>
|
|
288
|
-
</choose>
|
|
289
|
-
<!-- Add debug headers -->
|
|
290
|
-
<set-header name="X-Apim-Cache-Key" exists-action="override">
|
|
291
|
-
<value>@((string)context.Variables["customCacheKey"])</value>
|
|
292
|
-
</set-header>
|
|
293
|
-
<set-header name="X-Apim-API-Name" exists-action="override">
|
|
294
|
-
<value>@(context.Api.Name)</value>
|
|
280
|
+
cacheSetOutboundPolicy = `<!-- Store the response body in cache -->
|
|
281
|
+
<choose>
|
|
282
|
+
<when condition="@(context.Response.StatusCode == 200)">
|
|
283
|
+
<cache-store-value key="@((string)context.Variables["customCacheKey"])" value="@(context.Response.Body.As<string>(preserveContent: true))" duration="${operation.caching.ttlInSecs ?? 900}" />
|
|
284
|
+
<!-- Add cache status header -->
|
|
285
|
+
<set-header name="X-Apim-Cache-Status" exists-action="override">
|
|
286
|
+
<value>MISS</value>
|
|
295
287
|
</set-header>
|
|
296
288
|
</when>
|
|
297
|
-
</choose
|
|
289
|
+
</choose>
|
|
290
|
+
<!-- Add debug headers -->
|
|
291
|
+
<set-header name="X-Apim-Cache-Key" exists-action="override">
|
|
292
|
+
<value>@((string)context.Variables["customCacheKey"])</value>
|
|
293
|
+
</set-header>
|
|
294
|
+
<set-header name="X-Apim-API-Name" exists-action="override">
|
|
295
|
+
<value>@(context.Api.Name)</value>
|
|
296
|
+
</set-header>`
|
|
298
297
|
}
|
|
299
298
|
|
|
300
299
|
if (operation.caching.enableCacheInvalidation) {
|
|
@@ -98,6 +98,7 @@ export class AzureAppServiceManager {
|
|
|
98
98
|
createAzureTfOutput(`${id}-linuxWebAppName`, scope, linuxWebApp.name)
|
|
99
99
|
createAzureTfOutput(`${id}-linuxWebAppFriendlyUniqueId`, scope, linuxWebApp.friendlyUniqueId)
|
|
100
100
|
createAzureTfOutput(`${id}-linuxWebAppId`, scope, linuxWebApp.id)
|
|
101
|
+
createAzureTfOutput(`${id}-linuxWebAppDefaultHostname`, scope, linuxWebApp.defaultHostname)
|
|
101
102
|
|
|
102
103
|
return linuxWebApp
|
|
103
104
|
}
|
|
@@ -6,7 +6,4 @@ export interface FunctionAppProps extends LinuxFunctionAppConfig {}
|
|
|
6
6
|
|
|
7
7
|
export interface FunctionProps extends FunctionAppFunctionConfig {}
|
|
8
8
|
|
|
9
|
-
export interface FunctionAppFlexConsumptionProps extends FunctionAppFlexConsumptionConfig {
|
|
10
|
-
sourceCodeHash: string
|
|
11
|
-
deploySource: string
|
|
12
|
-
}
|
|
9
|
+
export interface FunctionAppFlexConsumptionProps extends FunctionAppFlexConsumptionConfig {}
|