@kensio/yulin 1.20.5 → 1.20.7

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.
Files changed (129) hide show
  1. package/dist/service/aws/factory/sim-aws-logs-collaborators.d.ts +6 -0
  2. package/dist/service/aws/factory/sim-aws-logs-collaborators.d.ts.map +1 -1
  3. package/dist/service/aws/factory/sim-aws-logs-collaborators.js +9 -0
  4. package/dist/service/aws/factory/sim-aws-logs-collaborators.js.map +1 -1
  5. package/dist/service/cloudformation/resource/sim-cfn-resource-record.d.ts.map +1 -1
  6. package/dist/service/cloudformation/resource/sim-cfn-resource-record.js +9 -0
  7. package/dist/service/cloudformation/resource/sim-cfn-resource-record.js.map +1 -1
  8. package/dist/service/logs/command/delivery/sim-logs-delivery-source-commands.d.ts +5 -1
  9. package/dist/service/logs/command/delivery/sim-logs-delivery-source-commands.d.ts.map +1 -1
  10. package/dist/service/logs/command/delivery/sim-logs-delivery-source-commands.js +10 -1
  11. package/dist/service/logs/command/delivery/sim-logs-delivery-source-commands.js.map +1 -1
  12. package/dist/service/logs/delivery/cloudfront/sim-aws-logs-delivery-distributions.d.ts +34 -0
  13. package/dist/service/logs/delivery/cloudfront/sim-aws-logs-delivery-distributions.d.ts.map +1 -0
  14. package/dist/service/logs/delivery/cloudfront/sim-aws-logs-delivery-distributions.js +54 -0
  15. package/dist/service/logs/delivery/cloudfront/sim-aws-logs-delivery-distributions.js.map +1 -0
  16. package/dist/service/logs/delivery/sim-logs-delivery-source-resources.d.ts +28 -0
  17. package/dist/service/logs/delivery/sim-logs-delivery-source-resources.d.ts.map +1 -0
  18. package/dist/service/logs/delivery/sim-logs-delivery-source-resources.js +14 -0
  19. package/dist/service/logs/delivery/sim-logs-delivery-source-resources.js.map +1 -0
  20. package/dist/service/logs/sim-logs-commands.d.ts +7 -0
  21. package/dist/service/logs/sim-logs-commands.d.ts.map +1 -1
  22. package/dist/service/logs/sim-logs-commands.js +3 -1
  23. package/dist/service/logs/sim-logs-commands.js.map +1 -1
  24. package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-configuration.d.ts +83 -0
  25. package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-configuration.d.ts.map +1 -0
  26. package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-configuration.js +87 -0
  27. package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-configuration.js.map +1 -0
  28. package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-expiry.d.ts +24 -0
  29. package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-expiry.d.ts.map +1 -0
  30. package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-expiry.js +42 -0
  31. package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-expiry.js.map +1 -0
  32. package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-selection.d.ts +24 -0
  33. package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-selection.d.ts.map +1 -0
  34. package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-selection.js +51 -0
  35. package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-selection.js.map +1 -0
  36. package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-sweep.d.ts +38 -0
  37. package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-sweep.d.ts.map +1 -0
  38. package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-sweep.js +66 -0
  39. package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-sweep.js.map +1 -0
  40. package/dist/service/s3/bucket/sim-s3-bucket.d.ts +34 -0
  41. package/dist/service/s3/bucket/sim-s3-bucket.d.ts.map +1 -1
  42. package/dist/service/s3/bucket/sim-s3-bucket.js +43 -4
  43. package/dist/service/s3/bucket/sim-s3-bucket.js.map +1 -1
  44. package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-configuration.d.ts +31 -0
  45. package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-configuration.d.ts.map +1 -0
  46. package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-configuration.js +69 -0
  47. package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-configuration.js.map +1 -0
  48. package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-fields.d.ts +31 -0
  49. package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-fields.d.ts.map +1 -0
  50. package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-fields.js +50 -0
  51. package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-fields.js.map +1 -0
  52. package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-transitions.d.ts +19 -0
  53. package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-transitions.d.ts.map +1 -0
  54. package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-transitions.js +28 -0
  55. package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-transitions.js.map +1 -0
  56. package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-configurator.d.ts +1 -0
  57. package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-configurator.d.ts.map +1 -1
  58. package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-configurator.js +11 -0
  59. package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-configurator.js.map +1 -1
  60. package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-property-names.d.ts.map +1 -1
  61. package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-property-names.js +1 -4
  62. package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-property-names.js.map +1 -1
  63. package/dist/service/s3/command/create-bucket/create-bucket.handler.js +1 -1
  64. package/dist/service/s3/command/create-bucket/create-bucket.handler.js.map +1 -1
  65. package/dist/service/s3/command/delete-bucket-lifecycle/delete-bucket-lifecycle.command.d.ts +20 -0
  66. package/dist/service/s3/command/delete-bucket-lifecycle/delete-bucket-lifecycle.command.d.ts.map +1 -0
  67. package/dist/service/s3/command/delete-bucket-lifecycle/delete-bucket-lifecycle.command.js +2 -0
  68. package/dist/service/s3/command/delete-bucket-lifecycle/delete-bucket-lifecycle.command.js.map +1 -0
  69. package/dist/service/s3/command/delete-bucket-lifecycle/delete-bucket-lifecycle.handler.d.ts +29 -0
  70. package/dist/service/s3/command/delete-bucket-lifecycle/delete-bucket-lifecycle.handler.d.ts.map +1 -0
  71. package/dist/service/s3/command/delete-bucket-lifecycle/delete-bucket-lifecycle.handler.js +37 -0
  72. package/dist/service/s3/command/delete-bucket-lifecycle/delete-bucket-lifecycle.handler.js.map +1 -0
  73. package/dist/service/s3/command/get-bucket-lifecycle-configuration/get-bucket-lifecycle-configuration.command.d.ts +26 -0
  74. package/dist/service/s3/command/get-bucket-lifecycle-configuration/get-bucket-lifecycle-configuration.command.d.ts.map +1 -0
  75. package/dist/service/s3/command/get-bucket-lifecycle-configuration/get-bucket-lifecycle-configuration.command.js +2 -0
  76. package/dist/service/s3/command/get-bucket-lifecycle-configuration/get-bucket-lifecycle-configuration.command.js.map +1 -0
  77. package/dist/service/s3/command/get-bucket-lifecycle-configuration/get-bucket-lifecycle-configuration.handler.d.ts +30 -0
  78. package/dist/service/s3/command/get-bucket-lifecycle-configuration/get-bucket-lifecycle-configuration.handler.d.ts.map +1 -0
  79. package/dist/service/s3/command/get-bucket-lifecycle-configuration/get-bucket-lifecycle-configuration.handler.js +43 -0
  80. package/dist/service/s3/command/get-bucket-lifecycle-configuration/get-bucket-lifecycle-configuration.handler.js.map +1 -0
  81. package/dist/service/s3/command/lifecycle/sim-s3-lifecycle-authorizer.d.ts +32 -0
  82. package/dist/service/s3/command/lifecycle/sim-s3-lifecycle-authorizer.d.ts.map +1 -0
  83. package/dist/service/s3/command/lifecycle/sim-s3-lifecycle-authorizer.js +51 -0
  84. package/dist/service/s3/command/lifecycle/sim-s3-lifecycle-authorizer.js.map +1 -0
  85. package/dist/service/s3/command/lifecycle/sim-s3-lifecycle-commands.d.ts +23 -0
  86. package/dist/service/s3/command/lifecycle/sim-s3-lifecycle-commands.d.ts.map +1 -0
  87. package/dist/service/s3/command/lifecycle/sim-s3-lifecycle-commands.js +31 -0
  88. package/dist/service/s3/command/lifecycle/sim-s3-lifecycle-commands.js.map +1 -0
  89. package/dist/service/s3/command/lifecycle/sim-s3-lifecycle-rules-validation.d.ts +12 -0
  90. package/dist/service/s3/command/lifecycle/sim-s3-lifecycle-rules-validation.d.ts.map +1 -0
  91. package/dist/service/s3/command/lifecycle/sim-s3-lifecycle-rules-validation.js +53 -0
  92. package/dist/service/s3/command/lifecycle/sim-s3-lifecycle-rules-validation.js.map +1 -0
  93. package/dist/service/s3/command/put-bucket-lifecycle-configuration/put-bucket-lifecycle-configuration.command.d.ts +111 -0
  94. package/dist/service/s3/command/put-bucket-lifecycle-configuration/put-bucket-lifecycle-configuration.command.d.ts.map +1 -0
  95. package/dist/service/s3/command/put-bucket-lifecycle-configuration/put-bucket-lifecycle-configuration.command.js +2 -0
  96. package/dist/service/s3/command/put-bucket-lifecycle-configuration/put-bucket-lifecycle-configuration.command.js.map +1 -0
  97. package/dist/service/s3/command/put-bucket-lifecycle-configuration/put-bucket-lifecycle-configuration.handler.d.ts +30 -0
  98. package/dist/service/s3/command/put-bucket-lifecycle-configuration/put-bucket-lifecycle-configuration.handler.d.ts.map +1 -0
  99. package/dist/service/s3/command/put-bucket-lifecycle-configuration/put-bucket-lifecycle-configuration.handler.js +43 -0
  100. package/dist/service/s3/command/put-bucket-lifecycle-configuration/put-bucket-lifecycle-configuration.handler.js.map +1 -0
  101. package/dist/service/s3/command/sim-s3-command.types.d.ts +3 -0
  102. package/dist/service/s3/command/sim-s3-command.types.d.ts.map +1 -1
  103. package/dist/service/s3/error/sim-s3.error.d.ts +11 -0
  104. package/dist/service/s3/error/sim-s3.error.d.ts.map +1 -1
  105. package/dist/service/s3/error/sim-s3.error.js +13 -0
  106. package/dist/service/s3/error/sim-s3.error.js.map +1 -1
  107. package/dist/service/s3/sdk/sim-s3-sdk-command-router.d.ts.map +1 -1
  108. package/dist/service/s3/sdk/sim-s3-sdk-command-router.js +12 -0
  109. package/dist/service/s3/sdk/sim-s3-sdk-command-router.js.map +1 -1
  110. package/dist/service/s3/sim-s3-commands.d.ts +2 -0
  111. package/dist/service/s3/sim-s3-commands.d.ts.map +1 -1
  112. package/dist/service/s3/sim-s3-commands.js +3 -0
  113. package/dist/service/s3/sim-s3-commands.js.map +1 -1
  114. package/dist/service/s3/sim-s3-operations.d.ts +6 -0
  115. package/dist/service/s3/sim-s3-operations.d.ts.map +1 -1
  116. package/dist/service/s3/sim-s3-operations.js +12 -0
  117. package/dist/service/s3/sim-s3-operations.js.map +1 -1
  118. package/dist/service/s3/upload/sim-s3-multipart-uploads.d.ts +9 -0
  119. package/dist/service/s3/upload/sim-s3-multipart-uploads.d.ts.map +1 -1
  120. package/dist/service/s3/upload/sim-s3-multipart-uploads.js +15 -0
  121. package/dist/service/s3/upload/sim-s3-multipart-uploads.js.map +1 -1
  122. package/dist/terraform/map/sim-tf-map-s3-lifecycle.d.ts.map +1 -1
  123. package/dist/terraform/map/sim-tf-map-s3-lifecycle.js +4 -5
  124. package/dist/terraform/map/sim-tf-map-s3-lifecycle.js.map +1 -1
  125. package/dist/util/clock/sim-clock-control.d.ts +8 -0
  126. package/dist/util/clock/sim-clock-control.d.ts.map +1 -1
  127. package/dist/util/clock/sim-clock-control.js +10 -0
  128. package/dist/util/clock/sim-clock-control.js.map +1 -1
  129. package/package.json +1 -1
@@ -1,3 +1,4 @@
1
+ import type { SimLogsDeliverySourceResources } from "../../logs/delivery/sim-logs-delivery-source-resources.js";
1
2
  import type { SimLogsSubscriptionDestinations } from "../../logs/subscription/sim-logs-subscription-destinations.js";
2
3
  import type { SimAwsAccountRegionScope } from "../sim-aws-account-region-scope.js";
3
4
  import type { SimAws } from "../sim-aws.js";
@@ -6,6 +7,7 @@ import type { SimAws } from "../sim-aws.js";
6
7
  */
7
8
  interface SimAwsLogsCollaborators {
8
9
  readonly subscriptionDestinations: SimLogsSubscriptionDestinations;
10
+ readonly deliverySourceResources: SimLogsDeliverySourceResources;
9
11
  }
10
12
  /**
11
13
  * Build the collaborators simulated CloudWatch Logs takes beyond the scoped
@@ -17,6 +19,10 @@ interface SimAwsLogsCollaborators {
17
19
  * is looked up when an event is delivered rather than now: every Lambda
18
20
  * function records its output in simulated CloudWatch Logs, so reaching one
19
21
  * while this is being built would be a cycle with no bottom.
22
+ *
23
+ * A delivery source names the resource its logs come from by ARN. CloudFront
24
+ * is the one delivered service whose resources are resolved, and its resolver
25
+ * takes the same scope to read the account segment of that ARN against.
20
26
  */
21
27
  export declare function simAwsLogsCollaborators(simAws: SimAws, accountRegionScope: SimAwsAccountRegionScope): SimAwsLogsCollaborators;
22
28
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"sim-aws-logs-collaborators.d.ts","sourceRoot":"","sources":["../../../../src/service/aws/factory/sim-aws-logs-collaborators.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,+DAA+D,CAAC;AACrH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C;;GAEG;AACH,UAAU,uBAAuB;IAC/B,QAAQ,CAAC,wBAAwB,EAAE,+BAA+B,CAAC;CACpE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,MAAM,EACd,kBAAkB,EAAE,wBAAwB,GAC3C,uBAAuB,CAOzB"}
1
+ {"version":3,"file":"sim-aws-logs-collaborators.d.ts","sourceRoot":"","sources":["../../../../src/service/aws/factory/sim-aws-logs-collaborators.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,2DAA2D,CAAC;AAEhH,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,+DAA+D,CAAC;AACrH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C;;GAEG;AACH,UAAU,uBAAuB;IAC/B,QAAQ,CAAC,wBAAwB,EAAE,+BAA+B,CAAC;IACnE,QAAQ,CAAC,uBAAuB,EAAE,8BAA8B,CAAC;CAClE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,MAAM,EACd,kBAAkB,EAAE,wBAAwB,GAC3C,uBAAuB,CAWzB"}
@@ -1,3 +1,4 @@
1
+ import { SimAwsLogsDeliveryDistributions } from "../../logs/delivery/cloudfront/sim-aws-logs-delivery-distributions.js";
1
2
  import { SimAwsLogsSubscriptionFunctions } from "../../logs/subscription/lambda/sim-aws-logs-subscription-functions.js";
2
3
  /**
3
4
  * Build the collaborators simulated CloudWatch Logs takes beyond the scoped
@@ -9,6 +10,10 @@ import { SimAwsLogsSubscriptionFunctions } from "../../logs/subscription/lambda/
9
10
  * is looked up when an event is delivered rather than now: every Lambda
10
11
  * function records its output in simulated CloudWatch Logs, so reaching one
11
12
  * while this is being built would be a cycle with no bottom.
13
+ *
14
+ * A delivery source names the resource its logs come from by ARN. CloudFront
15
+ * is the one delivered service whose resources are resolved, and its resolver
16
+ * takes the same scope to read the account segment of that ARN against.
12
17
  */
13
18
  export function simAwsLogsCollaborators(simAws, accountRegionScope) {
14
19
  return {
@@ -16,6 +21,10 @@ export function simAwsLogsCollaborators(simAws, accountRegionScope) {
16
21
  simAws,
17
22
  accountRegionScope,
18
23
  }),
24
+ deliverySourceResources: new SimAwsLogsDeliveryDistributions({
25
+ simAws,
26
+ accountRegionScope,
27
+ }),
19
28
  };
20
29
  }
21
30
  //# sourceMappingURL=sim-aws-logs-collaborators.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sim-aws-logs-collaborators.js","sourceRoot":"","sources":["../../../../src/service/aws/factory/sim-aws-logs-collaborators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,uEAAuE,CAAC;AAYxH;;;;;;;;;;GAUG;AACH,MAAM,UAAU,uBAAuB,CACrC,MAAc,EACd,kBAA4C;IAE5C,OAAO;QACL,wBAAwB,EAAE,IAAI,+BAA+B,CAAC;YAC5D,MAAM;YACN,kBAAkB;SACnB,CAAC;KACH,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"sim-aws-logs-collaborators.js","sourceRoot":"","sources":["../../../../src/service/aws/factory/sim-aws-logs-collaborators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,uEAAuE,CAAC;AAExH,OAAO,EAAE,+BAA+B,EAAE,MAAM,uEAAuE,CAAC;AAaxH;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,uBAAuB,CACrC,MAAc,EACd,kBAA4C;IAE5C,OAAO;QACL,wBAAwB,EAAE,IAAI,+BAA+B,CAAC;YAC5D,MAAM;YACN,kBAAkB;SACnB,CAAC;QACF,uBAAuB,EAAE,IAAI,+BAA+B,CAAC;YAC3D,MAAM;YACN,kBAAkB;SACnB,CAAC;KACH,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"sim-cfn-resource-record.d.ts","sourceRoot":"","sources":["../../../../src/service/cloudformation/resource/sim-cfn-resource-record.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAE1F,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,2CAA2C,CAAC;AAEnD,OAAO,KAAK,EACV,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,6CAA6C,CAAC;AAOrD,OAAO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,MAAM,EAAE,CAEvB;IAED;;;;;;;;;;;;OAYG;IACG,kBAAkB,CACtB,OAAO,EAAE,4BAA4B,GACpC,OAAO,CAAC,yBAAyB,CAAC,CAEpC;IAED;;;OAGG;IACH,SAAS,CAAC,sBAAsB,IAAI,IAAI,CAEvC;IAED,OAAO,CAAC,eAAe;CAOxB"}
1
+ {"version":3,"file":"sim-cfn-resource-record.d.ts","sourceRoot":"","sources":["../../../../src/service/cloudformation/resource/sim-cfn-resource-record.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAE1F,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,2CAA2C,CAAC;AAEnD,OAAO,KAAK,EACV,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,6CAA6C,CAAC;AAQrD,OAAO,KAAK,EACV,4BAA4B,EAC5B,mCAAmC,EACpC,MAAM,4BAA4B,CAAC;AAEpC;;;;;;;;;;;;;;GAcG;AACH,8BAAsB,oBAAqB,YAAW,qBAAqB;IACzE,SAAgB,kBAAkB,EAAE,wBAAwB,CAAC;IAC7D,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC,6EAA6E;IAC7E,SAAgB,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9C,SAAgB,QAAQ,EAAE,yBAAyB,CAAC;IAEpD,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAiC;IACrE,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAA+B;IACtE,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAiC;IAClE,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAsB;IAEzD,YAAY,UAAU,GAAE,mCAAwC,EAgC/D;IAED;;OAEG;IACH,aAAoB,WAAW,IAAI,MAAM,GAAG,SAAS,CAAC;IAEtD;;OAEG;IACH,IAAW,iBAAiB,IAAI,SAAS,qBAAqB,EAAE,CAE/D;IAED;;;;OAIG;IACH,IAAW,IAAI,IAAI,MAAM,GAAG,SAAS,CAEpC;IAED;;;;;OAKG;IACH,IAAW,UAAU,IAAI,yBAAyB,CAEjD;IAED;;;;;OAKG;IACH,IAAW,uBAAuB,IAAI,WAAW,CAAC,MAAM,CAAC,CAExD;IAED;;OAEG;IACH,IAAW,cAAc,IAAI,MAAM,GAAG,SAAS,CAE9C;IAED;;;;;;OAMG;IACH,IAAW,gBAAgB,IAAI,OAAO,CAKrC;IAED;;;;;;OAMG;IACH,IAAW,QAAQ,IAAI,mBAAmB,CAEzC;IAED;;;;OAIG;IACH,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAEjD;IAED;;;;;;OAMG;IACH,cAAc,CAAC,aAAa,EAAE,MAAM,GAAG,mBAAmB,CAEzD;IAED;;;;;;OAMG;IACH,YAAY,IAAI,MAAM,EAAE,CAEvB;IAED;;;;;;;;;;;;OAYG;IACG,kBAAkB,CACtB,OAAO,EAAE,4BAA4B,GACpC,OAAO,CAAC,yBAAyB,CAAC,CAEpC;IAED;;;OAGG;IACH,SAAS,CAAC,sBAAsB,IAAI,IAAI,CAEvC;IAED,OAAO,CAAC,eAAe;CAOxB"}
@@ -1,5 +1,6 @@
1
1
  import { SimCfnIgnoredProperties } from "./ignore/sim-cfn-ignored-properties.js";
2
2
  import { SimCfnResourceTemplateReader } from "./template/sim-cfn-resource-template-reader.js";
3
+ import { SimCfnPseudoParameters } from "../parameters/pseudo/sim-cfn-pseudo-parameters.js";
3
4
  import { SimCfnResourcePropertyResolver } from "./resolve/property/sim-cfn-resource-property-resolver.js";
4
5
  import { simCfnResourceValueAdapter, } from "./cfn/sim-cfn-resource-value-adapter.js";
5
6
  import { simAwsAccountRegionScopeFactory } from "../../aws/sim-aws-account-region-scope.factory.js";
@@ -39,6 +40,14 @@ export class SimCfnResourceRecord {
39
40
  parameters,
40
41
  exports,
41
42
  accountRegionScope: this.accountRegionScope,
43
+ // The Resource pass needs these as well as the template-wide pass. An
44
+ // `Fn::Sub` naming a pseudo parameter beside a Ref to another Resource
45
+ // resolves in neither pass alone, because a value re-emitted for the
46
+ // next pass carries only the variables that pass was given.
47
+ pseudoParameters: new SimCfnPseudoParameters({
48
+ accountRegionScope: this.accountRegionScope,
49
+ stackName,
50
+ }),
42
51
  propertyIgnorer: this,
43
52
  resourceType: this.type,
44
53
  });
@@ -1 +1 @@
1
- {"version":3,"file":"sim-cfn-resource-record.js","sourceRoot":"","sources":["../../../../src/service/cloudformation/resource/sim-cfn-resource-record.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAKjF,OAAO,EAAE,4BAA4B,EAAE,MAAM,gDAAgD,CAAC;AAK9F,OAAO,EAAE,8BAA8B,EAAE,MAAM,0DAA0D,CAAC;AAC1G,OAAO,EAEL,0BAA0B,GAC3B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,+BAA+B,EAAE,MAAM,mDAAmD,CAAC;AAMpG;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAgB,oBAAoB;IACxB,kBAAkB,CAA2B;IAC7C,SAAS,CAAS;IAClC,6EAA6E;IAC7D,SAAS,CAAqB;IAC9B,QAAQ,CAA4B;IAEnC,mBAAmB,GAAG,IAAI,uBAAuB,EAAE,CAAC;IACpD,sBAAsB,CAA+B;IACrD,gBAAgB,CAAiC;IACjD,kBAAkB,CAAsB;IAEzD,YAAY,UAAU,GAAwC,EAAE;QAC9D,MAAM,EACJ,kBAAkB,GAAG,+BAA+B,CAAC,IAAI,EAAE,EAC3D,SAAS,GAAG,UAAU,EACtB,SAAS,EACT,QAAQ,GAAG,EAAE,EACb,UAAU,EACV,kBAAkB,GAAG,IAAI,GAAG,EAAE,EAC9B,OAAO,GACR,GAAG,UAAU,CAAC;QAEf,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;QAC7C,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAA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AI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IACtD,CAAC;IAED;;;;;;OAMG;IACH,cAAc,CAAC,aAAqB;QAClC,OAAO,IAAI,CAAC,eAAe,EAAE,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;OAMG;IACH,YAAY;QACV,OAAO,IAAI,CAAC,sBAAsB,CAAC,YAAY,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,kBAAkB,CACtB,OAAqC;QAErC,OAAO,MAAM,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;IAED;;;OAGG;IACO,sBAAsB;QAC9B,IAAI,CAAC,mBAAmB,CAAC,KAAK,EAAE,CAAC;IACnC,CAAC;IAEO,eAAe;QACrB,OAAO,0BAA0B,CAAC;YAChC,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAC,CAAC;IACL,CAAC;CACF"}
1
+ {"version":3,"file":"sim-cfn-resource-record.js","sourceRoot":"","sources":["../../../../src/service/cloudformation/resource/sim-cfn-resource-record.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAKjF,OAAO,EAAE,4BAA4B,EAAE,MAAM,gDAAgD,CAAC;AAK9F,OAAO,EAAE,sBAAsB,EAAE,MAAM,mDAAmD,CAAC;AAC3F,OAAO,EAAE,8BAA8B,EAAE,MAAM,0DAA0D,CAAC;AAC1G,OAAO,EAEL,0BAA0B,GAC3B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,+BAA+B,EAAE,MAAM,mDAAmD,CAAC;AAMpG;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAgB,oBAAoB;IACxB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CAAC,mBAAmB,CAAC,KAAK,EAAE,CAAC;IACnC,CAAC;IAEO,eAAe;QACrB,OAAO,0BAA0B,CAAC;YAChC,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -1,4 +1,5 @@
1
1
  import type { SimAwsAccountRegionScope } from "../../../aws/sim-aws-account-region-scope.js";
2
+ import type { SimLogsDeliverySourceResources } from "../../delivery/sim-logs-delivery-source-resources.js";
2
3
  import type { SimLogsDeliverySourceStore } from "../../delivery/sim-logs-delivery-source-store.js";
3
4
  import type { SimLogsDeliveryStore } from "../../delivery/sim-logs-delivery-store.js";
4
5
  import type { SimLogsAuthorizer } from "../authorize/sim-logs-authorizer.js";
@@ -9,6 +10,7 @@ interface SimLogsDeliverySourceCommandsProperties {
9
10
  readonly deliveries: SimLogsDeliveryStore;
10
11
  readonly authorizer: SimLogsAuthorizer;
11
12
  readonly accountRegionScope: SimAwsAccountRegionScope;
13
+ readonly resources: SimLogsDeliverySourceResources;
12
14
  }
13
15
  /**
14
16
  * The commands that put, describe and remove delivery sources.
@@ -21,7 +23,9 @@ export declare class SimLogsDeliverySourceCommands {
21
23
  *
22
24
  * The service is read from the resource ARN, as real CloudWatch Logs reads
23
25
  * it, and the region the request was made in has to be one that service's
24
- * delivery can be set up from.
26
+ * delivery can be set up from. The ARN is then resolved to a resource the
27
+ * account holds. A source over a distribution the account never created
28
+ * fails here, ahead of the delivery that would have carried nothing.
25
29
  */
26
30
  putDeliverySource(command: SimPutDeliverySourceCommand, options?: SimLogsRequestOptions): SimPutDeliverySourceCommandOutput;
27
31
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"sim-logs-delivery-source-commands.d.ts","sourceRoot":"","sources":["../../../../../src/service/logs/command/delivery/sim-logs-delivery-source-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AAU7F,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kDAAkD,CAAC;AACnG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACtF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAE7E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,KAAK,EACV,8BAA8B,EAC9B,oCAAoC,EACpC,iCAAiC,EACjC,uCAAuC,EACvC,2BAA2B,EAC3B,iCAAiC,EAClC,MAAM,8BAA8B,CAAC;AAWtC,UAAU,uCAAuC;IAC/C,QAAQ,CAAC,OAAO,EAAE,0BAA0B,CAAC;IAC7C,QAAQ,CAAC,UAAU,EAAE,oBAAoB,CAAC;IAC1C,QAAQ,CAAC,UAAU,EAAE,iBAAiB,CAAC;IACvC,QAAQ,CAAC,kBAAkB,EAAE,wBAAwB,CAAC;CACvD;AAED;;GAEG;AACH,qBAAa,6BAA6B;;IAMxC,YAAY,UAAU,EAAE,uCAAuC,EAK9D;IAED;;;;;;OAMG;IACH,iBAAiB,CACf,OAAO,EAAE,2BAA2B,EACpC,OAAO,CAAC,EAAE,qBAAqB,GAC9B,iCAAiC,CAsCnC;IAED;;OAEG;IACH,uBAAuB,CACrB,OAAO,EAAE,iCAAiC,EAC1C,OAAO,CAAC,EAAE,qBAAqB,GAC9B,uCAAuC,CAuBzC;IAED;;OAEG;IACH,oBAAoB,CAClB,OAAO,EAAE,8BAA8B,EACvC,OAAO,CAAC,EAAE,qBAAqB,GAC9B,oCAAoC,CAatC;CACF"}
1
+ {"version":3,"file":"sim-logs-delivery-source-commands.d.ts","sourceRoot":"","sources":["../../../../../src/service/logs/command/delivery/sim-logs-delivery-source-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AAK7F,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,sDAAsD,CAAC;AAM3G,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kDAAkD,CAAC;AACnG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEtF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAE7E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,KAAK,EACV,8BAA8B,EAC9B,oCAAoC,EACpC,iCAAiC,EACjC,uCAAuC,EACvC,2BAA2B,EAC3B,iCAAiC,EAClC,MAAM,8BAA8B,CAAC;AAWtC,UAAU,uCAAuC;IAC/C,QAAQ,CAAC,OAAO,EAAE,0BAA0B,CAAC;IAC7C,QAAQ,CAAC,UAAU,EAAE,oBAAoB,CAAC;IAC1C,QAAQ,CAAC,UAAU,EAAE,iBAAiB,CAAC;IACvC,QAAQ,CAAC,kBAAkB,EAAE,wBAAwB,CAAC;IACtD,QAAQ,CAAC,SAAS,EAAE,8BAA8B,CAAC;CACpD;AAED;;GAEG;AACH,qBAAa,6BAA6B;;IAOxC,YAAY,UAAU,EAAE,uCAAuC,EAM9D;IAED;;;;;;;;OAQG;IACH,iBAAiB,CACf,OAAO,EAAE,2BAA2B,EACpC,OAAO,CAAC,EAAE,qBAAqB,GAC9B,iCAAiC,CA4CnC;IAED;;OAEG;IACH,uBAAuB,CACrB,OAAO,EAAE,iCAAiC,EAC1C,OAAO,CAAC,EAAE,qBAAqB,GAC9B,uCAAuC,CAuBzC;IAED;;OAEG;IACH,oBAAoB,CAClB,OAAO,EAAE,8BAA8B,EACvC,OAAO,CAAC,EAAE,qBAAqB,GAC9B,oCAAoC,CAatC;CACF"}
@@ -1,6 +1,7 @@
1
1
  import { simLogsAnyDeliverySourceArn, simLogsDeliverySourceArn, } from "../../delivery/sim-logs-delivery-arn.js";
2
2
  import { requireSimLogsDeliverySource, requiredSimLogsDeliveredService, } from "../../delivery/sim-logs-delivery-source-service.js";
3
3
  import { SimLogsDeliverySource } from "../../delivery/sim-logs-delivery-source.js";
4
+ import { SimLogsResourceNotFoundException } from "../../error/sim-logs.error.js";
4
5
  import { SimLogsPage } from "../sim-logs-page.js";
5
6
  import { simLogsDeliverySourceDetail } from "./sim-logs-delivery-detail.js";
6
7
  import { refuseSimLogsDeliverySourceInUse } from "./sim-logs-delivery-in-use.js";
@@ -15,18 +16,22 @@ export class SimLogsDeliverySourceCommands {
15
16
  #deliveries;
16
17
  #authorizer;
17
18
  #scope;
19
+ #resources;
18
20
  constructor(properties) {
19
21
  this.#sources = properties.sources;
20
22
  this.#deliveries = properties.deliveries;
21
23
  this.#authorizer = properties.authorizer;
22
24
  this.#scope = properties.accountRegionScope;
25
+ this.#resources = properties.resources;
23
26
  }
24
27
  /**
25
28
  * Put a delivery source over a resource whose logs are to be delivered.
26
29
  *
27
30
  * The service is read from the resource ARN, as real CloudWatch Logs reads
28
31
  * it, and the region the request was made in has to be one that service's
29
- * delivery can be set up from.
32
+ * delivery can be set up from. The ARN is then resolved to a resource the
33
+ * account holds. A source over a distribution the account never created
34
+ * fails here, ahead of the delivery that would have carried nothing.
30
35
  */
31
36
  putDeliverySource(command, options) {
32
37
  const input = command.input;
@@ -41,6 +46,10 @@ export class SimLogsDeliverySourceCommands {
41
46
  regionName: this.#scope.regionName,
42
47
  logType,
43
48
  });
49
+ const absent = this.#resources.refusalFor(resourceArn);
50
+ if (absent !== undefined) {
51
+ throw new SimLogsResourceNotFoundException(absent);
52
+ }
44
53
  const source = new SimLogsDeliverySource({
45
54
  name,
46
55
  resourceArn,
@@ -1 +1 @@
1
- {"version":3,"file":"sim-logs-delivery-source-commands.js","sourceRoot":"","sources":["../../../../../src/service/logs/command/delivery/sim-logs-delivery-source-commands.ts"],"names":[],"mappings":"AACA,OAAO,EACL,2BAA2B,EAC3B,wBAAwB,GACzB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,4BAA4B,EAC5B,+BAA+B,GAChC,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uC,EACvC,OAA+B;QAE/B,MAAM,IAAI,GAAG,4BAA4B,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAEtE,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAChC,2BAA2B,EAC3B,wBAAwB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,EAC3C,OAAO,EAAE,MAAM,CAChB,CAAC;QAEF,gCAAgC,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QACzD,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAE3B,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;IAC3B,CAAC;CACF"}
1
+ {"version":3,"file":"sim-logs-delivery-source-commands.js","sourceRoot":"","sources":["../../../../../src/service/logs/command/delivery/sim-logs-delivery-source-commands.ts"],"names":[],"mappings":"AACA,OAAO,EACL,2BAA2B,EAC3B,wBAAwB,GACzB,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EACL,4BAA4B,EAC5B,+BAA+B,GAChC,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AAGnF,OAAO,EAAE,gCAAgC,EAAE,MAAM,+BAA+B,CAAC;AAEjF,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAUlD,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,gCAAgC,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,EACL,6BAA6B,EAC7B,4BAA4B,GAC7B,MAAM,8BAA8B,CAAC;AAEtC,iFAAiF;AACjF,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAUhC;;GAEG;AACH,MAAM,OAAO,6BAA6B;IAC/B,QAAQ,CAA6B;IACrC,WAAW,CAAuB;IAClC,WAAW,CAAoB;IAC/B,MAAM,CAA2B;IACjC,UAAU,CAAiC;IA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AE,MAAM,CAChB,CAAC;QAEF,gCAAgC,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QACzD,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAE3B,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;IAC3B,CAAC;CACF"}
@@ -0,0 +1,34 @@
1
+ import type { SimAwsAccountRegionScope } from "../../../aws/sim-aws-account-region-scope.js";
2
+ import type { SimAws } from "../../../aws/sim-aws.js";
3
+ import type { SimLogsDeliverySourceResources } from "../sim-logs-delivery-source-resources.js";
4
+ interface SimAwsLogsDeliveryDistributionsProperties {
5
+ readonly simAws: SimAws;
6
+ readonly accountRegionScope: SimAwsAccountRegionScope;
7
+ }
8
+ /**
9
+ * The simulated CloudFront a delivery source's `resourceArn` is resolved in.
10
+ *
11
+ * CloudFront is the one delivered service resolved here, because it is the one
12
+ * whose delivery rules are modelled at all. An ARN of any other service is
13
+ * left alone, and a source over it is stored on the shape of the ARN alone, as
14
+ * it always was.
15
+ *
16
+ * The distribution is looked up as the source is put, and nothing holds onto
17
+ * it. A distribution deleted afterwards leaves the source standing, the way
18
+ * real CloudWatch Logs leaves it. CloudFront is account-scoped, and the lookup
19
+ * covers the whole account whichever region the request was made in.
20
+ */
21
+ export declare class SimAwsLogsDeliveryDistributions implements SimLogsDeliverySourceResources {
22
+ #private;
23
+ constructor(properties: SimAwsLogsDeliveryDistributionsProperties);
24
+ /**
25
+ * Why the account cannot deliver logs from the distribution an ARN names.
26
+ *
27
+ * The account segment is read before the distribution is looked up. An ARN
28
+ * naming another account is a mistake of its own, and an id that happens to
29
+ * match one this account holds would otherwise carry it through.
30
+ */
31
+ refusalFor(resourceArn: string): string | undefined;
32
+ }
33
+ export {};
34
+ //# sourceMappingURL=sim-aws-logs-delivery-distributions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-aws-logs-delivery-distributions.d.ts","sourceRoot":"","sources":["../../../../../src/service/logs/delivery/cloudfront/sim-aws-logs-delivery-distributions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AAC7F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,0CAA0C,CAAC;AAG/F,UAAU,yCAAyC;IACjD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,kBAAkB,EAAE,wBAAwB,CAAC;CACvD;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,+BAAgC,YAAW,8BAA8B;;IAIpF,YAAY,UAAU,EAAE,yCAAyC,EAGhE;IAED;;;;;;OAMG;IACH,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAgClD;CACF"}
@@ -0,0 +1,54 @@
1
+ import { parseSimArn } from "../../../aws/arn.js";
2
+ import { simLogsCloudFrontDeliveryService } from "../sim-logs-delivery-source-service.js";
3
+ /**
4
+ * The simulated CloudFront a delivery source's `resourceArn` is resolved in.
5
+ *
6
+ * CloudFront is the one delivered service resolved here, because it is the one
7
+ * whose delivery rules are modelled at all. An ARN of any other service is
8
+ * left alone, and a source over it is stored on the shape of the ARN alone, as
9
+ * it always was.
10
+ *
11
+ * The distribution is looked up as the source is put, and nothing holds onto
12
+ * it. A distribution deleted afterwards leaves the source standing, the way
13
+ * real CloudWatch Logs leaves it. CloudFront is account-scoped, and the lookup
14
+ * covers the whole account whichever region the request was made in.
15
+ */
16
+ export class SimAwsLogsDeliveryDistributions {
17
+ #simAws;
18
+ #scope;
19
+ constructor(properties) {
20
+ this.#simAws = properties.simAws;
21
+ this.#scope = properties.accountRegionScope;
22
+ }
23
+ /**
24
+ * Why the account cannot deliver logs from the distribution an ARN names.
25
+ *
26
+ * The account segment is read before the distribution is looked up. An ARN
27
+ * naming another account is a mistake of its own, and an id that happens to
28
+ * match one this account holds would otherwise carry it through.
29
+ */
30
+ refusalFor(resourceArn) {
31
+ const arn = parseSimArn(resourceArn);
32
+ if (arn === undefined || arn.service !== simLogsCloudFrontDeliveryService) {
33
+ return undefined;
34
+ }
35
+ const accountId = this.#scope.accountId;
36
+ if (arn.accountId !== accountId) {
37
+ return (`resourceArn '${resourceArn}' names account ${arn.accountId}, and a ` +
38
+ `delivery source is over a resource of the account creating it, ` +
39
+ `which is ${accountId}`);
40
+ }
41
+ const distribution = this.#simAws
42
+ .accountRegionScope(accountId, this.#scope.regionName)
43
+ .cloudFront()
44
+ .getSimDistributionById(arn.resourceId);
45
+ if (distribution !== undefined) {
46
+ return undefined;
47
+ }
48
+ return (`resourceArn '${resourceArn}' names no CloudFront distribution in ` +
49
+ `account ${accountId}. Create the distribution before the delivery ` +
50
+ `source, or name it from the template so the id it was given is ` +
51
+ `substituted into the ARN`);
52
+ }
53
+ }
54
+ //# sourceMappingURL=sim-aws-logs-delivery-distributions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-aws-logs-delivery-distributions.js","sourceRoot":"","sources":["../../../../../src/service/logs/delivery/cloudfront/sim-aws-logs-delivery-distributions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIlD,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAO1F;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,+BAA+B;IACjC,OAAO,CAAS;IAChB,MAAM,CAA2B;IAE1C,YAAY,UAAqD;QAC/D,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC;QACjC,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC,kBAAkB,CAAC;IAC9C,CAAC;IAED;;;;;;OAMG;IACH,UAAU,CAAC,WAAmB;QAC5B,MAAM,GAAG,GAAG,WAAW,CAAC,WAAW,CAAC,CAAC;QAErC,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,CAAC,OAAO,KAAK,gCAAgC,EAAE,CAAC;YAC1E,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;QAExC,IAAI,GAAG,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;YAChC,OAAO,CACL,gBAAgB,WAAW,mBAAmB,GAAG,CAAC,SAAS,UAAU;gBACrE,iEAAiE;gBACjE,YAAY,SAAS,EAAE,CACxB,CAAC;QACJ,CAAC;QAED,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO;aAC9B,kBAAkB,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC;aACrD,UAAU,EAAE;aACZ,sBAAsB,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAE1C,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;YAC/B,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,OAAO,CACL,gBAAgB,WAAW,wCAAwC;YACnE,WAAW,SAAS,gDAAgD;YACpE,iEAAiE;YACjE,0BAA0B,CAC3B,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * The resources a delivery source's `resourceArn` is resolved against.
3
+ *
4
+ * Real CloudWatch Logs resolves that ARN to a resource of the account making
5
+ * the request, and refuses a source over one the account does not hold. A
6
+ * simulated CloudWatch Logs on its own has no other simulated service to
7
+ * resolve it in. A wired simulation supplies this, and a standalone SimLogs
8
+ * leaves it out.
9
+ */
10
+ export interface SimLogsDeliverySourceResources {
11
+ /**
12
+ * Why the account cannot deliver logs from the resource an ARN names, or
13
+ * undefined where it can.
14
+ */
15
+ refusalFor(resourceArn: string): string | undefined;
16
+ }
17
+ /**
18
+ * The resources of a simulation holding nothing to resolve an ARN in.
19
+ *
20
+ * A SimLogs built on its own takes this. A test about delivery configuration
21
+ * alone names an ARN with no resource behind it, as it always could. A test
22
+ * that wants the refusal builds the simulated service the ARN names too.
23
+ */
24
+ export declare class SimLogsUncheckedDeliverySourceResources implements SimLogsDeliverySourceResources {
25
+ /** Every ARN is taken, because there is nothing here to resolve one in. */
26
+ refusalFor(): undefined;
27
+ }
28
+ //# sourceMappingURL=sim-logs-delivery-source-resources.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-logs-delivery-source-resources.d.ts","sourceRoot":"","sources":["../../../../src/service/logs/delivery/sim-logs-delivery-source-resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,WAAW,8BAA8B;IAC7C;;;OAGG;IACH,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACrD;AAED;;;;;;GAMG;AACH,qBAAa,uCAAwC,YAAW,8BAA8B;IAC5F,2EAA2E;IAC3E,UAAU,IAAI,SAAS,CAEtB;CACF"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The resources of a simulation holding nothing to resolve an ARN in.
3
+ *
4
+ * A SimLogs built on its own takes this. A test about delivery configuration
5
+ * alone names an ARN with no resource behind it, as it always could. A test
6
+ * that wants the refusal builds the simulated service the ARN names too.
7
+ */
8
+ export class SimLogsUncheckedDeliverySourceResources {
9
+ /** Every ARN is taken, because there is nothing here to resolve one in. */
10
+ refusalFor() {
11
+ return;
12
+ }
13
+ }
14
+ //# sourceMappingURL=sim-logs-delivery-source-resources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-logs-delivery-source-resources.js","sourceRoot":"","sources":["../../../../src/service/logs/delivery/sim-logs-delivery-source-resources.ts"],"names":[],"mappings":"AAiBA;;;;;;GAMG;AACH,MAAM,OAAO,uCAAuC;IAClD,2EAA2E;IAC3E,UAAU;QACR,OAAO;IACT,CAAC;CACF"}
@@ -5,6 +5,7 @@ import { SimLogsDeliveryCommands } from "./command/delivery/sim-logs-delivery-co
5
5
  import { SimLogsDeliveryDestinationCommands } from "./command/delivery/sim-logs-delivery-destination-commands.js";
6
6
  import { SimLogsDeliverySourceCommands } from "./command/delivery/sim-logs-delivery-source-commands.js";
7
7
  import { SimLogsDeliveryDestinationStore } from "./delivery/sim-logs-delivery-destination-store.js";
8
+ import { type SimLogsDeliverySourceResources } from "./delivery/sim-logs-delivery-source-resources.js";
8
9
  import { SimLogsDeliverySourceStore } from "./delivery/sim-logs-delivery-source-store.js";
9
10
  import { SimLogsDeliveryStore } from "./delivery/sim-logs-delivery-store.js";
10
11
  import { SimLogsFilterLogEvents } from "./command/event/sim-logs-filter-log-events.js";
@@ -28,6 +29,12 @@ export interface SimLogsProperties {
28
29
  * none of them.
29
30
  */
30
31
  readonly subscriptionDestinations?: SimLogsSubscriptionDestinations;
32
+ /**
33
+ * What a delivery source's `resourceArn` is resolved against. A SimLogs
34
+ * built on its own has no simulated CloudFront to find a distribution in. It
35
+ * takes any ARN, the way it always did.
36
+ */
37
+ readonly deliverySourceResources?: SimLogsDeliverySourceResources;
31
38
  }
32
39
  /**
33
40
  * The collaborators one simulated CloudWatch Logs scope is built from.
@@ -1 +1 @@
1
- {"version":3,"file":"sim-logs-commands.d.ts","sourceRoot":"","sources":["../../../src/service/logs/sim-logs-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAEvF,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,kDAAkD,CAAC;AAE1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAC3F,OAAO,EAAE,kCAAkC,EAAE,MAAM,8DAA8D,CAAC;AAClH,OAAO,EAAE,6BAA6B,EAAE,MAAM,yDAAyD,CAAC;AACxG,OAAO,EAAE,+BAA+B,EAAE,MAAM,mDAAmD,CAAC;AACpG,OAAO,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;AAC1F,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MA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D,QAAQ,CAAC,aAAa,EAAE,oBAAoB,CAAC;IAC7C,QAAQ,CAAC,MAAM,EAAE,yBAAyB,CAAC;IAC3C,QAAQ,CAAC,mBAAmB,EAAE,0BAA0B,CAAC;IACzD,QAAQ,CAAC,wBAAwB,EAAE,+BAA+B,CAAC;IACnE,QAAQ,CAAC,aAAa,EAAE,oBAAoB,CAAC;IAC7C,QAAQ,CAAC,eAAe,EAAE,6BAA6B,CAAC;IACxD,QAAQ,CAAC,oBAAoB,EAAE,kCAAkC,CAAC;IAClE,QAAQ,CAAC,UAAU,EAAE,uBAAuB,CAAC;IAC7C,QAAQ,CAAC,UAAU,EAAE,mBAAmB,CAAC;IAEzC,YAAY,UAAU,GAAE,iBAAsB,EAiF7C;CACF"}
@@ -6,6 +6,7 @@ import { SimLogsDeliveryCommands } from "./command/delivery/sim-logs-delivery-co
6
6
  import { SimLogsDeliveryDestinationCommands } from "./command/delivery/sim-logs-delivery-destination-commands.js";
7
7
  import { SimLogsDeliverySourceCommands } from "./command/delivery/sim-logs-delivery-source-commands.js";
8
8
  import { SimLogsDeliveryDestinationStore } from "./delivery/sim-logs-delivery-destination-store.js";
9
+ import { SimLogsUncheckedDeliverySourceResources, } from "./delivery/sim-logs-delivery-source-resources.js";
9
10
  import { SimLogsDeliverySourceStore } from "./delivery/sim-logs-delivery-source-store.js";
10
11
  import { SimLogsDeliveryStore } from "./delivery/sim-logs-delivery-store.js";
11
12
  import { SimLogsFilterLogEvents } from "./command/event/sim-logs-filter-log-events.js";
@@ -47,7 +48,7 @@ export class SimLogsCommands {
47
48
  deliveries;
48
49
  background;
49
50
  constructor(properties = {}) {
50
- const { accountRegionScope = simAwsAccountRegionScopeFactory.make(), iam = new SimIamAllowAllAuth(), background = new BackgroundTasks(), subscriptionDestinations = new SimLogsNoSubscriptionDestinations(), } = properties;
51
+ const { accountRegionScope = simAwsAccountRegionScopeFactory.make(), iam = new SimIamAllowAllAuth(), background = new BackgroundTasks(), subscriptionDestinations = new SimLogsNoSubscriptionDestinations(), deliverySourceResources = new SimLogsUncheckedDeliverySourceResources(), } = properties;
51
52
  const authorizer = new SimLogsAuthorizer({ iam, accountRegionScope });
52
53
  const groups = new SimLogsLogGroupStore({ accountRegionScope });
53
54
  const eventIds = new SimLogsEventIds();
@@ -102,6 +103,7 @@ export class SimLogsCommands {
102
103
  deliveries,
103
104
  authorizer,
104
105
  accountRegionScope,
106
+ resources: deliverySourceResources,
105
107
  });
106
108
  this.deliveryDestinations = new SimLogsDeliveryDestinationCommands({
107
109
  destinations: deliveryDestinations,
@@ -1 +1 @@
1
- {"version":3,"file":"sim-logs-commands.js","sourceRoot":"","sources":["../../../src/service/logs/sim-logs-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,GAChB,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAAE,+BAA+B,EAAE,MAAM,gDAAgD,CAAC;AACjG,OAAO,EACL,kBAAkB,GAEnB,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAC3F,OAAO,EAAE,kCAAkC,EAAE,MAAM,8DAA8D,CAAC;AAClH,OAAO,EAAE,6BAA6B,EAAE,MAAM,yDAAyD,CAAC;AACxG,OAAO,EAAE,+BAA+B,EAAE,MAAM,mDAAmD,CAAC;AACpG,OAAO,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;AAC1F,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,EAAE,uBAAuB,EAAE,MAAM,gDAAgD,CAAC;AACzF,OAAO,EAAE,wBAAwB,EAAE,MAAM,gD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EAAE,CAAC;QACnE,MAAM,UAAU,GAAG,IAAI,oBAAoB,EAAE,CAAC;QAE9C,IAAI,CAAC,mBAAmB,GAAG,eAAe,CAAC;QAC3C,IAAI,CAAC,wBAAwB,GAAG,oBAAoB,CAAC;QACrD,IAAI,CAAC,aAAa,GAAG,UAAU,CAAC;QAChC,IAAI,CAAC,eAAe,GAAG,IAAI,6BAA6B,CAAC;YACvD,OAAO,EAAE,eAAe;YACxB,UAAU;YACV,UAAU;YACV,kBAAkB;SACnB,CAAC,CAAC;QACH,IAAI,CAAC,oBAAoB,GAAG,IAAI,kCAAkC,CAAC;YACjE,YAAY,EAAE,oBAAoB;YAClC,UAAU;YACV,UAAU;YACV,kBAAkB;SACnB,CAAC,CAAC;QACH,IAAI,CAAC,UAAU,GAAG,IAAI,uBAAuB,CAAC;YAC5C,OAAO,EAAE,eAAe;YACxB,YAAY,EAAE,oBAAoB;YAClC,UAAU;YACV,UAAU;YACV,kBAAkB;SACnB,CAAC,CAAC;IACL,CAAC;CACF"}
1
+ {"version":3,"file":"sim-logs-commands.js","sourceRoot":"","sources":["../../../src/service/logs/sim-logs-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,GAChB,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAAE,+BAA+B,EAAE,MAAM,gDAAgD,CAAC;AACjG,OAAO,EACL,kBAAkB,GAEnB,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAC3F,OAAO,EAAE,kCAAkC,EAAE,MAAM,8DAA8D,CAAC;AAClH,OAAO,EAAE,6BAA6B,EAAE,MAAM,yDAAyD,CAAC;AACxG,OAAO,EAAE,+BAA+B,EAAE,MAAM,mDAAmD,CAAC;AACpG,OAAO,EAEL,uCAAuC,GACxC,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,0BAA0B,EAAE,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AAC,CAAC;QAC1E,IAAI,CAAC,aAAa,GAAG,IAAI,2BAA2B,CAAC;YACnD,MAAM;YACN,UAAU;YACV,YAAY,EAAE,wBAAwB;YACtC,KAAK,EAAE,UAAU;SAClB,CAAC,CAAC;QACH,IAAI,CAAC,aAAa,GAAG,IAAI,oBAAoB,CAAC;YAC5C,MAAM;YACN,QAAQ;YACR,KAAK,EAAE,UAAU;YACjB,MAAM;SACP,CAAC,CAAC;QAEH,MAAM,eAAe,GAAG,IAAI,0BAA0B,EAAE,CAAC;QACzD,MAAM,oBAAoB,GAAG,IAAI,+BAA+B,EAAE,CAAC;QACnE,MAAM,UAAU,GAAG,IAAI,oBAAoB,EAAE,CAAC;QAE9C,IAAI,CAAC,mBAAmB,GAAG,eAAe,CAAC;QAC3C,IAAI,CAAC,wBAAwB,GAAG,oBAAoB,CAAC;QACrD,IAAI,CAAC,aAAa,GAAG,UAAU,CAAC;QAChC,IAAI,CAAC,eAAe,GAAG,IAAI,6BAA6B,CAAC;YACvD,OAAO,EAAE,eAAe;YACxB,UAAU;YACV,UAAU;YACV,kBAAkB;YAClB,SAAS,EAAE,uBAAuB;SACnC,CAAC,CAAC;QACH,IAAI,CAAC,oBAAoB,GAAG,IAAI,kCAAkC,CAAC;YACjE,YAAY,EAAE,oBAAoB;YAClC,UAAU;YACV,UAAU;YACV,kBAAkB;SACnB,CAAC,CAAC;QACH,IAAI,CAAC,UAAU,GAAG,IAAI,uBAAuB,CAAC;YAC5C,OAAO,EAAE,eAAe;YACxB,YAAY,EAAE,oBAAoB;YAClC,UAAU;YACV,UAAU;YACV,kBAAkB;SACnB,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,83 @@
1
+ import type { SimS3LifecycleConfiguration as SimS3LifecycleConfigurationInput, SimS3LifecycleRule } from "../../command/put-bucket-lifecycle-configuration/put-bucket-lifecycle-configuration.command.js";
2
+ interface SimS3LifecycleConfigurationProperties {
3
+ readonly rules?: readonly SimS3LifecycleRule[];
4
+ }
5
+ /**
6
+ * An Object as a lifecycle rule reads it.
7
+ */
8
+ export interface SimS3LifecycleObject {
9
+ readonly key: string;
10
+ readonly size: number;
11
+ readonly lastModified: Date;
12
+ }
13
+ /**
14
+ * A multipart upload in progress as a lifecycle rule reads it.
15
+ */
16
+ export interface SimS3LifecycleUpload {
17
+ readonly key: string;
18
+ readonly initiated: Date;
19
+ }
20
+ /**
21
+ * The lifecycle configuration of one simulated S3 Bucket.
22
+ *
23
+ * A Bucket has one configuration rather than a list of them, which is why
24
+ * PutBucketLifecycleConfiguration replaces the whole thing. Real S3 has no way
25
+ * to add one rule without restating the others.
26
+ *
27
+ * The configuration also answers what its rules have expired. An Object goes
28
+ * once the clock passes the boundary of a rule that selects it, and a Bucket
29
+ * asks on the way to its storage. Nothing sweeps a Bucket on a schedule. See
30
+ * `simS3ObjectExpiryInstant` for why the boundary is a pure function of the
31
+ * current time.
32
+ */
33
+ export declare class SimS3LifecycleConfiguration {
34
+ private readonly storedRules;
35
+ constructor(properties?: SimS3LifecycleConfigurationProperties);
36
+ /**
37
+ * The configuration a Bucket nobody has configured has.
38
+ */
39
+ static empty(): SimS3LifecycleConfiguration;
40
+ /**
41
+ * The configuration a PutBucketLifecycleConfiguration request asks for.
42
+ */
43
+ static fromConfiguration(configuration: SimS3LifecycleConfigurationInput): SimS3LifecycleConfiguration;
44
+ /**
45
+ * The rules this Bucket carries.
46
+ *
47
+ * Cloned on the way out as they were on the way in. A caller holding the
48
+ * objects it put, or the ones a read gave it, could otherwise change what
49
+ * the Bucket is configured with by mutating them.
50
+ */
51
+ get rules(): readonly SimS3LifecycleRule[];
52
+ /**
53
+ * Whether the Bucket carries any rule at all.
54
+ *
55
+ * Real S3 distinguishes a Bucket with no configuration from one with an
56
+ * empty list of rules only in that it refuses to store the latter, so an
57
+ * unconfigured Bucket and a Bucket whose rules were all removed read alike.
58
+ */
59
+ get isEmpty(): boolean;
60
+ /**
61
+ * Whether an enabled rule has expired an Object by the given instant.
62
+ *
63
+ * One rule is enough. Real S3 applies the shortest expiry among the rules
64
+ * selecting a key, and an Object past any of the boundaries is past the
65
+ * shortest one.
66
+ */
67
+ expires(object: SimS3LifecycleObject, now: Date): boolean;
68
+ /**
69
+ * Whether an enabled rule has abandoned a multipart upload by the given
70
+ * instant.
71
+ */
72
+ abandons(upload: SimS3LifecycleUpload, now: Date): boolean;
73
+ /**
74
+ * The rules that act, which are the ones whose `Status` is `Enabled`.
75
+ *
76
+ * Read from the stored rules rather than from `rules`, because every read of
77
+ * a Bucket asks and cloning the whole configuration each time would be the
78
+ * cost of having one.
79
+ */
80
+ private enabledRules;
81
+ }
82
+ export {};
83
+ //# sourceMappingURL=sim-s3-lifecycle-configuration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-s3-lifecycle-configuration.d.ts","sourceRoot":"","sources":["../../../../../src/service/s3/bucket/lifecycle/sim-s3-lifecycle-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,IAAI,gCAAgC,EAC/D,kBAAkB,EACnB,MAAM,gGAAgG,CAAC;AAQxG,UAAU,qCAAqC;IAC7C,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAC;CAChD;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,IAAI,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;CAC1B;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,2BAA2B;IACtC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAgC;IAE5D,YAAY,UAAU,GAAE,qCAA0C,EAEjE;IAED;;OAEG;IACH,MAAM,CAAC,KAAK,IAAI,2BAA2B,CAE1C;IAED;;OAEG;IACH,MAAM,CAAC,iBAAiB,CACtB,aAAa,EAAE,gCAAgC,GAC9C,2BAA2B,CAI7B;IAED;;;;;;OAMG;IACH,IAAI,KAAK,IAAI,SAAS,kBAAkB,EAAE,CAEzC;IAED;;;;;;OAMG;IACH,IAAI,OAAO,IAAI,OAAO,CAErB;IAED;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,EAAE,oBAAoB,EAAE,GAAG,EAAE,IAAI,GAAG,OAAO,CAUxD;IAED;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,oBAAoB,EAAE,GAAG,EAAE,IAAI,GAAG,OAAO,CAazD;IAED;;;;;;OAMG;IACH,OAAO,CAAC,YAAY;CAGrB"}
@@ -0,0 +1,87 @@
1
+ import { simS3LifecycleReached, simS3ObjectExpiryInstant, simS3UploadAbortInstant, } from "./sim-s3-lifecycle-expiry.js";
2
+ import { simS3LifecycleRuleSelects } from "./sim-s3-lifecycle-selection.js";
3
+ /**
4
+ * The lifecycle configuration of one simulated S3 Bucket.
5
+ *
6
+ * A Bucket has one configuration rather than a list of them, which is why
7
+ * PutBucketLifecycleConfiguration replaces the whole thing. Real S3 has no way
8
+ * to add one rule without restating the others.
9
+ *
10
+ * The configuration also answers what its rules have expired. An Object goes
11
+ * once the clock passes the boundary of a rule that selects it, and a Bucket
12
+ * asks on the way to its storage. Nothing sweeps a Bucket on a schedule. See
13
+ * `simS3ObjectExpiryInstant` for why the boundary is a pure function of the
14
+ * current time.
15
+ */
16
+ export class SimS3LifecycleConfiguration {
17
+ storedRules;
18
+ constructor(properties = {}) {
19
+ this.storedRules = structuredClone(properties.rules ?? []);
20
+ }
21
+ /**
22
+ * The configuration a Bucket nobody has configured has.
23
+ */
24
+ static empty() {
25
+ return new SimS3LifecycleConfiguration();
26
+ }
27
+ /**
28
+ * The configuration a PutBucketLifecycleConfiguration request asks for.
29
+ */
30
+ static fromConfiguration(configuration) {
31
+ return new SimS3LifecycleConfiguration({
32
+ rules: [...(configuration.Rules ?? [])],
33
+ });
34
+ }
35
+ /**
36
+ * The rules this Bucket carries.
37
+ *
38
+ * Cloned on the way out as they were on the way in. A caller holding the
39
+ * objects it put, or the ones a read gave it, could otherwise change what
40
+ * the Bucket is configured with by mutating them.
41
+ */
42
+ get rules() {
43
+ return structuredClone(this.storedRules);
44
+ }
45
+ /**
46
+ * Whether the Bucket carries any rule at all.
47
+ *
48
+ * Real S3 distinguishes a Bucket with no configuration from one with an
49
+ * empty list of rules only in that it refuses to store the latter, so an
50
+ * unconfigured Bucket and a Bucket whose rules were all removed read alike.
51
+ */
52
+ get isEmpty() {
53
+ return this.storedRules.length === 0;
54
+ }
55
+ /**
56
+ * Whether an enabled rule has expired an Object by the given instant.
57
+ *
58
+ * One rule is enough. Real S3 applies the shortest expiry among the rules
59
+ * selecting a key, and an Object past any of the boundaries is past the
60
+ * shortest one.
61
+ */
62
+ expires(object, now) {
63
+ return this.enabledRules().some((rule) => rule.Expiration !== undefined &&
64
+ simS3LifecycleRuleSelects(rule, object) &&
65
+ simS3LifecycleReached(simS3ObjectExpiryInstant(rule.Expiration, object.lastModified), now));
66
+ }
67
+ /**
68
+ * Whether an enabled rule has abandoned a multipart upload by the given
69
+ * instant.
70
+ */
71
+ abandons(upload, now) {
72
+ return this.enabledRules().some((rule) => rule.AbortIncompleteMultipartUpload !== undefined &&
73
+ simS3LifecycleRuleSelects(rule, { key: upload.key }) &&
74
+ simS3LifecycleReached(simS3UploadAbortInstant(rule.AbortIncompleteMultipartUpload, upload.initiated), now));
75
+ }
76
+ /**
77
+ * The rules that act, which are the ones whose `Status` is `Enabled`.
78
+ *
79
+ * Read from the stored rules rather than from `rules`, because every read of
80
+ * a Bucket asks and cloning the whole configuration each time would be the
81
+ * cost of having one.
82
+ */
83
+ enabledRules() {
84
+ return this.storedRules.filter((rule) => rule.Status === "Enabled");
85
+ }
86
+ }
87
+ //# sourceMappingURL=sim-s3-lifecycle-configuration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-s3-lifecycle-configuration.js","sourceRoot":"","sources":["../../../../../src/service/s3/bucket/lifecycle/sim-s3-lifecycle-configuration.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAuB5E;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,2BAA2B;IACrB,WAAW,CAAgC;IAE5D,YAAY,UAAU,GAA0C,EAAE;QAChE,IAAI,CAAC,WAAW,GAAG,eAAe,CAAC,UAAU,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,KAAK;QACV,OAAO,IAAI,2BAA2B,EAAE,CAAC;IAC3C,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,iBAAiB,CACtB,aAA+C;QAE/C,OAAO,IAAI,2BAA2B,CAAC;YACrC,KAAK,EAAE,CAAC,GAAG,CAAC,aAAa,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;SACxC,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACH,IAAI,KAAK;QACP,OAAO,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC3C,CAAC;IAED;;;;;;OAMG;IACH,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,CAAC;IACvC,CAAC;IAED;;;;;;OAMG;IACH,OAAO,CAAC,MAA4B,EAAE,GAAS;QAC7C,OAAO,IAAI,CAAC,YAAY,EAAE,CAAC,IAAI,CAC7B,CAAC,IAAI,EAAE,EAAE,CACP,IAAI,CAAC,UAAU,KAAK,SAAS;YAC7B,yBAAyB,CAAC,IAAI,EAAE,MAAM,CAAC;YACvC,qBAAqB,CACnB,wBAAwB,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,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