@kensio/yulin 1.10.5 → 1.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/dist/config/lint/cff-js2-lint.fixture.d.ts.map +1 -1
  2. package/dist/config/lint/cff-js2-lint.fixture.js +23 -0
  3. package/dist/config/lint/cff-js2-lint.fixture.js.map +1 -1
  4. package/dist/config/lint/cff-js2-restriction.d.ts +5 -5
  5. package/dist/config/lint/cff-js2-restriction.d.ts.map +1 -1
  6. package/dist/config/lint/cff-js2-restriction.js +11 -5
  7. package/dist/config/lint/cff-js2-restriction.js.map +1 -1
  8. package/dist/sdk/router/resolve-sim-sdk-command-router.d.ts.map +1 -1
  9. package/dist/sdk/router/resolve-sim-sdk-command-router.js +3 -0
  10. package/dist/sdk/router/resolve-sim-sdk-command-router.js.map +1 -1
  11. package/dist/service/aws/sim-aws-account-region-scope.d.ts +9 -0
  12. package/dist/service/aws/sim-aws-account-region-scope.d.ts.map +1 -1
  13. package/dist/service/aws/sim-aws-account-region-scope.js +10 -0
  14. package/dist/service/aws/sim-aws-account-region-scope.js.map +1 -1
  15. package/dist/service/aws/sim-aws-account.d.ts +5 -0
  16. package/dist/service/aws/sim-aws-account.d.ts.map +1 -1
  17. package/dist/service/aws/sim-aws-account.js +6 -0
  18. package/dist/service/aws/sim-aws-account.js.map +1 -1
  19. package/dist/service/aws/sim-aws-region.d.ts +5 -0
  20. package/dist/service/aws/sim-aws-region.d.ts.map +1 -1
  21. package/dist/service/aws/sim-aws-region.js +6 -0
  22. package/dist/service/aws/sim-aws-region.js.map +1 -1
  23. package/dist/service/aws/sim-aws-service-accessors.d.ts +5 -0
  24. package/dist/service/aws/sim-aws-service-accessors.d.ts.map +1 -1
  25. package/dist/service/aws/sim-aws-service-accessors.js +6 -0
  26. package/dist/service/aws/sim-aws-service-accessors.js.map +1 -1
  27. package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-cfn-value-adapter.d.ts.map +1 -1
  28. package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-cfn-value-adapter.js +8 -0
  29. package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-cfn-value-adapter.js.map +1 -1
  30. package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-kvs-cfn.d.ts +28 -0
  31. package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-kvs-cfn.d.ts.map +1 -0
  32. package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-kvs-cfn.js +41 -0
  33. package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-kvs-cfn.js.map +1 -0
  34. package/dist/service/cloudfront/cff/function-code-input/cff-cloudfront-import.d.ts +21 -0
  35. package/dist/service/cloudfront/cff/function-code-input/cff-cloudfront-import.d.ts.map +1 -0
  36. package/dist/service/cloudfront/cff/function-code-input/cff-cloudfront-import.js +30 -0
  37. package/dist/service/cloudfront/cff/function-code-input/cff-cloudfront-import.js.map +1 -0
  38. package/dist/service/cloudfront/cff/function-code-input/cff-function-code-input.d.ts +3 -1
  39. package/dist/service/cloudfront/cff/function-code-input/cff-function-code-input.d.ts.map +1 -1
  40. package/dist/service/cloudfront/cff/function-code-input/cff-function-code-input.js +5 -17
  41. package/dist/service/cloudfront/cff/function-code-input/cff-function-code-input.js.map +1 -1
  42. package/dist/service/cloudfront/cff/function-code-input/cff-vm-source-handler.d.ts +13 -0
  43. package/dist/service/cloudfront/cff/function-code-input/cff-vm-source-handler.d.ts.map +1 -0
  44. package/dist/service/cloudfront/cff/function-code-input/cff-vm-source-handler.js +28 -0
  45. package/dist/service/cloudfront/cff/function-code-input/cff-vm-source-handler.js.map +1 -0
  46. package/dist/service/cloudfront/cff/kvs/cff-cloudfront-module.d.ts +28 -0
  47. package/dist/service/cloudfront/cff/kvs/cff-cloudfront-module.d.ts.map +1 -0
  48. package/dist/service/cloudfront/cff/kvs/cff-cloudfront-module.js +30 -0
  49. package/dist/service/cloudfront/cff/kvs/cff-cloudfront-module.js.map +1 -0
  50. package/dist/service/cloudfront/cff/kvs/cff-kvs-handle.d.ts +46 -0
  51. package/dist/service/cloudfront/cff/kvs/cff-kvs-handle.d.ts.map +1 -0
  52. package/dist/service/cloudfront/cff/kvs/cff-kvs-handle.js +60 -0
  53. package/dist/service/cloudfront/cff/kvs/cff-kvs-handle.js.map +1 -0
  54. package/dist/service/cloudfront/cff/kvs/sim-cff-cloudfront-global.d.ts +43 -0
  55. package/dist/service/cloudfront/cff/kvs/sim-cff-cloudfront-global.d.ts.map +1 -0
  56. package/dist/service/cloudfront/cff/kvs/sim-cff-cloudfront-global.js +66 -0
  57. package/dist/service/cloudfront/cff/kvs/sim-cff-cloudfront-global.js.map +1 -0
  58. package/dist/service/cloudfront/cff/kvs/sim-cff-key-value-store-users.d.ts +20 -0
  59. package/dist/service/cloudfront/cff/kvs/sim-cff-key-value-store-users.d.ts.map +1 -0
  60. package/dist/service/cloudfront/cff/kvs/sim-cff-key-value-store-users.js +25 -0
  61. package/dist/service/cloudfront/cff/kvs/sim-cff-key-value-store-users.js.map +1 -0
  62. package/dist/service/cloudfront/cff/sim-cloudfront-function.d.ts +23 -2
  63. package/dist/service/cloudfront/cff/sim-cloudfront-function.d.ts.map +1 -1
  64. package/dist/service/cloudfront/cff/sim-cloudfront-function.js +30 -4
  65. package/dist/service/cloudfront/cff/sim-cloudfront-function.js.map +1 -1
  66. package/dist/service/cloudfront/cfn/cff/sim-cfn-cff-function-config.d.ts +6 -0
  67. package/dist/service/cloudfront/cfn/cff/sim-cfn-cff-function-config.d.ts.map +1 -1
  68. package/dist/service/cloudfront/cfn/cff/sim-cfn-cff-function-config.js +43 -0
  69. package/dist/service/cloudfront/cfn/cff/sim-cfn-cff-function-config.js.map +1 -1
  70. package/dist/service/cloudfront/cfn/key-value-store/sim-cfn-cf-kvs-config.d.ts +38 -0
  71. package/dist/service/cloudfront/cfn/key-value-store/sim-cfn-cf-kvs-config.d.ts.map +1 -0
  72. package/dist/service/cloudfront/cfn/key-value-store/sim-cfn-cf-kvs-config.js +49 -0
  73. package/dist/service/cloudfront/cfn/key-value-store/sim-cfn-cf-kvs-config.js.map +1 -0
  74. package/dist/service/cloudfront/cfn/key-value-store/sim-cfn-cf-kvs-creator.d.ts +33 -0
  75. package/dist/service/cloudfront/cfn/key-value-store/sim-cfn-cf-kvs-creator.d.ts.map +1 -0
  76. package/dist/service/cloudfront/cfn/key-value-store/sim-cfn-cf-kvs-creator.js +54 -0
  77. package/dist/service/cloudfront/cfn/key-value-store/sim-cfn-cf-kvs-creator.js.map +1 -0
  78. package/dist/service/cloudfront/cfn/sim-cfn-cloudfront-resource-factory.d.ts +1 -0
  79. package/dist/service/cloudfront/cfn/sim-cfn-cloudfront-resource-factory.d.ts.map +1 -1
  80. package/dist/service/cloudfront/cfn/sim-cfn-cloudfront-resource-factory.js +12 -0
  81. package/dist/service/cloudfront/cfn/sim-cfn-cloudfront-resource-factory.js.map +1 -1
  82. package/dist/service/cloudfront/command/create-distribution/create-distribution.command.d.ts +6 -0
  83. package/dist/service/cloudfront/command/create-distribution/create-distribution.command.d.ts.map +1 -1
  84. package/dist/service/cloudfront/command/create-distribution/sim-cf-distro-config-normalizer.d.ts.map +1 -1
  85. package/dist/service/cloudfront/command/create-distribution/sim-cf-distro-config-normalizer.js +8 -6
  86. package/dist/service/cloudfront/command/create-distribution/sim-cf-distro-config-normalizer.js.map +1 -1
  87. package/dist/service/cloudfront/command/create-function/create-function-kvs-association.d.ts +24 -0
  88. package/dist/service/cloudfront/command/create-function/create-function-kvs-association.d.ts.map +1 -0
  89. package/dist/service/cloudfront/command/create-function/create-function-kvs-association.js +50 -0
  90. package/dist/service/cloudfront/command/create-function/create-function-kvs-association.js.map +1 -0
  91. package/dist/service/cloudfront/command/create-function/create-function.command.d.ts +6 -0
  92. package/dist/service/cloudfront/command/create-function/create-function.command.d.ts.map +1 -1
  93. package/dist/service/cloudfront/command/create-function/create-function.handler.d.ts +3 -0
  94. package/dist/service/cloudfront/command/create-function/create-function.handler.d.ts.map +1 -1
  95. package/dist/service/cloudfront/command/create-function/create-function.handler.js +11 -2
  96. package/dist/service/cloudfront/command/create-function/create-function.handler.js.map +1 -1
  97. package/dist/service/cloudfront/command/key-value-store/sim-cf-create-key-value-store.d.ts +24 -0
  98. package/dist/service/cloudfront/command/key-value-store/sim-cf-create-key-value-store.d.ts.map +1 -0
  99. package/dist/service/cloudfront/command/key-value-store/sim-cf-create-key-value-store.js +43 -0
  100. package/dist/service/cloudfront/command/key-value-store/sim-cf-create-key-value-store.js.map +1 -0
  101. package/dist/service/cloudfront/command/key-value-store/sim-cf-delete-key-value-store.d.ts +26 -0
  102. package/dist/service/cloudfront/command/key-value-store/sim-cf-delete-key-value-store.d.ts.map +1 -0
  103. package/dist/service/cloudfront/command/key-value-store/sim-cf-delete-key-value-store.js +40 -0
  104. package/dist/service/cloudfront/command/key-value-store/sim-cf-delete-key-value-store.js.map +1 -0
  105. package/dist/service/cloudfront/command/key-value-store/sim-cf-describe-key-value-store.d.ts +24 -0
  106. package/dist/service/cloudfront/command/key-value-store/sim-cf-describe-key-value-store.d.ts.map +1 -0
  107. package/dist/service/cloudfront/command/key-value-store/sim-cf-describe-key-value-store.js +32 -0
  108. package/dist/service/cloudfront/command/key-value-store/sim-cf-describe-key-value-store.js.map +1 -0
  109. package/dist/service/cloudfront/command/key-value-store/sim-cf-key-value-store-command.types.d.ts +109 -0
  110. package/dist/service/cloudfront/command/key-value-store/sim-cf-key-value-store-command.types.d.ts.map +1 -0
  111. package/dist/service/cloudfront/command/key-value-store/sim-cf-key-value-store-command.types.js +12 -0
  112. package/dist/service/cloudfront/command/key-value-store/sim-cf-key-value-store-command.types.js.map +1 -0
  113. package/dist/service/cloudfront/command/key-value-store/sim-cf-key-value-store-summary.d.ts +10 -0
  114. package/dist/service/cloudfront/command/key-value-store/sim-cf-key-value-store-summary.d.ts.map +1 -0
  115. package/dist/service/cloudfront/command/key-value-store/sim-cf-key-value-store-summary.js +17 -0
  116. package/dist/service/cloudfront/command/key-value-store/sim-cf-key-value-store-summary.js.map +1 -0
  117. package/dist/service/cloudfront/command/key-value-store/sim-cf-list-key-value-stores.d.ts +20 -0
  118. package/dist/service/cloudfront/command/key-value-store/sim-cf-list-key-value-stores.d.ts.map +1 -0
  119. package/dist/service/cloudfront/command/key-value-store/sim-cf-list-key-value-stores.js +34 -0
  120. package/dist/service/cloudfront/command/key-value-store/sim-cf-list-key-value-stores.js.map +1 -0
  121. package/dist/service/cloudfront/command/key-value-store/sim-cf-update-key-value-store.d.ts +24 -0
  122. package/dist/service/cloudfront/command/key-value-store/sim-cf-update-key-value-store.d.ts.map +1 -0
  123. package/dist/service/cloudfront/command/key-value-store/sim-cf-update-key-value-store.js +35 -0
  124. package/dist/service/cloudfront/command/key-value-store/sim-cf-update-key-value-store.js.map +1 -0
  125. package/dist/service/cloudfront/command/key-value-store-data/sim-cf-key-value-store-data-command.types.d.ts +116 -0
  126. package/dist/service/cloudfront/command/key-value-store-data/sim-cf-key-value-store-data-command.types.d.ts.map +1 -0
  127. package/dist/service/cloudfront/command/key-value-store-data/sim-cf-key-value-store-data-command.types.js +12 -0
  128. package/dist/service/cloudfront/command/key-value-store-data/sim-cf-key-value-store-data-command.types.js.map +1 -0
  129. package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-batch.d.ts +22 -0
  130. package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-batch.d.ts.map +1 -0
  131. package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-batch.js +26 -0
  132. package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-batch.js.map +1 -0
  133. package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-key-reads.d.ts +37 -0
  134. package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-key-reads.d.ts.map +1 -0
  135. package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-key-reads.js +67 -0
  136. package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-key-reads.js.map +1 -0
  137. package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-key-writes.d.ts +43 -0
  138. package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-key-writes.d.ts.map +1 -0
  139. package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-key-writes.js +81 -0
  140. package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-key-writes.js.map +1 -0
  141. package/dist/service/cloudfront/command/sim-cf-list-quantity.d.ts +20 -0
  142. package/dist/service/cloudfront/command/sim-cf-list-quantity.d.ts.map +1 -0
  143. package/dist/service/cloudfront/command/sim-cf-list-quantity.js +36 -0
  144. package/dist/service/cloudfront/command/sim-cf-list-quantity.js.map +1 -0
  145. package/dist/service/cloudfront/controller/cff/sim-cff-applicator.d.ts +2 -2
  146. package/dist/service/cloudfront/controller/cff/sim-cff-applicator.d.ts.map +1 -1
  147. package/dist/service/cloudfront/controller/cff/sim-cff-applicator.js +6 -6
  148. package/dist/service/cloudfront/controller/cff/sim-cff-applicator.js.map +1 -1
  149. package/dist/service/cloudfront/controller/sim-cloudfront-request-pipeline.js +2 -2
  150. package/dist/service/cloudfront/controller/sim-cloudfront-request-pipeline.js.map +1 -1
  151. package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-properties.d.ts.map +1 -1
  152. package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-properties.js +5 -3
  153. package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-properties.js.map +1 -1
  154. package/dist/service/cloudfront/error/sim-cf-key-value-store.error.d.ts +88 -0
  155. package/dist/service/cloudfront/error/sim-cf-key-value-store.error.d.ts.map +1 -0
  156. package/dist/service/cloudfront/error/sim-cf-key-value-store.error.js +104 -0
  157. package/dist/service/cloudfront/error/sim-cf-key-value-store.error.js.map +1 -0
  158. package/dist/service/cloudfront/error/sim-cloudfront.error.d.ts +10 -0
  159. package/dist/service/cloudfront/error/sim-cloudfront.error.d.ts.map +1 -1
  160. package/dist/service/cloudfront/error/sim-cloudfront.error.js +12 -0
  161. package/dist/service/cloudfront/error/sim-cloudfront.error.js.map +1 -1
  162. package/dist/service/cloudfront/globals.d.ts +12 -0
  163. package/dist/service/cloudfront/globals.d.ts.map +1 -1
  164. package/dist/service/cloudfront/globals.js.map +1 -1
  165. package/dist/service/cloudfront/index.d.ts +3 -0
  166. package/dist/service/cloudfront/index.d.ts.map +1 -1
  167. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-access.d.ts +57 -0
  168. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-access.d.ts.map +1 -0
  169. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-access.js +72 -0
  170. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-access.js.map +1 -0
  171. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-commands.d.ts +51 -0
  172. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-commands.d.ts.map +1 -0
  173. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-commands.js +65 -0
  174. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-commands.js.map +1 -0
  175. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-keys.d.ts +72 -0
  176. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-keys.d.ts.map +1 -0
  177. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-keys.js +94 -0
  178. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-keys.js.map +1 -0
  179. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-registry.d.ts +59 -0
  180. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-registry.d.ts.map +1 -0
  181. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-registry.js +92 -0
  182. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-registry.js.map +1 -0
  183. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-users.d.ts +24 -0
  184. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-users.d.ts.map +1 -0
  185. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-users.js +7 -0
  186. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-users.js.map +1 -0
  187. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store.d.ts +141 -0
  188. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store.d.ts.map +1 -0
  189. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store.js +180 -0
  190. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store.js.map +1 -0
  191. package/dist/service/cloudfront/sdk/sim-cf-key-value-store-sdk-command-router.d.ts +24 -0
  192. package/dist/service/cloudfront/sdk/sim-cf-key-value-store-sdk-command-router.d.ts.map +1 -0
  193. package/dist/service/cloudfront/sdk/sim-cf-key-value-store-sdk-command-router.js +54 -0
  194. package/dist/service/cloudfront/sdk/sim-cf-key-value-store-sdk-command-router.js.map +1 -0
  195. package/dist/service/cloudfront/sdk/sim-cloudfront-sdk-command-router.d.ts.map +1 -1
  196. package/dist/service/cloudfront/sdk/sim-cloudfront-sdk-command-router.js +30 -0
  197. package/dist/service/cloudfront/sdk/sim-cloudfront-sdk-command-router.js.map +1 -1
  198. package/dist/service/cloudfront/sim-cloudfront-commands.d.ts +10 -0
  199. package/dist/service/cloudfront/sim-cloudfront-commands.d.ts.map +1 -1
  200. package/dist/service/cloudfront/sim-cloudfront-commands.js +25 -0
  201. package/dist/service/cloudfront/sim-cloudfront-commands.js.map +1 -1
  202. package/dist/service/cloudfront/sim-cloudfront-key-value-store.d.ts +58 -0
  203. package/dist/service/cloudfront/sim-cloudfront-key-value-store.d.ts.map +1 -0
  204. package/dist/service/cloudfront/sim-cloudfront-key-value-store.js +68 -0
  205. package/dist/service/cloudfront/sim-cloudfront-key-value-store.js.map +1 -0
  206. package/dist/service/cloudfront/sim-cloudfront.d.ts +14 -1
  207. package/dist/service/cloudfront/sim-cloudfront.d.ts.map +1 -1
  208. package/dist/service/cloudfront/sim-cloudfront.js +15 -0
  209. package/dist/service/cloudfront/sim-cloudfront.js.map +1 -1
  210. package/dist/service/cloudfront/typings/cloudfront-functions.namespace.d.ts +9 -2
  211. package/dist/service/cloudfront/typings/cloudfront-functions.namespace.d.ts.map +1 -1
  212. package/package.json +2 -1
@@ -0,0 +1,116 @@
1
+ /**
2
+ * Structural types for the commands on the key value store data client.
3
+ *
4
+ * These are the commands that read and write the keys. They are a separate AWS
5
+ * SDK client from CloudFront's own, and they address a store by ARN rather
6
+ * than by name. The commands that own the resource live beside them under
7
+ * `command/key-value-store/`.
8
+ *
9
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront-keyvaluestore/
10
+ */
11
+ import type { SimResponseMetadata } from "../../../aws/metadata/response-metadata.type.js";
12
+ /**
13
+ * What every write answers with: the store's new size and ETag.
14
+ */
15
+ export interface SimCfKeyValueStoreWriteOutput {
16
+ readonly $metadata: SimResponseMetadata;
17
+ ItemCount: number;
18
+ TotalSizeInBytes: number;
19
+ ETag: string;
20
+ }
21
+ /**
22
+ * Minimal structural sim key value store DescribeKeyValueStore command.
23
+ */
24
+ export interface SimKvsDescribeKeyValueStoreCommand {
25
+ readonly input: {
26
+ readonly KvsARN?: string | undefined;
27
+ };
28
+ }
29
+ /**
30
+ * Minimal structural sim key value store DescribeKeyValueStore output.
31
+ */
32
+ export interface SimKvsDescribeKeyValueStoreCommandOutput {
33
+ readonly $metadata: SimResponseMetadata;
34
+ KvsARN: string;
35
+ Created: Date;
36
+ LastModified: Date;
37
+ Status: string;
38
+ ItemCount: number;
39
+ TotalSizeInBytes: number;
40
+ ETag: string;
41
+ }
42
+ /**
43
+ * Minimal structural sim key value store GetKey command.
44
+ */
45
+ export interface SimKvsGetKeyCommand {
46
+ readonly input: {
47
+ readonly KvsARN?: string | undefined;
48
+ readonly Key?: string | undefined;
49
+ };
50
+ }
51
+ /**
52
+ * Minimal structural sim key value store GetKey output.
53
+ */
54
+ export interface SimKvsGetKeyCommandOutput {
55
+ readonly $metadata: SimResponseMetadata;
56
+ Key: string;
57
+ Value: string;
58
+ ItemCount: number;
59
+ TotalSizeInBytes: number;
60
+ }
61
+ /**
62
+ * Minimal structural sim key value store PutKey command.
63
+ */
64
+ export interface SimKvsPutKeyCommand {
65
+ readonly input: {
66
+ readonly KvsARN?: string | undefined;
67
+ readonly Key?: string | undefined;
68
+ readonly Value?: string | undefined;
69
+ readonly IfMatch?: string | undefined;
70
+ };
71
+ }
72
+ /**
73
+ * Minimal structural sim key value store DeleteKey command.
74
+ */
75
+ export interface SimKvsDeleteKeyCommand {
76
+ readonly input: {
77
+ readonly KvsARN?: string | undefined;
78
+ readonly Key?: string | undefined;
79
+ readonly IfMatch?: string | undefined;
80
+ };
81
+ }
82
+ /**
83
+ * Minimal structural sim key value store ListKeys command.
84
+ */
85
+ export interface SimKvsListKeysCommand {
86
+ readonly input: {
87
+ readonly KvsARN?: string | undefined;
88
+ };
89
+ }
90
+ /**
91
+ * Minimal structural sim key value store ListKeys output.
92
+ */
93
+ export interface SimKvsListKeysCommandOutput {
94
+ readonly $metadata: SimResponseMetadata;
95
+ Items: {
96
+ Key: string;
97
+ Value: string;
98
+ }[];
99
+ }
100
+ /**
101
+ * Minimal structural sim key value store UpdateKeys command.
102
+ */
103
+ export interface SimKvsUpdateKeysCommand {
104
+ readonly input: {
105
+ readonly KvsARN?: string | undefined;
106
+ readonly IfMatch?: string | undefined;
107
+ readonly Puts?: readonly {
108
+ Key: string | undefined;
109
+ Value: string | undefined;
110
+ }[] | undefined;
111
+ readonly Deletes?: readonly {
112
+ Key: string | undefined;
113
+ }[] | undefined;
114
+ };
115
+ }
116
+ //# sourceMappingURL=sim-cf-key-value-store-data-command.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cf-key-value-store-data-command.types.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store-data/sim-cf-key-value-store-data-command.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,mB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AAC;KACvE,CAAC;CACH"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Structural types for the commands on the key value store data client.
3
+ *
4
+ * These are the commands that read and write the keys. They are a separate AWS
5
+ * SDK client from CloudFront's own, and they address a store by ARN rather
6
+ * than by name. The commands that own the resource live beside them under
7
+ * `command/key-value-store/`.
8
+ *
9
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront-keyvaluestore/
10
+ */
11
+ export {};
12
+ //# sourceMappingURL=sim-cf-key-value-store-data-command.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cf-key-value-store-data-command.types.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store-data/sim-cf-key-value-store-data-command.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
@@ -0,0 +1,22 @@
1
+ import type { SimKvsUpdateKeysCommand } from "./sim-cf-key-value-store-data-command.types.js";
2
+ type UpdateKeysInput = SimKvsUpdateKeysCommand["input"];
3
+ /**
4
+ * Read the puts out of an UpdateKeys batch, refusing an incomplete pair.
5
+ *
6
+ * The SDK types a batch entry's key and value as `string | undefined` even
7
+ * though both are required, so an entry missing either reaches here as a
8
+ * well-typed value. Refusing it is what stops a key being written as the string
9
+ * "undefined".
10
+ */
11
+ export declare function kvsBatchPuts(input: UpdateKeysInput): readonly {
12
+ Key: string;
13
+ Value: string;
14
+ }[];
15
+ /**
16
+ * Read the deletes out of an UpdateKeys batch, refusing one with no key.
17
+ */
18
+ export declare function kvsBatchDeletes(input: UpdateKeysInput): readonly {
19
+ Key: string;
20
+ }[];
21
+ export {};
22
+ //# sourceMappingURL=sim-kvs-batch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-kvs-batch.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store-data/sim-kvs-batch.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gDAAgD,CAAC;AAE9F,KAAK,eAAe,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAC;AAExD;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,eAAe,GACrB,SAAS;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,CAa3C;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,eAAe,GACrB,SAAS;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,CAS5B"}
@@ -0,0 +1,26 @@
1
+ import { assertDefined } from "../../../../util/type-guard/defined.js";
2
+ /**
3
+ * Read the puts out of an UpdateKeys batch, refusing an incomplete pair.
4
+ *
5
+ * The SDK types a batch entry's key and value as `string | undefined` even
6
+ * though both are required, so an entry missing either reaches here as a
7
+ * well-typed value. Refusing it is what stops a key being written as the string
8
+ * "undefined".
9
+ */
10
+ export function kvsBatchPuts(input) {
11
+ return (input.Puts ?? []).map((put, index) => {
12
+ assertDefined(put.Key, `UpdateKeysCommand.input.Puts[${String(index)}].Key`);
13
+ assertDefined(put.Value, `UpdateKeysCommand.input.Puts[${String(index)}].Value`);
14
+ return { Key: put.Key, Value: put.Value };
15
+ });
16
+ }
17
+ /**
18
+ * Read the deletes out of an UpdateKeys batch, refusing one with no key.
19
+ */
20
+ export function kvsBatchDeletes(input) {
21
+ return (input.Deletes ?? []).map((remove, index) => {
22
+ assertDefined(remove.Key, `UpdateKeysCommand.input.Deletes[${String(index)}].Key`);
23
+ return { Key: remove.Key };
24
+ });
25
+ }
26
+ //# sourceMappingURL=sim-kvs-batch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-kvs-batch.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store-data/sim-kvs-batch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAKvE;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAC1B,KAAsB;IAEtB,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;QAC3C,aAAa,CACX,GAAG,CAAC,GAAG,EACP,gCAAgC,MAAM,CAAC,KAAK,CAAC,OAAO,CACrD,CAAC;QACF,aAAa,CACX,GAAG,CAAC,KAAK,EACT,gCAAgC,MAAM,CAAC,KAAK,CAAC,SAAS,CACvD,CAAC;QAEF,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAC7B,KAAsB;IAEtB,OAAO,CAAC,KAAK,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;QACjD,aAAa,CACX,MAAM,CAAC,GAAG,EACV,mCAAmC,MAAM,CAAC,KAAK,CAAC,OAAO,CACxD,CAAC;QAEF,OAAO,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,CAAC;IAC7B,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,37 @@
1
+ import type { SimAwsCaller } from "../../../aws/caller/sim-aws-caller.js";
2
+ import type { SimCfKeyValueStoreAccess } from "../../key-value-store/sim-cf-key-value-store-access.js";
3
+ import type { SimKvsDescribeKeyValueStoreCommand, SimKvsDescribeKeyValueStoreCommandOutput, SimKvsGetKeyCommand, SimKvsGetKeyCommandOutput, SimKvsListKeysCommand, SimKvsListKeysCommandOutput } from "./sim-cf-key-value-store-data-command.types.js";
4
+ interface ReadOptions {
5
+ readonly caller?: SimAwsCaller;
6
+ }
7
+ /**
8
+ * The commands that read a key value store without changing it.
9
+ *
10
+ * None of them take an IfMatch, since nothing is being overwritten.
11
+ *
12
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront-keyvaluestore/
13
+ */
14
+ export declare class SimKvsKeyReads {
15
+ private readonly access;
16
+ private static readonly getAction;
17
+ private static readonly listAction;
18
+ private static readonly describeAction;
19
+ constructor(access: SimCfKeyValueStoreAccess);
20
+ /**
21
+ * Read one key, refusing one the store does not hold.
22
+ */
23
+ getKey(command: SimKvsGetKeyCommand, options?: ReadOptions): Promise<SimKvsGetKeyCommandOutput>;
24
+ /**
25
+ * List every key and value the store holds.
26
+ */
27
+ listKeys(command: SimKvsListKeysCommand, options?: ReadOptions): Promise<SimKvsListKeysCommandOutput>;
28
+ /**
29
+ * Describe the store's data: how much of it there is, and its status.
30
+ *
31
+ * The CloudFront client has a command of this name too, answering with the
32
+ * resource rather than the data.
33
+ */
34
+ describeKeyValueStore(command: SimKvsDescribeKeyValueStoreCommand, options?: ReadOptions): Promise<SimKvsDescribeKeyValueStoreCommandOutput>;
35
+ }
36
+ export {};
37
+ //# sourceMappingURL=sim-kvs-key-reads.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-kvs-key-reads.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store-data/sim-kvs-key-reads.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wDAAwD,CAAC;AACvG,OAAO,KAAK,EACV,kCAAkC,EAClC,wCAAwC,EACxC,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,2BAA2B,EAC5B,MAAM,gDAAgD,CAAC;AAExD,UAAU,WAAW;IACnB,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;CAChC;AAED;;;;;;GAMG;AACH,qBAAa,cAAc;IAMb,OAAO,CAAC,QAAQ,CAAC,MAAM;IALnC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAqC;IACtE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAuC;IACzE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CACa;IAEnD,YAA6B,MAAM,EAAE,wBAAwB,EAAI;IAEjE;;OAEG;IACG,MAAM,CACV,OAAO,EAAE,mBAAmB,EAC5B,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,yBAAyB,CAAC,CAmBpC;IAED;;OAEG;IACG,QAAQ,CACZ,OAAO,EAAE,qBAAqB,EAC9B,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,2BAA2B,CAAC,CAetC;IAED;;;;;OAKG;IACG,qBAAqB,CACzB,OAAO,EAAE,kCAAkC,EAC3C,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,wCAAwC,CAAC,CAwBnD;CACF"}
@@ -0,0 +1,67 @@
1
+ import { assertDefined } from "../../../../util/type-guard/defined.js";
2
+ /**
3
+ * The commands that read a key value store without changing it.
4
+ *
5
+ * None of them take an IfMatch, since nothing is being overwritten.
6
+ *
7
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront-keyvaluestore/
8
+ */
9
+ export class SimKvsKeyReads {
10
+ access;
11
+ static getAction = "cloudfront-keyvaluestore:GetKey";
12
+ static listAction = "cloudfront-keyvaluestore:ListKeys";
13
+ static describeAction = "cloudfront-keyvaluestore:DescribeKeyValueStore";
14
+ constructor(access) {
15
+ this.access = access;
16
+ }
17
+ /**
18
+ * Read one key, refusing one the store does not hold.
19
+ */
20
+ async getKey(command, options) {
21
+ assertDefined(command.input.KvsARN, "GetKeyCommand.input.KvsARN");
22
+ assertDefined(command.input.Key, "GetKeyCommand.input.Key");
23
+ await this.access.background.sequence();
24
+ const store = this.access.authorizedByArn(SimKvsKeyReads.getAction, command.input.KvsARN, options?.caller);
25
+ return {
26
+ $metadata: {},
27
+ Key: command.input.Key,
28
+ Value: store.keys.get(command.input.Key),
29
+ ItemCount: store.keys.itemCount,
30
+ TotalSizeInBytes: store.keys.totalSizeInBytes,
31
+ };
32
+ }
33
+ /**
34
+ * List every key and value the store holds.
35
+ */
36
+ async listKeys(command, options) {
37
+ assertDefined(command.input.KvsARN, "ListKeysCommand.input.KvsARN");
38
+ await this.access.background.sequence();
39
+ const store = this.access.authorizedByArn(SimKvsKeyReads.listAction, command.input.KvsARN, options?.caller);
40
+ return {
41
+ $metadata: {},
42
+ Items: store.listKeys().map((pair) => ({ ...pair })),
43
+ };
44
+ }
45
+ /**
46
+ * Describe the store's data: how much of it there is, and its status.
47
+ *
48
+ * The CloudFront client has a command of this name too, answering with the
49
+ * resource rather than the data.
50
+ */
51
+ async describeKeyValueStore(command, options) {
52
+ assertDefined(command.input.KvsARN, "DescribeKeyValueStoreCommand.input.KvsARN");
53
+ await this.access.background.sequence();
54
+ const store = this.access.authorizedByArn(SimKvsKeyReads.describeAction, command.input.KvsARN, options?.caller);
55
+ return {
56
+ $metadata: {},
57
+ KvsARN: store.arn,
58
+ Created: store.createdTime,
59
+ LastModified: store.lastModifiedTime,
60
+ Status: store.status,
61
+ ItemCount: store.keys.itemCount,
62
+ TotalSizeInBytes: store.keys.totalSizeInBytes,
63
+ ETag: store.dataETag,
64
+ };
65
+ }
66
+ }
67
+ //# sourceMappingURL=sim-kvs-key-reads.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-kvs-key-reads.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store-data/sim-kvs-key-reads.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAgBvE;;;;;;GAMG;AACH,MAAM,OAAO,cAAc;IAMI,MAAM;IAL3B,MAAM,CAAU,SAAS,GAAG,iCAAiC,CAAC;IAC9D,MAAM,CAAU,UAAU,GAAG,mCAAmC,CAAC;IACjE,MAAM,CAAU,cAAc,GACpC,gDAAgD,CAAC;IAEnD,YAA6B,MAAgC;sBAAhC,MAAM;IAA6B,CAAC;IAEjE;;OAEG;IACH,KAA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;SACrD,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,qBAAqB,CACzB,OAA2C,EAC3C,OAAqB;QAErB,aAAa,CACX,OAAO,CAAC,KAAK,CAAC,MAAM,EACpB,2CAA2C,CAC5C,CAAC;QAEF,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QAExC,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,eAAe,CACvC,cAAc,CAAC,cAAc,EAC7B,OAAO,CAAC,KAAK,CAAC,MAAM,EACpB,OAAO,EAAE,MAAM,CAChB,CAAC;QAEF,OAAO;YACL,SAAS,EAAE,EAAE;YACb,MAAM,EAAE,KAAK,CAAC,GAAG;YACjB,OAAO,EAAE,KAAK,CAAC,WAAW;YAC1B,YAAY,EAAE,KAAK,CAAC,gBAAgB;YACpC,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,SAAS;YAC/B,gBAAgB,EAAE,KAAK,CAAC,IAAI,CAAC,gBAAgB;YAC7C,IAAI,EAAE,KAAK,CAAC,QAAQ;SACrB,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,43 @@
1
+ import type { SimAwsCaller } from "../../../aws/caller/sim-aws-caller.js";
2
+ import type { SimCfKeyValueStoreAccess } from "../../key-value-store/sim-cf-key-value-store-access.js";
3
+ import type { SimCfKeyValueStoreWriteOutput, SimKvsDeleteKeyCommand, SimKvsPutKeyCommand, SimKvsUpdateKeysCommand } from "./sim-cf-key-value-store-data-command.types.js";
4
+ interface WriteOptions {
5
+ readonly caller?: SimAwsCaller;
6
+ }
7
+ /**
8
+ * The three commands that write keys: PutKey, DeleteKey and UpdateKeys.
9
+ *
10
+ * They are one class because they are the same operation three ways: a batch
11
+ * of puts and deletes against a store, checked against its ETag. PutKey is a
12
+ * batch of one put and DeleteKey a batch of one delete, so each only has to say
13
+ * what its batch is.
14
+ *
15
+ * IfMatch is required on all three, as it is in the real data API, and a stale
16
+ * one is refused rather than accepted. A caller therefore has to read the
17
+ * current ETag before each write, which is what writing against CloudFront
18
+ * involves.
19
+ *
20
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront-keyvaluestore/
21
+ */
22
+ export declare class SimKvsKeyWrites {
23
+ private readonly access;
24
+ constructor(access: SimCfKeyValueStoreAccess);
25
+ /**
26
+ * Write one key.
27
+ */
28
+ putKey(command: SimKvsPutKeyCommand, options?: WriteOptions): Promise<SimCfKeyValueStoreWriteOutput>;
29
+ /**
30
+ * Forget one key.
31
+ */
32
+ deleteKey(command: SimKvsDeleteKeyCommand, options?: WriteOptions): Promise<SimCfKeyValueStoreWriteOutput>;
33
+ /**
34
+ * Apply a batch of puts and deletes together.
35
+ */
36
+ updateKeys(command: SimKvsUpdateKeysCommand, options?: WriteOptions): Promise<SimCfKeyValueStoreWriteOutput>;
37
+ /**
38
+ * Resolve, authorize, check the ETag, apply the batch and report the size.
39
+ */
40
+ private write;
41
+ }
42
+ export {};
43
+ //# sourceMappingURL=sim-kvs-key-writes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-kvs-key-writes.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store-data/sim-kvs-key-writes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wDAAwD,CAAC;AACvG,OAAO,KAAK,EACV,6BAA6B,EAC7B,sBAAsB,EACtB,mBAAmB,EACnB,uBAAuB,EACxB,MAAM,gDAAgD,CAAC;AAGxD,UAAU,YAAY;IACpB,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;CAChC;AAaD;;;;;;;;;;;;;;GAcG;AACH,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,MAAM;IAAnC,YAA6B,MAAM,EAAE,wBAAwB,EAAI;IAEjE;;OAEG;IACG,MAAM,CACV,OAAO,EAAE,mBAAmB,EAC5B,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,6BAA6B,CAAC,CAcxC;IAED;;OAEG;IACG,SAAS,CACb,OAAO,EAAE,sBAAsB,EAC/B,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,6BAA6B,CAAC,CAaxC;IAED;;OAEG;IACG,UAAU,CACd,OAAO,EAAE,uBAAuB,EAChC,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,6BAA6B,CAAC,CAWxC;IAED;;OAEG;YACW,KAAK;CA2BpB"}
@@ -0,0 +1,81 @@
1
+ import { assertDefined } from "../../../../util/type-guard/defined.js";
2
+ import { kvsBatchDeletes, kvsBatchPuts } from "./sim-kvs-batch.js";
3
+ /**
4
+ * The three commands that write keys: PutKey, DeleteKey and UpdateKeys.
5
+ *
6
+ * They are one class because they are the same operation three ways: a batch
7
+ * of puts and deletes against a store, checked against its ETag. PutKey is a
8
+ * batch of one put and DeleteKey a batch of one delete, so each only has to say
9
+ * what its batch is.
10
+ *
11
+ * IfMatch is required on all three, as it is in the real data API, and a stale
12
+ * one is refused rather than accepted. A caller therefore has to read the
13
+ * current ETag before each write, which is what writing against CloudFront
14
+ * involves.
15
+ *
16
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront-keyvaluestore/
17
+ */
18
+ export class SimKvsKeyWrites {
19
+ access;
20
+ constructor(access) {
21
+ this.access = access;
22
+ }
23
+ /**
24
+ * Write one key.
25
+ */
26
+ async putKey(command, options) {
27
+ assertDefined(command.input.Key, "PutKeyCommand.input.Key");
28
+ assertDefined(command.input.Value, "PutKeyCommand.input.Value");
29
+ return await this.write({
30
+ action: "cloudfront-keyvaluestore:PutKey",
31
+ KvsARN: command.input.KvsARN,
32
+ IfMatch: command.input.IfMatch,
33
+ puts: [{ Key: command.input.Key, Value: command.input.Value }],
34
+ deletes: [],
35
+ }, options);
36
+ }
37
+ /**
38
+ * Forget one key.
39
+ */
40
+ async deleteKey(command, options) {
41
+ assertDefined(command.input.Key, "DeleteKeyCommand.input.Key");
42
+ return await this.write({
43
+ action: "cloudfront-keyvaluestore:DeleteKey",
44
+ KvsARN: command.input.KvsARN,
45
+ IfMatch: command.input.IfMatch,
46
+ puts: [],
47
+ deletes: [{ Key: command.input.Key }],
48
+ }, options);
49
+ }
50
+ /**
51
+ * Apply a batch of puts and deletes together.
52
+ */
53
+ async updateKeys(command, options) {
54
+ return await this.write({
55
+ action: "cloudfront-keyvaluestore:UpdateKeys",
56
+ KvsARN: command.input.KvsARN,
57
+ IfMatch: command.input.IfMatch,
58
+ puts: kvsBatchPuts(command.input),
59
+ deletes: kvsBatchDeletes(command.input),
60
+ }, options);
61
+ }
62
+ /**
63
+ * Resolve, authorize, check the ETag, apply the batch and report the size.
64
+ */
65
+ async write(write, options) {
66
+ assertDefined(write.KvsARN, "key value store write input KvsARN");
67
+ assertDefined(write.IfMatch, "key value store write input IfMatch");
68
+ await this.access.background.sequence();
69
+ const store = this.access.authorizedByArn(write.action, write.KvsARN, options?.caller);
70
+ store.assertDataETag(write.IfMatch);
71
+ store.keys.applyBatch(write.puts, write.deletes);
72
+ store.touchData(this.access.background.now());
73
+ return {
74
+ $metadata: {},
75
+ ItemCount: store.keys.itemCount,
76
+ TotalSizeInBytes: store.keys.totalSizeInBytes,
77
+ ETag: store.dataETag,
78
+ };
79
+ }
80
+ }
81
+ //# sourceMappingURL=sim-kvs-key-writes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-kvs-key-writes.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store-data/sim-kvs-key-writes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AASvE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAiBnE;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,e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,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM;YAC5B,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,OAAO;YAC9B,IAAI,EAAE,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC;YACjC,OAAO,EAAE,eAAe,CAAC,OAAO,CAAC,KAAK,CAAC;SACxC,EACD,OAAO,CACR,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,KAAK,CACjB,KAAyB,EACzB,OAAiC;QAEjC,aAAa,CAAC,KAAK,CAAC,MAAM,EAAE,oCAAoC,CAAC,CAAC;QAClE,aAAa,CAAC,KAAK,CAAC,OAAO,EAAE,qCAAqC,CAAC,CAAC;QAEpE,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QAExC,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,eAAe,CACvC,KAAK,CAAC,MAAM,EACZ,KAAK,CAAC,MAAM,EACZ,OAAO,EAAE,MAAM,CAChB,CAAC;QAEF,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAEpC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QACjD,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC;QAE9C,OAAO;YACL,SAAS,EAAE,EAAE;YACb,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,SAAS;YAC/B,gBAAgB,EAAE,KAAK,CAAC,IAAI,CAAC,gBAAgB;YAC7C,IAAI,EAAE,KAAK,CAAC,QAAQ;SACrB,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Refuse a CloudFront list whose `Quantity` disagrees with its `Items`.
3
+ *
4
+ * Every CloudFront list carries both a count and the items, and CloudFront
5
+ * refuses a request where they disagree. The count is easy to get wrong by hand
6
+ * and nothing else catches it: a `Quantity` of 0 alongside one item would
7
+ * otherwise create the item, and a `Quantity` of 1 alongside none would create
8
+ * nothing, either way deploying something the caller did not describe.
9
+ *
10
+ * A list arriving as a plain array carries no count to disagree with. That is
11
+ * the CloudFormation shape, where the property is an array rather than the pair,
12
+ * so there is nothing to check.
13
+ *
14
+ * A record with no `Quantity` at all is accepted rather than refused. The AWS
15
+ * SDK types make omitting it a compile error, so what reaches here without one
16
+ * is a hand-written `{ Items: [...] }`, and refusing that would be stricter
17
+ * than the mistake is worth.
18
+ */
19
+ export declare function assertConsistentQuantity(listName: string, value: unknown): void;
20
+ //# sourceMappingURL=sim-cf-list-quantity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cf-list-quantity.d.ts","sourceRoot":"","sources":["../../../../src/service/cloudfront/command/sim-cf-list-quantity.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,OAAO,GACb,IAAI,CAoBN"}
@@ -0,0 +1,36 @@
1
+ import { isRecord } from "../../../util/type-guard/record.js";
2
+ import { SimCloudFrontInconsistentQuantities } from "../error/sim-cloudfront.error.js";
3
+ /**
4
+ * Refuse a CloudFront list whose `Quantity` disagrees with its `Items`.
5
+ *
6
+ * Every CloudFront list carries both a count and the items, and CloudFront
7
+ * refuses a request where they disagree. The count is easy to get wrong by hand
8
+ * and nothing else catches it: a `Quantity` of 0 alongside one item would
9
+ * otherwise create the item, and a `Quantity` of 1 alongside none would create
10
+ * nothing, either way deploying something the caller did not describe.
11
+ *
12
+ * A list arriving as a plain array carries no count to disagree with. That is
13
+ * the CloudFormation shape, where the property is an array rather than the pair,
14
+ * so there is nothing to check.
15
+ *
16
+ * A record with no `Quantity` at all is accepted rather than refused. The AWS
17
+ * SDK types make omitting it a compile error, so what reaches here without one
18
+ * is a hand-written `{ Items: [...] }`, and refusing that would be stricter
19
+ * than the mistake is worth.
20
+ */
21
+ export function assertConsistentQuantity(listName, value) {
22
+ if (!isRecord(value)) {
23
+ return;
24
+ }
25
+ const quantity = value["Quantity"];
26
+ if (typeof quantity !== "number") {
27
+ return;
28
+ }
29
+ const items = value["Items"];
30
+ const itemCount = Array.isArray(items) ? items.length : 0;
31
+ if (quantity !== itemCount) {
32
+ throw new SimCloudFrontInconsistentQuantities(`CloudFront ${listName} has Quantity ${String(quantity)} and ` +
33
+ `${String(itemCount)} Items`);
34
+ }
35
+ }
36
+ //# sourceMappingURL=sim-cf-list-quantity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cf-list-quantity.js","sourceRoot":"","sources":["../../../../src/service/cloudfront/command/sim-cf-list-quantity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAC9D,OAAO,EAAE,mCAAmC,EAAE,MAAM,kCAAkC,CAAC;AAEvF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,wBAAwB,CACtC,QAAgB,EAChB,KAAc;IAEd,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO;IACT,CAAC;IAED,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC;IAEnC,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;QACjC,OAAO;IACT,CAAC;IAED,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;IAC7B,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAE1D,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,MAAM,IAAI,mCAAmC,CAC3C,cAAc,QAAQ,iBAAiB,MAAM,CAAC,QAAQ,CAAC,OAAO;YAC5D,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAC/B,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -7,10 +7,10 @@ export declare class SimCffApplicator {
7
7
  /**
8
8
  * Apply viewer request CloudFront Function if configured.
9
9
  */
10
- applyViewerRequest(cloudFront: SimCloudFront, request: Request, behaviour: SimCloudFrontBehavior): Request | Response;
10
+ applyViewerRequest(cloudFront: SimCloudFront, request: Request, behaviour: SimCloudFrontBehavior): Promise<Request | Response>;
11
11
  /**
12
12
  * Apply viewer response CloudFront Function if configured.
13
13
  */
14
- applyViewerResponse(cloudFront: SimCloudFront, request: Request, response: Response, behaviour: SimCloudFrontBehavior): Response;
14
+ applyViewerResponse(cloudFront: SimCloudFront, request: Request, response: Response, behaviour: SimCloudFrontBehavior): Promise<Response>;
15
15
  }
16
16
  //# sourceMappingURL=sim-cff-applicator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sim-cff-applicator.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/controller/cff/sim-cff-applicator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAGzF;;GAEG;AACH,qBAAa,gBAAgB;IAC3B;;OAEG;IACH,kBAAkB,CAChB,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,qBAAqB,GAC/B,OAAO,GAAG,QAAQ,CAcpB;IAED;;OAEG;IACH,mBAAmB,CACjB,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,qBAAqB,GAC/B,QAAQ,CAcV;CACF"}
1
+ {"version":3,"file":"sim-cff-applicator.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/controller/cff/sim-cff-applicator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAGzF;;GAEG;AACH,qBAAa,gBAAgB;IAC3B;;OAEG;IACG,kBAAkB,CACtB,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,qBAAqB,GAC/B,OAAO,CAAC,OAAO,GAAG,QAAQ,CAAC,CAc7B;IAED;;OAEG;IACG,mBAAmB,CACvB,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,qBAAqB,GAC/B,OAAO,CAAC,QAAQ,CAAC,CAcnB;CACF"}
@@ -6,26 +6,26 @@ export class SimCffApplicator {
6
6
  /**
7
7
  * Apply viewer request CloudFront Function if configured.
8
8
  */
9
- applyViewerRequest(cloudFront, request, behaviour) {
9
+ async applyViewerRequest(cloudFront, request, behaviour) {
10
10
  const viewerRequestCffArn = behaviour.functionAssociations?.viewerRequest;
11
11
  if (viewerRequestCffArn === undefined) {
12
- return request;
12
+ return await Promise.resolve(request);
13
13
  }
14
14
  const viewerRequestCff = cloudFront.getCloudFrontFunctionByArn(viewerRequestCffArn);
15
15
  assertDefined(viewerRequestCff, `CloudFront Function ${viewerRequestCffArn} for viewer-request`);
16
- return viewerRequestCff.handleViewerRequest(request);
16
+ return await viewerRequestCff.handleViewerRequest(request);
17
17
  }
18
18
  /**
19
19
  * Apply viewer response CloudFront Function if configured.
20
20
  */
21
- applyViewerResponse(cloudFront, request, response, behaviour) {
21
+ async applyViewerResponse(cloudFront, request, response, behaviour) {
22
22
  const viewerResponseCffArn = behaviour.functionAssociations?.viewerResponse;
23
23
  if (viewerResponseCffArn === undefined) {
24
- return response;
24
+ return await Promise.resolve(response);
25
25
  }
26
26
  const viewerResponseCff = cloudFront.getCloudFrontFunctionByArn(viewerResponseCffArn);
27
27
  assertDefined(viewerResponseCff, `CloudFront Function ${viewerResponseCffArn} for viewer-response`);
28
- return viewerResponseCff.handleViewerResponse(request, response);
28
+ return await viewerResponseCff.handleViewerResponse(request, response);
29
29
  }
30
30
  }
31
31
  //# sourceMappingURL=sim-cff-applicator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sim-cff-applicator.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/controller/cff/sim-cff-applicator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAEvE;;GAEG;AACH,MAAM,OAAO,gBAAgB;IAC3B;;OAEG;IACH,kBAAkB,CAChB,UAAyB,EACzB,OAAgB,EAChB,SAAgC;QAEhC,MAAM,mBAAmB,GAAG,SAAS,CAAC,oBAAoB,EAAE,aAAa,CAAC;QAC1E,IAAI,mBAAmB,KAAK,SAAS,EAAE,CAAC;YACtC,OAAO,OAAO,CAAC;QACjB,CAAC;QAED,MAAM,gBAAgB,GACpB,UAAU,CAAC,0BAA0B,CAAC,mBAAmB,CAAC,CAAC;QAC7D,aAAa,CACX,gBAAgB,EAChB,uBAAuB,mBAAmB,qBAAqB,CAChE,CAAC;QAEF,OAAO,gBAAgB,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACvD,CAAC;IAED;;OAEG;IACH,mBAAmB,CACjB,UAAyB,EACzB,OAAgB,EAChB,QAAkB,EAClB,SAAgC;QAEhC,MAAM,oBAAoB,GAAG,SAAS,CAAC,oBAAoB,EAAE,cAAc,CAAC;QAC5E,IAAI,oBAAoB,KAAK,SAAS,EAAE,CAAC;YACvC,OAAO,QAAQ,CAAC;QAClB,CAAC;QAED,MAAM,iBAAiB,GACrB,UAAU,CAAC,0BAA0B,CAAC,oBAAoB,CAAC,CAAC;QAC9D,aAAa,CACX,iBAAiB,EACjB,uBAAuB,oBAAoB,sBAAsB,CAClE,CAAC;QAEF,OAAO,iBAAiB,CAAC,oBAAoB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IACnE,CAAC;CACF"}
1
+ {"version":3,"file":"sim-cff-applicator.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/controller/cff/sim-cff-applicator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAEvE;;GAEG;AACH,MAAM,OAAO,gBAAgB;IAC3B;;OAEG;IACH,KAAK,CAAC,kBAAkB,CACtB,UAAyB,EACzB,OAAgB,EAChB,SAAgC;QAEhC,MAAM,mBAAmB,GAAG,SAAS,CAAC,oBAAoB,EAAE,aAAa,CAAC;QAC1E,IAAI,mBAAmB,KAAK,SAAS,EAAE,CAAC;YACtC,OAAO,MAAM,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACxC,CAAC;QAED,MAAM,gBAAgB,GACpB,UAAU,CAAC,0BAA0B,CAAC,mBAAmB,CAAC,CAAC;QAC7D,aAAa,CACX,gBAAgB,EAChB,uBAAuB,mBAAmB,qBAAqB,CAChE,CAAC;QAEF,OAAO,MAAM,gBAAgB,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,mBAAmB,CACvB,UAAyB,EACzB,OAAgB,EAChB,QAAkB,EAClB,SAAgC;QAEhC,MAAM,oBAAoB,GAAG,SAAS,CAAC,oBAAoB,EAAE,cAAc,CAAC;QAC5E,IAAI,oBAAoB,KAAK,SAAS,EAAE,CAAC;YACvC,OAAO,MAAM,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACzC,CAAC;QAED,MAAM,iBAAiB,GACrB,UAAU,CAAC,0BAA0B,CAAC,oBAAoB,CAAC,CAAC;QAC9D,aAAa,CACX,iBAAiB,EACjB,uBAAuB,oBAAoB,sBAAsB,CAClE,CAAC;QAEF,OAAO,MAAM,iBAAiB,CAAC,oBAAoB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IACzE,CAAC;CACF"}
@@ -33,7 +33,7 @@ export class SimCloudFrontRequestPipeline {
33
33
  // Handle viewer-request CFF, if any.
34
34
  // A viewer-request CFF can either rewrite the Request that continues to the
35
35
  // Origin or short-circuit the request by returning a Response.
36
- const cffResult = this.stages.cffApplicator.applyViewerRequest(cloudFront, requestReference, behaviour);
36
+ const cffResult = await this.stages.cffApplicator.applyViewerRequest(cloudFront, requestReference, behaviour);
37
37
  if (cffResult instanceof Response) {
38
38
  return cffResult;
39
39
  }
@@ -51,7 +51,7 @@ export class SimCloudFrontRequestPipeline {
51
51
  // Handle viewer-response CFF, if any.
52
52
  // A viewer-response CFF can inspect the original request and replace or
53
53
  // modify the Origin response before it is returned to the caller.
54
- return this.stages.cffApplicator.applyViewerResponse(cloudFront, requestReference, response, behaviour);
54
+ return await this.stages.cffApplicator.applyViewerResponse(cloudFront, requestReference, response, behaviour);
55
55
  }
56
56
  }
57
57
  //# sourceMappingURL=sim-cloudfront-request-pipeline.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sim-cloudfront-request-pipeline.js","sourceRoot":"","sources":["../../../../src/service/cloudfront/controller/sim-cloudfront-request-pipeline.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,6BAA6B,EAAE,MAAM,qDAAqD,CAAC;AAEpG;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,4BAA4B;IACV,MAAM;IAAnC,YAA6B,MAA2C;sBAA3C,MAAM;IAAwC,CAAC;IAE5E;;OAEG;IACH,KAAK,CAAC,MAAM,CAAC,OAAgB;QAC3B,IAAI,gBAAgB,GAAG,OAAO,CAAC;QAE/B,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,eAAe,CAAC,gBAAgB,CAAC,CAAC;QAEzE,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,OAAO,IAAI,QAAQ,CAAC,gDAAgD,EAAE;gBACpE,MAAM,EAAE,GAAG;aACZ,CAAC,CAAC;QACL,CAAC;QAED,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;QAEnD,gBAAgB,GAAG,6BAA6B,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;QAE3E,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,OAAO,CACrD,gBAAgB,EAChB,MAAM,CACP,CAAC;QAEF,qCAAqC;QACrC,4EAA4E;QAC5E,+DAA+D;QAC/D,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,kBAAkB,CAC5D,UAAU,EACV,gBAAgB,EAChB,SAAS,CACV,CAAC;QACF,IAAI,SAAS,YAAY,QAAQ,EAAE,CAAC;YAClC,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,gBAAgB,GAAG,SAAS,CAAC;QAE7B,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAC1D,gBAAgB,EAChB,MAAM,EACN,SAAS,CACV,CAAC;QAEF,2EAA2E;QAC3E,0EAA0E;QAC1E,uEAAuE;QACvE,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,KAAK,CAChE,gBAAgB,EAChB,MAAM,EACN,cAAc,CACf,CAAC;QAEF,4EAA4E;QAC5E,+DAA+D;QAC/D,oEAAoE;QACpE,6DAA6D;QAC7D,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,yBAAyB,CAAC,KAAK,CAC1D,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,SAAS,CACV,CAAC;QAEF,sCAAsC;QACtC,wEAAwE;QACxE,kEAAkE;QAClE,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,mBAAmB,CAClD,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,SAAS,CACV,CAAC;IACJ,CAAC;CACF"}
1
+ {"version":3,"file":"sim-cloudfront-request-pipeline.js","sourceRoot":"","sources":["../../../../src/service/cloudfront/controller/sim-cloudfront-request-pipeline.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,6BAA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AK,CAChE,gBAAgB,EAChB,MAAM,EACN,cAAc,CACf,CAAC;QAEF,4EAA4E;QAC5E,+DAA+D;QAC/D,oEAAoE;QACpE,6DAA6D;QAC7D,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,yBAAyB,CAAC,KAAK,CAC1D,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,SAAS,CACV,CAAC;QAEF,sCAAsC;QACtC,wEAAwE;QACxE,kEAAkE;QAClE,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,mBAAmB,CACxD,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,SAAS,CACV,CAAC;IACJ,CAAC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"sim-cf-behavior-properties.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/distribution/configurator/sim-cf-behavior-properties.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gCAAgC,EAChC,uCAAuC,EAExC,MAAM,kEAAkE,CAAC;AAC1E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAEzF,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,8CAA8C,CAAC;AAGvG;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,aAAa,EACT,uCAAuC,GACvC,gCAAgC,EACpC,qBAAqB,EAAE,kCAAkC,GACxD,qBAAqB,CAsBvB"}
1
+ {"version":3,"file":"sim-cf-behavior-properties.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/distribution/configurator/sim-cf-behavior-properties.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gCAAgC,EAChC,uCAAuC,EAExC,MAAM,kEAAkE,CAAC;AAC1E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAEzF,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,8CAA8C,CAAC;AAIvG;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,aAAa,EACT,uCAAuC,GACvC,gCAAgC,EACpC,qBAAqB,EAAE,kCAAkC,GACxD,qBAAqB,CA0BvB"}