@kensio/yulin 1.20.4 → 1.20.5
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/service/cloudformation/resource/cfn/logs/sim-logs-cfn-value-adapter.d.ts.map +1 -1
- package/dist/service/cloudformation/resource/cfn/logs/sim-logs-cfn-value-adapter.js +22 -3
- package/dist/service/cloudformation/resource/cfn/logs/sim-logs-cfn-value-adapter.js.map +1 -1
- package/dist/service/cloudformation/resource/cfn/logs/sim-logs-delivery-cfn.d.ts +31 -0
- package/dist/service/cloudformation/resource/cfn/logs/sim-logs-delivery-cfn.d.ts.map +1 -0
- package/dist/service/cloudformation/resource/cfn/logs/sim-logs-delivery-cfn.js +43 -0
- package/dist/service/cloudformation/resource/cfn/logs/sim-logs-delivery-cfn.js.map +1 -0
- package/dist/service/cloudformation/resource/cfn/logs/sim-logs-delivery-destination-cfn.d.ts +32 -0
- package/dist/service/cloudformation/resource/cfn/logs/sim-logs-delivery-destination-cfn.d.ts.map +1 -0
- package/dist/service/cloudformation/resource/cfn/logs/sim-logs-delivery-destination-cfn.js +34 -0
- package/dist/service/cloudformation/resource/cfn/logs/sim-logs-delivery-destination-cfn.js.map +1 -0
- package/dist/service/cloudformation/resource/cfn/logs/sim-logs-delivery-source-cfn.d.ts +27 -0
- package/dist/service/cloudformation/resource/cfn/logs/sim-logs-delivery-source-cfn.d.ts.map +1 -0
- package/dist/service/cloudformation/resource/cfn/logs/sim-logs-delivery-source-cfn.js +39 -0
- package/dist/service/cloudformation/resource/cfn/logs/sim-logs-delivery-source-cfn.js.map +1 -0
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-creator.d.ts +6 -5
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-creator.d.ts.map +1 -1
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-creator.js +10 -8
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-creator.js.map +1 -1
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-response-headers-policy.d.ts +24 -0
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-response-headers-policy.d.ts.map +1 -0
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-response-headers-policy.js +94 -0
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-response-headers-policy.js.map +1 -0
- package/dist/service/cloudfront/controller/response-headers/sim-cf-response-headers-applicator.d.ts.map +1 -1
- package/dist/service/cloudfront/controller/response-headers/sim-cf-response-headers-applicator.js +4 -4
- package/dist/service/cloudfront/controller/response-headers/sim-cf-response-headers-applicator.js.map +1 -1
- package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-response-headers-policy.d.ts.map +1 -1
- package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-response-headers-policy.js +3 -4
- package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-response-headers-policy.js.map +1 -1
- package/dist/service/cloudfront/response-headers-policy/sim-cf-managed-response-headers-policies.d.ts +27 -0
- package/dist/service/cloudfront/response-headers-policy/sim-cf-managed-response-headers-policies.d.ts.map +1 -0
- package/dist/service/cloudfront/response-headers-policy/sim-cf-managed-response-headers-policies.js +119 -0
- package/dist/service/cloudfront/response-headers-policy/sim-cf-managed-response-headers-policies.js.map +1 -0
- package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy-cors.d.ts +18 -3
- package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy-cors.d.ts.map +1 -1
- package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy-cors.js +28 -5
- package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy-cors.js.map +1 -1
- package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy-registry.d.ts +14 -4
- package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy-registry.d.ts.map +1 -1
- package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy-registry.js +17 -5
- package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy-registry.js.map +1 -1
- package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy.d.ts +6 -2
- package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy.d.ts.map +1 -1
- package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy.js +7 -3
- package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy.js.map +1 -1
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-creator.d.ts +28 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-creator.d.ts.map +1 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-creator.js +52 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-creator.js.map +1 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-destination-creator.d.ts +30 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-destination-creator.d.ts.map +1 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-destination-creator.js +59 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-destination-creator.js.map +1 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-input.d.ts +12 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-input.d.ts.map +1 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-input.js +23 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-input.js.map +1 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-properties.d.ts +50 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-properties.d.ts.map +1 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-properties.js +107 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-properties.js.map +1 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-source-creator.d.ts +29 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-source-creator.d.ts.map +1 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-source-creator.js +50 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-source-creator.js.map +1 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-unsimulated-properties.d.ts +16 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-unsimulated-properties.d.ts.map +1 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-unsimulated-properties.js +39 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-unsimulated-properties.js.map +1 -0
- package/dist/service/logs/cfn/sim-logs-cfn-resource-deleter.d.ts +27 -0
- package/dist/service/logs/cfn/sim-logs-cfn-resource-deleter.d.ts.map +1 -0
- package/dist/service/logs/cfn/sim-logs-cfn-resource-deleter.js +49 -0
- package/dist/service/logs/cfn/sim-logs-cfn-resource-deleter.js.map +1 -0
- package/dist/service/logs/cfn/sim-logs-cfn-resource-factory.d.ts +8 -3
- package/dist/service/logs/cfn/sim-logs-cfn-resource-factory.d.ts.map +1 -1
- package/dist/service/logs/cfn/sim-logs-cfn-resource-factory.js +48 -23
- package/dist/service/logs/cfn/sim-logs-cfn-resource-factory.js.map +1 -1
- package/dist/service/logs/cfn/sim-logs-cfn-unsupported-resource.d.ts +10 -0
- package/dist/service/logs/cfn/sim-logs-cfn-unsupported-resource.d.ts.map +1 -0
- package/dist/service/logs/cfn/sim-logs-cfn-unsupported-resource.js +13 -0
- package/dist/service/logs/cfn/sim-logs-cfn-unsupported-resource.js.map +1 -0
- package/dist/service/logs/command/authorize/sim-logs-authorizer.d.ts +9 -1
- package/dist/service/logs/command/authorize/sim-logs-authorizer.d.ts.map +1 -1
- package/dist/service/logs/command/authorize/sim-logs-authorizer.js +8 -0
- package/dist/service/logs/command/authorize/sim-logs-authorizer.js.map +1 -1
- package/dist/service/logs/command/delivery/delivery-destination.command.d.ts +67 -0
- package/dist/service/logs/command/delivery/delivery-destination.command.d.ts.map +1 -0
- package/dist/service/logs/command/delivery/delivery-destination.command.js +2 -0
- package/dist/service/logs/command/delivery/delivery-destination.command.js.map +1 -0
- package/dist/service/logs/command/delivery/delivery-source.command.d.ts +61 -0
- package/dist/service/logs/command/delivery/delivery-source.command.d.ts.map +1 -0
- package/dist/service/logs/command/delivery/delivery-source.command.js +2 -0
- package/dist/service/logs/command/delivery/delivery-source.command.js.map +1 -0
- package/dist/service/logs/command/delivery/delivery.command.d.ts +73 -0
- package/dist/service/logs/command/delivery/delivery.command.d.ts.map +1 -0
- package/dist/service/logs/command/delivery/delivery.command.js +2 -0
- package/dist/service/logs/command/delivery/delivery.command.js.map +1 -0
- package/dist/service/logs/command/delivery/sim-logs-created-delivery.d.ts +21 -0
- package/dist/service/logs/command/delivery/sim-logs-created-delivery.d.ts.map +1 -0
- package/dist/service/logs/command/delivery/sim-logs-created-delivery.js +41 -0
- package/dist/service/logs/command/delivery/sim-logs-created-delivery.js.map +1 -0
- package/dist/service/logs/command/delivery/sim-logs-delivery-commands.d.ts +38 -0
- package/dist/service/logs/command/delivery/sim-logs-delivery-commands.d.ts.map +1 -0
- package/dist/service/logs/command/delivery/sim-logs-delivery-commands.js +77 -0
- package/dist/service/logs/command/delivery/sim-logs-delivery-commands.js.map +1 -0
- package/dist/service/logs/command/delivery/sim-logs-delivery-destination-commands.d.ts +38 -0
- package/dist/service/logs/command/delivery/sim-logs-delivery-destination-commands.d.ts.map +1 -0
- package/dist/service/logs/command/delivery/sim-logs-delivery-destination-commands.js +82 -0
- package/dist/service/logs/command/delivery/sim-logs-delivery-destination-commands.js.map +1 -0
- package/dist/service/logs/command/delivery/sim-logs-delivery-detail.d.ts +19 -0
- package/dist/service/logs/command/delivery/sim-logs-delivery-detail.d.ts.map +1 -0
- package/dist/service/logs/command/delivery/sim-logs-delivery-detail.js +57 -0
- package/dist/service/logs/command/delivery/sim-logs-delivery-detail.js.map +1 -0
- package/dist/service/logs/command/delivery/sim-logs-delivery-in-use.d.ts +15 -0
- package/dist/service/logs/command/delivery/sim-logs-delivery-in-use.d.ts.map +1 -0
- package/dist/service/logs/command/delivery/sim-logs-delivery-in-use.js +26 -0
- package/dist/service/logs/command/delivery/sim-logs-delivery-in-use.js.map +1 -0
- package/dist/service/logs/command/delivery/sim-logs-delivery-input.d.ts +16 -0
- package/dist/service/logs/command/delivery/sim-logs-delivery-input.d.ts.map +1 -0
- package/dist/service/logs/command/delivery/sim-logs-delivery-input.js +28 -0
- package/dist/service/logs/command/delivery/sim-logs-delivery-input.js.map +1 -0
- package/dist/service/logs/command/delivery/sim-logs-delivery-source-commands.d.ts +37 -0
- package/dist/service/logs/command/delivery/sim-logs-delivery-source-commands.d.ts.map +1 -0
- package/dist/service/logs/command/delivery/sim-logs-delivery-source-commands.js +86 -0
- package/dist/service/logs/command/delivery/sim-logs-delivery-source-commands.js.map +1 -0
- package/dist/service/logs/command/sim-logs-command.types.d.ts +3 -0
- package/dist/service/logs/command/sim-logs-command.types.d.ts.map +1 -1
- package/dist/service/logs/delivery/sim-logs-delivery-arn.d.ts +30 -0
- package/dist/service/logs/delivery/sim-logs-delivery-arn.d.ts.map +1 -0
- package/dist/service/logs/delivery/sim-logs-delivery-arn.js +42 -0
- package/dist/service/logs/delivery/sim-logs-delivery-arn.js.map +1 -0
- package/dist/service/logs/delivery/sim-logs-delivery-destination-store.d.ts +41 -0
- package/dist/service/logs/delivery/sim-logs-delivery-destination-store.d.ts.map +1 -0
- package/dist/service/logs/delivery/sim-logs-delivery-destination-store.js +69 -0
- package/dist/service/logs/delivery/sim-logs-delivery-destination-store.js.map +1 -0
- package/dist/service/logs/delivery/sim-logs-delivery-destination-type.d.ts +16 -0
- package/dist/service/logs/delivery/sim-logs-delivery-destination-type.d.ts.map +1 -0
- package/dist/service/logs/delivery/sim-logs-delivery-destination-type.js +48 -0
- package/dist/service/logs/delivery/sim-logs-delivery-destination-type.js.map +1 -0
- package/dist/service/logs/delivery/sim-logs-delivery-destination.d.ts +27 -0
- package/dist/service/logs/delivery/sim-logs-delivery-destination.d.ts.map +1 -0
- package/dist/service/logs/delivery/sim-logs-delivery-destination.js +23 -0
- package/dist/service/logs/delivery/sim-logs-delivery-destination.js.map +1 -0
- package/dist/service/logs/delivery/sim-logs-delivery-ids.d.ts +16 -0
- package/dist/service/logs/delivery/sim-logs-delivery-ids.d.ts.map +1 -0
- package/dist/service/logs/delivery/sim-logs-delivery-ids.js +20 -0
- package/dist/service/logs/delivery/sim-logs-delivery-ids.js.map +1 -0
- package/dist/service/logs/delivery/sim-logs-delivery-output-format.d.ts +24 -0
- package/dist/service/logs/delivery/sim-logs-delivery-output-format.d.ts.map +1 -0
- package/dist/service/logs/delivery/sim-logs-delivery-output-format.js +36 -0
- package/dist/service/logs/delivery/sim-logs-delivery-output-format.js.map +1 -0
- package/dist/service/logs/delivery/sim-logs-delivery-s3-configuration.d.ts +35 -0
- package/dist/service/logs/delivery/sim-logs-delivery-s3-configuration.d.ts.map +1 -0
- package/dist/service/logs/delivery/sim-logs-delivery-s3-configuration.js +66 -0
- package/dist/service/logs/delivery/sim-logs-delivery-s3-configuration.js.map +1 -0
- package/dist/service/logs/delivery/sim-logs-delivery-source-service.d.ts +48 -0
- package/dist/service/logs/delivery/sim-logs-delivery-source-service.d.ts.map +1 -0
- package/dist/service/logs/delivery/sim-logs-delivery-source-service.js +71 -0
- package/dist/service/logs/delivery/sim-logs-delivery-source-service.js.map +1 -0
- package/dist/service/logs/delivery/sim-logs-delivery-source-store.d.ts +42 -0
- package/dist/service/logs/delivery/sim-logs-delivery-source-store.d.ts.map +1 -0
- package/dist/service/logs/delivery/sim-logs-delivery-source-store.js +64 -0
- package/dist/service/logs/delivery/sim-logs-delivery-source-store.js.map +1 -0
- package/dist/service/logs/delivery/sim-logs-delivery-source.d.ts +29 -0
- package/dist/service/logs/delivery/sim-logs-delivery-source.d.ts.map +1 -0
- package/dist/service/logs/delivery/sim-logs-delivery-source.js +29 -0
- package/dist/service/logs/delivery/sim-logs-delivery-source.js.map +1 -0
- package/dist/service/logs/delivery/sim-logs-delivery-store.d.ts +32 -0
- package/dist/service/logs/delivery/sim-logs-delivery-store.d.ts.map +1 -0
- package/dist/service/logs/delivery/sim-logs-delivery-store.js +53 -0
- package/dist/service/logs/delivery/sim-logs-delivery-store.js.map +1 -0
- package/dist/service/logs/delivery/sim-logs-delivery.d.ts +33 -0
- package/dist/service/logs/delivery/sim-logs-delivery.d.ts.map +1 -0
- package/dist/service/logs/delivery/sim-logs-delivery.js +34 -0
- package/dist/service/logs/delivery/sim-logs-delivery.js.map +1 -0
- package/dist/service/logs/error/sim-logs.error.d.ts +23 -0
- package/dist/service/logs/error/sim-logs.error.d.ts.map +1 -1
- package/dist/service/logs/error/sim-logs.error.js +27 -0
- package/dist/service/logs/error/sim-logs.error.js.map +1 -1
- package/dist/service/logs/index.d.ts +10 -1
- package/dist/service/logs/index.d.ts.map +1 -1
- package/dist/service/logs/index.js +9 -1
- package/dist/service/logs/index.js.map +1 -1
- package/dist/service/logs/sdk/sim-logs-sdk-command-router.d.ts.map +1 -1
- package/dist/service/logs/sdk/sim-logs-sdk-command-router.js +36 -0
- package/dist/service/logs/sdk/sim-logs-sdk-command-router.js.map +1 -1
- package/dist/service/logs/sim-logs-commands.d.ts +12 -0
- package/dist/service/logs/sim-logs-commands.d.ts.map +1 -1
- package/dist/service/logs/sim-logs-commands.js +37 -0
- package/dist/service/logs/sim-logs-commands.js.map +1 -1
- package/dist/service/logs/sim-logs-delivery-inspection.d.ts +28 -0
- package/dist/service/logs/sim-logs-delivery-inspection.d.ts.map +1 -0
- package/dist/service/logs/sim-logs-delivery-inspection.js +35 -0
- package/dist/service/logs/sim-logs-delivery-inspection.js.map +1 -0
- package/dist/service/logs/sim-logs-delivery-operations.d.ts +35 -0
- package/dist/service/logs/sim-logs-delivery-operations.d.ts.map +1 -0
- package/dist/service/logs/sim-logs-delivery-operations.js +58 -0
- package/dist/service/logs/sim-logs-delivery-operations.js.map +1 -0
- package/dist/service/logs/sim-logs.d.ts +8 -2
- package/dist/service/logs/sim-logs.d.ts.map +1 -1
- package/dist/service/logs/sim-logs.js +39 -33
- package/dist/service/logs/sim-logs.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-logs-cfn-value-adapter.d.ts","sourceRoot":"","sources":["../../../../../../src/service/cloudformation/resource/cfn/logs/sim-logs-cfn-value-adapter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sim-logs-cfn-value-adapter.d.ts","sourceRoot":"","sources":["../../../../../../src/service/cloudformation/resource/cfn/logs/sim-logs-cfn-value-adapter.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,oCAAoC,EACpC,yBAAyB,EAC1B,MAAM,sCAAsC,CAAC;AAM9C;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,oCAAoC,GAC/C,yBAAyB,CAgC3B"}
|
|
@@ -1,13 +1,32 @@
|
|
|
1
|
+
import { SimLogsDeliveryDestination } from "../../../../logs/delivery/sim-logs-delivery-destination.js";
|
|
2
|
+
import { SimLogsDeliverySource } from "../../../../logs/delivery/sim-logs-delivery-source.js";
|
|
3
|
+
import { SimLogsDelivery } from "../../../../logs/delivery/sim-logs-delivery.js";
|
|
1
4
|
import { SimLogsLogGroup } from "../../../../logs/group/sim-logs-log-group.js";
|
|
5
|
+
import { SimLogsDeliveryDestinationCfn } from "./sim-logs-delivery-destination-cfn.js";
|
|
6
|
+
import { SimLogsDeliverySourceCfn } from "./sim-logs-delivery-source-cfn.js";
|
|
7
|
+
import { SimLogsDeliveryCfn } from "./sim-logs-delivery-cfn.js";
|
|
2
8
|
import { SimLogsLogGroupCfn } from "./sim-logs-log-group-cfn.js";
|
|
3
9
|
/**
|
|
4
10
|
* The CloudFormation-facing value adapter for a simulated CloudWatch Logs
|
|
5
11
|
* Resource.
|
|
6
12
|
*/
|
|
7
13
|
export function logsValueAdapter(properties) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
14
|
+
const { type, simResource } = properties;
|
|
15
|
+
if (type === "AWS::Logs::LogGroup" &&
|
|
16
|
+
simResource instanceof SimLogsLogGroup) {
|
|
17
|
+
return new SimLogsLogGroupCfn({ group: simResource });
|
|
18
|
+
}
|
|
19
|
+
if (type === "AWS::Logs::DeliverySource" &&
|
|
20
|
+
simResource instanceof SimLogsDeliverySource) {
|
|
21
|
+
return new SimLogsDeliverySourceCfn({ source: simResource });
|
|
22
|
+
}
|
|
23
|
+
if (type === "AWS::Logs::DeliveryDestination" &&
|
|
24
|
+
simResource instanceof SimLogsDeliveryDestination) {
|
|
25
|
+
return new SimLogsDeliveryDestinationCfn({ destination: simResource });
|
|
26
|
+
}
|
|
27
|
+
if (type === "AWS::Logs::Delivery" &&
|
|
28
|
+
simResource instanceof SimLogsDelivery) {
|
|
29
|
+
return new SimLogsDeliveryCfn({ delivery: simResource });
|
|
11
30
|
}
|
|
12
31
|
return undefined;
|
|
13
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-logs-cfn-value-adapter.js","sourceRoot":"","sources":["../../../../../../src/service/cloudformation/resource/cfn/logs/sim-logs-cfn-value-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAK/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEjE;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAC9B,UAAgD;IAEhD,
|
|
1
|
+
{"version":3,"file":"sim-logs-cfn-value-adapter.js","sourceRoot":"","sources":["../../../../../../src/service/cloudformation/resource/cfn/logs/sim-logs-cfn-value-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,4DAA4D,CAAC;AACxG,OAAO,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAC9F,OAAO,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAK/E,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AACvF,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEjE;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAC9B,UAAgD;IAEhD,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,UAAU,CAAC;IAEzC,IACE,IAAI,KAAK,qBAAqB;QAC9B,WAAW,YAAY,eAAe,EACtC,CAAC;QACD,OAAO,IAAI,kBAAkB,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC;IACxD,CAAC;IAED,IACE,IAAI,KAAK,2BAA2B;QACpC,WAAW,YAAY,qBAAqB,EAC5C,CAAC;QACD,OAAO,IAAI,wBAAwB,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED,IACE,IAAI,KAAK,gCAAgC;QACzC,WAAW,YAAY,0BAA0B,EACjD,CAAC;QACD,OAAO,IAAI,6BAA6B,CAAC,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC,CAAC;IACzE,CAAC;IAED,IACE,IAAI,KAAK,qBAAqB;QAC9B,WAAW,YAAY,eAAe,EACtC,CAAC;QACD,OAAO,IAAI,kBAAkB,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,CAAC;IAC3D,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { SimLogsDelivery } from "../../../../logs/delivery/sim-logs-delivery.js";
|
|
2
|
+
import type { SimCfnTemplateValue } from "../../../template/value/sim-cfn-template-value.js";
|
|
3
|
+
import type { SimCfnResourceValueAdapter } from "../sim-cfn-resource-value-adapter.js";
|
|
4
|
+
interface SimLogsDeliveryCfnProperties {
|
|
5
|
+
readonly delivery: SimLogsDelivery;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* CloudFormation-facing values for a simulated delivery.
|
|
9
|
+
*/
|
|
10
|
+
export declare class SimLogsDeliveryCfn implements SimCfnResourceValueAdapter {
|
|
11
|
+
#private;
|
|
12
|
+
constructor(properties: SimLogsDeliveryCfnProperties);
|
|
13
|
+
/**
|
|
14
|
+
* AWS::Logs::Delivery Ref returns the delivery ID.
|
|
15
|
+
*
|
|
16
|
+
* CloudWatch Logs issues that ID. A template can predict the physical name
|
|
17
|
+
* of the other two delivery Resources and never this one.
|
|
18
|
+
*/
|
|
19
|
+
refValue(): SimCfnTemplateValue;
|
|
20
|
+
/**
|
|
21
|
+
* AWS::Logs::Delivery attributes.
|
|
22
|
+
*
|
|
23
|
+
* These three are the whole of what CloudFormation publishes.
|
|
24
|
+
* `DeliverySourceName` and `DeliveryDestinationArn` are properties of this
|
|
25
|
+
* Resource rather than attributes of it, so a template reading either back
|
|
26
|
+
* through `Fn::GetAtt` is refused here as CloudFormation refuses it.
|
|
27
|
+
*/
|
|
28
|
+
attributeValue(attributeName: string): SimCfnTemplateValue;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=sim-logs-delivery-cfn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-logs-delivery-cfn.d.ts","sourceRoot":"","sources":["../../../../../../src/service/cloudformation/resource/cfn/logs/sim-logs-delivery-cfn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACtF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;AAC7F,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAEvF,UAAU,4BAA4B;IACpC,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;CACpC;AAED;;GAEG;AACH,qBAAa,kBAAmB,YAAW,0BAA0B;;IAGnE,YAAY,UAAU,EAAE,4BAA4B,EAEnD;IAED;;;;;OAKG;IACH,QAAQ,IAAI,mBAAmB,CAE9B;IAED;;;;;;;OAOG;IACH,cAAc,CAAC,aAAa,EAAE,MAAM,GAAG,mBAAmB,CAiBzD;CACF"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CloudFormation-facing values for a simulated delivery.
|
|
3
|
+
*/
|
|
4
|
+
export class SimLogsDeliveryCfn {
|
|
5
|
+
#delivery;
|
|
6
|
+
constructor(properties) {
|
|
7
|
+
this.#delivery = properties.delivery;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* AWS::Logs::Delivery Ref returns the delivery ID.
|
|
11
|
+
*
|
|
12
|
+
* CloudWatch Logs issues that ID. A template can predict the physical name
|
|
13
|
+
* of the other two delivery Resources and never this one.
|
|
14
|
+
*/
|
|
15
|
+
refValue() {
|
|
16
|
+
return this.#delivery.id;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* AWS::Logs::Delivery attributes.
|
|
20
|
+
*
|
|
21
|
+
* These three are the whole of what CloudFormation publishes.
|
|
22
|
+
* `DeliverySourceName` and `DeliveryDestinationArn` are properties of this
|
|
23
|
+
* Resource rather than attributes of it, so a template reading either back
|
|
24
|
+
* through `Fn::GetAtt` is refused here as CloudFormation refuses it.
|
|
25
|
+
*/
|
|
26
|
+
attributeValue(attributeName) {
|
|
27
|
+
switch (attributeName) {
|
|
28
|
+
case "Arn": {
|
|
29
|
+
return this.#delivery.arn;
|
|
30
|
+
}
|
|
31
|
+
case "DeliveryId": {
|
|
32
|
+
return this.#delivery.id;
|
|
33
|
+
}
|
|
34
|
+
case "DeliveryDestinationType": {
|
|
35
|
+
return this.#delivery.deliveryDestinationType;
|
|
36
|
+
}
|
|
37
|
+
default: {
|
|
38
|
+
throw new Error(`Unsupported AWS::Logs::Delivery attribute ${attributeName}`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=sim-logs-delivery-cfn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-logs-delivery-cfn.js","sourceRoot":"","sources":["../../../../../../src/service/cloudformation/resource/cfn/logs/sim-logs-delivery-cfn.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,MAAM,OAAO,kBAAkB;IACpB,SAAS,CAAkB;IAEpC,YAAY,UAAwC;QAClD,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,QAAQ,CAAC;IACvC,CAAC;IAED;;;;;OAKG;IACH,QAAQ;QACN,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;IAC3B,CAAC;IAED;;;;;;;OAOG;IACH,cAAc,CAAC,aAAqB;QAClC,QAAQ,aAAa,EAAE,CAAC;YACtB,KAAK,KAAK,EAAE,CAAC;gBACX,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC;YAC5B,CAAC;YACD,KAAK,YAAY,EAAE,CAAC;gBAClB,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;YAC3B,CAAC;YACD,KAAK,yBAAyB,EAAE,CAAC;gBAC/B,OAAO,IAAI,CAAC,SAAS,CAAC,uBAAuB,CAAC;YAChD,CAAC;YACD,SAAS,CAAC;gBACR,MAAM,IAAI,KAAK,CACb,6CAA6C,aAAa,EAAE,CAC7D,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { SimLogsDeliveryDestination } from "../../../../logs/delivery/sim-logs-delivery-destination.js";
|
|
2
|
+
import type { SimCfnTemplateValue } from "../../../template/value/sim-cfn-template-value.js";
|
|
3
|
+
import type { SimCfnResourceValueAdapter } from "../sim-cfn-resource-value-adapter.js";
|
|
4
|
+
interface SimLogsDeliveryDestinationCfnProperties {
|
|
5
|
+
readonly destination: SimLogsDeliveryDestination;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* CloudFormation-facing values for a simulated delivery destination.
|
|
9
|
+
*/
|
|
10
|
+
export declare class SimLogsDeliveryDestinationCfn implements SimCfnResourceValueAdapter {
|
|
11
|
+
#private;
|
|
12
|
+
constructor(properties: SimLogsDeliveryDestinationCfnProperties);
|
|
13
|
+
/**
|
|
14
|
+
* AWS::Logs::DeliveryDestination Ref returns the destination name.
|
|
15
|
+
*/
|
|
16
|
+
refValue(): SimCfnTemplateValue;
|
|
17
|
+
/**
|
|
18
|
+
* AWS::Logs::DeliveryDestination attributes.
|
|
19
|
+
*
|
|
20
|
+
* The ARN is the only one CloudFormation publishes. It is the destination's
|
|
21
|
+
* own, and a delivery names that one. The bucket or log group behind it
|
|
22
|
+
* keeps its own ARN, and the two are easy to confuse in a template.
|
|
23
|
+
*
|
|
24
|
+
* `DeliveryDestinationType` is a property of this Resource rather than an
|
|
25
|
+
* attribute of it, so a template reading it back through `Fn::GetAtt` is
|
|
26
|
+
* refused here as CloudFormation refuses it. Read it off the delivery, which
|
|
27
|
+
* does publish it.
|
|
28
|
+
*/
|
|
29
|
+
attributeValue(attributeName: string): SimCfnTemplateValue;
|
|
30
|
+
}
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=sim-logs-delivery-destination-cfn.d.ts.map
|
package/dist/service/cloudformation/resource/cfn/logs/sim-logs-delivery-destination-cfn.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-logs-delivery-destination-cfn.d.ts","sourceRoot":"","sources":["../../../../../../src/service/cloudformation/resource/cfn/logs/sim-logs-delivery-destination-cfn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4DAA4D,CAAC;AAC7G,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;AAC7F,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAEvF,UAAU,uCAAuC;IAC/C,QAAQ,CAAC,WAAW,EAAE,0BAA0B,CAAC;CAClD;AAED;;GAEG;AACH,qBAAa,6BAA8B,YAAW,0BAA0B;;IAG9E,YAAY,UAAU,EAAE,uCAAuC,EAE9D;IAED;;OAEG;IACH,QAAQ,IAAI,mBAAmB,CAE9B;IAED;;;;;;;;;;;OAWG;IACH,cAAc,CAAC,aAAa,EAAE,MAAM,GAAG,mBAAmB,CAQzD;CACF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CloudFormation-facing values for a simulated delivery destination.
|
|
3
|
+
*/
|
|
4
|
+
export class SimLogsDeliveryDestinationCfn {
|
|
5
|
+
#destination;
|
|
6
|
+
constructor(properties) {
|
|
7
|
+
this.#destination = properties.destination;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* AWS::Logs::DeliveryDestination Ref returns the destination name.
|
|
11
|
+
*/
|
|
12
|
+
refValue() {
|
|
13
|
+
return this.#destination.name;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* AWS::Logs::DeliveryDestination attributes.
|
|
17
|
+
*
|
|
18
|
+
* The ARN is the only one CloudFormation publishes. It is the destination's
|
|
19
|
+
* own, and a delivery names that one. The bucket or log group behind it
|
|
20
|
+
* keeps its own ARN, and the two are easy to confuse in a template.
|
|
21
|
+
*
|
|
22
|
+
* `DeliveryDestinationType` is a property of this Resource rather than an
|
|
23
|
+
* attribute of it, so a template reading it back through `Fn::GetAtt` is
|
|
24
|
+
* refused here as CloudFormation refuses it. Read it off the delivery, which
|
|
25
|
+
* does publish it.
|
|
26
|
+
*/
|
|
27
|
+
attributeValue(attributeName) {
|
|
28
|
+
if (attributeName === "Arn") {
|
|
29
|
+
return this.#destination.arn;
|
|
30
|
+
}
|
|
31
|
+
throw new Error(`Unsupported AWS::Logs::DeliveryDestination attribute ${attributeName}`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=sim-logs-delivery-destination-cfn.js.map
|
package/dist/service/cloudformation/resource/cfn/logs/sim-logs-delivery-destination-cfn.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-logs-delivery-destination-cfn.js","sourceRoot":"","sources":["../../../../../../src/service/cloudformation/resource/cfn/logs/sim-logs-delivery-destination-cfn.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,MAAM,OAAO,6BAA6B;IAC/B,YAAY,CAA6B;IAElD,YAAY,UAAmD;QAC7D,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC,WAAW,CAAC;IAC7C,CAAC;IAED;;OAEG;IACH,QAAQ;QACN,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC;IAChC,CAAC;IAED;;;;;;;;;;;OAWG;IACH,cAAc,CAAC,aAAqB;QAClC,IAAI,aAAa,KAAK,KAAK,EAAE,CAAC;YAC5B,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC;QAC/B,CAAC;QAED,MAAM,IAAI,KAAK,CACb,wDAAwD,aAAa,EAAE,CACxE,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { SimLogsDeliverySource } from "../../../../logs/delivery/sim-logs-delivery-source.js";
|
|
2
|
+
import type { SimCfnTemplateValue } from "../../../template/value/sim-cfn-template-value.js";
|
|
3
|
+
import type { SimCfnResourceValueAdapter } from "../sim-cfn-resource-value-adapter.js";
|
|
4
|
+
interface SimLogsDeliverySourceCfnProperties {
|
|
5
|
+
readonly source: SimLogsDeliverySource;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* CloudFormation-facing values for a simulated delivery source.
|
|
9
|
+
*/
|
|
10
|
+
export declare class SimLogsDeliverySourceCfn implements SimCfnResourceValueAdapter {
|
|
11
|
+
#private;
|
|
12
|
+
constructor(properties: SimLogsDeliverySourceCfnProperties);
|
|
13
|
+
/**
|
|
14
|
+
* AWS::Logs::DeliverySource Ref returns the delivery source name.
|
|
15
|
+
*/
|
|
16
|
+
refValue(): SimCfnTemplateValue;
|
|
17
|
+
/**
|
|
18
|
+
* AWS::Logs::DeliverySource attributes.
|
|
19
|
+
*
|
|
20
|
+
* `Service` is worked out from the resource ARN rather than declared, so a
|
|
21
|
+
* template reading it back gets what CloudWatch Logs decided the source is
|
|
22
|
+
* for.
|
|
23
|
+
*/
|
|
24
|
+
attributeValue(attributeName: string): SimCfnTemplateValue;
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=sim-logs-delivery-source-cfn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-logs-delivery-source-cfn.d.ts","sourceRoot":"","sources":["../../../../../../src/service/cloudformation/resource/cfn/logs/sim-logs-delivery-source-cfn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AACnG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;AAC7F,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAEvF,UAAU,kCAAkC;IAC1C,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAC;CACxC;AAED;;GAEG;AACH,qBAAa,wBAAyB,YAAW,0BAA0B;;IAGzE,YAAY,UAAU,EAAE,kCAAkC,EAEzD;IAED;;OAEG;IACH,QAAQ,IAAI,mBAAmB,CAE9B;IAED;;;;;;OAMG;IACH,cAAc,CAAC,aAAa,EAAE,MAAM,GAAG,mBAAmB,CAiBzD;CACF"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CloudFormation-facing values for a simulated delivery source.
|
|
3
|
+
*/
|
|
4
|
+
export class SimLogsDeliverySourceCfn {
|
|
5
|
+
#source;
|
|
6
|
+
constructor(properties) {
|
|
7
|
+
this.#source = properties.source;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* AWS::Logs::DeliverySource Ref returns the delivery source name.
|
|
11
|
+
*/
|
|
12
|
+
refValue() {
|
|
13
|
+
return this.#source.name;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* AWS::Logs::DeliverySource attributes.
|
|
17
|
+
*
|
|
18
|
+
* `Service` is worked out from the resource ARN rather than declared, so a
|
|
19
|
+
* template reading it back gets what CloudWatch Logs decided the source is
|
|
20
|
+
* for.
|
|
21
|
+
*/
|
|
22
|
+
attributeValue(attributeName) {
|
|
23
|
+
switch (attributeName) {
|
|
24
|
+
case "Arn": {
|
|
25
|
+
return this.#source.arn;
|
|
26
|
+
}
|
|
27
|
+
case "Service": {
|
|
28
|
+
return this.#source.service;
|
|
29
|
+
}
|
|
30
|
+
case "ResourceArns": {
|
|
31
|
+
return [...this.#source.resourceArns];
|
|
32
|
+
}
|
|
33
|
+
default: {
|
|
34
|
+
throw new Error(`Unsupported AWS::Logs::DeliverySource attribute ${attributeName}`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=sim-logs-delivery-source-cfn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-logs-delivery-source-cfn.js","sourceRoot":"","sources":["../../../../../../src/service/cloudformation/resource/cfn/logs/sim-logs-delivery-source-cfn.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,MAAM,OAAO,wBAAwB;IAC1B,OAAO,CAAwB;IAExC,YAAY,UAA8C;QACxD,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC;IACnC,CAAC;IAED;;OAEG;IACH,QAAQ;QACN,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;IAC3B,CAAC;IAED;;;;;;OAMG;IACH,cAAc,CAAC,aAAqB;QAClC,QAAQ,aAAa,EAAE,CAAC;YACtB,KAAK,KAAK,EAAE,CAAC;gBACX,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;YAC1B,CAAC;YACD,KAAK,SAAS,EAAE,CAAC;gBACf,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;YAC9B,CAAC;YACD,KAAK,cAAc,EAAE,CAAC;gBACpB,OAAO,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YACxC,CAAC;YACD,SAAS,CAAC;gBACR,MAAM,IAAI,KAAK,CACb,mDAAmD,aAAa,EAAE,CACnE,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
|
|
@@ -9,11 +9,12 @@ interface SimCfnCfDistroCreatorProperties {
|
|
|
9
9
|
* Creates simulated CloudFront Distributions from CloudFormation Resources.
|
|
10
10
|
*
|
|
11
11
|
* A `WebACLId` naming a web ACL this simulation does not hold is left out and
|
|
12
|
-
* recorded, and so
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
12
|
+
* recorded, and so are a Lambda@Edge association it cannot run and a
|
|
13
|
+
* `ResponseHeadersPolicyId` naming a policy it does not hold. CloudFront has no
|
|
14
|
+
* Resource of its own for any of the three, so all of them live on the
|
|
15
|
+
* Distribution itself, and refusing one would take the Distribution down over
|
|
16
|
+
* something that was never the point of the template. The site a local dev
|
|
17
|
+
* server and a suite of tests make requests to has to survive that.
|
|
17
18
|
*/
|
|
18
19
|
export declare class SimCfnCfDistroCreator {
|
|
19
20
|
private readonly cloudFront;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-cfn-cf-distro-creator.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/cfn/distro/sim-cfn-cf-distro-creator.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,cAAc,EACd,sCAAsC,EACvC,MAAM,sDAAsD,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mDAAmD,CAAC;AACnG,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kEAAkE,CAAC;
|
|
1
|
+
{"version":3,"file":"sim-cfn-cf-distro-creator.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/cfn/distro/sim-cfn-cf-distro-creator.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,cAAc,EACd,sCAAsC,EACvC,MAAM,sDAAsD,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mDAAmD,CAAC;AACnG,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kEAAkE,CAAC;AAQlH,UAAU,+BAA+B;IACvC,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;CACpC;AAED;;;;;;;;;;GAUG;AACH,qBAAa,qBAAqB;IAChC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAgB;IAE3C,YAAY,UAAU,EAAE,+BAA+B,EAEtD;IAED;;;OAGG;IACG,MAAM,CACV,QAAQ,EAAE,cAAc,EACxB,UAAU,EAAE,yBAAyB,EACrC,OAAO,EAAE,sCAAsC,GAC9C,OAAO,CAAC,yBAAyB,CAAC,CAyCpC;CACF"}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { assertDefined, assertNotNull, } from "../../../../util/type-guard/defined.js";
|
|
2
2
|
import { SimCfnCfDistroConfigValidator } from "./sim-cfn-cf-distro-config-validator.js";
|
|
3
3
|
import { simCfnCfDistroWithRunnableEdgeAssociations } from "./sim-cfn-cf-distro-edge-associations.js";
|
|
4
|
+
import { simCfnCfDistroWithHeldResponseHeadersPolicies } from "./sim-cfn-cf-distro-response-headers-policy.js";
|
|
4
5
|
import { simCfnCfDistroWithoutAbsentWebAcl } from "./sim-cfn-cf-distro-web-acl.js";
|
|
5
6
|
/**
|
|
6
7
|
* Creates simulated CloudFront Distributions from CloudFormation Resources.
|
|
7
8
|
*
|
|
8
9
|
* A `WebACLId` naming a web ACL this simulation does not hold is left out and
|
|
9
|
-
* recorded, and so
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
10
|
+
* recorded, and so are a Lambda@Edge association it cannot run and a
|
|
11
|
+
* `ResponseHeadersPolicyId` naming a policy it does not hold. CloudFront has no
|
|
12
|
+
* Resource of its own for any of the three, so all of them live on the
|
|
13
|
+
* Distribution itself, and refusing one would take the Distribution down over
|
|
14
|
+
* something that was never the point of the template. The site a local dev
|
|
15
|
+
* server and a suite of tests make requests to has to survive that.
|
|
14
16
|
*/
|
|
15
17
|
export class SimCfnCfDistroCreator {
|
|
16
18
|
cloudFront;
|
|
@@ -31,7 +33,7 @@ export class SimCfnCfDistroCreator {
|
|
|
31
33
|
});
|
|
32
34
|
const output = await this.cloudFront.createDistribution({
|
|
33
35
|
input: {
|
|
34
|
-
DistributionConfig: deployableConfig(resource, validator.validate(), context.simAws),
|
|
36
|
+
DistributionConfig: deployableConfig(resource, validator.validate(), context.simAws, this.cloudFront),
|
|
35
37
|
},
|
|
36
38
|
});
|
|
37
39
|
const distributionId = output.Distribution?.Id;
|
|
@@ -45,7 +47,7 @@ export class SimCfnCfDistroCreator {
|
|
|
45
47
|
* The DistributionConfig to deploy, without the parts this simulation cannot
|
|
46
48
|
* act on, each recorded on the Resource.
|
|
47
49
|
*/
|
|
48
|
-
function deployableConfig(resource, distributionConfig, simAws) {
|
|
49
|
-
return simCfnCfDistroWithoutAbsentWebAcl(resource, simCfnCfDistroWithRunnableEdgeAssociations(resource, distributionConfig, simAws), simAws);
|
|
50
|
+
function deployableConfig(resource, distributionConfig, simAws, cloudFront) {
|
|
51
|
+
return simCfnCfDistroWithoutAbsentWebAcl(resource, simCfnCfDistroWithHeldResponseHeadersPolicies(resource, simCfnCfDistroWithRunnableEdgeAssociations(resource, distributionConfig, simAws), cloudFront), simAws);
|
|
50
52
|
}
|
|
51
53
|
//# sourceMappingURL=sim-cfn-cf-distro-creator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-cfn-cf-distro-creator.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/cfn/distro/sim-cfn-cf-distro-creator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,aAAa,GACd,MAAM,wCAAwC,CAAC;AAShD,OAAO,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AACxF,OAAO,EAAE,0CAA0C,EAAE,MAAM,0CAA0C,CAAC;AACtG,OAAO,EAAE,iCAAiC,EAAE,MAAM,gCAAgC,CAAC;AAOnF
|
|
1
|
+
{"version":3,"file":"sim-cfn-cf-distro-creator.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/cfn/distro/sim-cfn-cf-distro-creator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,aAAa,GACd,MAAM,wCAAwC,CAAC;AAShD,OAAO,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AACxF,OAAO,EAAE,0CAA0C,EAAE,MAAM,0CAA0C,CAAC;AACtG,OAAO,EAAE,6CAA6C,EAAE,MAAM,gDAAgD,CAAC;AAC/G,OAAO,EAAE,iCAAiC,EAAE,MAAM,gCAAgC,CAAC;AAOnF;;;;;;;;;;GAUG;AACH,MAAM,OAAO,qBAAqB;IACf,UAAU,CAAgB;IAE3C,YAAY,UAA2C;QACrD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,MAAM,CACV,QAAwB,EACxB,UAAqC,EACrC,OAA+C;QAE/C,MAAM,uBAAuB,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;QAEjE,aAAa,CACX,uBAAuB,EACvB,iCAAiC,QAAQ,CAAC,SAAS,qBAAqB,CACzE,CAAC;QACF,aAAa,CACX,uBAAuB,EACvB,iCAAiC,QAAQ,CAAC,SAAS,qBAAqB,CACzE,CAAC;QAEF,MAAM,SAAS,GAAG,IAAI,6BAA6B,CAAC;YAClD,SAAS,EAAE,QAAQ,CAAC,SAAS;YAC7B,kBAAkB,EAAE,uBAAuB;SAC5C,CAAC,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC;YACtD,KAAK,EAAE;gBACL,kBAAkB,EAAE,gBAAgB,CAClC,QAAQ,EACR,SAAS,CAAC,QAAQ,EAAE,EACpB,OAAO,CAAC,MAAM,EACd,IAAI,CAAC,UAAU,CAChB;aACF;SACF,CAAC,CAAC;QAEH,MAAM,cAAc,GAAG,MAAM,CAAC,YAAY,EAAE,EAAE,CAAC;QAC/C,aAAa,CACX,cAAc,EACd,iCAAiC,QAAQ,CAAC,SAAS,0BAA0B,CAC9E,CAAC;QAEF,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC,cAAc,CAAC,CAAC;QAE5E,aAAa,CACX,YAAY,EACZ,wCAAwC,cAAc,yCAAyC,CAChG,CAAC;QAEF,OAAO,YAAY,CAAC;IACtB,CAAC;CACF;AAED;;;GAGG;AACH,SAAS,gBAAgB,CACvB,QAAwB,EACxB,kBAAmD,EACnD,MAAc,EACd,UAAyB;IAEzB,OAAO,iCAAiC,CACtC,QAAQ,EACR,6CAA6C,CAC3C,QAAQ,EACR,0CAA0C,CACxC,QAAQ,EACR,kBAAkB,EAClB,MAAM,CACP,EACD,UAAU,CACX,EACD,MAAM,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { SimCfnResource } from "../../../cloudformation/resource/sim-cfn-resource.js";
|
|
2
|
+
import type { SimCloudFrontDistributionConfig } from "../../command/create-distribution/create-distribution.command.js";
|
|
3
|
+
import type { SimCloudFront } from "../../sim-cloudfront.js";
|
|
4
|
+
/**
|
|
5
|
+
* The DistributionConfig to deploy, without a `ResponseHeadersPolicyId` naming
|
|
6
|
+
* a response headers policy this simulation does not hold.
|
|
7
|
+
*
|
|
8
|
+
* `CreateDistribution` refuses such an ID, as real CloudFront refuses one, and
|
|
9
|
+
* a Distribution deployed from a template is the one place that refusal costs
|
|
10
|
+
* more than it is worth. A stack naming a policy from a real account is
|
|
11
|
+
* ordinary, and so is one naming a policy another stack created. Neither says
|
|
12
|
+
* anything about the site the Distribution serves, and a Distribution that
|
|
13
|
+
* failed to deploy takes every request a local dev server and a test suite
|
|
14
|
+
* make with it. That is the same reason an absent `WebACLId` is left out here.
|
|
15
|
+
*
|
|
16
|
+
* So the property is left off that Behavior and recorded on
|
|
17
|
+
* `stack.ignoredProperties`. The Behavior deploys and serves every response
|
|
18
|
+
* without the policy's headers. A test that cares reads the record.
|
|
19
|
+
*
|
|
20
|
+
* One Behavior losing its policy leaves the others holding theirs. CloudFront's
|
|
21
|
+
* managed policies count as held, so a Behavior naming one keeps it.
|
|
22
|
+
*/
|
|
23
|
+
export declare function simCfnCfDistroWithHeldResponseHeadersPolicies(resource: SimCfnResource, distributionConfig: SimCloudFrontDistributionConfig, cloudFront: SimCloudFront): SimCloudFrontDistributionConfig;
|
|
24
|
+
//# sourceMappingURL=sim-cfn-cf-distro-response-headers-policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cfn-cf-distro-response-headers-policy.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/cfn/distro/sim-cfn-cf-distro-response-headers-policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,KAAK,EAEV,+BAA+B,EAChC,MAAM,kEAAkE,CAAC;AAE1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AA+C7D;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,6CAA6C,CAC3D,QAAQ,EAAE,cAAc,EACxB,kBAAkB,EAAE,+BAA+B,EACnD,UAAU,EAAE,aAAa,GACxB,+BAA+B,CAcjC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { normalizeSimCfList } from "../../command/create-distribution/sim-cf-normalize-list.js";
|
|
2
|
+
/**
|
|
3
|
+
* The path a dropped policy on the default Behavior is recorded under.
|
|
4
|
+
*/
|
|
5
|
+
const defaultBehaviorPath = "DistributionConfig.DefaultCacheBehavior";
|
|
6
|
+
/**
|
|
7
|
+
* Takes a `ResponseHeadersPolicyId` naming a policy this simulation does not
|
|
8
|
+
* hold off the Behavior that named it, and records each one.
|
|
9
|
+
*/
|
|
10
|
+
class SimCfnCfDistroPolicyDrops {
|
|
11
|
+
resource;
|
|
12
|
+
cloudFront;
|
|
13
|
+
count = 0;
|
|
14
|
+
constructor(resource, cloudFront) {
|
|
15
|
+
this.resource = resource;
|
|
16
|
+
this.cloudFront = cloudFront;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* One Behavior, keeping a policy that is here and dropping one that is not.
|
|
20
|
+
*/
|
|
21
|
+
heldPolicy(behavior, behaviorPath) {
|
|
22
|
+
const policyId = behavior.ResponseHeadersPolicyId;
|
|
23
|
+
if (policyId === undefined ||
|
|
24
|
+
this.cloudFront.getResponseHeadersPolicyById(policyId) !== undefined) {
|
|
25
|
+
return behavior;
|
|
26
|
+
}
|
|
27
|
+
this.count += 1;
|
|
28
|
+
this.resource.ignoreProperty(`${behaviorPath}.ResponseHeadersPolicyId`, `response headers policy ${policyId} is not held by this simulation, ` +
|
|
29
|
+
`so the Behavior is deployed without one and serves every response ` +
|
|
30
|
+
`without the headers that policy would have set`);
|
|
31
|
+
return { ...behavior, ResponseHeadersPolicyId: undefined };
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The DistributionConfig to deploy, without a `ResponseHeadersPolicyId` naming
|
|
36
|
+
* a response headers policy this simulation does not hold.
|
|
37
|
+
*
|
|
38
|
+
* `CreateDistribution` refuses such an ID, as real CloudFront refuses one, and
|
|
39
|
+
* a Distribution deployed from a template is the one place that refusal costs
|
|
40
|
+
* more than it is worth. A stack naming a policy from a real account is
|
|
41
|
+
* ordinary, and so is one naming a policy another stack created. Neither says
|
|
42
|
+
* anything about the site the Distribution serves, and a Distribution that
|
|
43
|
+
* failed to deploy takes every request a local dev server and a test suite
|
|
44
|
+
* make with it. That is the same reason an absent `WebACLId` is left out here.
|
|
45
|
+
*
|
|
46
|
+
* So the property is left off that Behavior and recorded on
|
|
47
|
+
* `stack.ignoredProperties`. The Behavior deploys and serves every response
|
|
48
|
+
* without the policy's headers. A test that cares reads the record.
|
|
49
|
+
*
|
|
50
|
+
* One Behavior losing its policy leaves the others holding theirs. CloudFront's
|
|
51
|
+
* managed policies count as held, so a Behavior naming one keeps it.
|
|
52
|
+
*/
|
|
53
|
+
export function simCfnCfDistroWithHeldResponseHeadersPolicies(resource, distributionConfig, cloudFront) {
|
|
54
|
+
const drops = new SimCfnCfDistroPolicyDrops(resource, cloudFront);
|
|
55
|
+
const defaultCacheBehavior = distroDefaultBehavior(drops, distributionConfig);
|
|
56
|
+
const cacheBehaviors = distroCacheBehaviors(drops, distributionConfig);
|
|
57
|
+
if (drops.count === 0) {
|
|
58
|
+
return distributionConfig;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
...distributionConfig,
|
|
62
|
+
DefaultCacheBehavior: defaultCacheBehavior,
|
|
63
|
+
CacheBehaviors: cacheBehaviors,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The default cache Behavior, without a policy that is not here.
|
|
68
|
+
*/
|
|
69
|
+
function distroDefaultBehavior(drops, distributionConfig) {
|
|
70
|
+
const behavior = distributionConfig.DefaultCacheBehavior;
|
|
71
|
+
if (behavior === undefined) {
|
|
72
|
+
return undefined;
|
|
73
|
+
}
|
|
74
|
+
return drops.heldPolicy(behavior, defaultBehaviorPath);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Every path-based cache Behavior, each without a policy that is not here.
|
|
78
|
+
*
|
|
79
|
+
* A Behavior is recorded under its `PathPattern`, in the terms the template
|
|
80
|
+
* wrote it in, the way a skipped Lambda@Edge association is. Its position is
|
|
81
|
+
* the fallback for a hand-written entry that left the pattern out.
|
|
82
|
+
*/
|
|
83
|
+
function distroCacheBehaviors(drops, distributionConfig) {
|
|
84
|
+
const behaviors = normalizeSimCfList("CacheBehaviors", distributionConfig.CacheBehaviors);
|
|
85
|
+
const items = behaviors?.Items;
|
|
86
|
+
if (items === undefined) {
|
|
87
|
+
return distributionConfig.CacheBehaviors;
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
...behaviors,
|
|
91
|
+
Items: items.map((behavior, index) => drops.heldPolicy(behavior, `DistributionConfig.CacheBehaviors.${behavior.PathPattern ?? String(index)}`)),
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=sim-cfn-cf-distro-response-headers-policy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cfn-cf-distro-response-headers-policy.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/cfn/distro/sim-cfn-cf-distro-response-headers-policy.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4DAA4D,CAAC;AAGhG;;GAEG;AACH,MAAM,mBAAmB,GAAG,yCAAyC,CAAC;AAEtE;;;GAGG;AACH,MAAM,yBAAyB;IAIV,QAAQ;IACR,UAAU;IAJtB,KAAK,GAAG,CAAC,CAAC;IAEjB,YACmB,QAAwB,EACxB,UAAyB;wBADzB,QAAQ;0BACR,UAAU;IAC1B,CAAC;IAEJ;;OAEG;IACH,UAAU,CACR,QAA0C,EAC1C,YAAoB;QAEpB,MAAM,QAAQ,GAAG,QAAQ,CAAC,uBAAuB,CAAC;QAElD,IACE,QAAQ,KAAK,SAAS;YACtB,IAAI,CAAC,UAAU,CAAC,4BAA4B,CAAC,QAAQ,CAAC,KAAK,SAAS,EACpE,CAAC;YACD,OAAO,QAAQ,CAAC;QAClB,CAAC;QAED,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;QAChB,IAAI,CAAC,QAAQ,CAAC,cAAc,CAC1B,GAAG,YAAY,0BAA0B,EACzC,2BAA2B,QAAQ,mCAAmC;YACpE,oEAAoE;YACpE,gDAAgD,CACnD,CAAC;QAEF,OAAO,EAAE,GAAG,QAAQ,EAAE,uBAAuB,EAAE,SAAS,EAAE,CAAC;IAC7D,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,6CAA6C,CAC3D,QAAwB,EACxB,kBAAmD,EACnD,UAAyB;IAEzB,MAAM,KAAK,GAAG,IAAI,yBAAyB,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IAClE,MAAM,oBAAoB,GAAG,qBAAqB,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAAC;IAC9E,MAAM,cAAc,GAAG,oBAAoB,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAAC;IAEvE,IAAI,KAAK,CAAC,KAAK,KAAK,CAAC,EAAE,CAAC;QACtB,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IAED,OAAO;QACL,GAAG,kBAAkB;QACrB,oBAAoB,EAAE,oBAAoB;QAC1C,cAAc,EAAE,cAAc;KAC/B,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAS,qBAAqB,CAC5B,KAAgC,EAChC,kBAAmD;IAEnD,MAAM,QAAQ,GAAG,kBAAkB,CAAC,oBAAoB,CAAC;IAEzD,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,KAAK,CAAC,UAAU,CAAC,QAAQ,EAAE,mBAAmB,CAAC,CAAC;AACzD,CAAC;AAED;;;;;;GAMG;AACH,SAAS,oBAAoB,CAC3B,KAAgC,EAChC,kBAAmD;IAEnD,MAAM,SAAS,GAAG,kBAAkB,CAClC,gBAAgB,EAChB,kBAAkB,CAAC,cAAc,CAClC,CAAC;IACF,MAAM,KAAK,GAAG,SAAS,EAAE,KAAK,CAAC;IAE/B,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,OAAO,kBAAkB,CAAC,cAAc,CAAC;IAC3C,CAAC;IAED,OAAO;QACL,GAAG,SAAS;QACZ,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,CACnC,KAAK,CAAC,UAAU,CACd,QAAQ,EACR,qCAAqC,QAAQ,CAAC,WAAW,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE,CAC7E,CACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-cf-response-headers-applicator.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/controller/response-headers/sim-cf-response-headers-applicator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAGzF;;;;;;;;GAQG;AACH,qBAAa,8BAA8B;IACzC;;;OAGG;IACH,KAAK,CACH,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,qBAAqB,GAC/B,QAAQ,
|
|
1
|
+
{"version":3,"file":"sim-cf-response-headers-applicator.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/controller/response-headers/sim-cf-response-headers-applicator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAGzF;;;;;;;;GAQG;AACH,qBAAa,8BAA8B;IACzC;;;OAGG;IACH,KAAK,CACH,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,qBAAqB,GAC/B,QAAQ,CAuBV;CACF"}
|
package/dist/service/cloudfront/controller/response-headers/sim-cf-response-headers-applicator.js
CHANGED
|
@@ -21,11 +21,11 @@ export class SimCfResponseHeadersApplicator {
|
|
|
21
21
|
const policy = cloudFront.getResponseHeadersPolicyById(policyId);
|
|
22
22
|
if (policy === undefined) {
|
|
23
23
|
throw new SimCloudFrontNoSuchResponseHeadersPolicy(`Sim CloudFront response headers policy ${policyId} does not exist. ` +
|
|
24
|
-
`
|
|
25
|
-
`
|
|
26
|
-
`
|
|
24
|
+
`One of CloudFront's five managed policies can be applied, and so ` +
|
|
25
|
+
`can a policy created in this simulation. A policy ID from a real ` +
|
|
26
|
+
`account is neither.`);
|
|
27
27
|
}
|
|
28
|
-
return policy.apply(response, request.headers.get("origin"));
|
|
28
|
+
return policy.apply(response, request.headers.get("origin"), request.method);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
//# sourceMappingURL=sim-cf-response-headers-applicator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-cf-response-headers-applicator.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/controller/response-headers/sim-cf-response-headers-applicator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wCAAwC,EAAE,MAAM,qCAAqC,CAAC;AAE/F;;;;;;;;GAQG;AACH,MAAM,OAAO,8BAA8B;IACzC;;;OAGG;IACH,KAAK,CACH,UAAyB,EACzB,OAAgB,EAChB,QAAkB,EAClB,SAAgC;QAEhC,MAAM,QAAQ,GAAG,SAAS,CAAC,uBAAuB,CAAC;QAEnD,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,OAAO,QAAQ,CAAC;QAClB,CAAC;QAED,MAAM,MAAM,GAAG,UAAU,CAAC,4BAA4B,CAAC,QAAQ,CAAC,CAAC;QAEjE,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,IAAI,wCAAwC,CAChD,0CAA0C,QAAQ,mBAAmB;gBACnE,
|
|
1
|
+
{"version":3,"file":"sim-cf-response-headers-applicator.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/controller/response-headers/sim-cf-response-headers-applicator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wCAAwC,EAAE,MAAM,qCAAqC,CAAC;AAE/F;;;;;;;;GAQG;AACH,MAAM,OAAO,8BAA8B;IACzC;;;OAGG;IACH,KAAK,CACH,UAAyB,EACzB,OAAgB,EAChB,QAAkB,EAClB,SAAgC;QAEhC,MAAM,QAAQ,GAAG,SAAS,CAAC,uBAAuB,CAAC;QAEnD,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,OAAO,QAAQ,CAAC;QAClB,CAAC;QAED,MAAM,MAAM,GAAG,UAAU,CAAC,4BAA4B,CAAC,QAAQ,CAAC,CAAC;QAEjE,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,IAAI,wCAAwC,CAChD,0CAA0C,QAAQ,mBAAmB;gBACnE,mEAAmE;gBACnE,mEAAmE;gBACnE,qBAAqB,CACxB,CAAC;QACJ,CAAC;QAED,OAAO,MAAM,CAAC,KAAK,CACjB,QAAQ,EACR,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,EAC7B,OAAO,CAAC,MAAM,CACf,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-cf-behavior-response-headers-policy.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/distribution/configurator/sim-cf-behavior-response-headers-policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,kEAAkE,CAAC;AAExH,OAAO,KAAK,EAAE,0CAA0C,EAAE,MAAM,0EAA0E,CAAC;AAE3I;;;;;;;;GAQG;AACH,qBAAa,kCAAkC;IAE3C,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAD3B,YACmB,QAAQ,EAAE,0CAA0C,EACnE;IAEJ;;;;;;;OAOG;IACH,cAAc,CAAC,kBAAkB,EAAE,+BAA+B,GAAG,IAAI,CAcxE;IAED;;OAEG;IACH,YAAY,CACV,cAAc,EAAE,MAAM,GAAG,SAAS,EAClC,uBAAuB,EAAE,MAAM,GAAG,SAAS,GAC1C,IAAI,
|
|
1
|
+
{"version":3,"file":"sim-cf-behavior-response-headers-policy.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/distribution/configurator/sim-cf-behavior-response-headers-policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,kEAAkE,CAAC;AAExH,OAAO,KAAK,EAAE,0CAA0C,EAAE,MAAM,0EAA0E,CAAC;AAE3I;;;;;;;;GAQG;AACH,qBAAa,kCAAkC;IAE3C,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAD3B,YACmB,QAAQ,EAAE,0CAA0C,EACnE;IAEJ;;;;;;;OAOG;IACH,cAAc,CAAC,kBAAkB,EAAE,+BAA+B,GAAG,IAAI,CAcxE;IAED;;OAEG;IACH,YAAY,CACV,cAAc,EAAE,MAAM,GAAG,SAAS,EAClC,uBAAuB,EAAE,MAAM,GAAG,SAAS,GAC1C,IAAI,CAeN;CACF"}
|
package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-response-headers-policy.js
CHANGED
|
@@ -42,10 +42,9 @@ export class SimCfBehaviorResponseHeadersPolicy {
|
|
|
42
42
|
}
|
|
43
43
|
throw new SimCloudFrontInvalidResponseHeadersPolicyId(`Sim CloudFront Behavior for Origin ${targetOriginId} names response ` +
|
|
44
44
|
`headers policy ${responseHeadersPolicyId}, which does not exist. ` +
|
|
45
|
-
`
|
|
46
|
-
`
|
|
47
|
-
`
|
|
48
|
-
`will not be found.`);
|
|
45
|
+
`A Behavior names one of CloudFront's five managed policies, or a ` +
|
|
46
|
+
`policy an AWS::CloudFront::ResponseHeadersPolicy Resource created in ` +
|
|
47
|
+
`this simulation. A policy ID from a real account is neither.`);
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
50
|
//# sourceMappingURL=sim-cf-behavior-response-headers-policy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-cf-behavior-response-headers-policy.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/distribution/configurator/sim-cf-behavior-response-headers-policy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2CAA2C,EAAE,MAAM,qCAAqC,CAAC;AAGlG;;;;;;;;GAQG;AACH,MAAM,OAAO,kCAAkC;IAE1B,QAAQ;IAD3B,YACmB,QAAoD;wBAApD,QAAQ;IACxB,CAAC;IAEJ;;;;;;;OAOG;IACH,cAAc,CAAC,kBAAmD;QAChE,MAAM,SAAS,GAAG;YAChB,kBAAkB,CAAC,oBAAoB;YACvC,GAAG,CAAC,kBAAkB,CAAC,cAAc,EAAE,KAAK,IAAI,EAAE,CAAC;SACpD,CAAC;QAEF,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;YACjC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;gBAC3B,IAAI,CAAC,YAAY,CACf,QAAQ,CAAC,cAAc,EACvB,QAAQ,CAAC,uBAAuB,CACjC,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAED;;OAEG;IACH,YAAY,CACV,cAAkC,EAClC,uBAA2C;QAE3C,IACE,uBAAuB,KAAK,SAAS;YACrC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,uBAAuB,CAAC,KAAK,SAAS,EACzD,CAAC;YACD,OAAO;QACT,CAAC;QAED,MAAM,IAAI,2CAA2C,CACnD,sCAAsC,cAAc,kBAAkB;YACpE,kBAAkB,uBAAuB,0BAA0B;YACnE,mEAAmE;YACnE,
|
|
1
|
+
{"version":3,"file":"sim-cf-behavior-response-headers-policy.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/distribution/configurator/sim-cf-behavior-response-headers-policy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2CAA2C,EAAE,MAAM,qCAAqC,CAAC;AAGlG;;;;;;;;GAQG;AACH,MAAM,OAAO,kCAAkC;IAE1B,QAAQ;IAD3B,YACmB,QAAoD;wBAApD,QAAQ;IACxB,CAAC;IAEJ;;;;;;;OAOG;IACH,cAAc,CAAC,kBAAmD;QAChE,MAAM,SAAS,GAAG;YAChB,kBAAkB,CAAC,oBAAoB;YACvC,GAAG,CAAC,kBAAkB,CAAC,cAAc,EAAE,KAAK,IAAI,EAAE,CAAC;SACpD,CAAC;QAEF,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;YACjC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;gBAC3B,IAAI,CAAC,YAAY,CACf,QAAQ,CAAC,cAAc,EACvB,QAAQ,CAAC,uBAAuB,CACjC,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAED;;OAEG;IACH,YAAY,CACV,cAAkC,EAClC,uBAA2C;QAE3C,IACE,uBAAuB,KAAK,SAAS;YACrC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,uBAAuB,CAAC,KAAK,SAAS,EACzD,CAAC;YACD,OAAO;QACT,CAAC;QAED,MAAM,IAAI,2CAA2C,CACnD,sCAAsC,cAAc,kBAAkB;YACpE,kBAAkB,uBAAuB,0BAA0B;YACnE,mEAAmE;YACnE,uEAAuE;YACvE,8DAA8D,CACjE,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type SimCloudFrontResponseHeadersPolicyMap } from "./sim-cf-response-headers-policy.js";
|
|
2
|
+
/**
|
|
3
|
+
* The IDs AWS publishes for its managed response headers policies.
|
|
4
|
+
*
|
|
5
|
+
* A template names one of these directly. CDK's `ResponseHeadersPolicy`
|
|
6
|
+
* statics carry the same five, and synthesize the ID into a Behavior's
|
|
7
|
+
* `ResponseHeadersPolicyId` with no Resource behind it.
|
|
8
|
+
*/
|
|
9
|
+
export declare const simCfManagedResponseHeadersPolicyIds: {
|
|
10
|
+
readonly simpleCors: "60669652-455b-4ae9-85a4-c4c02393f86c";
|
|
11
|
+
readonly corsWithPreflight: "5cc3b908-e619-4b99-88e5-2cf7f45965bd";
|
|
12
|
+
readonly securityHeaders: "67f7725c-6f97-4210-82d7-5512b31e9d03";
|
|
13
|
+
readonly corsAndSecurityHeaders: "e61eb60c-9c35-4d20-a928-2b84e02af89c";
|
|
14
|
+
readonly corsWithPreflightAndSecurityHeaders: "eaab4381-ed33-4a86-88ca-d9558dc6cd63";
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* The five managed response headers policies, built fresh for one simulated
|
|
18
|
+
* CloudFront.
|
|
19
|
+
*
|
|
20
|
+
* CloudFront owns these and every account has them, so a Behavior can name one
|
|
21
|
+
* without a template creating anything. They are built per registry so that
|
|
22
|
+
* one simulation never hands another a policy object.
|
|
23
|
+
*
|
|
24
|
+
* https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-response-headers-policies.html
|
|
25
|
+
*/
|
|
26
|
+
export declare function simCfManagedResponseHeadersPolicies(): SimCloudFrontResponseHeadersPolicyMap;
|
|
27
|
+
//# sourceMappingURL=sim-cf-managed-response-headers-policies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cf-managed-response-headers-policies.d.ts","sourceRoot":"","sources":["../../../../src/service/cloudfront/response-headers-policy/sim-cf-managed-response-headers-policies.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,qCAAqC,EAC3C,MAAM,qCAAqC,CAAC;AAE7C;;;;;;GAMG;AACH,eAAO,MAAM,oCAAoC;aAC/C,UAAU,EAAE,sCAAsC;aAClD,iBAAiB,EAAE,sCAAsC;aACzD,eAAe,EAAE,sCAAsC;aACvD,sBAAsB,EAAE,sCAAsC;aAC9D,mCAAmC,EAAE,sCAAsC;CACnE,CAAC;AAgEX;;;;;;;;;GASG;AACH,wBAAgB,mCAAmC,IAAI,qCAAqC,CAgC3F"}
|